@arcgis/core 4.33.0-next.20250424 → 4.33.0-next.20250426
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/WebLinkChart.js +1 -1
- package/WebScene.js +1 -1
- package/analysis/Analysis.js +1 -1
- package/analysis/support/AnalysisOriginWebScene.d.ts +1 -1
- package/analysis/support/AnalysisOriginWebScene.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/070839cb71c8e764b8d7.js +1 -0
- package/assets/esri/core/workers/chunks/19084a293694c5a00cae.js +1 -0
- package/assets/esri/core/workers/chunks/{5958af341014e13475d2.js → 2bed8a5ed9ae3760fa2f.js} +1 -1
- package/assets/esri/core/workers/chunks/{7ffa68d69c138db1295d.js → 2e3019ce49e972a815ca.js} +1 -1
- package/assets/esri/core/workers/chunks/{d696abbb1b13ac1a689b.js → 345993291540433d3d92.js} +1 -1
- package/assets/esri/core/workers/chunks/{db5913824d5e5a2a8365.js → 360c8cff7c3b25d2b2d2.js} +1 -1
- package/assets/esri/core/workers/chunks/38f5e6a202ce292edd9f.js +1 -0
- package/assets/esri/core/workers/chunks/415903f481392c72870f.js +1 -0
- package/assets/esri/core/workers/chunks/4351b3e54b309935faed.js +1 -0
- package/assets/esri/core/workers/chunks/4da99f058cca83937e9b.js +1 -0
- package/assets/esri/core/workers/chunks/5acdd49c5f1a49fdc6e7.js +1 -0
- package/assets/esri/core/workers/chunks/73f9c3a74a815baa239c.js +1 -0
- package/assets/esri/core/workers/chunks/76575d2c1c56e37c1315.js +319 -0
- package/assets/esri/core/workers/chunks/{f2cef954b58c6604642c.js → 87dcfbbcf290e0fa5c0f.js} +160 -167
- package/assets/esri/core/workers/chunks/91acd69dcf7dac109017.js +1 -0
- package/assets/esri/core/workers/chunks/{265f69d153b7b6f07e42.js → 92836e3a2c5226296fec.js} +1 -1
- package/assets/esri/core/workers/chunks/968f2f841c011095a6d2.js +1 -0
- package/assets/esri/core/workers/chunks/a2676f3f135ad5fdf872.js +1 -0
- package/assets/esri/core/workers/chunks/a8430e1e2142f1ce9b92.js +1 -0
- package/assets/esri/core/workers/chunks/bf543bdec3da0fe278fb.js +1 -0
- package/assets/esri/core/workers/chunks/{75a04b073231da70c18d.js → d44e99b4bb1cec6a922b.js} +1 -1
- package/assets/esri/core/workers/chunks/f52e597dca4b32a81881.js +1 -0
- package/assets/esri/libs/lyr3d/lyr3DMain.wasm +0 -0
- package/assets/esri/libs/lyr3d/lyr3DWorker.wasm +0 -0
- package/assets/esri/themes/base/_core.scss +2 -0
- package/assets/esri/themes/base/widgets/_Legend.scss +64 -0
- package/assets/esri/themes/base/widgets/_OrientedImageryViewerNavigationUI.scss +77 -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/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_en.json +1 -1
- package/chunks/ShadowCastAccumulate.glsl.js +13 -9
- package/chunks/ShadowCastVisualize.glsl.js +24 -9
- package/chunks/boundedPlane.js +1 -1
- package/chunks/lyr3DMain.js +1 -1
- package/chunks/lyr3DWorker.js +1 -1
- package/geometry/support/boundedPlane.js +1 -1
- package/interfaces.d.ts +528 -70
- package/layers/IntegratedMesh3DTilesLayer.js +1 -1
- package/layers/KnowledgeGraphLayer.js +1 -1
- package/layers/LinkChartLayer.js +1 -1
- package/layers/Lyr3DWasmPerSceneView.js +1 -1
- package/layers/ParquetLayer.js +1 -1
- package/layers/mixins/ImageryTileMixin.js +1 -1
- package/layers/ogc/wfsUtils.js +1 -1
- package/layers/orientedImagery/transformations/utils.js +1 -1
- package/layers/support/ParquetEncodingLocation.d.ts +4 -0
- package/layers/support/ParquetEncodingLocation.js +1 -1
- package/layers/support/ParquetEncodingWkb.d.ts +4 -0
- package/layers/support/ParquetEncodingWkb.js +1 -1
- package/layers/support/RasterStorageInfo.js +1 -1
- package/layers/support/layerUtils.js +1 -1
- package/layers/support/parquetUtils.d.ts +3 -0
- package/layers/support/parquetUtils.js +1 -1
- package/layers/support/rasterDatasets/BaseRaster.js +1 -1
- package/layers/support/rasterDatasets/ImageServerRaster.js +1 -1
- package/layers/support/rasterDatasets/RawBlockCache.js +1 -1
- package/layers/support/rasterFormats/pixelRangeUtils.js +1 -1
- package/package.json +2 -2
- package/portal/schemas/definitions.js +1 -1
- package/portal/schemas/integratedMesh3DTilesLayerItem.js +1 -1
- package/smartMapping/renderers/size.js +1 -1
- package/smartMapping/renderers/support/spikeUtils.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/ImageryTileLayerView2D.js +1 -1
- package/views/2d/layers/imagery/BaseImageryTileSubView2D.js +1 -1
- package/views/2d/layers/imagery/ImageryTileView2D.js +1 -1
- package/views/2d/layers/support/MediaLayerInteraction.js +1 -1
- package/views/3d/analysis/DirectLineMeasurementAnalysisView3D.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
- package/views/3d/analysis/LineOfSight/LineOfSightTool.js +1 -1
- package/views/3d/analysis/Slice/SliceController.js +1 -1
- package/views/3d/analysis/Slice/SliceTool.js +1 -1
- package/views/3d/analysis/ViewshedAnalysisView3D.js +1 -1
- package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/Lyr3DWorker.js +1 -1
- package/views/3d/layers/VoxelLayerView3D.js +1 -1
- package/views/3d/layers/graphics/Deconflictor.js +1 -1
- package/views/3d/layers/graphics/GraphicsDeconflictor.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipeline.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorker.js +1 -1
- package/views/3d/layers/graphics/pipeline/Feature3DPipelineWorkerHandle.js +1 -1
- package/views/3d/layers/graphics/pipeline/FeatureProcessingContext.js +5 -0
- package/views/3d/layers/graphics/pipeline/PipelineCommand.js +1 -1
- package/views/3d/layers/graphics/pipeline/Tile3DManager.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/FeaturePipelineRenderManager.js +1 -1
- package/views/3d/layers/graphics/pipeline/rendering/RenderCommandContext.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/Factory.js +5 -0
- package/views/3d/layers/graphics/pipeline/symbolization/SimpleFeatureRenderer.js +5 -0
- package/views/3d/layers/graphics/pipeline/symbolization/TestObjectSymbol.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/TestSymbol.js +1 -1
- package/views/3d/layers/graphics/pipeline/symbolization/UniqueValueFeatureRenderer.js +1 -1
- package/views/3d/layers/support/MediaLayerInteraction.js +1 -1
- package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
- package/views/3d/support/ViewSlice.js +5 -0
- package/views/3d/webgl/ManagedFBO.js +1 -1
- package/views/3d/webgl-engine/core/FBOCache.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/Laserline.glsl.js +7 -13
- package/views/3d/webgl-engine/core/shaderLibrary/shading/AnalyticalSkyModel.glsl.js +3 -6
- package/views/3d/webgl-engine/core/shaderLibrary/shading/EvaluateSceneLighting.glsl.js +15 -15
- package/views/3d/webgl-engine/core/shaderLibrary/shading/PhysicallyBasedRendering.glsl.js +0 -9
- package/views/3d/webgl-engine/core/shaderLibrary/util/BlendColorsPremultiplied.glsl.js +5 -0
- package/views/3d/webgl-engine/lib/Renderer.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowAccumulator.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/lib/SliceHelper.js +1 -1
- package/views/3d/webgl-engine/shaders/BlackLevelLightSoftCompression.glsl.js +10 -0
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulate.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastAccumulateTechniqueConfiguration.js +5 -0
- package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechnique.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualizeTechniqueConfiguration.js +1 -1
- package/views/PopupView.js +1 -1
- package/views/SceneView.js +1 -1
- package/views/SelectionManager.js +1 -1
- package/views/analysis/analysisViewUtils.js +1 -1
- package/views/input/InputManager.js +1 -1
- package/views/input/ViewEvents.js +1 -1
- package/views/interactive/snapping/featureSources/featureServiceSource/tileUtils.js +1 -1
- package/views/support/selectionUtils.js +1 -1
- package/webscene/support/analysisUtils.js +1 -1
- package/webscene/types.d.ts +5 -0
- package/webscene/types.js +5 -0
- package/widgets/DirectLineMeasurement3D/DirectLineMeasurement3DViewModel.js +1 -1
- package/widgets/Editor/UpdateWorkflow.js +1 -1
- package/widgets/Editor/workflowUtils.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileController.js +1 -1
- package/widgets/ElevationProfile/ElevationProfileInteraction.js +1 -1
- package/widgets/FeatureForm/UtilityNetworkAssociationAddAssociationViewModel.js +1 -1
- package/widgets/FeatureTable/support/tableUtils.js +1 -1
- package/widgets/FeatureTable.js +1 -1
- package/widgets/Legend/styles/card/SizeRamp.js +1 -1
- package/widgets/Legend/styles/classic/SizeRamp.js +1 -1
- package/widgets/Legend/styles/support/sizeRampUtils.js +5 -0
- package/widgets/Legend/styles/support/univariateUtils.js +1 -1
- package/widgets/Legend/styles/support/utils.js +1 -1
- package/widgets/Legend/support/ActiveLayerInfo.js +1 -1
- package/widgets/Legend/support/sizeRampUtils.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerVisibleElements.js +1 -1
- package/widgets/OrientedImageryViewer/components/ImageViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/components/NavigationNode.js +5 -0
- package/widgets/OrientedImageryViewer/components/NavigationUI.js +5 -0
- package/widgets/OrientedImageryViewer/components/NavigationUIViewModel.js +5 -0
- package/widgets/OrientedImageryViewer/components/imageNavigationUtils.js +5 -0
- package/widgets/OrientedImageryViewer/css.js +1 -1
- package/widgets/OrientedImageryViewer/utils.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/PanoramicViewer/PanoramicViewerViewModel.js +1 -1
- package/widgets/ShadowCast/DiscreteOptions.d.ts +4 -0
- package/widgets/ShadowCast/DiscreteOptions.js +1 -1
- package/widgets/ShadowCast/DurationOptions.d.ts +4 -0
- package/widgets/ShadowCast/DurationOptions.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/widgets/ShadowCast/ThresholdOptions.d.ts +4 -0
- package/widgets/ShadowCast/ThresholdOptions.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/TimeZoneLabel.js +1 -1
- package/widgets/VideoPlayer.js +1 -1
- package/widgets/support/AnalysisViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/0a48b9734ab4c64a6f4f.js +0 -1
- package/assets/esri/core/workers/chunks/1427e7953c3d8c87c5e8.js +0 -1
- package/assets/esri/core/workers/chunks/146b3699a9e8b1f2dcc2.js +0 -1
- package/assets/esri/core/workers/chunks/22f604726529ee6f8c25.js +0 -1
- package/assets/esri/core/workers/chunks/7c7ff11246479382974c.js +0 -1
- package/assets/esri/core/workers/chunks/8dd26b12c625d20196ed.js +0 -319
- package/assets/esri/core/workers/chunks/91f8547a13f0461045ef.js +0 -1
- package/assets/esri/core/workers/chunks/931275cfa2c55eb0f504.js +0 -1
- package/assets/esri/core/workers/chunks/9f416cc5673665f8c37c.js +0 -1
- package/assets/esri/core/workers/chunks/b42ecc7c3eb2fd8d1308.js +0 -1
- package/assets/esri/core/workers/chunks/bd0dbad694ce5531deab.js +0 -1
- package/assets/esri/core/workers/chunks/d04efa51da9b4eb3a8a7.js +0 -1
- package/assets/esri/core/workers/chunks/d8474dca270b25705699.js +0 -1
- package/assets/esri/core/workers/chunks/ed3d1d0465f4a4d8df4a.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5943],{18768:(e,t,i)=>{i.d(t,{b:()=>l});var s=i(90237),r=i(53966),a=i(10107),n=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{let t=class extends e{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,r.A.getLogger(this)))}};return(0,s._)([(0,a.MZ)()],t.prototype,"title",null),(0,s._)([(0,a.MZ)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,n.$)("esri.layers.mixins.ArcGISService")],t),t}},21312:(e,t,i)=>{i.d(t,{A:()=>y});var s,r=i(90237),a=i(10107),n=(i(44208),i(53966),i(87811),i(93223)),o=i(36005),l=i(40608),c=i(43937),u=i(5443),f=i(86738),h=i(82434);function p(e,t,i){const{x:s,y:r}=t;if(i<2)return{x:e[0]+s*e[2]+r*e[4],y:e[1]+s*e[3]+r*e[5]};if(2===i){const t=s*s,i=r*r,a=s*r;return{x:e[0]+s*e[2]+r*e[4]+t*e[6]+a*e[8]+i*e[10],y:e[1]+s*e[3]+r*e[5]+t*e[7]+a*e[9]+i*e[11]}}const a=s*s,n=r*r,o=s*r,l=a*s,c=a*r,u=s*n,f=r*n;return{x:e[0]+s*e[2]+r*e[4]+a*e[6]+o*e[8]+n*e[10]+l*e[12]+c*e[14]+u*e[16]+f*e[18],y:e[1]+s*e[3]+r*e[5]+a*e[7]+o*e[9]+n*e[11]+l*e[13]+c*e[15]+u*e[17]+f*e[19]}}function d(e,t,i){const{xmin:s,ymin:r,xmax:a,ymax:n,spatialReference:o}=t;let l=[];if(i<2)l.push({x:s,y:n}),l.push({x:a,y:n}),l.push({x:s,y:r}),l.push({x:a,y:r});else{let e=10;for(let t=0;t<e;t++)l.push({x:s,y:r+(n-r)*t/(e-1)}),l.push({x:a,y:r+(n-r)*t/(e-1)});e=8;for(let t=1;t<=e;t++)l.push({x:s+(a-s)*t/e,y:r}),l.push({x:s+(a-s)*t/e,y:n})}l=l.map((t=>p(e,t,i)));const c=l.map((e=>e.x)),f=l.map((e=>e.y));return new u.A({xmin:Math.min.apply(null,c),xmax:Math.max.apply(null,c),ymin:Math.min.apply(null,f),ymax:Math.max.apply(null,f),spatialReference:o})}let m=s=class extends h.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:i,coeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeForwardCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.coeffX=s,t.coeffY=r}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,i,s,r,a,n]=e,o=s*n-a*r,l=a*r-s*n;return[(a*i-t*n)/o,(s*i-t*r)/l,n/o,r/l,-a/o,-s/l]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:i,inverseCoeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeInverseCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.inverseCoeffX=s,t.inverseCoeffY=r}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=p(this.forwardCoefficients,e,this.polynomialOrder);return new f.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=p(this.inverseCoefficients,e,this.polynomialOrder);return new f.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new s({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"polynomialOrder",void 0),(0,r._)([(0,a.MZ)()],m.prototype,"forwardCoefficients",void 0),(0,r._)([(0,o.w)("forwardCoefficients",["coeffX","coeffY"])],m.prototype,"readForwardCoefficients",null),(0,r._)([(0,c.K)("forwardCoefficients")],m.prototype,"writeForwardCoefficients",null),(0,r._)([(0,a.MZ)({json:{write:!0}})],m.prototype,"inverseCoefficients",null),(0,r._)([(0,o.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],m.prototype,"readInverseCoefficients",null),(0,r._)([(0,c.K)("inverseCoefficients")],m.prototype,"writeInverseCoefficients",null),(0,r._)([(0,a.MZ)()],m.prototype,"affectsPixelSize",null),(0,r._)([(0,n.e)({PolynomialXform:"polynomial"})],m.prototype,"type",void 0),m=s=(0,r._)([(0,l.$)("esri.layers.support.rasterTransforms.PolynomialTransform")],m);const y=m},25943:(e,t,i)=>{i.d(t,{d:()=>A});var s,r=i(90237),a=i(78888),n=i(69622),o=i(71903),l=i(49186),c=i(36563),u=(i(44208),i(66344)),f=i(3694),h=i(74887),p=i(36708),d=i(11932),m=i(84952),y=i(10107),g=(i(53966),i(87811),i(40608)),w=i(72802),x=i(4718),v=i(69397),b=i(34275);class I{constructor(e){!function(e){if(!e?.location)throw new l.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new l.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new l.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new l.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new l.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,x.o8)(t));const s=this.location.width,r=this.location.height;let a=!0,n=!0;const o=function(e,t=!1){return e<=b.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(s*r/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(n=!1,o[c]|=1<<t):a=!1,31===t&&++c}n?(this._availability="unavailable",this.byteSize=40):a?(this._availability="available",this.byteSize=40):(this._availability=o,this.byteSize=40+(0,v.Qf)(o))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),s=i%32,r=i>>5,a=this._availability;return r<0||r>a.length?"unknown":a[r]&1<<s?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||a.A,{row:s,col:r,width:n,height:o}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(422===e?.details?.httpStatus)return{location:{top:s,left:r,width:n,height:o},valid:!0,data:new Array(n*o).fill(0)};throw e})).then((e=>{if(e.location&&(e.location.top!==s||e.location.left!==r||e.location.width!==n||e.location.height!==o))throw new l.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:s,left:r,width:n,height:o}});return I.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new I(e))}}function _(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function S(e,t,i){return new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let A=class extends n.A{static{s=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=a.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.q(2*o.u.MEGABYTES),this.addHandles((0,p.wB)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition()),p.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const s=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return s?s.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,s){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(S(e,t,i)):this._fetchTilemap(e,t,i,s).catch((e=>e)).then((s=>{if(s instanceof I){const r=s.getAvailability(t,i);if("unavailable"===r)throw S(e,t,i);return r}if((0,h.zf)(s))throw s;return"unknown"}))}fetchAvailabilityUpsample(e,t,i,s,r){s.level=e,s.row=t,s.col=i;const a=this.layer.tileInfo;a.updateTileInfo(s);const n=this.fetchAvailability(e,t,i,r).catch((e=>{if((0,h.zf)(e))throw e;if(a.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,r);throw e}));return this._fetchAvailabilityUpsamplePrefetch(s.id,e,t,i,r,n),n}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,a,n){if(!this._prefetchingEnabled||null==e)return;const o=`prefetch-${e}`;if(this.hasHandles(o))return;const l=new AbortController;n.then((()=>l.abort()),(()=>l.abort()));let u=!1;const f=(0,c.hA)((()=>{u||(u=!0,l.abort())}));if(this.addHandles(f,o),await(0,d.md)(10,l.signal).catch((()=>{})),u||(u=!0,this.removeHandles(o)),(0,h.G4)(l))return;const p=new w.U(e,t,i,r),m={...a,signal:l.signal},y=this.layer.tileInfo;for(let e=0;s._prefetches.length<s._maxPrefetch&&y.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,m);s._prefetches.push(e);const t=()=>{s._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new f.A({initialSize:s._maxPrefetch})}_fetchTilemap(e,t,i,s){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new l.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,a=this._tilemapFromCache(e,t,i,r);if(a)return Promise.resolve(a);const n=s?.signal;return s={...s,signal:null},new Promise(((e,t)=>{(0,h.u7)(n,(()=>t((0,h.NK)())));const i=_(r);let a=this._pendingTilemapRequests[i];if(!a){a=I.fromDefinition(r,s).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=a,a.then(e,e)}a.then(e,t)}))}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,m.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,s){s.level=e,s.row=t-t%this.size,s.col=i-i%this.size;const r=_(s);return this._tilemapCache.get(r)}get test(){}};(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"layer",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"minLOD",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"maxLOD",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"request",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"size",void 0),A=s=(0,r._)([(0,g.$)("esri.layers.support.TilemapCache")],A)},35943:(e,t,i)=>{i.r(t),i.d(t,{default:()=>qe});var s=i(90237),r=i(13874),a=i(69540),n=i(49186),o=i(53966),l=i(92071),c=i(74887),u=i(36708),f=i(10107),h=i(56507),p=i(44208),d=(i(87811),i(40608)),m=i(4146),y=i(18768),g=i(63074),w=i(69208),x=i(89015),v=i(16131),b=i(8303),I=i(63660),_=i(56551),S=i(54310),A=i(25036),T=i(82935),R=i(10873),C=i(20437),M=i(74797),O=i(22796),F=i(76353),P=i(84169),k=i(4916),D=i(68197),N=i(5443),E=i(16930),L=i(73444),B=i(14140),z=i(16019);function J(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function U(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function V(e){const{axes:t}=e.domain,i=Object.keys(t),s=[],r=[];let a=-1,n=-1,o=[];for(let e=0;e<i.length;e++){const l=i[e];J(l)?a=e:U(l)&&(n=e);const c=t[l],u=[];if("values"in c){c.values.forEach((e=>u.push("string"==typeof e?new Date(e).getTime():e)));const e=u[1]-u[0];s.push([u[0]-.5*e,u[u.length-1]+.5*e]),r.push(e)}else{const{start:e,stop:t,num:i}=c,a=(t-e)/(i-1);s.push([e-.5*a,t+.5*a]),r.push(a);for(let t=0;t<i;t++)u.push(e+a*t)}o.push({name:l,values:u,extent:[u[0],u[u.length-1]]})}a>-1&&-1===n?n=0===a?1:0:n>-1&&-1===a?a=0===n?1:0:-1===n&&-1===a&&(a=0,n=1),o=o.filter(((e,t)=>!(t===a||t===n)));const{referencing:l}=e.domain,c=l.find((e=>e.coordinates.includes(i[a]))).system.id,u=c?.slice(c.lastIndexOf("/")+1),f=null==u||"CRS84"===u?4326:Number(u),h=new E.A({wkid:f}),[p,d]=s[a],[m,y]=s[n],g=new N.A({xmin:p,xmax:d,ymin:m,ymax:y,spatialReference:h});return{width:Math.round(g.width/r[a]),height:Math.round(g.height/r[n]),extent:g,dimensions:o}}function $(e){const t=(0,L.ZS)()?.language;return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function j(){return Math.round(255*Math.random())}function q(e){const t={},{parameters:i}=e;if(!i)return t;for(const[e,s]of Object.entries(i)){const{type:i,description:r,unit:a,categoryEncoding:n,observedProperty:o}=s;if("Parameter"===i&&(t[e]={},r&&(t[e].description=$(r)),a&&(t[e].unit=a.label?$(a.label):null,t[e].symbol=a.symbol?.value),n)){const i=Object.entries(n).map(((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1})));let s=!1;o?.categories?.length&&(o.categories.forEach((e=>{if(!e.id)return;const t=e.id.slice(e.id.lastIndexOf("/")+1),r=i.find((e=>e.ClassName===t));if(!r)return;const a=e.label?$(e.label):null;if(r.Label=a,e.preferredColor){const t=D.A.fromHex(e.preferredColor);t&&(s=!0,r.Red=t.r,r.Green=t.g,r.Blue=t.b)}})),s&&i.forEach((e=>{null==e.Red&&(e.Red=j(),e.Green=j(),e.Blue=j())})));const r={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:i.map((e=>({attributes:e})))};s&&r.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=r}}return t}function G(e){let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let s=0;s<e.length;s++){const r=e[s];null!=r&&(r<t&&(t=r),r>i&&(i=r))}return(0,z.X1)(t,i)}function H(e,t,i){const s=e.map(((e,i)=>({name:e,count:t[i]}))).sort(((e,t)=>e.name>t.name?-1:1)),r=(a=1,e=>a*=e.count);var a;const n=[...s.slice(1),{name:"",count:1}].reverse().map(r).reverse();let o=0;for(let r=e.length-1;r>=0;r--)o+=n[s.findIndex((({name:t})=>t===e[r]))]*(i%t[r]),i=Math.floor(i/t[r]);return o}var Z=i(45617),W=i(87186),X=i(77301),Y=i(28435),K=i(6952);let Q=class extends k.A{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.source=null}get url(){return""}fetchRawTile(e,t,i,s={}){if(!this._pixelBlockTiles){const{rasterInfo:r}=this,[a,n]=r.storageInfo.tileInfo.size,{sliceId:o}=s,{pixelBlocks:l}=this.source,c={pixelBlock:null==o?l[0]:l[o],useBilinear:"thematic"!==r.dataType,tileSize:{width:a,height:n},level:e,row:t,col:i},u=this.rasterJobHandler?this.rasterJobHandler.clipTile(c,s):(0,Y.J$)(c);return Promise.resolve(u)}const r=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(r)}async _open(e){const t=this.source,{pixelBlocks:i,attributeTable:s,statistics:r,histograms:a,name:n,nativeExtent:o,transform:l}=t,c=i[0],{width:u,height:f,pixelType:h}=c,p=t.extent??new N.A({xmin:-.5,ymin:.5,xmax:u-.5,ymax:f-.5,spatialReference:new E.A({wkid:3857})}),d=t.isPseudoSpatialReference??!t.extent,m={x:p.width/u,y:p.height/f},y={...t.keyProperties};s&&(y.DataType="Thematic");const g=new W.A({width:u,height:f,pixelType:h,extent:p,nativeExtent:o,attributeTable:s,transform:l,pixelSize:m,spatialReference:p.spatialReference,bandCount:c.pixels.length,keyProperties:y,multidimensionalInfo:t.multidimensionalInfo,statistics:r,isPseudoSpatialReference:d,histograms:a});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(g),this.createRemoteDatasetStorageInfo(g,512,512),this._set("rasterInfo",g),this.updateTileInfo(),g.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,g.multidimensionalInfo):await this._buildInMemoryRaster(c,{width:512,height:512},e),g.multidimensionalInfo||(this.source=null),this.datasetName=n}async _buildInMemoryRaster(e,t,i){const{rasterInfo:s}=this,r=s.storageInfo.maximumPyramidLevel??0,a="thematic"!==s.dataType,o=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:r,useBilinear:a},i):Promise.resolve((0,Y.lD)(e,t,r,a)),l=null!=s.statistics,u=null!=s.histograms,f=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,K.f4)(e)),h=await(0,c.Lx)([o,f]);if(!h[0].value&&h[1].value)throw new n.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=h[0].value,l||(s.statistics=h[1].value?.statistics),u||(s.histograms=h[1].value?.histograms)}async _buildMDimStats(e,t,i){for(let s=0;s<t.variables.length;s++){const r=t.variables[s];if(r.statistics)continue;const a=r.dimensions.map((e=>new Z.A({variableName:r.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0}))),n=(0,X.NG)(a,t),o=null==n?null:e[n];if(null==o)continue;const l=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:o},i):(0,K.eH)(o);r.statistics=l.statistics,r.histograms||(r.histograms=l.histograms)}}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],Q.prototype,"datasetFormat",void 0),(0,s._)([(0,f.MZ)()],Q.prototype,"source",void 0),(0,s._)([(0,f.MZ)()],Q.prototype,"url",null),Q=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.InMemoryRaster")],Q);const ee=Q;var te=i(22671);let ie=class extends k.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const{extent:t,pixelBlocks:i,multidimensionalInfo:s,attributeTable:r,bandNames:a}=await this._fetchData(e),{statistics:n,histograms:o}=(0,K.eH)(i[0]),l=a?.map((e=>({BandName:e}))),c={DataType:r?"Thematic":s?"Scientific":"Generic",BandProperties:l},u=new ee({source:{extent:t,pixelBlocks:i,attributeTable:r?te.A.fromJSON(r):null,multidimensionalInfo:s,statistics:n,histograms:o,keyProperties:c,isPseudoSpatialReference:!1}});await u.open(),this._inMemoryRaster=u;const f=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",f.slice(0,f.indexOf("."))),this._set("rasterInfo",u.rasterInfo)}async _fetchData(e){const t=this.source??(await this.request(this.url,{signal:e?.signal})).data,i="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new n.A(i,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new n.A(i,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new n.A(i,"Missing domain referencing in the grid coverage data");const s=Object.values(t.ranges);for(let e=0;e<s.length;e++){const{axisNames:t,shape:r,type:a,values:o}=s[e];if(!("ndarray"===a.toLowerCase()&&o?.length&&t?.length&&r?.length))throw new n.A(i,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!J(t[t.length-1])||!U(t[t.length-2]))throw new n.A(i,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){const{width:t,height:i,extent:s,dimensions:r}=V(e),{ranges:a}=e,n=Object.keys(a).sort(((e,t)=>e<t?-1:1)),o=[];for(let e=0;e<n.length;e++){const t=n[e];r?.length&&o.push({name:t,dimensions:r})}const l=q(e);o.forEach((e=>l[e.name]&&Object.assign(e,l[e.name])));const c=o.length?{variables:o}:void 0,u=[];for(let e=0;e<n.length;e++){const s=n[e],{values:o,dataType:l,axisNames:c,shape:f}=a[s],h=f.length>2?e*f.slice(0,-2).reduce(((e,t)=>e*t)):0,p=c.slice(0,-2),d=f.slice(0,-2),m="float"===l?"f32":G(o),y=t*i,g=o.length/y;for(let s=0;s<g;s++){const a=B.A.createEmptyBand(m,y),n=new Uint8Array(y).fill(255);let l=!1;const c=s*y;for(let e=0;e<y;e++){const t=o[c+e];null==t?(n[e]=0,l=!0):a[e]=t}if(0===e||r?.length){const e=new B.A({width:t,height:i,mask:l?n:null,pixels:[a],pixelType:m});e.updateStatistics(),r?.length?u[H(p,d,s)+h]=e:u.push(e)}else{const e=u[s];e.pixels.push(a),l?e.mask&&(e.mask=B.A.combineBandMasks([e.mask,n])):e.mask=l?n:null}}}const f=Object.values(l).find((e=>e.attributeTable))?.attributeTable;return{extent:s,pixelBlocks:u,multidimensionalInfo:c,attributeTable:f,bandNames:c?void 0:n}}(t)}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],ie.prototype,"datasetFormat",void 0),(0,s._)([(0,f.MZ)({constructOnly:!0})],ie.prototype,"source",void 0),ie=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.CovJSONRaster")],ie);const se=ie;var re=i(4576),ae=i(21325),ne=i(50103),oe=i(21312);function le(e,t){if(!e||!t)return null;const i=[];for(let s=0;s<e.length;s++)i.push(e[s]),i.push(t[s]);return i}function ce(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new E.A({wkid:t});if(e=String(e).trim(),(0,ae.jp)(e))return new E.A({wkt2:e});const i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;const s=i.indexOf("VERTCS"),r=i.indexOf("PROJCS"),a=r>-1?r:i.indexOf("GEOGCS");if(-1===a)return null;const n=e.slice(a,e.lastIndexOf("]",s)+1).trim(),o=e.slice(s,e.lastIndexOf("]")).trim();t=ue(n);const l=new E.A(t?{wkid:t}:{wkt:n}),c=ue(o);return c&&(l.vcsWkid=c),l}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=ue(e),new E.A(0!==t?{wkid:t}:{wkt:e})):null}function ue(e){const t=e.replaceAll("]","[").replaceAll('"',"").split("[").map((e=>e.trim())).filter((e=>""!==e)),i=t[t.length-1].split(","),s=i[0]?.toLowerCase();if(("epsg"===s||"esri"===s)&&e.endsWith('"]]')){const e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function fe(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach((e=>{if(1===e.nodeType)if((0,ne.g7)(e,"SRS")){if(!t.spatialReference){const i=(0,ne.mX)(e);t.spatialReference=ce(i)}}else if((0,ne.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:i,transform:s}=function(e){const t=(0,ne.V6)(e,"GeodataXform"),i=ce((0,ne.v7)(t,"SpatialReference/WKID")||(0,ne.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};const s=(0,ne.v7)(t,"PolynomialOrder")??1,r=(0,ne.Ui)(t,"CoeffX/Double"),a=(0,ne.Ui)(t,"CoeffY/Double"),n=(0,ne.Ui)(t,"InverseCoeffX/Double"),o=(0,ne.Ui)(t,"InverseCoeffY/Double"),l=le(r,a),c=le(n,o);return{spatialReference:i,transform:l&&c&&l.length&&c.length?new oe.A({spatialReference:i,polynomialOrder:s,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=s,t.spatialReference||(t.spatialReference=i)}else(0,ne.IC)(e,"MDI").forEach((e=>t.metadata[e.getAttribute("key")]=(0,ne.mX)(e)));else if((0,ne.g7)(e,"PAMRasterBand")){const i=function(e){const t=(0,ne.v7)(e,"NoDataValue"),i=(0,ne.V6)(e,"Histograms/HistItem"),s=(0,ne.v7)(i,"HistMin"),r=(0,ne.v7)(i,"HistMax"),a=(0,ne.v7)(i,"BucketCount"),n=(0,ne.mX)(i,"HistCounts")?.split("|").map((e=>Number(e)));let o,l,c,u;(0,ne.IC)(e,"Metadata/MDI").forEach((e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}}));const f=(0,ne.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:n?.length&&null!=s&&null!=r?{min:s,max:r,size:a||n.length,counts:n}:null,sourceBandIndex:f,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}}));const i=t.rasterBands;if(i.length){const e=!!i[0].statistics;t.statistics=e?i.map((e=>e.statistics)).filter(re.Ru):null;const s=!!i[0].histogram;t.histograms=s?i.map((e=>e.histogram)).filter(re.Ru):null}return t}var he=i(51244);let pe=class extends k.A{fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const t=await this._fetchData(e);let{spatialReference:i,statistics:s,histograms:r,transform:a}=await this._fetchAuxiliaryData(e);const n=!i;n&&(i=new E.A({wkid:3857})),r?.length&&null==s&&(s=(0,K.Pg)(r));const{width:o,height:l}=t;let c=new N.A({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:i});const u=a?a.forwardTransform(c):c;let f=!0;if(a){const e=a.forwardCoefficients;f=e&&0===e[1]&&0===e[2],f&&(a=null,c=u)}const h=new ee({source:{extent:u,nativeExtent:c,transform:a,pixelBlocks:[t],statistics:s,histograms:r,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:n},ioConfig:{sampling:"closest",skipStatistics:!0}});this.ioConfig.skipMapInfo&&(h.ioConfig.skipMapInfo=!0),await h.open(),h.source=null,this._set("rasterInfo",h.rasterInfo),this._inMemoryRaster=h}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,he.g)(t).toUpperCase();if("JPG"!==i&&"PNG"!==i&&"GIF"!==i&&"BMP"!==i)throw new n.A("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",i);const s=i.toLowerCase(),r="gif"===s||"bmp"===s||!(0,p.A)("ios"),a=await this.decodePixelBlock(t,{format:s,useCanvas:r,hasNoZlibMask:!0});if(null==a)throw new n.A("image-aux-raster:open","the data cannot be decoded");return a}async _fetchAuxiliaryData(e){const t=e?.signal,{skipExtensions:i=[],skipMapInfo:s}=this.ioConfig,r=s||i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),a=this.datasetFormat,n="JPG"===a?"jgw":"PNG"===a?"pgw":"BMP"===a?"bpw":null,o=n&&i.includes(n)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+n,{responseType:"text",signal:t}),l=await(0,c.Lx)([r,o]);if(t?.aborted)throw(0,c.NK)();const u=fe(l[0].value?.data);if(!u.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map((e=>Number(e))):null;u.transform=6===e?.length?new oe.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return u}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],pe.prototype,"datasetFormat",void 0),pe=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.ImageAuxRaster")],pe);const de=pe;var me=i(97768),ye=i(84952),ge=i(86738),we=i(20223),xe=i(87045),ve=i(25943),be=i(73037),Ie=i(82371);let _e=class extends k.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,s={}){const{storageInfo:r,extent:a}=this.rasterInfo,{transposeInfo:n}=r,o=null!=n&&!!s.transposedVariableName;if(this._slices&&!o&&null==s.sliceId)return null;const l=o?0:r.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${l}/${t}/${i}`,u=this._slices?o?{variable:s.transposedVariableName}:{sliceId:s.sliceId||0}:null;let f,h;if(r.isBsqTile){const e=(s.bandIds?.length?s.bandIds:[0,1,2]).map((e=>this.request(c,{query:{...u,bandId:e},responseType:"array-buffer",signal:s.signal}))),t=await Promise.all(e),i=t.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),r=new Uint8Array(i);h=[];let a=0;for(const{data:e}of t)h.push(a),r.set(new Uint8Array(e),a),a+=e.byteLength;f=r.buffer}else f=(await this.request(c,{query:u,responseType:"array-buffer",signal:s.signal})).data;if(!f)return null;const p=o?n.tileSize:r.tileInfo.size,d=await this.decodePixelBlock(f,{width:p[0],height:p[1],planes:h?.length,offsets:h,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o,noDataValue:this.rasterInfo.noDataValue});if(null==d)return null;const m=r.blockBoundary[e];if("jpg"!==r.compression||i>m.minCol&&i<m.maxCol&&t>m.minRow&&t<m.maxRow)return d;const{origin:y,blockWidth:g,blockHeight:w}=r,{x,y:v}=this.getPyramidPixelSize(e),b=Math.round((a.xmin-y.x)/x)%g,I=Math.round((a.xmax-y.x)/x)%g||g,_=Math.round((y.y-a.ymax)/v)%w,S=Math.round((y.y-a.ymin)/v)%w||w,A=i===m.minCol?b:0,T=t===m.minRow?_:0,R=i===m.maxCol?I:g,C=t===m.maxRow?S:w;return(0,Y.z$)(d,{x:A,y:T},{width:R-A,height:C-T}),d}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some((e=>{const i=t.find((t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName));return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])})))return e}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.statistics)),s=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.histograms)),r=await Promise.all([i,s]);return r[0]&&r[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),r[1]?.[0]?.counts?.length||(r[1]=null),{statistics:r[0]||null,histograms:r[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let s=0;const{maximumPyramidLevel:r}=this.rasterInfo.storageInfo;let a=r-s+this._levelOffset;const n=i.srcLocation;for(;a>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(a,i.row,i.col,t))break}catch{}if(a--,s++,i=this.identifyPixelLocation(n,s,t.datumTransformation),null===i)return null}return-1===a||null==i?null:s}async _open(e){const t=e?.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const s=i.data;if(this.sourceJSON=s,!s)throw new n.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!s.tileInfo)throw new n.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=s.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(s.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===s.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=s.name?.slice(s.name.indexOf("/")+1)??"";const r=await this._fetchRasterInfo({signal:t});if(null==r)throw new n.A("image-server-raster:open","cannot initialize image service");(0,Ie.E9)(r,s);const a="Map"===this.tileType?function(e,t){if(!e)return null;const{minScale:i,maxScale:s,minLOD:r,maxLOD:a}=t;if(null!=r&&null!=a)return xe.A.fromJSON({...e,lods:e.lods.filter((({level:e})=>null!=e&&e>=r&&e<=a))});if(0!==i&&0!==s){const t=e=>Math.round(1e4*e)/1e4,r=i?t(i):1/0,a=s?t(s):-1/0;return xe.A.fromJSON({...e,lods:e.lods.filter((e=>{const i=t(e.scale);return i<=r&&i>=a}))})}return xe.A.fromJSON(e)}(s.tileInfo,s):xe.A.fromJSON(s.tileInfo);(0,me.Lw)(a);const[o,l]=this._computeMinMaxLOD(r,a),{extent:c,pixelSize:u}=r,f=.5/r.width*u.x,h=Math.max(u.x,u.y),{lods:p}=a;("Map"!==this.tileType&&0!==s.maxScale||Math.abs(u.x-u.y)>f||!p.some((e=>Math.abs(e.resolution-h)<f)))&&(u.x=u.y=o.resolution,r.width=Math.ceil((c.xmax-c.xmin)/u.x-.1),r.height=Math.ceil((c.ymax-c.ymin)/u.y-.1));const d=o.level-l.level,[m,y]=a.size,g=[],w=[];p.forEach(((e,t)=>{e.level>=l.level&&e.level<=o.level&&g.push({x:e.resolution,y:e.resolution}),t<p.length-1&&w.push(Math.round(10*e.resolution/p[t+1].resolution)/10)})),g.sort(((e,t)=>e.x-t.x));const x=this.computeBlockBoundary(c,m,y,a.origin,g,d),v=g.length>1?g.slice(1):null;let b;s.transposeInfo&&(b={tileSize:[s.transposeInfo.rows,s.transposeInfo.cols],packetSize:r.keyProperties?._yxs.PacketSize??0});const I=w.length<=1||w.length>=3&&w.slice(0,-1).every((e=>e===w[0]))?w[0]??2:Math.round(10/(l.resolution/o.resolution)**(-1/d))/10;if(r.storageInfo=new we.A({blockWidth:a.size[0],blockHeight:a.size[1],pyramidBlockWidth:a.size[0],pyramidBlockHeight:a.size[1],pyramidResolutions:v,pyramidScalingFactor:I,compression:a.format,origin:a.origin,firstPyramidLevel:1,maximumPyramidLevel:d,tileInfo:a,isBsqTile:!!s.bsq,transposeInfo:b,blockBoundary:x}),function(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new be.A,e.extent=e.transform.forwardTransform(t))}(r),this._set("rasterInfo",r),s.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:r.storageInfo.tileInfo,parsedUrl:(0,ye.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new ve.d({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),s=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),r=E.A.fromJSON(t.spatialReference||e.spatialReference),a=new ge.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:r});return new W.A({width:i,height:s,bandCount:3,extent:N.A.fromJSON(e),spatialReference:r,pixelSize:a,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,s=(0,Ie.Tw)(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),r=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then((e=>e.data?.slices)).catch((()=>null)):null,a=await Promise.all([s,r]);return this._slices=a[1],a[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,s=.5/e.width*i.x,{lods:r}=t,a=t.lodAt(Math.max.apply(null,r.map((e=>e.level)))),n=t.lodAt(Math.min.apply(null,r.map((e=>e.level)))),{tileType:o}=this;if("Map"===o)return this._levelOffset=r[0].level,[a,n];if("Raster"===o)return[r.find((e=>e.resolution===i.x))??a,n];const{minScale:l,maxScale:c}=this.sourceJSON;let u=a;c>0&&(u=r.find((e=>Math.abs(e.scale-c)<s)),u||(u=r.filter((e=>e.scale>c)).sort(((e,t)=>e.scale>t.scale?1:-1))[0]??a));let f=n;return l>0&&(f=r.find((e=>Math.abs(e.scale-l)<s))??n,this._levelOffset=f.level-n.level),[u,f]}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],_e.prototype,"datasetFormat",void 0),(0,s._)([(0,f.MZ)()],_e.prototype,"tileType",void 0),_e=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.ImageServerRaster")],_e);const Se=_e;var Ae=i(47124);const Te=new Map;Te.set("Int8","s8"),Te.set("UInt8","u8"),Te.set("Int16","s16"),Te.set("UInt16","u16"),Te.set("Int32","s32"),Te.set("UInt32","u32"),Te.set("Float32","f32"),Te.set("Float64","f32"),Te.set("Double64","f32");const Re=new Map;Re.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Re.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Re.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Re.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let Ce=class extends k.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async fetchRawTile(e,t,i,s={}){const{blockWidth:r,blockHeight:a,blockBoundary:n}=this.rasterInfo.storageInfo,o=n[e];if(!o||o.maxRow<t||o.maxCol<i||o.minRow>t||o.minCol>i)return null;const{bandCount:l,pixelType:c}=this.rasterInfo,{ranges:u,actualTileWidth:f,actualTileHeight:h}=this._getTileLocation(e,t,i);if(!u||0===u.length)return null;if(0===u[0].from&&0===u[0].to){const e=new Uint8Array(r*a);return new B.A({width:r,height:a,pixels:void 0,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,d=this._getBandSegmentCount(),m=[];let y=0;for(y=0;y<d;y++)p&&!p.includes(y)||m.push(this.request(this._files.data,{range:{from:u[y].from,to:u[y].to},responseType:"array-buffer",signal:s.signal}));const g=await Promise.all(m),w=g.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),x=new Uint8Array(w),v=[];let b=0;for(y=0;y<d;y++)v.push(b),x.set(new Uint8Array(g[y].data),b),b+=g[y].data.byteLength;const I=Re.get(this.rasterInfo.storageInfo.compression).decoderFormat,_=await this.decodePixelBlock(x.buffer,{width:r,height:a,format:I,planes:p?.length||l,offsets:v,pixelType:c});if(null==_)return null;let{noDataValue:S}=this.rasterInfo;if(null!=S&&"lerc"!==I&&!_.mask&&(S=S[0],null!=S)){const e=_.width*_.height,t=new Uint8Array(e);if(Math.abs(S)>1e24)for(y=0;y<e;y++)Math.abs((_.pixels[0][y]-S)/S)>1e-6&&(t[y]=1);else for(y=0;y<e;y++)_.pixels[0][y]!==S&&(t[y]=1);_.mask=t}let A=0,T=0;if(f!==r||h!==a){let e=_.mask;if(e)for(y=0;y<a;y++)if(T=y*r,y<h)for(A=f;A<r;A++)e[T+A]=0;else for(A=0;A<r;A++)e[T+A]=0;else for(e=new Uint8Array(r*a),_.mask=e,y=0;y<h;y++)for(T=y*r,A=0;A<f;A++)e[T+A]=1}return _}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:s,files:r}=this._parseHeader(i.data),{skipMapInfo:a,skipExtensions:n=[]}=this.ioConfig;if(!n.includes("aux.xml")&&!a){const t=await this._fetchAuxiliaryData(e);null!=t&&(s.statistics=t.statistics??s.statistics,s.histograms=t.histograms,t.histograms&&null==s.statistics&&(s.statistics=(0,K.Pg)(t.histograms)))}a&&this.updateImageSpaceRasterInfo(s),this._set("rasterInfo",s),this._files=r;const o=await this.request(r.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t,i,s,r,a,n;if(Ae.Z){for(i=new Uint8Array(e),r=new ArrayBuffer(e.byteLength),s=new Uint8Array(r),a=0;a<e.byteLength/4;a++)for(n=0;n<4;n++)s[4*a+n]=i[4*a+3-n];t=new Uint32Array(r)}else t=new Uint32Array(e);return t}(o.data);const{blockWidth:l,blockHeight:c}=this.rasterInfo.storageInfo,u=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:f,height:h}=this.rasterInfo,p=[],d=this._getBandSegmentCount();let m=0,y=-1;for(;m<this._storageIndex.length;){y++;const e=Math.ceil(f/l/u**y)-1,t=Math.ceil(h/c/u**y)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,y>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=y),this.updateTileInfo()}_getBandSegmentCount(){return Re.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,i){const{blockWidth:s,blockHeight:r,pyramidScalingFactor:a}=this.rasterInfo.storageInfo,{width:n,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,f,h=0,p=0;for(f=0;f<e;f++)p=a**f,c=Math.ceil(n/s/p),u=Math.ceil(o/r/p),h+=c*u;p=a**e,c=Math.ceil(n/s/p),u=Math.ceil(o/r/p),h+=t*c+i,h*=4*l;const d=this._storageIndex.subarray(h,h+4*l);let m=0,y=0;const g=[];for(let e=0;e<l;e++)m=d[4*e]*2**32+d[4*e+1],y=m+d[4*e+2]*2**32+d[4*e+3],g.push({from:m,to:y});return{ranges:g,actualTileWidth:i<c-1?s:Math.ceil(n/p)-s*(c-1),actualTileHeight:t<u-1?r:Math.ceil(o/p)-r*(u-1)}}_parseHeader(e){const t=(0,ne.V6)(e,"MRF_META/Raster");if(!t)throw new n.A("mrf:open","not a valid MRF format");const i=(0,ne.V6)(t,"Size"),s=parseInt(i.getAttribute("x"),10),r=parseInt(i.getAttribute("y"),10),a=parseInt(i.getAttribute("c"),10),o=((0,ne.mX)(t,"Compression")||"none").toLowerCase();if(!Re.has(o))throw new n.A("mrf:open","currently does not support compression "+o);const l=(0,ne.mX)(t,"DataType")||"UInt8",c=Te.get(l);if(null==c)throw new n.A("mrf:open","currently does not support pixel type "+l);const u=(0,ne.V6)(t,"PageSize"),f=parseInt(u.getAttribute("x"),10),h=parseInt(u.getAttribute("y"),10),p=(0,ne.V6)(t,"DataValues");let d,m;if(p&&(m=p.getAttribute("NoData"),null!=m&&(d=m.trim().split(" ").map((e=>parseFloat(e))))),(0,ne.V6)(e,"MRF_META/CachedSource"))throw new n.A("mrf:open","currently does not support MRF referencing other data files");const y=(0,ne.V6)(e,"MRF_META/GeoTags"),g=(0,ne.V6)(y,"BoundingBox");let w,x=!1;if(null!=g){const e=parseFloat(g.getAttribute("minx")),t=parseFloat(g.getAttribute("miny")),i=parseFloat(g.getAttribute("maxx")),s=parseFloat(g.getAttribute("maxy")),r=(0,ne.mX)(y,"Projection")||"";let a=E.A.WGS84;if("LOCAL_CS[]"!==r)if(r.toLowerCase().startsWith("epsg:")){const e=Number(r.slice(5));isNaN(e)||0===e||(a=new E.A({wkid:e}))}else a=ce(r)??E.A.WGS84;else x=!0,a=new E.A({wkid:3857});w=new N.A(e,t,i,s),w.spatialReference=a}else x=!0,w=new N.A({xmin:-.5,ymin:.5-r,xmax:s-.5,ymax:.5,spatialReference:new E.A({wkid:3857})});const v=(0,ne.V6)(e,"MRF_META/Rsets"),b=parseInt(v?.getAttribute("scale")||"2",10),I=w.spatialReference,_=new we.A({origin:new ge.A({x:w.xmin,y:w.ymax,spatialReference:I}),blockWidth:f,blockHeight:h,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:o,pyramidScalingFactor:b}),S=new ge.A({x:w.width/s,y:w.height/r,spatialReference:I}),A=new W.A({width:s,height:r,extent:w,isPseudoSpatialReference:x,spatialReference:I,bandCount:a,pixelType:c,pixelSize:S,noDataValue:d,storageInfo:_}),T=(0,ne.mX)(e,"datafile"),R=(0,ne.mX)(e,"IndexFile");return{rasterInfo:A,files:{mrf:this.url,index:R||this.url.replace(".mrf",".idx"),data:T||this.url.replace(".mrf",Re.get(o).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return fe(t)}catch{return null}}};(0,s._)([(0,f.MZ)()],Ce.prototype,"_files",void 0),(0,s._)([(0,f.MZ)()],Ce.prototype,"_storageIndex",void 0),(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],Ce.prototype,"datasetFormat",void 0),Ce=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.MRFRaster")],Ce);const Me=Ce;var Oe=i(15265);function Fe(e){const t=e.fields,i=e.records,s=t.some((e=>"oid"===e.name.toLowerCase()))?"OBJECTID":"OID",r=[{name:s,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map((e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name})))),a=r.map((e=>e.name)),n=[];let o=0,l=0;return i.forEach((e=>{const t={};for(t[s]=o++,l=1;l<a.length;l++)t[a[l]]=e[l-1];n.push({attributes:t})})),{displayFieldName:"",fields:r,features:n}}class Pe{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};const s=t.getUint32(4,!0),r=t.getUint16(8,!0),a=t.getUint16(10,!0),n={version:i,recordCount:s,headerByteCount:r,recordByteCount:a};let o=32;const l=[],c=[];let u;if(3===i){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,Oe.w)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<s&&e.byteLength-o>a;){const i=[];32===t.getUint8(o)?(o+=1,l.forEach((t=>{if("C"===t.type)i.push((0,Oe.w)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const s=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();i.push(new Date(parseInt(s.slice(0,4),10),parseInt(s.slice(4,6),10)-1,parseInt(s.slice(6,8),10)))}o+=t.length})),c.push(i)):o+=a}}return{header:n,fields:l,records:c,recordSet:Fe({fields:l,records:c})}}}var ke=i(45664),De=i(12196);const Ne=(e,t)=>e.get(t)?.values,Ee=(e,t)=>e.get(t)?.values?.[0];let Le=class extends k.A{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this._chunkSize=10485760,this.datasetFormat="TIFF"}async fetchRawTile(e,t,i,s={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;const r=await this._fetchRawTiffTile(e,t,i,!1,s);if(null!=r&&this._headerInfo.hasMaskBand){const a=await this._fetchRawTiffTile(e,t,i,!0,s);null!=a&&a.pixels[0]instanceof Uint8Array&&(r.mask=a.pixels[0])}return r}async _open(e){const t=e?e.signal:null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new n.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:s,firstIFDPos:r,isBigTiff:a}=(0,ke.uT)(i),l=[],c={fileChunk:i,posIFD:r,fileOffset:0};await this._readIFDs(l,c,s,a?8:4,t);const{imageInfo:u,rasterInfo:f}=function(e){const t=(0,ke.uc)(e),{width:i,height:s,tileWidth:r,tileHeight:a,planes:n,pixelType:o,compression:l,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidBlockWidth:f,pyramidBlockHeight:h,pyramidResolutions:p,tileBoundary:d,affine:m,metadata:y}=t;let g=ce(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),w=!!t.isPseudoGeographic;null==g&&(w=!0,g=new E.A({wkid:3857}));const x=new N.A({...t.extent,spatialReference:g}),v=new ge.A(x?{x:x.xmin,y:x.ymax,spatialReference:g}:{x:0,y:0}),b=new we.A({blockWidth:r,blockHeight:a,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:l,origin:v,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidResolutions:p,blockBoundary:d}),I=new ge.A({x:(x.xmax-x.xmin)/i,y:(x.ymax-x.ymin)/s,spatialReference:g}),_=y?{BandProperties:y.bandProperties,DataType:y.dataType}:{};let S=null;const A=Ee(e[0],"PHOTOMETRICINTERPRETATION"),T=Ne(e[0],"COLORMAP");if(A<=3&&T?.length>3&&T.length%3==0){S=[];const e=T.length/3;for(let t=0;t<e;t++)S.push([t,T[t]>>>8,T[t+e]>>>8,T[t+2*e]>>>8])}const R=new W.A({width:i,height:s,bandCount:n,pixelType:o,pixelSize:I,storageInfo:b,spatialReference:g,isPseudoSpatialReference:w,keyProperties:_,extent:x,colormap:S,statistics:y?y.statistics:null});if(m?.length&&(R.nativeExtent=new N.A({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:g}),R.transform=new oe.A({polynomialOrder:1,forwardCoefficients:[m[2]+m[0]/2,m[5]-m[3]/2,m[0],m[3],-m[1],-m[4]]}),R.extent=R.transform.forwardTransform(R.nativeExtent),R.pixelSize=new ge.A({x:(x.xmax-x.xmin)/i,y:(x.ymax-x.ymin)/s,spatialReference:g}),b.origin.x=-.5,b.origin.y=.5),p){const{x:e,y:t}=R.pixelSize;p.forEach((i=>{i.x*=e,i.y*=t}))}return{imageInfo:t,rasterInfo:R}}(l),h=(0,ke.zS)(l),p=(0,ke.r9)(l);if(this._headerInfo={littleEndian:s,isBigTiff:a,ifds:l,pyramidIFDs:h,maskIFDs:p,...u},this._set("rasterInfo",f),!u.isSupported)throw new n.A("tiffraster:open","this tiff is not supported: "+u.message);if(!u.tileWidth)throw new n.A("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");f.isPseudoSpatialReference&&o.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const d=l[0].get("PREDICTOR")?.values?.[0],m=l[0].get("SAMPLEFORMAT")?.values?.[0];if(3===m&&2===d)throw new n.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");const{skipMapInfo:y,skipExtensions:g=[]}=this.ioConfig;if(!g.includes("aux.xml")&&!y){const t=await this._fetchAuxiliaryMetaData(e);null!=t&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,K.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;const i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new ge.A({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,f)}g.includes("vat.dbf")||1!==f.bandCount||"u8"!==f.pixelType||y||(f.attributeTable=await this._fetchAuxiliaryTable(e),null!=f.attributeTable&&(f.keyProperties.DataType="thematic")),y&&this.updateImageSpaceRasterInfo(f),this.updateTileInfo()}async _validateOrFetchHeaderBuffer(e,t){let{fileChunk:i,fileOffset:s,posIFD:r}=e;return(r+8>=i.byteLength||r<0)&&(s=r+s,i=(await this.request(this.url,{range:{from:s,to:s+this._bufferSize},responseType:"array-buffer",signal:t})).data,r=0),{fileChunk:i,fileOffset:s,posIFD:r}}async _readIFDs(e,t,i,s=4,r){if(!t.posIFD)return null;t=await this._validateOrFetchHeaderBuffer(t,r);const a=await this._readIFD(t,i,De.NB,s,r);if(!a?.ifd)throw new n.A("tiffraster:open","cannot parse tiff header. failed to open url "+this.url);if(e.push(a.ifd),!a.nextIFD)return null;t.posIFD=a.nextIFD-t.fileOffset,await this._readIFDs(e,t,i,s,r)}async _readIFD(e,t,i=De.NB,s=4,r){let{fileChunk:a,posIFD:n,fileOffset:o}=e;if(!e.fileChunk)return null;const l=(0,ke.JM)(a,t,n,o,i,s);if(l.success){const e=[];if(l.ifd?.forEach((t=>{t.values||e.push(t)})),e.length>0&&await this._fillOffsets(e,t,l.nextIFD,r),l.ifd?.has("GEOKEYDIRECTORY")){const e=l.ifd.get("GEOKEYDIRECTORY"),i=e?.values;if(i&&i.length>4){const s=i[0]+"."+i[1]+"."+i[2];n=e.valueOffset+6-o;const l=await this._validateOrFetchHeaderBuffer({fileChunk:a,posIFD:n,fileOffset:o},r),c=await this._readIFD(l,t,De.YC,2,r);e.data=c?.ifd,e.data&&e.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[s]})}}return l}return l.requiredBufferSize?(a=(await this.request(this.url,{range:{from:o,to:o+n+l.requiredBufferSize+8},responseType:"array-buffer",signal:r})).data,a.byteLength<n+l.requiredBufferSize?null:(e.fileChunk=a,e.fileOffset=o,this._readIFD(e,t,i,s,r))):null}async _fillOffsets(e,t,i,s){const r=e.filter((e=>null!=e.offlineOffsetSize));if(0===r.length)return;const a=r.map((e=>e.offlineOffsetSize)),n=Math.min.apply(null,a.map((e=>e[0]))),o=Math.max.apply(null,a.map((e=>e[0]+e[1])));let l=1===a.length||o-n<=this._bufferSize;if(!l&&a.length>1&&(a.sort(((e,t)=>e[0]-t[0])),l=a.reduce(((e,t)=>e===t[0]?t[0]+t[1]:0),a[0][0])===o),l){const e=await this._fetchOffsets(n,Math.max(o,n+this._bufferSize),s);return void r.forEach((i=>(0,ke.Cr)(e,t,i,n)))}const c=r.map((async e=>{const i=e.offlineOffsetSize,r=await this._fetchOffsets(i[0],i[1]+i[0],s);(0,ke.Cr)(r,t,e,i[0])}));await Promise.all(c)}async _fetchOffsets(e,t,i){const s=[],r=this._chunkSize,a=Math.ceil((t-e)/r);let n=e;for(let e=0;e<a;e++)s.push(this.request(this.url,{range:{from:n,to:e===a-1?t:n+r-1},responseType:"array-buffer",signal:i})),n+=r;const o=await Promise.all(s);if(1===a)return o[0].data;const l=new Uint8Array(t-e+1);for(let e=0;e<a;e++)l.set(new Uint8Array(o[e].data),e*r);return l.buffer}async _fetchRawTiffTile(e,t,i,s,r={}){const a=this._getTileLocation(e,t,i,s);if(!a)return null;const{ranges:n,actualTileWidth:o,actualTileHeight:l,ifd:c}=a,u=n.map((e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:r.signal}))),f=await Promise.all(u),h=f.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),p=1===f.length?f[0].data:new ArrayBuffer(h),d=[0],m=[0];if(f.length>1){const e=new Uint8Array(p);for(let t=0,i=0;t<f.length;t++){const s=f[t].data;e.set(new Uint8Array(s),i),d[t]=i,i+=s.byteLength,m[t]=s.byteLength}}const{blockWidth:y,blockHeight:g}=this.getBlockWidthHeight(e),w=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:d,sizes:m},width:y,height:g,planes:null,pixelType:null});if(null==w)return null;let x,v,b;if(o!==y||l!==g){let e=w.mask;if(e)for(x=0;x<g;x++)if(b=x*y,x<l)for(v=o;v<y;v++)e[b+v]=0;else for(v=0;v<y;v++)e[b+v]=0;else for(e=new Uint8Array(y*g),w.mask=e,x=0;x<l;x++)for(b=x*y,v=0;v<o;v++)e[b+v]=1}return w}_getTileLocation(e,t,i,s=!1){const{firstPyramidLevel:r,blockBoundary:a}=this.rasterInfo.storageInfo,n=0===e?0:e-(r-1),{_headerInfo:o}=this;if(!o)return null;const l=s?o.maskIFDs[n]:0===n?o?.ifds[0]:o?.pyramidIFDs[n-1];if(!l)return null;const c=(0,ke.XO)(l,o),u=Ne(l,"TILEOFFSETS");if(void 0===u)return null;const f=Ne(l,"TILEBYTECOUNTS"),{minRow:h,minCol:p,maxRow:d,maxCol:m}=a[n];if(t>d||i>m||t<h||i<p)return null;const y=Ee(l,"IMAGEWIDTH"),g=Ee(l,"IMAGELENGTH"),w=Ee(l,"TILEWIDTH"),x=Ee(l,"TILELENGTH"),v=[];if(c){const{bandCount:e}=this.rasterInfo;for(let s=0;s<e;s++){const e=s*(d+1)*(m+1)+t*(m+1)+i;v[s]={from:u[e],to:u[e]+f[e]-1}}}else{const e=t*(m+1)+i;v.push({from:u[e],to:u[e]+f[e]-1})}for(let e=0;e<v.length;e++)if(null==v[e].from||!v[e].to||v[e].to<0)return null;return{ranges:v,ifd:l,actualTileWidth:i===m&&y%w||w,actualTileHeight:t===d&&g%x||x}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return fe(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=Pe.parse(t);return i?.recordSet?te.A.fromJSON(i.recordSet):null}catch{return null}}};(0,s._)([(0,f.MZ)()],Le.prototype,"_files",void 0),(0,s._)([(0,f.MZ)()],Le.prototype,"_headerInfo",void 0),(0,s._)([(0,f.MZ)()],Le.prototype,"_bufferSize",void 0),(0,s._)([(0,f.MZ)()],Le.prototype,"_chunkSize",void 0),(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],Le.prototype,"datasetFormat",void 0),Le=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.TIFFRaster")],Le);const Be=Le,ze=new Map;ze.set("MRF",{desc:"Meta Raster Format",constructor:Me}),ze.set("TIFF",{desc:"GeoTIFF",constructor:Be}),ze.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Se}),ze.set("JPG",{desc:"JPG Raster Format",constructor:de}),ze.set("PNG",{desc:"PNG Raster Format",constructor:de}),ze.set("GIF",{desc:"GIF Raster Format",constructor:de}),ze.set("BMP",{desc:"BMP Raster Format",constructor:de}),ze.set("CovJSON",{desc:"COVJSON Raster Format",constructor:se}),ze.set("MEMORY",{desc:"In Memory Raster Format",constructor:ee});class Je{static get supportedFormats(){const e=new Set;return ze.forEach(((t,i)=>e.add(i))),e}static async open(e){const{url:t,ioConfig:i,source:s,sourceJSON:r}=e;let a=e.datasetFormat??i?.datasetFormat;null==a&&(t.includes(".")?a=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===s?.type?.toLowerCase()?a="CovJSON":s?.extent&&s.pixelblocks&&(a="MEMORY")),"OVR"===a||"TIF"===a?a="TIFF":"JPG"===a||"JPEG"===a||"JFIF"===a?a="JPG":"COVJSON"===a&&(a="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(a="RasterTileServer");const o={url:t,source:s,sourceJSON:r,datasetFormat:a,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(o).forEach((e=>{null==o[e]&&delete o[e]})),a){if(!this.supportedFormats.has(a))throw new n.A("rasterfactory:open","not a supported format "+a);if("CRF"===a)throw new n.A("rasterfactory:open",`cannot open raster: ${t}`);const i=new(0,ze.get(a).constructor)(o);return await i.open({signal:e.signal}),i}const l=Array.from(ze.keys()).filter((e=>"CovJSON"!==e&&"Memory"!==e));let c=0;const u=()=>{if(a=l[c++],!a)return null;if("CRF"===a)return null;const t=new(0,ze.get(a).constructor)(o);return t.open({signal:e.signal}).then((()=>t)).catch((()=>u()))};return u()}static register(e,t,i){ze.has(e.toUpperCase())||ze.set(e.toUpperCase(),{desc:t,constructor:i})}}var Ue=i(6049),Ve=i(30291),$e=i(92935);let je=class extends((0,g.dM)((0,A.j)((0,v.q)((0,b.A)((0,_.H)((0,w.d)((0,x.o)((0,I.G)((0,T.e)((0,y.b)((0,S.J)((0,l.P)(a.A.ClonableMixin(m.A)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,c.sg)((async(e,t,s)=>{const{save:r,saveAs:a}=await i.e(9838).then(i.bind(i,59838));switch(e){case $e.X.SAVE:return r(this,t);case $e.X.SAVE_AS:return a(this,s,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(c.QP).then((()=>this._openRaster(t)))),Promise.resolve(this)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,M.rZ)("Pixel Value"),(0,M.dy)("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,i=t?.attributeTable;if(i){const t=(0,M.jC)(i);e.push(...t)}const s=t?.dataType,r=t?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=r){const t=r.variables[0].unit?.trim(),i=(0,M.DV)(t),s=(0,M.y6)();e.push(i,s)}if(r){const t=(0,M.AL)(r);e.push(...t)}return e}createPopupTemplate(e){const{rasterFields:t}=this,i=e?.visibleFieldNames??new Set(t.map((({name:e})=>e)).filter((e=>e!==M.F_.rawServicePixelValue))),s=(0,Ve.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:r}=this.raster;return s?.fieldInfos&&r&&(0,M.h4)(s.fieldInfos,r),s}async generateRasterInfo(e,t){if(e=(0,h.PZ)(O.A,e),await this.load(),!e||"none"===e.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:i}=await this._openFunctionRaster(e,t);return i}catch(e){if(e instanceof n.A)throw e;throw new n.A("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations($e.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations($e.X.SAVE_AS,t,e)}write(e,t){const i=this._primaryRasters[0]??this.raster;if(this.loaded?"RasterTileServer"===i.datasetFormat&&("Raster"===i.tileType||"Map"===i.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new n.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=(0,F.q)(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:i,source:s}=this;if(!t&&!s)throw new n.A("imagery-tile-layer:open","missing url or source parameter");s?await this._openFromSource(s,e):i?await this._openFromUrlWithRasterFunction(t,i,e):await this._openFromUrl(t,e)}const i=this.raster.rasterInfo;if(!i)throw new n.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,u.wB)((()=>this.customParameters),(e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)})))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=(0,F.p)(e),this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,i){const s=[e];t&&(0,Ue.UD)(t.toJSON(),s);const r=await Promise.all(s.map((e=>Je.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:i})))),a=r.findIndex((e=>null==e));if(a>-1)throw new n.A("imagery-tile-layer:open",`cannot open raster: ${s[a]}`);return this._primaryRasters=r,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){const i=await Je.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==i)throw new n.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){const i="the tiled imagery data source is not supported",s="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!s)throw new n.A("imagery-tile-layer:open",i);"MEMORY"===s&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const r=await Je.open({url:"",source:e,datasetFormat:s,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==r)throw new n.A("imagery-tile-layer:open",i);this._primaryRasters=[r],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=r}async _openFunctionRaster(e,t){const i={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((e=>i[e.url]=e));const s=(0,Ue.vt)(e.functionDefinition?.toJSON()??e.toJSON(),i),r=new P.A({rasterFunction:s});return await r.open(t),r}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof n.A&&o.A.getLogger(this).error("imagery-tile-layer:open",e.message),o.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}};(0,s._)([(0,f.MZ)({clonable:!1})],je.prototype,"_primaryRasters",void 0),(0,s._)([(0,f.MZ)(R.fV)],je.prototype,"legendEnabled",void 0),(0,s._)([(0,f.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],je.prototype,"isReference",void 0),(0,s._)([(0,f.MZ)({type:["show","hide"]})],je.prototype,"listMode",void 0),(0,s._)([(0,f.MZ)({json:{read:!0,write:!0}})],je.prototype,"blendMode",void 0),(0,s._)([(0,f.MZ)({type:O.A,json:{name:"renderingRule",write:!0}})],je.prototype,"rasterFunction",void 0),(0,s._)([(0,f.MZ)()],je.prototype,"sourceJSON",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],je.prototype,"version",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],je.prototype,"type",void 0),(0,s._)([(0,f.MZ)({type:["ArcGISTiledImageServiceLayer"]})],je.prototype,"operationalLayerType",void 0),(0,s._)([(0,f.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],je.prototype,"popupEnabled",void 0),(0,s._)([(0,f.MZ)({type:r.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],je.prototype,"popupTemplate",void 0),(0,s._)([(0,f.MZ)({readOnly:!0})],je.prototype,"defaultPopupTemplate",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:[C.A]})],je.prototype,"fields",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,type:[C.A]})],je.prototype,"rasterFields",null),(0,s._)([(0,f.MZ)({constructOnly:!0})],je.prototype,"source",void 0),je=(0,s._)([(0,d.$)("esri.layers.ImageryTileLayer")],je);const qe=je},56551:(e,t,i)=>{i.d(t,{H:()=>p});var s=i(90237),r=i(10107),a=(i(44208),i(53966),i(87811),i(40608)),n=i(69540),o=i(25482),l=i(56507),c=i(93223),u=i(94359);let f=class extends(n.A.ClonableMixin(o.A)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,s._)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"name",void 0),(0,s._)([(0,r.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,c.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],f.prototype,"method",void 0),(0,s._)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"value",void 0),(0,s._)([(0,r.MZ)({type:[l.jz],json:{write:{isRequired:!0}}})],f.prototype,"bandIds",void 0),(0,s._)([(0,r.MZ)({types:u.uy,json:{write:!0,origins:{"web-scene":{types:u.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],f.prototype,"renderer",void 0),f=(0,s._)([(0,a.$)("esri.renderers.support.RasterPresetRenderer")],f);const h=f,p=e=>{let t=class extends e{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,s._)([(0,r.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],t.prototype,"activePresetRendererName",void 0),(0,s._)([(0,r.MZ)({type:[h],json:{name:"layerDefinition.presetRenderers",write:!0}})],t.prototype,"presetRenderers",void 0),t=(0,s._)([(0,a.$)("esri.layers.mixins.RasterPresetRendererMixin")],t),t}},71903:(e,t,i)=>{var s;i.d(t,{u:()=>s}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(s||(s={}))},73037:(e,t,i)=>{i.d(t,{A:()=>u});var s,r=i(90237),a=i(10107),n=(i(44208),i(53966),i(87811),i(93223)),o=i(40608),l=i(82434);let c=s=class extends l.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new s({tolerance:this.tolerance})}};(0,r._)([(0,n.e)({GCSShiftXform:"gcs-shift"})],c.prototype,"type",void 0),(0,r._)([(0,a.MZ)()],c.prototype,"tolerance",void 0),c=s=(0,r._)([(0,o.$)("esri.layers.support.rasterTransforms.GCSShiftTransform")],c);const u=c},82371:(e,t,i)=>{i.d(t,{E9:()=>d,Tw:()=>h,X6:()=>p});var s=i(78888),r=i(5443),a=i(86738),n=i(16930),o=i(87186),l=i(20223),c=i(2272),u=i(22671);async function f(e,t,i){const f=(0,c.Dl)(e),{rasterFunction:h,sourceJSON:p}=t||{},d=h?JSON.stringify(h.rasterFunctionDefinition||h):null,m=(0,c.lF)({...f.query,renderingRule:d,f:"json"}),y=(0,c.jV)(m,i);e=f.path;const g=p||await(0,s.A)(e,y).then((e=>e.data)),w=g.hasRasterAttributeTable?(0,s.A)(`${e}/rasterAttributeTable`,y):null,x=g.hasColormap?(0,s.A)(`${e}/colormap`,y):null,v=g.hasHistograms?(0,s.A)(`${e}/histograms`,y):null,b=g.currentVersion>=10.3?(0,s.A)(`${e}/keyProperties`,y):null,I=g.hasMultidimensions?(0,s.A)(`${e}/multidimensionalInfo`,y):null,_=await Promise.allSettled([w,x,v,b,I]);let S=null;if(g.minValues&&g.minValues.length===g.bandCount){S=[];for(let e=0;e<g.minValues.length;e++)S.push({min:g.minValues[e],max:g.maxValues[e],avg:g.meanValues[e],stddev:g.stdvValues[e]})}const A=r.A.fromJSON(g.extent),T=Math.ceil(A.width/g.pixelSizeX-.1),R=Math.ceil(A.height/g.pixelSizeY-.1),C=n.A.fromJSON(g.spatialReference||g.extent.spatialReference),M="fulfilled"===_[0].status?_[0].value?.data:null,O=M?.features?.length?u.A.fromJSON(M):null,F="fulfilled"===_[1].status?_[1].value?.data.colormap:null,P=F?.length?F:null,k="fulfilled"===_[2].status?_[2].value?.data.histograms:null,D=k?.[0]?.counts?.length?k:null,N="fulfilled"===_[3].status?_[3].value?.data??{}:{},E="fulfilled"===_[4].status?_[4].value?.data.multidimensionalInfo:null,L=E?.variables?.length?E:null;L&&L.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")}))}));const{defaultVariable:B,serviceDataType:z}=g;B&&B!==N.DefaultVariable&&(N.DefaultVariable=B),z?.includes("esriImageServiceDataTypeVector")&&!z.includes(N.DataType)&&(N.DataType=z.replace("esriImageServiceDataType",""));let J=g.noDataValue;g.noDataValues?.length&&g.noDataValues.some((e=>e!==J))&&(J=g.noDataValues);const U=g.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new a.A({x:g.extent.xmin,y:g.extent.ymax,spatialReference:C}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(T,R))/Math.LN2-8)),transposeInfo:g.transposeInfo}):void 0;return new o.A({width:T,height:R,bandCount:g.bandCount,extent:r.A.fromJSON(g.extent),spatialReference:C,pixelSize:new a.A({x:g.pixelSizeX,y:g.pixelSizeY,spatialReference:C}),pixelType:g.pixelType.toLowerCase(),statistics:S,attributeTable:O,colormap:P,histograms:D,keyProperties:N,noDataValue:J,multidimensionalInfo:L,storageInfo:U})}function h(e,t,i){return f(e,{sourceJSON:t},i)}function p(e,t,i){return f(e,{rasterFunction:t},i)}function d(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},82434:(e,t,i)=>{i.d(t,{A:()=>l});var s=i(90237),r=i(25482),a=i(10107),n=(i(44208),i(53966),i(87811),i(40608));let o=class extends r.A{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,s._)([(0,a.MZ)()],o.prototype,"affectsPixelSize",null),(0,s._)([(0,a.MZ)({json:{write:!0}})],o.prototype,"spatialReference",void 0),o=(0,s._)([(0,n.$)("esri.layers.support.rasterTransforms.BaseRasterTransform")],o);const l=o}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3813,8256],{4146:(t,e,i)=>{i.d(e,{A:()=>v});var r=i(90237),n=i(78888),s=i(49186),o=i(65529),l=i(4902),a=i(92474),u=i(53966),p=i(74887),c=i(84952),h=i(10107),d=(i(44208),i(87811),i(40608)),y=i(5443),g=i(16930),m=i(92602),f=i(79677);let b=0,_=class extends(o.A.EventedMixin(l.A.IdentifiableMixin(a.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await i.e(7982).then(i.bind(i,27982))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:r}=await i.e(5613).then(i.bind(i,45613));try{return await r(e)}catch(t){const i=e?.portalItem,r=i?.id||"unset",n=i?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+r+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,p.zf)(t)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get effectiveVisible(){let t=this.visible;const e=this.parent;return t&&e&&"effectiveVisible"in e&&(t&&=e.effectiveVisible),t}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.An)(this.url)}createLayerView(t,e){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,n.A)(t,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,h.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,r._)([(0,h.MZ)({readOnly:!0})],_.prototype,"effectiveVisible",null),(0,r._)([(0,h.MZ)({type:y.A})],_.prototype,"fullExtent",void 0),(0,r._)([(0,h.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,r._)([(0,h.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,r._)([(0,h.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,r._)([(0,h.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,r._)([(0,h.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,r._)([(0,h.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,r._)([(0,h.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,r._)([(0,h.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,r._)([(0,h.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,r._)([(0,h.MZ)({type:g.A})],_.prototype,"spatialReference",void 0),(0,r._)([(0,h.MZ)({type:String})],_.prototype,"title",void 0),(0,r._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,r._)([(0,h.MZ)()],_.prototype,"url",void 0),(0,r._)([(0,h.MZ)({type:f.A})],_.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,h.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,r._)([(0,d.$)("esri.layers.Layer")],_);const v=_},4902:(t,e,i)=>{i.d(e,{A:()=>u});var r=i(90237),n=i(40608);let s=0;const o=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return e=(0,r._)([(0,n.$)("esri.core.Identifiable")],e),e};let l=class extends(o(class{})){};var a;l=(0,r._)([(0,n.$)("esri.core.Identifiable")],l),(a=l||(l={})).IdentifiableMixin=o,a.NumericIdentifiableMixin=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return e=(0,r._)([(0,n.$)("esri.core.Identifiable.NumericIdentifiable")],e),e};const u=l},62885:(t,e,i)=>{i.d(e,{H:()=>s,V:()=>n});var r=i(5503);function n(t,e,i=r.A){return e||(e=new i),e===t||(e.removeAll(),(n=t)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?e.addMany(t):t&&e.add(t)),e;var n}function s(t){return t}},68197:(t,e,i)=>{i.d(e,{A:()=>p});var r,n,s=i(40876),o=i(34727),l=i(56507);function a(t){return(0,o.qE)((0,l.Vr)(t),0,255)}function u(t,e){const i=t.toString(16).padStart(2,"0");return e?i.slice(0,1):i}class p{static blendColors(t,e,i,r=new p){return r.r=Math.round(t.r+(e.r-t.r)*i),r.g=Math.round(t.g+(e.g-t.g)*i),r.b=Math.round(t.b+(e.b-t.b)*i),r.a=t.a+(e.a-t.a)*i,r._sanitize()}static fromRgb(t,e){const i=(0,s.lT)(t);return i?p.fromArray(i,e):null}static fromHex(t,e=new p){const i=(0,s.oW)(t);return i?p.fromArray(i,e):null}static fromArray(t,e=new p){return e._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(e.a)&&(e.a=1),e._sanitize()}static fromString(t,e){const i=(0,s.Eq)(t);return i?p.fromArray(i,e):null}static fromJSON(t){return null!=t?new p([t[0],t[1],t[2],(t[3]??255)/255]):void 0}static toUnitRGB(t){return null!=t?[t.r/255,t.g/255,t.b/255]:null}static toUnitRGBA(t){return null!=t?[t.r/255,t.g/255,t.b/255,null!=t.a?t.a:1]:null}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(t){return"string"==typeof t?p.fromString(t,this):Array.isArray(t)?p.fromArray(t,this):(this._set(t.r??0,t.g??0,t.b??0,t.a??1),t instanceof p||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(t){const e=t?.capitalize??!1,i=t?.digits??6,r=3===i||4===i,n=4===i||8===i,s=`#${u(this.r,r)}${u(this.g,r)}${u(this.b,r)}${n?u(Math.round(255*this.a),r):""}`;return e?s.toUpperCase():s}toCss(t=!1){const e=this.r+", "+this.g+", "+this.b;return t?`rgba(${e}, ${this.a})`:`rgb(${e})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=p.AlphaMode.ALWAYS){const e=a(this.r),i=a(this.g),r=a(this.b);return t===p.AlphaMode.ALWAYS||1!==this.a?[e,i,r,a(255*this.a)]:[e,i,r]}clone(){return new p(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return null!=t&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=(0,s.c1)(this.r),this.g=(0,s.c1)(this.g),this.b=(0,s.c1)(this.b),this.a=(0,s.G1)(this.a),this}_set(t,e,i,r){this.r=t,this.g=e,this.b=i,this.a=r}}p.prototype.declaredClass="esri.Color",(n=(r=p).AlphaMode||(r.AlphaMode={}))[n.ALWAYS=0]="ALWAYS",n[n.UNLESS_OPAQUE=1]="UNLESS_OPAQUE"},69052:(t,e,i)=>{i.d(e,{ie:()=>l});var r=i(34727);class n{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,i=!1){return s(this.range,this.min,this.max,t,e,i)}clamp(t,e=0){return(0,r.qE)(t-e,this.min,this.max)+e}monotonic(t,e,i){return t<e?e:e+o(this.range,t-e,i)}minimalMonotonic(t,e,i){return s(this.range,t,t+this.range,e,i)}center(t,e,i){return e=this.monotonic(t,e,i),this.normalize((t+e)/2,i)}diff(t,e,i){return this.monotonic(t,e,i)-t}shortestSignedDiff(t,e){t=this.normalize(t);const i=(e=this.normalize(e))-t,r=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(i)<Math.abs(r)?i:r}contains(t,e,i){return e=this.minimalMonotonic(t,e),(i=this.minimalMonotonic(t,i))>t&&i<e}}function s(t,e,i,r,n=0,s=!1){return(r-=n)<e?r+=o(t,e-r):r>i&&(r-=o(t,r-i)),s&&r===i&&(r=e),r+n}function o(t,e,i=0){return Math.ceil((e-i)/t)*t+i}new n(0,2*Math.PI),new n(-Math.PI,Math.PI);const l=new n(0,360)},69540:(t,e,i)=>{i.d(e,{A:()=>h});var r=i(90237),n=i(69622),s=(i(44208),i(4718)),o=(i(53966),i(97768)),l=i(35666),a=i(88620),u=i(40608);const p=t=>{let e=class extends t{clone(){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,i=t.store,r={},n=new Map;for(const t in e){const o=e[t],a=i?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||a!==l.Gr.USER&&a!==l.Gr.DEFAULTS&&a!==l.Gr.WEB_MAP&&a!==l.Gr.WEB_SCENE)continue;const p=this[t];let c=null;c="function"==typeof u?u(p):"reference"===u?p:(0,s.TU)(p),null!=p&&null==c||(a===l.Gr.DEFAULTS?n.set(t,c):r[t]=c)}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(n.size){const t=(0,a.oY)(u)?.store;if(t)for(const[e,i]of n)t.set(e,i,l.Gr.DEFAULTS)}return u}};return e=(0,r._)([(0,u.$)("esri.core.Clonable")],e),e};let c=class extends(p(n.A)){};c=(0,r._)([(0,u.$)("esri.core.Clonable")],c),(c||(c={})).ClonableMixin=p;const h=c},71493:(t,e,i)=>{i.r(e),i.d(e,{default:()=>P});var r=i(90237),n=i(79608),s=i(68197),o=i(69540),l=i(25482),a=i(90629),u=i(10107),p=i(56507),c=(i(44208),i(87811),i(40608));let h=class extends(l.A.JSONSupportMixin(o.A)){constructor(t){super(t),this.type="simple",this.color=new s.A("black"),this.lineSize=2,this.fontSize=10,this.textColor=new s.A("black"),this.textBackgroundColor=new s.A([255,255,255,.6])}};(0,r._)([(0,u.MZ)({type:["simple"],readOnly:!0,json:{write:{isRequired:!0}}})],h.prototype,"type",void 0),(0,r._)([(0,u.MZ)({type:s.A,nonNullable:!0,json:{type:[p.jz],write:{isRequired:!0}}})],h.prototype,"color",void 0),(0,r._)([(0,u.MZ)({type:Number,cast:a.cr,nonNullable:!0,range:{min:(0,a.PN)(1)},json:{write:{isRequired:!0}}})],h.prototype,"lineSize",void 0),(0,r._)([(0,u.MZ)({type:Number,cast:a.cr,nonNullable:!0,json:{write:{isRequired:!0}}})],h.prototype,"fontSize",void 0),(0,r._)([(0,u.MZ)({type:s.A,nonNullable:!0,json:{type:[p.jz],write:{isRequired:!0}}})],h.prototype,"textColor",void 0),(0,r._)([(0,u.MZ)({type:s.A,nonNullable:!0,json:{type:[p.jz],write:{isRequired:!0}}})],h.prototype,"textBackgroundColor",void 0),h=(0,r._)([(0,c.$)("esri.analysis.DimensionSimpleStyle")],h);const d=h;var y;!function(t){t.Horizontal="horizontal",t.Vertical="vertical",t.Direct="direct"}(y||(y={}));const g=[y.Horizontal,y.Vertical,y.Direct];var m=i(69052),f=i(79901),b=i(86738);let _=class extends(l.A.JSONSupportMixin(o.A)){constructor(t){super(t),this.type="length",this.startPoint=null,this.endPoint=null,this.measureType=y.Direct,this.offset=0,this.orientation=0}get valid(){return null!=this.startPoint&&null!=this.endPoint}};(0,r._)([(0,u.MZ)({type:["length"],json:{write:{isRequired:!0}}})],_.prototype,"type",void 0),(0,r._)([(0,u.MZ)({type:b.A,json:{write:{isRequired:!0}}})],_.prototype,"startPoint",void 0),(0,r._)([(0,u.MZ)({type:b.A,json:{write:{isRequired:!0}}})],_.prototype,"endPoint",void 0),(0,r._)([(0,u.MZ)({type:g,nonNullable:!0,json:{write:{isRequired:!0}}})],_.prototype,"measureType",void 0),(0,r._)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],_.prototype,"offset",void 0),(0,r._)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,f.w)((t=>m.ie.normalize((0,p.GB)(t),0,!0)))],_.prototype,"orientation",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],_.prototype,"valid",null),_=(0,r._)([(0,c.$)("esri.analysis.LengthDimension")],_);const v=_;var A=i(5503),M=i(62885),w=i(36708),S=(i(53966),i(5443)),O=i(80586);const x=A.A.ofType(v);let E=class extends n.A{constructor(t){super(t),this.type="dimension",this.style=new d,this.extent=null}initialize(){this.addHandles((0,w.wB)((()=>this._computeExtent()),(t=>{null==t?.pending&&this._set("extent",null!=t?t.extent:null)}),w.pc))}get dimensions(){return this._get("dimensions")||new x}set dimensions(t){this._set("dimensions",(0,M.V)(t,this.dimensions,x))}get spatialReference(){for(const t of this.dimensions){if(null!=t.startPoint)return t.startPoint.spatialReference;if(null!=t.endPoint)return t.endPoint.spatialReference}return null}get valid(){return this.dimensions.every((t=>t.valid))}async waitComputeExtent(){const t=this._computeExtent();return null!=t?t.pending:Promise.resolve()}_computeExtent(){const t=this.spatialReference;if(null==t)return{pending:null,extent:null};const e=[];for(const t of this.dimensions)null!=t.startPoint&&e.push(t.startPoint),null!=t.endPoint&&e.push(t.endPoint);const i=(0,O.projectOrLoadMany)(e,t);if(null!=i.pending)return{pending:i.pending,extent:null};let r=null;return null!=i.geometries&&(r=i.geometries.reduce(((t,e)=>null==t?null!=e?S.A.fromPoint(e):null:null!=e?t.union(S.A.fromPoint(e)):t),null)),{pending:null,extent:r}}clear(){this.dimensions.removeAll()}};(0,r._)([(0,u.MZ)({type:["dimension"]})],E.prototype,"type",void 0),(0,r._)([(0,u.MZ)({cast:M.H,type:x,nonNullable:!0})],E.prototype,"dimensions",null),(0,r._)([(0,u.MZ)({readOnly:!0})],E.prototype,"spatialReference",null),(0,r._)([(0,u.MZ)({types:{key:"type",base:null,typeMap:{simple:d}},nonNullable:!0})],E.prototype,"style",void 0),(0,r._)([(0,u.MZ)({value:null,readOnly:!0})],E.prototype,"extent",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],E.prototype,"valid",null),E=(0,r._)([(0,c.$)("esri.analysis.DimensionAnalysis")],E);const Z=E;var N=i(92071),T=i(43937),D=i(4146),R=i(16131);let L=class extends((0,R.q)((0,N.P)(D.A))){constructor(t){if(super(t),this.type="dimension",this.operationalLayerType="ArcGISDimensionLayer",this.source=new Z,this.opacity=1,t){const{source:e,style:i}=t;e&&i&&(e.style=i)}}initialize(){this.addHandles([(0,w.wB)((()=>this.source),((t,e)=>{null!=e&&e.parent===this&&(e.parent=null),null!=t&&(t.parent=this)}),w.pc)])}async load(){return this.addResolvingPromise(this.source.waitComputeExtent()),this}get spatialReference(){return this.source.spatialReference}get style(){return this.source.style}set style(t){this.source.style=t}get fullExtent(){return this.source.extent}releaseAnalysis(t){this.source===t&&(this.source=new Z)}get analysis(){return this.source}set analysis(t){this.source=t}get dimensions(){return this.source.dimensions}set dimensions(t){this.source.dimensions=t}writeDimensions(t,e,i,r){e.dimensions=t.filter((({startPoint:t,endPoint:e})=>null!=t&&null!=e)).toJSON(r)}};(0,r._)([(0,u.MZ)({json:{read:!1},readOnly:!0})],L.prototype,"type",void 0),(0,r._)([(0,u.MZ)({type:["ArcGISDimensionLayer"]})],L.prototype,"operationalLayerType",void 0),(0,r._)([(0,u.MZ)({nonNullable:!0})],L.prototype,"source",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],L.prototype,"spatialReference",null),(0,r._)([(0,u.MZ)({types:{key:"type",base:null,typeMap:{simple:d}},json:{write:{ignoreOrigin:!0}}})],L.prototype,"style",null),(0,r._)([(0,u.MZ)({readOnly:!0})],L.prototype,"fullExtent",null),(0,r._)([(0,u.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],L.prototype,"opacity",void 0),(0,r._)([(0,u.MZ)({type:["show","hide"]})],L.prototype,"listMode",void 0),(0,r._)([(0,u.MZ)({type:A.A.ofType(v),json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{ignoreOrigin:!0}}}}})],L.prototype,"dimensions",null),(0,r._)([(0,T.K)("web-scene","dimensions")],L.prototype,"writeDimensions",null),L=(0,r._)([(0,c.$)("esri.layers.DimensionLayer")],L);const P=L},78553:(t,e,i)=>{i.d(e,{D:()=>s,p:()=>n});var r=i(56507);function n(t){const e=(0,r.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function s(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},79608:(t,e,i)=>{i.d(e,{A:()=>d});var r=i(90237),n=i(69540),s=i(10107),o=(i(44208),i(53966),i(87811),i(40608));let l=class extends n.A{constructor(t){super(t),this.type="web-scene"}equals(t){return this.type===t.type}};(0,r._)([(0,s.MZ)()],l.prototype,"type",void 0),l=(0,r._)([(0,o.$)("esri.analysis.support.AnalysisOriginWebScene")],l);var a=i(69622),u=i(4902),p=i(25482);let c=0,h=class extends(p.A.JSONSupportMixin(n.A.ClonableMixin(u.A.IdentifiableMixin(a.A)))){constructor(t){super(t),this.id=`${Date.now().toString(16)}-analysis-${c++}`,this.origin=null}get parent(){return this._get("parent")}set parent(t){const e=this.parent;if(null!=e)switch(e.type){case"line-of-sight":case"dimension":case"viewshed":e.releaseAnalysis(this);break;case"2d":case"3d":e.analyses.includes(this)&&e.analyses.remove(this)}this._set("parent",t)}};(0,r._)([(0,s.MZ)({type:String,constructOnly:!0,clonable:!1})],h.prototype,"id",void 0),(0,r._)([(0,s.MZ)({clonable:!1,value:null})],h.prototype,"parent",null),(0,r._)([(0,s.MZ)({types:{key:"type",base:null,typeMap:{"web-scene":l}}})],h.prototype,"origin",void 0),h=(0,r._)([(0,o.$)("esri.analysis.Analysis")],h);const d=h},79677:(t,e,i)=>{i.d(e,{A:()=>d});var r,n=i(90237),s=i(25482),o=i(88930),l=i(10107),a=(i(44208),i(53966),i(87811),i(36005)),u=i(40608),p=i(43937),c=i(98623);let h=class extends s.A{static{r=this}static get allTime(){return y}static get empty(){return g}static fromArray(t){return new r({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=t.start?.getTime()??t.start,n=t.end?.getTime()??t.end;return e===r&&i===n}expandTo(t,e=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,t,e));let n=this.end;if(n){const i=(0,o.lL)(n,t,e);n=n.getTime()===i.getTime()?i:(0,o.S1)(i,1,t,e)}return new r({start:i,end:n})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return r.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,n=t.start?.getTime()??-1/0,s=t.end?.getTime()??1/0;let o,l;return n>=e&&n<=i?o=n:e>=n&&e<=s&&(o=e),i>=n&&i<=s?l=i:s>=e&&s<=i&&(l=s),null==o||null==l||isNaN(o)||isNaN(l)?r.empty:new r({start:o===-1/0?null:new Date(o),end:l===1/0?null:new Date(l)})}offset(t,e,i=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new r,{start:s,end:l}=this;return null!=s&&(n.start=(0,o.S1)(s,t,e,i)),null!=l&&(n.end=(0,o.S1)(l,t,e,i)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return y.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,i=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new r({start:e,end:i})}};(0,n._)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,n._)([(0,a.w)("end")],h.prototype,"readEnd",null),(0,n._)([(0,p.K)("end")],h.prototype,"writeEnd",null),(0,n._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,n._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,n._)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,n._)([(0,a.w)("start")],h.prototype,"readStart",null),(0,n._)([(0,p.K)("start")],h.prototype,"writeStart",null),h=r=(0,n._)([(0,u.$)("esri.time.TimeExtent")],h);const d=h,y=new h,g=new h({start:void 0,end:void 0})},92071:(t,e,i)=>{i.d(e,{P:()=>_,L:()=>v});var r=i(90237),n=i(69622),s=i(76953),o=i(4718),l=i(35666);class a{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(l.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(t){const e=new a,i=this._originStores[l.Gr.DEFAULTS];i&&i.forEach(((t,i)=>{e.set(i,(0,o.o8)(t),l.Gr.DEFAULTS)}));for(let i=l.Gr.SERVICE;i<l.AU;i++){const r=this._originStores[i];r&&r.forEach(((r,n)=>{t&&t.has(n)||e.set(n,(0,o.o8)(r),i)}))}return e}get(t,e){const i=void 0===e?this._values:this._originStores[e];return i?i.get(t):void 0}keys(t){const e=null==t?this._values:this._originStores[t];return e?[...e.keys()]:[]}set(t,e,i=l.Gr.USER){let r=this._originStores[i];if(r||(r=new Map,this._originStores[i]=r),r.set(t,e),!this._values.has(t)||this._propertyOriginMap.get(t)<=i){const r=this._values.get(t);return this._values.set(t,e),this._propertyOriginMap.set(t,i),r!==e}return!1}delete(t,e=l.Gr.USER){const i=this._originStores[e];if(!i)return;const r=i.get(t);if(i.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===e){this._values.delete(t);for(let i=e-1;i>=0;i--){const e=this._originStores[i];if(e&&e.has(t)){this._values.set(t,e.get(t)),this._propertyOriginMap.set(t,i);break}}}return r}has(t,e){const i=void 0===e?this._values:this._originStores[e];return!!i&&i.has(t)}revert(t,e){for(;e>0&&!this.has(t,e);)--e;const i=this._originStores[e],r=i?.get(t),n=this._values.get(t);return this._values.set(t,r),this._propertyOriginMap.set(t,e),n!==r}originOf(t){return this._propertyOriginMap.get(t)||l.Gr.DEFAULTS}isAtOrigin(t,e){return this.has(t,e)&&this.originOf(t)===e}isBelowOrigin(t,e){return!this.has(t)||this.originOf(t)<e}forEach(t){this._values.forEach(t)}}var u=i(45917),p=i(88620),c=i(40608);const h=t=>{let e=class extends t{constructor(...t){super(...t);const e=(0,p.oY)(this),i=e.store,r=new a;e.store=r,(0,s.k)(e,i,r)}read(t,e){(0,u.L)(this,t,e)}getAtOrigin(t,e){const i=d(this),r=(0,l.aB)(e);if("string"==typeof t)return i.get(t,r);const n={};return t.forEach((t=>{n[t]=i.get(t,r)})),n}originOf(t){return(0,l.OL)(this.originIdOf(t))}originIdOf(t){return d(this).originOf(t)}revert(t,e){const i=d(this),r=(0,l.aB)(e),n=(0,p.oY)(this);let s;s="string"==typeof t?"*"===t?i.keys(r):[t]:t,s.forEach((t=>{n.invalidate(t),i.revert(t,r),n.commit(t)}))}};return e=(0,r._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],e),e};function d(t){return(0,p.oY)(t).store}let y=class extends(h(n.A)){};y=(0,r._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var g=i(16649),m=i(49422);const f=t=>{let e=class extends t{constructor(...t){super(...t)}clear(t,e="user"){(0,p.oY)(this).clearOrigin(t,(0,l.aB)(e))}write(t,e){return(0,m.M)(this,t=t||{},e),t}setAtOrigin(t,e,i){(0,p.oY)(this).setAtOrigin(t,e,(0,l.aB)(i))}removeOrigin(t){const e=b(this),i=(0,l.aB)(t),r=e.keys(i);for(const t of r)e.originOf(t)===i&&e.set(t,e.get(t,i),l.Gr.USER)}updateOrigin(t,e){const i=b(this),r=(0,l.aB)(e),n=(0,g.Jt)(this,t);for(let e=r+1;e<l.AU;++e)i.delete(t,e);i.set(t,n,r)}toJSON(t){return this.write({},t)}};return e=(0,r._)([(0,c.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],e),e.prototype.toJSON.isDefaultToJSON=!0,e};function b(t){return(0,p.oY)(t).store}const _=t=>{let e=class extends(f(h(t))){constructor(...t){super(...t)}};return e=(0,r._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],e),e};let v=class extends(_(n.A)){};v=(0,r._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],v)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[3813,8256],{4146:(t,e,i)=>{i.d(e,{A:()=>v});var r=i(90237),n=i(78888),s=i(49186),o=i(65529),l=i(4902),a=i(92474),u=i(53966),p=i(74887),c=i(84952),h=i(10107),d=(i(44208),i(87811),i(40608)),y=i(5443),g=i(16930),m=i(92602),f=i(79677);let b=0,_=class extends(o.A.EventedMixin(l.A.IdentifiableMixin(a.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new y.A(-180,-90,180,90,g.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+b++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=g.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await i.e(7982).then(i.bind(i,27982))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:r}=await i.e(5613).then(i.bind(i,45613));try{return await r(e)}catch(t){const i=e?.portalItem,r=i?.id||"unset",n=i?.portal?.url||m.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+n+"', id: '"+r+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,p.zf)(t)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get effectiveVisible(){let t=this.visible;const e=this.parent;return t&&e&&"effectiveVisible"in e&&(t&&=e.effectiveVisible),t}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,c.An)(this.url)}createLayerView(t,e){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,n.A)(t,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,r._)([(0,h.MZ)({type:String})],_.prototype,"attributionDataUrl",void 0),(0,r._)([(0,h.MZ)({readOnly:!0})],_.prototype,"effectiveVisible",null),(0,r._)([(0,h.MZ)({type:y.A})],_.prototype,"fullExtent",void 0),(0,r._)([(0,h.MZ)({readOnly:!0})],_.prototype,"hasAttributionData",null),(0,r._)([(0,h.MZ)({type:String,clonable:!1})],_.prototype,"id",void 0),(0,r._)([(0,h.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"legendEnabled",void 0),(0,r._)([(0,h.MZ)({type:["show","hide","hide-children"]})],_.prototype,"listMode",void 0),(0,r._)([(0,h.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],_.prototype,"opacity",void 0),(0,r._)([(0,h.MZ)({clonable:!1})],_.prototype,"parent",void 0),(0,r._)([(0,h.MZ)({readOnly:!0})],_.prototype,"parsedUrl",null),(0,r._)([(0,h.MZ)({type:Boolean,readOnly:!0})],_.prototype,"persistenceEnabled",void 0),(0,r._)([(0,h.MZ)({type:Boolean})],_.prototype,"popupEnabled",void 0),(0,r._)([(0,h.MZ)({type:Boolean})],_.prototype,"attributionVisible",void 0),(0,r._)([(0,h.MZ)({type:g.A})],_.prototype,"spatialReference",void 0),(0,r._)([(0,h.MZ)({type:String})],_.prototype,"title",void 0),(0,r._)([(0,h.MZ)({readOnly:!0,json:{read:!1}})],_.prototype,"type",void 0),(0,r._)([(0,h.MZ)()],_.prototype,"url",void 0),(0,r._)([(0,h.MZ)({type:f.A})],_.prototype,"visibilityTimeExtent",void 0),(0,r._)([(0,h.MZ)({type:Boolean,nonNullable:!0})],_.prototype,"visible",void 0),_=(0,r._)([(0,d.$)("esri.layers.Layer")],_);const v=_},4902:(t,e,i)=>{i.d(e,{A:()=>u});var r=i(90237),n=i(40608);let s=0;const o=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return e=(0,r._)([(0,n.$)("esri.core.Identifiable")],e),e};let l=class extends(o(class{})){};var a;l=(0,r._)([(0,n.$)("esri.core.Identifiable")],l),(a=l||(l={})).IdentifiableMixin=o,a.NumericIdentifiableMixin=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return e=(0,r._)([(0,n.$)("esri.core.Identifiable.NumericIdentifiable")],e),e};const u=l},62885:(t,e,i)=>{i.d(e,{H:()=>s,V:()=>n});var r=i(5503);function n(t,e,i=r.A){return e||(e=new i),e===t||(e.removeAll(),(n=t)&&(Array.isArray(n)||"items"in n&&Array.isArray(n.items))?e.addMany(t):t&&e.add(t)),e;var n}function s(t){return t}},68197:(t,e,i)=>{i.d(e,{A:()=>p});var r,n,s=i(40876),o=i(34727),l=i(56507);function a(t){return(0,o.qE)((0,l.Vr)(t),0,255)}function u(t,e){const i=t.toString(16).padStart(2,"0");return e?i.slice(0,1):i}class p{static blendColors(t,e,i,r=new p){return r.r=Math.round(t.r+(e.r-t.r)*i),r.g=Math.round(t.g+(e.g-t.g)*i),r.b=Math.round(t.b+(e.b-t.b)*i),r.a=t.a+(e.a-t.a)*i,r._sanitize()}static fromRgb(t,e){const i=(0,s.lT)(t);return i?p.fromArray(i,e):null}static fromHex(t,e=new p){const i=(0,s.oW)(t);return i?p.fromArray(i,e):null}static fromArray(t,e=new p){return e._set(Number(t[0]),Number(t[1]),Number(t[2]),Number(t[3])),isNaN(e.a)&&(e.a=1),e._sanitize()}static fromString(t,e){const i=(0,s.Eq)(t);return i?p.fromArray(i,e):null}static fromJSON(t){return null!=t?new p([t[0],t[1],t[2],(t[3]??255)/255]):void 0}static toUnitRGB(t){return null!=t?[t.r/255,t.g/255,t.b/255]:null}static toUnitRGBA(t){return null!=t?[t.r/255,t.g/255,t.b/255,null!=t.a?t.a:1]:null}constructor(t){this.r=255,this.g=255,this.b=255,this.a=1,t&&this.setColor(t)}get isBright(){return.299*this.r+.587*this.g+.114*this.b>=127}setColor(t){return"string"==typeof t?p.fromString(t,this):Array.isArray(t)?p.fromArray(t,this):(this._set(t.r??0,t.g??0,t.b??0,t.a??1),t instanceof p||this._sanitize()),this}toRgb(){return[this.r,this.g,this.b]}toRgba(){return[this.r,this.g,this.b,this.a]}toHex(t){const e=t?.capitalize??!1,i=t?.digits??6,r=3===i||4===i,n=4===i||8===i,s=`#${u(this.r,r)}${u(this.g,r)}${u(this.b,r)}${n?u(Math.round(255*this.a),r):""}`;return e?s.toUpperCase():s}toCss(t=!1){const e=this.r+", "+this.g+", "+this.b;return t?`rgba(${e}, ${this.a})`:`rgb(${e})`}toString(){return this.toCss(!0)}toJSON(){return this.toArray()}toArray(t=p.AlphaMode.ALWAYS){const e=a(this.r),i=a(this.g),r=a(this.b);return t===p.AlphaMode.ALWAYS||1!==this.a?[e,i,r,a(255*this.a)]:[e,i,r]}clone(){return new p(this.toRgba())}hash(){return this.r<<24|this.g<<16|this.b<<8|255*this.a}equals(t){return null!=t&&t.r===this.r&&t.g===this.g&&t.b===this.b&&t.a===this.a}_sanitize(){return this.r=(0,s.c1)(this.r),this.g=(0,s.c1)(this.g),this.b=(0,s.c1)(this.b),this.a=(0,s.G1)(this.a),this}_set(t,e,i,r){this.r=t,this.g=e,this.b=i,this.a=r}}p.prototype.declaredClass="esri.Color",(n=(r=p).AlphaMode||(r.AlphaMode={}))[n.ALWAYS=0]="ALWAYS",n[n.UNLESS_OPAQUE=1]="UNLESS_OPAQUE"},69052:(t,e,i)=>{i.d(e,{ie:()=>l});var r=i(34727);class n{constructor(t,e){this.min=t,this.max=e,this.range=e-t}normalize(t,e=0,i=!1){return s(this.range,this.min,this.max,t,e,i)}clamp(t,e=0){return(0,r.qE)(t-e,this.min,this.max)+e}monotonic(t,e,i){return t<e?e:e+o(this.range,t-e,i)}minimalMonotonic(t,e,i){return s(this.range,t,t+this.range,e,i)}center(t,e,i){return e=this.monotonic(t,e,i),this.normalize((t+e)/2,i)}diff(t,e,i){return this.monotonic(t,e,i)-t}shortestSignedDiff(t,e){t=this.normalize(t);const i=(e=this.normalize(e))-t,r=e<t?this.minimalMonotonic(t,e)-t:e-this.minimalMonotonic(e,t);return Math.abs(i)<Math.abs(r)?i:r}contains(t,e,i){return e=this.minimalMonotonic(t,e),(i=this.minimalMonotonic(t,i))>t&&i<e}}function s(t,e,i,r,n=0,s=!1){return(r-=n)<e?r+=o(t,e-r):r>i&&(r-=o(t,r-i)),s&&r===i&&(r=e),r+n}function o(t,e,i=0){return Math.ceil((e-i)/t)*t+i}new n(0,2*Math.PI),new n(-Math.PI,Math.PI);const l=new n(0,360)},69540:(t,e,i)=>{i.d(e,{A:()=>h});var r=i(90237),n=i(69622),s=(i(44208),i(4718)),o=(i(53966),i(97768)),l=i(35666),a=i(88620),u=i(40608);const p=t=>{let e=class extends t{clone(){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,i=t.store,r={},n=new Map;for(const t in e){const o=e[t],a=i?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||a!==l.Gr.USER&&a!==l.Gr.DEFAULTS&&a!==l.Gr.WEB_MAP&&a!==l.Gr.WEB_SCENE)continue;const p=this[t];let c=null;c="function"==typeof u?u(p):"reference"===u?p:(0,s.TU)(p),null!=p&&null==c||(a===l.Gr.DEFAULTS?n.set(t,c):r[t]=c)}const u=new(0,Object.getPrototypeOf(this).constructor)(r);if(n.size){const t=(0,a.oY)(u)?.store;if(t)for(const[e,i]of n)t.set(e,i,l.Gr.DEFAULTS)}return u}};return e=(0,r._)([(0,u.$)("esri.core.Clonable")],e),e};let c=class extends(p(n.A)){};c=(0,r._)([(0,u.$)("esri.core.Clonable")],c),(c||(c={})).ClonableMixin=p;const h=c},71493:(t,e,i)=>{i.r(e),i.d(e,{default:()=>P});var r=i(90237),n=i(79608),s=i(68197),o=i(69540),l=i(25482),a=i(90629),u=i(10107),p=i(56507),c=(i(44208),i(87811),i(40608));let h=class extends(l.A.JSONSupportMixin(o.A)){constructor(t){super(t),this.type="simple",this.color=new s.A("black"),this.lineSize=2,this.fontSize=10,this.textColor=new s.A("black"),this.textBackgroundColor=new s.A([255,255,255,.6])}};(0,r._)([(0,u.MZ)({type:["simple"],readOnly:!0,json:{write:{isRequired:!0}}})],h.prototype,"type",void 0),(0,r._)([(0,u.MZ)({type:s.A,nonNullable:!0,json:{type:[p.jz],write:{isRequired:!0}}})],h.prototype,"color",void 0),(0,r._)([(0,u.MZ)({type:Number,cast:a.cr,nonNullable:!0,range:{min:(0,a.PN)(1)},json:{write:{isRequired:!0}}})],h.prototype,"lineSize",void 0),(0,r._)([(0,u.MZ)({type:Number,cast:a.cr,nonNullable:!0,json:{write:{isRequired:!0}}})],h.prototype,"fontSize",void 0),(0,r._)([(0,u.MZ)({type:s.A,nonNullable:!0,json:{type:[p.jz],write:{isRequired:!0}}})],h.prototype,"textColor",void 0),(0,r._)([(0,u.MZ)({type:s.A,nonNullable:!0,json:{type:[p.jz],write:{isRequired:!0}}})],h.prototype,"textBackgroundColor",void 0),h=(0,r._)([(0,c.$)("esri.analysis.DimensionSimpleStyle")],h);const d=h;var y;!function(t){t.Horizontal="horizontal",t.Vertical="vertical",t.Direct="direct"}(y||(y={}));const g=[y.Horizontal,y.Vertical,y.Direct];var m=i(69052),f=i(79901),b=i(86738);let _=class extends(l.A.JSONSupportMixin(o.A)){constructor(t){super(t),this.type="length",this.startPoint=null,this.endPoint=null,this.measureType=y.Direct,this.offset=0,this.orientation=0}get valid(){return null!=this.startPoint&&null!=this.endPoint}};(0,r._)([(0,u.MZ)({type:["length"],json:{write:{isRequired:!0}}})],_.prototype,"type",void 0),(0,r._)([(0,u.MZ)({type:b.A,json:{write:{isRequired:!0}}})],_.prototype,"startPoint",void 0),(0,r._)([(0,u.MZ)({type:b.A,json:{write:{isRequired:!0}}})],_.prototype,"endPoint",void 0),(0,r._)([(0,u.MZ)({type:g,nonNullable:!0,json:{write:{isRequired:!0}}})],_.prototype,"measureType",void 0),(0,r._)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}})],_.prototype,"offset",void 0),(0,r._)([(0,u.MZ)({type:Number,nonNullable:!0,json:{write:{isRequired:!0}}}),(0,f.w)((t=>m.ie.normalize((0,p.GB)(t),0,!0)))],_.prototype,"orientation",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],_.prototype,"valid",null),_=(0,r._)([(0,c.$)("esri.analysis.LengthDimension")],_);const v=_;var A=i(5503),M=i(62885),w=i(36708),S=(i(53966),i(5443)),O=i(80586);const x=A.A.ofType(v);let E=class extends n.A{constructor(t){super(t),this.type="dimension",this.style=new d,this.extent=null}initialize(){this.addHandles((0,w.wB)((()=>this._computeExtent()),(t=>{null==t?.pending&&this._set("extent",null!=t?t.extent:null)}),w.pc))}get dimensions(){return this._get("dimensions")||new x}set dimensions(t){this._set("dimensions",(0,M.V)(t,this.dimensions,x))}get spatialReference(){for(const t of this.dimensions){if(null!=t.startPoint)return t.startPoint.spatialReference;if(null!=t.endPoint)return t.endPoint.spatialReference}return null}get valid(){return this.dimensions.every((t=>t.valid))}async waitComputeExtent(){const t=this._computeExtent();return null!=t?t.pending:Promise.resolve()}_computeExtent(){const t=this.spatialReference;if(null==t)return{pending:null,extent:null};const e=[];for(const t of this.dimensions)null!=t.startPoint&&e.push(t.startPoint),null!=t.endPoint&&e.push(t.endPoint);const i=(0,O.projectOrLoadMany)(e,t);if(null!=i.pending)return{pending:i.pending,extent:null};let r=null;return null!=i.geometries&&(r=i.geometries.reduce(((t,e)=>null==t?null!=e?S.A.fromPoint(e):null:null!=e?t.union(S.A.fromPoint(e)):t),null)),{pending:null,extent:r}}clear(){this.dimensions.removeAll()}};(0,r._)([(0,u.MZ)({type:["dimension"]})],E.prototype,"type",void 0),(0,r._)([(0,u.MZ)({cast:M.H,type:x,nonNullable:!0})],E.prototype,"dimensions",null),(0,r._)([(0,u.MZ)({readOnly:!0})],E.prototype,"spatialReference",null),(0,r._)([(0,u.MZ)({types:{key:"type",base:null,typeMap:{simple:d}},nonNullable:!0})],E.prototype,"style",void 0),(0,r._)([(0,u.MZ)({value:null,readOnly:!0})],E.prototype,"extent",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],E.prototype,"valid",null),E=(0,r._)([(0,c.$)("esri.analysis.DimensionAnalysis")],E);const Z=E;var N=i(92071),T=i(43937),D=i(4146),R=i(16131);let L=class extends((0,R.q)((0,N.P)(D.A))){constructor(t){if(super(t),this.type="dimension",this.operationalLayerType="ArcGISDimensionLayer",this.source=new Z,this.opacity=1,t){const{source:e,style:i}=t;e&&i&&(e.style=i)}}initialize(){this.addHandles([(0,w.wB)((()=>this.source),((t,e)=>{null!=e&&e.parent===this&&(e.parent=null),null!=t&&(t.parent=this)}),w.pc)])}async load(){return this.addResolvingPromise(this.source.waitComputeExtent()),this}get spatialReference(){return this.source.spatialReference}get style(){return this.source.style}set style(t){this.source.style=t}get fullExtent(){return this.source.extent}releaseAnalysis(t){this.source===t&&(this.source=new Z)}get analysis(){return this.source}set analysis(t){this.source=t}get dimensions(){return this.source.dimensions}set dimensions(t){this.source.dimensions=t}writeDimensions(t,e,i,r){e.dimensions=t.filter((({startPoint:t,endPoint:e})=>null!=t&&null!=e)).toJSON(r)}};(0,r._)([(0,u.MZ)({json:{read:!1},readOnly:!0})],L.prototype,"type",void 0),(0,r._)([(0,u.MZ)({type:["ArcGISDimensionLayer"]})],L.prototype,"operationalLayerType",void 0),(0,r._)([(0,u.MZ)({nonNullable:!0})],L.prototype,"source",void 0),(0,r._)([(0,u.MZ)({readOnly:!0})],L.prototype,"spatialReference",null),(0,r._)([(0,u.MZ)({types:{key:"type",base:null,typeMap:{simple:d}},json:{write:{ignoreOrigin:!0}}})],L.prototype,"style",null),(0,r._)([(0,u.MZ)({readOnly:!0})],L.prototype,"fullExtent",null),(0,r._)([(0,u.MZ)({readOnly:!0,json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}}})],L.prototype,"opacity",void 0),(0,r._)([(0,u.MZ)({type:["show","hide"]})],L.prototype,"listMode",void 0),(0,r._)([(0,u.MZ)({type:A.A.ofType(v),json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{ignoreOrigin:!0}}}}})],L.prototype,"dimensions",null),(0,r._)([(0,T.K)("web-scene","dimensions")],L.prototype,"writeDimensions",null),L=(0,r._)([(0,c.$)("esri.layers.DimensionLayer")],L);const P=L},78553:(t,e,i)=>{i.d(e,{D:()=>s,p:()=>n});var r=i(56507);function n(t){const e=(0,r.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function s(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},79608:(t,e,i)=>{i.d(e,{A:()=>y});var r=i(90237),n=i(69540),s=i(10107),o=(i(44208),i(53966),i(87811),i(40608));let l=class extends n.A{constructor(t){super(t),this.type="web-scene"}equals(t){return this.type===t.type}};(0,r._)([(0,s.MZ)()],l.prototype,"type",void 0),l=(0,r._)([(0,o.$)("esri.analysis.support.AnalysisOriginWebScene")],l);const a=l;var u=i(69622),p=i(4902),c=i(25482);let h=0,d=class extends(c.A.JSONSupportMixin(n.A.ClonableMixin(p.A.IdentifiableMixin(u.A)))){constructor(t){super(t),this.id=`${Date.now().toString(16)}-analysis-${h++}`,this.origin=null}get parent(){return this._get("parent")}set parent(t){const e=this.parent;if(null!=e)switch(e.type){case"line-of-sight":case"dimension":case"viewshed":e.releaseAnalysis(this);break;case"2d":case"3d":e.analyses.includes(this)&&e.analyses.remove(this)}this._set("parent",t)}};(0,r._)([(0,s.MZ)({type:String,constructOnly:!0,clonable:!1})],d.prototype,"id",void 0),(0,r._)([(0,s.MZ)({clonable:!1,value:null})],d.prototype,"parent",null),(0,r._)([(0,s.MZ)({types:{key:"type",base:null,typeMap:{"web-scene":a}}})],d.prototype,"origin",void 0),d=(0,r._)([(0,o.$)("esri.analysis.Analysis")],d);const y=d},79677:(t,e,i)=>{i.d(e,{A:()=>d});var r,n=i(90237),s=i(25482),o=i(88930),l=i(10107),a=(i(44208),i(53966),i(87811),i(36005)),u=i(40608),p=i(43937),c=i(98623);let h=class extends s.A{static{r=this}static get allTime(){return y}static get empty(){return g}static fromArray(t){return new r({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(r.allTime)}get isEmpty(){return this.equals(r.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new r({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,r=t.start?.getTime()??t.start,n=t.end?.getTime()??t.end;return e===r&&i===n}expandTo(t,e=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,t,e));let n=this.end;if(n){const i=(0,o.lL)(n,t,e);n=n.getTime()===i.getTime()?i:(0,o.S1)(i,1,t,e)}return new r({start:i,end:n})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return r.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,n=t.start?.getTime()??-1/0,s=t.end?.getTime()??1/0;let o,l;return n>=e&&n<=i?o=n:e>=n&&e<=s&&(o=e),i>=n&&i<=s?l=i:s>=e&&s<=i&&(l=s),null==o||null==l||isNaN(o)||isNaN(l)?r.empty:new r({start:o===-1/0?null:new Date(o),end:l===1/0?null:new Date(l)})}offset(t,e,i=c.qU){if(this.isEmpty||this.isAllTime)return this.clone();const n=new r,{start:s,end:l}=this;return null!=s&&(n.start=(0,o.S1)(s,t,e,i)),null!=l&&(n.end=(0,o.S1)(l,t,e,i)),n}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return y.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,i=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new r({start:e,end:i})}};(0,n._)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"end",void 0),(0,n._)([(0,a.w)("end")],h.prototype,"readEnd",null),(0,n._)([(0,p.K)("end")],h.prototype,"writeEnd",null),(0,n._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isAllTime",null),(0,n._)([(0,l.MZ)({readOnly:!0,json:{read:!1}})],h.prototype,"isEmpty",null),(0,n._)([(0,l.MZ)({type:Date,json:{write:{allowNull:!0}}})],h.prototype,"start",void 0),(0,n._)([(0,a.w)("start")],h.prototype,"readStart",null),(0,n._)([(0,p.K)("start")],h.prototype,"writeStart",null),h=r=(0,n._)([(0,u.$)("esri.time.TimeExtent")],h);const d=h,y=new h,g=new h({start:void 0,end:void 0})},92071:(t,e,i)=>{i.d(e,{P:()=>_,L:()=>v});var r=i(90237),n=i(69622),s=i(76953),o=i(4718),l=i(35666);class a{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(l.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(t){const e=new a,i=this._originStores[l.Gr.DEFAULTS];i&&i.forEach(((t,i)=>{e.set(i,(0,o.o8)(t),l.Gr.DEFAULTS)}));for(let i=l.Gr.SERVICE;i<l.AU;i++){const r=this._originStores[i];r&&r.forEach(((r,n)=>{t&&t.has(n)||e.set(n,(0,o.o8)(r),i)}))}return e}get(t,e){const i=void 0===e?this._values:this._originStores[e];return i?i.get(t):void 0}keys(t){const e=null==t?this._values:this._originStores[t];return e?[...e.keys()]:[]}set(t,e,i=l.Gr.USER){let r=this._originStores[i];if(r||(r=new Map,this._originStores[i]=r),r.set(t,e),!this._values.has(t)||this._propertyOriginMap.get(t)<=i){const r=this._values.get(t);return this._values.set(t,e),this._propertyOriginMap.set(t,i),r!==e}return!1}delete(t,e=l.Gr.USER){const i=this._originStores[e];if(!i)return;const r=i.get(t);if(i.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===e){this._values.delete(t);for(let i=e-1;i>=0;i--){const e=this._originStores[i];if(e&&e.has(t)){this._values.set(t,e.get(t)),this._propertyOriginMap.set(t,i);break}}}return r}has(t,e){const i=void 0===e?this._values:this._originStores[e];return!!i&&i.has(t)}revert(t,e){for(;e>0&&!this.has(t,e);)--e;const i=this._originStores[e],r=i?.get(t),n=this._values.get(t);return this._values.set(t,r),this._propertyOriginMap.set(t,e),n!==r}originOf(t){return this._propertyOriginMap.get(t)||l.Gr.DEFAULTS}isAtOrigin(t,e){return this.has(t,e)&&this.originOf(t)===e}isBelowOrigin(t,e){return!this.has(t)||this.originOf(t)<e}forEach(t){this._values.forEach(t)}}var u=i(45917),p=i(88620),c=i(40608);const h=t=>{let e=class extends t{constructor(...t){super(...t);const e=(0,p.oY)(this),i=e.store,r=new a;e.store=r,(0,s.k)(e,i,r)}read(t,e){(0,u.L)(this,t,e)}getAtOrigin(t,e){const i=d(this),r=(0,l.aB)(e);if("string"==typeof t)return i.get(t,r);const n={};return t.forEach((t=>{n[t]=i.get(t,r)})),n}originOf(t){return(0,l.OL)(this.originIdOf(t))}originIdOf(t){return d(this).originOf(t)}revert(t,e){const i=d(this),r=(0,l.aB)(e),n=(0,p.oY)(this);let s;s="string"==typeof t?"*"===t?i.keys(r):[t]:t,s.forEach((t=>{n.invalidate(t),i.revert(t,r),n.commit(t)}))}};return e=(0,r._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],e),e};function d(t){return(0,p.oY)(t).store}let y=class extends(h(n.A)){};y=(0,r._)([(0,c.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],y);var g=i(16649),m=i(49422);const f=t=>{let e=class extends t{constructor(...t){super(...t)}clear(t,e="user"){(0,p.oY)(this).clearOrigin(t,(0,l.aB)(e))}write(t,e){return(0,m.M)(this,t=t||{},e),t}setAtOrigin(t,e,i){(0,p.oY)(this).setAtOrigin(t,e,(0,l.aB)(i))}removeOrigin(t){const e=b(this),i=(0,l.aB)(t),r=e.keys(i);for(const t of r)e.originOf(t)===i&&e.set(t,e.get(t,i),l.Gr.USER)}updateOrigin(t,e){const i=b(this),r=(0,l.aB)(e),n=(0,g.Jt)(this,t);for(let e=r+1;e<l.AU;++e)i.delete(t,e);i.set(t,n,r)}toJSON(t){return this.write({},t)}};return e=(0,r._)([(0,c.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],e),e.prototype.toJSON.isDefaultToJSON=!0,e};function b(t){return(0,p.oY)(t).store}const _=t=>{let e=class extends(f(h(t))){constructor(...t){super(...t)}};return e=(0,r._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],e),e};let v=class extends(_(n.A)){};v=(0,r._)([(0,c.$)("esri.core.MultiOriginJSONSupport")],v)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7424,8256],{4146:(t,e,n)=>{n.d(e,{A:()=>_});var i=n(90237),r=n(78888),s=n(49186),o=n(65529),a=n(4902),l=n(92474),u=n(53966),c=n(74887),d=n(84952),g=n(10107),h=(n(44208),n(87811),n(40608)),p=n(5443),f=n(16930),b=n(92602),y=n(79677);let v=0,m=class extends(o.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new p.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await n.e(7982).then(n.bind(n,27982))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:i}=await n.e(5613).then(n.bind(n,45613));try{return await i(e)}catch(t){const n=e?.portalItem,i=n?.id||"unset",r=n?.portal?.url||b.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+r+"', id: '"+i+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,c.zf)(t)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get effectiveVisible(){let t=this.visible;const e=this.parent;return t&&e&&"effectiveVisible"in e&&(t&&=e.effectiveVisible),t}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(t,e){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,r.A)(t,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,g.MZ)({type:String})],m.prototype,"attributionDataUrl",void 0),(0,i._)([(0,g.MZ)({readOnly:!0})],m.prototype,"effectiveVisible",null),(0,i._)([(0,g.MZ)({type:p.A})],m.prototype,"fullExtent",void 0),(0,i._)([(0,g.MZ)({readOnly:!0})],m.prototype,"hasAttributionData",null),(0,i._)([(0,g.MZ)({type:String,clonable:!1})],m.prototype,"id",void 0),(0,i._)([(0,g.MZ)({type:Boolean,nonNullable:!0})],m.prototype,"legendEnabled",void 0),(0,i._)([(0,g.MZ)({type:["show","hide","hide-children"]})],m.prototype,"listMode",void 0),(0,i._)([(0,g.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],m.prototype,"opacity",void 0),(0,i._)([(0,g.MZ)({clonable:!1})],m.prototype,"parent",void 0),(0,i._)([(0,g.MZ)({readOnly:!0})],m.prototype,"parsedUrl",null),(0,i._)([(0,g.MZ)({type:Boolean,readOnly:!0})],m.prototype,"persistenceEnabled",void 0),(0,i._)([(0,g.MZ)({type:Boolean})],m.prototype,"popupEnabled",void 0),(0,i._)([(0,g.MZ)({type:Boolean})],m.prototype,"attributionVisible",void 0),(0,i._)([(0,g.MZ)({type:f.A})],m.prototype,"spatialReference",void 0),(0,i._)([(0,g.MZ)({type:String})],m.prototype,"title",void 0),(0,i._)([(0,g.MZ)({readOnly:!0,json:{read:!1}})],m.prototype,"type",void 0),(0,i._)([(0,g.MZ)()],m.prototype,"url",void 0),(0,i._)([(0,g.MZ)({type:y.A})],m.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,g.MZ)({type:Boolean,nonNullable:!0})],m.prototype,"visible",void 0),m=(0,i._)([(0,h.$)("esri.layers.Layer")],m);const _=m},4341:(t,e,n)=>{n.d(e,{I:()=>r});var i=n(26390);class r{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*s);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,s));t++)this._items.push(this._allocator())}}const s=1024},4902:(t,e,n)=>{n.d(e,{A:()=>c});var i=n(90237),r=n(40608);let s=0;const o=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return e=(0,i._)([(0,r.$)("esri.core.Identifiable")],e),e},a=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return e=(0,i._)([(0,r.$)("esri.core.Identifiable.NumericIdentifiable")],e),e};let l=class extends(o(class{})){};var u;l=(0,i._)([(0,r.$)("esri.core.Identifiable")],l),(u=l||(l={})).IdentifiableMixin=o,u.NumericIdentifiableMixin=a;const c=l},11964:(t,e,n)=>{n.d(e,{Cr:()=>u,H6:()=>g,_I:()=>d,kb:()=>c,vt:()=>l});var i=n(34727),r=n(4341),s=n(38954),o=n(51850),a=n(32114);function l(t){return t?{origin:(0,o.o8)(t.origin),vector:(0,o.o8)(t.vector)}:{origin:(0,o.vt)(),vector:(0,o.vt)()}}function u(t,e,n=l()){return(0,s.c)(n.origin,t),(0,s.d)(n.vector,e,t),n}function c(t,e){const n=(0,s.d)(a.rq.get(),e,t.origin),r=(0,s.f)(t.vector,n),o=(0,s.f)(t.vector,t.vector),l=(0,i.qE)(r/o,0,1),u=(0,s.d)(a.rq.get(),(0,s.h)(a.rq.get(),t.vector,l),n);return(0,s.f)(u,u)}function d(t,e,n){return g(t,e,0,1,n)}function g(t,e,n,r,o){const{vector:l,origin:u}=t,c=(0,s.d)(a.rq.get(),e,u),d=(0,s.f)(l,c)/(0,s.k)(l);return(0,s.h)(o,l,(0,i.qE)(d,n,r)),(0,s.g)(o,o,t.origin)}(0,o.vt)(),(0,o.vt)(),new r.I((()=>l()))},17352:(t,e,n)=>{n.d(e,{b:()=>B,f:()=>_}),n(44208);var i=n(53966),r=n(34727),s=n(4341),o=n(58083),a=n(9093),l=n(38954),u=n(51850),c=n(19419),d=n(88582),g=n(11964),h=n(240),p=n(71351),f=n(44280),b=n(32114);const y=()=>i.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function v(t=R){return{plane:(0,h.vt)(t.plane),origin:(0,u.o8)(t.origin),basis1:(0,u.o8)(t.basis1),basis2:(0,u.o8)(t.basis2)}}function m(t,e=v()){return _(t.origin,t.basis1,t.basis2,e)}function _(t,e,n,i=v()){return(0,l.c)(i.origin,t),(0,l.c)(i.basis1,e),(0,l.c)(i.basis2,n),M(i),function(t,e){Math.abs((0,l.f)(t.basis1,t.basis2)/((0,l.l)(t.basis1)*(0,l.l)(t.basis2)))>1e-6&&y().warn(e,"Provided basis vectors are not perpendicular"),Math.abs((0,l.f)(t.basis1,x(t)))>1e-6&&y().warn(e,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,l.f)(x(t),t.origin)-t.plane[3])>1e-6&&y().warn(e,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function M(t){(0,h.mR)(t.basis2,t.basis1,t.origin,t.plane)}function A(t,e,n){t!==n&&m(t,n);const i=(0,l.h)(b.rq.get(),x(t),e);return(0,l.g)(n.origin,n.origin,i),n.plane[3]-=e,n}function w(t,e=v()){const n=(t[2]-t[0])/2,i=(t[3]-t[1])/2;return(0,l.i)(e.origin,t[0]+n,t[1]+i,0),(0,l.i)(e.basis1,n,0,0),(0,l.i)(e.basis2,0,i,0),(0,h.fA)(0,0,1,0,e.plane),e}function S(t,e,n){return!!(0,h.Ui)(t.plane,e,n)&&j(t,n)}function O(t,e,n){const i=U.get();D(t,e,i,U.get());let s=Number.POSITIVE_INFINITY;for(const o of k){const a=P(t,o,Z.get()),u=b.rq.get();if((0,h.T7)(i,a,u)){const t=(0,l.o)(b.rq.get(),e.origin,u),i=Math.abs((0,r.XM)((0,l.f)(e.direction,t)));i<s&&(s=i,(0,l.c)(n,u))}}return s===Number.POSITIVE_INFINITY?I(t,e,n):n}function I(t,e,n){if(S(t,e,n))return n;const i=U.get(),r=U.get();D(t,e,i,r);let s=Number.POSITIVE_INFINITY;for(const o of k){const a=P(t,o,Z.get()),u=b.rq.get();if((0,h.gv)(i,a,u)){const t=(0,p.kb)(e,u);if(!(0,h.Tj)(r,u))continue;t<s&&(s=t,(0,l.c)(n,u))}}return q(t,e.origin)<s&&E(t,e.origin,n),n}function E(t,e,n){const i=(0,h._I)(t.plane,e,b.rq.get()),r=(0,g.H6)(L(t,t.basis1),i,-1,1,b.rq.get()),s=(0,g.H6)(L(t,t.basis2),i,-1,1,b.rq.get());return(0,l.d)(n,(0,l.g)(b.rq.get(),r,s),t.origin),n}function T(t,e,n){const{origin:i,basis1:r,basis2:s}=t,o=(0,l.d)(b.rq.get(),e,i),a=(0,f.gr)(r,o),u=(0,f.gr)(s,o),c=(0,f.gr)(x(t),o);return(0,l.i)(n,a,u,c)}function q(t,e){const n=T(t,e,b.rq.get()),{basis1:i,basis2:r}=t,s=(0,l.l)(i),o=(0,l.l)(r),a=Math.max(Math.abs(n[0])-s,0),u=Math.max(Math.abs(n[1])-o,0),c=n[2];return a*a+u*u+c*c}function N(t,e){const n=-t.plane[3];return(0,f.gr)(x(t),e)-n}function x(t){return(0,h.Qj)(t.plane)}function j(t,e){const n=(0,l.d)(b.rq.get(),e,t.origin),i=(0,l.k)(t.basis1),r=(0,l.k)(t.basis2),s=(0,l.f)(t.basis1,n),o=(0,l.f)(t.basis2,n);return-s-i<0&&s-i<0&&-o-r<0&&o-r<0}function L(t,e){const n=Z.get();return(0,l.c)(n.origin,t.origin),(0,l.c)(n.vector,e),n}function P(t,e,n){const{basis1:i,basis2:r,origin:s}=t,o=(0,l.h)(b.rq.get(),i,e.origin[0]),a=(0,l.h)(b.rq.get(),r,e.origin[1]);(0,l.g)(n.origin,o,a),(0,l.g)(n.origin,n.origin,s);const u=(0,l.h)(b.rq.get(),i,e.direction[0]),c=(0,l.h)(b.rq.get(),r,e.direction[1]);return(0,l.h)(n.vector,(0,l.g)(u,u,c),2),n}function D(t,e,n,i){const r=x(t);(0,h.mR)(r,e.direction,e.origin,n),(0,h.mR)((0,h.Qj)(n),r,e.origin,i)}const R={plane:(0,h.vt)(),origin:(0,u.fA)(0,0,0),basis1:(0,u.fA)(1,0,0),basis2:(0,u.fA)(0,1,0)},U=new s.I(h.vt),Z=new s.I(g.vt),C=(0,u.vt)(),V=new s.I((()=>v())),k=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],$=(0,a.vt)(),F=(0,a.vt)(),B=Object.freeze(Object.defineProperty({__proto__:null,BoundedPlaneClass:class{constructor(){this.plane=(0,h.vt)(),this.origin=(0,u.vt)(),this.basis1=(0,u.vt)(),this.basis2=(0,u.vt)()}},altitudeAt:N,axisAt:function(t,e,n,i){return function(t,e,n){switch(e){case d._.X:(0,l.c)(n,t.basis1),(0,l.n)(n,n);break;case d._.Y:(0,l.c)(n,t.basis2),(0,l.n)(n,n);break;case d._.Z:(0,l.c)(n,x(t))}return n}(t,n,i)},cameraFrustumCoverage:function(t,e){return(e-t)/e},closestPoint:I,closestPointOnSilhouette:O,copy:m,copyWithoutVerify:function(t,e){(0,l.c)(e.origin,t.origin),(0,l.c)(e.basis1,t.basis1),(0,l.c)(e.basis2,t.basis2),(0,h.C)(e.plane,t.plane)},create:v,distance:function(t,e){return Math.sqrt(q(t,e))},distance2:q,distanceToSilhouette:function(t,e){let n=Number.NEGATIVE_INFINITY;for(const i of k){const r=P(t,i,Z.get()),s=(0,g.kb)(r,e);s>n&&(n=s)}return Math.sqrt(n)},elevate:A,equals:function(t,e){return(0,l.p)(t.basis1,e.basis1)&&(0,l.p)(t.basis2,e.basis2)&&(0,l.p)(t.origin,e.origin)},extrusionContainsPoint:function(t,e){return(0,h.Tj)(t.plane,e)&&j(t,e)},fromAABoundingRect:w,fromValues:_,getExtent:function(t,e){const n=t.basis1[0],i=t.basis2[1],[r,s]=t.origin;return(0,c.fA)(r-n,s-i,r+n,s+i,e)},intersectRay:S,intersectRayClosestSilhouette:function(t,e,n){if(S(t,e,n))return n;const i=O(t,e,b.rq.get());return(0,l.g)(n,e.origin,(0,l.h)(b.rq.get(),e.direction,(0,l.j)(e.origin,i)/(0,l.l)(e.direction))),n},normal:x,projectPoint:E,projectPointLocal:T,rotate:function(t,e,n,i){return t!==i&&m(t,i),(0,o.$0)(F,e,n),(0,l.t)(i.basis1,t.basis1,F),(0,l.t)(i.basis2,t.basis2,F),M(i),i},setAltitudeAt:function(t,e,n,i){const r=N(t,e),s=(0,l.h)(C,x(t),n-r);return(0,l.g)(i,e,s),i},setExtent:function(t,e,n){return w(e,n),A(n,N(t,t.origin),n),n},transform:function(t,e,n){return t!==n&&m(t,n),(0,o.B8)($,e),(0,o.mg)($,$),(0,l.t)(n.basis1,t.basis1,$),(0,l.t)(n.basis2,t.basis2,$),(0,l.t)((0,h.Qj)(n.plane),(0,h.Qj)(t.plane),$),(0,l.t)(n.origin,t.origin,e),(0,h.mP)(n.plane,n.plane,n.origin),n},up:R,updateUnboundedPlane:M,wrap:function(t,e,n){const i=V.get();return i.origin=t,i.basis1=e,i.basis2=n,i.plane=(0,h.LV)(0,0,0,0),M(i),i}},Symbol.toStringTag,{value:"Module"}))},62885:(t,e,n)=>{n.d(e,{H:()=>s,V:()=>r});var i=n(5503);function r(t,e,n=i.A){return e||(e=new n),e===t||(e.removeAll(),(r=t)&&(Array.isArray(r)||"items"in r&&Array.isArray(r.items))?e.addMany(t):t&&e.add(t)),e;var r}function s(t){return t}},65176:(t,e,n)=>{n.d(e,{xH:()=>l,N1:()=>c}),n(38954);var i,r,s,o=n(51850),a=n(71351);function l(t,e){return u(t)===u(e)}function u(t){if(null==t)return null;const e=null!=t.layer?t.layer.id:"";let n=null;return n=null!=t.objectId?t.objectId:null!=t.layer&&"objectIdField"in t.layer&&null!=t.layer.objectIdField&&null!=t.attributes?t.attributes[t.layer.objectIdField]:t.uid,null==n?null:`o-${e}-${n}`}(s=i||(i={}))[s.OBJECT=0]="OBJECT",s[s.HUD=1]="HUD",s[s.TERRAIN=2]="TERRAIN",s[s.OVERLAY=3]="OVERLAY",s[s.I3S=4]="I3S",s[s.PCL=5]="PCL",s[s.LOD=6]="LOD",s[s.VOXEL=7]="VOXEL",s[s.TILES3D=8]="TILES3D",function(t){t[t.MIN=0]="MIN",t[t.MINMAX=1]="MINMAX",t[t.ALL=2]="ALL"}(r||(r={})),n(58083),n(70328),n(97937),n(17352),(0,o.vt)(),(0,o.vt)();const c={json:{write:{writer:function(t,e){null!=t?.layer?.objectIdField&&null!=t.attributes&&(e.feature={layerId:t.layer.id,objectId:t.attributes[t.layer.objectIdField]})},target:{"feature.layerId":{type:[Number,String],isRequired:!0},"feature.objectId":{type:[Number,String],isRequired:!0}}},origins:{"web-scene":{read:function(t){if(null!=t.layerId&&null!=t.objectId)return{uid:null,layer:{id:t.layerId,objectIdField:"ObjectId"},attributes:{ObjectId:t.objectId}}}}}}};(0,a.vt)(),(0,o.vt)()},69540:(t,e,n)=>{n.d(e,{A:()=>g});var i=n(90237),r=n(69622),s=(n(44208),n(4718)),o=(n(53966),n(97768)),a=n(35666),l=n(88620),u=n(40608);const c=t=>{let e=class extends t{clone(){const t=(0,l.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,n=t.store,i={},r=new Map;for(const t in e){const o=e[t],l=n?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const c=this[t];let d=null;d="function"==typeof u?u(c):"reference"===u?c:(0,s.TU)(c),null!=c&&null==d||(l===a.Gr.DEFAULTS?r.set(t,d):i[t]=d)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(r.size){const t=(0,l.oY)(u)?.store;if(t)for(const[e,n]of r)t.set(e,n,a.Gr.DEFAULTS)}return u}};return e=(0,i._)([(0,u.$)("esri.core.Clonable")],e),e};let d=class extends(c(r.A)){};d=(0,i._)([(0,u.$)("esri.core.Clonable")],d),(d||(d={})).ClonableMixin=c;const g=d},71351:(t,e,n)=>{n.d(e,{Cr:()=>d,LV:()=>c,kb:()=>g,oC:()=>h,vt:()=>l}),n(4576);var i=n(4341),r=(n(77690),n(29242)),s=n(38954),o=n(51850),a=n(32114);function l(t){return t?u((0,o.o8)(t.origin),(0,o.o8)(t.direction)):u((0,o.vt)(),(0,o.vt)())}function u(t,e){return{origin:t,direction:e}}function c(t,e){const n=p.get();return n.origin=t,n.direction=e,n}function d(t,e,n=l()){return(0,s.c)(n.origin,t),(0,s.d)(n.direction,e,t),n}function g(t,e){const n=(0,s.e)(a.rq.get(),(0,s.n)(a.rq.get(),t.direction),(0,s.d)(a.rq.get(),e,t.origin));return(0,s.f)(n,n)}function h(t,e,n){const i=(0,s.f)(t.direction,(0,s.d)(n,e,t.origin));return(0,s.g)(n,t.origin,(0,s.h)(n,t.direction,i)),n}const p=new i.I((()=>l()));(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,r.vt)()},78553:(t,e,n)=>{n.d(e,{D:()=>s,p:()=>r});var i=n(56507);function r(t){const e=(0,i.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function s(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},79608:(t,e,n)=>{n.d(e,{A:()=>h});var i=n(90237),r=n(69540),s=n(10107),o=(n(44208),n(53966),n(87811),n(40608));let a=class extends r.A{constructor(t){super(t),this.type="web-scene"}equals(t){return this.type===t.type}};(0,i._)([(0,s.MZ)()],a.prototype,"type",void 0),a=(0,i._)([(0,o.$)("esri.analysis.support.AnalysisOriginWebScene")],a);var l=n(69622),u=n(4902),c=n(25482);let d=0,g=class extends(c.A.JSONSupportMixin(r.A.ClonableMixin(u.A.IdentifiableMixin(l.A)))){constructor(t){super(t),this.id=`${Date.now().toString(16)}-analysis-${d++}`,this.origin=null}get parent(){return this._get("parent")}set parent(t){const e=this.parent;if(null!=e)switch(e.type){case"line-of-sight":case"dimension":case"viewshed":e.releaseAnalysis(this);break;case"2d":case"3d":e.analyses.includes(this)&&e.analyses.remove(this)}this._set("parent",t)}};(0,i._)([(0,s.MZ)({type:String,constructOnly:!0,clonable:!1})],g.prototype,"id",void 0),(0,i._)([(0,s.MZ)({clonable:!1,value:null})],g.prototype,"parent",null),(0,i._)([(0,s.MZ)({types:{key:"type",base:null,typeMap:{"web-scene":a}}})],g.prototype,"origin",void 0),g=(0,i._)([(0,o.$)("esri.analysis.Analysis")],g);const h=g},79677:(t,e,n)=>{n.d(e,{A:()=>h});var i,r=n(90237),s=n(25482),o=n(88930),a=n(10107),l=(n(44208),n(53966),n(87811),n(36005)),u=n(40608),c=n(43937),d=n(98623);let g=class extends s.A{static{i=this}static get allTime(){return p}static get empty(){return f}static fromArray(t){return new i({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,i=t.start?.getTime()??t.start,r=t.end?.getTime()??t.end;return e===i&&n===r}expandTo(t,e=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=(0,o.lL)(n,t,e));let r=this.end;if(r){const n=(0,o.lL)(r,t,e);r=r.getTime()===n.getTime()?n:(0,o.S1)(n,1,t,e)}return new i({start:n,end:r})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return i.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,r=t.start?.getTime()??-1/0,s=t.end?.getTime()??1/0;let o,a;return r>=e&&r<=n?o=r:e>=r&&e<=s&&(o=e),n>=r&&n<=s?a=n:s>=e&&s<=n&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(t,e,n=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const r=new i,{start:s,end:a}=this;return null!=s&&(r.start=(0,o.S1)(s,t,e,n)),null!=a&&(r.end=(0,o.S1)(a,t,e,n)),r}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return p.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,n=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new i({start:e,end:n})}};(0,r._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],g.prototype,"end",void 0),(0,r._)([(0,l.w)("end")],g.prototype,"readEnd",null),(0,r._)([(0,c.K)("end")],g.prototype,"writeEnd",null),(0,r._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],g.prototype,"isAllTime",null),(0,r._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],g.prototype,"isEmpty",null),(0,r._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],g.prototype,"start",void 0),(0,r._)([(0,l.w)("start")],g.prototype,"readStart",null),(0,r._)([(0,c.K)("start")],g.prototype,"writeStart",null),g=i=(0,r._)([(0,u.$)("esri.time.TimeExtent")],g);const h=g,p=new g,f=new g({start:void 0,end:void 0})},92071:(t,e,n)=>{n.d(e,{P:()=>m,L:()=>_});var i=n(90237),r=n(69622),s=n(76953),o=n(4718),a=n(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(t){const e=new l,n=this._originStores[a.Gr.DEFAULTS];n&&n.forEach(((t,n)=>{e.set(n,(0,o.o8)(t),a.Gr.DEFAULTS)}));for(let n=a.Gr.SERVICE;n<a.AU;n++){const i=this._originStores[n];i&&i.forEach(((i,r)=>{t&&t.has(r)||e.set(r,(0,o.o8)(i),n)}))}return e}get(t,e){const n=void 0===e?this._values:this._originStores[e];return n?n.get(t):void 0}keys(t){const e=null==t?this._values:this._originStores[t];return e?[...e.keys()]:[]}set(t,e,n=a.Gr.USER){let i=this._originStores[n];if(i||(i=new Map,this._originStores[n]=i),i.set(t,e),!this._values.has(t)||this._propertyOriginMap.get(t)<=n){const i=this._values.get(t);return this._values.set(t,e),this._propertyOriginMap.set(t,n),i!==e}return!1}delete(t,e=a.Gr.USER){const n=this._originStores[e];if(!n)return;const i=n.get(t);if(n.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===e){this._values.delete(t);for(let n=e-1;n>=0;n--){const e=this._originStores[n];if(e&&e.has(t)){this._values.set(t,e.get(t)),this._propertyOriginMap.set(t,n);break}}}return i}has(t,e){const n=void 0===e?this._values:this._originStores[e];return!!n&&n.has(t)}revert(t,e){for(;e>0&&!this.has(t,e);)--e;const n=this._originStores[e],i=n?.get(t),r=this._values.get(t);return this._values.set(t,i),this._propertyOriginMap.set(t,e),r!==i}originOf(t){return this._propertyOriginMap.get(t)||a.Gr.DEFAULTS}isAtOrigin(t,e){return this.has(t,e)&&this.originOf(t)===e}isBelowOrigin(t,e){return!this.has(t)||this.originOf(t)<e}forEach(t){this._values.forEach(t)}}var u=n(45917),c=n(88620),d=n(40608);const g=t=>{let e=class extends t{constructor(...t){super(...t);const e=(0,c.oY)(this),n=e.store,i=new l;e.store=i,(0,s.k)(e,n,i)}read(t,e){(0,u.L)(this,t,e)}getAtOrigin(t,e){const n=h(this),i=(0,a.aB)(e);if("string"==typeof t)return n.get(t,i);const r={};return t.forEach((t=>{r[t]=n.get(t,i)})),r}originOf(t){return(0,a.OL)(this.originIdOf(t))}originIdOf(t){return h(this).originOf(t)}revert(t,e){const n=h(this),i=(0,a.aB)(e),r=(0,c.oY)(this);let s;s="string"==typeof t?"*"===t?n.keys(i):[t]:t,s.forEach((t=>{r.invalidate(t),n.revert(t,i),r.commit(t)}))}};return e=(0,i._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],e),e};function h(t){return(0,c.oY)(t).store}let p=class extends(g(r.A)){};p=(0,i._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],p);var f=n(16649),b=n(49422);const y=t=>{let e=class extends t{constructor(...t){super(...t)}clear(t,e="user"){(0,c.oY)(this).clearOrigin(t,(0,a.aB)(e))}write(t,e){return(0,b.M)(this,t=t||{},e),t}setAtOrigin(t,e,n){(0,c.oY)(this).setAtOrigin(t,e,(0,a.aB)(n))}removeOrigin(t){const e=v(this),n=(0,a.aB)(t),i=e.keys(n);for(const t of i)e.originOf(t)===n&&e.set(t,e.get(t,n),a.Gr.USER)}updateOrigin(t,e){const n=v(this),i=(0,a.aB)(e),r=(0,f.Jt)(this,t);for(let e=i+1;e<a.AU;++e)n.delete(t,e);n.set(t,r,i)}toJSON(t){return this.write({},t)}};return e=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],e),e.prototype.toJSON.isDefaultToJSON=!0,e};function v(t){return(0,c.oY)(t).store}const m=t=>{let e=class extends(y(g(t))){constructor(...t){super(...t)}};return e=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],e),e};let _=class extends(m(r.A)){};_=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],_)},97937:(t,e,n)=>{n.d(e,{a:()=>M,c:()=>b,e:()=>m,f:()=>A,g:()=>_,i:()=>E,o:()=>P,s:()=>U}),n(44208),n(53966);var i=n(34727),r=n(58083),s=n(38954),o=n(51850),a=n(87317),l=n(91829),u=n(34304),c=n(88582),d=n(71351);function g(t,e){const n=(0,s.l)(t),r=(0,i.YN)(t[2]/n),o=Math.atan2(t[1]/n,t[0]/n);return(0,s.i)(e,n,r,o),e}var h=n(44280),p=n(32114);const f=b();function b(){return(0,l.vt)()}const y=a.e,v=a.e;function m(t,e){return(0,a.c)(e,t)}function _(t){return t[3]}function M(t){return t}function A(t,e,n,i){return(0,l.fA)(t,e,n,i)}function w(t,e,n){if(null==e)return!1;if(!O(t,e,S))return!1;let{t0:i,t1:r}=S;if((i<0||r<i&&r>0)&&(i=r),i<0)return!1;if(n){const{origin:t,direction:r}=e;n[0]=t[0]+r[0]*i,n[1]=t[1]+r[1]*i,n[2]=t[2]+r[2]*i}return!0}const S={t0:0,t1:0};function O(t,e,n){const{origin:i,direction:r}=e,s=I;s[0]=i[0]-t[0],s[1]=i[1]-t[1],s[2]=i[2]-t[2];const o=r[0]*r[0]+r[1]*r[1]+r[2]*r[2];if(0===o)return!1;const a=2*(r[0]*s[0]+r[1]*s[1]+r[2]*s[2]),l=a*a-4*o*(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]-t[3]*t[3]);if(l<0)return!1;const u=Math.sqrt(l);return n.t0=(-a-u)/(2*o),n.t1=(-a+u)/(2*o),!0}const I=(0,o.vt)();function E(t,e){return w(t,e,null)}function T(t,e,n){const i=p.rq.get(),o=p.Rc.get();(0,s.e)(i,e.origin,e.direction);const a=_(t);(0,s.e)(n,i,e.origin),(0,s.h)(n,n,1/(0,s.l)(n)*a);const l=N(t,e.origin),u=(0,h.g7)(e.origin,n);return(0,r.$0)(o,u+l,i),(0,s.t)(n,n,o),n}function q(t,e,n){const i=(0,s.d)(p.rq.get(),e,t),r=(0,s.h)(p.rq.get(),i,t[3]/(0,s.l)(i));return(0,s.g)(n,r,t)}function N(t,e){const n=(0,s.d)(p.rq.get(),e,t),r=(0,s.l)(n),o=_(t),a=o+Math.abs(o-r);return(0,i.XM)(o/a)}const x=(0,o.vt)();function j(t,e,n,i){const r=(0,s.d)(x,e,t);switch(n){case c._.X:{const t=g(r,x)[2];return(0,s.i)(i,-Math.sin(t),Math.cos(t),0)}case c._.Y:{const t=g(r,x),e=t[1],n=t[2],o=Math.sin(e);return(0,s.i)(i,-o*Math.cos(n),-o*Math.sin(n),Math.cos(e))}case c._.Z:return(0,s.n)(i,r);default:return}}function L(t,e){const n=(0,s.d)(D,e,t);return(0,s.l)(n)-t[3]}function P(t,e){const n=(0,s.s)(t,e),i=_(t);return n<=i*i}const D=(0,o.vt)(),R=b(),U=Object.freeze(Object.defineProperty({__proto__:null,NullSphere:f,altitudeAt:L,angleToSilhouette:N,axisAt:j,cameraFrustumCoverage:function(t,e,n,i){const r=_(t),s=r*r,o=e+.5*Math.PI,a=n*n+s-2*Math.cos(o)*n*r,l=Math.sqrt(a),u=a-s;if(u<=0)return.5;const c=Math.sqrt(u),d=Math.acos(c/l)-Math.asin(r/(l/Math.sin(o)));return Math.min(1,(d+.5*i)/i)},clear:function(t){t[0]=t[1]=t[2]=t[3]=0},closestPoint:function(t,e,n){return w(t,e,n)?n:((0,d.oC)(e,t,n),q(t,n,n))},closestPointOnSilhouette:T,containsPoint:P,copy:m,create:b,distanceToSilhouette:function(t,e){const n=(0,s.d)(p.rq.get(),e,t),i=(0,s.k)(n),r=t[3]*t[3];return Math.sqrt(Math.abs(i-r))},elevate:function(t,e,n){return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=t[3]+e,n},equals:v,exactEquals:y,fromCenterAndRadius:function(t,e){return(0,l.fA)(t[0],t[1],t[2],e)},fromRadius:function(t,e){return t[0]=t[1]=t[2]=0,t[3]=e,t},fromValues:A,getCenter:M,getExtent:function(t,e){return e},getRadius:_,intersectLine:function(t,e,n){const i=(0,d.Cr)(e,n);if(!O(t,i,S))return[];const{origin:r,direction:a}=i,{t0:l,t1:c}=S,g=e=>{const n=(0,o.vt)();return(0,s.b)(n,r,a,e),q(t,n,n)};return Math.abs(l-c)<(0,u.FD)()?[g(l)]:[g(l),g(c)]},intersectRay:w,intersectRayClosestSilhouette:function(t,e,n){if(w(t,e,n))return n;const i=T(t,e,p.rq.get());return(0,s.g)(n,e.origin,(0,s.h)(p.rq.get(),e.direction,(0,s.j)(e.origin,i)/(0,s.l)(e.direction))),n},intersectsRay:E,projectPoint:q,setAltitudeAt:function(t,e,n,i){const r=L(t,e),o=j(t,e,c._.Z,D),a=(0,s.h)(D,o,n-r);return(0,s.g)(i,e,a)},setExtent:function(t,e,n){return t!==n&&m(t,n),n},tmpSphere:R,union:function(t,e,n=(0,l.vt)()){const i=(0,s.j)(t,e),r=t[3],o=e[3];return i+o<r?((0,a.c)(n,t),n):i+r<o?((0,a.c)(n,e),n):((0,s.m)(n,t,e,(i+o-r)/(2*i)),n[3]=(i+r+o)/2,n)},wrap:function(t){return t}},Symbol.toStringTag,{value:"Module"}))}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[7424,8256],{4146:(t,e,n)=>{n.d(e,{A:()=>_});var i=n(90237),r=n(78888),s=n(49186),o=n(65529),a=n(4902),l=n(92474),u=n(53966),c=n(74887),d=n(84952),g=n(10107),h=(n(44208),n(87811),n(40608)),p=n(5443),f=n(16930),b=n(92602),y=n(79677);let v=0,m=class extends(o.A.EventedMixin(a.A.IdentifiableMixin(l.A))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new p.A(-180,-90,180,90,f.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+v++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=f.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(t){const e="string"==typeof t?{url:t}:t;return(await n.e(7982).then(n.bind(n,27982))).fromUrl(e)}static fromPortalItem(t){return async function(t){const e="portalItem"in t?t:{portalItem:t},{fromItem:i}=await n.e(5613).then(n.bind(n,45613));try{return await i(e)}catch(t){const n=e?.portalItem,i=n?.id||"unset",r=n?.portal?.url||b.A.portalUrl;throw u.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+r+"', id: '"+i+"')",t),t}}(t)}initialize(){this.when().catch((t=>{(0,c.zf)(t)||u.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:t})}))}destroy(){const t=this.parent;if(t){const e=this;"layers"in t&&t.layers.includes(e)?t.layers.remove(e):"tables"in t&&t.tables.includes(e)?t.tables.remove(e):"baseLayers"in t&&t.baseLayers.includes(e)?t.baseLayers.remove(e):"referenceLayers"in t&&t.referenceLayers.includes(e)&&t.referenceLayers.remove(e),this._set("parent",null)}}get effectiveVisible(){let t=this.visible;const e=this.parent;return t&&e&&"effectiveVisible"in e&&(t&&=e.effectiveVisible),t}get hasAttributionData(){return null!=this.attributionDataUrl}get parsedUrl(){return(0,d.An)(this.url)}createLayerView(t,e){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const t=this.attributionDataUrl;if(this.hasAttributionData&&t)return(await(0,r.A)(t,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,i._)([(0,g.MZ)({type:String})],m.prototype,"attributionDataUrl",void 0),(0,i._)([(0,g.MZ)({readOnly:!0})],m.prototype,"effectiveVisible",null),(0,i._)([(0,g.MZ)({type:p.A})],m.prototype,"fullExtent",void 0),(0,i._)([(0,g.MZ)({readOnly:!0})],m.prototype,"hasAttributionData",null),(0,i._)([(0,g.MZ)({type:String,clonable:!1})],m.prototype,"id",void 0),(0,i._)([(0,g.MZ)({type:Boolean,nonNullable:!0})],m.prototype,"legendEnabled",void 0),(0,i._)([(0,g.MZ)({type:["show","hide","hide-children"]})],m.prototype,"listMode",void 0),(0,i._)([(0,g.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],m.prototype,"opacity",void 0),(0,i._)([(0,g.MZ)({clonable:!1})],m.prototype,"parent",void 0),(0,i._)([(0,g.MZ)({readOnly:!0})],m.prototype,"parsedUrl",null),(0,i._)([(0,g.MZ)({type:Boolean,readOnly:!0})],m.prototype,"persistenceEnabled",void 0),(0,i._)([(0,g.MZ)({type:Boolean})],m.prototype,"popupEnabled",void 0),(0,i._)([(0,g.MZ)({type:Boolean})],m.prototype,"attributionVisible",void 0),(0,i._)([(0,g.MZ)({type:f.A})],m.prototype,"spatialReference",void 0),(0,i._)([(0,g.MZ)({type:String})],m.prototype,"title",void 0),(0,i._)([(0,g.MZ)({readOnly:!0,json:{read:!1}})],m.prototype,"type",void 0),(0,i._)([(0,g.MZ)()],m.prototype,"url",void 0),(0,i._)([(0,g.MZ)({type:y.A})],m.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,g.MZ)({type:Boolean,nonNullable:!0})],m.prototype,"visible",void 0),m=(0,i._)([(0,h.$)("esri.layers.Layer")],m);const _=m},4341:(t,e,n)=>{n.d(e,{I:()=>r});var i=n(26390);class r{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,i.d)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*s);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,s));t++)this._items.push(this._allocator())}}const s=1024},4902:(t,e,n)=>{n.d(e,{A:()=>c});var i=n(90237),r=n(40608);let s=0;const o=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return e=(0,i._)([(0,r.$)("esri.core.Identifiable")],e),e},a=t=>{let e=class extends t{constructor(...t){super(...t),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:s++})}};return e=(0,i._)([(0,r.$)("esri.core.Identifiable.NumericIdentifiable")],e),e};let l=class extends(o(class{})){};var u;l=(0,i._)([(0,r.$)("esri.core.Identifiable")],l),(u=l||(l={})).IdentifiableMixin=o,u.NumericIdentifiableMixin=a;const c=l},11964:(t,e,n)=>{n.d(e,{Cr:()=>u,H6:()=>g,_I:()=>d,kb:()=>c,vt:()=>l});var i=n(34727),r=n(4341),s=n(38954),o=n(51850),a=n(32114);function l(t){return t?{origin:(0,o.o8)(t.origin),vector:(0,o.o8)(t.vector)}:{origin:(0,o.vt)(),vector:(0,o.vt)()}}function u(t,e,n=l()){return(0,s.c)(n.origin,t),(0,s.d)(n.vector,e,t),n}function c(t,e){const n=(0,s.d)(a.rq.get(),e,t.origin),r=(0,s.f)(t.vector,n),o=(0,s.f)(t.vector,t.vector),l=(0,i.qE)(r/o,0,1),u=(0,s.d)(a.rq.get(),(0,s.h)(a.rq.get(),t.vector,l),n);return(0,s.f)(u,u)}function d(t,e,n){return g(t,e,0,1,n)}function g(t,e,n,r,o){const{vector:l,origin:u}=t,c=(0,s.d)(a.rq.get(),e,u),d=(0,s.f)(l,c)/(0,s.k)(l);return(0,s.h)(o,l,(0,i.qE)(d,n,r)),(0,s.g)(o,o,t.origin)}(0,o.vt)(),(0,o.vt)(),new r.I((()=>l()))},17352:(t,e,n)=>{n.d(e,{b:()=>B,f:()=>_}),n(44208);var i=n(53966),r=n(34727),s=n(4341),o=n(58083),a=n(9093),l=n(38954),u=n(51850),c=n(19419),d=n(88582),g=n(11964),h=n(240),p=n(71351),f=n(44280),b=n(32114);const y=()=>i.A.getLogger("esri.views.3d.support.geometryUtils.boundedPlane");function v(t=R){return{plane:(0,h.vt)(t.plane),origin:(0,u.o8)(t.origin),basis1:(0,u.o8)(t.basis1),basis2:(0,u.o8)(t.basis2)}}function m(t,e=v()){return _(t.origin,t.basis1,t.basis2,e)}function _(t,e,n,i=v()){return(0,l.c)(i.origin,t),(0,l.c)(i.basis1,e),(0,l.c)(i.basis2,n),M(i),function(t,e){Math.abs((0,l.f)(t.basis1,t.basis2)/((0,l.l)(t.basis1)*(0,l.l)(t.basis2)))>1e-6&&y().warn(e,"Provided basis vectors are not perpendicular"),Math.abs((0,l.f)(t.basis1,x(t)))>1e-6&&y().warn(e,"Basis vectors and plane normal are not perpendicular"),Math.abs(-(0,l.f)(x(t),t.origin)-t.plane[3])>1e-6&&y().warn(e,"Plane offset is not consistent with plane origin")}(i,"fromValues()"),i}function M(t){(0,h.mR)(t.basis2,t.basis1,t.origin,t.plane)}function A(t,e,n){t!==n&&m(t,n);const i=(0,l.h)(b.rq.get(),x(t),e);return(0,l.g)(n.origin,n.origin,i),n.plane[3]-=e,n}function w(t,e=v()){const n=(t[2]-t[0])/2,i=(t[3]-t[1])/2;return(0,l.i)(e.origin,t[0]+n,t[1]+i,0),(0,l.i)(e.basis1,n,0,0),(0,l.i)(e.basis2,0,i,0),(0,h.fA)(0,0,1,0,e.plane),e}function S(t,e,n){return!!(0,h.Ui)(t.plane,e,n)&&j(t,n)}function O(t,e,n){const i=U.get();D(t,e,i,U.get());let s=Number.POSITIVE_INFINITY;for(const o of k){const a=P(t,o,Z.get()),u=b.rq.get();if((0,h.T7)(i,a,u)){const t=(0,l.o)(b.rq.get(),e.origin,u),i=Math.abs((0,r.XM)((0,l.f)(e.direction,t)));i<s&&(s=i,(0,l.c)(n,u))}}return s===Number.POSITIVE_INFINITY?I(t,e,n):n}function I(t,e,n){if(S(t,e,n))return n;const i=U.get(),r=U.get();D(t,e,i,r);let s=Number.POSITIVE_INFINITY;for(const o of k){const a=P(t,o,Z.get()),u=b.rq.get();if((0,h.gv)(i,a,u)){const t=(0,p.kb)(e,u);if(!(0,h.Tj)(r,u))continue;t<s&&(s=t,(0,l.c)(n,u))}}return q(t,e.origin)<s&&E(t,e.origin,n),n}function E(t,e,n){const i=(0,h._I)(t.plane,e,b.rq.get()),r=(0,g.H6)(L(t,t.basis1),i,-1,1,b.rq.get()),s=(0,g.H6)(L(t,t.basis2),i,-1,1,b.rq.get());return(0,l.d)(n,(0,l.g)(b.rq.get(),r,s),t.origin),n}function T(t,e,n){const{origin:i,basis1:r,basis2:s}=t,o=(0,l.d)(b.rq.get(),e,i),a=(0,f.gr)(r,o),u=(0,f.gr)(s,o),c=(0,f.gr)(x(t),o);return(0,l.i)(n,a,u,c)}function q(t,e){const n=T(t,e,b.rq.get()),{basis1:i,basis2:r}=t,s=(0,l.l)(i),o=(0,l.l)(r),a=Math.max(Math.abs(n[0])-s,0),u=Math.max(Math.abs(n[1])-o,0),c=n[2];return a*a+u*u+c*c}function N(t,e){const n=-t.plane[3];return(0,f.gr)(x(t),e)-n}function x(t){return(0,h.Qj)(t.plane)}function j(t,e){const n=(0,l.d)(b.rq.get(),e,t.origin),i=(0,l.k)(t.basis1),r=(0,l.k)(t.basis2),s=(0,l.f)(t.basis1,n),o=(0,l.f)(t.basis2,n);return-s-i<0&&s-i<0&&-o-r<0&&o-r<0}function L(t,e){const n=Z.get();return(0,l.c)(n.origin,t.origin),(0,l.c)(n.vector,e),n}function P(t,e,n){const{basis1:i,basis2:r,origin:s}=t,o=(0,l.h)(b.rq.get(),i,e.origin[0]),a=(0,l.h)(b.rq.get(),r,e.origin[1]);(0,l.g)(n.origin,o,a),(0,l.g)(n.origin,n.origin,s);const u=(0,l.h)(b.rq.get(),i,e.direction[0]),c=(0,l.h)(b.rq.get(),r,e.direction[1]);return(0,l.h)(n.vector,(0,l.g)(u,u,c),2),n}function D(t,e,n,i){const r=x(t);(0,h.mR)(r,e.direction,e.origin,n),(0,h.mR)((0,h.Qj)(n),r,e.origin,i)}const R={plane:(0,h.vt)(),origin:(0,u.fA)(0,0,0),basis1:(0,u.fA)(1,0,0),basis2:(0,u.fA)(0,1,0)},U=new s.I(h.vt),Z=new s.I(g.vt),C=(0,u.vt)(),V=new s.I((()=>v())),k=[{origin:[-1,-1],direction:[1,0]},{origin:[1,-1],direction:[0,1]},{origin:[1,1],direction:[-1,0]},{origin:[-1,1],direction:[0,-1]}],$=(0,a.vt)(),F=(0,a.vt)(),B=Object.freeze(Object.defineProperty({__proto__:null,BoundedPlaneClass:class{constructor(){this.plane=(0,h.vt)(),this.origin=(0,u.vt)(),this.basis1=(0,u.vt)(),this.basis2=(0,u.vt)()}},altitudeAt:N,axisAt:function(t,e,n,i){return function(t,e,n){switch(e){case d._.X:(0,l.c)(n,t.basis1),(0,l.n)(n,n);break;case d._.Y:(0,l.c)(n,t.basis2),(0,l.n)(n,n);break;case d._.Z:(0,l.c)(n,x(t))}return n}(t,n,i)},cameraFrustumCoverage:function(t,e){return(e-t)/e},closestPoint:I,closestPointOnSilhouette:O,copy:m,copyWithoutVerify:function(t,e){(0,l.c)(e.origin,t.origin),(0,l.c)(e.basis1,t.basis1),(0,l.c)(e.basis2,t.basis2),(0,h.C)(e.plane,t.plane)},create:v,distance:function(t,e){return Math.sqrt(q(t,e))},distance2:q,distanceToSilhouette:function(t,e){let n=Number.NEGATIVE_INFINITY;for(const i of k){const r=P(t,i,Z.get()),s=(0,g.kb)(r,e);s>n&&(n=s)}return Math.sqrt(n)},elevate:A,equals:function(t,e){return(0,l.p)(t.basis1,e.basis1)&&(0,l.p)(t.basis2,e.basis2)&&(0,l.p)(t.origin,e.origin)},extrusionContainsPoint:function(t,e){return(0,h.Tj)(t.plane,e)&&j(t,e)},fromAABoundingRect:w,fromValues:_,getExtent:function(t,e){const n=t.basis1[0],i=t.basis2[1],[r,s]=t.origin;return(0,c.fA)(r-n,s-i,r+n,s+i,e)},intersectRay:S,intersectRayClosestSilhouette:function(t,e,n){if(S(t,e,n))return n;const i=O(t,e,b.rq.get());return(0,l.g)(n,e.origin,(0,l.h)(b.rq.get(),e.direction,(0,l.j)(e.origin,i)/(0,l.l)(e.direction))),n},normal:x,projectPoint:E,projectPointLocal:T,rotate:function(t,e,n,i){return t!==i&&m(t,i),(0,o.$0)(F,e,n),(0,l.t)(i.basis1,t.basis1,F),(0,l.t)(i.basis2,t.basis2,F),M(i),i},setAltitudeAt:function(t,e,n,i){const r=N(t,e),s=(0,l.h)(C,x(t),n-r);return(0,l.g)(i,e,s),i},setExtent:function(t,e,n){return w(e,n),A(n,N(t,t.origin),n),n},transform:function(t,e,n){return t!==n&&m(t,n),(0,o.B8)($,e),(0,o.mg)($,$),(0,l.t)(n.basis1,t.basis1,$),(0,l.t)(n.basis2,t.basis2,$),(0,l.t)((0,h.Qj)(n.plane),(0,h.Qj)(t.plane),$),(0,l.t)(n.origin,t.origin,e),(0,h.mP)(n.plane,n.plane,n.origin),n},up:R,updateUnboundedPlane:M,wrap:function(t,e,n){const i=V.get();return i.origin=t,i.basis1=e,i.basis2=n,i.plane=(0,h.LV)(0,0,0,0),M(i),i}},Symbol.toStringTag,{value:"Module"}))},62885:(t,e,n)=>{n.d(e,{H:()=>s,V:()=>r});var i=n(5503);function r(t,e,n=i.A){return e||(e=new n),e===t||(e.removeAll(),(r=t)&&(Array.isArray(r)||"items"in r&&Array.isArray(r.items))?e.addMany(t):t&&e.add(t)),e;var r}function s(t){return t}},65176:(t,e,n)=>{n.d(e,{xH:()=>l,N1:()=>c}),n(38954);var i,r,s,o=n(51850),a=n(71351);function l(t,e){return u(t)===u(e)}function u(t){if(null==t)return null;const e=null!=t.layer?t.layer.id:"";let n=null;return n=null!=t.objectId?t.objectId:null!=t.layer&&"objectIdField"in t.layer&&null!=t.layer.objectIdField&&null!=t.attributes?t.attributes[t.layer.objectIdField]:t.uid,null==n?null:`o-${e}-${n}`}(s=i||(i={}))[s.OBJECT=0]="OBJECT",s[s.HUD=1]="HUD",s[s.TERRAIN=2]="TERRAIN",s[s.OVERLAY=3]="OVERLAY",s[s.I3S=4]="I3S",s[s.PCL=5]="PCL",s[s.LOD=6]="LOD",s[s.VOXEL=7]="VOXEL",s[s.TILES3D=8]="TILES3D",function(t){t[t.MIN=0]="MIN",t[t.MINMAX=1]="MINMAX",t[t.ALL=2]="ALL"}(r||(r={})),n(58083),n(70328),n(97937),n(17352),(0,o.vt)(),(0,o.vt)();const c={json:{write:{writer:function(t,e){null!=t?.layer?.objectIdField&&null!=t.attributes&&(e.feature={layerId:t.layer.id,objectId:t.attributes[t.layer.objectIdField]})},target:{"feature.layerId":{type:[Number,String],isRequired:!0},"feature.objectId":{type:[Number,String],isRequired:!0}}},origins:{"web-scene":{read:function(t){if(null!=t.layerId&&null!=t.objectId)return{uid:null,layer:{id:t.layerId,objectIdField:"ObjectId"},attributes:{ObjectId:t.objectId}}}}}}};(0,a.vt)(),(0,o.vt)()},69540:(t,e,n)=>{n.d(e,{A:()=>g});var i=n(90237),r=n(69622),s=(n(44208),n(4718)),o=(n(53966),n(97768)),a=n(35666),l=n(88620),u=n(40608);const c=t=>{let e=class extends t{clone(){const t=(0,l.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const e=t.metadata,n=t.store,i={},r=new Map;for(const t in e){const o=e[t],l=n?.originOf(t),u=o.clonable;if(o.readOnly||!1===u||l!==a.Gr.USER&&l!==a.Gr.DEFAULTS&&l!==a.Gr.WEB_MAP&&l!==a.Gr.WEB_SCENE)continue;const c=this[t];let d=null;d="function"==typeof u?u(c):"reference"===u?c:(0,s.TU)(c),null!=c&&null==d||(l===a.Gr.DEFAULTS?r.set(t,d):i[t]=d)}const u=new(0,Object.getPrototypeOf(this).constructor)(i);if(r.size){const t=(0,l.oY)(u)?.store;if(t)for(const[e,n]of r)t.set(e,n,a.Gr.DEFAULTS)}return u}};return e=(0,i._)([(0,u.$)("esri.core.Clonable")],e),e};let d=class extends(c(r.A)){};d=(0,i._)([(0,u.$)("esri.core.Clonable")],d),(d||(d={})).ClonableMixin=c;const g=d},71351:(t,e,n)=>{n.d(e,{Cr:()=>d,LV:()=>c,kb:()=>g,oC:()=>h,vt:()=>l}),n(4576);var i=n(4341),r=(n(77690),n(29242)),s=n(38954),o=n(51850),a=n(32114);function l(t){return t?u((0,o.o8)(t.origin),(0,o.o8)(t.direction)):u((0,o.vt)(),(0,o.vt)())}function u(t,e){return{origin:t,direction:e}}function c(t,e){const n=p.get();return n.origin=t,n.direction=e,n}function d(t,e,n=l()){return(0,s.c)(n.origin,t),(0,s.d)(n.direction,e,t),n}function g(t,e){const n=(0,s.e)(a.rq.get(),(0,s.n)(a.rq.get(),t.direction),(0,s.d)(a.rq.get(),e,t.origin));return(0,s.f)(n,n)}function h(t,e,n){const i=(0,s.f)(t.direction,(0,s.d)(n,e,t.origin));return(0,s.g)(n,t.origin,(0,s.h)(n,t.direction,i)),n}const p=new i.I((()=>l()));(0,o.vt)(),(0,o.vt)(),(0,o.vt)(),(0,r.vt)()},78553:(t,e,n)=>{n.d(e,{D:()=>s,p:()=>r});var i=n(56507);function r(t){const e=(0,i.Vr)(100*(1-t));return Math.max(0,Math.min(e,100))}function s(t){const e=1-t/100;return Math.max(0,Math.min(e,1))}},79608:(t,e,n)=>{n.d(e,{A:()=>p});var i=n(90237),r=n(69540),s=n(10107),o=(n(44208),n(53966),n(87811),n(40608));let a=class extends r.A{constructor(t){super(t),this.type="web-scene"}equals(t){return this.type===t.type}};(0,i._)([(0,s.MZ)()],a.prototype,"type",void 0),a=(0,i._)([(0,o.$)("esri.analysis.support.AnalysisOriginWebScene")],a);const l=a;var u=n(69622),c=n(4902),d=n(25482);let g=0,h=class extends(d.A.JSONSupportMixin(r.A.ClonableMixin(c.A.IdentifiableMixin(u.A)))){constructor(t){super(t),this.id=`${Date.now().toString(16)}-analysis-${g++}`,this.origin=null}get parent(){return this._get("parent")}set parent(t){const e=this.parent;if(null!=e)switch(e.type){case"line-of-sight":case"dimension":case"viewshed":e.releaseAnalysis(this);break;case"2d":case"3d":e.analyses.includes(this)&&e.analyses.remove(this)}this._set("parent",t)}};(0,i._)([(0,s.MZ)({type:String,constructOnly:!0,clonable:!1})],h.prototype,"id",void 0),(0,i._)([(0,s.MZ)({clonable:!1,value:null})],h.prototype,"parent",null),(0,i._)([(0,s.MZ)({types:{key:"type",base:null,typeMap:{"web-scene":l}}})],h.prototype,"origin",void 0),h=(0,i._)([(0,o.$)("esri.analysis.Analysis")],h);const p=h},79677:(t,e,n)=>{n.d(e,{A:()=>h});var i,r=n(90237),s=n(25482),o=n(88930),a=n(10107),l=(n(44208),n(53966),n(87811),n(36005)),u=n(40608),c=n(43937),d=n(98623);let g=class extends s.A{static{i=this}static get allTime(){return p}static get empty(){return f}static fromArray(t){return new i({start:null!=t[0]?new Date(t[0]):t[0],end:null!=t[1]?new Date(t[1]):t[1]})}constructor(t){super(t),this.end=null,this.start=null}readEnd(t,e){return null!=e.end?new Date(e.end):null}writeEnd(t,e){e.end=t?.getTime()??null}get isAllTime(){return this.equals(i.allTime)}get isEmpty(){return this.equals(i.empty)}readStart(t,e){return null!=e.start?new Date(e.start):null}writeStart(t,e){e.start=t?.getTime()??null}clone(){return new i({end:this.end,start:this.start})}equals(t){if(!t)return!1;const e=this.start?.getTime()??this.start,n=this.end?.getTime()??this.end,i=t.start?.getTime()??t.start,r=t.end?.getTime()??t.end;return e===i&&n===r}expandTo(t,e=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();let n=this.start;n&&(n=(0,o.lL)(n,t,e));let r=this.end;if(r){const n=(0,o.lL)(r,t,e);r=r.getTime()===n.getTime()?n:(0,o.S1)(n,1,t,e)}return new i({start:n,end:r})}intersection(t){if(!t)return this.clone();if(this.isEmpty||t.isEmpty)return i.empty;if(this.isAllTime)return t.clone();if(t.isAllTime)return this.clone();const e=this.start?.getTime()??-1/0,n=this.end?.getTime()??1/0,r=t.start?.getTime()??-1/0,s=t.end?.getTime()??1/0;let o,a;return r>=e&&r<=n?o=r:e>=r&&e<=s&&(o=e),n>=r&&n<=s?a=n:s>=e&&s<=n&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?i.empty:new i({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(t,e,n=d.qU){if(this.isEmpty||this.isAllTime)return this.clone();const r=new i,{start:s,end:a}=this;return null!=s&&(r.start=(0,o.S1)(s,t,e,n)),null!=a&&(r.end=(0,o.S1)(a,t,e,n)),r}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(t){if(!t||t.isEmpty)return this.clone();if(this.isEmpty)return t.clone();if(this.isAllTime||t.isAllTime)return p.clone();const e=null!=this.start&&null!=t.start?new Date(Math.min(this.start.getTime(),t.start.getTime())):null,n=null!=this.end&&null!=t.end?new Date(Math.max(this.end.getTime(),t.end.getTime())):null;return new i({start:e,end:n})}};(0,r._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],g.prototype,"end",void 0),(0,r._)([(0,l.w)("end")],g.prototype,"readEnd",null),(0,r._)([(0,c.K)("end")],g.prototype,"writeEnd",null),(0,r._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],g.prototype,"isAllTime",null),(0,r._)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],g.prototype,"isEmpty",null),(0,r._)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],g.prototype,"start",void 0),(0,r._)([(0,l.w)("start")],g.prototype,"readStart",null),(0,r._)([(0,c.K)("start")],g.prototype,"writeStart",null),g=i=(0,r._)([(0,u.$)("esri.time.TimeExtent")],g);const h=g,p=new g,f=new g({start:void 0,end:void 0})},92071:(t,e,n)=>{n.d(e,{P:()=>m,L:()=>_});var i=n(90237),r=n(69622),s=n(76953),o=n(4718),a=n(35666);class l{constructor(){this._propertyOriginMap=new Map,this._originStores=new Array(a.AU),this._values=new Map,this.multipleOriginsSupported=!0}clone(t){const e=new l,n=this._originStores[a.Gr.DEFAULTS];n&&n.forEach(((t,n)=>{e.set(n,(0,o.o8)(t),a.Gr.DEFAULTS)}));for(let n=a.Gr.SERVICE;n<a.AU;n++){const i=this._originStores[n];i&&i.forEach(((i,r)=>{t&&t.has(r)||e.set(r,(0,o.o8)(i),n)}))}return e}get(t,e){const n=void 0===e?this._values:this._originStores[e];return n?n.get(t):void 0}keys(t){const e=null==t?this._values:this._originStores[t];return e?[...e.keys()]:[]}set(t,e,n=a.Gr.USER){let i=this._originStores[n];if(i||(i=new Map,this._originStores[n]=i),i.set(t,e),!this._values.has(t)||this._propertyOriginMap.get(t)<=n){const i=this._values.get(t);return this._values.set(t,e),this._propertyOriginMap.set(t,n),i!==e}return!1}delete(t,e=a.Gr.USER){const n=this._originStores[e];if(!n)return;const i=n.get(t);if(n.delete(t),this._values.has(t)&&this._propertyOriginMap.get(t)===e){this._values.delete(t);for(let n=e-1;n>=0;n--){const e=this._originStores[n];if(e&&e.has(t)){this._values.set(t,e.get(t)),this._propertyOriginMap.set(t,n);break}}}return i}has(t,e){const n=void 0===e?this._values:this._originStores[e];return!!n&&n.has(t)}revert(t,e){for(;e>0&&!this.has(t,e);)--e;const n=this._originStores[e],i=n?.get(t),r=this._values.get(t);return this._values.set(t,i),this._propertyOriginMap.set(t,e),r!==i}originOf(t){return this._propertyOriginMap.get(t)||a.Gr.DEFAULTS}isAtOrigin(t,e){return this.has(t,e)&&this.originOf(t)===e}isBelowOrigin(t,e){return!this.has(t)||this.originOf(t)<e}forEach(t){this._values.forEach(t)}}var u=n(45917),c=n(88620),d=n(40608);const g=t=>{let e=class extends t{constructor(...t){super(...t);const e=(0,c.oY)(this),n=e.store,i=new l;e.store=i,(0,s.k)(e,n,i)}read(t,e){(0,u.L)(this,t,e)}getAtOrigin(t,e){const n=h(this),i=(0,a.aB)(e);if("string"==typeof t)return n.get(t,i);const r={};return t.forEach((t=>{r[t]=n.get(t,i)})),r}originOf(t){return(0,a.OL)(this.originIdOf(t))}originIdOf(t){return h(this).originOf(t)}revert(t,e){const n=h(this),i=(0,a.aB)(e),r=(0,c.oY)(this);let s;s="string"==typeof t?"*"===t?n.keys(i):[t]:t,s.forEach((t=>{r.invalidate(t),n.revert(t,i),r.commit(t)}))}};return e=(0,i._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],e),e};function h(t){return(0,c.oY)(t).store}let p=class extends(g(r.A)){};p=(0,i._)([(0,d.$)("esri.core.ReadOnlyMultiOriginJSONSupport")],p);var f=n(16649),b=n(49422);const y=t=>{let e=class extends t{constructor(...t){super(...t)}clear(t,e="user"){(0,c.oY)(this).clearOrigin(t,(0,a.aB)(e))}write(t,e){return(0,b.M)(this,t=t||{},e),t}setAtOrigin(t,e,n){(0,c.oY)(this).setAtOrigin(t,e,(0,a.aB)(n))}removeOrigin(t){const e=v(this),n=(0,a.aB)(t),i=e.keys(n);for(const t of i)e.originOf(t)===n&&e.set(t,e.get(t,n),a.Gr.USER)}updateOrigin(t,e){const n=v(this),i=(0,a.aB)(e),r=(0,f.Jt)(this,t);for(let e=i+1;e<a.AU;++e)n.delete(t,e);n.set(t,r,i)}toJSON(t){return this.write({},t)}};return e=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport.WriteableMultiOriginJSONSupport")],e),e.prototype.toJSON.isDefaultToJSON=!0,e};function v(t){return(0,c.oY)(t).store}const m=t=>{let e=class extends(y(g(t))){constructor(...t){super(...t)}};return e=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],e),e};let _=class extends(m(r.A)){};_=(0,i._)([(0,d.$)("esri.core.MultiOriginJSONSupport")],_)},97937:(t,e,n)=>{n.d(e,{a:()=>M,c:()=>b,e:()=>m,f:()=>A,g:()=>_,i:()=>E,o:()=>P,s:()=>U}),n(44208),n(53966);var i=n(34727),r=n(58083),s=n(38954),o=n(51850),a=n(87317),l=n(91829),u=n(34304),c=n(88582),d=n(71351);function g(t,e){const n=(0,s.l)(t),r=(0,i.YN)(t[2]/n),o=Math.atan2(t[1]/n,t[0]/n);return(0,s.i)(e,n,r,o),e}var h=n(44280),p=n(32114);const f=b();function b(){return(0,l.vt)()}const y=a.e,v=a.e;function m(t,e){return(0,a.c)(e,t)}function _(t){return t[3]}function M(t){return t}function A(t,e,n,i){return(0,l.fA)(t,e,n,i)}function w(t,e,n){if(null==e)return!1;if(!O(t,e,S))return!1;let{t0:i,t1:r}=S;if((i<0||r<i&&r>0)&&(i=r),i<0)return!1;if(n){const{origin:t,direction:r}=e;n[0]=t[0]+r[0]*i,n[1]=t[1]+r[1]*i,n[2]=t[2]+r[2]*i}return!0}const S={t0:0,t1:0};function O(t,e,n){const{origin:i,direction:r}=e,s=I;s[0]=i[0]-t[0],s[1]=i[1]-t[1],s[2]=i[2]-t[2];const o=r[0]*r[0]+r[1]*r[1]+r[2]*r[2];if(0===o)return!1;const a=2*(r[0]*s[0]+r[1]*s[1]+r[2]*s[2]),l=a*a-4*o*(s[0]*s[0]+s[1]*s[1]+s[2]*s[2]-t[3]*t[3]);if(l<0)return!1;const u=Math.sqrt(l);return n.t0=(-a-u)/(2*o),n.t1=(-a+u)/(2*o),!0}const I=(0,o.vt)();function E(t,e){return w(t,e,null)}function T(t,e,n){const i=p.rq.get(),o=p.Rc.get();(0,s.e)(i,e.origin,e.direction);const a=_(t);(0,s.e)(n,i,e.origin),(0,s.h)(n,n,1/(0,s.l)(n)*a);const l=N(t,e.origin),u=(0,h.g7)(e.origin,n);return(0,r.$0)(o,u+l,i),(0,s.t)(n,n,o),n}function q(t,e,n){const i=(0,s.d)(p.rq.get(),e,t),r=(0,s.h)(p.rq.get(),i,t[3]/(0,s.l)(i));return(0,s.g)(n,r,t)}function N(t,e){const n=(0,s.d)(p.rq.get(),e,t),r=(0,s.l)(n),o=_(t),a=o+Math.abs(o-r);return(0,i.XM)(o/a)}const x=(0,o.vt)();function j(t,e,n,i){const r=(0,s.d)(x,e,t);switch(n){case c._.X:{const t=g(r,x)[2];return(0,s.i)(i,-Math.sin(t),Math.cos(t),0)}case c._.Y:{const t=g(r,x),e=t[1],n=t[2],o=Math.sin(e);return(0,s.i)(i,-o*Math.cos(n),-o*Math.sin(n),Math.cos(e))}case c._.Z:return(0,s.n)(i,r);default:return}}function L(t,e){const n=(0,s.d)(D,e,t);return(0,s.l)(n)-t[3]}function P(t,e){const n=(0,s.s)(t,e),i=_(t);return n<=i*i}const D=(0,o.vt)(),R=b(),U=Object.freeze(Object.defineProperty({__proto__:null,NullSphere:f,altitudeAt:L,angleToSilhouette:N,axisAt:j,cameraFrustumCoverage:function(t,e,n,i){const r=_(t),s=r*r,o=e+.5*Math.PI,a=n*n+s-2*Math.cos(o)*n*r,l=Math.sqrt(a),u=a-s;if(u<=0)return.5;const c=Math.sqrt(u),d=Math.acos(c/l)-Math.asin(r/(l/Math.sin(o)));return Math.min(1,(d+.5*i)/i)},clear:function(t){t[0]=t[1]=t[2]=t[3]=0},closestPoint:function(t,e,n){return w(t,e,n)?n:((0,d.oC)(e,t,n),q(t,n,n))},closestPointOnSilhouette:T,containsPoint:P,copy:m,create:b,distanceToSilhouette:function(t,e){const n=(0,s.d)(p.rq.get(),e,t),i=(0,s.k)(n),r=t[3]*t[3];return Math.sqrt(Math.abs(i-r))},elevate:function(t,e,n){return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=t[3]+e,n},equals:v,exactEquals:y,fromCenterAndRadius:function(t,e){return(0,l.fA)(t[0],t[1],t[2],e)},fromRadius:function(t,e){return t[0]=t[1]=t[2]=0,t[3]=e,t},fromValues:A,getCenter:M,getExtent:function(t,e){return e},getRadius:_,intersectLine:function(t,e,n){const i=(0,d.Cr)(e,n);if(!O(t,i,S))return[];const{origin:r,direction:a}=i,{t0:l,t1:c}=S,g=e=>{const n=(0,o.vt)();return(0,s.b)(n,r,a,e),q(t,n,n)};return Math.abs(l-c)<(0,u.FD)()?[g(l)]:[g(l),g(c)]},intersectRay:w,intersectRayClosestSilhouette:function(t,e,n){if(w(t,e,n))return n;const i=T(t,e,p.rq.get());return(0,s.g)(n,e.origin,(0,s.h)(p.rq.get(),e.direction,(0,s.j)(e.origin,i)/(0,s.l)(e.direction))),n},intersectsRay:E,projectPoint:q,setAltitudeAt:function(t,e,n,i){const r=L(t,e),o=j(t,e,c._.Z,D),a=(0,s.h)(D,o,n-r);return(0,s.g)(i,e,a)},setExtent:function(t,e,n){return t!==n&&m(t,n),n},tmpSphere:R,union:function(t,e,n=(0,l.vt)()){const i=(0,s.j)(t,e),r=t[3],o=e[3];return i+o<r?((0,a.c)(n,t),n):i+r<o?((0,a.c)(n,e),n):((0,s.m)(n,t,e,(i+o-r)/(2*i)),n[3]=(i+r+o)/2,n)},wrap:function(t){return t}},Symbol.toStringTag,{value:"Module"}))}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8692],{8303:(e,t,i)=>{i.d(t,{A:()=>v});var s=i(90237),a=i(92602),r=i(70333),n=i(78888),o=i(60999),l=i(49186),d=i(53966),h=i(97768),p=i(74887),u=i(84952),y=i(10107),c=(i(44208),i(87811),i(36005)),f=i(40608),g=i(43937),m=i(77548),_=i(20655),w=i(80812),M=i(41318),b=i(10407);const v=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new w.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:s}=await i.e(1204).then(i.bind(i,41204));return(0,p.Te)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||d.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.QP)(e),!0))))}async setUserPrivileges(e,t){if(!a.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:s},content:{updateItem:a}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",a)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=!r.id?.findCredential(this.url),a=e===i.id;if(a&&i.portal.user)return this._getUserPrivileges(i,s);let n,o;if(a)n=i.portal.url;else try{n=await(0,m.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!n||!(0,u.b8)(n,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(r.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,d=!1,h=!1;if(!o)return{features:{edit:l,fullEdit:d},content:{updateItem:h}};try{if(a?await i.reload():(i=new w.default({id:e,portal:{url:n}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,s)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:d},content:{updateItem:h}}}_getUserPrivileges(e,t){const i=(0,b.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?r.id?.findCredential(this.url):null;if(!t)return!0;const i=T.credential===t?T.user:await this._fetchEditingUser(e);return T.credential=t,T.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=r.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const s=`${i.owningSystemUrl}/sharing/rest`,a=_.A.getDefault();if(a&&a.loaded&&(0,u.S8)(a.restUrl)===(0,u.S8)(s))return a.user;const l=`${s}/community/self`,d=null!=e?e.signal:null,h=await(0,o.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return h.ok?M.A.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,s=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return i&&s&&!(0,u.ut)(s.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,y.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,s._)([(0,c.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,y.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},T={credential:null,user:null}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var s=i(90237),a=i(53966),r=i(10107),n=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{let t=class extends e{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,a.A.getLogger(this)))}};return(0,s._)([(0,r.MZ)()],t.prototype,"title",null),(0,s._)([(0,r.MZ)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,n.$)("esri.layers.mixins.ArcGISService")],t),t}},28692:(e,t,i)=>{i.r(t),i.d(t,{default:()=>G});var s=i(90237),a=i(67996),r=i(5503),n=i(49186),o=i(53966),l=i(91869),d=i(92071),h=i(74887),p=i(36708),u=i(84952),y=i(13069),c=i(10107),f=(i(44208),i(87811),i(36005)),g=i(40608),m=i(43937),_=i(35666),w=i(4146),M=i(80340),b=i(70643),v=i(85342),T=i(18768),I=i(63074),P=i(69208),S=i(16131),A=i(8303),D=i(54310),L=i(25036),E=i(10873),U=i(88613),k=i(97159);let C=class extends((0,I.dM)((0,L.j)((0,D.J)((0,T.b)((0,S.q)((0,A.A)((0,d.P)((0,P.d)(w.A))))))))){constructor(e){super(e),this._graphTypeLookup=new Map,this._namedTypesModified=!1,this.dataManager=null,this.definitionSetMap=null,this.knowledgeGraph=null,this.layers=new(r.A.ofType(b.A)),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="KnowledgeGraphLayer",this.sublayerIdsCache=new Map,this.tables=new(r.A.ofType(b.A)),this.type="knowledge-graph",this.url=null,this.addHandles((0,p.wB)((()=>this.layers.concat(this.tables)),((e,t)=>this._handleSublayersChange(e,t)),p.OH))}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){try{await this.loadFromPortal({supportedTypes:["Knowledge Graph Layer"]},e)}catch(e){(0,h.QP)(e)}await this._fetchMetadata(),await this._initializeLayerProperties(),this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await(0,v.qN)(this)}async _fetchMetadata(){if(!this.url)throw new n.A("knowledge-graph:missing-url","KnowledgeGraphLayer must be created with a url");const e=await(0,U.fetchKnowledgeGraph)(this.url);this.knowledgeGraph=e,this._forEachGraphType((e=>{e.name&&this._graphTypeLookup.set(e.name,e)}))}async _initializeLayerProperties(){this.originIdOf("inclusionModeDefinition")===_.Gr.USER?this._validateInclusionModeDefinition():await this._initializeInclusionModeDefinition(),this._setMemberTypes(),this.dataManager=new M.P({knowledgeGraph:this.knowledgeGraph,inclusionModeDefinition:this.inclusionModeDefinition})}async _initializeInclusionModeDefinition(){const e=this.definitionSetMap?await(0,a.cZ)(this.definitionSetMap,!0):{generateAllSublayers:!0,namedTypeDefinitions:new Map};[...this.layers.toArray(),...this.tables.toArray()].forEach((t=>{const i=this._graphTypeLookup.get(t.graphTypeName);i&&!e.namedTypeDefinitions.has(i.name)&&e.namedTypeDefinitions.set(i.name,{useAllData:!0})})),this.setAtOrigin("inclusionModeDefinition",e,(0,_.OL)(this.originIdOf("definitionSetMap")))}_validateInclusionModeDefinition(){const{inclusionModeDefinition:e}=this;if(!e)return;const{namedTypeDefinitions:t}=e;if(t?.size>0)t.forEach(((e,i)=>{const s=this._graphTypeLookup.get(i);if(!s)return o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void t.delete(i);"relationship"!==s.type&&"entity"!==s.type&&(o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't properly modeled and will be removed`),t.delete(i))}));else if(!e.generateAllSublayers)throw new n.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined")}_setMemberTypes(){let e=[],t=[];const{inclusionModeDefinition:i}=this,s=i?.namedTypeDefinitions;!i||i.generateAllSublayers?(e=this.knowledgeGraph.dataModel?.entityTypes??[],t=this.knowledgeGraph.dataModel?.relationshipTypes??[]):s&&s.size>0&&s.forEach(((i,s)=>{const a=this._graphTypeLookup.get(s);switch(a?.type){case"relationship":t.push(a);break;case"entity":e.push(a)}})),this.memberEntityTypes=e,this.memberRelationshipTypes=t}_forEachGraphType(e){[...this.knowledgeGraph.dataModel?.entityTypes??[],...this.knowledgeGraph.dataModel?.relationshipTypes??[]].forEach((t=>{e(t)}))}_refreshNamedTypes(){this._namedTypesModified=!0;for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}async _handleNewRecords(e){const t=[];this.dataManager.addToLayer(e);for(const i of e)this.sublayerIdsCache.has(i.typeName)||(this.sublayerIdsCache.set(i.typeName,new Set),t.push(i.typeName)),this.sublayerIdsCache.get(i.typeName).add(i.id);for(const e of t){const t=this._graphTypeLookup.get(e);t&&(this._addSublayer(t),"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e),this.dataManager.sublayerCaches.set(e,new Map))}await(0,v.qN)(this,t),this._refreshNamedTypes()}_createSublayers(e,t,i){e.forEach((e=>{const s=this._createSublayer(e);i(s)&&t.push(s),this._updateSublayerCaches(e)}))}_addSublayer(e){const t=this._createSublayer(e);return t.geometryType?this.layers.push(t):this.tables.push(t),t}_createSublayer(e){return new b.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}_updateSublayers(e,t){t.forEach((t=>{t.parentCompositeLayer=this;const i=e.find((e=>e.type===t.graphType&&e.name===t.graphTypeName));i&&(t.objectType=i,this._updateSublayerCaches(i))}))}_updateSublayerCaches(e){const t=this.dataManager.sublayerCaches;t.has(e.name)||t.set(e.name,new Map)}_saveUrlAsNewResource(e,t,i,s){e[t]="<pending>",i.pendingOperations.push(async function(e){const t=await(0,a.fe)(e);return new Blob([t],{type:"application/x-protobuf"})}(this.inclusionModeDefinition).then((a=>{const r=function(e){const t=`definitionSetMap-${(0,y.lk)()}.dat`,i=(0,u.fj)("knowledgeGraphLayer",t);return e.resourceFromPath(i)}(s);e[t]=r.itemRelativeUrl,i.toAdd.push({resource:r,content:{type:"blob",blob:a},compress:!1,finish:e=>{this.definitionSetMap=e.url}})})))}_displaysAllRecords(e){for(const[,{useAllData:t}]of e.namedTypeDefinitions)if(!t)return!1;return!0}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this})),e.on("after-remove",(({item:e})=>{e.parent=null}))],"sublayers-owner"))}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=_.Gr.PORTAL_ITEM&&e<_.Gr.USER}readDefinitionSetMap(e,t,i){return(0,k.f)(e,i)}writeDefinitionSetMap(e,t,i,s){const a=s?.portalItem,r=s?.resources,n=(0,_.aB)(s?.origin);if(!a||!r||null==n)return void(e&&(t[i]=(0,k.t)(e,s)));const{inclusionModeDefinition:o}=this;if(!o||this._displaysAllRecords(o))return void(this.definitionSetMap=null);const l=this.originIdOf("inclusionModeDefinition");if(l===_.Gr.USER||this._namedTypesModified||n<l)this._saveUrlAsNewResource(t,i,r,a);else if(n===l&&e){const n=(0,k.t)(e,s);(0,u.oP)(n)?this._saveUrlAsNewResource(t,i,r,a):t[i]=n}}set inclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("inclusionModeDefinition",e):o.A.getLogger(this).error("#inclusionModeDefinition","inclusionModeDefinition cannot be changed after the layer is loaded.")}loadLayerAssumingLocalCache(){const e=[...this.memberEntityTypes,...this.memberRelationshipTypes];this.originIdOf("layers")===_.Gr.DEFAULTS?this._createSublayers(e,this.layers,(e=>!!e.geometryType)):this._updateSublayers(e,this.layers),this.originIdOf("tables")===_.Gr.DEFAULTS?this._createSublayers(e,this.tables,(e=>!e.geometryType)):this._updateSublayers(e,this.tables),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{const i=(0,l.tE)(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((e=>{i.add(e.id)}))}))}async addRecords(e){await this.load(),await this._handleNewRecords(e)}async removeRecords(e){await this.load();const t=[];for(const i of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(i.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(i.typeName)?.members?.has(i.id)&&t.push(i);this.dataManager.removeFromLayer(t);for(const e of t)this.sublayerIdsCache.get(e.typeName)?.delete(e.id);return this._refreshNamedTypes(),t}};(0,s._)([(0,c.MZ)()],C.prototype,"dataManager",void 0),(0,s._)([(0,c.MZ)({json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],C.prototype,"definitionSetMap",void 0),(0,s._)([(0,f.w)("definitionSetMap")],C.prototype,"readDefinitionSetMap",null),(0,s._)([(0,m.K)("definitionSetMap")],C.prototype,"writeDefinitionSetMap",null),(0,s._)([(0,c.MZ)()],C.prototype,"inclusionModeDefinition",null),(0,s._)([(0,c.MZ)()],C.prototype,"knowledgeGraph",void 0),(0,s._)([(0,c.MZ)({type:r.A.ofType(b.A),json:{write:{ignoreOrigin:!0}}})],C.prototype,"layers",void 0),(0,s._)([(0,c.MZ)()],C.prototype,"memberEntityTypes",void 0),(0,s._)([(0,c.MZ)()],C.prototype,"memberRelationshipTypes",void 0),(0,s._)([(0,c.MZ)({type:["KnowledgeGraphLayer"]})],C.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.MZ)()],C.prototype,"sublayerIdsCache",void 0),(0,s._)([(0,c.MZ)({type:r.A.ofType(b.A),json:{write:{ignoreOrigin:!0}}})],C.prototype,"tables",void 0),(0,s._)([(0,c.MZ)({json:{read:!1}})],C.prototype,"type",void 0),(0,s._)([(0,c.MZ)(E.OZ)],C.prototype,"url",void 0),C=(0,s._)([(0,g.$)("esri.layers.KnowledgeGraphLayer")],C);const G=C},69208:(e,t,i)=>{i.d(t,{d:()=>n});var s=i(90237),a=i(10107),r=(i(44208),i(53966),i(87811),i(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,a.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,s._)([(0,r.$)("esri.layers.mixins.CustomParametersMixin")],t),t}}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[8692],{8303:(e,t,i)=>{i.d(t,{A:()=>v});var s=i(90237),a=i(92602),r=i(70333),n=i(78888),o=i(60999),l=i(49186),d=i(53966),h=i(97768),p=i(74887),u=i(84952),y=i(10107),c=(i(44208),i(87811),i(36005)),f=i(40608),g=i(43937),m=i(77548),_=i(20655),w=i(80812),M=i(41318),b=i(10407);const v=e=>{let t=class extends e{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,h.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,i){if(t.itemId)return new w.default({id:t.itemId,portal:i?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:s}=await i.e(1204).then(i.bind(i,41204));return(0,p.Te)(t),await s({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,p.zf)(e)||d.A.getLogger(this).warn(`Failed to load layer (${this.title}, ${this.id}) portal item (${this.portalItem.id})\n ${e}`),e}}async finishLoadEditablePortalLayer(e){this._set("userHasEditingPrivileges",await this._fetchUserHasEditingPrivileges(e).catch((e=>((0,p.QP)(e),!0))))}async setUserPrivileges(e,t){if(!a.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:i,fullEdit:s},content:{updateItem:a}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",i),this._set("userHasFullEditingPrivileges",s),this._set("userHasUpdateItemPrivileges",a)}catch(e){(0,p.QP)(e)}}async _fetchUserPrivileges(e,t){let i=this.portalItem;if(!e||!i||!i.loaded||i.sourceUrl)return this._fetchFallbackUserPrivileges(t);const s=!r.id?.findCredential(this.url),a=e===i.id;if(a&&i.portal.user)return this._getUserPrivileges(i,s);let n,o;if(a)n=i.portal.url;else try{n=await(0,m.wI)(this.url,t)}catch(e){(0,p.QP)(e)}if(!n||!(0,u.b8)(n,i.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;o=await(r.id?.getCredential(`${n}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,p.QP)(e)}const l=!0,d=!1,h=!1;if(!o)return{features:{edit:l,fullEdit:d},content:{updateItem:h}};try{if(a?await i.reload():(i=new w.default({id:e,portal:{url:n}}),await i.load(t)),i.portal.user)return this._getUserPrivileges(i,s)}catch(e){(0,p.QP)(e)}return{features:{edit:l,fullEdit:d},content:{updateItem:h}}}_getUserPrivileges(e,t){const i=(0,b.It)(e);return t&&(i.features.edit=!0),i}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,p.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?r.id?.findCredential(this.url):null;if(!t)return!0;const i=T.credential===t?T.user:await this._fetchEditingUser(e);return T.credential=t,T.user=i,null==i?.privileges||i.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const i=r.id?.findServerInfo(this.url??"");if(!i?.owningSystemUrl)return null;const s=`${i.owningSystemUrl}/sharing/rest`,a=_.A.getDefault();if(a&&a.loaded&&(0,u.S8)(a.restUrl)===(0,u.S8)(s))return a.user;const l=`${s}/community/self`,d=null!=e?e.signal:null,h=await(0,o.Ke)((0,n.A)(l,{authMode:"no-prompt",query:{f:"json"},signal:d}));return h.ok?M.A.fromJSON(h.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const i=t?.portal,s=this.portalItem?.id&&(this.portalItem.portal||_.A.getDefault());return i&&s&&!(0,u.ut)(s.restUrl,i.restUrl)?(t.messages&&t.messages.push(new l.A("layer:cross-portal",`The layer '${this.title} (${this.id})' cannot be persisted because it refers to an item on a different portal than the one being saved to. To save, set layer.portalItem to null or save to the same portal as the item associated with the layer`,{layer:this})),null):super.write(e,{...t,layer:this})}};return(0,s._)([(0,y.MZ)({type:w.default})],t.prototype,"portalItem",null),(0,s._)([(0,c.w)("web-document","portalItem",["itemId"])],t.prototype,"readPortalItem",null),(0,s._)([(0,g.K)("web-document","portalItem",{itemId:{type:String}})],t.prototype,"writePortalItem",null),(0,s._)([(0,y.MZ)({clonable:!1})],t.prototype,"resourceReferences",void 0),(0,s._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasEditingPrivileges",void 0),(0,s._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasFullEditingPrivileges",void 0),(0,s._)([(0,y.MZ)({type:Boolean,readOnly:!0})],t.prototype,"userHasUpdateItemPrivileges",void 0),t=(0,s._)([(0,f.$)("esri.layers.mixins.PortalLayer")],t),t},T={credential:null,user:null}},18768:(e,t,i)=>{i.d(t,{b:()=>l});var s=i(90237),a=i(53966),r=i(10107),n=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{let t=class extends e{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,a.A.getLogger(this)))}};return(0,s._)([(0,r.MZ)()],t.prototype,"title",null),(0,s._)([(0,r.MZ)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,n.$)("esri.layers.mixins.ArcGISService")],t),t}},28692:(e,t,i)=>{i.r(t),i.d(t,{default:()=>G});var s=i(90237),a=i(67996),r=i(5503),n=i(49186),o=i(53966),l=i(91869),d=i(92071),h=i(74887),p=i(36708),u=i(84952),y=i(13069),c=i(10107),f=(i(44208),i(87811),i(36005)),g=i(40608),m=i(43937),_=i(35666),w=i(4146),M=i(80340),b=i(70643),v=i(85342),T=i(18768),I=i(63074),P=i(69208),S=i(16131),A=i(8303),L=i(54310),D=i(25036),E=i(10873),U=i(88613),k=i(97159);let C=class extends((0,I.dM)((0,D.j)((0,L.J)((0,T.b)((0,S.q)((0,A.A)((0,d.P)((0,P.d)(w.A))))))))){constructor(e){super(e),this._graphTypeLookup=new Map,this._namedTypesModified=!1,this.dataManager=null,this.definitionSetMap=null,this.knowledgeGraph=null,this.layers=new(r.A.ofType(b.A)),this.memberEntityTypes=null,this.memberRelationshipTypes=null,this.operationalLayerType="KnowledgeGraphLayer",this.sublayerIdsCache=new Map,this.tables=new(r.A.ofType(b.A)),this.type="knowledge-graph",this.url=null,this.addHandles((0,p.wB)((()=>this.layers.concat(this.tables)),((e,t)=>this._handleSublayersChange(e,t)),p.OH))}load(e){return this.addResolvingPromise(this._doLoad(e)),Promise.resolve(this)}async _doLoad(e){try{await this.loadFromPortal({supportedTypes:["Knowledge Graph Layer"]},e)}catch(e){(0,h.QP)(e)}await this._fetchMetadata(),await this._initializeLayerProperties(),this.loadLayerAssumingLocalCache(),this._layersLoadedFromAuthoritativeItem()||await(0,v.qN)(this)}async _fetchMetadata(){if(!this.url)throw new n.A("knowledge-graph:missing-url","KnowledgeGraphLayer must be created with a url");const e=await(0,U.fetchKnowledgeGraph)(this.url);this.knowledgeGraph=e,this._forEachGraphType((e=>{e.name&&this._graphTypeLookup.set(e.name,e)}))}async _initializeLayerProperties(){this.originIdOf("inclusionModeDefinition")===_.Gr.USER?this._validateInclusionModeDefinition():await this._initializeInclusionModeDefinition(),this._setMemberTypes(),this.dataManager=new M.P({knowledgeGraph:this.knowledgeGraph,inclusionModeDefinition:this.inclusionModeDefinition})}async _initializeInclusionModeDefinition(){const e=this.definitionSetMap?await(0,a.cZ)(this.definitionSetMap,!0):{generateAllSublayers:!0,namedTypeDefinitions:new Map};[...this.layers.toArray(),...this.tables.toArray()].forEach((t=>{const i=this._graphTypeLookup.get(t.graphTypeName);i&&!e.namedTypeDefinitions.has(i.name)&&e.namedTypeDefinitions.set(i.name,{useAllData:!0})})),this.setAtOrigin("inclusionModeDefinition",e,(0,_.OL)(this.originIdOf("definitionSetMap")))}_validateInclusionModeDefinition(){const{inclusionModeDefinition:e}=this;if(!e)return;const{namedTypeDefinitions:t}=e;if(t?.size>0)t.forEach(((e,i)=>{const s=this._graphTypeLookup.get(i);if(!s)return o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't in the data model and will be removed`),void t.delete(i);"relationship"!==s.type&&"entity"!==s.type&&(o.A.getLogger(this).warn(`A named type, ${i}, was in the inclusion list that wasn't properly modeled and will be removed`),t.delete(i))}));else if(!e.generateAllSublayers)throw new n.A("knowledge-graph:composite-layer-constructor","If an explicit inclusion definition is defined, at least one namedTypeDefinition must also be defined")}_setMemberTypes(){let e=[],t=[];const{inclusionModeDefinition:i}=this,s=i?.namedTypeDefinitions;!i||i.generateAllSublayers?(e=this.knowledgeGraph.dataModel?.entityTypes??[],t=this.knowledgeGraph.dataModel?.relationshipTypes??[]):s&&s.size>0&&s.forEach(((i,s)=>{const a=this._graphTypeLookup.get(s);switch(a?.type){case"relationship":t.push(a);break;case"entity":e.push(a)}})),this.memberEntityTypes=e,this.memberRelationshipTypes=t}_forEachGraphType(e){[...this.knowledgeGraph.dataModel?.entityTypes??[],...this.knowledgeGraph.dataModel?.relationshipTypes??[]].forEach((t=>{e(t)}))}_refreshNamedTypes(){this._namedTypesModified=!0;for(const e of this.layers)e.emit("refresh",{dataChanged:!0});for(const e of this.tables)e.emit("refresh",{dataChanged:!0})}async _handleNewRecords(e){const t=[],i=[];for(const s of e)this._graphTypeLookup.has(s.typeName)&&(this.dataManager.sublayerCaches.has(s.typeName)||(this.dataManager.sublayerCaches.set(s.typeName,new Map),t.push(s.typeName)),(0,l.tE)(this.sublayerIdsCache,s.typeName,(()=>new Set)).add(s.id),i.push(s));this.dataManager.addToLayer(i);for(const e of t){const t=this._graphTypeLookup.get(e);t&&(this._addSublayer(t),"entity"===t.type?this.dataManager.entityTypeNames.add(e):this.dataManager.relationshipTypeNames.add(e))}await(0,v.qN)(this,t),this._refreshNamedTypes()}_createSublayers(e,t,i){e.forEach((e=>{const s=this._createSublayer(e);i(s)&&t.push(s),this._updateSublayerCaches(e)}))}_addSublayer(e){const t=this._createSublayer(e);return t.geometryType?this.layers.push(t):this.tables.push(t),t}_createSublayer(e){return new b.A({objectType:e,parentCompositeLayer:this,graphType:e.type})}_updateSublayers(e,t){t.forEach((t=>{t.parentCompositeLayer=this;const i=e.find((e=>e.type===t.graphType&&e.name===t.graphTypeName));i&&(t.objectType=i,this._updateSublayerCaches(i))}))}_updateSublayerCaches({name:e}){if(!e)return;const t=this.dataManager.sublayerCaches;t.has(e)||t.set(e,new Map)}_saveUrlAsNewResource(e,t,i,s){e[t]="<pending>",i.pendingOperations.push(async function(e){const t=await(0,a.fe)(e);return new Blob([t],{type:"application/x-protobuf"})}(this.inclusionModeDefinition).then((a=>{const r=function(e){const t=`definitionSetMap-${(0,y.lk)()}.dat`,i=(0,u.fj)("knowledgeGraphLayer",t);return e.resourceFromPath(i)}(s);e[t]=r.itemRelativeUrl,i.toAdd.push({resource:r,content:{type:"blob",blob:a},compress:!1,finish:e=>{this.definitionSetMap=e.url}})})))}_displaysAllRecords(e){for(const[,{useAllData:t}]of e.namedTypeDefinitions)if(!t)return!1;return!0}_handleSublayersChange(e,t){t&&(t.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner")),e&&(e.forEach((e=>{e.parent=this})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this})),e.on("after-remove",(({item:e})=>{e.parent=null}))],"sublayers-owner"))}_layersLoadedFromAuthoritativeItem(){const e=this.originIdOf("layers");return e>=_.Gr.PORTAL_ITEM&&e<_.Gr.USER}readDefinitionSetMap(e,t,i){return(0,k.f)(e,i)}writeDefinitionSetMap(e,t,i,s){const a=s?.portalItem,r=s?.resources,n=(0,_.aB)(s?.origin);if(!a||!r||null==n)return void(e&&(t[i]=(0,k.t)(e,s)));const{inclusionModeDefinition:o}=this;if(!o||this._displaysAllRecords(o))return void(this.definitionSetMap=null);const l=this.originIdOf("inclusionModeDefinition");if(l===_.Gr.USER||this._namedTypesModified||n<l)this._saveUrlAsNewResource(t,i,r,a);else if(n===l&&e){const n=(0,k.t)(e,s);(0,u.oP)(n)?this._saveUrlAsNewResource(t,i,r,a):t[i]=n}}set inclusionModeDefinition(e){"loaded"!==this.loadStatus&&"failed"!==this.loadStatus?this._set("inclusionModeDefinition",e):o.A.getLogger(this).error("#inclusionModeDefinition","inclusionModeDefinition cannot be changed after the layer is loaded.")}loadLayerAssumingLocalCache(){const e=[...this.memberEntityTypes,...this.memberRelationshipTypes];this.originIdOf("layers")===_.Gr.DEFAULTS?this._createSublayers(e,this.layers,(e=>!!e.geometryType)):this._updateSublayers(e,this.layers),this.originIdOf("tables")===_.Gr.DEFAULTS?this._createSublayers(e,this.tables,(e=>!e.geometryType)):this._updateSublayers(e,this.tables),this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.forEach(((e,t)=>{const i=(0,l.tE)(this.sublayerIdsCache,t,(()=>new Set));e.members?.forEach((e=>{i.add(e.id)}))}))}async addRecords(e){await this.load(),await this._handleNewRecords(e)}async removeRecords(e){await this.load();const t=[];for(const i of e)!1===this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(i.typeName)?.useAllData&&this.dataManager.inclusionModeDefinition?.namedTypeDefinitions?.get(i.typeName)?.members?.has(i.id)&&t.push(i);this.dataManager.removeFromLayer(t);for(const e of t)this.sublayerIdsCache.get(e.typeName)?.delete(e.id);return this._refreshNamedTypes(),t}};(0,s._)([(0,c.MZ)()],C.prototype,"dataManager",void 0),(0,s._)([(0,c.MZ)({json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0}}})],C.prototype,"definitionSetMap",void 0),(0,s._)([(0,f.w)("definitionSetMap")],C.prototype,"readDefinitionSetMap",null),(0,s._)([(0,m.K)("definitionSetMap")],C.prototype,"writeDefinitionSetMap",null),(0,s._)([(0,c.MZ)()],C.prototype,"inclusionModeDefinition",null),(0,s._)([(0,c.MZ)()],C.prototype,"knowledgeGraph",void 0),(0,s._)([(0,c.MZ)({type:r.A.ofType(b.A),json:{write:{ignoreOrigin:!0}}})],C.prototype,"layers",void 0),(0,s._)([(0,c.MZ)()],C.prototype,"memberEntityTypes",void 0),(0,s._)([(0,c.MZ)()],C.prototype,"memberRelationshipTypes",void 0),(0,s._)([(0,c.MZ)({type:["KnowledgeGraphLayer"]})],C.prototype,"operationalLayerType",void 0),(0,s._)([(0,c.MZ)()],C.prototype,"sublayerIdsCache",void 0),(0,s._)([(0,c.MZ)({type:r.A.ofType(b.A),json:{write:{ignoreOrigin:!0}}})],C.prototype,"tables",void 0),(0,s._)([(0,c.MZ)({json:{read:!1}})],C.prototype,"type",void 0),(0,s._)([(0,c.MZ)(E.OZ)],C.prototype,"url",void 0),C=(0,s._)([(0,g.$)("esri.layers.KnowledgeGraphLayer")],C);const G=C},69208:(e,t,i)=>{i.d(t,{d:()=>n});var s=i(90237),a=i(10107),r=(i(44208),i(53966),i(87811),i(40608));const n=e=>{let t=class extends e{constructor(){super(...arguments),this.customParameters=null}};return(0,s._)([(0,a.MZ)({type:Object,json:{write:{overridePolicy:e=>({enabled:!!(e&&Object.keys(e).length>0)})}}})],t.prototype,"customParameters",void 0),t=(0,s._)([(0,r.$)("esri.layers.mixins.CustomParametersMixin")],t),t}}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9933],{39933:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(46686),l(32680),l(49255),l(76591),l(76597),l(60864),l(96336),l(71955),l(53466),l(92700),l(35640),l(40261),l(85417),l(
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[9933],{39933:(e,t,l)=>{l.r(t),l.d(t,{build:()=>s.b}),l(46686),l(32680),l(49255),l(76591),l(76597),l(60864),l(96336),l(71955),l(53466),l(92700),l(35640),l(40261),l(85417),l(10688),l(98619),l(22393),l(59469),l(25618),l(96598),l(42398),l(58614),l(27950),l(20693),l(33079),l(71988),l(20304),l(31821),l(63761),l(46540),l(60517),l(14113);var s=l(57323)}}]);
|