@arcgis/core 4.34.0-next.6 → 4.34.0-next.7
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/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/412eef58cb0d24826375.js +1 -0
- package/assets/esri/core/workers/chunks/{54ea93f416ab52b413c1.js → 44db659fd4e711f8e22f.js} +1 -1
- package/assets/esri/core/workers/chunks/{09f76ca9b47b465c934f.js → 74182421ba425720dc7f.js} +1 -1
- package/assets/esri/core/workers/chunks/{a036503087baa1f9fd00.js → 82ff4229c51011b243f2.js} +1 -1
- package/assets/esri/core/workers/chunks/a4c108e913d2dc0edc7b.js +1 -0
- package/assets/esri/core/workers/chunks/{f00f8609bf0d14b488b8.js → c77cfd8790877393353a.js} +1 -1
- package/config.js +1 -1
- package/interfaces.d.ts +223 -390
- package/kernel.js +1 -1
- package/layers/ImageryLayer.js +1 -1
- package/layers/ImageryTileLayer.js +1 -1
- package/package.json +1 -1
- package/renderers/support/colorRampUtils.js +1 -1
- package/support/revision.js +1 -1
- package/symbols/support/ElevationInfo.d.ts +4 -0
- package/symbols/support/ElevationInfo.js +1 -1
- package/symbols/support/FeatureExpressionInfo.d.ts +4 -0
- package/symbols/support/FeatureExpressionInfo.js +1 -1
- package/assets/esri/core/workers/chunks/306e262f148b3057b11b.js +0 -1
- package/assets/esri/core/workers/chunks/51c31e6d014005107d42.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[5943],{18768:(e,t,i)=>{i.d(t,{b:()=>l});var s=i(90237),r=i(53966),n=i(10107),a=(i(44208),i(87811),i(40608)),o=i(60694);const l=e=>{let t=class extends e{get title(){if(this._get("title")&&"defaults"!==this.originOf("title"))return this._get("title");if(this.url){const e=(0,o.qg)(this.url);if(e?.title)return e.title}return this._get("title")||""}set title(e){this._set("title",e)}set url(e){this._set("url",(0,o.Jf)(e,r.A.getLogger(this)))}};return(0,s._)([(0,n.MZ)()],t.prototype,"title",null),(0,s._)([(0,n.MZ)({type:String})],t.prototype,"url",null),t=(0,s._)([(0,a.$)("esri.layers.mixins.ArcGISService")],t),t}},21312:(e,t,i)=>{i.d(t,{A:()=>m});var s,r=i(90237),n=i(10107),a=(i(44208),i(53966),i(87811),i(93223)),o=i(36005),l=i(40608),c=i(43937),u=i(5443),f=i(86738),h=i(82434);function p(e,t,i){const{x:s,y:r}=t;if(i<2)return{x:e[0]+s*e[2]+r*e[4],y:e[1]+s*e[3]+r*e[5]};if(2===i){const t=s*s,i=r*r,n=s*r;return{x:e[0]+s*e[2]+r*e[4]+t*e[6]+n*e[8]+i*e[10],y:e[1]+s*e[3]+r*e[5]+t*e[7]+n*e[9]+i*e[11]}}const n=s*s,a=r*r,o=s*r,l=n*s,c=n*r,u=s*a,f=r*a;return{x:e[0]+s*e[2]+r*e[4]+n*e[6]+o*e[8]+a*e[10]+l*e[12]+c*e[14]+u*e[16]+f*e[18],y:e[1]+s*e[3]+r*e[5]+n*e[7]+o*e[9]+a*e[11]+l*e[13]+c*e[15]+u*e[17]+f*e[19]}}function d(e,t,i){const{xmin:s,ymin:r,xmax:n,ymax:a,spatialReference:o}=t;let l=[];if(i<2)l.push({x:s,y:a}),l.push({x:n,y:a}),l.push({x:s,y:r}),l.push({x:n,y:r});else{let e=10;for(let t=0;t<e;t++)l.push({x:s,y:r+(a-r)*t/(e-1)}),l.push({x:n,y:r+(a-r)*t/(e-1)});e=8;for(let t=1;t<=e;t++)l.push({x:s+(n-s)*t/e,y:r}),l.push({x:s+(n-s)*t/e,y:a})}l=l.map((t=>p(e,t,i)));const c=l.map((e=>e.x)),f=l.map((e=>e.y));return new u.A({xmin:Math.min.apply(null,c),xmax:Math.max.apply(null,c),ymin:Math.min.apply(null,f),ymax:Math.max.apply(null,f),spatialReference:o})}let m=s=class extends h.A{constructor(){super(...arguments),this.polynomialOrder=1,this.type="polynomial"}readForwardCoefficients(e,t){const{coeffX:i,coeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeForwardCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.coeffX=s,t.coeffY=r}get inverseCoefficients(){let e=this._get("inverseCoefficients");const t=this._get("forwardCoefficients");return!e&&t&&this.polynomialOrder<2&&(e=function(e){const[t,i,s,r,n,a]=e,o=s*a-n*r,l=n*r-s*a;return[(n*i-t*a)/o,(s*i-t*r)/l,a/o,r/l,-n/o,-s/l]}(t)),e}set inverseCoefficients(e){this._set("inverseCoefficients",e)}readInverseCoefficients(e,t){const{inverseCoeffX:i,inverseCoeffY:s}=t;if(!i?.length||!s?.length||i.length!==s.length)return null;const r=[];for(let e=0;e<i.length;e++)r.push(i[e]),r.push(s[e]);return r}writeInverseCoefficients(e,t,i){const s=[],r=[];for(let t=0;t<e?.length;t++)t%2==0?s.push(e[t]):r.push(e[t]);t.inverseCoeffX=s,t.inverseCoeffY=r}get affectsPixelSize(){return this.polynomialOrder>0}forwardTransform(e){if("point"===e.type){const t=p(this.forwardCoefficients,e,this.polynomialOrder);return new f.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.forwardCoefficients,e,this.polynomialOrder)}inverseTransform(e){if("point"===e.type){const t=p(this.inverseCoefficients,e,this.polynomialOrder);return new f.A({x:t.x,y:t.y,spatialReference:e.spatialReference})}return d(this.inverseCoefficients,e,this.polynomialOrder)}clone(){return new s({polynomialOrder:this.polynomialOrder,forwardCoefficients:this.forwardCoefficients?[...this.forwardCoefficients]:null,inverseCoefficients:this.inverseCoefficients?[...this.inverseCoefficients]:null})}};(0,r._)([(0,n.MZ)({json:{write:!0}})],m.prototype,"polynomialOrder",void 0),(0,r._)([(0,n.MZ)()],m.prototype,"forwardCoefficients",void 0),(0,r._)([(0,o.w)("forwardCoefficients",["coeffX","coeffY"])],m.prototype,"readForwardCoefficients",null),(0,r._)([(0,c.K)("forwardCoefficients")],m.prototype,"writeForwardCoefficients",null),(0,r._)([(0,n.MZ)({json:{write:!0}})],m.prototype,"inverseCoefficients",null),(0,r._)([(0,o.w)("inverseCoefficients",["inverseCoeffX","inverseCoeffY"])],m.prototype,"readInverseCoefficients",null),(0,r._)([(0,c.K)("inverseCoefficients")],m.prototype,"writeInverseCoefficients",null),(0,r._)([(0,n.MZ)()],m.prototype,"affectsPixelSize",null),(0,r._)([(0,a.e)({PolynomialXform:"polynomial"})],m.prototype,"type",void 0),m=s=(0,r._)([(0,l.$)("esri.layers.support.rasterTransforms.PolynomialTransform")],m)},24212:(e,t,i)=>{function s(e,t){return function(e,t){return t?.mode?t.mode:function(e){return e?l:c}(e).mode}(null==e||(e.hasZ??!1),t)}function r(e,t,i){return i&&i.mode!==t?`${e} only support ${t} elevation mode`:null}function n(e,t,i){return i?.mode===t?`${e} do not support ${t} elevation mode`:null}function a(e,t){return null!=t?.featureExpressionInfo&&"0"!==t.featureExpressionInfo.expression?`${e} do not support featureExpressionInfo`:null}function o(e,t){t&&e.warn(".elevationInfo=",t)}i.d(t,{$7:()=>n,B:()=>r,XF:()=>o,tW:()=>a,w7:()=>s}),i(83047),i(16271);const l={mode:"absolute-height",offset:0},c={mode:"on-the-ground",offset:null}},25943:(e,t,i)=>{i.d(t,{d:()=>A});var s,r=i(90237),n=i(78888),a=i(69622),o=i(71903),l=i(49186),c=i(36563),u=(i(44208),i(66344)),f=i(3694),h=i(74887),p=i(36708),d=i(11932),m=i(84952),y=i(10107),g=(i(53966),i(87811),i(40608)),w=i(72802),v=i(4718),x=i(69397),b=i(34275);class I{constructor(e){!function(e){if(!e?.location)throw new l.A("tilemap:missing-location","Location missing from tilemap response");if(!1===e.valid)throw new l.A("tilemap:invalid","Tilemap response was marked as invalid");if(!e.data)throw new l.A("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(e.data))throw new l.A("tilemap:data-mismatch","Data must be an array of numbers");if(e.data.length!==e.location.width*e.location.height)throw new l.A("tilemap:data-mismatch","Number of data items does not match width/height of tilemap")}(e);const{location:t,data:i}=e;this.location=Object.freeze((0,v.o8)(t));const s=this.location.width,r=this.location.height;let n=!0,a=!0;const o=function(e,t=!1){return e<=b.y9?t?new Array(e).fill(0):new Array(e):new Uint32Array(e)}(Math.ceil(s*r/32));let c=0;for(let e=0;e<i.length;e++){const t=e%32;i[e]?(a=!1,o[c]|=1<<t):n=!1,31===t&&++c}a?(this._availability="unavailable",this.byteSize=40):n?(this._availability="available",this.byteSize=40):(this._availability=o,this.byteSize=40+(0,x.Qf)(o))}getAvailability(e,t){if("unavailable"===this._availability||"available"===this._availability)return this._availability;const i=(e-this.location.top)*this.location.width+(t-this.location.left),s=i%32,r=i>>5,n=this._availability;return r<0||r>n.length?"unknown":n[r]&1<<s?"available":"unavailable"}static fromDefinition(e,t){const i=e.service.request||n.A,{row:s,col:r,width:a,height:o}=e,c={query:{f:"json"}};return t=t?{...c,...t}:c,i(function(e){let t;if(e.service.tileServers?.length){const i=e.service.tileServers;t=`${i&&i.length?i[e.row%i.length]:e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}else t=`${e.service.url}/tilemap/${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`;const i=e.service.query;return i&&(t=`${t}?${i}`),t}(e),t).then((e=>e.data)).catch((e=>{if(422===e?.details?.httpStatus)return{location:{top:s,left:r,width:a,height:o},valid:!0,data:new Array(a*o).fill(0)};throw e})).then((e=>{if(e.location&&(e.location.top!==s||e.location.left!==r||e.location.width!==a||e.location.height!==o))throw new l.A("tilemap:location-mismatch","Tilemap response for different location than requested",{response:e,definition:{top:s,left:r,width:a,height:o}});return I.fromJSON(e)}))}static fromJSON(e){return Object.freeze(new I(e))}}function _(e){return`${e.level}/${e.row}/${e.col}/${e.width}/${e.height}`}function S(e,t,i){return new l.A("tile-map:tile-unavailable","Tile is not available",{level:e,row:t,col:i})}let A=class extends a.A{static{s=this}constructor(e){super(e),this._pendingTilemapRequests={},this.request=n.A,this.size=32,this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new u.q(2*o.u.MEGABYTES),this.addHandles((0,p.wB)((()=>{const{layer:e}=this;return[e?.parsedUrl,e?.tileServers,e?.apiKey,e?.customParameters]}),(()=>this._initializeTilemapDefinition()),p.Vh))}get effectiveMinLOD(){return this.minLOD??this.layer.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.layer.tileInfo.lods[this.layer.tileInfo.lods.length-1].level}getAvailability(e,t,i){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return"unavailable";const s=this._tilemapFromCache(e,t,i,this._tmpTilemapDefinition);return s?s.getAvailability(t,i):"unknown"}fetchAvailability(e,t,i,s){return!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD?Promise.reject(S(e,t,i)):this._fetchTilemap(e,t,i,s).catch((e=>e)).then((s=>{if(s instanceof I){const r=s.getAvailability(t,i);if("unavailable"===r)throw S(e,t,i);return r}if((0,h.zf)(s))throw s;return"unknown"}))}fetchAvailabilityUpsample(e,t,i,s,r){s.level=e,s.row=t,s.col=i;const n=this.layer.tileInfo;n.updateTileInfo(s);const a=this.fetchAvailability(e,t,i,r).catch((e=>{if((0,h.zf)(e))throw e;if(n.upsampleTile(s))return this.fetchAvailabilityUpsample(s.level,s.row,s.col,s,r);throw e}));return this._fetchAvailabilityUpsamplePrefetch(s.id,e,t,i,r,a),a}async _fetchAvailabilityUpsamplePrefetch(e,t,i,r,n,a){if(!this._prefetchingEnabled||null==e)return;const o=`prefetch-${e}`;if(this.hasHandles(o))return;const l=new AbortController;a.then((()=>l.abort()),(()=>l.abort()));let u=!1;const f=(0,c.hA)((()=>{u||(u=!0,l.abort())}));if(this.addHandles(f,o),await(0,d.md)(10,l.signal).catch((()=>{})),u||(u=!0,this.removeHandles(o)),(0,h.G4)(l))return;const p=new w.U(e,t,i,r),m={...n,signal:l.signal},y=this.layer.tileInfo;for(let e=0;s._prefetches.length<s._maxPrefetch&&y.upsampleTile(p);++e){const e=this.fetchAvailability(p.level,p.row,p.col,m);s._prefetches.push(e);const t=()=>{s._prefetches.removeUnordered(e)};e.then(t,t)}}static{this._maxPrefetch=4}static{this._prefetches=new f.A({initialSize:s._maxPrefetch})}_fetchTilemap(e,t,i,s){if(!this.layer.tileInfo.lodAt(e)||e<this.effectiveMinLOD||e>this.effectiveMaxLOD)return Promise.reject(new l.A("tilemap-cache:level-unavailable",`Level ${e} is unavailable in the service`));const r=this._tmpTilemapDefinition,n=this._tilemapFromCache(e,t,i,r);if(n)return Promise.resolve(n);const a=s?.signal;return s={...s,signal:null},new Promise(((e,t)=>{(0,h.u7)(a,(()=>t((0,h.NK)())));const i=_(r);let n=this._pendingTilemapRequests[i];if(!n){n=I.fromDefinition(r,s).then((e=>(this._tilemapCache.put(i,e,e.byteSize),e)));const e=()=>{delete this._pendingTilemapRequests[i]};this._pendingTilemapRequests[i]=n,n.then(e,e)}n.then(e,t)}))}_initializeTilemapDefinition(){if(!this.layer.parsedUrl)return;const{parsedUrl:e,apiKey:t,customParameters:i}=this.layer;this._tilemapCache.clear(),this._tmpTilemapDefinition={service:{url:e.path,query:(0,m.x0)({...e.query,...i,token:t??e.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}_tilemapFromCache(e,t,i,s){s.level=e,s.row=t-t%this.size,s.col=i-i%this.size;const r=_(s);return this._tilemapCache.get(r)}get test(){}};(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"layer",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"minLOD",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"maxLOD",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"request",void 0),(0,r._)([(0,y.MZ)({constructOnly:!0})],A.prototype,"size",void 0),A=s=(0,r._)([(0,g.$)("esri.layers.support.TilemapCache")],A)},35943:(e,t,i)=>{i.r(t),i.d(t,{default:()=>Ge});var s=i(90237),r=i(13874),n=i(69540),a=i(49186),o=i(53966),l=i(92071),c=i(74887),u=i(36708),f=i(10107),h=i(56507),p=i(44208),d=(i(87811),i(40608)),m=i(4146),y=i(18768),g=i(63074),w=i(69208),v=i(89015),x=i(16131),b=i(8303),I=i(63660),_=i(56551),S=i(54310),A=i(25036),T=i(82935),R=i(10873),C=i(20437),M=i(74797),O=i(22796),F=i(76353),P=i(84169),k=i(4916),D=i(68197),N=i(5443),E=i(16930),L=i(73444),B=i(14140),z=i(16019);function J(e){return["x","e","east","long","longitude"].includes(e.toLowerCase())}function $(e){return["y","n","west","lat","latitude"].includes(e.toLowerCase())}function U(e){const{axes:t}=e.domain,i=Object.keys(t),s=[],r=[];let n=-1,a=-1,o=[];for(let e=0;e<i.length;e++){const l=i[e];J(l)?n=e:$(l)&&(a=e);const c=t[l],u=[];if("values"in c){c.values.forEach((e=>u.push("string"==typeof e?new Date(e).getTime():e)));const e=u[1]-u[0];s.push([u[0]-.5*e,u[u.length-1]+.5*e]),r.push(e)}else{const{start:e,stop:t,num:i}=c,n=(t-e)/(i-1);s.push([e-.5*n,t+.5*n]),r.push(n);for(let t=0;t<i;t++)u.push(e+n*t)}o.push({name:l,values:u,extent:[u[0],u[u.length-1]]})}n>-1&&-1===a?a=0===n?1:0:a>-1&&-1===n?n=0===a?1:0:-1===a&&-1===n&&(n=0,a=1),o=o.filter(((e,t)=>!(t===n||t===a)));const{referencing:l}=e.domain,c=l.find((e=>e.coordinates.includes(i[n]))).system.id,u=c?.slice(c.lastIndexOf("/")+1),f=null==u||"CRS84"===u?4326:Number(u),h=new E.A({wkid:f}),[p,d]=s[n],[m,y]=s[a],g=new N.A({xmin:p,xmax:d,ymin:m,ymax:y,spatialReference:h});return{width:Math.round(g.width/r[n]),height:Math.round(g.height/r[a]),extent:g,dimensions:o}}function V(e){const t=(0,L.ZS)()?.language;return t?e[t]??Object.values(e)[0]:Object.values(e)[0]}function j(){return Math.round(255*Math.random())}function Z(e){const t={},{parameters:i}=e;if(!i)return t;for(const[e,s]of Object.entries(i)){const{type:i,description:r,unit:n,categoryEncoding:a,observedProperty:o}=s;if("Parameter"===i&&(t[e]={},r&&(t[e].description=V(r)),n&&(t[e].unit=n.label?V(n.label):null,t[e].symbol=n.symbol?.value),a)){const i=Object.entries(a).map(((e,t)=>({OID:t,Value:Number(e[1]),ClassName:e[0].slice(e[0].lastIndexOf("/")+1),Count:1})));let s=!1;o?.categories?.length&&(o.categories.forEach((e=>{if(!e.id)return;const t=e.id.slice(e.id.lastIndexOf("/")+1),r=i.find((e=>e.ClassName===t));if(!r)return;const n=e.label?V(e.label):null;if(r.Label=n,e.preferredColor){const t=D.A.fromHex(e.preferredColor);t&&(s=!0,r.Red=t.r,r.Green=t.g,r.Blue=t.b)}})),s&&i.forEach((e=>{null==e.Red&&(e.Red=j(),e.Green=j(),e.Blue=j())})));const r={objectIdFieldName:"",fields:[{name:"OID",type:"esriFieldTypeOID",alias:"OID",domain:null},{name:"Value",type:"esriFieldTypeInteger",alias:"Value",domain:null},{name:"Count",type:"esriFieldTypeDouble",alias:"Count",domain:null},{name:"ClassName",type:"esriFieldTypeString",alias:"ClassName",domain:null,length:50},{name:"Label",type:"esriFieldTypeString",alias:"Label",domain:null,length:50}],features:i.map((e=>({attributes:e})))};s&&r.fields.push({name:"Red",type:"esriFieldTypeInteger",alias:"Red",domain:null},{name:"Green",type:"esriFieldTypeInteger",alias:"Green",domain:null},{name:"Blue",type:"esriFieldTypeInteger",alias:"Blue",domain:null}),t[e].attributeTable=r}}return t}function q(e){let t=Number.MAX_VALUE,i=-Number.MAX_VALUE;for(let s=0;s<e.length;s++){const r=e[s];null!=r&&(r<t&&(t=r),r>i&&(i=r))}return(0,z.X1)(t,i)}function G(e,t,i){const s=e.map(((e,i)=>({name:e,count:t[i]}))).sort(((e,t)=>e.name>t.name?-1:1)),r=(n=1,e=>n*=e.count);var n;const a=[...s.slice(1),{name:"",count:1}].reverse().map(r).reverse();let o=0;for(let r=e.length-1;r>=0;r--)o+=a[s.findIndex((({name:t})=>t===e[r]))]*(i%t[r]),i=Math.floor(i/t[r]);return o}var H=i(45617),W=i(87186),X=i(77301),Y=i(28435),K=i(6952);let Q=class extends k.A{constructor(){super(...arguments),this.datasetFormat="MEMORY",this.source=null}get url(){return""}fetchRawTile(e,t,i,s={}){if(!this._pixelBlockTiles){const{rasterInfo:r}=this,[n,a]=r.storageInfo.tileInfo.size,{sliceId:o}=s,{pixelBlocks:l}=this.source,c={pixelBlock:null==o?l[0]:l[o],useBilinear:"thematic"!==r.dataType,tileSize:{width:n,height:a},level:e,row:t,col:i},u=this.rasterJobHandler?this.rasterJobHandler.clipTile(c,s):(0,Y.J$)(c);return Promise.resolve(u)}const r=this._pixelBlockTiles.get(`${e}/${t}/${i}`);return Promise.resolve(r)}async _open(e){const t=this.source,{pixelBlocks:i,attributeTable:s,statistics:r,histograms:n,name:a,nativeExtent:o,transform:l}=t,c=i[0],{width:u,height:f,pixelType:h}=c,p=t.extent??new N.A({xmin:-.5,ymin:.5,xmax:u-.5,ymax:f-.5,spatialReference:new E.A({wkid:3857})}),d=t.isPseudoSpatialReference??!t.extent,m={x:p.width/u,y:p.height/f},y={...t.keyProperties};s&&(y.DataType="Thematic");const g=new W.A({width:u,height:f,pixelType:h,extent:p,nativeExtent:o,attributeTable:s,transform:l,pixelSize:m,spatialReference:p.spatialReference,bandCount:c.pixels.length,keyProperties:y,multidimensionalInfo:t.multidimensionalInfo,statistics:r,isPseudoSpatialReference:d,histograms:n});this.ioConfig.skipMapInfo&&this.updateImageSpaceRasterInfo(g),this.createRemoteDatasetStorageInfo(g,512,512),this._set("rasterInfo",g),this.updateTileInfo(),g.multidimensionalInfo?await this._buildMDimStats(t.pixelBlocks,g.multidimensionalInfo):await this._buildInMemoryRaster(c,{width:512,height:512},e),g.multidimensionalInfo||(this.source=null),this.datasetName=a}async _buildInMemoryRaster(e,t,i){const{rasterInfo:s}=this,r=s.storageInfo.maximumPyramidLevel??0,n="thematic"!==s.dataType,o=this.rasterJobHandler?this.rasterJobHandler.split({pixelBlock:e,tileSize:t,maximumPyramidLevel:r,useBilinear:n},i):Promise.resolve((0,Y.lD)(e,t,r,n)),l=null!=s.statistics,u=null!=s.histograms,f=this.ioConfig.skipStatistics||l?Promise.resolve({statistics:null,histograms:null}):this.rasterJobHandler?this.rasterJobHandler.estimateStatisticsHistograms({pixelBlock:e},i):Promise.resolve((0,K.f4)(e)),h=await(0,c.Lx)([o,f]);if(!h[0].value&&h[1].value)throw new a.A("inmemory-raster:open","failed to build in memory raster");this._pixelBlockTiles=h[0].value,l||(s.statistics=h[1].value?.statistics),u||(s.histograms=h[1].value?.histograms)}async _buildMDimStats(e,t,i){for(let s=0;s<t.variables.length;s++){const r=t.variables[s];if(r.statistics)continue;const n=r.dimensions.map((e=>new H.A({variableName:r.name,dimensionName:e.name,values:[e.values?.[0]??e.extent?.[0]],isSlice:!0}))),a=(0,X.NG)(n,t),o=null==a?null:e[a];if(null==o)continue;const l=this.rasterJobHandler?await this.rasterJobHandler.computeStatisticsHistograms({pixelBlock:o},i):(0,K.eH)(o);r.statistics=l.statistics,r.histograms||(r.histograms=l.histograms)}}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],Q.prototype,"datasetFormat",void 0),(0,s._)([(0,f.MZ)()],Q.prototype,"source",void 0),(0,s._)([(0,f.MZ)()],Q.prototype,"url",null),Q=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.InMemoryRaster")],Q);const ee=Q;var te=i(22671);let ie=class extends k.A{constructor(){super(...arguments),this.datasetFormat="CovJSON"}fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const{extent:t,pixelBlocks:i,multidimensionalInfo:s,attributeTable:r,bandNames:n}=await this._fetchData(e),{statistics:a,histograms:o}=(0,K.eH)(i[0]),l=n?.map((e=>({BandName:e}))),c={DataType:r?"Thematic":s?"Scientific":"Generic",BandProperties:l},u=new ee({source:{extent:t,pixelBlocks:i,attributeTable:r?te.A.fromJSON(r):null,multidimensionalInfo:s,statistics:a,histograms:o,keyProperties:c,isPseudoSpatialReference:!1}});await u.open(),this._inMemoryRaster=u;const f=this.source?"":this.url.slice(this.url.lastIndexOf("/")+1);this._set("datasetName",f.slice(0,f.indexOf("."))),this._set("rasterInfo",u.rasterInfo)}async _fetchData(e){const t=this.source??(await this.request(this.url,{signal:e?.signal})).data,i="imagery-tile-layer:open-coverage-json";if("coverage"!==t.type?.toLowerCase()||"grid"!==t.domain?.domainType?.toLowerCase())throw new a.A(i,"Only coverage with Grid domain type is supported");if(!t.ranges)throw new a.A(i,"Missing ranges in the grid coverage data");if(!t.domain.referencing?.length)throw new a.A(i,"Missing domain referencing in the grid coverage data");const s=Object.values(t.ranges);for(let e=0;e<s.length;e++){const{axisNames:t,shape:r,type:n,values:o}=s[e];if(!("ndarray"===n.toLowerCase()&&o?.length&&t?.length&&r?.length))throw new a.A(i,"Only ranges with valid NdArray, axisNames, shape, and inline values are supported");if(!J(t[t.length-1])||!$(t[t.length-2]))throw new a.A(i,"Only row-major ordered pixel values are supported. X axis must be the last axis.")}return function(e){const{width:t,height:i,extent:s,dimensions:r}=U(e),{ranges:n}=e,a=Object.keys(n).sort(((e,t)=>e<t?-1:1)),o=[];for(let e=0;e<a.length;e++){const t=a[e];r?.length&&o.push({name:t,dimensions:r})}const l=Z(e);o.forEach((e=>l[e.name]&&Object.assign(e,l[e.name])));const c=o.length?{variables:o}:void 0,u=[];for(let e=0;e<a.length;e++){const s=a[e],{values:o,dataType:l,axisNames:c,shape:f}=n[s],h=f.length>2?e*f.slice(0,-2).reduce(((e,t)=>e*t)):0,p=c.slice(0,-2),d=f.slice(0,-2),m="float"===l?"f32":q(o),y=t*i,g=o.length/y;for(let s=0;s<g;s++){const n=B.A.createEmptyBand(m,y),a=new Uint8Array(y).fill(255);let l=!1;const c=s*y;for(let e=0;e<y;e++){const t=o[c+e];null==t?(a[e]=0,l=!0):n[e]=t}if(0===e||r?.length){const e=new B.A({width:t,height:i,mask:l?a:null,pixels:[n],pixelType:m});e.updateStatistics(),r?.length?u[G(p,d,s)+h]=e:u.push(e)}else{const e=u[s];e.pixels.push(n),l?e.mask&&(e.mask=B.A.combineBandMasks([e.mask,a])):e.mask=l?a:null}}}const f=Object.values(l).find((e=>e.attributeTable))?.attributeTable;return{extent:s,pixelBlocks:u,multidimensionalInfo:c,attributeTable:f,bandNames:c?void 0:a}}(t)}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],ie.prototype,"datasetFormat",void 0),(0,s._)([(0,f.MZ)({constructOnly:!0})],ie.prototype,"source",void 0),ie=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.CovJSONRaster")],ie);const se=ie;var re=i(4576),ne=i(21325),ae=i(50103),oe=i(21312);function le(e,t){if(!e||!t)return null;const i=[];for(let s=0;s<e.length;s++)i.push(e[s]),i.push(t[s]);return i}function ce(e){if(!e)return null;let t=Number(e);if(!isNaN(t)&&0!==t)return new E.A({wkid:t});if(e=String(e).trim(),(0,ne.jp)(e))return new E.A({wkt2:e});const i=e.toUpperCase();if(i.startsWith("COMPD_CS")){if(!i.includes("VERTCS")||!i.includes("GEOGCS")&&!i.startsWith("PROJCS"))return null;const s=i.indexOf("VERTCS"),r=i.indexOf("PROJCS"),n=r>-1?r:i.indexOf("GEOGCS");if(-1===n)return null;const a=e.slice(n,e.lastIndexOf("]",s)+1).trim(),o=e.slice(s,e.lastIndexOf("]")).trim();t=ue(a);const l=new E.A(t?{wkid:t}:{wkt:a}),c=ue(o);return c&&(l.vcsWkid=c),l}return i.startsWith("GEOGCS")||i.startsWith("PROJCS")?(t=ue(e),new E.A(0!==t?{wkid:t}:{wkt:e})):null}function ue(e){const t=e.replaceAll("]","[").replaceAll('"',"").split("[").map((e=>e.trim())).filter((e=>""!==e)),i=t[t.length-1].split(","),s=i[0]?.toLowerCase();if(("epsg"===s||"esri"===s)&&e.endsWith('"]]')){const e=Number(i[1]);if(!isNaN(e)&&0!==e)return e}return 0}function fe(e){if("pamdataset"!==e?.documentElement.tagName?.toLowerCase())return{};const t={spatialReference:null,transform:null,metadata:{},rasterBands:[],statistics:null,histograms:null};e.documentElement.childNodes.forEach((e=>{if(1===e.nodeType)if((0,ae.g7)(e,"SRS")){if(!t.spatialReference){const i=(0,ae.mX)(e);t.spatialReference=ce(i)}}else if((0,ae.g7)(e,"Metadata"))if("xml:ESRI"===e.getAttribute("domain")){const{spatialReference:i,transform:s}=function(e){const t=(0,ae.V6)(e,"GeodataXform"),i=ce((0,ae.v7)(t,"SpatialReference/WKID")||(0,ae.mX)(t,"SpatialReference/WKT"));if("typens:PolynomialXform"!==t.getAttribute("xsi:type"))return{spatialReference:i,transform:null};const s=(0,ae.v7)(t,"PolynomialOrder")??1,r=(0,ae.Ui)(t,"CoeffX/Double"),n=(0,ae.Ui)(t,"CoeffY/Double"),a=(0,ae.Ui)(t,"InverseCoeffX/Double"),o=(0,ae.Ui)(t,"InverseCoeffY/Double"),l=le(r,n),c=le(a,o);return{spatialReference:i,transform:l&&c&&l.length&&c.length?new oe.A({spatialReference:i,polynomialOrder:s,forwardCoefficients:l,inverseCoefficients:c}):null}}(e);t.transform=s,t.spatialReference||(t.spatialReference=i)}else(0,ae.IC)(e,"MDI").forEach((e=>t.metadata[e.getAttribute("key")]=(0,ae.mX)(e)));else if((0,ae.g7)(e,"PAMRasterBand")){const i=function(e){const t=(0,ae.v7)(e,"NoDataValue"),i=(0,ae.V6)(e,"Histograms/HistItem"),s=(0,ae.v7)(i,"HistMin"),r=(0,ae.v7)(i,"HistMax"),n=(0,ae.v7)(i,"BucketCount"),a=(0,ae.mX)(i,"HistCounts")?.split("|").map((e=>Number(e)));let o,l,c,u;(0,ae.IC)(e,"Metadata/MDI").forEach((e=>{const t=Number(e.textContent??e.nodeValue);switch(e.getAttribute("key").toUpperCase()){case"STATISTICS_MINIMUM":o=t;break;case"STATISTICS_MAXIMUM":l=t;break;case"STATISTICS_MEAN":c=t;break;case"STATISTICS_STDDEV":u=t}}));const f=(0,ae.v7)(e,"Metadata/SourceBandIndex");return{noDataValue:t,histogram:a?.length&&null!=s&&null!=r?{min:s,max:r,size:n||a.length,counts:a}:null,sourceBandIndex:f,statistics:null!=o&&null!=l?{min:o,max:l,avg:c,stddev:u}:null}}(e);null!=i.sourceBandIndex&&null==t.rasterBands[i.sourceBandIndex]?t.rasterBands[i.sourceBandIndex]=i:t.rasterBands.push(i)}}));const i=t.rasterBands;if(i.length){const e=!!i[0].statistics;t.statistics=e?i.map((e=>e.statistics)).filter(re.Ru):null;const s=!!i[0].histogram;t.histograms=s?i.map((e=>e.histogram)).filter(re.Ru):null}return t}var he=i(51244);let pe=class extends k.A{fetchRawTile(e,t,i,s={}){return this._inMemoryRaster.fetchRawTile(e,t,i,s)}async _open(e){const t=await this._fetchData(e);let{spatialReference:i,statistics:s,histograms:r,transform:n}=await this._fetchAuxiliaryData(e);const a=!i;a&&(i=new E.A({wkid:3857})),r?.length&&null==s&&(s=(0,K.Pg)(r));const{width:o,height:l}=t;let c=new N.A({xmin:-.5,ymin:.5-l,xmax:o-.5,ymax:.5,spatialReference:i});const u=n?n.forwardTransform(c):c;let f=!0;if(n){const e=n.forwardCoefficients;f=e&&0===e[1]&&0===e[2],f&&(n=null,c=u)}const h=new ee({source:{extent:u,nativeExtent:c,transform:n,pixelBlocks:[t],statistics:s,histograms:r,keyProperties:{DateType:"Processed"},isPseudoSpatialReference:a},ioConfig:{sampling:"closest",skipStatistics:!0}});this.ioConfig.skipMapInfo&&(h.ioConfig.skipMapInfo=!0),await h.open(),h.source=null,this._set("rasterInfo",h.rasterInfo),this._inMemoryRaster=h}async _fetchData(e){const{data:t}=await this.request(this.url,{responseType:"array-buffer",signal:e?.signal}),i=(0,he.g)(t).toUpperCase();if("JPG"!==i&&"PNG"!==i&&"GIF"!==i&&"BMP"!==i)throw new a.A("image-aux-raster:open","the data is not a supported format");this._set("datasetFormat",i);const s=i.toLowerCase(),r="gif"===s||"bmp"===s||!(0,p.A)("ios"),n=await this.decodePixelBlock(t,{format:s,useCanvas:r,hasNoZlibMask:!0});if(null==n)throw new a.A("image-aux-raster:open","the data cannot be decoded");return n}async _fetchAuxiliaryData(e){const t=e?.signal,{skipExtensions:i=[],skipMapInfo:s}=this.ioConfig,r=s||i.includes("aux.xml")?null:this.request(this.url+".aux.xml",{responseType:"xml",signal:t}),n=this.datasetFormat,a="JPG"===n?"jgw":"PNG"===n?"pgw":"BMP"===n?"bpw":null,o=a&&i.includes(a)?null:this.request(this.url.slice(0,this.url.lastIndexOf("."))+"."+a,{responseType:"text",signal:t}),l=await(0,c.Lx)([r,o]);if(t?.aborted)throw(0,c.NK)();const u=fe(l[0].value?.data);if(!u.transform){const e=l[1].value?l[1].value.data.split("\n").slice(0,6).map((e=>Number(e))):null;u.transform=6===e?.length?new oe.A({forwardCoefficients:[e[4],e[5],e[0],-e[1],e[2],-e[3]]}):null}return u}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],pe.prototype,"datasetFormat",void 0),pe=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.ImageAuxRaster")],pe);const de=pe;var me=i(97768),ye=i(84952),ge=i(86738),we=i(20223),ve=i(87045),xe=i(25943),be=i(73037),Ie=i(82371);let _e=class extends k.A{constructor(){super(...arguments),this._levelOffset=0,this._tilemapCache=null,this._slices=null,this.datasetFormat="RasterTileServer",this.tileType=null}async fetchRawTile(e,t,i,s={}){const{storageInfo:r,extent:n}=this.rasterInfo,{transposeInfo:a}=r,o=null!=a&&!!s.transposedVariableName;if(this._slices&&!o&&null==s.sliceId)return null;const l=o?0:r.maximumPyramidLevel-e+this._levelOffset,c=`${this.url}/tile/${l}/${t}/${i}`,u=this._slices?o?{variable:s.transposedVariableName}:{sliceId:s.sliceId||0}:null;let f,h;if(r.isBsqTile){const e=(s.bandIds?.length?s.bandIds:[0,1,2]).map((e=>this.request(c,{query:{...u,bandId:e},responseType:"array-buffer",signal:s.signal}))),t=await Promise.all(e),i=t.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),r=new Uint8Array(i);h=[];let n=0;for(const{data:e}of t)h.push(n),r.set(new Uint8Array(e),n),n+=e.byteLength;f=r.buffer}else f=(await this.request(c,{query:u,responseType:"array-buffer",signal:s.signal})).data;if(!f)return null;const p=o?a.tileSize:r.tileInfo.size,d=await this.decodePixelBlock(f,{width:p[0],height:p[1],planes:h?.length,offsets:h,pixelType:null,isPoint:"Elevation"===this.tileType,returnInterleaved:o,noDataValue:this.rasterInfo.noDataValue});if(null==d)return null;const m=r.blockBoundary[e];if("jpg"!==r.compression||i>m.minCol&&i<m.maxCol&&t>m.minRow&&t<m.maxRow)return d;const{origin:y,blockWidth:g,blockHeight:w}=r,{x:v,y:x}=this.getPyramidPixelSize(e),b=Math.round((n.xmin-y.x)/v)%g,I=Math.round((n.xmax-y.x)/v)%g||g,_=Math.round((y.y-n.ymax)/x)%w,S=Math.round((y.y-n.ymin)/x)%w||w,A=i===m.minCol?b:0,T=t===m.minRow?_:0,R=i===m.maxCol?I:g,C=t===m.maxRow?S:w;return(0,Y.z$)(d,{x:A,y:T},{width:R-A,height:C-T}),d}getSliceIndex(e){if(!this._slices||null==e||0===e.length)return null;const t=e;for(let e=0;e<this._slices.length;e++){const i=this._slices[e].multidimensionalDefinition;if(i.length===t.length&&!i.some((e=>{const i=t.find((t=>e.variableName===t.variableName&&t.dimensionName===e.dimensionName));return!i||(Array.isArray(e.values[0])?`${e.values[0][0]}-${e.values[0][1]}`:e.values[0])!==(Array.isArray(i.values[0])?`${i.values[0][0]}-${i.values[0][1]}`:i.values[0])})))return e}return null}async fetchVariableStatisticsHistograms(e,t){const i=this.request(this.url+"/statistics",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.statistics)),s=this.request(this.url+"/histograms",{query:{variable:e,f:"json"},signal:t}).then((e=>e.data?.histograms)),r=await Promise.all([i,s]);return r[0]&&r[0].forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),r[1]?.[0]?.counts?.length||(r[1]=null),{statistics:r[0]||null,histograms:r[1]||null}}async computeBestPyramidLevelForLocation(e,t={}){if(!this._tilemapCache)return 0;let i=this.identifyPixelLocation(e,0,t.datumTransformation);if(null===i)return null;let s=0;const{maximumPyramidLevel:r}=this.rasterInfo.storageInfo;let n=r-s+this._levelOffset;const a=i.srcLocation;for(;n>=0;){try{if("available"===await this._tilemapCache.fetchAvailability(n,i.row,i.col,t))break}catch{}if(n--,s++,i=this.identifyPixelLocation(a,s,t.datumTransformation),null===i)return null}return-1===n||null==i?null:s}async _open(e){const t=e?.signal,i=this.sourceJSON?{data:this.sourceJSON}:await this.request(this.url,{query:{f:"json"},signal:t});i.ssl&&(this.url=this.url.replace(/^http:/i,"https:"));const s=i.data;if(this.sourceJSON=s,!s)throw new a.A("imageserverraster:open","cannot initialize tiled image service, missing service info");if(!s.tileInfo)throw new a.A("imageserverraster:open","use ImageryLayer to open non-tiled image services");this._fixScaleInServiceInfo(),this.tileType=s.cacheType,null==this.tileType&&(["jpg","jpeg","png","png8","png24","png32","mixed"].includes(s.tileInfo.format.toLowerCase())?this.tileType="Map":"lerc"===s.tileInfo.format.toLowerCase()?this.tileType="Elevation":this.tileType="Raster"),this.datasetName=s.name?.slice(s.name.indexOf("/")+1)??"";const r=await this._fetchRasterInfo({signal:t});if(null==r)throw new a.A("image-server-raster:open","cannot initialize image service");(0,Ie.E9)(r,s);const n="Map"===this.tileType?function(e,t){if(!e)return null;const{minScale:i,maxScale:s,minLOD:r,maxLOD:n}=t;if(null!=r&&null!=n)return ve.A.fromJSON({...e,lods:e.lods.filter((({level:e})=>null!=e&&e>=r&&e<=n))});if(0!==i&&0!==s){const t=e=>Math.round(1e4*e)/1e4,r=i?t(i):1/0,n=s?t(s):-1/0;return ve.A.fromJSON({...e,lods:e.lods.filter((e=>{const i=t(e.scale);return i<=r&&i>=n}))})}return ve.A.fromJSON(e)}(s.tileInfo,s):ve.A.fromJSON(s.tileInfo);(0,me.Lw)(n);const[o,l]=this._computeMinMaxLOD(r,n),{extent:c,pixelSize:u}=r,f=.5/r.width*u.x,h=Math.max(u.x,u.y),{lods:p}=n;("Map"!==this.tileType&&0!==s.maxScale||Math.abs(u.x-u.y)>f||!p.some((e=>Math.abs(e.resolution-h)<f)))&&(u.x=u.y=o.resolution,r.width=Math.ceil((c.xmax-c.xmin)/u.x-.1),r.height=Math.ceil((c.ymax-c.ymin)/u.y-.1));const d=o.level-l.level,[m,y]=n.size,g=[],w=[];p.forEach(((e,t)=>{e.level>=l.level&&e.level<=o.level&&g.push({x:e.resolution,y:e.resolution}),t<p.length-1&&w.push(Math.round(10*e.resolution/p[t+1].resolution)/10)})),g.sort(((e,t)=>e.x-t.x));const v=this.computeBlockBoundary(c,m,y,n.origin,g,d),x=g.length>1?g.slice(1):null;let b;s.transposeInfo&&(b={tileSize:[s.transposeInfo.rows,s.transposeInfo.cols],packetSize:r.keyProperties?._yxs.PacketSize??0});const I=w.length<=1||w.length>=3&&w.slice(0,-1).every((e=>e===w[0]))?w[0]??2:Math.round(10/(l.resolution/o.resolution)**(-1/d))/10;if(r.storageInfo=new we.A({blockWidth:n.size[0],blockHeight:n.size[1],pyramidBlockWidth:n.size[0],pyramidBlockHeight:n.size[1],pyramidResolutions:x,pyramidScalingFactor:I,compression:n.format,origin:n.origin,firstPyramidLevel:1,maximumPyramidLevel:d,tileInfo:n,isBsqTile:!!s.bsq,transposeInfo:b,blockBoundary:v}),function(e){const{extent:t,spatialReference:i}=e;t.xmin>-1&&t.xmax>181&&i?.wkid&&i.isGeographic&&(e.nativeExtent=e.extent,e.transform=new be.A,e.extent=e.transform.forwardTransform(t))}(r),this._set("rasterInfo",r),s.capabilities.toLowerCase().includes("tilemap")){const e={tileInfo:r.storageInfo.tileInfo,parsedUrl:(0,ye.An)(this.url),url:this.url,tileServers:[]};this._tilemapCache=new xe.d({layer:e})}}async _fetchRasterInfo(e){const t=this.sourceJSON;if("Map"===this.tileType){const e=t.fullExtent||t.extent,i=Math.ceil((e.xmax-e.xmin)/t.pixelSizeX-.1),s=Math.ceil((e.ymax-e.ymin)/t.pixelSizeY-.1),r=E.A.fromJSON(t.spatialReference||e.spatialReference),n=new ge.A({x:t.pixelSizeX,y:t.pixelSizeY,spatialReference:r});return new W.A({width:i,height:s,bandCount:3,extent:N.A.fromJSON(e),spatialReference:r,pixelSize:n,pixelType:"u8",statistics:null,keyProperties:{DataType:"processed"}})}const{signal:i}=e,s=(0,Ie.Tw)(this.url,this.sourceJSON,{signal:i,query:this.ioConfig.customFetchParameters}),r=t.hasMultidimensions?this.request(`${this.url}/slices`,{query:{f:"json"},signal:i}).then((e=>e.data?.slices)).catch((()=>null)):null,n=await Promise.all([s,r]);return this._slices=n[1],n[0]}_fixScaleInServiceInfo(){const{sourceJSON:e}=this;e.minScale&&e.minScale<0&&(e.minScale=0),e.maxScale&&e.maxScale<0&&(e.maxScale=0)}_computeMinMaxLOD(e,t){const{pixelSize:i}=e,s=.5/e.width*i.x,{lods:r}=t,n=t.lodAt(Math.max.apply(null,r.map((e=>e.level)))),a=t.lodAt(Math.min.apply(null,r.map((e=>e.level)))),{tileType:o}=this;if("Map"===o)return this._levelOffset=r[0].level,[n,a];if("Raster"===o)return[r.find((e=>e.resolution===i.x))??n,a];const{minScale:l,maxScale:c}=this.sourceJSON;let u=n;c>0&&(u=r.find((e=>Math.abs(e.scale-c)<s)),u||(u=r.filter((e=>e.scale>c)).sort(((e,t)=>e.scale>t.scale?1:-1))[0]??n));let f=a;return l>0&&(f=r.find((e=>Math.abs(e.scale-l)<s))??a,this._levelOffset=f.level-a.level),[u,f]}};(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],_e.prototype,"datasetFormat",void 0),(0,s._)([(0,f.MZ)()],_e.prototype,"tileType",void 0),_e=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.ImageServerRaster")],_e);const Se=_e;var Ae=i(47124);const Te=new Map;Te.set("Int8","s8"),Te.set("UInt8","u8"),Te.set("Int16","s16"),Te.set("UInt16","u16"),Te.set("Int32","s32"),Te.set("UInt32","u32"),Te.set("Float32","f32"),Te.set("Float64","f32"),Te.set("Double64","f32");const Re=new Map;Re.set("none",{blobExtension:".til",isOneSegment:!0,decoderFormat:"bip"}),Re.set("lerc",{blobExtension:".lrc",isOneSegment:!1,decoderFormat:"lerc"}),Re.set("deflate",{blobExtension:".pzp",isOneSegment:!0,decoderFormat:"deflate"}),Re.set("jpeg",{blobExtension:".pjg",isOneSegment:!0,decoderFormat:"jpg"});let Ce=class extends k.A{constructor(){super(...arguments),this._files=null,this._storageIndex=null,this.datasetFormat="MRF"}async fetchRawTile(e,t,i,s={}){const{blockWidth:r,blockHeight:n,blockBoundary:a}=this.rasterInfo.storageInfo,o=a[e];if(!o||o.maxRow<t||o.maxCol<i||o.minRow>t||o.minCol>i)return null;const{bandCount:l,pixelType:c}=this.rasterInfo,{ranges:u,actualTileWidth:f,actualTileHeight:h}=this._getTileLocation(e,t,i);if(!u||0===u.length)return null;if(0===u[0].from&&0===u[0].to){const e=new Uint8Array(r*n);return new B.A({width:r,height:n,pixels:void 0,mask:e,validPixelCount:0})}const{bandIds:p}=this.ioConfig,d=this._getBandSegmentCount(),m=[];let y=0;for(y=0;y<d;y++)p&&!p.includes(y)||m.push(this.request(this._files.data,{range:{from:u[y].from,to:u[y].to},responseType:"array-buffer",signal:s.signal}));const g=await Promise.all(m),w=g.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),v=new Uint8Array(w),x=[];let b=0;for(y=0;y<d;y++)x.push(b),v.set(new Uint8Array(g[y].data),b),b+=g[y].data.byteLength;const I=Re.get(this.rasterInfo.storageInfo.compression).decoderFormat,_=await this.decodePixelBlock(v.buffer,{width:r,height:n,format:I,planes:p?.length||l,offsets:x,pixelType:c});if(null==_)return null;let{noDataValue:S}=this.rasterInfo;if(null!=S&&"lerc"!==I&&!_.mask&&(S=S[0],null!=S)){const e=_.width*_.height,t=new Uint8Array(e);if(Math.abs(S)>1e24)for(y=0;y<e;y++)Math.abs((_.pixels[0][y]-S)/S)>1e-6&&(t[y]=1);else for(y=0;y<e;y++)_.pixels[0][y]!==S&&(t[y]=1);_.mask=t}let A=0,T=0;if(f!==r||h!==n){let e=_.mask;if(e)for(y=0;y<n;y++)if(T=y*r,y<h)for(A=f;A<r;A++)e[T+A]=0;else for(A=0;A<r;A++)e[T+A]=0;else for(e=new Uint8Array(r*n),_.mask=e,y=0;y<h;y++)for(T=y*r,A=0;A<f;A++)e[T+A]=1}return _}async _open(e){this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1);const t=e?e.signal:null,i=await this.request(this.url,{responseType:"xml",signal:t}),{rasterInfo:s,files:r}=this._parseHeader(i.data),{skipMapInfo:n,skipExtensions:a=[]}=this.ioConfig;if(!a.includes("aux.xml")&&!n){const t=await this._fetchAuxiliaryData(e);null!=t&&(s.statistics=t.statistics??s.statistics,s.histograms=t.histograms,t.histograms&&null==s.statistics&&(s.statistics=(0,K.Pg)(t.histograms)))}n&&this.updateImageSpaceRasterInfo(s),this._set("rasterInfo",s),this._files=r;const o=await this.request(r.index,{responseType:"array-buffer",signal:t});this._storageIndex=function(e){if(e.byteLength%16>0)throw new Error("invalid array buffer must be multiples of 16");let t,i,s,r,n,a;if(Ae.Z){for(i=new Uint8Array(e),r=new ArrayBuffer(e.byteLength),s=new Uint8Array(r),n=0;n<e.byteLength/4;n++)for(a=0;a<4;a++)s[4*n+a]=i[4*n+3-a];t=new Uint32Array(r)}else t=new Uint32Array(e);return t}(o.data);const{blockWidth:l,blockHeight:c}=this.rasterInfo.storageInfo,u=this.rasterInfo.storageInfo.pyramidScalingFactor,{width:f,height:h}=this.rasterInfo,p=[],d=this._getBandSegmentCount();let m=0,y=-1;for(;m<this._storageIndex.length;){y++;const e=Math.ceil(f/l/u**y)-1,t=Math.ceil(h/c/u**y)-1;m+=(e+1)*(t+1)*d*4,p.push({maxRow:t,maxCol:e,minCol:0,minRow:0})}this.rasterInfo.storageInfo.blockBoundary=p,y>0&&(this.rasterInfo.storageInfo.firstPyramidLevel=1,this.rasterInfo.storageInfo.maximumPyramidLevel=y),this.updateTileInfo()}_getBandSegmentCount(){return Re.get(this.rasterInfo.storageInfo.compression).isOneSegment?1:this.rasterInfo.bandCount}_getTileLocation(e,t,i){const{blockWidth:s,blockHeight:r,pyramidScalingFactor:n}=this.rasterInfo.storageInfo,{width:a,height:o}=this.rasterInfo,l=this._getBandSegmentCount();let c,u,f,h=0,p=0;for(f=0;f<e;f++)p=n**f,c=Math.ceil(a/s/p),u=Math.ceil(o/r/p),h+=c*u;p=n**e,c=Math.ceil(a/s/p),u=Math.ceil(o/r/p),h+=t*c+i,h*=4*l;const d=this._storageIndex.subarray(h,h+4*l);let m=0,y=0;const g=[];for(let e=0;e<l;e++)m=d[4*e]*2**32+d[4*e+1],y=m+d[4*e+2]*2**32+d[4*e+3],g.push({from:m,to:y});return{ranges:g,actualTileWidth:i<c-1?s:Math.ceil(a/p)-s*(c-1),actualTileHeight:t<u-1?r:Math.ceil(o/p)-r*(u-1)}}_parseHeader(e){const t=(0,ae.V6)(e,"MRF_META/Raster");if(!t)throw new a.A("mrf:open","not a valid MRF format");const i=(0,ae.V6)(t,"Size"),s=parseInt(i.getAttribute("x"),10),r=parseInt(i.getAttribute("y"),10),n=parseInt(i.getAttribute("c"),10),o=((0,ae.mX)(t,"Compression")||"none").toLowerCase();if(!Re.has(o))throw new a.A("mrf:open","currently does not support compression "+o);const l=(0,ae.mX)(t,"DataType")||"UInt8",c=Te.get(l);if(null==c)throw new a.A("mrf:open","currently does not support pixel type "+l);const u=(0,ae.V6)(t,"PageSize"),f=parseInt(u.getAttribute("x"),10),h=parseInt(u.getAttribute("y"),10),p=(0,ae.V6)(t,"DataValues");let d,m;if(p&&(m=p.getAttribute("NoData"),null!=m&&(d=m.trim().split(" ").map((e=>parseFloat(e))))),(0,ae.V6)(e,"MRF_META/CachedSource"))throw new a.A("mrf:open","currently does not support MRF referencing other data files");const y=(0,ae.V6)(e,"MRF_META/GeoTags"),g=(0,ae.V6)(y,"BoundingBox");let w,v=!1;if(null!=g){const e=parseFloat(g.getAttribute("minx")),t=parseFloat(g.getAttribute("miny")),i=parseFloat(g.getAttribute("maxx")),s=parseFloat(g.getAttribute("maxy")),r=(0,ae.mX)(y,"Projection")||"";let n=E.A.WGS84;if("LOCAL_CS[]"!==r)if(r.toLowerCase().startsWith("epsg:")){const e=Number(r.slice(5));isNaN(e)||0===e||(n=new E.A({wkid:e}))}else n=ce(r)??E.A.WGS84;else v=!0,n=new E.A({wkid:3857});w=new N.A(e,t,i,s),w.spatialReference=n}else v=!0,w=new N.A({xmin:-.5,ymin:.5-r,xmax:s-.5,ymax:.5,spatialReference:new E.A({wkid:3857})});const x=(0,ae.V6)(e,"MRF_META/Rsets"),b=parseInt(x?.getAttribute("scale")||"2",10),I=w.spatialReference,_=new we.A({origin:new ge.A({x:w.xmin,y:w.ymax,spatialReference:I}),blockWidth:f,blockHeight:h,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:o,pyramidScalingFactor:b}),S=new ge.A({x:w.width/s,y:w.height/r,spatialReference:I}),A=new W.A({width:s,height:r,extent:w,isPseudoSpatialReference:v,spatialReference:I,bandCount:n,pixelType:c,pixelSize:S,noDataValue:d,storageInfo:_}),T=(0,ae.mX)(e,"datafile"),R=(0,ae.mX)(e,"IndexFile");return{rasterInfo:A,files:{mrf:this.url,index:R||this.url.replace(".mrf",".idx"),data:T||this.url.replace(".mrf",Re.get(o).blobExtension)}}}async _fetchAuxiliaryData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return fe(t)}catch{return null}}};(0,s._)([(0,f.MZ)()],Ce.prototype,"_files",void 0),(0,s._)([(0,f.MZ)()],Ce.prototype,"_storageIndex",void 0),(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],Ce.prototype,"datasetFormat",void 0),Ce=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.MRFRaster")],Ce);const Me=Ce;var Oe=i(15265);function Fe(e){const t=e.fields,i=e.records,s=t.some((e=>"oid"===e.name.toLowerCase()))?"OBJECTID":"OID",r=[{name:s,type:"esriFieldTypeOID",alias:"OID"}].concat(t.map((e=>({name:e.name,type:"esriFieldType"+e.typeName,alias:e.name})))),n=r.map((e=>e.name)),a=[];let o=0,l=0;return i.forEach((e=>{const t={};for(t[s]=o++,l=1;l<n.length;l++)t[n[l]]=e[l-1];a.push({attributes:t})})),{displayFieldName:"",fields:r,features:a}}class Pe{static get supportedVersions(){return[5]}static parse(e){const t=new DataView(e),i=3&t.getUint8(0);if(3!==i)return{header:{version:i},recordSet:null};const s=t.getUint32(4,!0),r=t.getUint16(8,!0),n=t.getUint16(10,!0),a={version:i,recordCount:s,headerByteCount:r,recordByteCount:n};let o=32;const l=[],c=[];let u;if(3===i){for(;13!==t.getUint8(o);)u=String.fromCharCode(t.getUint8(o+11)).trim(),l.push({name:(0,Oe.w)(new Uint8Array(e,o,11)),type:u,typeName:["String","Date","Double","Boolean","String","Integer"][["C","D","F","L","M","N"].indexOf(u)],length:t.getUint8(o+16)}),o+=32;if(o+=1,l.length>0)for(;c.length<s&&e.byteLength-o>n;){const i=[];32===t.getUint8(o)?(o+=1,l.forEach((t=>{if("C"===t.type)i.push((0,Oe.w)(new Uint8Array(e,o,t.length)).trim());else if("N"===t.type)i.push(parseInt(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim(),10));else if("F"===t.type)i.push(parseFloat(String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim()));else if("D"===t.type){const s=String.fromCharCode.apply(null,new Uint8Array(e,o,t.length)).trim();i.push(new Date(parseInt(s.slice(0,4),10),parseInt(s.slice(4,6),10)-1,parseInt(s.slice(6,8),10)))}o+=t.length})),c.push(i)):o+=n}}return{header:a,fields:l,records:c,recordSet:Fe({fields:l,records:c})}}}var ke=i(45664),De=i(12196);const Ne=(e,t)=>e.get(t)?.values,Ee=(e,t)=>e.get(t)?.values?.[0];let Le=class extends k.A{constructor(){super(...arguments),this._files=null,this._headerInfo=null,this._bufferSize=1048576,this._chunkSize=10485760,this.datasetFormat="TIFF"}async fetchRawTile(e,t,i,s={}){if(!this._headerInfo?.isSupported||this.isBlockOutside(e,t,i))return null;const r=await this._fetchRawTiffTile(e,t,i,!1,s);if(null!=r&&this._headerInfo.hasMaskBand){const n=await this._fetchRawTiffTile(e,t,i,!0,s);null!=n&&n.pixels[0]instanceof Uint8Array&&(r.mask=n.pixels[0])}return r}async _open(e){const t=e?e.signal:null,{data:i}=await this.request(this.url,{range:{from:0,to:this._bufferSize},responseType:"array-buffer",signal:t});if(!i)throw new a.A("tiffraster:open","failed to open url "+this.url);this.datasetName=this.url.slice(this.url.lastIndexOf("/")+1,this.url.lastIndexOf("."));const{littleEndian:s,firstIFDPos:r,isBigTiff:n}=(0,ke.uT)(i),l=[],c={fileChunk:i,posIFD:r,fileOffset:0};await this._readIFDs(l,c,s,n?8:4,t);const{imageInfo:u,rasterInfo:f}=function(e){const t=(0,ke.uc)(e),{width:i,height:s,tileWidth:r,tileHeight:n,planes:a,pixelType:o,compression:l,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidBlockWidth:f,pyramidBlockHeight:h,pyramidResolutions:p,tileBoundary:d,affine:m,metadata:y}=t;let g=ce(t.extent.spatialReference?.wkt||t.extent.spatialReference?.wkid),w=!!t.isPseudoGeographic;null==g&&(w=!0,g=new E.A({wkid:3857}));const v=new N.A({...t.extent,spatialReference:g}),x=new ge.A(v?{x:v.xmin,y:v.ymax,spatialReference:g}:{x:0,y:0}),b=new we.A({blockWidth:r,blockHeight:n,pyramidBlockWidth:f,pyramidBlockHeight:h,compression:l,origin:x,firstPyramidLevel:c,maximumPyramidLevel:u,pyramidResolutions:p,blockBoundary:d}),I=new ge.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/s,spatialReference:g}),_=y?{BandProperties:y.bandProperties,DataType:y.dataType}:{};let S=null;const A=Ee(e[0],"PHOTOMETRICINTERPRETATION"),T=Ne(e[0],"COLORMAP");if(A<=3&&T?.length>3&&T.length%3==0){S=[];const e=T.length/3;for(let t=0;t<e;t++)S.push([t,T[t]>>>8,T[t+e]>>>8,T[t+2*e]>>>8])}const R=new W.A({width:i,height:s,bandCount:a,pixelType:o,pixelSize:I,storageInfo:b,spatialReference:g,isPseudoSpatialReference:w,keyProperties:_,extent:v,colormap:S,statistics:y?y.statistics:null});if(m?.length&&(R.nativeExtent=new N.A({xmin:-.5,ymin:.5-s,xmax:i-.5,ymax:.5,spatialReference:g}),R.transform=new oe.A({polynomialOrder:1,forwardCoefficients:[m[2]+m[0]/2,m[5]-m[3]/2,m[0],m[3],-m[1],-m[4]]}),R.extent=R.transform.forwardTransform(R.nativeExtent),R.pixelSize=new ge.A({x:(v.xmax-v.xmin)/i,y:(v.ymax-v.ymin)/s,spatialReference:g}),b.origin.x=-.5,b.origin.y=.5),p){const{x:e,y:t}=R.pixelSize;p.forEach((i=>{i.x*=e,i.y*=t}))}return{imageInfo:t,rasterInfo:R}}(l),h=(0,ke.zS)(l),p=(0,ke.r9)(l);if(this._headerInfo={littleEndian:s,isBigTiff:n,ifds:l,pyramidIFDs:h,maskIFDs:p,...u},this._set("rasterInfo",f),!u.isSupported)throw new a.A("tiffraster:open","this tiff is not supported: "+u.message);if(!u.tileWidth)throw new a.A("tiffraster:open","none-tiled tiff is not optimized for access, convert to COG and retry.");f.isPseudoSpatialReference&&o.A.getLogger(this).warn("The spatial reference for this tiff is unsupported. Only EPSG spatial reference codes and Esri WKTs are supported.");const d=l[0].get("PREDICTOR")?.values?.[0],m=l[0].get("SAMPLEFORMAT")?.values?.[0];if(3===m&&2===d)throw new a.A("tiffraster:open","unsupported horizontal difference encoding. Predictor=3 is supported for floating point data");const{skipMapInfo:y,skipExtensions:g=[]}=this.ioConfig;if(!g.includes("aux.xml")&&!y){const t=await this._fetchAuxiliaryMetaData(e);null!=t&&function(e,t){if(t.statistics=e.statistics??t.statistics,t.histograms=e.histograms,e.histograms&&null==t.statistics&&(t.statistics=(0,K.Pg)(e.histograms)),e.transform&&null==t.transform){t.transform=e.transform,t.nativeExtent=t.extent;const i=t.transform.forwardTransform(t.nativeExtent);t.pixelSize=new ge.A({x:(i.xmax-i.xmin)/t.width,y:(i.ymax-i.ymin)/t.height,spatialReference:t.spatialReference}),t.extent=i}t.isPseudoSpatialReference&&e.spatialReference&&(t.spatialReference=e.spatialReference,t.extent.spatialReference=t.nativeExtent.spatialReference=t.storageInfo.origin.spatialReference=t.spatialReference)}(t,f)}g.includes("vat.dbf")||1!==f.bandCount||"u8"!==f.pixelType||y||(f.attributeTable=await this._fetchAuxiliaryTable(e),null!=f.attributeTable&&(f.keyProperties.DataType="thematic")),y&&this.updateImageSpaceRasterInfo(f),this.updateTileInfo()}async _validateOrFetchHeaderBuffer(e,t){let{fileChunk:i,fileOffset:s,posIFD:r}=e;return(r+8>=i.byteLength||r<0)&&(s=r+s,i=(await this.request(this.url,{range:{from:s,to:s+this._bufferSize},responseType:"array-buffer",signal:t})).data,r=0),{fileChunk:i,fileOffset:s,posIFD:r}}async _readIFDs(e,t,i,s=4,r){if(!t.posIFD)return null;t=await this._validateOrFetchHeaderBuffer(t,r);const n=await this._readIFD(t,i,De.NB,s,r);if(!n?.ifd)throw new a.A("tiffraster:open","cannot parse tiff header. failed to open url "+this.url);if(e.push(n.ifd),!n.nextIFD)return null;t.posIFD=n.nextIFD-t.fileOffset,await this._readIFDs(e,t,i,s,r)}async _readIFD(e,t,i=De.NB,s=4,r){let{fileChunk:n,posIFD:a,fileOffset:o}=e;if(!e.fileChunk)return null;const l=(0,ke.JM)(n,t,a,o,i,s);if(l.success){const e=[];if(l.ifd?.forEach((t=>{t.values||e.push(t)})),e.length>0&&await this._fillOffsets(e,t,l.nextIFD,r),l.ifd?.has("GEOKEYDIRECTORY")){const e=l.ifd.get("GEOKEYDIRECTORY"),i=e?.values;if(i&&i.length>4){const s=i[0]+"."+i[1]+"."+i[2];a=e.valueOffset+6-o;const l=await this._validateOrFetchHeaderBuffer({fileChunk:n,posIFD:a,fileOffset:o},r),c=await this._readIFD(l,t,De.YC,2,r);e.data=c?.ifd,e.data&&e.data.set("GEOTIFFVersion",{id:0,type:2,valueCount:1,valueOffset:null,values:[s]})}}return l}return l.requiredBufferSize?(n=(await this.request(this.url,{range:{from:o,to:o+a+l.requiredBufferSize+8},responseType:"array-buffer",signal:r})).data,n.byteLength<a+l.requiredBufferSize?null:(e.fileChunk=n,e.fileOffset=o,this._readIFD(e,t,i,s,r))):null}async _fillOffsets(e,t,i,s){const r=e.filter((e=>null!=e.offlineOffsetSize));if(0===r.length)return;const n=r.map((e=>e.offlineOffsetSize)),a=Math.min.apply(null,n.map((e=>e[0]))),o=Math.max.apply(null,n.map((e=>e[0]+e[1])));let l=1===n.length||o-a<=this._bufferSize;if(!l&&n.length>1&&(n.sort(((e,t)=>e[0]-t[0])),l=n.reduce(((e,t)=>e===t[0]?t[0]+t[1]:0),n[0][0])===o),l){const e=await this._fetchOffsets(a,Math.max(o,a+this._bufferSize),s);return void r.forEach((i=>(0,ke.Cr)(e,t,i,a)))}const c=r.map((async e=>{const i=e.offlineOffsetSize,r=await this._fetchOffsets(i[0],i[1]+i[0],s);(0,ke.Cr)(r,t,e,i[0])}));await Promise.all(c)}async _fetchOffsets(e,t,i){const s=[],r=this._chunkSize,n=Math.ceil((t-e)/r);let a=e;for(let e=0;e<n;e++)s.push(this.request(this.url,{range:{from:a,to:e===n-1?t:a+r-1},responseType:"array-buffer",signal:i})),a+=r;const o=await Promise.all(s);if(1===n)return o[0].data;const l=new Uint8Array(t-e+1);for(let e=0;e<n;e++)l.set(new Uint8Array(o[e].data),e*r);return l.buffer}async _fetchRawTiffTile(e,t,i,s,r={}){const n=this._getTileLocation(e,t,i,s);if(!n)return null;const{ranges:a,actualTileWidth:o,actualTileHeight:l,ifd:c}=n,u=a.map((e=>this.request(this.url,{range:e,responseType:"array-buffer",signal:r.signal}))),f=await Promise.all(u),h=f.map((e=>e.data.byteLength)).reduce(((e,t)=>e+t)),p=1===f.length?f[0].data:new ArrayBuffer(h),d=[0],m=[0];if(f.length>1){const e=new Uint8Array(p);for(let t=0,i=0;t<f.length;t++){const s=f[t].data;e.set(new Uint8Array(s),i),d[t]=i,i+=s.byteLength,m[t]=s.byteLength}}const{blockWidth:y,blockHeight:g}=this.getBlockWidthHeight(e),w=await this.decodePixelBlock(p,{format:"tiff",customOptions:{headerInfo:this._headerInfo,ifd:c,offsets:d,sizes:m},width:y,height:g,planes:null,pixelType:null});if(null==w)return null;let v,x,b;if(o!==y||l!==g){let e=w.mask;if(e)for(v=0;v<g;v++)if(b=v*y,v<l)for(x=o;x<y;x++)e[b+x]=0;else for(x=0;x<y;x++)e[b+x]=0;else for(e=new Uint8Array(y*g),w.mask=e,v=0;v<l;v++)for(b=v*y,x=0;x<o;x++)e[b+x]=1}return w}_getTileLocation(e,t,i,s=!1){const{firstPyramidLevel:r,blockBoundary:n}=this.rasterInfo.storageInfo,a=0===e?0:e-(r-1),{_headerInfo:o}=this;if(!o)return null;const l=s?o.maskIFDs[a]:0===a?o?.ifds[0]:o?.pyramidIFDs[a-1];if(!l)return null;const c=(0,ke.XO)(l,o),u=Ne(l,"TILEOFFSETS");if(void 0===u)return null;const f=Ne(l,"TILEBYTECOUNTS"),{minRow:h,minCol:p,maxRow:d,maxCol:m}=n[a];if(t>d||i>m||t<h||i<p)return null;const y=Ee(l,"IMAGEWIDTH"),g=Ee(l,"IMAGELENGTH"),w=Ee(l,"TILEWIDTH"),v=Ee(l,"TILELENGTH"),x=[];if(c){const{bandCount:e}=this.rasterInfo;for(let s=0;s<e;s++){const e=s*(d+1)*(m+1)+t*(m+1)+i;x[s]={from:u[e],to:u[e]+f[e]-1}}}else{const e=t*(m+1)+i;x.push({from:u[e],to:u[e]+f[e]-1})}for(let e=0;e<x.length;e++)if(null==x[e].from||!x[e].to||x[e].to<0)return null;return{ranges:x,ifd:l,actualTileWidth:i===m&&y%w||w,actualTileHeight:t===d&&g%v||v}}async _fetchAuxiliaryMetaData(e){try{const{data:t}=await this.request(this.url+".aux.xml",{responseType:"xml",signal:e?.signal});return fe(t)}catch{return null}}async _fetchAuxiliaryTable(e){try{const{data:t}=await this.request(this.url+".vat.dbf",{responseType:"array-buffer",signal:e?.signal}),i=Pe.parse(t);return i?.recordSet?te.A.fromJSON(i.recordSet):null}catch{return null}}};(0,s._)([(0,f.MZ)()],Le.prototype,"_files",void 0),(0,s._)([(0,f.MZ)()],Le.prototype,"_headerInfo",void 0),(0,s._)([(0,f.MZ)()],Le.prototype,"_bufferSize",void 0),(0,s._)([(0,f.MZ)()],Le.prototype,"_chunkSize",void 0),(0,s._)([(0,f.MZ)({type:String,json:{write:!0}})],Le.prototype,"datasetFormat",void 0),Le=(0,s._)([(0,d.$)("esri.layers.support.rasterDatasets.TIFFRaster")],Le);const Be=Le,ze=new Map;ze.set("MRF",{desc:"Meta Raster Format",constructor:Me}),ze.set("TIFF",{desc:"GeoTIFF",constructor:Be}),ze.set("RasterTileServer",{desc:"Raster Tile Server",constructor:Se}),ze.set("JPG",{desc:"JPG Raster Format",constructor:de}),ze.set("PNG",{desc:"PNG Raster Format",constructor:de}),ze.set("GIF",{desc:"GIF Raster Format",constructor:de}),ze.set("BMP",{desc:"BMP Raster Format",constructor:de}),ze.set("CovJSON",{desc:"COVJSON Raster Format",constructor:se}),ze.set("MEMORY",{desc:"In Memory Raster Format",constructor:ee});class Je{static get supportedFormats(){const e=new Set;return ze.forEach(((t,i)=>e.add(i))),e}static async open(e){const{url:t,ioConfig:i,source:s,sourceJSON:r}=e;let n=e.datasetFormat??i?.datasetFormat;null==n&&(t.includes(".")?n=t.slice(t.lastIndexOf(".")+1).toUpperCase():"coverage"===s?.type?.toLowerCase()?n="CovJSON":s?.extent&&s.pixelblocks&&(n="MEMORY")),"OVR"===n||"TIF"===n?n="TIFF":"JPG"===n||"JPEG"===n||"JFIF"===n?n="JPG":"COVJSON"===n&&(n="CovJSON"),t.toLowerCase().includes("/imageserver")&&!t.toLowerCase().includes("/wcsserver")&&(n="RasterTileServer");const o={url:t,source:s,sourceJSON:r,datasetFormat:n,ioConfig:i??{bandIds:null,sampling:null}};if(Object.keys(o).forEach((e=>{null==o[e]&&delete o[e]})),n){if(!this.supportedFormats.has(n))throw new a.A("rasterfactory:open","not a supported format "+n);if("CRF"===n)throw new a.A("rasterfactory:open",`cannot open raster: ${t}`);const i=new(0,ze.get(n).constructor)(o);return await i.open({signal:e.signal}),i}const l=Array.from(ze.keys()).filter((e=>"CovJSON"!==e&&"Memory"!==e));let c=0;const u=()=>{if(n=l[c++],!n)return null;if("CRF"===n)return null;const t=new(0,ze.get(n).constructor)(o);return t.open({signal:e.signal}).then((()=>t)).catch((()=>u()))};return u()}static register(e,t,i){ze.has(e.toUpperCase())||ze.set(e.toUpperCase(),{desc:t,constructor:i})}}var $e=i(6049),Ue=i(24212),Ve=i(30291),je=i(88625),Ze=i(92935);let qe=class extends((0,g.dM)((0,A.j)((0,x.q)((0,b.A)((0,_.H)((0,w.d)((0,v.o)((0,I.G)((0,T.e)((0,y.b)((0,S.J)((0,l.P)(n.A.ClonableMixin(m.A)))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.legendEnabled=!0,this.isReference=null,this.listMode="show",this.sourceJSON=null,this.version=null,this.type="imagery-tile",this.operationalLayerType="ArcGISTiledImageServiceLayer",this.popupEnabled=!0,this.popupTemplate=null,this.fields=null,this.source=void 0,this._debouncedSaveOperations=(0,c.sg)((async(e,t,s)=>{const{save:r,saveAs:n}=await i.e(9838).then(i.bind(i,59838));switch(e){case Ze.X.SAVE:return r(this,t);case Ze.X.SAVE_AS:return n(this,s,t)}}))}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"]},e).catch(c.QP).then((()=>this._openRaster(t)))),Promise.resolve(this)}set elevationInfo(e){this._set("elevationInfo",e),this.loaded&&this._validateElevationInfo()}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){const e=[(0,M.rZ)("Pixel Value"),(0,M.dy)("Raw Pixel Value")],t=this.raster?.rasterInfo??this.serviceRasterInfo,i=t?.attributeTable;if(i){const t=(0,M.jC)(i);e.push(...t)}const s=t?.dataType,r=t?.multidimensionalInfo;if(("vector-magdir"===s||"vector-uv"===s)&&null!=r){const t=r.variables[0].unit?.trim(),i=(0,M.DV)(t),s=(0,M.y6)();e.push(i,s)}if(r){const t=(0,M.AL)(r);e.push(...t)}return e}createPopupTemplate(e){const{rasterFields:t}=this,i=e?.visibleFieldNames??new Set(t.map((({name:e})=>e)).filter((e=>e!==M.F_.rawServicePixelValue))),s=(0,Ve.tn)({fields:t,title:this.title},{...e,visibleFieldNames:i}),{rasterInfo:r}=this.raster;return s?.fieldInfos&&r&&(0,M.h4)(s.fieldInfos,r),s}async generateRasterInfo(e,t){if(e=(0,h.PZ)(O.A,e),await this.load(),!e||"none"===e.functionName?.toLowerCase())return this.serviceRasterInfo;try{const{rasterInfo:i}=await this._openFunctionRaster(e,t);return i}catch(e){if(e instanceof a.A)throw e;throw new a.A("imagery-tile-layer","the given raster function is not supported")}}async save(e){return this._debouncedSaveOperations(Ze.X.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Ze.X.SAVE_AS,t,e)}write(e,t){const i=this._primaryRasters[0]??this.raster;if(this.loaded?"RasterTileServer"===i.datasetFormat&&("Raster"===i.tileType||"Map"===i.tileType):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))return super.write(e,t);if(t?.messages){const e=`${t.origin}/${t.layerContainerType||"operational-layers"}`;t.messages.push(new a.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this}))}return null}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=(0,F.q)(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{const{url:t,rasterFunction:i,source:s}=this;if(!t&&!s)throw new a.A("imagery-tile-layer:open","missing url or source parameter");s?await this._openFromSource(s,e):i?await this._openFromUrlWithRasterFunction(t,i,e):await this._openFromUrl(t,e)}const i=this.raster.rasterInfo;if(!i)throw new a.A("imagery-tile-layer:load","cannot load resources on "+this.url);if(this._set("serviceRasterInfo",t?i:this._primaryRasters[0].rasterInfo),this._set("spatialReference",i.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,null!=this.sourceJSON){const e="Map"===this.raster.tileType&&null!=this.sourceJSON.minLOD&&null!=this.sourceJSON.maxLOD?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:"service"})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:"service"});this.title||(this.title=this.raster.datasetName),"Map"===this.raster.tileType&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles((0,u.wB)((()=>this.customParameters),(e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)})))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=(0,F.p)(e),this.url||(this.url=this._primaryRasters[0].url)}async _openFromUrlWithRasterFunction(e,t,i){const s=[e];t&&(0,$e.UD)(t.toJSON(),s);const r=await Promise.all(s.map((e=>Je.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:i})))),n=r.findIndex((e=>null==e));if(n>-1)throw new a.A("imagery-tile-layer:open",`cannot open raster: ${s[n]}`);return this._primaryRasters=r,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){const i=await Je.open({url:e,sourceJSON:this.sourceJSON,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==i)throw new a.A("imagery-tile-layer:open",`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){const i="the tiled imagery data source is not supported",s="coverage"===e.type?.toLowerCase()?"CovJSON":e.extent&&e.pixelBlock?"MEMORY":null;if(!s)throw new a.A("imagery-tile-layer:open",i);"MEMORY"===s&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});const r=await Je.open({url:"",source:e,datasetFormat:s,ioConfig:{sampling:"closest",...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(null==r)throw new a.A("imagery-tile-layer:open",i);this._primaryRasters=[r],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=r}async _openFunctionRaster(e,t){const i={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach((e=>i[e.url]=e));const s=(0,$e.vt)(e.functionDefinition?.toJSON()??e.toJSON(),i),r=new P.A({rasterFunction:s});return await r.open(t),r}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof a.A&&o.A.getLogger(this).error("imagery-tile-layer:open",e.message),o.A.getLogger(this).warn("imagery-tile-layer:open","the raster function cannot be applied and is removed"),this._set("rasterFunction",null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(){const e=this.elevationInfo;(0,Ue.XF)(o.A.getLogger(this),(0,Ue.$7)("ImageryTile layers","relative-to-scene",e)),(0,Ue.XF)(o.A.getLogger(this),(0,Ue.tW)("ImageryTile layers",e))}};(0,s._)([(0,f.MZ)({clonable:!1})],qe.prototype,"_primaryRasters",void 0),(0,s._)([(0,f.MZ)({type:je.A,value:null,json:{read:!1}})],qe.prototype,"elevationInfo",null),(0,s._)([(0,f.MZ)(R.fV)],qe.prototype,"legendEnabled",void 0),(0,s._)([(0,f.MZ)({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],qe.prototype,"isReference",void 0),(0,s._)([(0,f.MZ)({type:["show","hide"]})],qe.prototype,"listMode",void 0),(0,s._)([(0,f.MZ)({json:{read:!0,write:!0}})],qe.prototype,"blendMode",void 0),(0,s._)([(0,f.MZ)({type:O.A,json:{name:"renderingRule",write:!0}})],qe.prototype,"rasterFunction",void 0),(0,s._)([(0,f.MZ)()],qe.prototype,"sourceJSON",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,json:{origins:{service:{read:{source:"currentVersion"}}}}})],qe.prototype,"version",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,json:{read:!1}})],qe.prototype,"type",void 0),(0,s._)([(0,f.MZ)({type:["ArcGISTiledImageServiceLayer"]})],qe.prototype,"operationalLayerType",void 0),(0,s._)([(0,f.MZ)({type:Boolean,value:!0,json:{read:{source:"disablePopup",reader:(e,t)=>!t.disablePopup},write:{target:"disablePopup",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}},writer(e,t,i){t[i]=!e}}}})],qe.prototype,"popupEnabled",void 0),(0,s._)([(0,f.MZ)({type:r.A,json:{read:{source:"popupInfo"},write:{target:"popupInfo",overridePolicy(){return{enabled:!this.loaded||"Raster"===this.raster.tileType}}}}})],qe.prototype,"popupTemplate",void 0),(0,s._)([(0,f.MZ)({readOnly:!0})],qe.prototype,"defaultPopupTemplate",null),(0,s._)([(0,f.MZ)({readOnly:!0,type:[C.A]})],qe.prototype,"fields",void 0),(0,s._)([(0,f.MZ)({readOnly:!0,type:[C.A]})],qe.prototype,"rasterFields",null),(0,s._)([(0,f.MZ)({constructOnly:!0})],qe.prototype,"source",void 0),qe=(0,s._)([(0,d.$)("esri.layers.ImageryTileLayer")],qe);const Ge=qe},56551:(e,t,i)=>{i.d(t,{H:()=>h});var s=i(90237),r=i(10107),n=(i(44208),i(53966),i(87811),i(40608)),a=i(69540),o=i(25482),l=i(56507),c=i(93223),u=i(94359);let f=class extends(a.A.ClonableMixin(o.A)){constructor(e){super(e),this.name=void 0,this.method="none",this.value=void 0,this.bandIds=void 0,this.renderer=void 0}};(0,s._)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"name",void 0),(0,s._)([(0,r.MZ)({type:["raster-function-template","variable","none"],json:{write:{isRequired:!0}}}),(0,c.e)({rasterFunctionTemplate:"raster-function-template",variable:"variable",none:"none"})],f.prototype,"method",void 0),(0,s._)([(0,r.MZ)({type:String,json:{write:{isRequired:!0}}})],f.prototype,"value",void 0),(0,s._)([(0,r.MZ)({type:[l.jz],json:{write:{isRequired:!0}}})],f.prototype,"bandIds",void 0),(0,s._)([(0,r.MZ)({types:u.uy,json:{write:!0,origins:{"web-scene":{types:u.Gj,write:{overridePolicy:e=>({enabled:e&&"vector-field"!==e.type&&"flow"!==e.type})}}}}})],f.prototype,"renderer",void 0),f=(0,s._)([(0,n.$)("esri.renderers.support.RasterPresetRenderer")],f);const h=e=>{let t=class extends e{constructor(){super(...arguments),this.activePresetRendererName=null,this.presetRenderers=null}};return(0,s._)([(0,r.MZ)({type:String,json:{name:"layerDefinition.activePresetRendererName",write:{allowNull:!0}}})],t.prototype,"activePresetRendererName",void 0),(0,s._)([(0,r.MZ)({type:[f],json:{name:"layerDefinition.presetRenderers",write:!0}})],t.prototype,"presetRenderers",void 0),t=(0,s._)([(0,n.$)("esri.layers.mixins.RasterPresetRendererMixin")],t),t}},69397:(e,t,i)=>{i.d(t,{$B:()=>r,Qf:()=>c,Qh:()=>o,RS:()=>n,ez:()=>h,lM:()=>a,qK:()=>f});var s=i(34275);function r(e){return 32+e.length}const n=16;function a(e){if(!e)return 0;let t=f;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i],!1));return t}function o(e){if(!e)return 0;if("number"==typeof e[0])return c(e);if(Array.isArray(e))return function(e){const t=e.length;if(0===t||"number"==typeof e[0])return u(e,8);let i=h;for(let s=0;s<t;s++)i+=l(e[s]);return i}(e);let t=f;for(const i in e)e.hasOwnProperty(i)&&(t+=l(e[i]));return t}function l(e,t=!0){switch(typeof e){case"object":return t?o(e):f;case"string":return r(e);case"number":return n;case"boolean":return 4;default:return 8}}function c(...e){return e.reduce(((e,t)=>e+(t?(0,s.iu)(t)?t.byteLength+p:Array.isArray(t)?u(t,n):0:0)),0)}function u(e,t){return h+e.length*t}const f=32,h=16,p=145},71903:(e,t,i)=>{var s;i.d(t,{u:()=>s}),function(e){e[e.KILOBYTES=1024]="KILOBYTES",e[e.MEGABYTES=1048576]="MEGABYTES",e[e.GIGABYTES=1073741824]="GIGABYTES"}(s||(s={}))},73037:(e,t,i)=>{i.d(t,{A:()=>c});var s,r=i(90237),n=i(10107),a=(i(44208),i(53966),i(87811),i(93223)),o=i(40608),l=i(82434);let c=s=class extends l.A{constructor(){super(...arguments),this.type="gcs-shift",this.tolerance=1e-8}forwardTransform(e){return"point"===(e=e.clone()).type?(e.x>180+this.tolerance&&(e.x-=360),e):(e.xmin>=180-this.tolerance?(e.xmax-=360,e.xmin-=360):e.xmax>180+this.tolerance&&(e.xmin=-180,e.xmax=180),e)}inverseTransform(e){return"point"===(e=e.clone()).type?(e.x<-this.tolerance&&(e.x+=360),e):(e.xmin<-this.tolerance&&(e.xmin+=360,e.xmax+=360),e)}clone(){return new s({tolerance:this.tolerance})}};(0,r._)([(0,a.e)({GCSShiftXform:"gcs-shift"})],c.prototype,"type",void 0),(0,r._)([(0,n.MZ)()],c.prototype,"tolerance",void 0),c=s=(0,r._)([(0,o.$)("esri.layers.support.rasterTransforms.GCSShiftTransform")],c)},82371:(e,t,i)=>{i.d(t,{E9:()=>d,Tw:()=>h,X6:()=>p});var s=i(78888),r=i(5443),n=i(86738),a=i(16930),o=i(87186),l=i(20223),c=i(2272),u=i(22671);async function f(e,t,i){const f=(0,c.Dl)(e),{rasterFunction:h,sourceJSON:p}=t||{},d=h?JSON.stringify(h.rasterFunctionDefinition||h):null,m=(0,c.lF)({...f.query,renderingRule:d,f:"json"}),y=(0,c.jV)(m,i);e=f.path;const g=p||await(0,s.A)(e,y).then((e=>e.data)),w=g.hasRasterAttributeTable?(0,s.A)(`${e}/rasterAttributeTable`,y):null,v=g.hasColormap?(0,s.A)(`${e}/colormap`,y):null,x=g.hasHistograms?(0,s.A)(`${e}/histograms`,y):null,b=g.currentVersion>=10.3?(0,s.A)(`${e}/keyProperties`,y):null,I=g.hasMultidimensions?(0,s.A)(`${e}/multidimensionalInfo`,y):null,_=await Promise.allSettled([w,v,x,b,I]);let S=null;if(g.minValues&&g.minValues.length===g.bandCount){S=[];for(let e=0;e<g.minValues.length;e++)S.push({min:g.minValues[e],max:g.maxValues[e],avg:g.meanValues[e],stddev:g.stdvValues[e]})}const A=r.A.fromJSON(g.extent),T=Math.ceil(A.width/g.pixelSizeX-.1),R=Math.ceil(A.height/g.pixelSizeY-.1),C=a.A.fromJSON(g.spatialReference||g.extent.spatialReference),M="fulfilled"===_[0].status?_[0].value?.data:null,O=M?.features?.length?u.A.fromJSON(M):null,F="fulfilled"===_[1].status?_[1].value?.data.colormap:null,P=F?.length?F:null,k="fulfilled"===_[2].status?_[2].value?.data.histograms:null,D=k?.[0]?.counts?.length?k:null,N="fulfilled"===_[3].status?_[3].value?.data??{}:{},E="fulfilled"===_[4].status?_[4].value?.data.multidimensionalInfo:null,L=E?.variables?.length?E:null;L&&L.variables.forEach((e=>{e.statistics?.length&&e.statistics.forEach((e=>{e.avg=e.mean,e.stddev=e.standardDeviation})),e.dimensions?.forEach((e=>{"StdTime"!==e.name||e.recurring||e.unit||(e.unit="ISO8601")}))}));const{defaultVariable:B,serviceDataType:z}=g;B&&B!==N.DefaultVariable&&(N.DefaultVariable=B),z?.includes("esriImageServiceDataTypeVector")&&!z.includes(N.DataType)&&(N.DataType=z.replace("esriImageServiceDataType",""));let J=g.noDataValue;g.noDataValues?.length&&g.noDataValues.some((e=>e!==J))&&(J=g.noDataValues);const $=g.transposeInfo?new l.A({blockWidth:256,blockHeight:256,pyramidBlockWidth:256,pyramidBlockHeight:256,pyramidScalingFactor:2,compression:"lerc",origin:new n.A({x:g.extent.xmin,y:g.extent.ymax,spatialReference:C}),firstPyramidLevel:1,maximumPyramidLevel:Math.max(0,Math.round(Math.log(Math.max(T,R))/Math.LN2-8)),transposeInfo:g.transposeInfo}):void 0;return new o.A({width:T,height:R,bandCount:g.bandCount,extent:r.A.fromJSON(g.extent),spatialReference:C,pixelSize:new n.A({x:g.pixelSizeX,y:g.pixelSizeY,spatialReference:C}),pixelType:g.pixelType.toLowerCase(),statistics:S,attributeTable:O,colormap:P,histograms:D,keyProperties:N,noDataValue:J,multidimensionalInfo:L,storageInfo:$})}function h(e,t,i){return f(e,{sourceJSON:t},i)}function p(e,t,i){return f(e,{rasterFunction:t},i)}function d(e,t){e.attributeTable||(t.hasRasterAttributeTable=!1),e.histograms||(t.hasHistograms=!1),e.colormap||(t.hasColormap=!1),e.multidimensionalInfo||(t.hasMultidimensions=!1)}},82434:(e,t,i)=>{i.d(t,{A:()=>o});var s=i(90237),r=i(25482),n=i(10107),a=(i(44208),i(53966),i(87811),i(40608));let o=class extends r.A{get affectsPixelSize(){return!1}forwardTransform(e){return e}inverseTransform(e){return e}};(0,s._)([(0,n.MZ)()],o.prototype,"affectsPixelSize",null),(0,s._)([(0,n.MZ)({json:{write:!0}})],o.prototype,"spatialReference",void 0),o=(0,s._)([(0,a.$)("esri.layers.support.rasterTransforms.BaseRasterTransform")],o)}}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6131],{10873:(e,r,t)=>{t.d(r,{C1:()=>T,Fm:()=>f,Ih:()=>g,M6:()=>d,OZ:()=>c,PY:()=>y,Qo:()=>w,Yj:()=>b,fV:()=>m,hG:()=>I,hn:()=>L,id:()=>h,kF:()=>u,ke:()=>S,zQ:()=>M});var i=t(89317),n=t(5443),a=t(16930),s=t(97159),o=t(88625),l=t(43440),p=t(78553);const y={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:{enabled:!0,layerContainerTypes:i.K}}},d={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,r)=>!r.disablePopup},write:{enabled:!0,writer(e,r,t){r[t]=!e}}}},u={type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",write:{enabled:!0,layerContainerTypes:i.K}}},c={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:s.w}}},m={type:Boolean,value:!0,nonNullable:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:{enabled:!0,layerContainerTypes:i.K}}},b={value:null,type:o.A,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:{enabled:!0,layerContainerTypes:i.K}}};function w(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const v={write:{enabled:!0,layerContainerTypes:i.K},read:!0},S={type:Number,json:{origins:{"web-document":v,"portal-item":{write:{layerContainerTypes:i.K}}}}},g={...S,json:{...S.json,origins:{"web-document":{...v,write:{enabled:!0,layerContainerTypes:i.K,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,r,t)=>t&&"service"!==t.origin||!r.drawingInfo||void 0===r.drawingInfo.transparency?r.layerDefinition?.drawingInfo&&void 0!==r.layerDefinition.drawingInfo.transparency?(0,p.D)(r.layerDefinition.drawingInfo.transparency):void 0:(0,p.D)(r.drawingInfo.transparency)}}},f={type:n.A,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,r)=>{const t=n.A.fromJSON(e);return null!=r.spatialReference&&"object"==typeof r.spatialReference&&(t.spatialReference=a.A.fromJSON(r.spatialReference)),t}}}},read:!1}},h={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},L={type:Number,json:{origins:{service:{write:{enabled:!1}}},name:"layerDefinition.minScale",write:{layerContainerTypes:i.K}}},I={type:Number,json:{origins:{service:{write:{enabled:!1}}},name:"layerDefinition.maxScale",write:{layerContainerTypes:i.K}}},T={json:{write:{ignoreOrigin:!0,layerContainerTypes:i.K},origins:{"web-map":{read:!1,write:!1}}}},M={type:l.A,json:{name:"attributeTableInfo",write:!0}}},16131:(e,r,t)=>{t.d(r,{q:()=>f});var i=t(90237),n=t(49186),a=t(84952),s=t(10107),o=t(56507),l=(t(44208),t(87811),t(36005)),p=t(40608),y=t(43937),d=t(89317),u=t(45917),c=t(49422);const m={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WCS:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},b={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WCS:!0,WMS:!0,WebTiledLayer:!0},w={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},v={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,Object3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,ViewshedLayer:!0,Voxel:!0,WCS:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WCS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":m,"web-map/basemap":b,"web-map/tables":w,"link-chart/operational-layers":{...m,LinkChartLayer:!0},"link-chart/basemap":b,"link-chart/tables":w,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0,WCS:!0},"portal-item/tables":{ArcGISFeatureLayer:!0,SubtypeGroupTable:!0}};var S=t(10873),g=t(64272);const f=e=>{let r=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,r,t){return"Group Layer"===t?.portalItem?.type?void 0:e}writeListMode(e,r,t,i){(i&&"ground"===i.layerContainerType||e&&(0,c.R)(this,t,{},i))&&(r[t]=e)}writeOperationalLayerType(e,r,t){e&&(r[t]=e)}writeTitle(e,r){r.title=e??"Layer"}readVisibilityTimeExtent(e){return e?g.T.fromArray(e):null}writeVisibilityTimeExtent(e,r,t,i){e&&"tables"!==i.layerContainerType&&(e.isEmpty?i?.messages&&i.messages.push(new n.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):r[t]=e.toArray())}read(e,r){r&&(r.layer=this),(0,u.t)(this,e,(r=>super.read(e,r)),r)}write(e,r){if(!this.persistenceEnabled&&!r?.ignorePersistenceEnabled)return null;if(r?.origin){const e=`${r.origin}/${r.layerContainerType||"operational-layers"}`,t=v[e];let i=!!t?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(i=!1),!i)return r.messages?.push(new n.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const t=super.write(e,{...r,layer:this}),i=!!r&&!!r.messages&&!!r.messages.filter((e=>e instanceof n.A&&"web-document-write:property-required"===e.name)).length;return(0,a.w8)(t?.url)?(r?.messages?.push(new n.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:t}beforeSave(){}};return(0,i._)([(0,s.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],r.prototype,"id",void 0),(0,i._)([(0,l.w)("id",["id"])],r.prototype,"readId",null),(0,i._)([(0,s.MZ)(S.C1)],r.prototype,"listMode",void 0),(0,i._)([(0,y.K)("listMode")],r.prototype,"writeListMode",null),(0,i._)([(0,s.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:d.K,isRequired:!0}}}}})],r.prototype,"operationalLayerType",void 0),(0,i._)([(0,y.K)("operationalLayerType")],r.prototype,"writeOperationalLayerType",null),(0,i._)([(0,s.MZ)(S.ke)],r.prototype,"opacity",void 0),(0,i._)([(0,s.MZ)({type:Boolean,readOnly:!1})],r.prototype,"persistenceEnabled",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],r.prototype,"title",void 0),(0,i._)([(0,y.K)("title"),(0,y.K)(["web-scene"],"title")],r.prototype,"writeTitle",null),(0,i._)([(0,s.MZ)({type:g.T,json:{origins:{"web-scene":{write:{layerContainerTypes:d.K}}}}})],r.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,l.w)("visibilityTimeExtent")],r.prototype,"readVisibilityTimeExtent",null),(0,i._)([(0,y.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[o.jz,o.Uv]]}})],r.prototype,"writeVisibilityTimeExtent",null),(0,i._)([(0,s.MZ)({type:Boolean,json:{name:"visibility",write:{layerContainerTypes:d.K}}})],r.prototype,"visible",void 0),r=(0,i._)([(0,p.$)("esri.layers.mixins.OperationalLayer")],r),r}},16271:(e,r,t)=>{t.d(r,{Ao:()=>a,KQ:()=>s});var i=t(4576),n=t(31756);function a(e){return 1/(n.j[e]||1)}const s=function(){const e=Object.keys(n.j);return(0,i.TF)(e,"decimal-degrees"),e.sort(),e}()},31756:(e,r,t)=>{t.d(r,{j:()=>a});var i=t(83047),n=t(79258);const a={unknown:1,inches:(0,i.oU)(1,"meters","inches"),feet:(0,i.oU)(1,"meters","feet"),"us-feet":(0,i.oU)(1,"meters","us-feet"),yards:(0,i.oU)(1,"meters","yards"),miles:(0,i.oU)(1,"meters","miles"),"nautical-miles":(0,i.oU)(1,"meters","nautical-miles"),millimeters:(0,i.oU)(1,"meters","millimeters"),centimeters:(0,i.oU)(1,"meters","centimeters"),decimeters:(0,i.oU)(1,"meters","decimeters"),meters:(0,i.oU)(1,"meters","meters"),kilometers:(0,i.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.vl)(1,"meters",n.$O.radius)}},43440:(e,r,t)=>{t.d(r,{A:()=>A});var i=t(90237),n=t(25482),a=t(4718),s=t(10107),o=(t(44208),t(53966),t(40608)),l=t(69540);t(87811);let p=class extends n.A{constructor(e){super(e),this.description=null,this.label=null,this.type=null}};(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],p.prototype,"description",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],p.prototype,"label",void 0),(0,i._)([(0,s.MZ)()],p.prototype,"type",void 0),p=(0,i._)([(0,o.$)("esri.tables.elements.AttributeTableElement")],p);const y=p;let d=class extends(l.A.ClonableMixin(y)){constructor(e){super(e),this.displayType="auto",this.type="attachment"}clone(){return super.clone()}};(0,i._)([(0,s.MZ)({type:["auto"],json:{write:!0}})],d.prototype,"displayType",void 0),(0,i._)([(0,s.MZ)({type:["attachment"],readOnly:!0,json:{read:!1,write:{enabled:!0,isRequired:!0}}})],d.prototype,"type",void 0),d=(0,i._)([(0,o.$)("esri.tables.elements.AttributeTableAttachmentElement")],d);const u=d;let c=class extends(l.A.ClonableMixin(y)){constructor(e){super(e),this.description=null,this.fieldName=null,this.label=null,this.type="field"}clone(){return super.clone()}};(0,i._)([(0,s.MZ)({type:String,json:{read:!1,write:!1}})],c.prototype,"description",void 0),(0,i._)([(0,s.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],c.prototype,"fieldName",void 0),(0,i._)([(0,s.MZ)({type:String,json:{read:!1,write:!1}})],c.prototype,"label",void 0),(0,i._)([(0,s.MZ)({type:["field"],readOnly:!0,json:{read:!1,write:{enabled:!0,isRequired:!0}}})],c.prototype,"type",void 0),c=(0,i._)([(0,o.$)("esri.tables.elements.AttributeTableFieldElement")],c);const m=c;var b=t(56507);let w=class extends(l.A.ClonableMixin(y)){constructor(e){super(e),this.relationshipId=null,this.type="relationship"}clone(){return super.clone()}};(0,i._)([(0,s.MZ)({type:Number,json:{type:b.jz,write:{enabled:!0,isRequired:!0}}})],w.prototype,"relationshipId",void 0),(0,i._)([(0,s.MZ)({type:["relationship"],readOnly:!0,json:{read:!1,write:{enabled:!0,isRequired:!0}}})],w.prototype,"type",void 0),w=(0,i._)([(0,o.$)("esri.tables.elements.AttributeTableRelationshipElement")],w);const v=w,S={base:y,key:"type",typeMap:{attachment:u,field:m,relationship:v}};let g=class extends(l.A.ClonableMixin(y)){constructor(e){super(e),this.elements=null,this.type="group"}clone(){return super.clone()}};(0,i._)([(0,s.MZ)({types:[S],json:{name:"attributeTableElements",write:!0}})],g.prototype,"elements",void 0),(0,i._)([(0,s.MZ)({type:["group"],readOnly:!0,json:{read:!1,write:{enabled:!0,isRequired:!0}}})],g.prototype,"type",void 0),g=(0,i._)([(0,o.$)("esri.tables.elements.AttributeTableGroupElement")],g);const f=g;let h=class extends(l.A.ClonableMixin(n.A)){constructor(e){super(e),this.field=null,this.order=null}};(0,i._)([(0,s.MZ)({type:String,json:{write:!0}})],h.prototype,"field",void 0),(0,i._)([(0,s.MZ)({type:["asc","desc"],json:{write:!0}})],h.prototype,"order",void 0),h=(0,i._)([(0,o.$)("esri.tables.support.FieldOrder")],h);const L=h;var I;const T={typesWithGroup:{base:y,key:"type",typeMap:{attachment:u,field:m,group:f,relationship:v}},typesWithoutGroup:S};let M=I=class extends n.A{constructor(e){super(e),this.elements=null,this.orderByFields=null}clone(){return new I({elements:(0,a.o8)(this.elements),orderByFields:(0,a.o8)(this.orderByFields)})}};(0,i._)([(0,s.MZ)({types:[T.typesWithGroup],json:{name:"attributeTableElements",write:!0}})],M.prototype,"elements",void 0),(0,i._)([(0,s.MZ)({type:[L],json:{write:!0}})],M.prototype,"orderByFields",void 0),M=I=(0,i._)([(0,o.$)("esri.tables.AttributeTableTemplate")],M);const A=M},88625:(e,r,t)=>{t.d(r,{A:()=>g});var i,n=t(90237),a=t(66552),s=t(25482),o=t(97768),l=t(10107),p=(t(44208),t(53966),t(87811),t(36005)),y=t(40608),d=t(43937),u=t(30524);let c=i=class extends s.A{constructor(e){super(e)}async collectRequiredFields(e,r){return(0,u.Dx)(e,r,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,n._)([(0,l.MZ)({type:String,json:{write:{isRequired:!0}}})],c.prototype,"expression",void 0),(0,n._)([(0,l.MZ)({type:String,json:{write:!0}})],c.prototype,"title",void 0),c=i=(0,n._)([(0,y.$)("esri.symbols.support.FeatureExpressionInfo")],c);const m=c;var b,w=t(16271);const v=(0,a.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),S=new a.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let g=class extends s.A{static{b=this}constructor(e){super(e),this.featureExpressionInfo=void 0,this.offset=null}readFeatureExpressionInfo(e,r){return null!=e?e.expression?e:void 0:r.featureExpression&&0===r.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,r,t,i){r[t]=e.write({},i),"0"===e.expression&&(r.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:r}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||r?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,r){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,r):null}clone(){return new b({mode:this.mode,offset:this.offset,featureExpressionInfo:this.featureExpressionInfo?this.featureExpressionInfo.clone():void 0,unit:this.unit})}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,o.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,n._)([(0,l.MZ)({type:m,json:{write:!0}})],g.prototype,"featureExpressionInfo",void 0),(0,n._)([(0,p.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],g.prototype,"readFeatureExpressionInfo",null),(0,n._)([(0,d.K)("featureExpressionInfo",{featureExpressionInfo:{type:m},"featureExpression.value":{type:[0]}})],g.prototype,"writeFeatureExpressionInfo",null),(0,n._)([(0,l.MZ)({type:v.apiValues,nonNullable:!0,json:{type:v.jsonValues,read:v.read,write:{writer:v.write,isRequired:!0}}})],g.prototype,"mode",null),(0,n._)([(0,l.MZ)({type:Number,json:{write:!0}})],g.prototype,"offset",void 0),(0,n._)([(0,l.MZ)({type:w.KQ,json:{type:String,read:S.read,write:S.write}})],g.prototype,"unit",null),g=b=(0,n._)([(0,y.$)("esri.symbols.support.ElevationInfo")],g)},89317:(e,r,t)=>{t.d(r,{K:()=>i});const i=["operational-layers","basemap","ground"]}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6131],{10873:(e,r,t)=>{t.d(r,{C1:()=>T,Fm:()=>h,Ih:()=>g,M6:()=>d,OZ:()=>c,PY:()=>y,Qo:()=>w,Yj:()=>b,fV:()=>m,hG:()=>I,hn:()=>L,id:()=>f,kF:()=>u,ke:()=>S,zQ:()=>M});var i=t(89317),n=t(5443),a=t(16930),o=t(97159),s=t(88625),l=t(43440),p=t(78553);const y={type:Boolean,value:!0,json:{origins:{service:{read:!1,write:!1},"web-map":{read:!1,write:!1}},name:"screenSizePerspective",write:{enabled:!0,layerContainerTypes:i.K}}},d={type:Boolean,value:!0,json:{name:"disablePopup",read:{reader:(e,r)=>!r.disablePopup},write:{enabled:!0,writer(e,r,t){r[t]=!e}}}},u={type:Boolean,value:!0,nonNullable:!0,json:{name:"showLabels",write:{enabled:!0,layerContainerTypes:i.K}}},c={type:String,json:{origins:{"portal-item":{write:!1}},write:{isRequired:!0,ignoreOrigin:!0,writer:o.w}}},m={type:Boolean,value:!0,nonNullable:!0,json:{origins:{service:{read:{enabled:!1}}},name:"showLegend",write:{enabled:!0,layerContainerTypes:i.K}}},b={value:null,type:s.A,json:{origins:{service:{name:"elevationInfo",write:!0}},name:"layerDefinition.elevationInfo",write:{enabled:!0,layerContainerTypes:i.K}}};function w(e){return{type:e,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}}}const v={write:{enabled:!0,layerContainerTypes:i.K},read:!0},S={type:Number,json:{origins:{"web-document":v,"portal-item":{write:{layerContainerTypes:i.K}}}}},g={...S,json:{...S.json,origins:{"web-document":{...v,write:{enabled:!0,layerContainerTypes:i.K,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}}}},read:{source:["layerDefinition.drawingInfo.transparency","drawingInfo.transparency"],reader:(e,r,t)=>t&&"service"!==t.origin||!r.drawingInfo||void 0===r.drawingInfo.transparency?r.layerDefinition?.drawingInfo&&void 0!==r.layerDefinition.drawingInfo.transparency?(0,p.D)(r.layerDefinition.drawingInfo.transparency):void 0:(0,p.D)(r.drawingInfo.transparency)}}},h={type:n.A,readOnly:!0,json:{origins:{service:{read:{source:["fullExtent","spatialReference"],reader:(e,r)=>{const t=n.A.fromJSON(e);return null!=r.spatialReference&&"object"==typeof r.spatialReference&&(t.spatialReference=a.A.fromJSON(r.spatialReference)),t}}}},read:!1}},f={type:String,json:{origins:{service:{read:!1},"portal-item":{read:!1}}}},L={type:Number,json:{origins:{service:{write:{enabled:!1}}},name:"layerDefinition.minScale",write:{layerContainerTypes:i.K}}},I={type:Number,json:{origins:{service:{write:{enabled:!1}}},name:"layerDefinition.maxScale",write:{layerContainerTypes:i.K}}},T={json:{write:{ignoreOrigin:!0,layerContainerTypes:i.K},origins:{"web-map":{read:!1,write:!1}}}},M={type:l.A,json:{name:"attributeTableInfo",write:!0}}},16131:(e,r,t)=>{t.d(r,{q:()=>h});var i=t(90237),n=t(49186),a=t(84952),o=t(10107),s=t(56507),l=(t(44208),t(87811),t(36005)),p=t(40608),y=t(43937),d=t(89317),u=t(45917),c=t(49422);const m={ArcGISAnnotationLayer:!0,ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GeoRSS:!0,GroupLayer:!0,KML:!0,KnowledgeGraphLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,SubtypeGroupLayer:!0,VectorTileLayer:!0,WCS:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},b={ArcGISImageServiceLayer:!0,ArcGISImageServiceVectorLayer:!0,ArcGISMapServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BingMapsAerial:!0,BingMapsHybrid:!0,BingMapsRoad:!0,OpenStreetMap:!0,VectorTileLayer:!0,WCS:!0,WMS:!0,WebTiledLayer:!0},w={ArcGISFeatureLayer:!0,SubtypeGroupTable:!0},v={"web-scene/operational-layers":{ArcGISDimensionLayer:!0,ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledElevationServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,BuildingSceneLayer:!0,CatalogLayer:!0,CSV:!0,GeoJSON:!0,GroupLayer:!0,IntegratedMesh3DTilesLayer:!0,Object3DTilesLayer:!0,IntegratedMeshLayer:!0,KML:!0,LineOfSightLayer:!0,MediaLayer:!0,OGCFeatureLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,RasterDataLayer:!0,VectorTileLayer:!0,ViewshedLayer:!0,Voxel:!0,WCS:!0,WFS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/basemap":{ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISTiledImageServiceLayer:!0,ArcGISTiledMapServiceLayer:!0,OpenStreetMap:!0,VectorTileLayer:!0,WCS:!0,WMS:!0,WebTiledLayer:!0},"web-scene/ground":{ArcGISTiledElevationServiceLayer:!0,RasterDataElevationLayer:!0},"web-scene/tables":{ArcGISFeatureLayer:!0},"web-map/operational-layers":m,"web-map/basemap":b,"web-map/tables":w,"link-chart/operational-layers":{...m,LinkChartLayer:!0},"link-chart/basemap":b,"link-chart/tables":w,"portal-item/operational-layers":{ArcGISFeatureLayer:!0,ArcGISImageServiceLayer:!0,ArcGISMapServiceLayer:!0,ArcGISSceneServiceLayer:!0,ArcGISStreamLayer:!0,ArcGISTiledImageServiceLayer:!0,BuildingSceneLayer:!0,IntegratedMesh3DTilesLayer:!0,IntegratedMeshLayer:!0,MediaLayer:!0,OrientedImageryLayer:!0,PointCloudLayer:!0,SubtypeGroupLayer:!0,WCS:!0},"portal-item/tables":{ArcGISFeatureLayer:!0,SubtypeGroupTable:!0}};var S=t(10873),g=t(64272);const h=e=>{let r=class extends e{constructor(){super(...arguments),this.persistenceEnabled=!0,this.title=null}readId(e,r,t){return"Group Layer"===t?.portalItem?.type?void 0:e}writeListMode(e,r,t,i){(i&&"ground"===i.layerContainerType||e&&(0,c.R)(this,t,{},i))&&(r[t]=e)}writeOperationalLayerType(e,r,t){e&&(r[t]=e)}writeTitle(e,r){r.title=e??"Layer"}readVisibilityTimeExtent(e){return e?g.T.fromArray(e):null}writeVisibilityTimeExtent(e,r,t,i){e&&"tables"!==i.layerContainerType&&(e.isEmpty?i?.messages&&i.messages.push(new n.A("layer:invalid-visibilityTimeExtent","visibilityTimeExtent cannot be empty")):r[t]=e.toArray())}read(e,r){r&&(r.layer=this),(0,u.t)(this,e,(r=>super.read(e,r)),r)}write(e,r){if(!this.persistenceEnabled&&!r?.ignorePersistenceEnabled)return null;if(r?.origin){const e=`${r.origin}/${r.layerContainerType||"operational-layers"}`,t=v[e];let i=!!t?.[this.operationalLayerType];if("ArcGISTiledElevationServiceLayer"===this.operationalLayerType&&"web-scene/operational-layers"===e&&(i=!1),"ArcGISDimensionLayer"===this.operationalLayerType&&"web-map/operational-layers"===e&&(i=!1),!i)return r.messages?.push(new n.A("layer:unsupported",`Layers (${this.title}, ${this.id}) of type '${this.declaredClass}' are not supported in the context of '${e}'`,{layer:this})),null}const t=super.write(e,{...r,layer:this}),i=!!r&&!!r.messages&&!!r.messages.filter((e=>e instanceof n.A&&"web-document-write:property-required"===e.name)).length;return(0,a.w8)(t?.url)?(r?.messages?.push(new n.A("layer:invalid-url",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' using a Blob URL cannot be written to web scenes and web maps`,{layer:this})),null):!this.url&&i?null:t}beforeSave(){}};return(0,i._)([(0,o.MZ)({type:String,json:{write:{ignoreOrigin:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0}},"portal-item":{write:!1}}}})],r.prototype,"id",void 0),(0,i._)([(0,l.w)("id",["id"])],r.prototype,"readId",null),(0,i._)([(0,o.MZ)(S.C1)],r.prototype,"listMode",void 0),(0,i._)([(0,y.K)("listMode")],r.prototype,"writeListMode",null),(0,i._)([(0,o.MZ)({type:String,readOnly:!0,json:{read:!1,write:{target:"layerType",ignoreOrigin:!0},origins:{"portal-item":{write:!1},"web-scene":{name:"layerType",read:!1,write:{enabled:!0,ignoreOrigin:!0,layerContainerTypes:d.K,isRequired:!0}}}}})],r.prototype,"operationalLayerType",void 0),(0,i._)([(0,y.K)("operationalLayerType")],r.prototype,"writeOperationalLayerType",null),(0,i._)([(0,o.MZ)(S.ke)],r.prototype,"opacity",void 0),(0,i._)([(0,o.MZ)({type:Boolean,readOnly:!1})],r.prototype,"persistenceEnabled",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:{ignoreOrigin:!0,writerEnsuresNonNull:!0},origins:{"web-scene":{write:{isRequired:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}},"portal-item":{write:!1}}},value:"Layer"})],r.prototype,"title",void 0),(0,i._)([(0,y.K)("title"),(0,y.K)(["web-scene"],"title")],r.prototype,"writeTitle",null),(0,i._)([(0,o.MZ)({type:g.T,json:{origins:{"web-scene":{write:{layerContainerTypes:d.K}}}}})],r.prototype,"visibilityTimeExtent",void 0),(0,i._)([(0,l.w)("visibilityTimeExtent")],r.prototype,"readVisibilityTimeExtent",null),(0,i._)([(0,y.K)(["portal-item","web-map","web-scene"],"visibilityTimeExtent",{visibilityTimeExtent:{type:[[s.jz,s.Uv]]}})],r.prototype,"writeVisibilityTimeExtent",null),(0,i._)([(0,o.MZ)({type:Boolean,json:{name:"visibility",write:{layerContainerTypes:d.K}}})],r.prototype,"visible",void 0),r=(0,i._)([(0,p.$)("esri.layers.mixins.OperationalLayer")],r),r}},16271:(e,r,t)=>{t.d(r,{Ao:()=>a,KQ:()=>o});var i=t(4576),n=t(31756);function a(e){return 1/(n.j[e]||1)}const o=function(){const e=Object.keys(n.j);return(0,i.TF)(e,"decimal-degrees"),e.sort(),e}()},31756:(e,r,t)=>{t.d(r,{j:()=>a});var i=t(83047),n=t(79258);const a={unknown:1,inches:(0,i.oU)(1,"meters","inches"),feet:(0,i.oU)(1,"meters","feet"),"us-feet":(0,i.oU)(1,"meters","us-feet"),yards:(0,i.oU)(1,"meters","yards"),miles:(0,i.oU)(1,"meters","miles"),"nautical-miles":(0,i.oU)(1,"meters","nautical-miles"),millimeters:(0,i.oU)(1,"meters","millimeters"),centimeters:(0,i.oU)(1,"meters","centimeters"),decimeters:(0,i.oU)(1,"meters","decimeters"),meters:(0,i.oU)(1,"meters","meters"),kilometers:(0,i.oU)(1,"meters","kilometers"),"decimal-degrees":1/(0,i.vl)(1,"meters",n.$O.radius)}},43440:(e,r,t)=>{t.d(r,{A:()=>A});var i=t(90237),n=t(25482),a=t(4718),o=t(10107),s=(t(44208),t(53966),t(40608)),l=t(69540);t(87811);let p=class extends n.A{constructor(e){super(e),this.description=null,this.label=null,this.type=null}};(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],p.prototype,"description",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],p.prototype,"label",void 0),(0,i._)([(0,o.MZ)()],p.prototype,"type",void 0),p=(0,i._)([(0,s.$)("esri.tables.elements.AttributeTableElement")],p);const y=p;let d=class extends(l.A.ClonableMixin(y)){constructor(e){super(e),this.displayType="auto",this.type="attachment"}clone(){return super.clone()}};(0,i._)([(0,o.MZ)({type:["auto"],json:{write:!0}})],d.prototype,"displayType",void 0),(0,i._)([(0,o.MZ)({type:["attachment"],readOnly:!0,json:{read:!1,write:{enabled:!0,isRequired:!0}}})],d.prototype,"type",void 0),d=(0,i._)([(0,s.$)("esri.tables.elements.AttributeTableAttachmentElement")],d);const u=d;let c=class extends(l.A.ClonableMixin(y)){constructor(e){super(e),this.description=null,this.fieldName=null,this.label=null,this.type="field"}clone(){return super.clone()}};(0,i._)([(0,o.MZ)({type:String,json:{read:!1,write:!1}})],c.prototype,"description",void 0),(0,i._)([(0,o.MZ)({type:String,json:{write:{enabled:!0,isRequired:!0}}})],c.prototype,"fieldName",void 0),(0,i._)([(0,o.MZ)({type:String,json:{read:!1,write:!1}})],c.prototype,"label",void 0),(0,i._)([(0,o.MZ)({type:["field"],readOnly:!0,json:{read:!1,write:{enabled:!0,isRequired:!0}}})],c.prototype,"type",void 0),c=(0,i._)([(0,s.$)("esri.tables.elements.AttributeTableFieldElement")],c);const m=c;var b=t(56507);let w=class extends(l.A.ClonableMixin(y)){constructor(e){super(e),this.relationshipId=null,this.type="relationship"}clone(){return super.clone()}};(0,i._)([(0,o.MZ)({type:Number,json:{type:b.jz,write:{enabled:!0,isRequired:!0}}})],w.prototype,"relationshipId",void 0),(0,i._)([(0,o.MZ)({type:["relationship"],readOnly:!0,json:{read:!1,write:{enabled:!0,isRequired:!0}}})],w.prototype,"type",void 0),w=(0,i._)([(0,s.$)("esri.tables.elements.AttributeTableRelationshipElement")],w);const v=w,S={base:y,key:"type",typeMap:{attachment:u,field:m,relationship:v}};let g=class extends(l.A.ClonableMixin(y)){constructor(e){super(e),this.elements=null,this.type="group"}clone(){return super.clone()}};(0,i._)([(0,o.MZ)({types:[S],json:{name:"attributeTableElements",write:!0}})],g.prototype,"elements",void 0),(0,i._)([(0,o.MZ)({type:["group"],readOnly:!0,json:{read:!1,write:{enabled:!0,isRequired:!0}}})],g.prototype,"type",void 0),g=(0,i._)([(0,s.$)("esri.tables.elements.AttributeTableGroupElement")],g);const h=g;let f=class extends(l.A.ClonableMixin(n.A)){constructor(e){super(e),this.field=null,this.order=null}};(0,i._)([(0,o.MZ)({type:String,json:{write:!0}})],f.prototype,"field",void 0),(0,i._)([(0,o.MZ)({type:["asc","desc"],json:{write:!0}})],f.prototype,"order",void 0),f=(0,i._)([(0,s.$)("esri.tables.support.FieldOrder")],f);const L=f;var I;const T={typesWithGroup:{base:y,key:"type",typeMap:{attachment:u,field:m,group:h,relationship:v}},typesWithoutGroup:S};let M=I=class extends n.A{constructor(e){super(e),this.elements=null,this.orderByFields=null}clone(){return new I({elements:(0,a.o8)(this.elements),orderByFields:(0,a.o8)(this.orderByFields)})}};(0,i._)([(0,o.MZ)({types:[T.typesWithGroup],json:{name:"attributeTableElements",write:!0}})],M.prototype,"elements",void 0),(0,i._)([(0,o.MZ)({type:[L],json:{write:!0}})],M.prototype,"orderByFields",void 0),M=I=(0,i._)([(0,s.$)("esri.tables.AttributeTableTemplate")],M);const A=M},88625:(e,r,t)=>{t.d(r,{A:()=>g});var i,n=t(90237),a=t(69540),o=t(66552),s=t(25482),l=t(97768),p=t(10107),y=(t(44208),t(53966),t(87811),t(36005)),d=t(40608),u=t(43937),c=t(30524);let m=i=class extends s.A{constructor(e){super(e),this.expression=void 0,this.title=void 0}async collectRequiredFields(e,r){return(0,c.Dx)(e,r,this.expression)}clone(){return new i({expression:this.expression,title:this.title})}equals(e){return this.expression===e.expression&&this.title===e.title}};(0,n._)([(0,p.MZ)({type:String,json:{write:{isRequired:!0}}})],m.prototype,"expression",void 0),(0,n._)([(0,p.MZ)({type:String,json:{write:!0}})],m.prototype,"title",void 0),m=i=(0,n._)([(0,d.$)("esri.symbols.support.FeatureExpressionInfo")],m);const b=m;var w=t(16271);const v=(0,o.O)()({onTheGround:"on-the-ground",relativeToGround:"relative-to-ground",relativeToScene:"relative-to-scene",absoluteHeight:"absolute-height"}),S=new o.J({foot:"feet",kilometer:"kilometers",meter:"meters",mile:"miles","us-foot":"us-feet",yard:"yards"});let g=class extends(a.A.ClonableMixin(s.A)){constructor(e){super(e),this.featureExpressionInfo=void 0,this.offset=null}readFeatureExpressionInfo(e,r){return null!=e?e.expression?e:void 0:r.featureExpression&&0===r.featureExpression.value?{expression:"0"}:void 0}writeFeatureExpressionInfo(e,r,t,i){r[t]=e.write({},i),"0"===e.expression&&(r.featureExpression={value:0})}get mode(){const{offset:e,featureExpressionInfo:r}=this;return this._isOverridden("mode")?this._get("mode"):null!=e||r?"relative-to-ground":"on-the-ground"}set mode(e){this._override("mode",e)}set unit(e){this._set("unit",e)}write(e,r){return this.offset||this.mode||this.featureExpressionInfo||this.unit?super.write(e,r):null}equals(e){return this.mode===e.mode&&this.offset===e.offset&&this.unit===e.unit&&(0,l.CM)(this.featureExpressionInfo,e.featureExpressionInfo)}};(0,n._)([(0,p.MZ)({type:b,json:{write:!0}})],g.prototype,"featureExpressionInfo",void 0),(0,n._)([(0,y.w)("featureExpressionInfo",["featureExpressionInfo","featureExpression"])],g.prototype,"readFeatureExpressionInfo",null),(0,n._)([(0,u.K)("featureExpressionInfo",{featureExpressionInfo:{type:b},"featureExpression.value":{type:[0]}})],g.prototype,"writeFeatureExpressionInfo",null),(0,n._)([(0,p.MZ)({type:v.apiValues,nonNullable:!0,json:{type:v.jsonValues,read:v.read,write:{writer:v.write,isRequired:!0}}})],g.prototype,"mode",null),(0,n._)([(0,p.MZ)({type:Number,json:{write:!0}})],g.prototype,"offset",void 0),(0,n._)([(0,p.MZ)({type:w.KQ,json:{type:String,read:S.read,write:S.write}})],g.prototype,"unit",null),g=(0,n._)([(0,d.$)("esri.symbols.support.ElevationInfo")],g)},89317:(e,r,t)=>{t.d(r,{K:()=>i});const i=["operational-layers","basemap","ground"]}}]);
|
package/config.js
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
3
|
See https://js.arcgis.com/4.34/esri/copyright.txt for details.
|
|
4
4
|
*/
|
|
5
|
-
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="4.34.0-next.
|
|
5
|
+
import"./core/has.js";import{deepMerge as e}from"./core/object.js";const s={apiKey:void 0,apiKeys:{scopes:[]},applicationName:"",applicationUrl:globalThis.location?.href,assetsPath:"",fontsUrl:"https://static.arcgis.com/fonts",geometryServiceUrl:"https://utility.arcgisonline.com/arcgis/rest/services/Geometry/GeometryServer",geoRSSServiceUrl:"https://utility.arcgis.com/sharing/rss",kmlServiceUrl:"https://utility.arcgis.com/sharing/kml",userPrivilegesApplied:!0,portalUrl:"https://www.arcgis.com",respectPrefersReducedMotion:!0,routeServiceUrl:"https://route-api.arcgis.com/arcgis/rest/services/World/Route/NAServer/Route_World",workers:{loaderConfig:{has:{},paths:{},map:{},packages:[]}},request:{crossOriginNoCorsDomains:null,httpsDomains:["arcgis.com","arcgisonline.com","esrikr.com","premiumservices.blackbridge.com","esripremium.accuweather.com","gbm.digitalglobe.com","firstlook.digitalglobe.com","msi.digitalglobe.com"],interceptors:[],internalInterceptors:[],maxUrlLength:2e3,priority:"high",proxyRules:[],proxyUrl:null,timeout:62e3,trustedServers:[],useIdentity:!0},log:{interceptors:[],level:null}};if(globalThis.esriConfig&&(e(s,globalThis.esriConfig,!0),delete s.has),!s.assetsPath){{const e="4.34.0-next.7";s.assetsPath=`https://cdn.jsdelivr.net/npm/@arcgis/core@${e}/assets`}s.defaultAssetsPath=s.assetsPath}export{s as default};
|