@arcgis/core 5.1.0-next.81 → 5.1.0-next.82
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/analysis/ShadowCast/DiscreteOptions.d.ts +12 -0
- package/analysis/ShadowCast/TotalDurationOptions.d.ts +12 -0
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/040884cec4b84dd1bb17.js +1 -0
- package/assets/esri/core/workers/chunks/05c5f68e117fc58ae801.js +1 -0
- package/assets/esri/core/workers/chunks/074f5e6aaeafca13bf72.js +1 -0
- package/assets/esri/core/workers/chunks/{7bd1d624f4f4a11a31e8.js → 086d7cdfa92a649c9f7b.js} +1 -1
- package/assets/esri/core/workers/chunks/{0eed2b1b06355ab89013.js → 0c074c46d106ca4d3bad.js} +1 -1
- package/assets/esri/core/workers/chunks/{c758e16b57c96ce88294.js → 1768f1a7e3caa6074d91.js} +1 -1
- package/assets/esri/core/workers/chunks/{85d3475667c503ec4fc6.js → 186bfde8c552e3b42302.js} +1 -1
- package/assets/esri/core/workers/chunks/1a35121a0c2595a41fdb.js +1 -0
- package/assets/esri/core/workers/chunks/1ab66600579fa4232d7b.js +1 -0
- package/assets/esri/core/workers/chunks/1e3fe89970c57a883fe5.js +1 -0
- package/assets/esri/core/workers/chunks/{824051af00e7a1f05ed0.js → 230e0e43f8e771950397.js} +1 -1
- package/assets/esri/core/workers/chunks/26f804c92077c11c626d.js +1 -0
- package/assets/esri/core/workers/chunks/28a45bd26eb5c9b3ec7c.js +1 -0
- package/assets/esri/core/workers/chunks/38f1a86b8dd9ee684ee5.js +596 -0
- package/assets/esri/core/workers/chunks/{71fe127734f33d020a44.js → 475394218caaa4cd3e86.js} +1 -1
- package/assets/esri/core/workers/chunks/475409026288f0981ce2.js +1 -0
- package/assets/esri/core/workers/chunks/4e206957b28253ddc1a3.js +1 -0
- package/assets/esri/core/workers/chunks/5cc38ac051d3d0557920.js +1 -0
- package/assets/esri/core/workers/chunks/{992cd87ba0ab6346f692.js → 64e268ebac0b62076f81.js} +1 -1
- package/assets/esri/core/workers/chunks/{003fd7745966fe03510c.js → 65ac73de5bb133c6bf89.js} +1 -1
- package/assets/esri/core/workers/chunks/6675d56f49d07a97dc40.js +1 -0
- package/assets/esri/core/workers/chunks/{484d6c1b0fe1633515b7.js → 72f8f4cfa0842d325fb0.js} +1 -1
- package/assets/esri/core/workers/chunks/{283d39dfb1625b5a74db.js → 747e258f57f0543c836e.js} +1 -1
- package/assets/esri/core/workers/chunks/{dd4f431511edd975a53b.js → 7acf82763aeba44049d0.js} +1 -1
- package/assets/esri/core/workers/chunks/{5d8e944b192aad4cf986.js → 7b505112c7e6d9b7a239.js} +1 -1
- package/assets/esri/core/workers/chunks/7b8466f892a38a53c600.js +1 -0
- package/assets/esri/core/workers/chunks/{77dd719516138afb1a2a.js → 8af9a78cf316581ea482.js} +1 -1
- package/assets/esri/core/workers/chunks/988e91cc6cf88c34c2de.js +1 -0
- package/assets/esri/core/workers/chunks/9c402657f63a4d5668d0.js +1 -0
- package/assets/esri/core/workers/chunks/9ea23cd4b2664c08b670.js +1 -0
- package/assets/esri/core/workers/chunks/9f51a69b8f1937a8794a.js +1 -0
- package/assets/esri/core/workers/chunks/a28124bba6b43efd74cc.js +1 -0
- package/assets/esri/core/workers/chunks/af762422a65c551dcd54.js +1 -0
- package/assets/esri/core/workers/chunks/{056fd7847caaff2c9514.js → af8bc56cf1404afc3028.js} +1 -1
- package/assets/esri/core/workers/chunks/b9e163f4a898e50cc854.js +1 -0
- package/assets/esri/core/workers/chunks/{444f0f51b3ee0b9845a5.js → bb2f6b0fcdfb8b158e26.js} +1 -1
- package/assets/esri/core/workers/chunks/{4af39fa53bc0b79101ed.js → bc8a74da48b08309875f.js} +1 -1
- package/assets/esri/core/workers/chunks/{026d3fa331caec1ea3d2.js → bf4dd8e50704e4040966.js} +1 -1
- package/assets/esri/core/workers/chunks/c19e3f6027b6526de359.js +1 -0
- package/assets/esri/core/workers/chunks/ce4dfc3a470230ddc9e4.js +1 -0
- package/assets/esri/core/workers/chunks/{8ea4584e07ccc85caabd.js → d11de13537b623739e14.js} +1 -1
- package/assets/esri/core/workers/chunks/d897412b99b9fba44bb4.js +1 -0
- package/assets/esri/core/workers/chunks/{035dbb0217f83108fa89.js → db86a1119e4e58ecfbda.js} +1 -1
- package/assets/esri/core/workers/chunks/dcb7a3ff59677b1cf0f1.js +1 -0
- package/assets/esri/core/workers/chunks/{5fe97253f80c797fad7f.js → df8a3d3cac454d42e14d.js} +1 -1
- package/assets/esri/core/workers/chunks/dfe1139124fda0d6c059.js +1 -0
- package/assets/esri/core/workers/chunks/{8b8f391f27774aec6db9.js → e0b27bceb397482bd0e8.js} +1 -1
- package/assets/esri/core/workers/chunks/{84821dff3bcc51161802.js → e89dc473f46a5584d2ef.js} +32 -32
- package/assets/esri/core/workers/chunks/{01ee18782a50279f907e.js → f4220b6eab0865318033.js} +1 -1
- package/assets/esri/core/workers/chunks/{42336e0d1ef88737b078.js → f468c6ea2818a1f97e19.js} +1 -1
- package/assets/esri/core/workers/chunks/fce2306a1b31c6680f90.js +1 -0
- package/assets/esri/core/workers/chunks/fcf51697c361e0075cc2.js +1 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core-simd.wasm +0 -0
- package/assets/esri/rest/knowledgeGraph/wasmInterface/arcgis-knowledge-client-core.wasm +0 -0
- package/assets/esri/themes/base/widgets/_OrientedImageryViewer.scss +15 -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/ShadowCastVisualize.glsl.js +33 -15
- package/chunks/arcgis-knowledge-client-core-simd.js +1 -1
- package/chunks/arcgis-knowledge-client-core.js +1 -1
- package/config.js +1 -1
- package/core/workers/registry.js +1 -1
- package/form/elements/inputs/MultipleChoiceInput.d.ts +6 -6
- package/form/elements/inputs/MultipleChoiceInput.js +1 -1
- package/kernel.js +1 -1
- package/layers/BaseDynamicLayer.js +1 -1
- package/layers/BaseTileLayer.js +1 -1
- package/layers/ElevationLayer.js +1 -1
- package/layers/MapImageLayer.js +1 -1
- package/layers/TileLayer.js +1 -1
- package/layers/WMSLayer.js +1 -1
- package/layers/WMTSLayer.js +1 -1
- package/layers/WebTileLayer.js +1 -1
- package/layers/mixins/ArcGISImageService.js +1 -1
- package/layers/mixins/TiledImagery.js +1 -1
- package/layers/support/imageBitmapUtils.js +1 -1
- package/package.json +1 -1
- package/request/process.js +1 -1
- package/rest/knowledgeGraph/CreateReplicaResponse.d.ts +37 -0
- package/rest/knowledgeGraph/CreateReplicaResponse.js +2 -0
- package/rest/knowledgeGraph/ReplicaDefinition.d.ts +91 -0
- package/rest/knowledgeGraph/ReplicaDefinition.js +2 -0
- package/rest/knowledgeGraph/ReplicasInformationResponse.d.ts +24 -0
- package/rest/knowledgeGraph/ReplicasInformationResponse.js +2 -0
- package/rest/knowledgeGraph/UnregisterReplicaResponse.d.ts +44 -0
- package/rest/knowledgeGraph/UnregisterReplicaResponse.js +2 -0
- package/rest/knowledgeGraph/wasmInterface/replicaToWasmEncodedFactories.js +2 -0
- package/rest/knowledgeGraph/wasmInterface/wasmToReplicaFactories.js +2 -0
- package/rest/knowledgeGraphService.d.ts +50 -1
- package/rest/knowledgeGraphService.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/markers/MarkerShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/AFeatureShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/FillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/LineShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/OutlineFillShader.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/shaders/hittestUtils.js +1 -1
- package/views/2d/engine/webgl/shaderGraph/techniques/text/TextShader.js +1 -1
- package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
- package/views/2d/layers/BaseDynamicLayerView2D.js +1 -1
- package/views/2d/layers/MapImageLayerView2D.js +1 -1
- package/views/2d/layers/TileLayerView2D.js +1 -1
- package/views/2d/layers/VectorTileLayerView2D.js +1 -1
- package/views/2d/layers/WMSLayerView2D.js +1 -1
- package/views/2d/layers/WMTSLayerView2D.js +1 -1
- package/views/3d/analysis/ShadowCastAnalysisView3D.js +1 -1
- package/views/3d/layers/ElevationLayerView3D.js +1 -1
- package/views/3d/layers/ImageryTileLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
- package/views/3d/layers/IntegratedMesh3DTilesLayerWorker.js +2 -0
- package/views/3d/layers/IntegratedMesh3DTilesLayerWorkerHandle.js +2 -0
- package/views/3d/layers/TileLayerView3D.js +1 -1
- package/views/3d/layers/WMTSLayerView3D.js +1 -1
- package/views/3d/layers/graphics/tessellationUtils.js +1 -1
- package/views/3d/layers/support/IntegratedMesh3DTilesVertexProcessing.js +2 -0
- package/views/3d/layers/support/makeScheduleFunction.js +1 -1
- package/views/3d/support/renderInfoUtils/polygon.js +1 -1
- package/views/3d/terrain/TerrainData.js +1 -1
- package/views/3d/terrain/TerrainSurface.js +1 -1
- package/views/3d/terrain/Tile.js +1 -1
- package/views/3d/terrain/TileRenderer.js +1 -1
- package/views/3d/terrain/terrainUtils.js +1 -1
- package/views/3d/webgl-engine/lib/ShadowCastRenderer.js +1 -1
- package/views/3d/webgl-engine/materials/VisualVariablePassParameters.js +1 -1
- package/views/3d/webgl-engine/shaders/ShadowCastVisualize.glsl.js +1 -1
- package/views/3d/webgl-engine/shaders/colorRampParameters.js +2 -0
- package/views/support/TextureCompressionWorker.js +1 -1
- package/views/support/TextureCompressionWorkerHandle.js +1 -1
- package/views/webgl/Texture.js +1 -1
- package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
- package/widgets/OrientedImageryViewer/OrientedImageryViewerViewModel.js +1 -1
- package/widgets/OrientedImageryViewer/css.js +1 -1
- package/widgets/OrientedImageryViewer.js +1 -1
- package/widgets/ShadowCast/ShadowCastViewModel.js +1 -1
- package/assets/esri/core/workers/chunks/05c3146d87d917606193.js +0 -1
- package/assets/esri/core/workers/chunks/0b77c124b743067e4155.js +0 -1
- package/assets/esri/core/workers/chunks/11241781baaed346af52.js +0 -1
- package/assets/esri/core/workers/chunks/1d9560eb8b21b9e76616.js +0 -1
- package/assets/esri/core/workers/chunks/2bd69a7734d170e190ed.js +0 -1
- package/assets/esri/core/workers/chunks/2c87c3112a43db8624f6.js +0 -1
- package/assets/esri/core/workers/chunks/3a58708217a9c11836ab.js +0 -1
- package/assets/esri/core/workers/chunks/3bbf684ee2484eb44c9f.js +0 -1
- package/assets/esri/core/workers/chunks/49fb9c47070641bce9a9.js +0 -1
- package/assets/esri/core/workers/chunks/5417308eba30e668b1ee.js +0 -1
- package/assets/esri/core/workers/chunks/62b3e933f548ce354b99.js +0 -1
- package/assets/esri/core/workers/chunks/6e70e922331704b92a08.js +0 -1
- package/assets/esri/core/workers/chunks/7c7c11c0fde8b63e330b.js +0 -1
- package/assets/esri/core/workers/chunks/7cee7ffaf941a4fe23b0.js +0 -596
- package/assets/esri/core/workers/chunks/7f55eef696e9ed717bfc.js +0 -1
- package/assets/esri/core/workers/chunks/89dbea6f436d45a3b185.js +0 -1
- package/assets/esri/core/workers/chunks/9d216e30d04ea21fc8a2.js +0 -1
- package/assets/esri/core/workers/chunks/a5d8d6f3c0c8de474efd.js +0 -1
- package/assets/esri/core/workers/chunks/a809b811121099a87a98.js +0 -1
- package/assets/esri/core/workers/chunks/c02ba921c0a32d2021e3.js +0 -1
- package/assets/esri/core/workers/chunks/c3c19b62d948d53118a8.js +0 -1
- package/assets/esri/core/workers/chunks/c46a4adea39636a96d03.js +0 -1
- package/assets/esri/core/workers/chunks/c5507480344176fad241.js +0 -1
- package/assets/esri/core/workers/chunks/c6030271bd6d39b6e1db.js +0 -1
- package/assets/esri/core/workers/chunks/d1a7d13e1d48abcd7bf1.js +0 -1
- package/assets/esri/core/workers/chunks/dcbc4072c18278c2b67d.js +0 -1
- package/assets/esri/core/workers/chunks/e610d24539a675fb054b.js +0 -1
- package/assets/esri/core/workers/chunks/ecb7ede6a8e6c05e4c6c.js +0 -1
- package/assets/esri/core/workers/chunks/f227b34cce6843df0fb6.js +0 -1
- package/request/ImageWithType.js +0 -2
- package/views/3d/layers/support/fetchTile.js +0 -2
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[233],{44794(e,t,i){i.d(t,{v:()=>o});var n=i(4718),r=i(62788),s=i(95488);class a{constructor(e,t){this._observable=new s.I,this._value=e,this._equalityFunction=t}get value(){return(0,r.gc)(this._observable),this._value}set value(e){this._equalityFunction(e,this._value)||(this._value=e,this._observable.notify())}mutate(e){e(this._value),this._observable.notify()}}function o(e,t=n.gh){return new a(e,t)}},82806(e,t,i){i.d(t,{b:()=>T});var n=i(5482),r=i(11254),s=i(49186),a=i(53966),o=i(91429),l=i(56507),c=i(86738),u=i(16930),h=i(21325),d=i(7548),m=i(23636),p=i(4366),f=i(34930),y=i(99235),g=i(37373),b=i(51927),R=i(60694),x=i(10873),w=i(45617),I=i(43577),v=i(13868),_=i(22796),F=i(69409),S=i(87045),C=i(12711),J=i(85676),A=i(94359),D=i(22048),P=i(49410),M=i(34606),k=i(29127),H=i(93223),N=i(36005);const T=e=>{const t=e;let T=class extends t{constructor(...e){super(...e),this._draRasterConfig=null,this._isConstructedFromFunctionRaster=!1,this.bandIds=null,this.copyright=null,this.interpolation=null,this.multidimensionalSubset=null,this.raster=null,this.serviceRasterInfo=null,this.sourceJSON=null,this.spatialReference=null,this.symbolizer=null,this._isConstructedFromFunctionRaster=(0,d.qg)(e[0]?.raster)}destroy(){this._draRasterConfig?.rasterJobHandler?.destroy(),this._shutdownJobHandler()}get fullExtent(){return this.serviceRasterInfo?.extent}set multidimensionalDefinition(e){this._set("multidimensionalDefinition",e),this.updateRenderer()}set rasterFunction(e){"none"===e?.functionName?.toLowerCase()&&(e=void 0),this._set("rasterFunction",e),this.updateRasterFunction()}set url(e){this._set("url",(0,R.Jf)(e,a.A.getLogger(this)))}get renderer(){if("imagery-tile"!==this.type)return this.internalRenderer;const{activePresetRendererName:e,presetRenderers:t}=this;if(e){const i=t?.find(({name:t})=>t===e);return i?.renderer.clone()}return this.internalRenderer}set renderer(e){"imagery-tile"===this.type&&(this.activePresetRendererName=null),this.internalRenderer=e}set internalRenderer(e){null==e&&null==this.rasterFunction?this._configDefaultRenderer("override"):(this._set("internalRenderer",e),this.updateRenderer())}readRenderer(e,t,i){const n=t?.layerDefinition?.drawingInfo?.renderer;return(0,A.LF)(n,i)||void 0}async computeStatisticsHistograms(e,t){await this.load(t),e=(0,l.PZ)(D.A,e).clone();const{serviceRasterInfo:i}=this;if(null==i)throw new s.A("imagery-tile-mixin:compute-statistics-histograms","serviceRasterInfo must be specified");const{geometry:n}=e;if(null==n)throw new s.A("imagery-tile-mixin:compute-statistics-histograms","geometry must be specified");let r=n;const{spatialReference:a}=i;if(!n.spatialReference.equals(a)){await(0,g.Hh)();const e="extent"===n.type?(0,g._l)(n,a):(0,g.uk)(n,a);if(null==e)throw new s.A("imagery-tile-mixin:compute-statistics-histograms","geometry cannot be projected to the data source");r=e}const o=e.pixelSize??new c.A({x:i.pixelSize.x,y:i.pixelSize.y,spatialReference:a}),{extent:u,width:h,height:d}=(0,f.b7)(i,r,o),m=await this.fetchPixels(u,h,d,{...t,interpolation:"nearest"});if(null==m.pixelBlock)throw new s.A("imagery-tile-mixin:compute-statistics-histograms","failed to fetch pixels");const p=await(0,f.$Q)(m.pixelBlock,u,r),y=this._rasterJobHandler;return y?y.computeStatisticsHistograms({pixelBlock:p},t):(0,b.eH)(p)}normalizeRasterFetchOptions(e){const{multidimensionalInfo:t}=this.serviceRasterInfo??{};if(null==t)return e;const i=(0,p.XU)({rasterInfo:this.raster.rasterInfo,multidimensionalDefinition:e.multidimensionalDefinition||this.multidimensionalDefinition,timeExtent:e.timeExtent??this.timeExtent,multidimensionalSubset:this.multidimensionalSubset});return{...e,multidimensionalDefinition:i,timeExtent:void 0}}async updateRasterFunction(){return this.loaded&&"imagery-tile"===this.type&&(this.rasterFunction||this._cachedRasterFunctionJson)&&JSON.stringify(this.rasterFunction)!==JSON.stringify(this._cachedRasterFunctionJson)?(this._cachedRasterFunctionJson=this.rasterFunction?.toJSON(),this._rasterFunctionUpdatePromise=this._updateRasterFunction(),this._rasterFunctionUpdatePromise):this._rasterFunctionUpdatePromise}async updateRenderer(){const{loaded:e,symbolizer:t,renderer:i}=this;if(!e||!t||!i)return;const{rasterInfo:n}=this.raster,r=(0,p.ct)(n,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),s=r?.name,a=(0,C.m7)(n,s);return this._updateSymbolizer(t,i,s,a)}async applyRenderer(e,t,i){const n=e?.pixelBlock;if(!(null!=n&&n.pixels&&n.pixels.length>0))return null;await this.updateRenderer();const r=this.bandIds??[],{pixelBlock:s}=await this._symbolize({pixelData:e,simpleStretchParams:t,bandIds:r,symbolizer:this.symbolizer},i);return s}getRawDisplayBandIds(){let{bandIds:e,raster:t}=this;if(this.rasterFunction&&(0,d.qg)(t)){const i=t.rasterFunction.rawInputBandIds;e=e?.length&&i?.length&&1!==t.rasterInfo.bandCount?e.map(e=>i[Math.min(e,i.length-1)]):i}return e&&e.length>3&&e.every((e,t)=>e===t)?null:e}getTileUrl(e,t,i){return"RasterTileServer"===this.raster.datasetFormat?`${this.url}/tile/${e}/${t}/${i}`:""}getCompatibleTileInfo(e,t,i=!1){if(!this.loaded||null==t)return null;if(i&&e.equals(this.spatialReference))return this.tileInfo;const n=(0,h.Vp)(e);return S.A.create({size:256,spatialReference:e,origin:n?{x:n.origin[0],y:n.origin[1]}:{x:t.xmin,y:t.ymax}})}getCompatibleFullExtent(e){return this.loaded?(this._compatibleFullExtent?.spatialReference.equals(e)||(this._compatibleFullExtent=this.raster.computeExtent(e)),this._compatibleFullExtent):null}async fetchTile(e,t,i,n={}){if(z(this),n.requestAsImageElement){const s=this.getTileUrl(e,t,i);return(0,r.A)(s,{responseType:"image",query:{...this.refreshParameters,...this.raster.ioConfig.customFetchParameters},signal:n.signal}).then(e=>e.data)}const{serviceRasterInfo:s}=this;if(null!=s.multidimensionalInfo&&null==(n=this.normalizeRasterFetchOptions(n)).multidimensionalDefinition){const r=n.tileInfo||s.storageInfo.tileInfo,a=this.raster.getTileExtentFromTileInfo(e,t,i,r);if(a)return{extent:a,pixelBlock:null}}return await this._initJobHandler(),await this.updateRasterFunction(),"raster-shaded-relief"===this.renderer?.type&&(n={...n,buffer:{cols:1,rows:1}}),n={...n,refreshParameters:this.refreshParameters},this.raster.fetchTile(e,t,i,n)}async fetchPixels(e,t,i,n={}){if(null!=this.serviceRasterInfo.multidimensionalInfo&&null==(n=this.normalizeRasterFetchOptions(n)).multidimensionalDefinition)return{extent:e,pixelBlock:null};await this._initJobHandler(),await this.updateRasterFunction(),t=Math.round(t),i=Math.round(i);const r=await this.raster.fetchPixels(e,t,i,n);return n.bandIds?.length&&!this.raster.rasterInfo.storageInfo.isBsqTile&&(r.pixelBlock=r.pixelBlock?.extractBands(n.bandIds)),r}async getSamples(e,t){await this.load();const i=(0,l.PZ)(M.A,e).clone();if(i.interpolation&&"nearest"!==i.interpolation)throw new s.A("imagery-tile-mixin:get-samples","only nearest interpolation is currently supported");const n=i.mosaicRule?.multidimensionalDefinition,r={...t,multidimensionalDefinition:n},a=(await this._getSampleLocations(i)).map(e=>this.identify(e,r).then(t=>(t.location=e,t))),o=(await Promise.all(a)).flatMap((e,t)=>this._convertRasterIdentifyResultToSample(e,t));return new k.A({samples:o})}async identify(e,t={}){await this.load();const i=(0,l.PZ)(c.A,e).clone().normalize(),{raster:n,serviceRasterInfo:r}=this;if(null!=r?.multidimensionalInfo&&(!r.hasMultidimensionalTranspose||!(0,p.DY)(t.multidimensionalDefinition)&&!t.transposedVariableName)&&null==(t=this.normalizeRasterFetchOptions(t)).multidimensionalDefinition)return{location:i,value:null};const a=this.multidimensionalSubset?.areaOfInterest;if(a&&!a.contains(i))throw new s.A("imagery-tile-mixin:identify","the request cannot be fulfilled when falling outside of the multidimensional subset");let o;if(this.serviceRasterInfo?.storageInfo.isBsqTile){const e=(0,d.qg)(n)?this.getRawDisplayBandIds():this.bandIds;o=e?.length?e:void 0}return n.identify(i,{...t,bandIds:o})}hasStandardTime(){const e=this.serviceRasterInfo?.multidimensionalInfo;if(null==e||"standard-time"!==this.serviceRasterInfo?.dataType)return!1;const t=this.multidimensionalDefinition,i=t?.[0]?.variableName;return e.variables.some(e=>e.name===i&&(!t?.[0].dimensionName||e.dimensions.some(e=>"StdTime"===e.name)))}getStandardTimeValue(e){return new Date((0,p.$E)(e)).toISOString()}getMultidimensionalSubsetVariables(e){const t=e??this.serviceRasterInfo?.multidimensionalInfo;return(0,p.z2)(this.multidimensionalSubset,t)}async getDynamicRangeInputRaster(){if(!this.rasterFunction||!(0,d.qg)(this.raster)||!this._cachedRasterFunctionJson)return null;const e=JSON.stringify(this._cachedRasterFunctionJson);if(this._draRasterConfig?.functionJson===e)return this._draRasterConfig;const t=this.raster.rasterFunction.queryRasterFunction(e=>"Stretch"===e.functionName&&e.functionArguments.dynamicRangeAdjustment);if(!t)return null;const i=t.toJSON(),n=this.raster.primaryRasters.rasters,r=t.functionArguments.raster,s=i.rasterFunctionArguments;if(!r||"object"!=typeof r||!("functionName"in r))return this._draRasterConfig={functionJson:e,raster:n[0],functionArguments:s,rasterJobHandler:this._draRasterConfig?.rasterJobHandler},this._draRasterConfig;const a={raster:n[0]};n.length>1&&n.forEach(e=>a[e.url]=e);const o=(0,y.vt)(r.toJSON(),a),l=new m.A({rasterFunction:o});await l.open();let c=this._draRasterConfig?.rasterJobHandler;try{c||(c=new F.A,await c.initialize()),l.rasterJobHandler=c,await l.syncJobHandler()}catch{}return this._draRasterConfig={functionJson:e,raster:l,functionArguments:s,rasterJobHandler:c},this._draRasterConfig}_configDefaultSettings(){this._configDefaultInterpolation(),this.multidimensionalDefinition||(this.multidimensionalDefinition=(0,p.fy)(this.raster.rasterInfo,{multidimensionalSubset:this.multidimensionalSubset})),this.rasterFunction&&(0,d.qg)(this.raster)&&(this._cachedRasterFunctionJson=this.rasterFunction.toJSON()),this._configDefaultRenderer()}async _initJobHandler(){if(!this._rasterJobHandler)return super._initJobHandler().then(async()=>{if(!this._rasterJobHandler)return;z(this);const{raster:e}=this;e.rasterJobHandler=this._rasterJobHandler,(0,d.qg)(e)&&e.syncJobHandler(),this.rasterFunction&&await this.updateRasterFunction().catch(()=>{}),this.renderer&&this.updateRenderer()}).catch(()=>{})}_shutdownJobHandler(){super._shutdownJobHandler(),this.raster&&(this.raster.rasterJobHandler=null)}async _getSampleLocations(e){const{geometry:t}=e;if("point"===t.type)return[t];const{spatialReference:n,type:r}=t;if("multipoint"===r)return t.points.map(e=>new c.A({x:e[0],y:e[1],spatialReference:n}));if("polyline"===r){let r=t;if(e.sampleCount||e.sampleDistance){const n=await Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(2261)]).then(i.bind(i,88411)),s=(await Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(2174)]).then(i.bind(i,965))).execute(t,{unit:"meters"}),a=Math.min(e.sampleCount||100,1e3);let o=e.sampleDistance;o||(o=s/(a+(2===r.paths[0].length?1:0))),r=n.execute(t,o,{unit:"meters"})}return r.paths.flatMap(e=>e.map(e=>new c.A({x:e[0],y:e[1],spatialReference:n})))}const s=Math.min(e.sampleCount||100,1e3),a="extent"===t.type,o=a?t:t.extent,l=Math.sqrt(o.width*o.height/s),u=o.height/l,h=o.width/l,{xmin:d,ymax:m}=o,p=[];for(let e=0;e<u;e++)for(let i=0;i<h;i++){const r=new c.A({x:d+(i+.5)*l,y:m-(e+.5)*l,spatialReference:n});(a||t.contains(r))&&p.push(r)}return p}_configDefaultInterpolation(){if(null==this.interpolation){z(this);const{raster:e}=this,t=(0,C.w6)(e.rasterInfo,e.tileType,this.sourceJSON?.defaultResamplingMethod);this._set("interpolation",t)}}_configDefaultRenderer(e="no"){z(this);const{rasterInfo:t}=this.raster,i=(0,p.ct)(t,{multidimensionalDefinition:this.multidimensionalDefinition,multidimensionalSubset:this.multidimensionalSubset}),n=i?.name,r=(0,C.I8)({variableName:n,rasterFunctionName:this.rasterFunction?.functionName,presetRenderers:this.presetRenderers});if(!this.bandIds&&t.bandCount>1&&(this.bandIds=r?.bandIds??(0,C.ci)(t)),!this.renderer||"override"===e){const e=(0,C.Mm)(this.raster),i=r?.renderer??(0,C.PD)(t,{bandIds:this.bandIds,variableName:n,rasterFunctionColorRamp:e}),s=t.statistics,a=s&&s.length>0?s[0]:null,o=a?.max??0,l=a?.min??0;"WCSServer"===this.raster.datasetFormat&&"raster-stretch"===i.type&&(o>1e24||l<-1e24)&&(i.dynamicRangeAdjustment=!0,i.customStatistics=null,"none"===i.stretchType&&(i.stretchType="min-max")),this.renderer=i}const s=(0,C.$P)({...this.renderer.toJSON(),variableName:n}),o=(0,C.m7)(t,n);this.symbolizer?(this.symbolizer.rendererJSON=s,this.symbolizer.rasterInfo=o):this.symbolizer=new J.A({rendererJSON:s,rasterInfo:o});const l=this.symbolizer.bind();if(l.success){if("auto"===e){const{colormap:e}=this.raster.rasterInfo,t=this.renderer;if(null!=e&&"raster-colormap"===t.type){const e=(0,C.PD)(this.raster.rasterInfo);JSON.stringify(e)!==JSON.stringify(t)&&this._configDefaultRenderer("override")}else if("raster-stretch"===t.type){const e=this.bandIds?.length,i=t.customStatistics?.length;!t.dynamicRangeAdjustment&&i&&e&&i!==e&&this._configDefaultRenderer("override")}}}else a.A.getLogger(this).warn("imagery-tile-mixin",l.error||"The given renderer is not supported by the layer."),"auto"===e&&this._configDefaultRenderer("override")}async _updateRasterFunction(){if(this._isConstructedFromFunctionRaster&&(0,d.qg)(this.raster)){const e=this.raster.rasterFunction.toJSON();return void(!this.rasterFunction&&e&&this._set("rasterFunction",_.A.fromJSON(e)))}let e,t=this.raster,i=!1;(0,d.qg)(t)?(e=t.primaryRasters.rasters,t=e[0],i=!0):e=[t];const{rasterFunction:n}=this;if(n){const i={raster:t};e.length>1&&e.forEach(e=>i[e.url]=e);const r=(0,y.vt)(n.functionDefinition?.toJSON()??n.toJSON(),i),s=new m.A({rasterFunction:r});s.rasterJobHandler=this._rasterJobHandler,await s.open(),this.raster=s}else this.raster=t,await t.open();if(this._cachedRendererJson=void 0,!i&&!n)return;const{bandIds:r}=this,{bandCount:s}=this.raster.rasterInfo,a=r?.length?r.some(e=>e>=s):s>=3;r&&(a||this.renderer&&"raster-stretch"!==this.renderer.type)&&this._set("bandIds",null),this._configDefaultRenderer("auto")}_convertRasterIdentifyResultToSample(e,t){const{rasterInfo:i}=this.raster,n=i.storageInfo.pyramidScalingFactor**(e.pyramidLevel??0),r=(i.pixelSize.x+i.pixelSize.y)/2*n;if(!e.dataSeries?.length)return[new P.A({location:e.location,pixelValue:e.value,locationId:t,resolution:r})];const s=[];return e.dataSeries.forEach(({value:i,multidimensionalDefinition:n},a)=>{const o={Variables:n[0].variableName,Dimensions:n.flatMap(({dimensionName:e})=>e).join(",")};for(const{dimensionName:e,values:t}of n){o[e]=Array.isArray(t[0])?t[0][0]:t[0];const i=t[t.length-1];o[`${e}_Max`]=Array.isArray(i)?i[i.length-1]:i}const l=new P.A({location:e.location,pixelValue:i,rasterId:a,locationId:t,resolution:r,attributes:o});s.push(l)}),s}};function z(e){if(!e.raster||!e.serviceRasterInfo)throw new s.A("imagery-tile","no raster")}return(0,n.Cg)([(0,o.MZ)({clonable:!1})],T.prototype,"_cachedRasterFunctionJson",void 0),(0,n.Cg)([(0,o.MZ)({clonable:!1})],T.prototype,"_compatibleFullExtent",void 0),(0,n.Cg)([(0,o.MZ)({clonable:!1})],T.prototype,"_draRasterConfig",void 0),(0,n.Cg)([(0,o.MZ)({clonable:!1})],T.prototype,"_isConstructedFromFunctionRaster",void 0),(0,n.Cg)([(0,o.MZ)({clonable:!1})],T.prototype,"_rasterFunctionUpdatePromise",void 0),(0,n.Cg)([(0,o.MZ)({type:[l.jz],json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"0,1,2"!==this.bandIds?.join(",")}}}}})],T.prototype,"bandIds",void 0),(0,n.Cg)([(0,o.MZ)({json:{origins:{service:{read:{source:"copyrightText"}}}}})],T.prototype,"copyright",void 0),(0,n.Cg)([(0,o.MZ)({json:{read:!1}})],T.prototype,"fullExtent",null),(0,n.Cg)([(0,o.MZ)({json:{write:{overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType||"bilinear"!==this.interpolation}}}}}),(0,H.e)(v.SZ)],T.prototype,"interpolation",void 0),(0,n.Cg)([(0,o.MZ)()],T.prototype,"ioConfig",void 0),(0,n.Cg)([(0,o.MZ)({type:[w.A],json:{write:!0}})],T.prototype,"multidimensionalDefinition",null),(0,n.Cg)([(0,o.MZ)({type:I.A,json:{write:!0}})],T.prototype,"multidimensionalSubset",void 0),(0,n.Cg)([(0,o.MZ)()],T.prototype,"raster",void 0),(0,n.Cg)([(0,o.MZ)({type:_.A})],T.prototype,"rasterFunction",null),(0,n.Cg)([(0,o.MZ)()],T.prototype,"serviceRasterInfo",void 0),(0,n.Cg)([(0,o.MZ)()],T.prototype,"sourceJSON",void 0),(0,n.Cg)([(0,o.MZ)({readOnly:!0,type:u.A,json:{read:!1}})],T.prototype,"spatialReference",void 0),(0,n.Cg)([(0,o.MZ)({type:S.A})],T.prototype,"tileInfo",void 0),(0,n.Cg)([(0,o.MZ)(x.OZ)],T.prototype,"url",null),(0,n.Cg)([(0,o.MZ)({types:A.uy})],T.prototype,"renderer",null),(0,n.Cg)([(0,o.MZ)({types:A.uy,json:{name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy(){const e="raster-stretch"===this.renderer?.type&&"none"===this.renderer.stretchType&&!this.renderer.useGamma;return{enabled:!this.loaded||"Raster"===this.raster.tileType||!e}}},origins:{"web-scene":{types:A.Gj,name:"layerDefinition.drawingInfo.renderer",write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type})}}}}})],T.prototype,"internalRenderer",null),(0,n.Cg)([(0,N.w)("internalRenderer")],T.prototype,"readRenderer",null),(0,n.Cg)([(0,o.MZ)({clonable:!1})],T.prototype,"symbolizer",void 0),T=(0,n.Cg)([(0,o.$K)("esri.layers.mixins.TiledImagery")],T),T}},23636(e,t,i){i.d(t,{A:()=>p});var n=i(5482),r=i(49186),s=i(91429),a=i(5443),o=i(86738),l=i(39829),c=i(49859),u=i(34930),h=i(47520),d=i(37373),m=i(22671);let p=class extends c.A{constructor(){super(...arguments),this.datasetFormat="Function",this.tileType="Raster",this.rasterFunction=null,this._clippingGeometry=new Map}async fetchPixels(e,t,i,n={}){const{rasters:r}=this.primaryRasters;let s=!1;const{interpolation:a}=n,o=this.rasterFunction.flatWebGLFunctionChain?.hasFocalFunction;!n.requestRawData&&o&&(s=1===r.length&&!n.skipRasterFunction,n={...n,interpolation:"bilinear",requestRawData:s}),n.requestRawData&&r.length>1&&!this.hasUniqueSourceStorageInfo&&(s=!1,n={...n,requestRawData:!1});const l=r.map(r=>r.fetchPixels(e,t,i,n)),c=await Promise.all(l),d=c.map(e=>e.pixelBlock),m=s||n.requestRawData?c.map(e=>e.srcTilePixelSize):void 0;if(n.skipRasterFunction||d.every(e=>null==e))return c[0];const p=c.find(e=>null!=e.pixelBlock)?.extent??e;let f=await this._processPixelBlock(d,p,m);const{transformGrid:y}=c[0];if(!s||null==f||null==y){const e=n.noClip?null:this.getClippingGeometry(p.spatialReference);return!n.noClip&&null!=f&&e&&(f=await(0,u.$Q)(f,p,e)),{...c[0],pixelBlock:f}}const g={rows:y.spacing[0],cols:y.spacing[1]};let b;b=this.rasterJobHandler?(await this.rasterJobHandler.mosaicAndTransform({srcPixelBlocks:[f],srcMosaicSize:{width:f.width,height:f.height},destDimension:{width:t,height:i},coefs:y.coefficients,sampleSpacing:g,projectDirections:!1,gcsGrid:null,isUV:!1,interpolation:a,alignmentInfo:void 0,blockWidths:null},n)).pixelBlock:(0,h.$i)(f,{width:t,height:i},y.coefficients,g,a);const R=n.noClip?null:this.getClippingGeometry(e.spatialReference);return n.noClip||null==b||null==R||(b=await(0,u.$Q)(b,e,R)),{extent:e,srcExtent:c[0].srcExtent,pixelBlock:b,srcTilePixelSize:c[0].srcTilePixelSize}}async processOnePixel(e,t){const{extent:i,pixelBlock:n}=t;if(!n)return null;const{row:r,col:s}=e,{width:o,height:l}=n;if(r<0||r>=l||s<0||s>=o)return null;const{neighborhoodSize:c}=this.rasterFunction,u=Math.max(2,c.rows),d=Math.max(2,c.cols),m=d>>>1,p=u>>>1,f={x:Math.max(0,s-m),y:Math.max(0,r-p)},y=i.width/o,g=i.height/l,b=i.xmin+y*f.x,R=b+y*d,x=i.ymax-g*f.y,w=new a.A({xmin:b,ymin:x-g*u,xmax:R,ymax:x,spatialReference:i.spatialReference}),I=(0,h.$Q)(n,f,{width:d,height:u});if(null==I)return null;const v=await this.processPixelData({extent:w,pixelBlock:I}),_=(r-f.y)*d+(s-f.x);return v&&0!==v.mask?.[_]?v.pixels.map(e=>e[_]):null}async processPixelData(e){const{extent:t,pixelBlock:i}=e;if(!i)return null;const n=new o.A({x:t.width/i.width,y:t.height/i.height,spatialReference:t.spatialReference});return await this._processPixelBlock([i],t,[n])}getClippingGeometry(e){const t=this._clippingGeometry.get("0");if(!e||!t)return t;const i=function(e){return String(e.wkid??e.wkt??e.wkt2)}(e);let n=this._clippingGeometry.get(i);return null!=n||(n=e.equals(t.spatialReference)?t:(0,d.uk)(t,e),this._clippingGeometry.set(i,n)),n}async _open(e){const{rasterFunction:t}=this;t.isRoot=!0,this.primaryRasters?.rasters?.length?t.sourceRasters=this.primaryRasters.rasters:(this.primaryRasters=t.getPrimaryRasters(),this.rasterJobHandler&&this.primaryRasters.rasters?.forEach(e=>e.rasterJobHandler=this.rasterJobHandler));const{rasters:i,rasterIds:n}=this.primaryRasters,s=i.map(t=>t.rasterInfo?void 0:t.open(e));await Promise.all(s);const a=i.map(({rasterInfo:e})=>e),o=t.bind({rasterInfos:a,rasterIds:n});if(t.rawSourceRasterInfos=a,!o.success||0===a.length)throw new r.A("raster-function:open",`cannot bind the function: ${o.error??""}`);const l="Table"===t.functionName?t:t.functionArguments?.raster;"Table"===l?.functionName&&(t.rasterInfo.attributeTable=m.A.fromJSON(l.functionArguments.attributeTableAsRecordSet)),await this.syncJobHandler();const c=a[0];this.hasUniqueSourceStorageInfo=1===a.length||a.slice(1).every(e=>function(e,t){const{storageInfo:i,pixelSize:n,spatialReference:r,extent:s}=e,{storageInfo:a,pixelSize:o,spatialReference:l,extent:c}=t;return n.x===o.x&&n.y===o.y&&r.equals(l)&&s.equals(c)&&i.blockHeight===a.blockHeight&&i.blockWidth===a.blockWidth&&i.maximumPyramidLevel===a.maximumPyramidLevel&&i.firstPyramidLevel===a.firstPyramidLevel&&i.pyramidBlockWidth===a.pyramidBlockWidth&&i.pyramidBlockHeight===a.pyramidBlockHeight&&i.pyramidScalingFactor===a.pyramidScalingFactor}(e,c)),this.set("sourceJSON",i[0].sourceJSON),this.set("rasterInfo",t.rasterInfo),await this._updateClipGeometry()}async syncJobHandler(){return this.rasterJobHandler?.updateRasterFunction(this.rasterFunction)}async _processPixelBlock(e,t,i){const{processParameters:n,primaryRasters:{rasterIds:r}}=this;return this.rasterJobHandler?await this.rasterJobHandler.process({extent:t,primaryPixelBlocks:e,primaryPixelSizes:i,primaryRasterIds:r,parameters:n}):this.rasterFunction.process({extent:t,primaryPixelBlocks:e,primaryPixelSizes:i,primaryRasterIds:r},n)}async _updateClipGeometry(){const e=this.rasterFunction.getClippingGeometries()[0];let t=e?.clippingGeometry;if(t&&"inside"===e.clippingType){const{extent:e}=this.rasterInfo,n=await Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(2261)]).then(i.bind(i,88411)),r=await Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(9598)]).then(i.bind(i,93054));let s=n.execute(l.A.fromExtent(e),2*(e.width+e.height)/40);s=(0,d.uk)(s,t.spatialReference),t=r.execute(s,t)}this._clippingGeometry.clear(),t&&this._clippingGeometry.set("0",t)}};(0,n.Cg)([(0,s.MZ)({type:String,json:{write:!0}})],p.prototype,"datasetFormat",void 0),(0,n.Cg)([(0,s.MZ)()],p.prototype,"tileType",void 0),(0,n.Cg)([(0,s.MZ)()],p.prototype,"rasterFunction",void 0),(0,n.Cg)([(0,s.MZ)()],p.prototype,"processParameters",void 0),(0,n.Cg)([(0,s.MZ)()],p.prototype,"primaryRasters",void 0),p=(0,n.Cg)([(0,s.$K)("esri.layers.raster.datasets.FunctionRaster")],p)}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5335],{66344(e,t,n){n.d(t,{q:()=>a});const i=!!(0,n(44208).A)("esri-tests-disable-gpu-memory-measurements");Symbol.iterator;class r{get size(){return this._size}constructor(e=10485760,t=.3){this._maxSize=e,this._maxClientSizeRatio=t,this._db=new Map,this._size=0,this._hit=0,this._miss=0,this._clients=new Map,this._sizeLimits=new Map}destroy(){this.clearAll(),this._sizeLimits.clear(),this._clients.clear(),this._db.clear()}register(e){this._clients.set(e.id.slice(0,-1),e)}deregister(e){this.clear(e),this._sizeLimits.delete(e),this._clients.delete(e.id.slice(0,-1))}get maxSize(){return this._maxSize}set maxSize(e){this._maxSize=Math.max(e,-1),this._checkSize()}get _maxClientSize(){return this._maxSize*this._maxClientSizeRatio}getSize(e,t){const n=this._db.get(e.id+t);return n?.size??0}put(e,t,n,r,l){t=e.id+t;const a=this._db.get(t);if(a&&(this._size-=a.size,e.size-=a.size,this._db.delete(t),a.entry!==n&&this._notifyRemove(t,a.entry,a.size,0)),r>this._maxSize)return void this._notifyRemove(t,n,r,0);if(void 0===n)return void console.warn("Refusing to cache undefined entry ");if(!r||r<0)return i||console.warn(`Refusing to cache entry with size ${r} for key ${t}`),void this._notifyRemove(t,n,0,0);const o=1+Math.max(l,-4)- -3;this._db.set(t,new s(n,r,o)),this._size+=r,e.size+=r,this._checkSize()}updateSize(e,t){t=e.id+t;const n=this._db.get(t);if(!n)return;this._size-=n.size,e.size-=n.size;let i=n.entry.usedMemory;for(;i>this._maxSize;){const e=this._notifyRemove(t,n.entry,i,1);if(!(null!=e&&e>0))return void this._db.delete(t);i=e}n.size=i,this._size+=i,e.size+=i,this._checkSize()}pop(e,t){t=e.id+t;const n=this._db.get(t);if(n)return this._size-=n.size,e.size-=n.size,this._db.delete(t),++this._hit,n.entry;++this._miss}get(e,t){t=e.id+t;const n=this._db.get(t);if(void 0!==n)return this._db.delete(t),n.lives=n.lifetime,this._db.set(t,n),++this._hit,n.entry;++this._miss}peek(e,t){const n=this._db.get(e.id+t);return n?++this._hit:++this._miss,n?.entry}get performanceInfo(){const e={Size:Math.round(this._size/1048576)+"/"+Math.round(this._maxSize/1048576)+"MB","Hit rate":Math.round(100*this._getHitRate())+"%",Entries:this._db.size.toString()},t={},n=new Array;this._db.forEach((e,i)=>{const r=e.lifetime;n[r]=(n[r]||0)+e.size,this._clients.forEach(n=>{const{id:r,name:s}=n;if(i.startsWith(r)){const n=t[s]||0;t[s]=n+e.size}})});const i={};this._clients.forEach(e=>{const n=e.name;if("hitRate"in e&&"number"==typeof e.hitRate&&!isNaN(e.hitRate)&&e.hitRate>0){const r=t[n]||0;t[n]=r,i[n]=Math.round(100*e.hitRate)+"%"}else i[n]="0%"});const r=Object.keys(t);r.sort((e,n)=>t[n]-t[e]),r.forEach(n=>e[n]=Math.round(t[n]/2**20)+"MB / "+i[n]);for(let t=n.length-1;t>=0;--t){const i=n[t];i&&(e["Priority "+(t+-3-1)]=Math.round(i/this._size*100)+"%")}return e}resetStats(){this._hit=this._miss=0,this._clients.forEach(e=>e.resetHitRate())}clear(e){const t=e.id;this._db.forEach((e,n)=>{n.startsWith(t)&&(this._size-=e.size,this._db.delete(n),this._notifyRemove(n,e.entry,e.size,0))}),e.size=0}clearAll(){this._db.forEach((e,t)=>this._notifyRemove(t,e.entry,e.size,0)),this._clients.forEach(e=>e.size=0),this._size=0,this._db.clear()}*values(e){for(const[t,n]of this._db)t.startsWith(e.id)&&(yield n.entry)}_getHitRate(){return this._hit/(this._hit+this._miss)}_notifyRemove(e,t,n,i){const r=this._clients.get(e.split(l)[0])?.removeFunc,s=r?.(t,i,n);return"number"==typeof s?s:null}_checkSize(){this._sizeLimits.forEach((e,t)=>this._checkSizeLimits(e,t)),this._clients.forEach(e=>this._checkSizeLimits(this._maxClientSize,e)),this._checkSizeLimits(this.maxSize)}setMaxClientSize(e,t){null==t||t<=0?this._sizeLimits.delete(e):this._sizeLimits.set(e,t)}_checkSizeLimits(e,t){const n=t??this;if(n.size<=e)return;const i=t?.id;let r=!0;for(;r;){r=!1;for(const[s,a]of this._db)if(0===a.lifetime&&(!i||s.startsWith(i))){const i=t??this._clients.get(s.split(l)[0]);if(this._purgeItem(s,a,i),n.size<=.9*e)return;r||=this._db.has(s)}}for(const[r,s]of this._db)if(!i||r.startsWith(i)){const i=t??this._clients.get(r.split(l)[0]);if(this._purgeItem(r,s,i),n.size<=.9*e)return}}_purgeItem(e,t,n){if(this._db.delete(e),t.lives<=1){this._size-=t.size,n&&(n.size-=t.size);const i=this._notifyRemove(e,t.entry,t.size,1);null!=i&&i>0&&(this._size+=i,n&&(n.size+=i),t.lives=t.lifetime,t.size=i,this._db.set(e,t))}else--t.lives,this._db.set(e,t)}}new r(0);class s{constructor(e,t,n){this.entry=e,this.size=t,this.lifetime=n,this.lives=n}}const l=":";class a{constructor(e,t){this.removeFunc=t,this.id="",this.name="",this.size=0,this._storage=new r(e,1),this._storage.register(this)}destroy(){this._storage.deregister(this),this._storage.destroy()}put(e,t,n=1){this._storage.put(this,e,t,n,1)}pop(e){return this._storage.pop(this,e)}get(e){return this._storage.get(this,e)}clear(){this._storage.clearAll()}get maxSize(){return this._storage.maxSize}set maxSize(e){this._storage.maxSize=e}resetHitRate(){}}},60999(e,t,n){n.d(t,{DZ:()=>p,Ke:()=>d,Tj:()=>c,UT:()=>m,aD:()=>y,jJ:()=>u});var i=n(5482),r=n(69622),s=n(97768),l=n(17676),a=n(10107),o=n(64108);function u(e,t,n){return(0,l.Lx)(e.map((e,i)=>t.apply(n,[e,i])))}async function c(e,t,n){return(await(0,l.Lx)(e.map((e,i)=>t.apply(n,[e,i])))).map(e=>e.value)}function h(e){return{ok:!0,value:e}}function f(e){return{ok:!1,error:e}}async function d(e){if(null==e)return{ok:!1,error:new Error("no promise provided")};try{return h(await e)}catch(e){return f(e)}}async function p(e){try{return h(await e)}catch(e){return(0,l.QP)(e),f(e)}}function m(e,t){return new g(e,t)}let g=class extends r.A{get value(){return null!=(e=this._result)&&!0===e.ok?e.value:null;var e}get error(){return null!=(e=this._result)&&!1===e.ok?e.error:null;var e}get finished(){return null!=this._result}constructor(e,t){super({}),this._result=null,this._abortHandle=null,this.abort=()=>{this._abortController=(0,s.DC)(this._abortController)},this.remove=this.abort,this._abortController=new AbortController;const{signal:n}=this._abortController;this.promise=e(n),this.promise.then(e=>{this._result=h(e),this._cleanup()},e=>{this._result=f(e),this._cleanup()}),this._abortHandle=(0,l.u7)(t,this.abort)}normalizeCtorArgs(){return{}}destroy(){this.abort()}_cleanup(){this._abortHandle=(0,s.xt)(this._abortHandle),this._abortController=null}};(0,i.Cg)([(0,a.MZ)()],g.prototype,"value",null),(0,i.Cg)([(0,a.MZ)()],g.prototype,"error",null),(0,i.Cg)([(0,a.MZ)()],g.prototype,"finished",null),(0,i.Cg)([(0,a.MZ)()],g.prototype,"promise",void 0),(0,i.Cg)([(0,a.MZ)()],g.prototype,"_result",void 0),g=(0,i.Cg)([(0,o.$)("esri.core.asyncUtils.ReactiveTask")],g);class y{constructor(){this._sequence=Promise.resolve()}async acquire(){let e;this._sequence=new Promise(t=>{e=this._sequence.then(()=>t,()=>t)});const t=await e;return{[Symbol.dispose]:t}}async run(e){const t={stack:[],error:void 0,hasError:!1};try{return(0,i.mS)(t,await this.acquire(),!1),await e()}catch(e){t.error=e,t.hasError=!0}finally{(0,i.hk)(t)}}}},83027(e,t,n){n.d(t,{h:()=>i});const i=n(29953).ho},159(e,t,n){n.d(t,{A:()=>u});var i,r=n(5482),s=n(69540),l=n(25482),a=n(91429),o=n(99157);let u=i=class extends((0,s.OU)(l.o)){constructor(e){super(e),this.steps=[]}getInverse(){const e=new i;for(let t=this.steps.length-1;t>=0;t--){const n=this.steps[t];e.steps.push(n.getInverse())}return e}};(0,r.Cg)([(0,a.MZ)({type:[o.A],nonNullable:!0,json:{name:"geoTransforms"}})],u.prototype,"steps",void 0),u=i=(0,r.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformation")],u)},99157(e,t,n){n.d(t,{A:()=>o});var i,r=n(5482),s=n(69540),l=n(25482),a=n(91429);let o=i=class extends((0,s.OU)(l.o)){constructor(e){super(e),this.isInverse=!1,this.wkt=null,this.wkid=null}getInverse(){return new i({isInverse:!this.isInverse,wkid:this.wkid,wkt:this.wkt})}};(0,r.Cg)([(0,a.MZ)({json:{name:"transformForward",read:e=>!e,write:(e,t,n)=>{t[n]=!e}}})],o.prototype,"isInverse",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],o.prototype,"wkt",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],o.prototype,"wkid",void 0),o=i=(0,r.Cg)([(0,a.$K)("esri.geometry.operators.support.GeographicTransformationStep")],o)},9762(e,t,n){n.r(t),n.d(t,{projectBuffer:()=>r});var i=n(49208);function r(e,t,n,r,s,l,a=Math.floor(e.length/3)){const o=(0,i.jd)(t,s);if(null==o)return!1;if(o===i.pO){if(e===r&&n===l)return!0;const t=n+3*a;for(let i=n,s=l;i<t;i++,s++)r[s]=e[i]??0;return!0}const u=n+3*a;for(let t=n,i=l;t<u;t+=3,i+=3)o(e,t,r,i);return!0}},49208(e,t,n){n.d(t,{Tp:()=>h,jd:()=>c,pO:()=>d,w5:()=>u});var i=n(34727),r=n(86211),s=n(73941),l=n(79258),a=n(34403),o=n(21325);const u={2:{5:d,7:null,9:null,10:d,1:M,6:null,8:null,0:null,3:m,11:g,2:d,4:b},5:{5:d,7:null,9:null,10:d,1:M,6:null,8:null,0:null,3:m,11:g,2:d,4:b},7:{5:null,7:d,9:null,10:d,1:null,6:w,8:null,0:null,3:null,11:null,2:null,4:null},9:{5:null,7:null,9:d,10:d,1:null,6:null,8:v,0:null,3:null,11:null,2:null,4:null},3:{5:p,7:null,9:null,10:p,1:function(e,t,n,i){const r=e[t]/k,s=C-2*Math.atan(Math.exp(-e[t+1]/k)),l=k+(e[t+2]??0),a=Math.cos(s)*l;n[i]=Math.cos(r)*a,n[i+1]=Math.sin(r)*a,n[i+2]=Math.sin(s)*l},6:null,8:null,0:null,3:d,11:function(e,t,n,i){p(e,t,n,i),g(n,i,n,i)},2:p,4:function(e,t,n,i){p(e,t,n,i),b(n,i,n,i)}},4:{5:P,7:null,9:null,10:P,1:function(e,t,n,i){P(e,t,n,i),M(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){P(e,t,n,i),m(n,i,n,i)},11:function(e,t,n,i){P(e,t,n,i),g(n,i,n,i)},2:P,4:d},1:{5:S,7:null,9:null,10:S,1:d,6:null,8:null,0:null,3:function(e,t,n,i){S(e,t,n,i),m(n,i,n,i)},11:function(e,t,n,i){S(e,t,n,i),g(n,i,n,i)},2:S,4:function(e,t,n,i){S(e,t,n,i),b(n,i,n,i)}},6:{5:null,7:I,9:null,10:I,1:null,6:d,8:null,0:null,3:null,11:null,2:null,4:null},8:{5:null,7:null,9:R,10:R,1:null,6:null,8:d,0:null,3:null,11:null,2:null,4:null},0:{5:null,7:null,9:null,10:null,1:null,6:null,8:null,0:d,3:null,11:null,2:null,4:null},10:{5:d,7:d,9:d,10:d,1:M,6:w,8:v,0:null,3:m,11:g,2:d,4:b},11:{5:y,7:null,9:null,10:y,1:function(e,t,n,i){y(e,t,n,i),M(n,i,n,i)},6:null,8:null,0:null,3:function(e,t,n,i){y(e,t,n,i),m(n,i,n,i)},11:d,2:y,4:function(e,t,n,i){y(e,t,n,i),b(n,i,n,i)}}};function c(e,t){return h(e,t)?.projector}function h(e,t){if(null==e||null==t)return null;if(A.source.spatialReference===e&&A.dest.spatialReference===t)return A;const n=f(e,A.source),i=f(t,A.dest);return 0===n&&0===i?(0,o.aI)(e,t)?A.projector=d:A.projector=null:A.projector=u[n][i],A}function f(e,t){return e?t.spatialReference===e?t.spatialReferenceId:(t.spatialReference=e,"metersPerUnit"in t&&(t.metersPerUnit=(0,r.GA)(e,1)),(0,s.jA)(e)?t.spatialReferenceId=1:(0,o.oT)(e)?t.spatialReferenceId=2:(0,o.K8)(e)?t.spatialReferenceId=3:(0,o.r1)(e)?t.spatialReferenceId=11:e.wkt===s.Ro.wkt?t.spatialReferenceId=4:4490===e.wkid?t.spatialReferenceId=5:e.wkt===s.FY.wkt?t.spatialReferenceId=6:e.wkt===s.LJ.wkt?t.spatialReferenceId=8:(0,s.q8)(e)?t.spatialReferenceId=7:(0,s.KQ)(e)?t.spatialReferenceId=9:t.spatialReferenceId=0):0}function d(e,t,n,i){e!==n&&(n[i++]=e[t++],n[i++]=e[t++],n[i]=e[t]??0)}function p(e,t,n,i){n[i]=x*(e[t]/k),n[i+1]=x*(C-2*Math.atan(Math.exp(-e[t+1]/k))),n[i+2]=e[t+2]??0}function m(e,t,n,r){!function(e,t,n,r,s){const l=.4999999*Math.PI,a=(0,i.qE)(E*e[t+1],-l,l),o=Math.sin(a);n[r++]=E*e[t]*s.radius,n[r++]=s.halfSemiMajorAxis*Math.log((1+o)/(1-o)),n[r]=e[t+2]??0}(e,t,n,r,l.$O)}function g(e,t,n,i){n[i]=e[t]*L,n[i+1]=e[t+1]*L,n[i+2]=e[t+2]??0}function y(e,t,n,i){n[i]=e[t]*T,n[i+1]=e[t+1]*T,n[i+2]=e[t+2]??0}function _(e,t,n,i,r){const s=r+(e[t+2]??0),l=E*e[t],a=E*e[t+1],o=Math.cos(a)*s;n[i]=Math.cos(l)*o,n[i+1]=Math.sin(l)*o,n[i+2]=Math.sin(a)*s}function v(e,t,n,i){_(e,t,n,i,l.Sw.radius)}function w(e,t,n,i){_(e,t,n,i,l.sH.radius)}function M(e,t,n,i){_(e,t,n,i,l.$O.radius)}function z(e,t,n,r,s){const l=e[t],a=e[t+1],o=e[t+2]??0,u=Math.sqrt(l*l+a*a+o*o),c=(0,i.YN)(o/(0===u?1:u)),h=Math.atan2(a,l);n[r++]=x*h,n[r++]=x*c,n[r]=u-s}function R(e,t,n,i){z(e,t,n,i,l.Sw.radius)}function I(e,t,n,i){z(e,t,n,i,l.sH.radius)}function S(e,t,n,i){z(e,t,n,i,l.$O.radius)}function b(e,t,n,i){!function(e,t,n,i,r){const s=E*e[t],l=E*e[t+1],a=e[t+2]??0,o=Math.sin(l),u=Math.cos(l),c=r.radius/Math.sqrt(1-r.eccentricitySquared*o*o);n[i++]=(c+a)*u*Math.cos(s),n[i++]=(c+a)*u*Math.sin(s),n[i++]=(c*(1-r.eccentricitySquared)+a)*o}(e,t,n,i,l.$O)}function P(e,t,n,i){const r=a.TP,s=e[t],o=e[t+1],u=e[t+2]??0;let c,h,f,d,p,m,g,y,_,v,w,M,z,R,I,S,b,P,A,E,C;c=Math.abs(u),h=s*s+o*o,f=Math.sqrt(h),d=h+u*u,p=Math.sqrt(d),E=Math.atan2(o,s),m=u*u/d,g=h/d,R=r.a2/p,I=r.a3-r.a4/p,g>.3?(y=c/p*(1+g*(r.a1+R+m*I)/p),A=Math.asin(y),v=y*y,_=Math.sqrt(1-v)):(_=f/p*(1-m*(r.a5-R-g*I)/p),A=Math.acos(_),v=1-_*_,y=Math.sqrt(v)),w=1-l.$O.eccentricitySquared*v,M=l.$O.radius/Math.sqrt(w),z=r.a6*M,R=f-M*_,I=c-z*y,b=_*R+y*I,S=_*I-y*R,P=S/(z/w+b),A+=P,C=b+S*P/2,u<0&&(A=-A),n[i++]=x*E,n[i++]=x*A,n[i]=C}const A={source:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},dest:{spatialReference:null,spatialReferenceId:0,metersPerUnit:1},projector:d},E=(0,i.kU)(1),x=(0,i.KJ)(1),C=.5*Math.PI,k=l.$O.radius,L=k*Math.PI/180,T=180/(k*Math.PI)},91218(e,t,n){n.r(t),n.d(t,{canProjectWithoutEngine:()=>K,initializeProjection:()=>W,isEqualBaseGCS:()=>Y,isLoaded:()=>k,isLoadedOrLoad:()=>L,isLoadedOrLoadFor:()=>T,load:()=>O,project:()=>U,projectAsync:()=>F,projectExtent:()=>re,projectMany:()=>H,projectMultipoint:()=>V,projectOrLoad:()=>$,projectOrLoadMany:()=>G,projectPoint:()=>Q,projectPolygon:()=>ne,projectPolyline:()=>ee,projectWithoutEngine:()=>N,requiresLoad:()=>j,test:()=>B,tryProject:()=>Z,unload:()=>D});var i=n(49186),r=n(17676),s=n(62788),l=n(95488),a=n(51850),o=n(21276),u=n(73941),c=n(5443),h=n(91075),f=n(48526),d=n(86738),p=n(39829),m=n(82799),g=n(16930),y=n(98764),_=n(159),v=n(9762),w=n(49208);function M(e,t,n,i,r,s){return z[0]=e,z[1]=t,z[2]=n,(0,v.projectBuffer)(z,i,0,r,s,0)}const z=(0,a.vt)();var R=n(60408),I=n(21325),S=n(52006);let b=null,P=null,A=null,E=null,x={};const C=new l.I;function k(){return!!(P?.isLoaded()&&A?.isLoaded()&&E?.isLoaded())}function L(){return!!k()||((0,s.gc)(C),O(),!1)}function T(e,t){return!e||!t||K(e,t)||L()}function j(e,t){return!K(e,t)&&!k()}async function O(e){null==b&&(b=Promise.all([n.e(3276).then(n.bind(n,83276)).then(e=>(P=e,P.load())),n.e(8377).then(n.bind(n,8377)).then(e=>(A=e,A.load())),n.e(2158).then(n.bind(n,12158)).then(e=>(E=e,E.load()))])),await b,(0,r.Te)(e),C.notify()}function U(e,t,n){return Array.isArray(e)?0===e.length?[]:((0,o.H)(e),H(e,e[0].spatialReference,t,n)):((0,o.f)(e),H([e],e.spatialReference,t,n)[0])}function H(e,t,n,i){if(null==t||null==n)return e;if(K(t,n,i))return e.map(e=>N(e,t,n));if(null==i?.geographicTransformation&&(0,u.jA)(t))return H(e.map(e=>N(e,t,g.A.WGS84)),g.A.WGS84,n,{zConversionDisabled:i?.zConversionDisabled});if(null==i?.geographicTransformation&&(0,u.jA)(n))return H(e,t,g.A.WGS84).map(e=>N(e,g.A.WGS84,n));if(!k())throw new q;if(!i?.geographicTransformation)if(i?.extendedParams)i={...i,geographicTransformation:E.getTransformation(t,n,i.areaOfInterestExtent)||new _.A};else if(!i?.areaOfInterestExtent){const e=function(e,t){return[e.wkid?.toString()??"-1",e.wkt?.toString()??"",e.wkt2?.toString()??"",t.wkid?.toString()??"-1",t.wkt?.toString()??"",t.wkt2?.toString()??""].join()}(t,n);let r=x[e];r||(r=E.getTransformation(t,n)||new _.A,x[e]=r),i={geographicTransformation:r,zConversionDisabled:i?.zConversionDisabled}}return e[0].spatialReference||(e[0].spatialReference=t),e[0]instanceof h.A?P.executeMany(e,n,i):A.executeMany(e,n,i)}function Z(e,t,n){try{return U(e,t,n)}catch(e){return null}}function $(e,t){const n=G([e],t);return null!=n.pending?{pending:n.pending,geometry:null}:null!=n.geometries?{pending:null,geometry:n.geometries[0]}:{pending:null,geometry:null}}function G(e,t,n){if(!k())for(const n of e)if(null!=n&&!(0,I.aI)(n.spatialReference,t)&&(0,I.fn)(n.spatialReference)&&(0,I.fn)(t)&&!K(n.spatialReference,t))return(0,s.gc)(C),{pending:O(),geometries:null};return{pending:null,geometries:e.map(e=>null==e?null:(0,I.aI)(e.spatialReference,t)?e:(0,I.fn)(e.spatialReference)&&(0,I.fn)(t)?U(e,t,n):null)}}class q extends i.A{constructor(){super("projection:not-loaded","projection engine not fully loaded yet, please call load()")}}function D(){b=null,P=null,A=null,E=null,x={}}const B={get loadPromise(){return b}};async function F(e,t,n){if((0,r.Te)(n),!e)return e;const i=G(Array.isArray(e)?e:[e],t,n);if(i.pending)return await i.pending,(0,r.Te)(n),F(e,t,n);const s=i.geometries??[];return Array.isArray(e)?s:s[0]}function K(e,t,n){return!(n?.areaOfInterestExtent||n?.extendedParams||n?.geographicTransformation)&&(!!(0,I.aI)(e,t)||(0,I.fn)(e)&&(0,I.fn)(t)&&!!(0,w.jd)(e,t))}function Y(e,t){if((0,I.aI)(e,t))return!0;if(!(0,I.fn)(e)||!(0,I.fn)(t))return!1;const n=(0,I.oT)(e)||(0,I.K8)(e)||(0,I.x1)(e),i=(0,I.oT)(t)||(0,I.K8)(t)||(0,I.x1)(t);return n&&i}async function W(e,t,n,i){if(k())return(0,r.NO)(i);if(Array.isArray(e)){for(const{source:t,dest:n,options:r}of e)if(t&&n&&!K(t,n,r))return O(i)}else if(e&&t&&!K(e,t,n))return O(i);return(0,r.NO)(i)}function N(e,t,n){return e?(0,R.fT)(e)?J(e,t,new d.A,n,0):(0,R.ZC)(e)?se(e,t,new c.A,n,0):(0,R.Bi)(e)?ie(e,t,new p.A,n,0):(0,R.Rg)(e)?te(e,t,new m.A,n,0):(0,R.U9)(e)?X(e,t,new f.A,n,0):null:null}function Q(e,t,n=t.spatialReference,i=0){return null!=n&&null!=e.spatialReference&&null!=J(e,e.spatialReference,t,n,i)}function J(e,t,n,i,r){ue[0]=e.x,ue[1]=e.y;const s=e.z;return ue[2]=void 0!==s?s:r,(0,v.projectBuffer)(ue,t,0,ue,i,0)?(n.x=ue[0],n.y=ue[1],n.spatialReference=i,void 0!==s||(0,u.xP)(i)?(n.z=ue[2],n.hasZ=!0):(n.z=void 0,n.hasZ=!1),void 0===e.m?(n.m=void 0,n.hasM=!1):(n.m=e.m,n.hasM=!0),n):null}function V(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=X(e,e.spatialReference,t,n,i)}function X(e,t,n,i,r){const{points:s,hasZ:l,hasM:a}=e,o=[],u=s.length,c=[];for(const e of s)c.push(e[0],e[1],l?e[2]:r);if(!(0,v.projectBuffer)(c,t,0,c,i,0,u))return null;const h=oe(l,i);for(let e=0;e<u;++e){const t=3*e,n=c[t],i=c[t+1];h&&a?o.push([n,i,c[t+2],s[e][3]]):h?o.push([n,i,c[t+2]]):a?o.push([n,i,s[e][2]]):o.push([n,i])}return n.points=o,n.spatialReference=i,n.hasZ=l,n.hasM=a,n}function ee(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=te(e,e.spatialReference,t,n,i)}function te(e,t,n,i,r){const{curvePaths:s,paths:l,hasZ:a,hasM:o}=e;if(!(s?ae(s,a??!1,o??!1,t,n.curvePaths=[],i,r):le(l,a??!1,o??!1,t,n.paths,i,r)))return null;const u=oe(a,i);return n.spatialReference=i,n.hasZ=u,n.hasM=o,n}function ne(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=ie(e,e.spatialReference,t,n,i)}function ie(e,t,n,i,r){const{curveRings:s,rings:l,hasZ:a,hasM:o}=e;return(s?ae(s,a??!1,o??!1,t,n.curveRings=[],i,r):le(l,a??!1,o??!1,t,n.rings,i,r))?(n.spatialReference=i,n.hasZ=oe(a,i),n.hasM=o,n):null}function re(e,t,n=t.spatialReference,i=0){return null!=e.spatialReference&&null!=n&&null!=se(e,e.spatialReference,t,n,i)}function se(e,t,n,i,r){const{xmin:s,ymin:l,xmax:a,ymax:o,hasZ:u,hasM:c}=e;if(!M(s,l,u?e.zmin:r,t,ue,i))return null;const h=oe(u,i);return n.xmin=ue[0],n.ymin=ue[1],h&&(n.zmin=ue[2]),M(a,o,u?e.zmax:r,t,ue,i)?(n.xmax=ue[0],n.ymax=ue[1],h&&(n.zmax=ue[2]),c&&(n.mmin=e.mmin,n.mmax=e.mmax),n.spatialReference=i,n):null}function le(e,t,n,i,r,s,l=0){const a=new Array;for(const n of e)for(const e of n)a.push(e[0],e[1],t?e[2]:l);if(!(0,v.projectBuffer)(a,i,0,a,s,0))return!1;let o=0;r.length=0;const u=t?3:2,c=oe(t,s);for(const t of e){const e=new Array;for(const i of t){const t=a.slice(o,o+=3);c||t.pop(),n&&t.push(i[u]),e.push(t)}r.push(e)}return!0}function ae(e,t,n,i,r,s,l=0){const a=new Array;for(const n of e)for(const e of n){if((0,S.FG)(e))return!1;if((0,S.aO)(e)){const[n,i]=e.c;a.push(n[0],n[1],t?n[2]:l,i[0],i[1],l);continue}if((0,S.n1)(e)){const[n,i,r]=e.b;a.push(n[0],n[1],t?n[2]:l,i[0],i[1],l,r[0],r[1],l);continue}const n=e;a.push(n[0],n[1],t?n[2]:l)}if(!(0,v.projectBuffer)(a,i,0,a,s,0))return!1;let o=0;r.length=0;const u=t?3:2,c=oe(t,s);for(const t of e){const e=new Array;for(const i of t){const t=a.slice(o,o+=3);if(c||t.pop(),n&&t.push((0,S.yP)(i)[u]),(0,S.FG)(i))return!1;if((0,S.aO)(i)){const n=a[o++],i=a[o++];++o,e.push({c:[t,[n,i]]});continue}if((0,S.n1)(i)){const n=a[o++],i=a[o++];++o;const r=a[o++],s=a[o++];++o,e.push({b:[t,[n,i],[r,s]]});continue}e.push(t)}r.push(e)}return!0}function oe(e,t){return e||(0,u.xP)(t)||(0,I.aI)(t,y.Y0)}const ue=(0,a.vt)()},98764(e,t,n){n.d(t,{GD:()=>l,Y0:()=>u,lO:()=>c});var i=n(73941),r=n(16930),s=n(21325);const l=new r.A(i.fv),a=new r.A(i.FY),o=new r.A(i.LJ),u=new r.A(i.Ro);function c(e){const t=h.get(e);if(t)return t;let n=l;if(e)if(e===a)n=a;else if(e===o)n=o;else{const t=e.wkid,i=e.latestWkid;if(null!=t||null!=i)(0,s.tl)(t)||(0,s.tl)(i)?n=a:((0,s.ZL)(t)||(0,s.ZL)(i))&&(n=o);else{const t=e.wkt2??e.wkt;if(t){const e=t.toUpperCase();e===f?n=a:e===d&&(n=o)}}}return h.set(e,n),n}const h=new Map,f=a.wkt.toUpperCase(),d=o.wkt.toUpperCase()},34403(e,t,n){n.d(t,{TP:()=>l});var i=n(79258);Math.PI;const r=i.$O.radius,s=i.$O.eccentricitySquared,l={a1:r*s,a2:r*s*r*s,a3:r*s*s/2,a4:r*s*r*s*2.5,a5:r*s+r*s*s/2,a6:1-s};i.$O.radius,i.$O.flattening,i.Sw.radius,i.Sw.flattening,i.sH.radius,i.sH.flattening,i.sH.radius},8303(e,t,n){n.d(t,{A:()=>M});var i=n(5482),r=n(92602),s=n(70333),l=n(11254),a=n(60999),o=n(49186),u=n(53966),c=n(97768),h=n(17676),f=n(84952),d=n(91429),p=n(77548),m=n(20655),g=n(80812),y=n(41318),_=n(10407),v=n(36005),w=n(43937);const M=e=>{const t=e;let M=class extends t{constructor(){super(...arguments),this.resourceReferences={portalItem:null,paths:[]},this.userHasEditingPrivileges=!0,this.userHasFullEditingPrivileges=!1,this.userHasUpdateItemPrivileges=!1}destroy(){this.portalItem=(0,c.pR)(this.portalItem),this.resourceReferences.portalItem=null,this.resourceReferences.paths.length=0}get portalItem(){return this._get("portalItem")}set portalItem(e){e!==this._get("portalItem")&&(this.removeOrigin("portal-item"),this._set("portalItem",e))}readPortalItem(e,t,n){if(t.itemId)return new g.default({id:t.itemId,portal:n?.portal})}writePortalItem(e,t){e?.id&&(t.itemId=e.id)}async loadFromPortal(e,t){if(this.portalItem?.id)try{const{load:i}=await n.e(1204).then(n.bind(n,41204));return(0,h.Te)(t),await i({instance:this,supportedTypes:e.supportedTypes,validateItem:e.validateItem,supportsData:e.supportsData,layerModuleTypeMap:e.layerModuleTypeMap,populateGroupLayer:e.populateGroupLayer},t)}catch(e){throw(0,h.zf)(e)||u.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,h.QP)(e),!0)))}async setUserPrivileges(e,t){if(!r.A.userPrivilegesApplied)return this.finishLoadEditablePortalLayer(t);if(this.url)try{const{features:{edit:n,fullEdit:i},content:{updateItem:r}}=await this._fetchUserPrivileges(e,t);this._set("userHasEditingPrivileges",n),this._set("userHasFullEditingPrivileges",i),this._set("userHasUpdateItemPrivileges",r)}catch(e){(0,h.QP)(e)}}async _fetchUserPrivileges(e,t){let n=this.portalItem;if(!e||!n||!n.loaded||n.sourceUrl)return this._fetchFallbackUserPrivileges(t);const i=!s.id?.findCredential(this.url),r=e===n.id;if(r&&n.portal.user)return this._getUserPrivileges(n,i);let l,a;if(r)l=n.portal.url;else try{l=await(0,p.wI)(this.url,t)}catch(e){(0,h.QP)(e)}if(!l||!(0,f.b8)(l,n.portal.url))return this._fetchFallbackUserPrivileges(t);try{const e=null!=t?t.signal:null;a=await(s.id?.getCredential(`${l}/sharing`,{prompt:!1,signal:e}))}catch(e){(0,h.QP)(e)}const o=!0,u=!1,c=!1;if(!a)return{features:{edit:o,fullEdit:u},content:{updateItem:c}};try{if(r?await n.reload():(n=new g.default({id:e,portal:{url:l}}),await n.load(t)),n.portal.user)return this._getUserPrivileges(n,i)}catch(e){(0,h.QP)(e)}return{features:{edit:o,fullEdit:u},content:{updateItem:c}}}_getUserPrivileges(e,t){const n=(0,_.It)(e);return t&&(n.features.edit=!0),n}async _fetchFallbackUserPrivileges(e){let t=!0;try{t=await this._fetchUserHasEditingPrivileges(e)}catch(e){(0,h.QP)(e)}return{features:{edit:t,fullEdit:!1},content:{updateItem:!1}}}async _fetchUserHasEditingPrivileges(e){const t=this.url?s.id?.findCredential(this.url):null;if(!t)return!0;const n=z.credential===t?z.user:await this._fetchEditingUser(e);return z.credential=t,z.user=n,null==n?.privileges||n.privileges.includes("features:user:edit")}async _fetchEditingUser(e){const t=this.portalItem?.portal?.user;if(t)return t;const n=s.id?.findServerInfo(this.url??"");if(!n?.owningSystemUrl)return null;const i=`${n.owningSystemUrl}/sharing/rest`,r=m.A.getDefault();if(r&&r.loaded&&(0,f.S8)(r.restUrl)===(0,f.S8)(i))return r.user;const o=`${i}/community/self`,u=null!=e?e.signal:null,c=await(0,a.Ke)((0,l.A)(o,{authMode:"no-prompt",query:{f:"json"},signal:u}));return c.ok?y.A.fromJSON(c.value.data):null}read(e,t){t&&(t.layer=this),super.read(e,t)}write(e,t){const n=t?.portal,i=this.portalItem?.id&&(this.portalItem.portal||m.A.getDefault());return n&&i&&!(0,f.ut)(i.restUrl,n.restUrl)?(t.messages&&t.messages.push(new o.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,i.Cg)([(0,d.MZ)({type:g.default})],M.prototype,"portalItem",null),(0,i.Cg)([(0,v.w)("web-document","portalItem",["itemId"])],M.prototype,"readPortalItem",null),(0,i.Cg)([(0,w.K)("web-document","portalItem",{itemId:{type:String}})],M.prototype,"writePortalItem",null),(0,i.Cg)([(0,d.MZ)({clonable:!1})],M.prototype,"resourceReferences",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasEditingPrivileges",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasFullEditingPrivileges",void 0),(0,i.Cg)([(0,d.MZ)({type:Boolean,readOnly:!0})],M.prototype,"userHasUpdateItemPrivileges",void 0),M=(0,i.Cg)([(0,d.$K)("esri.layers.mixins.PortalLayer")],M),M},z={credential:null,user:null}},10407(e,t,n){n.d(t,{It:()=>d,LG:()=>l,OM:()=>u,Sm:()=>c,Y:()=>a,bK:()=>o,mm:()=>f,sQ:()=>h});var i=n(91218),r=n(16930),s=n(28735);function l(e,t){if(!a(e,t)){const n=e.typeKeywords;n?n.push(t):e.typeKeywords=[t]}}function a(e,t){return!!e.typeKeywords?.includes(t)}function o(e){return a(e,f.HOSTED_SERVICE)}function u(e,t){const n=e.typeKeywords;if(n){const e=n.indexOf(t);e>-1&&n.splice(e,1)}}function c(e,t,n){n?l(e,t):u(e,t)}async function h(e){const t=e.clone().normalize();let n;if(t.length>1)for(const e of t)n?e.width>n.width&&(n=e):n=e;else n=t[0];return async function(e){const t=e.spatialReference;if(t.isWGS84)return e.clone();if(t.isWebMercator)return(0,s.ci)(e);const n=r.A.WGS84;return await(0,i.initializeProjection)(t,n),(0,i.project)(e,n)}(n)}const f={CHARTS:"Charts",DYNAMIC:"Dynamic",DEVELOPER_BASEMAP:"DeveloperBasemap",GROUP_LAYER_MAP:"Map",HOSTED_SERVICE:"Hosted Service",JSAPI:"ArcGIS API for JavaScript",LOCAL_SCENE:"ViewingMode-Local",METADATA:"Metadata",MULTI_LAYER:"Multilayer",ORIENTED_IMAGERY_LAYER:"OrientedImageryLayer",SINGLE_LAYER:"Singlelayer",SUBTYPE_GROUP_LAYER:"SubtypeGroupLayer",SUBTYPE_GROUP_TABLE:"SubtypeGroupTable",TABLE:"Table",TILED_IMAGERY:"Tiled Imagery"};function d(e){const{portal:t,isOrgItem:n,itemControl:i}=e,r=t.user?.privileges;let s=!r||r.includes("features:user:edit"),l=!!n&&!!r?.includes("features:user:fullEdit");const a="update"===i||"admin"===i;return a?l=s=!0:l&&(s=!0),{features:{edit:s,fullEdit:l},content:{updateItem:a}}}},78553(e,t,n){n.d(t,{D:()=>s,p:()=>r});var i=n(56507);function r(e){const t=(0,i.Vr)(100*(1-e));return Math.max(0,Math.min(t,100))}function s(e){const t=1-e/100;return Math.max(0,Math.min(t,1))}}}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[91,895,1775,1948,3931,6061,8125],{61691(e,t,i){i.d(t,{G:()=>n});class n{*[Symbol.iterator](){let e=this.next();for(;e;)yield e,e=this.next()}}},76061(e,t,i){i.d(t,{S:()=>r});var n=i(61691);class r extends n.G{constructor(e){super(),this.m_iGeom=-1,this.m_aGeoms=e?e.slice():[]}next(){if(this.m_iGeom<this.m_aGeoms.length-1){const e=this.m_aGeoms[++this.m_iGeom];return this.m_aGeoms[this.m_iGeom]=null,e}return null}tock(){return!1}getGeometryID(){return this.m_iGeom}getRank(){return 1}}},65708(e,t,i){i.d(t,{a:()=>o,e:()=>s});var n=i(86211),r=i(78125);function s(e,t={}){const{unit:i}=t;let s=(0,r.fromGeometry)(e).calculateArea2D();if(s&&i){const t=(0,r.getSpatialReference)(e);if(t.isGeographic)throw new Error("Unable to convert from an angular area unit to a linear area unit.");const o=(0,n.B5)(t);o!==i&&(o?s=(0,n.oU)(s,o,i):(s=Math.sqrt(s),s*=(0,n.GA)(t),s**=2,s=(0,n.oU)(s,"square-meters",i)))}return s}const o=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:!0},Symbol.toStringTag,{value:"Module"}))},49590(e,t,i){i.d(t,{e:()=>p,g:()=>f,l:()=>u});var n=i(86211),r=i(86742),s=i(5808);let o,a,l,c;function h(){return!!o&&(0,r.s1)()}async function u(){if(!h()){const[e]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(1550)]).then(i.bind(i,78125)),(0,r.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=(0,r.fz)()}}function p(e,t={}){const{curveType:i="geodesic",unit:c}=t,h=l(e);let u=(0,r.g7)(o(e),a(h),s.O[i]);return u&&c&&(u=(0,n.oU)(u,"square-meters",c)),u}const f=Object.freeze(Object.defineProperty({__proto__:null,execute:p,isLoaded:h,load:u,get supportsCurves(){return c}},Symbol.toStringTag,{value:"Module"}))},27749(e,t,i){i.d(t,{e:()=>f,g:()=>d,l:()=>p});var n=i(86211),r=i(77085),s=i(5808);let o,a,l,c,h;function u(){return!!o&&(0,r.s1)()}async function p(){if(!u()){const[e]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(1666)]).then(i.bind(i,78125)),(0,r.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=e.toGeometry,h=(0,r.fz)()}}function f(e,t,i={}){const{curveType:h="geodesic",unit:u}=i;u&&(t=(0,n.oU)(t,u,"meters"));const p=l(e);return c((0,r.g7)(o(e),t,a(p),s.O[h]),p)}const d=Object.freeze(Object.defineProperty({__proto__:null,execute:f,executeMany:function(e,t,i={}){const{curveType:h="geodesic",unit:u}=i;u&&(t=(0,n.oU)(t,u,"meters"));const p=e.map(o),f=l(e);return(0,r.zo)(p,t,a(f),s.O[h]).map(e=>c(e,f))},isLoaded:u,load:p,get supportsCurves(){return h}},Symbol.toStringTag,{value:"Module"}))},39663(e,t,i){i.d(t,{e:()=>p,g:()=>f,l:()=>u});var n=i(86211),r=i(35223),s=i(5808);let o,a,l,c;function h(){return!!o&&(0,r.s1)()}async function u(){if(!h()){const[e]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(1550)]).then(i.bind(i,78125)),(0,r.Hh)()]);o=e.fromGeometry,a=e.fromSpatialReference,l=e.getSpatialReference,c=(0,r.fz)()}}function p(e,t={}){const{curveType:i="geodesic",unit:c}=t,h=l(e);let u=(0,r.g7)(o(e),a(h),s.O[i]);return u&&c&&(u=(0,n.oU)(u,"meters",c)),u}const f=Object.freeze(Object.defineProperty({__proto__:null,execute:p,isLoaded:h,load:u,get supportsCurves(){return c}},Symbol.toStringTag,{value:"Module"}))},7817(e,t,i){i.d(t,{e:()=>s,l:()=>a,s:()=>o});var n=i(86211),r=i(78125);function s(e,t={}){const{unit:i}=t;let s=(0,r.fromGeometry)(e).calculateLength2D();if(s&&i){const t=(0,r.getSpatialReference)(e);s=(0,n.PQ)(s,t,i)}return s}const o=!0,a=Object.freeze(Object.defineProperty({__proto__:null,execute:s,supportsCurves:o},Symbol.toStringTag,{value:"Module"}))},10222(e,t,i){i.d(t,{e:()=>s,s:()=>a});var n=i(81150),r=i(78125);function s(e){const t=(0,r.getSpatialReference)(e);return(0,r.toGeometry)((0,n.g7)((0,r.fromGeometry)(e),(0,r.fromSpatialReference)(t),!1),t)}const o=(0,n.fz)(),a=Object.freeze(Object.defineProperty({__proto__:null,execute:s,executeMany:function(e){const t=e.map(r.fromGeometry),i=(0,r.getSpatialReference)(e);return(0,n.zo)(t,(0,r.fromSpatialReference)(i),!1).map(e=>(0,r.toGeometry)(e,i))},isSimple:function(e){return(0,n.Pg)((0,r.fromGeometry)(e),(0,r.fromSpatialReference)((0,r.getSpatialReference)(e)),!1)},supportsCurves:o},Symbol.toStringTag,{value:"Module"}))},73354(e,t,i){i.d(t,{a:()=>p,b:()=>l,c:()=>a,d:()=>s,e:()=>f,f:()=>u,l:()=>h,n:()=>d,t:()=>o});var n=i(40876),r=(i(44208),i(72727));function s(e,t,i){o(e.typedBuffer,t.typedBuffer,i,e.typedBufferStride,t.typedBufferStride)}function o(e,t,i,n=3,s=n){const o=(0,r.k)(e.length,n,3),a=(0,r.k)(t.length,s,3),l=Math.min(o,a),c=i[0],h=i[1],u=i[2],p=i[4],f=i[5],d=i[6],m=i[8],g=i[9],y=i[10],v=i[12],w=i[13],x=i[14];let _=0,C=0;for(let i=0;i<l;i++){const i=t[_],r=t[_+1],o=t[_+2];e[C]=c*i+p*r+m*o+v,e[C+1]=h*i+f*r+g*o+w,e[C+2]=u*i+d*r+y*o+x,_+=s,C+=n}return e}function a(e,t,i){l(e.typedBuffer,t.typedBuffer,i,e.typedBufferStride,t.typedBufferStride)}function l(e,t,i,n=3,s=n){const o=(0,r.k)(e.length,n,3),a=(0,r.k)(t.length,s,3),l=Math.min(o,a),c=i[0],h=i[1],u=i[2],p=i[3],f=i[4],d=i[5],m=i[6],g=i[7],y=i[8];let v=0,w=0;for(let i=0;i<l;i++){const i=t[v],r=t[v+1],o=t[v+2];e[w]=c*i+p*r+m*o,e[w+1]=h*i+f*r+g*o,e[w+2]=u*i+d*r+y*o,v+=s,w+=n}}function c(e,t,i,n=3,r=n){const s=Math.min(e.length/n,t.length/r);let o=0,a=0;for(let l=0;l<s;l++)e[a]=i*t[o],e[a+1]=i*t[o+1],e[a+2]=i*t[o+2],o+=r,a+=n;return e}function h(e,t,i,n){u(e.typedBuffer,t.typedBuffer,i,n,e.typedBufferStride,t.typedBufferStride)}function u(e,t,i,r,s=3,o=s){const a=Math.min(e.length/s,t.length/o);let l=0,c=0;const h=1/n.Tf;for(let n=0;n<a;n++)e[c]=r*(i*t[l])**h,e[c+1]=r*(i*t[l+1])**h,e[c+2]=r*(i*t[l+2])**h,l+=o,c+=s}function p(e,t,i,n=3,s=n){const o=(0,r.k)(e.length,n,3),a=(0,r.k)(t.length,s,3),l=Math.min(o,a);let c=0,h=0;for(let r=0;r<l;r++)e[h]=t[c]+i[0],e[h+1]=t[c+1]+i[1],e[h+2]=t[c+2]+i[2],c+=s,h+=n;return e}function f(e,t){d(e.typedBuffer,t.typedBuffer,e.typedBufferStride,t.typedBufferStride)}function d(e,t,i=3,n=i){const r=Math.min(e.length/i,t.length/n);let s=0,o=0;for(let a=0;a<r;a++){const r=t[s],a=t[s+1],l=t[s+2],c=r*r+a*a+l*l;if(c>0){const t=1/Math.sqrt(c);e[o]=t*r,e[o+1]=t*a,e[o+2]=t*l}s+=n,o+=i}}Object.freeze(Object.defineProperty({__proto__:null,linearToSRGB:u,linearToSRGBView:h,normalize:d,normalizeView:f,scale:c,scaleView:function(e,t,i){c(e.typedBuffer,t.typedBuffer,i,e.typedBufferStride,t.typedBufferStride)},shiftRight:function(e,t,i){const n=Math.min(e.count,t.count),r=e.typedBuffer,s=e.typedBufferStride,o=t.typedBuffer,a=t.typedBufferStride;let l=0,c=0;for(let e=0;e<n;e++)r[c]=o[l]>>i,r[c+1]=o[l+1]>>i,r[c+2]=o[l+2]>>i,l+=a,c+=s},transformMat3:l,transformMat3View:a,transformMat4:o,transformMat4View:s,translate:p},Symbol.toStringTag,{value:"Module"}))},69540(e,t,i){i.d(t,{OU:()=>h,Pw:()=>u});var n=i(5482),r=i(69622),s=(i(44208),i(4718)),o=(i(53966),i(97768)),a=i(88620),l=i(64108);const c=Symbol("ClonableMixin"),h=e=>{var t;const i=e;let r=class extends i{constructor(){super(...arguments),this[t]=!0}static{t=c}clone(e){const t=(0,a.oY)(this);(0,o.Lw)(t,"unable to clone instance of non-accessor class");const i=t.metadata,n=t.store,r={},l=new Map;for(const t in i){const o=i[t],a=n?.originOf(t),c=o.clonable;if(o.readOnly||!1===c||7!==a&&0!==a&&5!==a&&4!==a)continue;const h=this[t];let u=null;if("function"==typeof c)u=c(h,e);else if("reference"===c)u=h;else if(u=(0,s.TU)(h,e),null!=h&&null==u)continue;0===a?l.set(t,u):r[t]=u}const c=new(0,Object.getPrototypeOf(this).constructor)(r);if(l.size){const e=(0,a.oY)(c)?.store;if(e)for(const[t,i]of l)e.set(t,i,0)}return c}};return r=(0,n.Cg)([(0,l.$)("esri.core.Clonable")],r),r},u=h(r.A)},7762(e,t,i){i.d(t,{A:()=>I});var n,r=i(5482),s=i(98291),o=i(4576),a=i(65529),l=i(36563),c=i(4718),h=i(53966),u=i(93687),p=i(76030),f=i(56507),d=i(62788),m=i(10107),g=i(7695),y=i(64108),v=i(95488),w=i(12195);class x{constructor(){this.target=null,this.cancellable=!1,this.defaultPrevented=!1,this.item=void 0,this.type=void 0}preventDefault(){this.cancellable&&(this.defaultPrevented=!0)}reset(e){this.defaultPrevented=!1,this.item=e}}class _{constructor(e,t,i,n,r){this.target=e,this.added=t,this.removed=i,this.start=n,this.deleteCount=r}}const C=new u.A(()=>new x,void 0,e=>{e.item=null,e.target=null,e.defaultPrevented=!1,e.cancellable=!1});function M(e){e&&"object"==typeof e&&"destroy"in e&&"function"==typeof e.destroy&&e.destroy()}function b(e){return e?e instanceof Z?e.toArray():e.length?Array.prototype.slice.apply(e):[]:[]}function A(e){if(e?.length)return e[0]}function T(e,t,i,n){const r=Math.min(e.length-i,t.length-n);let s=0;for(;s<r&&e[i+s]===t[n+s];)s++;return s}function S(e,t,i,n){t&&t.forEach((t,r,s)=>{e.push(t),S(e,i.call(n,t,r,s),i,n)})}const R=new Set,z=new Set,O=new Set,P=new Map;let E=0,Z=n=class extends a.nJ{static ofType(e){if(!e)return n;if(P.has(e))return P.get(e);let t=null;if("function"==typeof e)t=e.prototype.declaredClass;else if(e.base)t=e.base.prototype.declaredClass;else for(const i in e.typeMap){const n=e.typeMap[i].prototype.declaredClass;t?t+=` | ${n}`:t=n}let i=class extends n{};return(0,r.Cg)([(0,g.u)({Type:e,ensureType:"function"==typeof e?(0,f.dp)(e):(0,f.aq)(e)})],i.prototype,"itemType",void 0),i=(0,r.Cg)([(0,y.$)(`esri.core.Collection<${t}>`)],i),P.set(e,i),i}static isCollection(e){return null!=e&&e instanceof n}constructor(e){super(e),this._chgListeners=[],this._notifications=null,this._updating=!1,this._timer=null,this._observable=new v.I,this._length=0,this._items=[],Object.defineProperty(this,"uid",{value:E++})}normalizeCtorArgs(e){return e?(0,o.yc)(e)||e instanceof n?{items:e}:e:{}}destroy(){this._removeAllRaw(),this._timer&&this._timer.remove(),super.destroy(),this._notifications=null}*[Symbol.iterator](){yield*this.items}get length(){return this._length}set length(e){e>this._length?h.A.getLogger(this).error("#length=","Cannot increase the length of the collection by assigning to the length property."):this.splice(e,Math.max(0,this._length-e))}get items(){return(0,d.gc)(this._observable),this._items}set items(e){this._emitBeforeChanges(1)||(this._splice(0,this.length,b(e)),this._emitAfterChanges(1))}hasEventListener(e){return!this.destroyed&&("change"===e?this._chgListeners.length>0:super.hasEventListener(e))}on(e,t){if(this.destroyed)return(0,l.hA)();if("change"===e){const e=this._chgListeners,i={removed:!1,callback:t};return e.push(i),this._notifications&&this._notifications.push({listeners:e.slice(),items:this._items.slice(),changes:[]}),(0,l.hA)(()=>{i.removed=!0,e.splice(e.indexOf(i),1)})}return super.on(e,t)}once(e,t){const i="deref"in t?()=>t.deref():()=>t,n=this.on(e,e=>{i()?.call(null,e),n.remove()});return n}add(e,t){if((0,d.gc)(this._observable),this._emitBeforeChanges(1))return this;const i=this.getNextIndex(t??null);return this._splice(i,0,[e]),this._emitAfterChanges(1),this}addMany(e,t=this._items.length){if((0,d.gc)(this._observable),!e?.length)return this;if(this._emitBeforeChanges(1))return this;const i=this.getNextIndex(t);return this._splice(i,0,b(e)),this._emitAfterChanges(1),this}at(e){if((0,d.gc)(this._observable),(e=Math.trunc(e)||0)<0&&(e+=this.length),!(e<0||e>=this.length))return this._items[e]}removeAll(){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return[];const e=this._removeAllRaw();return this._emitAfterChanges(2),e}_removeAllRaw(){return 0===this.length?[]:this._splice(0,this.length)||[]}clone(){return(0,d.gc)(this._observable),this._createNewInstance({items:this._items.map(c.o8)})}concat(...e){(0,d.gc)(this._observable);const t=e.map(b);return this._createNewInstance({items:this._items.concat(...t)})}drain(e,t){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const i=this._splice(0,this.length),n=i.length;for(let r=0;r<n;r++)e.call(t,i[r],r,i);this._emitAfterChanges(2)}destroyAll(){this.drain(M)}destroyMany(e){const t=this.removeMany(e);return t.forEach(M),t}every(e,t){return(0,d.gc)(this._observable),this._items.every(e,t)}filter(e,t){(0,d.gc)(this._observable);const i=2===arguments.length?this._items.filter(e,t):this._items.filter(e);return this._createNewInstance({items:i})}find(e,t){return(0,d.gc)(this._observable),this._items.find(e,t)}findIndex(e,t){return(0,d.gc)(this._observable),this._items.findIndex(e,t)}flatten(e,t){(0,d.gc)(this._observable);const i=[];return S(i,this,e,t),new n(i)}forEach(e,t){return(0,d.gc)(this._observable),this._items.forEach(e,t)}getItemAt(e){return(0,d.gc)(this._observable),this._items[e]}getNextIndex(e){(0,d.gc)(this._observable);const t=this.length;return(e=e??t)<0?e=0:e>t&&(e=t),e}includes(e,t=0){return(0,d.gc)(this._observable),this._items.includes(e,t)}indexOf(e,t=0){return(0,d.gc)(this._observable),this._items.indexOf(e,t)}join(e=","){return(0,d.gc)(this._observable),this._items.join(e)}lastIndexOf(e,t=this.length-1){return(0,d.gc)(this._observable),this._items.lastIndexOf(e,t)}map(e,t){(0,d.gc)(this._observable);const i=this._items.map(e,t);return new n({items:i})}reorder(e,t=this.length-1){(0,d.gc)(this._observable);const i=this.indexOf(e);if(-1!==i){if(t<0?t=0:t>=this.length&&(t=this.length-1),i!==t){if(this._emitBeforeChanges(4))return e;this._splice(i,1),this._splice(t,0,[e]),this._emitAfterChanges(4)}return e}}pop(){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=A(this._splice(this.length-1,1));return this._emitAfterChanges(2),e}push(...e){return(0,d.gc)(this._observable),this._emitBeforeChanges(1)||(this._splice(this.length,0,e),this._emitAfterChanges(1)),this.length}reduce(e,t){(0,d.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduce(e,t):i.reduce(e)}reduceRight(e,t){(0,d.gc)(this._observable);const i=this._items;return 2===arguments.length?i.reduceRight(e,t):i.reduceRight(e)}remove(e){return(0,d.gc)(this._observable),this.removeAt(this.indexOf(e))}removeAt(e){if((0,d.gc)(this._observable),e<0||e>=this.length||this._emitBeforeChanges(2))return;const t=A(this._splice(e,1));return this._emitAfterChanges(2),t}removeMany(e){if((0,d.gc)(this._observable),!e?.length||this._emitBeforeChanges(2))return[];const t=e instanceof n?e.toArray():e,i=this._items,r=[],s=t.length;for(let e=0;e<s;e++){const n=t[e],s=i.indexOf(n);if(s>-1){const n=1+T(t,i,e+1,s+1),o=this._splice(s,n);o&&o.length>0&&r.push.apply(r,o),e+=n-1}}return this._emitAfterChanges(2),r}reverse(){if((0,d.gc)(this._observable),this._emitBeforeChanges(4))return this;const e=this._splice(0,this.length);return e&&(e.reverse(),this._splice(0,0,e)),this._emitAfterChanges(4),this}shift(){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(2))return;const e=A(this._splice(0,1));return this._emitAfterChanges(2),e}slice(e=0,t=this.length){return(0,d.gc)(this._observable),this._createNewInstance({items:this._items.slice(e,t)})}some(e,t){return(0,d.gc)(this._observable),this._items.some(e,t)}sort(e){if((0,d.gc)(this._observable),!this.length||this._emitBeforeChanges(4)||!this._requiresSort(e))return this;const t=this._splice(0,this.length);return arguments.length?t.sort(e):t.sort(),this._splice(0,0,t),this._emitAfterChanges(4),this}_requiresSort(e=(e,t)=>e===t?0:e<t?-1:1){const t=this.length-1;for(let i=0;i<t;i++)if(e(this.items[i],this.items[i+1])>0)return!0;return!1}splice(e,t,...i){(0,d.gc)(this._observable),1===arguments.length&&(t=this.length),t??=0;const n=(t?2:0)|(i.length?1:0);if(this._emitBeforeChanges(n))return[];const r=this._splice(e,t,i)||[];return this._emitAfterChanges(n),r}toArray(){return(0,d.gc)(this._observable),this._items.slice()}toJSON(e){return(0,d.gc)(this._observable),this.toArray().map(t=>(0,w.W)(t)?t.toJSON(e):t)}toLocaleString(){return(0,d.gc)(this._observable),this._items.toLocaleString()}toString(){return(0,d.gc)(this._observable),this._items.toString()}unshift(...e){return(0,d.gc)(this._observable),!e.length||this._emitBeforeChanges(1)||(this._splice(0,0,e),this._emitAfterChanges(1)),this.length}_createNewInstance(e){return new this.constructor(e)}_splice(e,t,i){const n=this._items,r=this.itemType;let s,o;if(!this._notifications&&this.hasEventListener("change")&&(this._notifications=[{listeners:this._chgListeners.slice(),items:this._items.slice(),changes:[]}],this._timer&&this._timer.remove(),this._updating=!0,this._timer=(0,p._)(()=>this._dispatchChange())),e<0&&(e+=this.length),t){if(o=n.splice(e,t),this.hasEventListener("before-remove")){const t=C.acquire();t.target=this,t.cancellable=!0;for(let i=0,r=o.length;i<r;i++)s=o[i],t.reset(s),this.emit("before-remove",t),t.defaultPrevented&&(o.splice(i,1),n.splice(e,0,s),e+=1,i-=1,r-=1);C.release(t)}if(this._length=this._items.length,this.hasEventListener("after-remove")){const e=C.acquire();e.target=this,e.cancellable=!1;const t=o.length;for(let i=0;i<t;i++)e.reset(o[i]),this.emit("after-remove",e);C.release(e)}}if(i?.length){if(r){const e=[];for(const t of i){const i=r.ensureType(t);null==i&&null!=t||e.push(i)}i=e}const t=this.hasEventListener("before-add"),s=this.hasEventListener("after-add"),o=e===this.length;if(t||s){const r=C.acquire();r.target=this,r.cancellable=!0;const a=C.acquire();a.target=this,a.cancellable=!1;for(const l of i)t?(r.reset(l),this.emit("before-add",r),r.defaultPrevented||(o?n.push(l):n.splice(e++,0,l),this._length=n.length,s&&(a.reset(l),this.emit("after-add",a)))):(o?n.push(l):n.splice(e++,0,l),this._length=n.length,a.reset(l),this.emit("after-add",a));C.release(a),C.release(r)}else{if(o)for(const e of i)n.push(e);else n.splice(e,0,...i);this._length=n.length}}if((i?.length||o?.length)&&this._notifyChangeEvent(i,o),this.hasEventListener("after-splice")){const n=new _(this,i,o,e,t);this.emit("after-splice",n)}return o}_emitBeforeChanges(e){let t=!1;if(this.hasEventListener("before-changes")){const i=C.acquire();i.target=this,i.cancellable=!0,i.type=e,this.emit("before-changes",i),t=i.defaultPrevented,C.release(i)}return t}_emitAfterChanges(e){if(this.hasEventListener("after-changes")){const t=C.acquire();t.target=this,t.cancellable=!1,t.type=e,this.emit("after-changes",t),C.release(t)}this._observable.notify()}_notifyChangeEvent(e,t){this.hasEventListener("change")&&this._notifications&&this._notifications[this._notifications.length-1].changes.push({added:e,removed:t})}get updating(){return this._updating}_dispatchChange(){if(this._timer&&(this._timer.remove(),this._timer=null),this._updating=!1,!this._notifications)return;const e=this._notifications;this._notifications=null;for(const t of e){const e=t.changes;R.clear(),z.clear(),O.clear();for(const{added:t,removed:i}of e){if(t)if(0===O.size&&0===z.size)for(const e of t)R.add(e);else for(const e of t)z.has(e)?(O.add(e),z.delete(e)):O.has(e)||R.add(e);if(i)if(0===O.size&&0===R.size)for(const e of i)z.add(e);else for(const e of i)R.has(e)?R.delete(e):(O.delete(e),z.add(e))}const i=s.A.acquire();R.forEach(e=>{i.push(e)});const n=s.A.acquire();z.forEach(e=>{n.push(e)});const r=this._items,o=t.items,a=s.A.acquire();if(O.forEach(e=>{o.indexOf(e)!==r.indexOf(e)&&a.push(e)}),t.listeners&&(i.length||n.length||a.length)){const e={target:this,added:i,removed:n,moved:a},r=t.listeners.length;for(let i=0;i<r;i++){const n=t.listeners[i];n.removed||n.callback.call(this,e)}}s.A.release(i),s.A.release(n),s.A.release(a)}R.clear(),z.clear(),O.clear()}};(0,r.Cg)([(0,m.MZ)()],Z.prototype,"_updating",void 0),(0,r.Cg)([(0,m.MZ)()],Z.prototype,"_length",void 0),(0,r.Cg)([(0,m.MZ)()],Z.prototype,"length",null),(0,r.Cg)([(0,m.MZ)()],Z.prototype,"items",null),(0,r.Cg)([(0,m.MZ)({readOnly:!0})],Z.prototype,"updating",null),Z=n=(0,r.Cg)([(0,y.$)("esri.core.Collection")],Z);const I=Z},4902(e,t,i){i.d(t,{s:()=>o});var n=i(5482),r=i(64108);let s=0;const o=e=>{const t=e;let i=class extends t{constructor(...e){super(...e),Object.defineProperty(this,"uid",{writable:!1,configurable:!1,value:Date.now().toString(16)+"-object-"+s++})}};return i=(0,n.Cg)([(0,r.$)("esri.core.Identifiable")],i),i};o(class{})},7695(e,t,i){function n(e){return(t,i)=>{t[i]=e}}i.d(t,{u:()=>n})},82534(e,t,i){function n(){return[0,0,0,1]}function r(e){return[e[0],e[1],e[2],e[3]]}i.d(t,{o8:()=>r,vt:()=>n,zK:()=>s});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:r,create:n,fromValues:function(e,t,i,n){return[e,t,i,n]}},Symbol.toStringTag,{value:"Module"}))},48163(e,t,i){function n(){return[0,0]}function r(e){return[e[0],e[1]]}function s(e,t){return[e,t]}function o(){return s(1,1)}function a(){return s(1,0)}function l(){return s(0,1)}i.d(t,{Un:()=>c,fA:()=>s,o8:()=>r,vt:()=>n});const c=o(),h=a(),u=l();Object.freeze(Object.defineProperty({__proto__:null,ONES:c,UNIT_X:h,UNIT_Y:u,ZEROS:[0,0],clone:r,create:n,freeze:function(e,t){return[e,t]},fromArray:function(e,t=[0,0]){const i=Math.min(2,e.length);for(let n=0;n<i;++n)t[n]=e[n];return t},fromValues:s,ones:o,unitX:a,unitY:l,zeros:function(){return[0,0]}},Symbol.toStringTag,{value:"Module"}))},17799(e,t,i){i.d(t,{T9:()=>a,d_:()=>r,gT:()=>s});var n=i(86211);function r(e,t){return{type:(0,n.t$)(t),value:e,unit:t}}function s(e,t){return{type:(0,n.t$)(t),value:e,unit:t}}function o(e,t,i="arithmetic"){return{type:(0,n.t$)(t),value:e,unit:t,rotationType:i}}function a(e,t){return null==e?t:null==t||e.value>(0,n.oU)(t.value,t.unit,e.unit)?e:t}r(0,"meters"),s(0,"square-meters"),o(0,"radians"),o(0,"degrees"),o(0,"degrees","geographic")},36708(e,t,i){i.d(t,{C_:()=>p,OH:()=>m,Vh:()=>g,on:()=>u,pc:()=>y,wB:()=>l,z7:()=>c});var n=i(37955),r=i(36563),s=i(97768),o=i(17676),a=i(14012);function l(e,t,i={}){return h(e,t,i,f)}function c(e,t,i={}){return h(e,t,i,d)}function h(e,t,i={},n){let r=null;const o=i.once?(e,i)=>{n(e)&&((0,s.xt)(r),t(e,i))}:(e,i)=>{n(e)&&t(e,i)};if(r=(0,a.Cn)(e,o,i.sync,i.equals),i.initial){const t=e();o(t,t)}return r}function u(e,t,i,o={}){let a=null,c=null,h=null;function u(){a&&c&&(c.remove(),o.onListenerRemove?.(a),a=null,c=null)}function p(e){o.once&&o.once&&(0,s.xt)(h),i(e)}const f=l(e,(e,i)=>{u(),(0,n.wb)(e)&&(a=e,c=(0,n.on)(e,t,p),o.onListenerAdd?.(e))},{sync:o.sync,initial:!0});return h=(0,r.hA)(()=>{f.remove(),u()}),h}function p(e,t){return function(e,t,i){if((0,o.G4)(i))return Promise.reject((0,o.NK)());const n=e();if(t?.(n))return Promise.resolve(n);let a=null;function l(){a=(0,s.xt)(a)}return new Promise((n,s)=>{a=(0,r.vE)([(0,o.u7)(i,()=>{l(),s((0,o.NK)())}),h(e,e=>{l(),n(e)},{sync:!1,once:!0},t??f)])})}(e,d,t)}function f(e){return!0}function d(e){return!!e}i(80559);const m={sync:!0},g={initial:!0},y={sync:!0,initial:!0}},35982(e,t,i){i.d(t,{B:()=>h});var n=i(4576),r=i(71511),s=i(36563),o=i(53966),a=i(97768),l=i(17676),c=i(83027);class h{constructor(e,t,i,n,r={}){this._mainMethod=t,this._transferLists=i,this._listeners=[],this._onClientConnectedHandle=null,this._destroyed=!1,this._promise=(0,c.h)(e,{...r,schedule:n}).then(e=>{null!=this._thread||this._destroyed?e.close():(this._thread=e,this._promise=null,this._onClientConnectedHandle=this._thread.onClientConnected(e=>{r.hasInitialize&&e.invoke("initialize",{});for(const t of this._listeners)this._connectListenerToClient(t,e);this._onClientConnected(e)}))}),this._promise.catch(t=>o.A.getLogger("esri.core.workers.WorkerHandle").error(`Failed to initialize ${e} worker: ${t}`))}on(e,t){const i=new u(e,t);return this._listeners.push(i),this._connectListener(i),(0,s.hA)(()=>{(0,n.TF)(this._listeners,i),i.destroy()})}[Symbol.dispose](){this.destroy()}destroy(){this._onClientConnectedHandle=(0,a.xt)(this._onClientConnectedHandle),this._thread&&(this._thread.close(),this._thread=null),this._promise=null;for(const e of this._listeners)e.destroy();this._listeners.length=0,this._transferLists={},this._destroyed=!0}invoke(e,t,i){return this.invokeMethod(this._mainMethod,e,t,i)}invokeMethod(e,t,i,n){if(this._thread){const r=this._transferLists[e],s=r?r(t):[];return this._thread.invoke(e,t,{transferList:s,signal:i,jobPriority:n})}return this._promise?this._promise.then(()=>((0,l.Te)(i),this.invokeMethod(e,t,i))):Promise.reject((0,l.NK)())}broadcast(e,t){return this._thread?Promise.all(this._thread.broadcast(t,e)).then(p):this._promise?this._promise.then(()=>this.broadcast(e,t)):Promise.reject((0,l.NK)())}get promise(){return this._promise}_onClientConnected(e){}_connectListener(e){this._thread&&e.add(this._thread.on(e.eventName,e.callback))}_connectListenerToClient(e,t){e.add(t.on(e.eventName,e.callback))}}class u{constructor(e,t){this.eventName=e,this.callback=t,this._handles=new r.A}add(e){this._handles.add(e)}destroy(){this._handles.destroy()}}function p(){}},87992(e,t,i){i.d(t,{JR:()=>A,ME:()=>C,MY:()=>T,NO:()=>_,Nh:()=>b,V2:()=>P,_s:()=>E,e6:()=>I,gh:()=>M,tr:()=>L,uX:()=>g});var n=i(5482),r=i(69397),s=i(16930),o=(i(70328),i(19419)),a=i(60408),l=i(21325),c=i(513),h=i(50954),u=i(79567),p=i(52006),f=i(49663),d=i(46068),m=i(92722);class g{constructor({type:e,spatialReference:t,vertexCount:i,vertexXY:n,vertexZ:r,vertexM:s,partCount:o,partOffsets:a,partFlags:l,segmentFlags:c,segmentIndices:h,segmentParams:u,segmentCountArc:p,segmentCountBezier:f}){this.segmentCountArc=0,this.segmentCountBezier=0,this.type=e,this.spatialReference=t,this.vertexCount=i,this.vertexXY=n,this.vertexZ=r,this.vertexM=s,this.partCount=o,this.partOffsets=a,this.partFlags=l,this.segmentFlags=c,this.segmentIndices=h,this.segmentParams=u,this.segmentCountArc=p,this.segmentCountBezier=f}get segmentParamCount(){return 10*this.segmentCountArc+4*this.segmentCountBezier}get segmentCountLine(){const{segmentCount:e,segmentCountArc:t,segmentCountBezier:i}=this;return e&&e-t-i}get segmentCount(){return"polyline"===this.type?this.vertexCount-this.partCount:"polygon"===this.type?this.vertexCount:0}get hasZ(){return null!=this.vertexZ}get hasM(){return null!=this.vertexM}hasCurves(){return this.segmentCountArc+this.segmentCountBezier>0}isMultipart(){return"polyline"===this.type||"polygon"===this.type}get usedMemory(){function e(e){return e?r.Ul+e.byteLength:0}return e(this.vertexXY)+e(this.vertexZ)+e(this.vertexM)+e(this.partOffsets)+e(this.partFlags)+e(this.segmentFlags)+e(this.segmentIndices)+e(this.segmentParams)}clone(){const{type:e,vertexCount:t,partCount:i,hasZ:n,hasM:r,segmentCountArc:s,segmentCountBezier:o}=this,a=P(e,t,i,n,r,this.hasCurves(),s,o);a.spatialReference=this.spatialReference;const{vertexXY:l,vertexZ:c,vertexM:h}=this;if(a.vertexXY.set(l.subarray(0,2*t),0),a.vertexZ?.set(c.subarray(0,t),0),a.vertexM?.set(h.subarray(0,t),0),this.isMultipart()){const{partOffsets:e,partFlags:t}=this;a.partFlags.set(t.subarray(0,i+1)),a.partOffsets.set(e.subarray(0,i+1))}if(this.hasCurves()){const{segmentFlags:e,segmentIndices:i,segmentParams:n,segmentParamCount:r}=this;a.segmentFlags.set(e.subarray(0,t),0),a.segmentIndices.set(i.subarray(0,t),0),a.segmentParams.set(n.subarray(0,r),0)}return a}equals(e){return this.equalsWithinTolerance(e,0)}equalsWithinTolerance(e,t){if(null==e)return!1;if(this===e)return!0;if(!(0,l.aI)(this.spatialReference,e.spatialReference))return!1;if(this.vertexCount!==e.vertexCount||this.partCount!==e.partCount)return!1;if(this.hasZ!==e.hasZ||this.hasM!==e.hasM)return!1;if(this.hasCurves()!==e.hasCurves()||this.segmentCountArc!==e.segmentCountArc||this.segmentCountBezier!==e.segmentCountBezier)return!1;const i=0===t?(e,t)=>e!==t||isNaN(e)!==isNaN(t):(e,i)=>Math.abs(e-i)>t||isNaN(e)!==isNaN(i);for(let t=0;t<this.vertexCount;++t)if(i(this.vertexXY[2*t],e.vertexXY[2*t])||i(this.vertexXY[2*t+1],e.vertexXY[2*t+1]))return!1;if(this.hasZ)for(let t=0;t<this.vertexCount;++t)if(i(this.vertexZ[t],e.vertexZ[t]))return!1;if(this.hasM)for(let t=0;t<this.vertexCount;++t)if(i(this.vertexM[t],e.vertexM[t]))return!1;for(let t=0;t<this.partCount;++t)if(this.partFlags[t]!==e.partFlags[t]||this.partOffsets[t]!==e.partOffsets[t])return!1;if(this.hasCurves()){for(let t=0;t<this.vertexCount;++t)if(this.segmentFlags[t]!==e.segmentFlags[t]||this.segmentIndices[t]!==e.segmentIndices[t])return!1;for(let t=0;t<this.segmentParamCount;++t)if(i(this.segmentParams[t],e.segmentParams[t]))return!1}return!0}get parts(){return this.isMultipart()?new y(this):[][Symbol.iterator]()}}class y{constructor(e){this.geometry=e,this.value=new v(e)}get done(){return this.value.index>=this.geometry.partCount}next(){return++this.value.index,this}[Symbol.iterator](){return this}}class v{constructor(e){this.geometry=e,this.index=-1,this._readVertex=z(e),this._segments=new w(this)}get segments(){return this._segments.reset(),this._segments}get startVertex(){return this._readVertex(this.geometry.partOffsets[this.index])}get vertexCount(){const e=this.geometry.partOffsets;return e[this.index+1]-e[this.index]}}class w{constructor(e){this._part=e,this._partStart=0,this._partEnd=0,this._isPolygon="polygon"===e.geometry.type,this.value=new x(e.geometry)}get done(){return this.value.indexOfStartVertex>this._partEnd}next(){++this.value.indexOfStartVertex;const e=this.value.indexOfStartVertex>=this._partEnd;return this.value.indexOfEndVertex=e&&this._isPolygon?this._partStart:this.value.indexOfStartVertex+1,this}[Symbol.iterator](){return this}reset(){const{index:e}=this._part,t=this._part.geometry.partOffsets;this._partStart=t[e],this._partEnd=t[e+1]-(this._isPolygon?1:2),this.value.indexOfStartVertex=this._partStart-1}}class x{constructor(e){this.geometry=e,this.indexOfStartVertex=-1,this.indexOfEndVertex=-1,this._readVertex=z(e)}get xStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex]}get yStart(){return this.geometry.vertexXY[2*this.indexOfStartVertex+1]}get zStart(){return this.geometry.vertexZ[this.indexOfStartVertex]}get mStart(){return this.geometry.vertexM[this.indexOfStartVertex]}get xEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex]}get yEnd(){return this.geometry.vertexXY[2*this.indexOfEndVertex+1]}get zEnd(){return this.geometry.vertexZ[this.indexOfEndVertex]}get mEnd(){return this.geometry.vertexM[this.indexOfEndVertex]}get start(){return this._readVertex(this.indexOfStartVertex)}get end(){return this._readVertex(this.indexOfEndVertex)}get curve(){const e=this.geometry.segmentFlags?.[this.indexOfStartVertex]??1;if(1===e)return this.end;const t=this.geometry.segmentParams;let i=this.geometry.segmentIndices[this.indexOfStartVertex];if(2===e){const e=t[i++],n=t[i++],r=t[i++],s=t[i++];return{b:[this.end,[e,n],[r,s]]}}const n=t[i++],r=t[i++],s=t[i++],o=t[i++],a=t[i++],l=t[i++];i++,i++;const c=t[i++],h=t[i++];if(!Boolean(4&n)&&1===s)return{c:[this.end,[c,h]]};const u=2&n?0:1,p=1&n?0:1;return{a:[this.end,[a,l],u,p,o,r,s]}}}function _(e,t){const i={stack:[],error:void 0,hasError:!1};try{return t??=(0,o.Ie)(),(0,n.mS)(i,new S(e,["vertexZ","vertexM","spatialReference"]),!1),(0,o.bx)(t,function(e){let t;const{vertexCount:i,vertexXY:r,vertexZ:s,vertexM:a}=e,l=R(e);if(e.hasCurves()){const i={stack:[],error:void 0,hasError:!1};try{(0,n.mS)(i,new S(e,["vertexZ","vertexM"]),!1);const r=(0,o.Ie)();for(const t of e.parts){let e=t.startVertex;for(const{curve:i}of t.segments)(0,u.e)(r,e,i),e=(0,p.yP)(i)}const[s,a,c,h]=r;t={xmin:s,ymin:a,xmax:c,ymax:h,spatialReference:l}}catch(e){i.error=e,i.hasError=!0}finally{(0,n.hk)(i)}}else{let e,n,s,o;e=n=1/0,s=o=-1/0;for(let t=0;t<i;++t){const i=r[2*t],a=r[2*t+1];e=Math.min(e,i),s=Math.max(s,i),n=Math.min(n,a),o=Math.max(o,a)}t={xmin:e,ymin:n,xmax:s,ymax:o,spatialReference:l}}if(s){let e=1/0,i=-1/0;for(const t of s)e=Math.min(e,t),i=Math.max(i,t);t.zmin=e,t.zmax=i}if(a){let e=1/0,i=-1/0;for(const t of a)e=Math.min(e,t),i=Math.max(i,t);t.mmin=e,t.mmax=i}return t}(e)),t}catch(e){i.error=e,i.hasError=!0}finally{(0,n.hk)(i)}}function C(e){let t,i,n;if((0,a.fT)(e)){n="point";const{x:r,y:s,z:o,m:a}=e,l=[r,s];null!=o&&l.push(o),null!=a&&l.push(a),i=[[l]],t=1}else(0,a.U9)(e)?(n="multipoint",i=[e.points],t=e.points.length):(0,a.Rg)(e)?(n="polyline",i=e.curvePaths??e.paths,t=i.reduce((e,t)=>e+t.length,0)):(n="polygon",i=e.curveRings??e.rings,t=i.reduce((e,t)=>(0===t.length||(e+=t.length,O(t[0],(0,p.yP)(t.at(-1)))&&--e),e),0));const r=P(n,t,n.includes("point")?0:i.length,(0,a.Pv)(e),(0,a.W0)(e),(0,p.Ed)(e)),{hasZ:s,hasM:o,vertexXY:l,vertexZ:c,vertexM:h}=r;function u(e){l[2*d]=e[0],l[2*d+1]=e[1],s&&(c[d]=e[2]),o&&(h[d]=e[f]),++d}r.spatialReference=e.spatialReference??void 0;const f=r.hasZ?3:2;let d=0;if(!r.isMultipart()){if(!s&&!o){for(const[e,t]of i[0])l[2*d]=e,l[2*d+1]=t,++d;return r}for(const e of i[0])u(e);return r}const m="polygon"===n,{partOffsets:g}=r;let y=0;if(!(0,p.Ed)(e)){for(const e of i){if(g[y++]=d,0===e.length)continue;let t=e.length;if(m&&O(e[0],e.at(-1))&&--t,s||o)for(let i=0;i<t;++i)u(e[i]);else for(let i=0;i<t;++i){const[t,n]=e[i];l[2*d]=t,l[2*d+1]=n,++d}}return g[y]=d,r}function v(e){const t=w+e;if(t<=(r.segmentParams?.length??0))return;let i=t*j;i=20*Math.ceil(i/20);const n=r.segmentParams;r.segmentParams=new Float64Array(i),null!=n&&r.segmentParams.set(n)}let w=0;for(const e of i){if(r.partOffsets[y++]=d,0===e.length)continue;const t=e[0];let i=t;for(let t=1;t<e.length;++t){const n=e[t];u(i);const s=d-1;(0,p.wY)(n)?(v(10),++r.segmentCountArc,w=E(i,n,r,s,w),i=n.a[0]):(0,p.DA)(n)?(v(10),++r.segmentCountArc,w=Z(i,n,r,s,w),i=n.a[0]):(0,p.aO)(n)?(v(10),++r.segmentCountArc,w=I(i,n,r,s,w),i=n.c[0]):(0,p.n1)(n)?(v(4),++r.segmentCountBezier,w=L(0,n,r,s,w),i=n.b[0]):i=n}m&&O(t,i)||u(i)}return r.partOffsets[y]=d,r}function M(e){const t=z(e),{vertexCount:i,partCount:n,hasZ:r,hasM:s}=e,o=R(e);if("point"===e.type){const[t,i]=e.vertexXY,n=e.vertexZ?.[0],r=e.vertexM?.[0];return{x:t,y:i,z:n,m:r,spatialReference:o}}let a=0;if("multipoint"===e.type){const e=[];for(;a<i;)e.push(t(a++));return{points:e,spatialReference:o,hasZ:r,hasM:s}}const l="polygon"===e.type;if(!e.hasCurves()){const i=new Array;for(let r=0;r<n;++r){const n=e.partOffsets[r+1],s=new Array;for(;a<n;)s.push(t(a++));l&&s.length>0&&s.push(s[0]),i.push(s)}return l?{rings:i,hasZ:r,hasM:s,spatialReference:o}:{paths:i,hasZ:r,hasM:s,spatialReference:o}}const c=new Array;for(const{segments:t,startVertex:i}of e.parts){const e=[i];for(const{curve:i}of t)e.push(i);c.push(e)}return l?{rings:[],curveRings:c,hasZ:r,hasM:s,spatialReference:o}:{paths:[],curvePaths:c,hasZ:r,hasM:s,spatialReference:o}}function b(e,{lengths:t,coords:i,hasZ:n,hasM:r},s){const o=e.includes("point")?0:t.length,a="polygon"===e,l="point"===e?1:t.reduce((e,t)=>e+t,0)-(a?o:0);n??=!1,r??=!1;const c=P(e,l,o,n,r,!1,0,0);if(c.spatialReference=s??void 0,!c.isMultipart()){for(let e=0,t=0;e<l;++e)c.vertexXY[2*e]=i[t++],c.vertexXY[2*e+1]=i[t++],n&&(c.vertexZ[e]=i[t++]),r&&(c.vertexM[e]=i[t++]);return c}const h=2+Number(n)+Number(r);let u=0,p=0;c.partOffsets[0]=0;for(const e of t){const t=c.partOffsets[p],s=t+e-Number(a);c.partOffsets[++p]=s;for(let e=t;e<s;++e)c.vertexXY[2*e]=i[u++],c.vertexXY[2*e+1]=i[u++],n&&(c.vertexZ[e]=i[u++]),r&&(c.vertexM[e]=i[u++]);a&&(u+=h)}return c}function A({type:e,vertexCount:t,vertexXY:i,vertexZ:n,vertexM:r,partCount:s,partOffsets:o,hasZ:a,hasM:l}){const c=new m.A([],[],a,l);s=Math.max(s,1);const h="polygon"===e;let u=0;for(let e=0;e<s;++e){const s=o?.[e+1]??t,p=c.coords.length;for(let e=u;e<s;++e)c.coords.push(i[2*e],i[2*e+1]),a&&c.coords.push(n[e]),l&&c.coords.push(r[e]);if(h){const e=u;c.coords.push(i[2*e],i[2*e+1]),a&&c.coords.push(n[e]),l&&c.coords.push(r[e])}c.lengths.push((c.coords.length-p)/c.stride),u=s}return"point"===e&&(c.lengths.length=0),c}function T(e,t){return"getSpatialReference"in e&&(t=function(e){if(null==e)return;const t=e.getText()||void 0,i=e.isCustomWkid()?0:e.getOldID();if(i<=0)return{wkt:t};let n=e.getLatestID();(n<=0||n===i)&&(n=void 0);const r=e.getVCS();if(null==r)return{wkid:i,latestWkid:n,wkt:t};const s=r.isCustomWkid()?0:r.getOldID();if(s<=0)return{wkt:t};let o=e.getLatestVerticalID();return(o<=0||o===s)&&(o=void 0),{wkid:i,wkt:t,latestWkid:n,vcsWkid:s,latestVcsWkid:o}}(e.getSpatialReference()),e=e.getGeometry()),new g({...e.toFlatGeometry(),spatialReference:t})}class S{constructor(e,t){this.target=e,this.keys=t,this.oldValues=t.map(t=>e[t]);for(const i of t)e[i]=void 0}[Symbol.dispose](){this.keys.map((e,t)=>{this.target[e]=this.oldValues[t]})}}function R({spatialReference:e}){return e instanceof s.A?e.toJSON():e}function z({vertexXY:e,vertexZ:t,vertexM:i}){return t?i?n=>[e[2*n],e[2*n+1],t[n],i[n]]:i=>[e[2*i],e[2*i+1],t[i]]:i?t=>[e[2*t],e[2*t+1],i[t]]:t=>[e[2*t],e[2*t+1]]}function O(e,t){return e.every((e,i)=>e===t[i])}function P(e,t,i,n,r,s,o,a){o??=0,a??=0;const l=new g({type:e,vertexCount:t,vertexXY:null,vertexZ:void 0,vertexM:void 0,partCount:i,partOffsets:void 0,partFlags:void 0,segmentFlags:void 0,segmentIndices:void 0,segmentParams:void 0,segmentCountArc:o,segmentCountBezier:a});let c=2*Float64Array.BYTES_PER_ELEMENT*t;n&&(c+=Float64Array.BYTES_PER_ELEMENT*t),r&&(c+=Float64Array.BYTES_PER_ELEMENT*t),l.isMultipart()&&(c+=(i+1)*Int32Array.BYTES_PER_ELEMENT,c+=(i+1)*Int8Array.BYTES_PER_ELEMENT),s&&(c+=t*Int8Array.BYTES_PER_ELEMENT,c+=t*Int32Array.BYTES_PER_ELEMENT,c+=l.segmentParamCount*Float64Array.BYTES_PER_ELEMENT);const h=new ArrayBuffer(c);let u=0;return l.vertexXY=new Float64Array(h,u,2*t),u+=l.vertexXY.byteLength,n&&(l.vertexZ=new Float64Array(h,u,t),u+=l.vertexZ.byteLength),r&&(l.vertexM=new Float64Array(h,u,t),u+=l.vertexM.byteLength),s&&(l.segmentParams=new Float64Array(h,u,l.segmentParamCount),u+=l.segmentParams.byteLength,l.segmentIndices=new Int32Array(h,u,t),l.segmentIndices.fill(V),u+=l.segmentIndices.byteLength),l.isMultipart()&&(l.partOffsets=new Int32Array(h,u,i+1),u+=l.partOffsets.byteLength,l.partFlags=new Int8Array(h,u,i+1),u+=l.partFlags.byteLength,"polygon"===l.type&&l.partFlags.subarray(0,i).fill(1)),s&&(l.segmentFlags=new Int8Array(h,u,t),l.segmentFlags.fill(1),u+=l.segmentFlags.byteLength),l}function E(e,t,{segmentFlags:i,segmentIndices:n,segmentParams:r},s,o){i[s]=4,n[s]=o;const[a,[l,c],h,u,p,f,m]=t.a;let g=4;u||(g|=1),h||(g|=2);const y=(0,d.SW)(e,t),[v,w]=(0,d.Uk)(y,.5);return r[o++]=g,r[o++]=f,r[o++]=m,r[o++]=p,r[o++]=l,r[o++]=c,r[o++]=y.u2-y.u1,r[o++]=y.u1,r[o++]=v,r[o++]=w,o}function Z(e,t,{segmentFlags:i,segmentIndices:n,segmentParams:r},s,o){i[s]=4,n[s]=o;const a=(0,f.io)(e,t);return D(a,4,...(0,c.mq)(a,.5),r,o)}function I(e,t,{segmentFlags:i,segmentIndices:n,segmentParams:r},s,o){return i[s]=4,n[s]=o,D((0,h.pM)(e,t),0,...t.c[1],r,o)}function D(e,t,i,n,r,s){const{cx:o,cy:a,thetaStart:l,thetaEnd:c,radius:h}=e;return l>c||(t|=1),Math.abs(c-l)<=Math.PI||(t|=2),r[s++]=t,r[s++]=h,r[s++]=1,r[s++]=0,r[s++]=o,r[s++]=a,r[s++]=c-l,r[s++]=l,r[s++]=i,r[s++]=n,s}function L(e,{b:[t,[i,n],[r,s]]},{segmentFlags:o,segmentIndices:a,segmentParams:l},c,h){return o[c]=2,a[c]=h,l[h++]=i,l[h++]=n,l[h++]=r,l[h++]=s,h}const j=1.61803,V=-1},54239(e,t,i){i.d(t,{A:()=>g});var n,r=i(5482),s=i(4576),o=i(66552),a=i(25482),l=i(86211),c=i(67076),h=i(91429),u=i(43937),p=i(36005);const f=(0,o.O)()({orthometric:"gravity-related-height",gravity_related_height:"gravity-related-height",ellipsoidal:"ellipsoidal"}),d=f.jsonValues.slice();(0,s.Xy)(d,"orthometric");const m=(0,o.O)()({meter:"meters",foot:"feet","us-foot":"us-feet","clarke-foot":"clarke-feet","clarke-yard":"clarke-yards","clarke-link":"clarke-links","sears-yard":"sears-yards","sears-foot":"sears-feet","sears-chain":"sears-chains","benoit-1895-b-chain":"benoit-1895-b-chains","indian-yard":"indian-yards","indian-1937-yard":"indian-1937-yards","gold-coast-foot":"gold-coast-feet","sears-1922-truncated-chain":"sears-1922-truncated-chains","50-kilometers":"50-kilometers","150-kilometers":"150-kilometers"});let g=n=class extends a.o{constructor(e){super(e),this.heightModel="gravity-related-height",this.heightUnit="meters",this.vertCRS=null}writeHeightModel(e,t,i){return f.write(e,t,i)}readHeightModel(e,t,i){return f.read(e)||(i?.messages&&i.messages.push(function(e,t){return new c.A("height-model:unsupported",`Height model of value '${e}' is not supported`,t)}(e,{context:i})),null)}readHeightUnit(e,t,i){return m.read(e)||(i?.messages&&i.messages.push(y(e,{context:i})),null)}readHeightUnitService(e,t,i){return(0,l.LA)(e)||m.read(e)||(i?.messages&&i.messages.push(y(e,{context:i})),null)}readVertCRS(e,t){return t.vertCRS||t.ellipsoid||t.geoid}clone(){return new n({heightModel:this.heightModel,heightUnit:this.heightUnit,vertCRS:this.vertCRS})}equals(e){return!!e&&(this===e||this.heightModel===e.heightModel&&this.heightUnit===e.heightUnit&&this.vertCRS===e.vertCRS)}static deriveUnitFromSR(e,t){const i=(0,l.k1)(t);return new n({heightModel:e.heightModel,heightUnit:i??void 0,vertCRS:e.vertCRS})}write(e,t){return t={origin:"web-scene",...t},super.write(e,t)}static fromJSON(e){if(!e)return null;const t=new n;return t.read(e,{origin:"web-scene"}),t}};function y(e,t){return new c.A("height-unit:unsupported",`Height unit of value '${e}' is not supported`,t)}(0,r.Cg)([(0,h.MZ)({type:f.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:d,default:"ellipsoidal",write:{isRequired:!0}}}}})],g.prototype,"heightModel",void 0),(0,r.Cg)([(0,u.K)("web-scene","heightModel")],g.prototype,"writeHeightModel",null),(0,r.Cg)([(0,p.w)(["web-scene","service"],"heightModel")],g.prototype,"readHeightModel",null),(0,r.Cg)([(0,h.MZ)({type:m.apiValues,constructOnly:!0,json:{origins:{"web-scene":{type:m.jsonValues,write:{writer:m.write,isRequired:!0}}}}})],g.prototype,"heightUnit",void 0),(0,r.Cg)([(0,p.w)("web-scene","heightUnit")],g.prototype,"readHeightUnit",null),(0,r.Cg)([(0,p.w)("service","heightUnit")],g.prototype,"readHeightUnitService",null),(0,r.Cg)([(0,h.MZ)({type:String,constructOnly:!0,json:{origins:{"web-scene":{write:!0}}}})],g.prototype,"vertCRS",void 0),(0,r.Cg)([(0,p.w)("service","vertCRS",["vertCRS","ellipsoid","geoid"])],g.prototype,"readVertCRS",null),g=n=(0,r.Cg)([(0,h.$K)("esri.geometry.HeightModelInfo")],g)},86742(e,t,i){i.d(t,{Hh:()=>o,fz:()=>l,g7:()=>a,s1:()=>s});var n=i(83290);let r;function s(){return!!r&&(0,n.i)()}async function o(){if(!s()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(6859),i.e(6558)]).then(i.bind(i,6558)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(6061)]).then(i.bind(i,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,n.l)()]);r=new e.OperatorGeodeticArea,t(n.p)}}function a(e,t,i){return r.execute(e,t,i,null)}function l(){return r.supportsCurves()}},77085(e,t,i){i.d(t,{Hh:()=>a,fz:()=>h,g7:()=>l,s1:()=>o,zo:()=>c});var n=i(76061),r=i(83290);let s;function o(){return!!s&&(0,r.i)()}async function a(){if(!o()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(1088)]).then(i.bind(i,31088)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756)]).then(i.bind(i,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,r.l)()]);s=new e.OperatorGeodeticDensifyByLength,t(r.p)}}function l(e,t,i,n){return s.execute(e,t,i,n,null)}function c(e,t,i,r){const o=s.executeMany(new n.S(e),t,i,r,null);return Array.from(o)}function h(){return s.supportsCurves()}},35223(e,t,i){i.d(t,{Hh:()=>o,fz:()=>l,g7:()=>a,s1:()=>s});var n=i(83290);let r;function s(){return!!r&&(0,n.i)()}async function o(){if(!s()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(4167)]).then(i.bind(i,28879)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(6061)]).then(i.bind(i,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,n.l)()]);r=new e.OperatorGeodeticLength,t(n.p)}}function a(e,t,i){return r.execute(e,t,i,null)}function l(){return r.supportsCurves()}},4144(e,t,i){i.d(t,{Hh:()=>a,fz:()=>h,g7:()=>l,s1:()=>o,zo:()=>c});var n=i(76061),r=i(83290);let s;function o(){return!!s&&(0,r.i)()}async function a(){if(!o()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(9192)]).then(i.bind(i,9192)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756)]).then(i.bind(i,15756)).then(e=>e.aP).then(({injectPe:e})=>e),(0,r.l)()]);s=new e.OperatorProject,t(r.p)}}function l(e,t){return s.execute(e,t,null)}function c(e,t){const i=s.executeMany(new n.S(e),t,null);return Array.from(i)}function h(){return s.supportsCurves()}},81150(e,t,i){i.d(t,{Pg:()=>l,fz:()=>c,g7:()=>o,zo:()=>a});var n=i(76061),r=(i(55537),i(88885),i(15756));i(95213);const s=new r.f;function o(e,t,i){return s.execute(e,t,i,null)}function a(e,t,i){const r=s.executeMany(new n.S(e),t,i,null);return Array.from(r)}function l(e,t,i){return s.isSimpleAsFeature(e,t,i,null,null)}function c(){return s.supportsCurves()}},83276(e,t,i){i.r(t),i.d(t,{execute:()=>f,executeMany:()=>d,isLoaded:()=>u,load:()=>p,supportsCurves:()=>h});var n=i(4144),r=i(17499);let s,o,a,l,c,h;function u(){return!!s&&(0,n.s1)()}async function p(){if(!u()){const[e,t]=await Promise.all([Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(3299),i.e(9285)]).then(i.bind(i,78125)),Promise.all([i.e(6042),i.e(1878),i.e(8885),i.e(5756),i.e(6129)]).then(i.bind(i,86129)),(0,n.Hh)()]);s=e.fromGeometry,o=e.fromSpatialReference,a=e.getSpatialReference,l=e.toGeometry,c=t.createProjectionTransformation,h=(0,n.fz)()}}function f(e,t,i){const h=a(e),u=c(o(h),o(t),i),p=l((0,n.g7)(s(e),u),t);return!i?.zConversionDisabled&&p?.hasZ&&(0,r.gw)([p],h,t),p}function d(e,t,i){const h=e.map(s),u=a(e),p=c(o(u),o(t),i),f=(0,n.zo)(h,p).map(e=>l(e,t));return!i?.zConversionDisabled&&f&&(0,r.gw)(f,u,t),f}},78125(e,t,i){i.r(t),i.d(t,{fromExtent:()=>g,fromGeometry:()=>m,fromMultipoint:()=>y,fromPoint:()=>v,fromPolygon:()=>w,fromPolyline:()=>x,fromPolylineUsingImportOperator:()=>_,fromSpatialReference:()=>C,getSpatialReference:()=>d,toExtent:()=>b,toGeometry:()=>M,toMultipoint:()=>A,toPoint:()=>T,toPolygon:()=>S,toPolyline:()=>R});var n=i(83661),r=(i(79187),i(55537)),s=i(95213),o=i(88885),a=i(5443),l=i(48526),c=i(86738),h=i(39829),u=i(82799),p=(i(90293),i(83299));const f="_gxVersion";function d(e){return Array.isArray(e)?e[0].spatialReference:e.spatialReference}function m(e){switch(e.type){case"point":return v(e);case"multipoint":return y(e);case"polyline":return x(e);case"polygon":return w(e);case"extent":return g(e);default:throw new Error(`Unsupported geometry type: ${e.type}`)}}function g(e){if(!e.getCacheValue(f)){const t=new s.E;t.setCoords(e.xmin,e.ymin,e.xmax,e.ymax),e.hasM&&t.setInterval(2,0,e.mmin,e.mmax),e.hasZ&&t.setInterval(1,0,e.zmin,e.zmax),e.setCacheValue(f,t)}return e.getCacheValue(f)}function y(e){if(!e.getCacheValue(f)){const t=new o.M,i=new s.P,n=e.points,r=e.hasM,a=e.hasZ,l=a?3:2;for(let e=0,s=n.length;e<s;e++){const s=n[e];i.setXYCoords(s[0],s[1]),a&&i.setZ(s[2]??0),r&&i.setM(s[l]??NaN),t.add(i)}e.setCacheValue(f,t)}return e.getCacheValue(f)}function v(e){if(!e.getCacheValue(f)){const t=new s.P;t.setXYCoords(e.x,e.y),e.hasM&&t.setM(e.m),e.hasZ&&t.setZ(e.z),e.setCacheValue(f,t)}return e.getCacheValue(f)}function w(e){if(!e.getCacheValue(f)){const{curveRings:t,hasM:i,hasZ:n,rings:r}=e,s=(0,p.fromGeometryToGXGeometry)({curveRings:t,hasM:i,hasZ:n,rings:r});e.setCacheValue(f,s)}return e.getCacheValue(f)}function x(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:i,hasZ:n,paths:r}=e,s=(0,p.fromGeometryToGXGeometry)({curvePaths:t,hasM:i,hasZ:n,paths:r});e.setCacheValue(f,s)}return e.getCacheValue(f)}function _(e){if(!e.getCacheValue(f)){const{curvePaths:t,hasM:i,hasZ:n,paths:r}=e,s=(0,p.fromGeometryToGXGeometryUsingImportOperator)({curvePaths:t,hasM:i,hasZ:n,paths:r});e.setCacheValue(f,s)}return e.getCacheValue(f)}function C(e){return e.cache?(e.cache[f]??=(0,p.fromSpatialReference)(e),e.cache[f]):(0,p.fromSpatialReference)(e)}function M(e,t){if(e)switch(e.getGeometryType()){case r.G.enumPoint:return T(e,t);case r.G.enumEnvelope:return b(e,t);case r.G.enumMultiPoint:return A(e,t);case r.G.enumPolyline:return R(e,t);case r.G.enumPolygon:return S(e,t)}return null}function b(e,t){if(e.isEmpty())return null;const i=new a.A({xmin:e.getXMin(),ymin:e.getYMin(),xmax:e.getXMax(),ymax:e.getYMax(),spatialReference:t}),n=e.getDescription();if(n.hasM()){const t=e.queryInterval(2,0);i.mmin=t.vmin,i.mmax=t.vmax}if(n.hasZ()){const t=e.queryInterval(1,0);i.zmin=t.vmin,i.zmax=t.vmax}return i.setCacheValue(f,e),i}function A(e,t){if(e.isEmpty())return null;const i=e.getDescription(),n=i.hasM(),r=i.hasZ(),o=[],a=new s.P;for(let t=0,i=e.getPointCount();t<i;t++){e.getPointByVal(t,a);const i=[a.getX(),a.getY()];r&&i.push(a.getZ()),n&&i.push(a.getM()),o.push(i)}const c=new l.A({hasM:n,hasZ:r,points:o,spatialReference:t});return c.setCacheValue(f,e),c}function T(e,t){if(e instanceof n.P)return new c.A({x:e.x,y:e.y,spatialReference:t});if(e.isEmpty())return null;const i=new c.A({x:e.getX(),y:e.getY(),spatialReference:t}),r=e.getDescription();return r.hasM()&&(i.m=e.getM()),r.hasZ()&&(i.z=e.getZ()),i.setCacheValue(f,e),i}function S(e,t){if(e.isEmpty())return null;const i=h.A.fromJSON({...(0,p.toGeometry)(e,null),spatialReference:t});return i.setCacheValue(f,e),i}function R(e,t){if(e.isEmpty())return null;const i=u.A.fromJSON({...(0,p.toGeometry)(e,null),spatialReference:t});return i.setCacheValue(f,e),i}},5808(e,t,i){i.d(t,{O:()=>n});const n={geodesic:0,loxodrome:1,"great-elliptic":2,"normal-section":3,"shape-preserving":4}},17499(e,t,i){i.d(t,{gw:()=>o});var n=i(49186),r=i(60408),s=i(62815);function o(e,t,i){let n;for(const o of e)if(o&&(0,r.Pv)(o)&&!("vertexAttributes"in o)){if(!n){null==t.vcsWkid&&null==i.vcsWkid||l(t,i);const e="type"in o?o.type:(0,r.$B)(o);if(n=(0,s.N)(e,t,i),!n)return}n(o)}}class a extends n.A{constructor(){super("projection:z-unsupported","projection of z values is unsupported between different vertical coordinate systems")}}function l({vcsWkid:e},{vcsWkid:t}){if((e??null)!==(t??null))throw new a}},72727(e,t,i){function n(e,t,i){if(t<=0)return 0;const n=e-i;return n<0?0:Math.floor(n/t)+1}i.d(t,{k:()=>n}),i(53966)},27921(e,t,i){i.d(t,{$Q:()=>x,C:()=>a,Cr:()=>h,O_:()=>c,Qj:()=>l,T7:()=>v,Tj:()=>w,lU:()=>u,mN:()=>_,vE:()=>C,vt:()=>o});var n=i(34727),r=i(35522),s=i(51850);function o(e=M){return[e[0],e[1],e[2],e[3]]}function a(e,t){return function(e,t,i,n,r=o()){return r[0]=e,r[1]=t,r[2]=i,r[3]=n,r}(t[0],t[1],t[2],t[3],e)}function l(e){return e}function c(e,t,i){const n=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],r=Math.abs(n-1)>1e-5&&n>1e-12?1/Math.sqrt(n):1;return i[0]=t[0]*r,i[1]=t[1]*r,i[2]=t[2]*r,i[3]=-(i[0]*e[0]+i[1]*e[1]+i[2]*e[2]),i}function h(e,t,i,n=o()){const r=i[0]-t[0],s=i[1]-t[1],a=i[2]-t[2],l=e[0]-t[0],c=e[1]-t[1],h=e[2]-t[2],u=s*h-a*c,p=a*l-r*h,f=r*c-s*l,d=u*u+p*p+f*f,m=Math.abs(d-1)>1e-5&&d>1e-12?1/Math.sqrt(d):1;return n[0]=u*m,n[1]=p*m,n[2]=f*m,n[3]=-(n[0]*e[0]+n[1]*e[1]+n[2]*e[2]),n}function u(e,t,i,n=0,s=Math.floor(i*(1/3)),o=Math.floor(i*(2/3))){if(i<3)return!1;t(f,n);let a=s,l=!1;for(;a<i-1&&!l;)t(d,a),a++,l=!(0,r.t2)(f,d);if(!l)return!1;for(a=Math.max(a,o),l=!1;a<i&&!l;)t(m,a),a++,(0,r.Re)(g,f,d),(0,r.S8)(g,g),(0,r.Re)(y,d,m),(0,r.S8)(y,y),l=!(0,r.t2)(f,m)&&!(0,r.t2)(d,m)&&Math.abs((0,r.Om)(g,y))<p;return l?(h(f,d,m,e),!0):(0!==n||1!==s||2!==o)&&u(e,t,i,0,1,2)}i(78955),i(44280),i(32114),i(32728);const p=.99619469809,f=(0,s.vt)(),d=(0,s.vt)(),m=(0,s.vt)(),g=(0,s.vt)(),y=(0,s.vt)();function v(e,t,i){return function(e){return 0===e||1===e}(C(e,t.origin,t.vector,0,i))}function w(e,t){return _(e,t)>=0}function x(e,t){const i=(0,r.Om)(e,t.ray.direction),n=-_(e,t.ray.origin);if(n<0&&i>=0)return!1;if(i>-1e-6&&i<1e-6)return n>0;if((n<0||i<0)&&!(n<0&&i<0))return!0;const s=n/i;return i>0?s<t.c1&&(t.c1=s):s>t.c0&&(t.c0=s),t.c0<=t.c1}function _(e,t){return(0,r.Om)(e,t)+e[3]}function C(e,t,i,s,o){const a=(0,r.Om)(e,i),l=_(e,t);if(0===a)return l>=0?2:3;let c=-l/a;return 1&s&&(c=(0,n.qE)(c,0,1)),!(4&s)&&c<0||!(8&s)&&c>1?l>=0?2:3:((0,r.WQ)(o,t,(0,r.hs)(o,i,c)),l>=0?0:1)}const M=[0,0,1,0]},44280(e,t,i){i.d(t,{g7:()=>a,gr:()=>o});var n=i(34727),r=i(35522),s=i(51850);function o(e,t){return(0,r.Om)(e,t)/(0,r.Bw)(e)}function a(e,t){const i=(0,r.Om)(e,t)/((0,r.Bw)(e)*(0,r.Bw)(t));return-(0,n.XM)(i)}(0,s.vt)(),(0,s.vt)()},32114(e,t,i){i.d(t,{Rc:()=>f,J8:()=>d,rq:()=>u,Km:()=>p}),i(44208);var n=i(26390),r=i(29242),s=i(9093),o=i(82534),a=i(48163),l=i(51850),c=i(91829);class h{constructor(e){this._create=e,this._items=new Array,this._itemsPtr=0}get(){return 0===this._itemsPtr&&(0,n.d)(()=>this._reset()),this._itemsPtr>=this._items.length&&this._items.push(this._create()),this._items[this._itemsPtr++]}_reset(){const e=2*this._itemsPtr;this._items.length>e&&(this._items.length=e),this._itemsPtr=0}static createVec2f64(){return new h(a.vt)}static createVec3f64(){return new h(l.vt)}static createVec4f64(){return new h(c.vt)}static createMat3f64(){return new h(r.vt)}static createMat4f64(){return new h(s.vt)}static createQuatf64(){return new h(o.vt)}get test(){}}h.createVec2f64();const u=h.createVec3f64(),p=h.createVec4f64(),f=(h.createMat3f64(),h.createMat4f64()),d=h.createQuatf64()},62369(e,t,i){i.r(t),i.d(t,{default:()=>N});var n=i(5482),r=i(11254),s=i(49186),o=i(97768),a=i(25728),l=i(17676),c=i(84952),h=i(91429),u=i(54239),p=i(4146),f=i(89186),d=i(18768),m=i(34287),g=i(8303),y=i(10873),v=i(87378),w=i(35982);class x extends w.B{constructor(e=null){super("LercWorker","_decode",{_decode:e=>[e.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,i){return e&&0!==e.byteLength?this.invoke({buffer:e,options:t},i):Promise.resolve(null)}release(){--this.ref<=0&&(_.forEach((e,t)=>{e===this&&_.delete(t)}),this.destroy())}}const _=new Map;var C=i(34727),M=i(19419),b=(i(44208),i(86211)),A=i(5443),T=i(86738),S=i(16930),R=i(21325),z=i(28735),O=i(91806),P=i(87045);class E{constructor(e){const t=E.checkUnsupported(e);if(null!=t)throw t;const i=e;this.spatialReference=i.spatialReference,this._isWebMercator=this.spatialReference.isWebMercator,this._isGCS=(0,R.EA)(this.spatialReference),this.origin=[i.origin.x,i.origin.y],this.pixelSize=i.size[0],this.dpi=i.dpi;const n=i.lods.reduce((e,t)=>(t.level<e.minLod.level&&(e.minLod=t),e.max=Math.max(e.max,t.level),e),{minLod:i.lods[0],max:-1/0}),r=n.minLod,s=2**r.level;let o=r.resolution*s,a=r.scale*s;this.levels=new Array(n.max+1);for(let e=0;e<this.levels.length;e++)this.levels[e]={resolution:o,scale:a,tileSize:[o*i.size[0],o*i.size[1]]},o/=2,a/=2}clone(){return new E(this.toTileInfo())}toTileInfo(){return new P.A({dpi:this.dpi,origin:new T.A({x:this.origin[0],y:this.origin[1],spatialReference:this.spatialReference}),size:[this.pixelSize,this.pixelSize],spatialReference:this.spatialReference,lods:this.levels.map((e,t)=>new O.A({level:t,scale:e.scale,resolution:e.resolution}))})}getExtent(e,t,i,n){const r=this.levels[e],s=r.tileSize[0],o=r.tileSize[1];n[0]=this.origin[0]+i*s,n[2]=this.origin[0]+(i+1)*s,n[3]=this.origin[1]-t*o,n[1]=this.origin[1]-(t+1)*o}convertExtentToRadians(e,t){this._isWebMercator?(t[0]=(0,z.yw)(e[0]),t[1]=(0,z.jg)(e[1]),t[2]=(0,z.yw)(e[2]),t[3]=(0,z.jg)(e[3])):this._isGCS&&(t[0]=(0,C.kU)(e[0]),t[1]=(0,C.kU)(e[1]),t[2]=(0,C.kU)(e[2]),t[3]=(0,C.kU)(e[3]))}getExtentGeometry(e,t,i,n=new A.A){return this.getExtent(e,t,i,Z),n.spatialReference=this.spatialReference,n.xmin=Z[0],n.ymin=Z[1],n.xmax=Z[2],n.ymax=Z[3],n.zmin=void 0,n.zmax=void 0,n}ensureMaxLod(e){if(null==e)return!1;let t=!1;for(;this.levels.length<=e;){const{resolution:e,scale:i}=this.levels[this.levels.length-1],n=e/2*this.pixelSize;this.levels.push({resolution:e/2,scale:i/2,tileSize:[n,n]}),t=!0}return t}capMaxLod(e){this.levels.length>e+1&&(this.levels.length=e+1)}getMaxLod(){return this.levels.length-1}scaleAtLevel(e){return this.levels[0].scale/2**e}levelAtScale(e){const t=this.levels[0].scale;return e>=t?0:Math.log(t/e)*Math.LOG2E}resolutionAtLevel(e){return this.levels[0].resolution/2**e}compatibleWith(e,t=1/0){if(E.checkUnsupported(e))return!1;const i=new E(e);if(!i.spatialReference.equals(this.spatialReference))return!1;if(i.pixelSize!==this.pixelSize)return!1;const n=Math.min(this.levels.length-1,i.levels.length-1,t),r=this.levels[n].resolution;let s=.5*r;return!(!(0,C.Sp)(i.origin[0],this.origin[0],s)||!(0,C.Sp)(i.origin[1],this.origin[1],s))&&(s=.5*r/2**n/this.pixelSize*12,(0,C.Sp)(r,i.levels[n].resolution,s))}rootTilesInExtent(e,t=null,i=1/0){const n=new Array,r=this.levels[0].tileSize;if(null==e||0===r[0]||0===r[1])return n;E.computeRowColExtent(e,r,this.origin,Z);let s=Z[1],o=Z[3],a=Z[0],l=Z[2];const c=l-a,h=o-s;if(c*h>i){const e=Math.floor(Math.sqrt(i));h>e&&(s=s+Math.floor(.5*h)-Math.floor(.5*e),o=s+e),c>e&&(a=a+Math.floor(.5*c)-Math.floor(.5*e),l=a+e)}for(let e=s;e<o;e++)for(let t=a;t<l;t++)n.push([0,e,t]);return null!=t&&(t[0]=this.origin[0]+a*r[0],t[1]=this.origin[1]-o*r[1],t[2]=this.origin[0]+l*r[0],t[3]=this.origin[1]-s*r[1]),n}static computeRowColExtent(e,t,i,n){const r=.001*(e[2]-e[0]+(e[3]-e[1]));n[0]=Math.max(0,Math.floor((e[0]+r-i[0])/t[0])),n[2]=Math.max(0,Math.ceil((e[2]-r-i[0])/t[0])),n[1]=Math.max(0,Math.floor((i[1]-e[3]+r)/t[1])),n[3]=Math.max(0,Math.ceil((i[1]-e[1]-r)/t[1]))}static isPowerOfTwo(e){const t=e.lods,i=t[0].resolution*2**t[0].level;return!t.some(e=>!(0,C.b6)(e.resolution,i/2**e.level))}static hasGapInLevels(e){const t=e.lods.map(e=>e.level);t.sort((e,t)=>e-t);for(let e=1;e<t.length;e++)if(t[e]!==t[0]+e)return!0;return!1}static tileSizeSupported(e){const t=e.size[1];return t===e.size[0]&&!(t&t-1)&&t>=128&&t<=512}static hasOriginPerLODs(e){const t=e.origin;return e.lods.some(e=>null!=e.origin&&(e.origin[0]!==t.x||e.origin[1]!==t.y))}static getMissingTileInfoError(){return new s.A("tilingscheme:tile-info-missing","Tiling scheme must have tiling information")}static checkUnsupported(e){return null==e?new s.A("tilingscheme:tile-info-missing","Tiling scheme must have tiling information"):e.lods.length<1?new s.A("tilingscheme:generic","Tiling scheme must have at least one level"):E.isPowerOfTwo(e)?E.hasGapInLevels(e)?new s.A("tilingscheme:gaps","Tiling scheme levels must not have gaps between min and max level"):E.tileSizeSupported(e)?E.hasOriginPerLODs(e)?new s.A("tilingscheme:multiple-origin","Tiling scheme levels must not have their own origin"):null:new s.A("tilingscheme:tile-size","Tiles must be square and size must be one of [128, 256, 512]"):new s.A("tilingscheme:power-of-two","Tiling scheme must be power of two")}static fromExtent(e,t){const i=e[2]-e[0],n=e[3]-e[1],r=(0,b.GA)(t),s=1.2*Math.max(i,n),o=s/256,a=o*r*(96/.0254),l=new E(new P.A({size:[256,256],origin:new T.A({x:e[0]-.5*(s-i),y:e[3]+.5*(s-n)}),lods:[new O.A({level:0,resolution:o,scale:a})],spatialReference:t}));return l.ensureMaxLod(20),l}static makeWebMercatorAuxiliarySphere(e){const t=new E(E.WebMercatorAuxiliarySphereTileInfo);return t.ensureMaxLod(e),t}static makeGCSWithTileSize(e,t=256,i=16){const n=256/t,r=new E(new P.A({size:[t,t],origin:new T.A({x:-180,y:90,spatialReference:e}),spatialReference:e,lods:[new O.A({level:0,resolution:.703125*n,scale:295497598.570834*n})]}));return r.ensureMaxLod(i),r}static{this.WebMercatorAuxiliarySphereTileInfo=new P.A({size:[256,256],origin:new T.A({x:-20037508.342787,y:20037508.342787,spatialReference:S.A.WebMercator}),spatialReference:S.A.WebMercator,lods:[new O.A({level:0,resolution:156543.03392800014,scale:591657527.591555})]})}static{this.WebMercatorAuxiliarySphere=E.makeWebMercatorAuxiliarySphere(19)}get test(){}}const Z=(0,M.vt)(),I=(0,C.$8)(C.pq/10),D=(0,M.vt)();E.WebMercatorAuxiliarySphere.getExtent(0,0,0,D),(0,M.vt)([-180,-90,180,90]);var L=i(36005);let j=class extends((0,f.f)((0,d.b)((0,m.q)((0,g.A)((0,a.M)(p.A)))))){constructor(...e){super(...e),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=function(e=null){let t=_.get(e);return t||(null!=e?(t=new x(t=>e.immediate.schedule(t)),_.set(e,t)):(t=new x,_.set(null,t))),++t.ref,t}()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}destroy(){this._lercDecoder=(0,o.Gz)(this._lercDecoder)}readCapabilities(e,t){const i=t.capabilities&&t.capabilities.split(",").map(e=>e.toLowerCase().trim());return i?{operations:{supportsTileMap:i.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(e,t){let i=t.currentVersion;return i||(i=9.3),i}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:e=>{if(e.typeKeywords)for(let t=0;t<e.typeKeywords.length;t++)if("elevation 3d layer"===e.typeKeywords[t].toLowerCase())return!0;throw new s.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},e).catch(l.QP).then(()=>this._fetchImageService(t))),Promise.resolve(this)}fetchTile(e,t,i,n){const s=n?.signal,o={responseType:"array-buffer",signal:s},a={noDataValue:n?.noDataValue,returnFileInfo:!0};return this.load().then(()=>this._fetchTileAvailability(e,t,i,n)).then(()=>(0,r.A)(this.getTileUrl(e,t,i),o)).then(e=>this._lercDecoder.decode(e.data,a,s)).then(e=>new v.A(e?new v.A({values:e.pixelData,width:e.width,height:e.height,noDataValue:e.noDataValue}):{values:[],width:0,height:0,noDataValue:n?.noDataValue??I}))}getTileUrl(e,t,i){const n=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,r=(0,c.x0)({...this.parsedUrl.query,blankTile:!n&&null});return`${this.parsedUrl.path}/tile/${e}/${t}/${i}${r?"?"+r:""}`}async queryElevation(e,t){const{query:n}=await i.e(91).then(i.bind(i,90091));return(0,l.Te)(t),n(this,e,t)}async createElevationSampler(e,t){const{createSampler:n}=await i.e(91).then(i.bind(i,90091));return(0,l.Te)(t),n(this,e,t)}_fetchTileAvailability(e,t,i,n){return this.tilemapCache?this.tilemapCache.fetchAvailability(e,t,i,n):Promise.resolve("unknown")}async _fetchImageService(e){if(this.sourceJSON)return this.sourceJSON;const t={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:e},i=await(0,r.A)(this.parsedUrl.path,t);i.ssl&&(this.url=this.url?.replace(/^http:/i,"https:")),this.sourceJSON=i.data,this.read(i.data,{origin:"service",url:this.parsedUrl})}get hasOverriddenFetchTile(){return!this.fetchTile[V]}};(0,n.Cg)([(0,h.MZ)({readOnly:!0})],j.prototype,"capabilities",void 0),(0,n.Cg)([(0,L.w)("service","capabilities",["capabilities"])],j.prototype,"readCapabilities",null),(0,n.Cg)([(0,h.MZ)({json:{read:{source:"copyrightText"}}})],j.prototype,"copyright",void 0),(0,n.Cg)([(0,h.MZ)({readOnly:!0,type:u.A})],j.prototype,"heightModelInfo",void 0),(0,n.Cg)([(0,h.MZ)({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],j.prototype,"path",void 0),(0,n.Cg)([(0,h.MZ)({type:["show","hide"]})],j.prototype,"listMode",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],j.prototype,"minScale",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],j.prototype,"maxScale",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],j.prototype,"opacity",void 0),(0,n.Cg)([(0,h.MZ)({type:["ArcGISTiledElevationServiceLayer"]})],j.prototype,"operationalLayerType",void 0),(0,n.Cg)([(0,h.MZ)()],j.prototype,"sourceJSON",void 0),(0,n.Cg)([(0,h.MZ)({json:{read:!1},value:"elevation",readOnly:!0})],j.prototype,"type",void 0),(0,n.Cg)([(0,h.MZ)(y.OZ)],j.prototype,"url",void 0),(0,n.Cg)([(0,h.MZ)()],j.prototype,"version",void 0),(0,n.Cg)([(0,L.w)("version",["currentVersion"])],j.prototype,"readVersion",null),j=(0,n.Cg)([(0,h.$K)("esri.layers.ElevationLayer")],j);const V=Symbol("default-fetch-tile");j.prototype.fetchTile[V]=!0;const N=j},4146(e,t,i){i.d(t,{A:()=>v});var n=i(5482),r=i(11254),s=i(49186),o=i(65529),a=i(4902),l=i(92474),c=i(53966),h=i(17676),u=i(84952),p=i(91429),f=i(5443),d=i(16930),m=i(92602),g=i(79677);let y=0,v=class extends((0,o.Zt)((0,a.s)(l.x_))){constructor(){super(...arguments),this.attributionDataUrl=null,this.fullExtent=new f.A(-180,-90,180,90,d.A.WGS84),this.id=Date.now().toString(16)+"-layer-"+y++,this.legendEnabled=!0,this.listMode="show",this.opacity=1,this.parent=null,this.persistenceEnabled=!1,this.popupEnabled=!0,this.attributionVisible=!0,this.spatialReference=d.A.WGS84,this.title=null,this.type=null,this.url=null,this.visibilityTimeExtent=null,this.visible=!0}static async fromArcGISServerUrl(e){const t="string"==typeof e?{url:e}:e;return(await Promise.all([i.e(812),i.e(7982)]).then(i.bind(i,27982))).fromUrl(t)}static fromPortalItem(e){return async function(e){const t="portalItem"in e?e:{portalItem:e},{fromItem:n}=await Promise.all([i.e(812),i.e(5613),i.e(909)]).then(i.bind(i,45613));try{return await n(t)}catch(e){const i=t?.portalItem,n=i?.id||"unset",r=i?.portal?.url||m.A.portalUrl;throw c.A.getLogger("esri.layers.support.fromPortalItem").error("#fromPortalItem()","Failed to create layer from portal item (portal: '"+r+"', id: '"+n+"')",e),e}}(e)}initialize(){this.when().catch(e=>{(0,h.zf)(e)||c.A.getLogger(this).error("#load()",`Failed to load layer (title: '${this.title??"no title"}', id: '${this.id??"no id"}')`,{error:e})})}destroy(){const{parent:e}=this;e&&(this.parent=null,e.removeChildLayer?.(this))}get effectiveVisible(){return this.visible&&(this.parent?.effectiveVisible??!0)}get hasAttributionData(){return null!=this.attributionDataUrl}get loaded(){return super.loaded}removeFromParent(){const{parent:e}=this;e&&(e.removeChildLayer?.(this),this.parent=null)}get parsedUrl(){return(0,u.An)(this.url)}createLayerView(e,t){return Promise.reject(new s.A("layer:create-layer-view","Layer does not support creating a layer view"))}async fetchAttributionData(){const e=this.attributionDataUrl;if(this.hasAttributionData&&e)return(await(0,r.A)(e,{query:{f:"json"},responseType:"json"})).data;throw new s.A("layer:no-attribution-data","Layer does not have attribution data")}};(0,n.Cg)([(0,p.MZ)({type:String})],v.prototype,"attributionDataUrl",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"effectiveVisible",null),(0,n.Cg)([(0,p.MZ)({type:f.A})],v.prototype,"fullExtent",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"hasAttributionData",null),(0,n.Cg)([(0,p.MZ)({type:String,clonable:!1})],v.prototype,"id",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"legendEnabled",void 0),(0,n.Cg)([(0,p.MZ)({type:["show","hide","hide-children"]})],v.prototype,"listMode",void 0),(0,n.Cg)([(0,p.MZ)({type:Number,range:{min:0,max:1},nonNullable:!0})],v.prototype,"opacity",void 0),(0,n.Cg)([(0,p.MZ)({clonable:!1})],v.prototype,"parent",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0})],v.prototype,"parsedUrl",null),(0,n.Cg)([(0,p.MZ)({type:Boolean,readOnly:!0})],v.prototype,"persistenceEnabled",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"popupEnabled",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean})],v.prototype,"attributionVisible",void 0),(0,n.Cg)([(0,p.MZ)({type:d.A})],v.prototype,"spatialReference",void 0),(0,n.Cg)([(0,p.MZ)({type:String})],v.prototype,"title",void 0),(0,n.Cg)([(0,p.MZ)({readOnly:!0,json:{read:!1}})],v.prototype,"type",void 0),(0,n.Cg)([(0,p.MZ)()],v.prototype,"url",void 0),(0,n.Cg)([(0,p.MZ)({type:g.A})],v.prototype,"visibilityTimeExtent",void 0),(0,n.Cg)([(0,p.MZ)({type:Boolean,nonNullable:!0})],v.prototype,"visible",void 0),v=(0,n.Cg)([(0,p.$K)("esri.layers.Layer")],v)},92722(e,t,i){i.d(t,{A:()=>r});var n=i(69397);class r{constructor(e=[],t=[],i=!1,n=!1){this.lengths=e??[],this.coords=t??[],this.hasZ=i,this.hasM=n}static fromJSON({lengths:e,coords:t,hasZ:i,hasM:n}){return new r(e,t,i||!1,n||!1)}static fromRect([e,t,i,n]){const s=i-e,o=n-t;return new r([5],[e,t,s,0,0,o,-s,0,0,-o])}get isPoint(){return 0===this.lengths.length&&this.coords.length>=2}get maxLength(){return Math.max(...this.lengths)}get size(){return this.isPoint?1:this.lengths.reduce((e,t)=>e+t,0)}get usedMemory(){return 64+(0,n.Qf)(this.lengths,this.coords)}get stride(){return 2+(this.hasZ?1:0)+(this.hasM?1:0)}area(){if(this.isPoint)return 0;let e=0,t=0;for(const i of this.lengths){if(i<3)continue;const{stride:n}=this;let r=this.coords[n*t],s=this.coords[n*t+1];for(let o=1;o<i;o+=1){const i=n*(t+o),a=this.coords[i],l=this.coords[i+1];e+=-.5*(a-r)*(l+s),r=a,s=l}t+=i}return e}forEachVertex(e){let t=0;if(this.isPoint)return e(this.coords[0],this.coords[1]);const{stride:i}=this;for(const n of this.lengths){for(let r=0;r<n;r++){const n=i*(t+r);e(this.coords[n],this.coords[n+1])}t+=n}}deltaDecode(){const e=this.clone(),{coords:t,lengths:i}=e;let n=0;const{stride:r}=this;for(const e of i){for(let i=1;i<e;i++){const e=r*(n+i);t[e]+=t[e-r],t[e+1]+=t[e+1-r]}n+=e}return e}clone(e){if(this.isPoint)return new r([],Array.from(this.coords.slice(0,this.stride)),this.hasZ,this.hasM);const t=Array.from(this.lengths),{stride:i,size:n}=this,s=this.coords.slice(0,n*i);return e?(e.set(s),new r(t,e,this.hasZ,this.hasM)):new r(t,Array.from(s),this.hasZ,this.hasM)}justXY(){const{stride:e,size:t}=this;if(2===e)return this;const i=new Array(t*e);for(let t=0,n=0;t<i.length;t+=e)i[n++]=this.coords[t],i[n++]=this.coords[t+1];return new r(this.lengths,i,!1,!1)}}},89186(e,t,i){i.d(t,{f:()=>h});var n=i(5482),r=i(91429),s=i(16930),o=i(87045),a=i(65509),l=i(25943),c=i(36005);const h=e=>{const t=e;let i=class extends t{constructor(){super(...arguments),this.copyright=null,this.minScale=0,this.maxScale=0,this.spatialReference=null,this.tileInfo=null,this.tilemapCache=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}readMaxScale(e,t){return null!=t.minLOD&&null!=t.maxLOD?e:0}get supportsBlankTile(){return this.version>=10.2}readTilemapCache(e,t,i){const n=t.capabilities?.toLowerCase().includes("tilemap");let{minLOD:r,maxLOD:s,minScale:c,maxScale:h}=t;if(null==r&&null==s&&(0!==c||0!==h)){const e=e=>Math.round(1e4*e)/1e4;c=e(c||t.tileInfo.lods[0].scale),h=e(h||t.tileInfo.lods[t.tileInfo.lods.length-1].scale);for(const i of t.tileInfo.lods){const t=e(i.scale);r=t>=c?i.level:r,s=t>=h?i.level:s}}if(n)return new l.d({layer:this,minLOD:r,maxLOD:s});if(t.tileInfo){const e=new o.A;return e.read(t.tileInfo,i),new a.A(e,r,s)}return null}};return(0,n.Cg)([(0,r.MZ)({json:{read:{source:"copyrightText"}}})],i.prototype,"copyright",void 0),(0,n.Cg)([(0,r.MZ)()],i.prototype,"minScale",void 0),(0,n.Cg)([(0,c.w)("service","minScale")],i.prototype,"readMinScale",null),(0,n.Cg)([(0,r.MZ)()],i.prototype,"maxScale",void 0),(0,n.Cg)([(0,c.w)("service","maxScale")],i.prototype,"readMaxScale",null),(0,n.Cg)([(0,r.MZ)({type:s.A})],i.prototype,"spatialReference",void 0),(0,n.Cg)([(0,r.MZ)({readOnly:!0})],i.prototype,"supportsBlankTile",null),(0,n.Cg)([(0,r.MZ)({type:o.A})],i.prototype,"tileInfo",void 0),(0,n.Cg)([(0,r.MZ)()],i.prototype,"tilemapCache",void 0),(0,n.Cg)([(0,c.w)("service","tilemapCache",["capabilities","tileInfo"])],i.prototype,"readTilemapCache",null),(0,n.Cg)([(0,r.MZ)()],i.prototype,"version",void 0),i=(0,n.Cg)([(0,r.$K)("esri.layers.mixins.ArcGISCachedService")],i),i}},63490(e,t,i){i.d(t,{E1:()=>c,Mr:()=>l,TH:()=>a});var n=i(5482),r=i(69540),s=i(25482),o=i(91429);let a=class extends((0,r.OU)(s.o)){constructor(){super(...arguments),this.url=null}};(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],a.prototype,"lod",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"rasterFunction",void 0),(0,n.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],a.prototype,"url",void 0),a=(0,n.Cg)([(0,o.$K)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ElevationSource")],a);let l=class extends((0,r.OU)(s.o)){constructor(e){super(e),this.constantElevation=null}};(0,n.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"constantElevation",void 0),l=(0,n.Cg)([(0,o.$K)("esri.layers.orientedImagery.core.ElevationSourceDefinitions.ConstantElevation")],l);const c=e=>null!=e&&"number"==typeof e.constantElevation},23281(e,t,i){i.d(t,{eR:()=>C,Qv:()=>z,fs:()=>A,Yp:()=>O,o:()=>E,RR:()=>M,l6:()=>b});var n=i(66552),r=(i(86211),i(28735),i(5482)),s=i(69540),o=i(25482),a=i(91429),l=i(69622),c=i(21325);let h=class extends l.A{set horizontalWKID(e){e?(0,c.fn)({wkid:+e})?this._set("horizontalWKID",+e):this._set("horizontalWKID",e):this._set("horizontalWKID",null)}set verticalWKID(e){e?this._set("verticalWKID",isFinite(e)&&(0,c.fn)({wkid:+e})?+e:null):this._set("verticalWKID",null)}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:i,radialDistortionCoefficients:n,tangentialDistortionCoefficients:r}=this;return e?.length>1&&!Number.isNaN(t)&&i?.length>1&&n?.length>1&&r?.length>1}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"affineTransformations",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"focalLength",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"principalOffsetPoint",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"radialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"tangentialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"horizontalWKID",null),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"verticalWKID",null),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"x",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"y",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"z",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],h.prototype,"type",void 0),h=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientation")],h);const u=h;let p=class extends((0,s.OU)((0,o.T)(u))){constructor(){super(...arguments),this.type=1}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,heading:o,pitch:a,roll:l,affineTransformations:c,focalLength:h,principalOffsetPoint:u,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,i,n,r,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(h),u?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>Number.isNaN(e)?"":e).join("|")}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],p.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"affineTransformations",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"focalLength",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"principalOffsetPoint",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"radialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],p.prototype,"tangentialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"heading",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"pitch",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"roll",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"x",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"y",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],p.prototype,"z",void 0),p=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationHPR")],p);const f=p;let d=class extends((0,s.OU)((0,o.T)(u))){constructor(){super(...arguments),this.type=4}toString(){const{type:e,latitude:t,longitude:i,ellipsoidRadius:n,squaredEccentricity:r,properties:s}=this,o=`${s}`.split("|");return o.splice(1,1),`${e}|${t}|${i}|${n}|${r}|${o.join("|")}`}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"latitude",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"longitude",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"ellipsoidRadius",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0},type:Number})],d.prototype,"squaredEccentricity",void 0),(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],d.prototype,"properties",void 0),d=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationLTP")],d);const m=d;let g=class extends((0,s.OU)((0,o.T)(u))){constructor(){super(...arguments),this.type=2}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,omega:o,phi:a,kappa:l,affineTransformations:c,focalLength:h,principalOffsetPoint:u,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,i,n,r,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(h),u?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>isNaN(e)?"":e).join("|")}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],g.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"affineTransformations",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"focalLength",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"principalOffsetPoint",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"radialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],g.prototype,"tangentialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"omega",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"phi",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"kappa",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"x",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"y",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],g.prototype,"z",void 0),g=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationOPK")],g);const y=g;let v=class extends((0,s.OU)((0,o.T)(u))){constructor(){super(...arguments),this.type=3}get isAdvanced(){const{affineTransformations:e,focalLength:t,principalOffsetPoint:i,radialDistortionCoefficients:n,tangentialDistortionCoefficients:r}=this;return e?.length>1||!Number.isNaN(t)||i?.length>1||n?.length>1||r?.length>1}toString(){const{type:e,horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,yaw:o,pitch:a,roll:l,affineTransformations:c,focalLength:h,principalOffsetPoint:u,radialDistortionCoefficients:p,tangentialDistortionCoefficients:f}=this,d=[e,t,i,n,r,s,o,a,l];return this.isAdvanced&&(c?.forEach(e=>d.push(e)),d.push(h),u?.forEach(e=>d.push(e)),u?.forEach(e=>d.push(e)),p?.forEach(e=>d.push(e)),f?.forEach(e=>d.push(e))),d.map(e=>Number.isNaN(e)?"":e).join("|")}};(0,r.Cg)([(0,a.MZ)({json:{write:!0}})],v.prototype,"type",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"affineTransformations",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"focalLength",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"principalOffsetPoint",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"radialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:[Number],json:{write:!0}})],v.prototype,"tangentialDistortionCoefficients",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"yaw",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"pitch",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"roll",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"x",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"y",void 0),(0,r.Cg)([(0,a.MZ)({type:Number,json:{write:!0}})],v.prototype,"z",void 0),v=(0,r.Cg)([(0,a.$K)("esri.layers.orientedImagery.core.CameraOrientationYPR")],v);const w=v,x=new Map;x.set("2",{desc:"Using Omega Phi Kappa",constructor:y}),x.set("1",{desc:"Using Heading, Pitch and Roll",constructor:f}),x.set("3",{desc:"Using Yaw, Pitch and Roll",constructor:w}),x.set("4",{desc:"Using Local Tangent Plane",constructor:m});var _=i(63490);function C(e,t,i){return e?(0,_.E1)(e)?new _.Mr(e):function(e,t,i){let{url:n}=e;return n?(n=function(e,t,i){return t&&(e=`${t}${e}`),i&&(e+=`${i}`),e}(n,t,i),new _.TH({...e,url:n})):null}(e,t,i):e}const M=new n.J({Minutes:"minutes",Hours:"hours",Days:"days",Weeks:"weeks",Months:"months",Years:"years"}),b=new n.J({Feet:"feet",Meter:"meter"}),A=new n.J({360:"360",Horizontal:"horizontal",Inspection:"inspection",Nadir:"nadir",Oblique:"oblique",Terrestrial360Video:"terrestrial-360-video",TerrestrialFrameVideo:"terrestrial-frame-video",Aerial360Video:"aerial-360-video",AerialFrameVideo:"aerial-frame-video","":null}),T=new Map;T.set("1",function(e){const[t,i,n,r,s,o,a,l,c,h,u,p,f,d,m,g,y,v,w,x,_,C]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,heading:o,pitch:a,roll:l,...R([c,h,u,p,f,d],[g,y],[v,w,x],[_,C],m)}}),T.set("3",function(e){const[t,i,n,r,s,o,a,l,c,h,u,p,f,d,m,g,y,v,w,x,_,C]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,yaw:o,pitch:a,roll:l,...R([c,h,u,p,f,d],[g,y],[v,w,x],[_,C],m)}}),T.set("2",function(e){const[t,i,n,r,s,o,a,l,c,h,u,p,f,d,m,g,y,v,w,x,_,C]=e.slice(1);return{horizontalWKID:t,verticalWKID:i,x:n,y:r,z:s,omega:o,phi:a,kappa:l,...R([c,h,u,p,f,d],[g,y],[v,w,x],[_,C],m)}}),T.set("4",function(e){const[t,i,n,r,s,...o]=e.slice(1),a=T.get(s),l=x.get(s)?.constructor;return a&&l?{latitude:t,longitude:i,ellipsoidRadius:n,squaredEccentricity:r,properties:new l(a([s,"",...o]))}:null});const S=e=>{const t=e.map(e=>parseFloat(e)).filter(e=>!isNaN(e));if(t.length===e.length)return t};function R(e,t,i,n,r){const s=S(e),o=S(t),a=S(i),l=S(n);return{affineTransformations:6===s?.length?s:void 0,focalLength:6===s?.length?parseFloat(r):void 0,principalOffsetPoint:2!==o?.length?[0,0]:o,radialDistortionCoefficients:3!==a?.length?[0,0,0]:a,tangentialDistortionCoefficients:2!==l?.length?[0,0]:l}}function z(e){return Array.isArray(e)&&e?.length>5&&!e.some(isNaN)}function O(e){for(e=e.slice(0,8);e.length<8;)e.push(0);return e}const P="sequenceorder";function E(e,t){if(!e){const e=t.find(e=>e.name.toLocaleLowerCase()===P.toLocaleLowerCase());return e?[{fieldName:e.name,sortOrder:"asc"}]:null}return e.split(";").map(e=>{const[i,n]=e.split(/\s+/).map(e=>e.trim()),r=t.find(e=>e.name.toLowerCase()===i.toLowerCase());return r?{fieldName:r?r.name:P,sortOrder:"desc"===n?"desc":"asc"}:null}).filter(e=>null!=e)}},90091(e,t,i){i.d(t,{createSampler:()=>z,query:()=>R});var n=i(60999),r=i(49186),s=i(97768),o=i(17676),a=i(86211),l=i(91218),c=i(19419),h=i(4576),u=i(72802);class p{constructor(e,t){this.layer=e,this.parameters=t}}class f extends p{constructor(e,t,i){super(e,i),this.outSpatialReference=t,this.type="geometry"}selectTilesAtLOD(e){if(e<0)this.geometry.coordinates.forEach(e=>e.tile=null);else{const{tileInfo:t,tilemapCache:i}=this.layer,n=g(t,i)[e].level;this.geometry.coordinates.forEach(e=>e.tile=t.tileAt(n,e.x,e.y))}}allElevationTilesFetched(){return!this.geometry.coordinates.some(e=>!e.elevationTile)}clearElevationTiles(){for(const e of this.geometry.coordinates)e.elevationTile!==this.outsideExtentTile&&(e.elevationTile=null)}populateElevationTiles(e){for(const t of this.geometry.coordinates)!t.elevationTile&&t.tile?.id&&(t.elevationTile=e[t.tile.id])}remapTiles(e){for(const t of this.geometry.coordinates){const i=t.tile?.id;t.tile=i?e[i]:null}}getTilesToFetch(){return(0,h.Am)(this.geometry.coordinates.filter(({tile:e,elevationTile:t})=>e?.id&&!t),(e,t)=>e.tile?.id===t.tile?.id).map(({tile:e})=>e)}forEachTileToFetch(e){for(const t of this.geometry.coordinates)t.tile&&!t.elevationTile&&e(t.tile,()=>t.tile=null)}}class d extends p{constructor(e,t,i,n){super(e,i),this.maskExtents=n,this.type="extent",this.elevationTiles=[],this._candidateTiles=[],this._fetchedCandidates=new Set,this.extent=t.clone().intersection(e.fullExtent)}selectTilesAtLOD(e,t){const i=this._maximumLodForRequests(t),n=Math.min(i,e);n<0?this._candidateTiles.length=0:this._selectCandidateTilesCoveringExtentAt(n)}_maximumLodForRequests(e){const{tileInfo:t,tilemapCache:i}=this.layer,n=g(t,i);if(!e)return n.length-1;const r=this.extent;if(null==r)return-1;for(let i=n.length-1;i>=0;i--){const s=n[i],o=s.resolution*t.size[0],a=s.resolution*t.size[1];if(Math.ceil(r.width/o)*Math.ceil(r.height/a)<=e)return i}return-1}allElevationTilesFetched(){return this._candidateTiles.length===this.elevationTiles.length}clearElevationTiles(){this.elevationTiles.length=0,this._fetchedCandidates.clear()}populateElevationTiles(e){for(const t of this._candidateTiles){const i=t.id&&e[t.id];i&&(this._fetchedCandidates.add(t),this.elevationTiles.push(i))}}remapTiles(e){this._candidateTiles=y(this._candidateTiles.map(t=>e[t.id]))}getTilesToFetch(){return this._candidateTiles}forEachTileToFetch(e,t){const i=this._candidateTiles;this._candidateTiles=[],i.forEach(i=>{if(this._fetchedCandidates.has(i))return void t?.(i);let n=!1;e(i,()=>n=!0),n?t?.(i):this._candidateTiles.push(i)}),this._candidateTiles=y(this._candidateTiles,t)}_selectCandidateTilesCoveringExtentAt(e){this._candidateTiles.length=0;const t=this.extent;if(null==t)return;const{tileInfo:i,tilemapCache:n}=this.layer,r=g(i,n)[e],s=i.tileAt(r.level,t.xmin,t.ymin),o=s.extent,a=r.resolution*i.size[0],l=r.resolution*i.size[1],c=Math.ceil((t.xmax-o[0])/a),h=Math.ceil((t.ymax-o[1])/l);for(let e=0;e<h;e++)for(let t=0;t<c;t++){const n=new u.U(s.level,s.row-e,s.col+t);i.updateTileInfo(n),this._tileIsMasked(n)||this._candidateTiles.push(n)}}_tileIsMasked(e){return this.maskExtents?.some(t=>(0,c.gR)(t,e.extent))??!1}}function m(e){return null!=e?.tileInfo}function g(e,t){const i=e.lods;if(m(t)){const{effectiveMinLOD:e,effectiveMaxLOD:n}=t;return i.filter(t=>t.level>=e&&t.level<=n)}return i}function y(e,t){const i={},n=[];for(const r of e){const e=r.id;e&&!i[e]?(i[e]=r,n.push(r)):t?.(r)}const r=n.sort((e,t)=>e.level-t.level);return r.filter((e,i)=>{for(let n=0;n<i;n++){const i=r[n].extent;if(i&&(0,c.gR)(i,e.extent))return t?.(e),!1}return!0})}class v{constructor(e,t){this.data=e,this.safeWidth=.99999999*(e.width-1),this.dx=(e.width-1)/(t[2]-t[0]),this.dy=(e.width-1)/(t[3]-t[1]),this.x0=t[0],this.y1=t[3]}}class w{constructor(e,t=null){if(this.key=e,null!=t){const i=e.extent;this._samplerData=new v(t,i)}}get zmin(){return null!=this._samplerData?this._samplerData.data.minValue:0}get zmax(){return null!=this._samplerData?this._samplerData.data.maxValue:0}get hasNoDataValues(){return!!this._samplerData?.data.hasNoDataValues}sample(e,t){if(null==this._samplerData)return;const{safeWidth:i,data:n,dx:r,dy:s,y1:o,x0:a}=this._samplerData,{width:l,values:c,noDataValue:h}=n,u=x(s*(o-t),0,i),p=x(r*(e-a),0,i),f=Math.floor(u),d=Math.floor(p),m=f*l+d,g=m+l,y=c[m],v=c[g],w=c[m+1],_=c[g+1];if(y!==h&&v!==h&&w!==h&&_!==h){const e=p-d,t=y+(w-y)*e;return t+(v+(_-v)*e-t)*(u-f)}}}function x(e,t,i){return e<t?t:e>i?i:e}var _=i(87378),C=i(48526),M=i(86738),b=i(82799);class A{constructor(e){this.geometry=e,this.spatialReference=e.spatialReference}export(){return this._exporter(this.coordinates,this.spatialReference)}clone(e){const t=new A(this.geometry);return t.spatialReference=this.spatialReference,t.coordinates=e??this.coordinates.map(e=>e.clone()),t._exporter=this._exporter,t}async project(e,t){if(this.spatialReference.equals(e))return this.clone();await(0,l.initializeProjection)([{source:this.spatialReference,dest:e}],{signal:t});const i=new C.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),n=(0,l.project)(i,e);if(!n)return null;const r=this.coordinates.map((e,t)=>{const i=e.clone(),r=n.points[t];return i.x=r[0],i.y=r[1],i}),s=this.clone(r);return s.spatialReference=e,s}projectSync(e){if(this.spatialReference.equals(e))return this.clone();const t=new C.A({spatialReference:this.spatialReference,points:this.coordinates.map(e=>[e.x,e.y])}),i=(0,l.project)(t,e);if(!i)return null;const n=this.coordinates.map((e,t)=>{const n=e.clone(),r=i.points[t];return n.x=r[0],n.y=r[1],n}),r=this.clone(n);return r.spatialReference=e,r}static fromGeometry(e){const t=new A(e);if(e instanceof A)return t.coordinates=e.coordinates.map(e=>e.clone()),t._exporter=(t,i)=>{const n=e.clone(t);return n.spatialReference=i,n},t;switch(e.type){case"point":{const i=e,{hasZ:n,hasM:r}=i;return t.coordinates=n&&r?[new T(i.x,i.y,i.z,i.m)]:n?[new T(i.x,i.y,i.z)]:r?[new T(i.x,i.y,null,i.m)]:[new T(i.x,i.y)],t._exporter=(t,i)=>e.hasM?new M.A(t[0].x,t[0].y,t[0].z,t[0].m,i):new M.A(t[0].x,t[0].y,t[0].z,i),t}case"multipoint":{const i=e,{hasZ:n,hasM:r}=i;return t.coordinates=n&&r?i.points.map(e=>new T(e[0],e[1],e[2],e[3])):n?i.points.map(e=>new T(e[0],e[1],e[2])):r?i.points.map(e=>new T(e[0],e[1],null,e[2])):i.points.map(e=>new T(e[0],e[1])),t._exporter=(t,i)=>e.hasM?new C.A({points:t.map(e=>[e.x,e.y,e.z??0,e.m??0]),hasZ:!0,hasM:!0,spatialReference:i}):new C.A({points:t.map(e=>[e.x,e.y,e.z??0]),spatialReference:i}),t}case"polyline":{const i=e,n=[],r=[],{hasZ:s,hasM:o}=e;let a=0;for(const e of i.paths)if(r.push([a,a+e.length]),a+=e.length,s&&o)for(const t of e)n.push(new T(t[0],t[1],t[2],t[3]));else if(s)for(const t of e)n.push(new T(t[0],t[1],t[2]));else if(o)for(const t of e)n.push(new T(t[0],t[1],null,t[2]));else for(const t of e)n.push(new T(t[0],t[1]));return t.coordinates=n,t._exporter=(t,i)=>{const n=e.hasM?t.map(e=>[e.x,e.y,e.z??0,e.m??0]):t.map(e=>[e.x,e.y,e.z??0]),s=r.map(e=>n.slice(e[0],e[1]));return new b.A({paths:s,hasM:e.hasM,hasZ:!0,spatialReference:i})},t}}}}class T{constructor(e,t,i=null,n=null,r=null,s=null){this.x=e,this.y=t,this.z=i,this.m=n,this.tile=r,this.elevationTile=s}clone(){return new T(this.x,this.y,this.z,this.m)}}var S=i(1555);async function R(e,t,i){if(!e)throw new r.A(V,"Elevation queries require an elevation layer to fetch tiles from");if(!t||!(t instanceof A)&&"point"!==t.type&&"multipoint"!==t.type&&"polyline"!==t.type)throw new r.A("elevation-query:invalid-geometry","Only point, polyline and multipoint geometries can be used to query elevation");const n={...L,...i},o=n.signal;if("integrated-mesh-3dtiles"===e.type){const r=A.fromGeometry(t);if(e.queryElevationCallback&&e.replacesTerrain){const s=12.9*(i?.minDemResolution||0)+.71,a=await e.queryElevationCallback(r,{signal:o,maxGeometricError:s}),l=r.coordinates.map(()=>({demResolution:1,source:e})),c=await a.project(t.spatialReference,o);if(c){if(void 0!==n.noDataValue&&n.noDataValue!==Number.MAX_VALUE)for(const e of c.coordinates)e.z===Number.MAX_VALUE&&(e.z=n.noDataValue);return{geometry:c.export(),noDataValue:n.noDataValue??Number.MAX_VALUE,sampleInfo:l}}}const s=r.coordinates.map(()=>({demResolution:-1,source:e}));return{geometry:r.export(),noDataValue:Number.MAX_VALUE,sampleInfo:s}}const c=new f(e,t.spatialReference,n);return await e.load({signal:o}),await async function(e,t,i){let n;const s=e.layer.tileInfo.spatialReference;if(t instanceof A?n=await t.project(s,i):(await(0,l.initializeProjection)([{source:t.spatialReference,dest:s}],{signal:i}),n=(0,l.project)(t,s)),!n)throw new r.A("elevation-query:spatial-reference-mismatch",`Cannot query elevation in '${t.spatialReference.wkid}' on an elevation service in '${s.wkid}'`);e.geometry=A.fromGeometry(n)}(c,t,o),await E(c,o),await j(c,o),function(e){e.geometry.coordinates.forEach(t=>{const i=t.elevationTile;let n=e.parameters.noDataValue;if(i){const e=i.sample(t.x,t.y);null==e?t.elevationTile=null:n=e}t.z=n})}(c),async function(e,t){const i=await e.geometry.project(e.outSpatialReference,t);(0,s.Lw)(i);const n={geometry:i.export(),noDataValue:e.parameters.noDataValue};return e.parameters.returnSampleInfo&&(n.sampleInfo=function(e){const t=e.layer.tileInfo,i=(0,a.GA)(t.spatialReference);return e.geometry.coordinates.map(n=>{let r=-1;return n.elevationTile&&n.elevationTile!==e.outsideExtentTile&&(r=t.lodAt(n.elevationTile.key.level).resolution*i),{demResolution:r,source:-1===r?void 0:e.layer}})}(e)),e.geometry.coordinates.forEach(e=>{e.tile=null,e.elevationTile=null}),n}(c,o)}async function z(e,t,i){if(e=Array.isArray(e)?e:[e],0===(e=i?.ignoreInvisibleLayers?e.filter(e=>e.visible):e.slice()).length)throw new r.A(V,"Elevation queries require at least one elevation layer to fetch tiles from");if(!t||"extent"!==t.type)throw new r.A("elevation-query:invalid-extent","Invalid or undefined extent");const n={...L,...i,returnSampleInfo:!0},s=O(e[e.length-1],t,n);return 1===e.length?s:P(e,t,await s,n)}async function O(e,t,i,n){const r=i.signal;await e.load({signal:r});const s=t.spatialReference,o=e.tileInfo.spatialReference;s.equals(o)||(await(0,l.initializeProjection)([{source:s,dest:o}],{signal:r}),t=(0,l.project)(t,o));const a=new d(e,t,i,n);await E(a,r),await j(a,r);const c=a.elevationTiles,h=a.layer.tileInfo,u=a.parameters.noDataValue;return new S.C({noDataValue:u,tiles:c,tileInfo:h})}async function P(e,t,i,n){if(e.pop(),!e.length)return i;const r=i.samplers.filter(e=>!e.tile.hasNoDataValues).map(e=>(0,c.VY)(e.extent)),s=await O(e[e.length-1],t,n,r);if(0===s.samplers.length)return i;const o=i.samplers.concat(s.samplers),a=n.noDataValue;return P(e,t,new S.C({samplers:o,noDataValue:a}),n)}async function E(e,t){"geometry"===e.type&&function(e){if(null==e.layer.fullExtent)return;const t=new w(new u.U(-1,-1,-1));t.sample=()=>e.parameters.noDataValue,e.outsideExtentTile=t;const i=e.layer.fullExtent;e.geometry.coordinates.forEach(e=>{const n=e.x,r=e.y;(n<i.xmin||n>i.xmax||r<i.ymin||r>i.ymax)&&(e.elevationTile=t)})}(e);const i=e.parameters.demResolution;if("number"==typeof i)!function(e,t){const i=function(e,t){const{tileInfo:i,tilemapCache:n}=e.layer,r=t/(0,a.GA)(i.spatialReference),s=g(i,n);let o=s[0],l=0;for(let e=1;e<s.length;e++){const t=s[e];Math.abs(t.resolution-r)<Math.abs(o.resolution-r)&&(o=t,l=e)}return l}(e,t);e.selectTilesAtLOD(i)}(e,i);else if("finest-contiguous"===i)await async function(e,t){const{tileInfo:i,tilemapCache:n}=e.layer,r=D(i,n,e.parameters.minDemResolution);await Z(e,r,t)}(e,t);else{if("auto"!==i)throw new r.A("elevation-query:invalid-dem-resolution",`Invalid dem resolution value '${i}', expected a number, "finest-contiguous" or "auto"`);await async function(e,t){(function(e){const{tileInfo:t,tilemapCache:i}=e.layer,n=D(t,i,e.parameters.minDemResolution);e.selectTilesAtLOD(n,e.parameters.maximumAutoTileRequests)})(e),function(e){const t=e.layer.tileInfo;let i=0;const n={},r=e=>{null!=e.id&&(e.id in n?n[e.id]++:(n[e.id]=1,i++))},s=e=>{if(null==e.id)return;const t=n[e.id];1===t?(delete n[e.id],i--):n[e.id]=t-1};e.forEachTileToFetch(r,s);let o=!0;for(;o&&(o=!1,e.forEachTileToFetch(n=>{i<=e.parameters.maximumAutoTileRequests||(s(n),t.upsampleTile(n)&&(o=!0),r(n))},s),o););}(e);const i=e.layer.tilemapCache;if(!i||m(i))return I(e,t);const r=e.getTilesToFetch(),s={},a=r.map(async e=>{const r=new u.U(0,0,0),a=await(0,n.Ke)(i.fetchAvailabilityUpsample(e.level,e.row,e.col,r,{signal:t}));!1!==a.ok?null!=e.id&&(s[e.id]=r):(0,o.QP)(a.error)});await(0,o.qr)(Promise.all(a),t),e.remapTiles(s)}(e,t)}}async function Z(e,t,i){const n=e.layer;if(e.selectTilesAtLOD(t),t<0)return;const s=n.tilemapCache,a=e.getTilesToFetch();try{if(s&&!m(s))await(0,o.qr)(Promise.all(a.map(e=>s.fetchAvailability(e.level,e.row,e.col,{signal:i}))),i);else if(await j(e,i),!e.allElevationTilesFetched())throw e.clearElevationTiles(),new r.A("elevation-query:has-unavailable-tiles","Some elevation tiles are unavailable")}catch(n){(0,o.QP)(n),await Z(e,t-1,i)}}async function I(e,t){const i=e.layer.tileInfo;await j(e,t);let n=!1;e.forEachTileToFetch((e,t)=>{i.upsampleTile(e)?n=!0:t()}),n&&await I(e,t)}function D(e,t,i=0){const n=g(e,t);let r=n.length-1;if(i>0){const t=i/(0,a.GA)(e.spatialReference),s=n.findIndex(e=>e.resolution<t);0===s?r=0:s>0&&(r=s-1)}return r}const L={maximumAutoTileRequests:20,noDataValue:0,returnSampleInfo:!1,demResolution:"auto",minDemResolution:0,signal:null};async function j(e,t){const i=e.getTilesToFetch(),n={},r=e.parameters.cache,s=e.parameters.noDataValue,a={noDataValue:s,signal:t},l=i.map(async t=>{if(null==t.id)return;const i=`${e.layer.uid}:${t.id}:${s}`,o=r?.get(i),l=o??_.A.from(await e.layer.fetchTile(t.level,t.row,t.col,a));r?.put(i,l),n[t.id]=new w(t,l)});await(0,o.qr)(Promise.allSettled(l),t),e.populateElevationTiles(n)}const V="elevation-query:invalid-layer"},87378(e,t,i){i.d(t,{A:()=>a});var n,r=i(34275),s=i(56507);const o=Symbol("ElevationTileDataClass");class a{static{n=o}constructor({values:e,width:t,height:i,noDataValue:s}){this[n]=!0,this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,this.values=(0,r.vZ)(e)?e:new Float32Array(e),this.width=t,this.height=i,this.noDataValue=s}get hasNoDataValues(){if(null==this._hasNoDataValues){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get usedMemory(){return this.values.byteLength+256}_ensureBounds(){if(null!=this._minValue)return;const{noDataValue:e,values:t}=this;let i=1/0,n=-1/0,r=!0;for(const s of t)s===e?this._hasNoDataValues=!0:(i=s<i?s:i,n=s>n?s:n,r=!1);r?(this._minValue=0,this._maxValue=0):(this._minValue=i,this._maxValue=n>-3e38?n:0)}static{this.from=(0,s.qf)(a)}}},91806(e,t,i){i.d(t,{A:()=>l});var n,r=i(5482),s=i(25482),o=i(91429),a=i(56507);let l=class extends s.o{static{n=this}constructor(e){super(e),this.cols=null,this.level=0,this.levelValue=null,this.origin=null,this.resolution=0,this.rows=null,this.scale=0}clone(){return new n({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"cols",void 0),(0,r.Cg)([(0,o.MZ)({type:a.jz,json:{write:!0}})],l.prototype,"level",void 0),(0,r.Cg)([(0,o.MZ)({type:String,json:{write:!0}})],l.prototype,"levelValue",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"origin",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"resolution",void 0),(0,r.Cg)([(0,o.MZ)({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],l.prototype,"rows",void 0),(0,r.Cg)([(0,o.MZ)({type:Number,json:{write:!0}})],l.prototype,"scale",void 0),l=n=(0,r.Cg)([(0,o.$K)("esri.layers.support.LOD")],l)},1555(e,t,i){i.d(t,{C:()=>d});var n=i(5482),r=i(53966),s=i(86211),o=i(91429),a=i(16930),l=i(19419),c=i(65529),h=i(86738),u=i(28735);let p=class extends c.nJ{queryElevation(e){const t=this.projectIfRequired(e,this.spatialReference);if(!t)return null;switch(e.type){case"point":return function(e,t,i){return e.hasZ=!0,e.z=i.elevationAt(t.x,t.y),e}(e,t,this);case"polyline":return function(e,t,i){f.spatialReference=t.spatialReference;const n=e.hasM&&!e.hasZ;for(let r=0;r<e.paths.length;r++){const s=e.paths[r],o=t.paths[r];for(let e=0;e<s.length;e++){const t=s[e],r=o[e];f.x=r[0],f.y=r[1],n&&(t[3]=t[2]),t[2]=i.elevationAt(f.x,f.y)}}return e.hasZ=!0,e}(e,t,this);case"multipoint":return function(e,t,i){f.spatialReference=t.spatialReference;const n=e.hasM&&!e.hasZ;for(let r=0;r<e.points.length;r++){const s=e.points[r],o=t.points[r];f.x=o[0],f.y=o[1],n&&(s[3]=s[2]),s[2]=i.elevationAt(f.x,f.y)}return e.hasZ=!0,e}(e,t,this);default:return null}}projectIfRequired(e,t){if(null==e)return null;const i=e.spatialReference;if(i.equals(t))return e;const n=(0,u.Cv)(e,t);return n||r.A.getLogger(this).error(`Cannot project geometry spatial reference (wkid:${i.wkid}) to elevation sampler spatial reference (wkid:${t.wkid})`),n}};p=(0,n.Cg)([(0,o.$K)("esri.layers.support.ElevationSampler")],p);const f=new h.A;let d=class extends p{get spatialReference(){return this.extent.spatialReference}constructor(e){const t=e.noDataValue,i="tiles"in e?e.tiles.map(i=>new m({tile:i,tileInfo:e.tileInfo,noDataValue:t})):e.samplers;super({noDataValue:t,samplers:i});const n=i[0];if(n){this.extent=n.extent.clone();const{min:e,max:t}=n.demResolution;this.demResolution={min:e,max:t};for(let e=1;e<i.length;e++){const t=i[e];this.extent.union(t.extent),this.demResolution.min=Math.min(this.demResolution.min,t.demResolution.min),this.demResolution.max=Math.max(this.demResolution.max,t.demResolution.max)}}else{const t="tileInfo"in e?e.tileInfo:null;this.extent=(0,l.w1)((0,l.vt)(),t?.spatialReference??a.A.WGS84),this.demResolution={min:0,max:0}}}elevationAt(e,t){let i;for(const n of this.samplers)if(n.containsAt(e,t)&&(i=n.elevationAt(e,t),i!==n.noDataValue))return i;return null!=i?i:(r.A.getLogger(this).warn("#elevationAt()",`Point used to sample elevation (${e}, ${t}) is outside of the sampler`),this.noDataValue)}};(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],d.prototype,"noDataValue",void 0),(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],d.prototype,"samplers",void 0),d=(0,n.Cg)([(0,o.$K)("esri.layers.support.TileElevationSampler")],d);let m=class extends p{get spatialReference(){return this.extent.spatialReference}constructor(e){super(e);const t=e.tile.key.extent;this.extent=(0,l.w1)(t,e.tileInfo.spatialReference),this.extent.zmin=e.tile.zmin,this.extent.zmax=e.tile.zmax;const i=(0,s.GA)(e.tileInfo.spatialReference),n=e.tileInfo.lodAt(e.tile.key.level).resolution*i;this.demResolution={min:n,max:n}}contains(e){const t=this.projectIfRequired(e,this.spatialReference);return null!=t&&this.containsAt(t.x,t.y)}containsAt(e,t){return(0,l.Rj)(this.tile.key.extent,e,t)}elevationAt(e,t){return this.containsAt(e,t)?this.tile.sample(e,t)??this.noDataValue:this.noDataValue}};(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"tile",void 0),(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"noDataValue",void 0),(0,n.Cg)([(0,o.MZ)({constructOnly:!0})],m.prototype,"tileInfo",void 0),m=(0,n.Cg)([(0,o.$K)("esri.layers.support.TileElevationSampler.SingleTileElevationSampler")],m)},87045(e,t,i){i.d(t,{A:()=>w});var n,r=i(5482),s=i(66552),o=i(25482),a=i(86211),l=i(91429),c=i(56507),h=i(86738),u=i(16930),p=i(21325),f=i(28735),d=i(91806),m=i(72802),g=i(36005),y=i(43937);const v=new s.J({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});let w=class extends o.o{static{n=this}static create(e={}){const{resolutionFactor:t=1,scales:i,size:r=256,spatialReference:s=u.A.WebMercator,numLODs:o=24}=e;if(!(0,p.fn)(s)){const e=[];if(i)for(let t=0;t<i.length;t++){const n=i[t];e.push(new d.A({level:t,scale:n,resolution:n}))}else{let t=5e-4;for(let i=o-1;i>=0;i--)e.unshift(new d.A({level:i,scale:t,resolution:t})),t*=2}return new n({dpi:96,lods:e,origin:new h.A(0,0,s),size:[r,r],spatialReference:s})}const l=(0,p.Vp)(s),c=e.origin?new h.A({x:e.origin.x,y:e.origin.y,spatialReference:s}):new h.A(l?{x:l.origin[0],y:l.origin[1],spatialReference:s}:{x:0,y:0,spatialReference:s}),f=1/(39.37*(0,a.GA)(s)*96),m=[];if(i)for(let e=0;e<i.length;e++){const t=i[e],n=t*f;m.push(new d.A({level:e,scale:t,resolution:n}))}else{let e=(0,p.EA)(s)?512/r*591657527.5917094:256/r*591657527.591555;const i=Math.ceil(o/t);m.push(new d.A({level:0,scale:e,resolution:e*f}));for(let n=1;n<i;n++){const i=e/2**t,r=i*f;m.push(new d.A({level:n,scale:i,resolution:r})),e=i}}return new n({dpi:96,lods:m,origin:c,size:[r,r],spatialReference:s})}constructor(e){super(e),this.dpi=96,this.format=null,this.origin=null,this.size=null,this.spatialReference=null}get isWrappable(){const{spatialReference:e,origin:t}=this;if(e&&t){const i=(0,p.Vp)(e);return e.isWrappable&&!!i&&Math.abs(i.origin[0]-t.x)<=i.dx}return!1}readOrigin(e,t){return h.A.fromJSON({spatialReference:t.spatialReference,...e})}set lods(e){let t=0,i=0;const n=[],r=this._levelToLOD={};e&&(t=-1/0,i=1/0,e.forEach(e=>{n.push(e.scale),t=e.scale>t?e.scale:t,i=e.scale<i?e.scale:i,r[e.level]=e})),this._set("scales",n),this._set("lods",e),this._initializeUpsampleLevels()}readSize(e,t){return[t.cols,t.rows]}writeSize(e,t){t.cols=e[0],t.rows=e[1]}zoomToScale(e){const t=this.scales;if(e<=0)return t[0];if(e>=t.length-1)return t[t.length-1];const i=Math.floor(e),n=i+1;return t[i]/(t[i]/t[n])**(e-i)}scaleToZoom(e){const t=this.scales,i=t.length-1;let n=0;for(;n<i;n++){const i=t[n],r=t[n+1];if(i<=e)return n;if(r===e)return n+1;if(i>e&&r<e)return n+Math.log(i/e)/Math.log(i/r)}return n}tileAt(e,t,i,n){const r=this.lodAt(e);if(!r)return null;let s,o;if("number"==typeof t)s=t,o=i;else if((0,p.aI)(t.spatialReference,this.spatialReference))s=t.x,o=t.y,n=i;else{const e=(0,f.Cv)(t,this.spatialReference);if(null==e)return null;s=e.x,o=e.y,n=i}const a=r.resolution*this.size[0],l=r.resolution*this.size[1];return n??=new m.U(0,0,0),n.level=e,n.row=Math.floor((this.origin.y-o)/l+.001),n.col=Math.floor((s-this.origin.x)/a+.001),this.updateTileInfo(n),n}updateTileInfo(e,t=0){if(!("extent"in e))return!1;let i=this.lodAt(e.level);if(!i&&1===t){const t=this.lods[this.lods.length-1];t.level<e.level&&(i=t)}if(!i)return!1;const n=e.level-i.level,r=i.resolution*this.size[0]/2**n,s=i.resolution*this.size[1]/2**n;return e.extent[0]=this.origin.x+e.col*r,e.extent[1]=this.origin.y-(e.row+1)*s,e.extent[2]=e.extent[0]+r,e.extent[3]=e.extent[1]+s,!0}upsampleTile(e){const t=this._upsampleLevels[e.level];return!(!t||-1===t.parentLevel||(e.level=t.parentLevel,e.row=Math.floor(e.row/t.factor+.001),e.col=Math.floor(e.col/t.factor+.001),this.updateTileInfo(e),0))}getTileBounds(e,t){const i=this.lodAt(t.level);if(null==i)return null;const{resolution:n}=i,r=n*this.size[0],s=n*this.size[1];return e[0]=this.origin.x+t.col*r,e[1]=this.origin.y-(t.row+1)*s,e[2]=e[0]+r,e[3]=e[1]+s,e}lodAt(e){return this._levelToLOD?.[e]??null}clone(){return n.fromJSON(this.write({}))}getCompatibleForVTL(e){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===e)return null;const t=(512===this.size[0]&&256===e?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===e&&0===t)return this;const i=[],r=this.lods.length-t;for(let e=0;e<r;e++){const n=e+t,{scale:r,resolution:s}=n>=0?this.lods[n]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution};i.push(new d.A({level:e,scale:r,resolution:s}))}return new n({size:[e,e],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:i})}_initializeUpsampleLevels(){const e=this.lods;this._upsampleLevels=[];let t=null;for(let i=0;i<e.length;i++){const n=e[i];this._upsampleLevels[n.level]={parentLevel:t?t.level:-1,factor:t?t.resolution/n.resolution:0},t=n}}};(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],w.prototype,"compressionQuality",void 0),(0,r.Cg)([(0,l.MZ)({type:Number,json:{write:!0}})],w.prototype,"dpi",void 0),(0,r.Cg)([(0,l.MZ)({type:String,json:{read:v.read,write:v.write,origins:{"web-scene":{read:!1,write:!1}}}})],w.prototype,"format",void 0),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"isWrappable",null),(0,r.Cg)([(0,l.MZ)({type:h.A,json:{write:!0}})],w.prototype,"origin",void 0),(0,r.Cg)([(0,g.w)("origin")],w.prototype,"readOrigin",null),(0,r.Cg)([(0,l.MZ)({type:[d.A],value:null,json:{write:!0}})],w.prototype,"lods",null),(0,r.Cg)([(0,l.MZ)({readOnly:!0})],w.prototype,"scales",void 0),(0,r.Cg)([(0,l.MZ)({cast:e=>Array.isArray(e)?e:"number"==typeof e?[e,e]:[256,256]})],w.prototype,"size",void 0),(0,r.Cg)([(0,g.w)("size",["rows","cols"])],w.prototype,"readSize",null),(0,r.Cg)([(0,y.K)("size",{cols:{type:c.jz},rows:{type:c.jz}})],w.prototype,"writeSize",null),(0,r.Cg)([(0,l.MZ)({type:u.A,json:{write:!0}})],w.prototype,"spatialReference",void 0),w=n=(0,r.Cg)([(0,l.$K)("esri.layers.support.TileInfo")],w)},65509(e,t,i){i.d(t,{A:()=>s});var n=i(49186),r=i(17676);class s{constructor(e,t=0,i=e.lods[e.lods.length-1].level){this.tileInfo=e,this.minLOD=t,this.maxLOD=i,e.lodAt(t)||(this.minLOD=e.lods[0].level),e.lodAt(i)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,t,i){const n=this.tileInfo?.lodAt(e);return!n||e<this.minLOD||e>this.maxLOD?"unavailable":n.cols&&n.rows?i>=n.cols[0]&&i<=n.cols[1]&&t>=n.rows[0]&&t<=n.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,t,i,s){await(0,r.NO)(s);const o=this.getAvailability(e,t,i);if("unavailable"===o)throw new n.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i});return o}async fetchAvailabilityUpsample(e,t,i,n,s){await(0,r.NO)(s),n.level=e,n.row=t,n.col=i;const o=this.tileInfo;return o.updateTileInfo(n),this.fetchAvailability(e,t,i,s).catch(e=>{if((0,r.zf)(e))throw e;if(o.upsampleTile(n))return this.fetchAvailabilityUpsample(n.level,n.row,n.col,n,s);throw e})}}},72802(e,t,i){i.d(t,{U:()=>r});var n=i(19419);class r{constructor(e,t,i,r=(0,n.vt)()){this._level=e,this._row=t,this._col=i,this.extent=r}get id(){return this._id??=`${this.level}/${this.row}/${this.col}`,this._id}get level(){return this._level}set level(e){this._level=e,this._id=null}get row(){return this._row}set row(e){this._row=e,this._id=null}get col(){return this._col}set col(e){this._col=e,this._id=null}toJSON(){return{level:this._level,row:this._row,col:this._col,extent:this.extent}}static fromJSON(e){return new r(e.level,e.row,e.col,e.extent)}}},25943(e,t,i){i.d(t,{d:()=>M});var n,r=i(5482),s=i(11254),o=i(69622),a=i(49186),l=i(36563),c=(i(44208),i(66344)),h=i(15142),u=i(17676),p=i(36708),f=i(76030),d=i(84952),m=i(91429),g=i(72802),y=i(4718),v=i(69397),w=i(34275);class x{constructor(e){!function(e){if(!e?.location)throw new a.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new a.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new a.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new a.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new a.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,y.o8)(t));const n=this.location.width,r=this.location.height;let s=!0,o=!0;const l=function(e,t=!1){return e<=w.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(n*r/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(o=!1,l[c]|=1<<t):s=!1,31===t&&++c}o?(this._availability="unavailable",this.byteSize=40):s?(this._availability="available",this.byteSize=40):(this._availability=l,this.byteSize=40+(0,v.Qf)(l))}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),n=i%32,r=i>>5,s=this._availability;return r<0||r>s.length?"unknown":s[r]&1<<n?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||s.A,{row:n,col:r,width:o,height:l}=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:n,left:r,width:o,height:l},valid:!0,data:new Array(o*l).fill(0)};throw e}).then(e=>{if(e.location&&(e.location.top!==n||e.location.left!==r||e.location.width!==o||e.location.height!==l))throw new a.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:n,left:r,width:o,height:l}});return x.fromJSON(e)})}static fromJSON(e){return Object.freeze(new x(e))}}function _(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function C(e,t,i){return new a.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let M=class extends o.A{static{n=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=s.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new c.q(2097152),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 n=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return n?n.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,n){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(C(e,t,i)):this._fetchTilemap(e,t,i,n).catch(e=>e).then(n=>{if(n instanceof x){const r=n.getAvailability(t,i);if("unavailable"===r)throw C(e,t,i);return r}if((0,u.zf)(n))throw n;return"unknown"})}fetchAvailabilityUpsample(e,t,i,n,r){n.level=e,n.row=t,n.col=i;const s=this.layer.tileInfo;s.updateTileInfo(n);const o=this.fetchAvailability(e,t,i,r).catch(e=>{if((0,u.zf)(e))throw e;if(s.upsampleTile(n))return this.fetchAvailabilityUpsample(n.level,n.row,n.col,n,r);throw e});return this._fetchAvailabilityUpsamplePrefetch(e,t,i,r,o),o}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,s){if(!this._prefetchingEnabled)return;const o=`prefetch-${e}-${t}-${i}`;if(this.hasHandles(o))return;const a=new AbortController;s.then(()=>a.abort(),()=>a.abort());let c=!1;const h=(0,l.hA)(()=>{c||(c=!0,a.abort())});if(this.addHandles(h,o),await(0,f.md)(10,a.signal).catch(()=>{}),c||(c=!0,this.removeHandles(o)),(0,u.G4)(a))return;const p=new g.U(e,t,i),d={...r,signal:a.signal},m=this.layer.tileInfo;for(let e=0;n._prefetches.length<n._maxPrefetch&&m.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,d);n._prefetches.push(e);const t=()=>{n._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new h.A({initialSize:n._maxPrefetch})}static cleanupTilemapCache(){this._prefetches.prune()}_fetchTilemap(e,t,i,n){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new a.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,s=this._tilemapFromCache(e,t,i,r);if(s)return Promise.resolve(s);const o=n?.signal;return n={...n,signal:null},new Promise((e,t)=>{(0,u.u7)(o,()=>t((0,u.NK)()));const i=_(r);let s=this._pendingTilemapRequests[i];if(!s){s=x.fromDefinition(r,n).then(e=>(this._tilemapCache.put(i,e,e.byteSize),e));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=s,s.then(e,e)}s.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,d.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,n){n.level=e,n.row=t-t%this.size,n.col=i-i%this.size;const r=_(n);return this._tilemapCache.get(r)}get test(){}};(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],M.prototype,"layer",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],M.prototype,"minLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],M.prototype,"maxLOD",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],M.prototype,"request",void 0),(0,r.Cg)([(0,m.MZ)({constructOnly:!0})],M.prototype,"size",void 0),M=n=(0,r.Cg)([(0,m.$K)("esri.layers.support.TilemapCache")],M)},77548(e,t,i){i.d(t,{Gh:()=>P,tk:()=>T,BR:()=>A,p2:()=>M,qd:()=>S,wI:()=>b,G$:()=>z,$x:()=>R,Ov:()=>w,cM:()=>p,UC:()=>f,W_:()=>x,Qz:()=>d,OP:()=>O,TU:()=>v,F2:()=>m,XX:()=>y,jy:()=>_});var n=i(70333),r=i(11254),s=i(7762),o=(i(84952),i(36563)),a=i(36708),l=i(4146);const c=new WeakMap;function h(e){return!e.destroyed&&(c.has(e)||e.addHandles([(0,a.wB)(()=>{const{parent:t}=e;return!!(t&&t instanceof l.A)&&("catalog-dynamic-group"===t.type||h(t))},t=>c.set(e,t),a.pc),(0,o.hA)(()=>c.delete(e))]),c.get(e))}function u(e,t){return null!=e&&"object"==typeof e&&"type"in e&&e.type===t}function p(e){return u(e,"knowledge-graph")&&"layers"in e}function f(e){return u(e,"knowledge-graph-sublayer")}function d(e){return u(e,"link-chart")&&"layers"in e}function m(e){return u(e,"subtype-group")&&"sublayers"in e}function g(e){const t=e.parent;return function(e){return"group"===e?.type}(t)&&t.tables.includes(e)}i(16215);const y={Point:"SceneLayer","3DObject":"SceneLayer",IntegratedMesh:"IntegratedMeshLayer",PointCloud:"PointCloudLayer",Building:"BuildingSceneLayer"};function v(e){const t=e?.type;return"building-scene"===t||"integrated-mesh"===t||"point-cloud"===t||"scene"===t}function w(e){return"feature"===e?.type&&!e.url&&"memory"===e.source?.type}function x(e){const t=e?.type;return("feature"===t||"subtype-group"===t||"oriented-imagery"===t)&&"feature-layer"===e?.source?.type}function _(e){return function(e){return null!=e&&"object"==typeof e&&"type"in e&&"oriented-imagery"===e.type}(e)||function(e){return u(e,"feature")}(e)&&function(e){return"feature"===e?.type&&"feature-layer"===e.source?.type}(e)}function C(e){const t=e?.type;return"binning"===t||"cluster"===t}function M(e,t){if(!_(e))return;const i=t?.graphic,n=e.featureReduction;if(i){if(i.isAggregate){const e=i.origin;return e&&"featureReductionProvider"in e&&n?C(n)?n:null:void 0}return e}return t?.checkFeatureReduction&&n?C(n)?n:null:e}async function b(e,t){const i=n.id?.findServerInfo(e);if(null!=i?.currentVersion)return i.owningSystemUrl||null;const s=e.toLowerCase().indexOf("/rest/services");if(-1===s)return null;const o=`${e.slice(0,s)}/rest/info`,a=null!=t?t.signal:null,{data:l}=await(0,r.A)(o,{query:{f:"json"},responseType:"json",signal:a});return l?.owningSystemUrl||null}function A(e){return function(e){if(!("capabilities"in e))return!1;switch(e.type){case"catalog":case"catalog-footprint":case"csv":case"feature":case"geojson":case"imagery":case"knowledge-graph-sublayer":case"ogc-feature":case"oriented-imagery":case"scene":case"sublayer":case"subtype-group":case"subtype-sublayer":case"wfs":return!0;default:return!1}}(e)?"effectiveCapabilities"in e?e.effectiveCapabilities:e.capabilities:null}function T(e){return!!function(e){if(!("editingEnabled"in e))return!1;switch(e.type){case"csv":case"feature":case"geojson":case"oriented-imagery":case"scene":case"subtype-group":case"subtype-sublayer":case"knowledge-graph-sublayer":return!0;default:return!1}}(e)&&("effectiveEditingEnabled"in e?e.effectiveEditingEnabled:e.editingEnabled)}function S(e){const t=new s.A;for(const i of e.allLayers.concat(e.allTables))h(i)||g(i)||("charts"in i&&t.push(i),"subtype-group"===i.type&&t.push(...i.sublayers));return t}function R(e,t){return null}function z(e){return null}function O(e){return!e||"Feature Service"===e.type&&!e.sourceUrl}function P(e,t){if(!t||!O(e))return;const i=(e.url,null);i&&(e.url=i)}},38969(e,t,i){i.d(t,{i:()=>r});var n=i(37955);function r(e,t){return new Promise((i,r)=>{e.readyState>=HTMLMediaElement.HAVE_CURRENT_DATA?i():(t((0,n.Oo)(e,"canplay",i)),t((0,n.Oo)(e,"error",r)))})}},73133(e,t,i){i.d(t,{j:()=>n});const n=(0,i(66552).O)()({esriTimeUnitsMilliseconds:"milliseconds",esriTimeUnitsSeconds:"seconds",esriTimeUnitsMinutes:"minutes",esriTimeUnitsHours:"hours",esriTimeUnitsDays:"days",esriTimeUnitsWeeks:"weeks",esriTimeUnitsMonths:"months",esriTimeUnitsYears:"years",esriTimeUnitsDecades:"decades",esriTimeUnitsCenturies:"centuries",esriTimeUnitsUnknown:"unknown"})},7861(e,t,i){i.d(t,{L:()=>r});var n=i(11254);async function r(e,t){return(await(0,n.A)(e,{responseType:"json",query:{f:"json",...t?.customParameters,token:t?.apiKey}})).data}},16215(e,t,i){i.d(t,{S:()=>r,Y:()=>n});const n=Symbol("BasemapInstance");function r(e){return null!=e&&"object"==typeof e&&n in e}},79677(e,t,i){i.d(t,{A:()=>p});var n,r=i(5482),s=i(25482),o=i(88930),a=i(91429),l=i(98623),c=i(10184),h=i(36005),u=i(43937);let p=class extends s.o{static{n=this}static get allTime(){return f}static get empty(){return d}static fromArray(e){return new n({start:null!=e[0]?new Date(e[0]):e[0],end:null!=e[1]?new Date(e[1]):e[1]})}constructor(e){super(e),this.end=null,this.start=null}readEnd(e,t){return null!=t.end?new Date(t.end):null}writeEnd(e,t){t.end=e?.getTime()??null}get isAllTime(){return this.equals(n.allTime)}get isEmpty(){return this.equals(n.empty)}readStart(e,t){return null!=t.start?new Date(t.start):null}writeStart(e,t){t.start=e?.getTime()??null}clone(){return new n({end:this.end,start:this.start})}equals(e){if(!e)return!1;const t=this.start?.getTime()??this.start,i=this.end?.getTime()??this.end,n=e.start?.getTime()??e.start,r=e.end?.getTime()??e.end;return t===n&&i===r}expandTo(e,t=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===e)return this.clone();let i=this.start;i&&(i=(0,o.lL)(i,new c.A({value:1,unit:e}),t));let r=this.end;if(r){const i=(0,o.lL)(r,new c.A({value:1,unit:e}),t);r=r.getTime()===i.getTime()?i:(0,o.S1)(i,1,e,t)}return new n({start:i,end:r})}intersection(e){if(!e)return this.clone();if(this.isEmpty||e.isEmpty)return n.empty;if(this.isAllTime)return e.clone();if(e.isAllTime)return this.clone();const t=this.start?.getTime()??-1/0,i=this.end?.getTime()??1/0,r=e.start?.getTime()??-1/0,s=e.end?.getTime()??1/0;let o,a;return r>=t&&r<=i?o=r:t>=r&&t<=s&&(o=t),i>=r&&i<=s?a=i:s>=t&&s<=i&&(a=s),null==o||null==a||isNaN(o)||isNaN(a)?n.empty:new n({start:o===-1/0?null:new Date(o),end:a===1/0?null:new Date(a)})}offset(e,t,i=l.qU){if(this.isEmpty||this.isAllTime||"unknown"===t)return this.clone();const r=new n,{start:s,end:a}=this;return null!=s&&(r.start=(0,o.S1)(s,e,t,i)),null!=a&&(r.end=(0,o.S1)(a,e,t,i)),r}toArray(){return this.isEmpty?[void 0,void 0]:[this.start?.getTime()??null,this.end?.getTime()??null]}union(e){if(!e||e.isEmpty)return this.clone();if(this.isEmpty)return e.clone();if(this.isAllTime||e.isAllTime)return f.clone();const t=null!=this.start&&null!=e.start?new Date(Math.min(this.start.getTime(),e.start.getTime())):null,i=null!=this.end&&null!=e.end?new Date(Math.max(this.end.getTime(),e.end.getTime())):null;return new n({start:t,end:i})}};(0,r.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"end",void 0),(0,r.Cg)([(0,h.w)("end")],p.prototype,"readEnd",null),(0,r.Cg)([(0,u.K)("end")],p.prototype,"writeEnd",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isAllTime",null),(0,r.Cg)([(0,a.MZ)({readOnly:!0,json:{read:!1}})],p.prototype,"isEmpty",null),(0,r.Cg)([(0,a.MZ)({type:Date,json:{write:{allowNull:!0}}})],p.prototype,"start",void 0),(0,r.Cg)([(0,h.w)("start")],p.prototype,"readStart",null),(0,r.Cg)([(0,u.K)("start")],p.prototype,"writeStart",null),p=n=(0,r.Cg)([(0,a.$K)("esri.time.TimeExtent")],p);const f=new p,d=new p({start:void 0,end:void 0})},10184(e,t,i){i.d(t,{A:()=>h});var n=i(5482),r=i(69540),s=i(25482),o=i(88930),a=i(91429),l=i(73133),c=i(93223);let h=class extends((0,r.OU)(s.o)){constructor(e){super(e),this.unit="milliseconds",this.value=0}toMilliseconds(){return(0,o.t)(this.value,this.unit,"milliseconds")}};(0,n.Cg)([(0,c.e)(l.j,{nonNullable:!0})],h.prototype,"unit",void 0),(0,n.Cg)([(0,a.MZ)({type:Number,json:{write:!0},nonNullable:!0})],h.prototype,"value",void 0),h=(0,n.Cg)([(0,a.$K)("esri.time.TimeInterval")],h)},32728(e,t,i){i.d(t,{YH:()=>a,hG:()=>s,nu:()=>l,wp:()=>o}),i(34727);var n=i(35522),r=i(51850);function s(e){const t=e[0]*e[0]+e[4]*e[4]+e[8]*e[8],i=e[1]*e[1]+e[5]*e[5]+e[9]*e[9],n=e[2]*e[2]+e[6]*e[6]+e[10]*e[10];return Math.sqrt(Math.max(t,i,n))}function o(e,t){const i=Math.sqrt(t[0]*t[0]+t[4]*t[4]+t[8]*t[8]),r=Math.sqrt(t[1]*t[1]+t[5]*t[5]+t[9]*t[9]),s=Math.sqrt(t[2]*t[2]+t[6]*t[6]+t[10]*t[10]);return(0,n.hZ)(e,i,r,s),e}function a(e,t,i){i=i||e;const r=(0,n.Om)(e,t);(0,n.hZ)(i,e[0]-r*t[0],e[1]-r*t[1],e[2]-r*t[2]),(0,n.S8)(i,i)}function l(e,t,i,s=(0,r.vt)()){const o=(0,n.Bw)(e),a=(0,n.Bw)(t),l=(0,n.Om)(e,t)/(o*a);if(l<.9999999999999999){const r=Math.acos(l),u=((1-i)*o+i*a)/Math.sin(r),p=u/o*Math.sin((1-i)*r),f=u/a*Math.sin(i*r);return(0,n.hs)(c,e,p),(0,n.hs)(h,t,f),(0,n.WQ)(s,c,h)}return(0,n.Cc)(s,e,t,i)}(0,r.vt)(),(0,r.vt)(),(0,r.vt)();const c=(0,r.vt)(),h=(0,r.vt)()},68747(e,t,i){i.r(t),i.d(t,{generateCombinationsPanoramicWorker:()=>b,generateCombinationsWorker:()=>M});var n=i(34727),r=i(17676);i(17799),i(69052),i(799),i(86211),i(18047),new Map,i(77690),i(29242),i(51850),i(37585),i(35522);var s=i(49186);i(56507),i(86738),i(39829),i(82799),i(16930),i(34403),i(21325),i(91218),i(65708),i(49590),i(27749),i(39663),i(7817),i(10222),i(4576),i(63490),i(6800),i(87811);var o=i(53966),a=(i(44208),i(27921),i(5443));i(83276),i(19419),i(62369),i(87772),i(23281),i(90091),i(87378),i(22796),i(1555),i(87045),i(72802),i(7861);const l=[1920,1080],c={xmin:-150,ymin:1,xmax:20,ymax:80,spatialReference:{wkid:4326}},h=.001;new a.A({xmin:c.xmin+h,ymin:c.ymin+h,xmax:c.xmax-h,ymax:c.ymax-h,spatialReference:c.spatialReference}),(0,n.KJ)(Math.acos(.05));var u=i(5482),p=i(97768),f=i(61893),d=i(10107),m=i(64108);let g=class extends f.Z{constructor(e){super(e),this.autoLoad=!1,this.customParameters=null,this.datasetFormat=null,this.url=null,this.rotation=null}destroy(){this._cache=(0,p.pR)(this._cache)}get layer(){return this._cache}get size(){if(!this._cache?.loaded||!this._cache.serviceRasterInfo)return;const{serviceRasterInfo:e}=this._cache;return[e.width,e.height]}async load(e){if(this._cache?.loaded)return await this._cache.load(e),{layer:this._cache,size:this.size};const{url:t,customParameters:n}=this;let s=this.datasetFormat;if(!t)throw new Error("URL is required to load NonPanoramicMedia.");const a=await i.e(7835).then(i.bind(i,97835));if((0,r.Te)(e),s||(s=a.guessExtensionFromURI(t)),!s){try{s=await a.getDatasetFormat(t)}catch(e){o.A.getLogger(this).warn("non-panoramic-media:dataset-format",e)}(0,r.Te)(e)}s??="UNKNOWN FORMAT",this.datasetFormat=s;const l=(await Promise.all([i.e(7373),i.e(9235),i.e(3500),i.e(1003),i.e(233),i.e(561)]).then(i.bind(i,90561))).default;(0,r.Te)(e),this._cache=new l({url:t,ioConfig:{skipExtensions:["aux.xml","jgw"],skipMapInfo:!0,datasetFormat:s},customParameters:n??void 0});const c=this._cache.load(e);return this.addResolvingPromise(c),await c,(0,r.Te)(e),{layer:this._cache,size:this.size}}};(0,u.Cg)([(0,d.MZ)()],g.prototype,"_cache",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"autoLoad",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"customParameters",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"datasetFormat",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"url",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"layer",null),(0,u.Cg)([(0,d.MZ)()],g.prototype,"rotation",void 0),(0,u.Cg)([(0,d.MZ)()],g.prototype,"size",null),g=(0,u.Cg)([(0,m.$)("esri.widgets.OrientedImageryViewer.support.NonPanoramicMedia")],g);var y=i(37955),v=i(38969);class w extends s.A{constructor(e,t,i){super(e,t,i),this.name="unknown",this.name=e}}const x=new Set(["JPG","JPEG","TIFF","TIF","MRF"]),_=new Set(["MRF","TIFF","TIF"]);let C=class extends f.Z{constructor(e){super(e),this._size=[0,0],this._cache=null,this.autoLoad=!1,this.cameraHeading=null,this.extension=null,this.imagePyramid=null,this.type="image",this.uiStrings={}}destroy(){this._cache=null}get horizonPitch(){const{matrix:e}=this;return e?(0,n.KJ)(Math.asin(-e[6])):0}get horizonRoll(){const{matrix:e}=this;return e?(0,n.KJ)(Math.atan(e[7]/e[8])):0}get horizonYaw(){const{matrix:e,cameraHeading:t}=this;return e?(0,n.KJ)(Math.atan2(e[3],e[0])):t?-t:0}get size(){return this._size}async load(e){const{guessExtensionFromURI:t}=await i.e(7835).then(i.bind(i,97835));if((0,r.Te)(e),"video"===this.type)return this.loadVideoMesh(e);let n=this.extension;if(n||(n=t(this.url)),!n||!x.has(n))throw new w("unsupported-format",this.uiStrings["unsupported-format"]??"Unsupported image format: {extension}",{datasetFormat:n??"UNKNOWN FORMAT"});return _.has(n)?this.loadOptimizedImageMesh(e):this.loadImageMesh(e)}async loadOptimizedImageMesh(e){const{loadMeshes:t,loadPyramid:n,loadRaster:s}=await Promise.all([i.e(6860),i.e(7005),i.e(6754),i.e(4934),i.e(7634),i.e(8449)]).then(i.bind(i,21060)),o=await s(this.url,e);(0,r.Te)(e),this.imagePyramid=await n(o,{pitch:this.horizonPitch,yaw:this.horizonYaw,roll:this.horizonRoll},e),(0,r.Te)(e);const a=this.imagePyramid.getLowResolutionTiles(),l=await t(a,e);return(0,r.Te)(e),this._size=this.imagePyramid.imageSize,{meshOrMeshes:l,size:this._size,tileKeys:a?.map(e=>e.key)}}async loadVideoMesh(e){const{createImageSphere:t}=await Promise.all([i.e(6860),i.e(7005),i.e(6754),i.e(4934),i.e(7634),i.e(8449)]).then(i.bind(i,21060));if((0,r.Te)(e),this._cache){const i=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,r.Te)(e),{meshOrMeshes:i,size:this._size}}const n=await this._resolveMedia(e);(0,r.Te)(e),this._cache=n.media,this._size=[...l];const s=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,r.Te)(e),{meshOrMeshes:s,size:this._size}}async loadImageMesh(e){const{createImageSphere:t}=await Promise.all([i.e(6860),i.e(7005),i.e(6754),i.e(4934),i.e(7634),i.e(8449)]).then(i.bind(i,21060));if((0,r.Te)(e),this._cache){const i=await t({data:this._cache,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,r.Te)(e),{meshOrMeshes:i,size:this._size}}const n=await this._resolveMedia(e);(0,r.Te)(e),this._cache=n.media;const s=n.mesh;return this._size=[n.media.width,n.media.height],{meshOrMeshes:s,size:this._size}}async _resolveMedia(e){const t=Promise.withResolvers(),n=(0,r.u7)(e?.signal,t.resolve),s="video"===this.type?document.createElement("video"):document.createElement("img");s.crossOrigin="anonymous",s.src=this.url;let o=null;const a="video"===this.type?(0,v.i)(s,this.addHandles):await new Promise((e,t)=>{o=[(0,y.on)(s,"error",e=>{t(e)}),(0,y.on)(s,"load",e)]}).finally(()=>{o?.forEach(e=>e.remove()),o=null}),l=Promise.race([a,t.promise]);this.addResolvingPromise(l);try{await l}finally{n?.remove()}(0,r.Te)(e);const c=s;if(!c)throw new w("unknown","Could not load media",{url:this.url});const{createImageSphere:h}=await Promise.all([i.e(6860),i.e(7005),i.e(6754),i.e(4934),i.e(7634),i.e(8449)]).then(i.bind(i,21060));(0,r.Te)(e);const u=await h({data:s,horizonPitch:this.horizonPitch,horizonRoll:this.horizonRoll,horizonYaw:this.horizonYaw}).load(e);return(0,r.Te)(e),{media:c,mesh:u}}};function M(e){return function(e,t){const{cameraPitch:i,cameraRoll:n,cameraLocation:r}=e,{x:s,y:o,z:a,spatialReference:l}=r;if(t.every(e=>0===e)||!t||!t.length||!l)throw new Error("Invalid parameters");const[c,h,,u,p]=t,f=[-u,0,u],d=[-p,0,p],m=[-c,0,c],g=[-h,0,h],y=[];for(const t of f)for(const r of d)for(const c of m)for(const h of m)for(const u of g){const p={...e};p.cameraPitch=i+t,p.cameraRoll=n+r,p.cameraLocation={x:s+c,y:o+h,z:a?a+u:0,spatialReference:{wkid:l.wkid}},y.push(p)}return y}(e.imageToWorldProps,e.accuracyParameters)}function b(e){return function(e,t){const{cameraHeading:i,cameraLocation:n}=e,{x:r,y:s,z:o,spatialReference:a}=n;if(!t||t.every(e=>0===e)||!t.length||!a)throw new Error("Invalid parameters");const[l,c,h]=t,u=h>0?[-h,0,h]:[],p=l>0?[-l,0,l]:[],f=c>0?[-c,0,c]:[],d=[];for(const t of u)for(const n of p)for(const l of p)for(const c of f){const h={...e};h.cameraHeading=i+t,h.cameraLocation={x:r+n,y:s+l,z:o?o+c:0,spatialReference:{wkid:a.wkid}},d.push(h)}return d}(e.imageToWorldProps,e.accuracyParameters)}(0,u.Cg)([(0,d.MZ)()],C.prototype,"_size",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"autoLoad",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"cameraHeading",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"extension",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"horizonPitch",null),(0,u.Cg)([(0,d.MZ)()],C.prototype,"horizonRoll",null),(0,u.Cg)([(0,d.MZ)()],C.prototype,"horizonYaw",null),(0,u.Cg)([(0,d.MZ)()],C.prototype,"id",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"imagePyramid",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"matrix",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"size",null),(0,u.Cg)([(0,d.MZ)()],C.prototype,"type",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"uiStrings",void 0),(0,u.Cg)([(0,d.MZ)()],C.prototype,"url",void 0),C=(0,u.Cg)([(0,m.$)("esri.widgets.PanoramicViewer.support.PanoramicMedia")],C),i(9093),i(91829),i(58083),i(79258),i(73354),i(28208),i(28735)},28208(e,t,i){i.d(t,{NU:()=>a,ZH:()=>s,vK:()=>o});var n=i(86738),r=i(16930);const s=new n.A({x:0,y:0,z:0,spatialReference:r.A.WebMercator}),o=1e3,a=.3515625}}]);
|