You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
323 lines
162 KiB
323 lines
162 KiB
// All material copyright Esri, All Rights Reserved, unless otherwise specified. |
|
// See https://js.arcgis.com/4.30/esri/copyright.txt for details. |
|
//>>built |
|
require({cache:{"esri/layers/mixins/ArcGISCachedService":function(){define("exports ../../chunks/tslib.es6 ../../geometry ../../core/accessorSupport/decorators/property ../../core/has ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/reader ../../core/accessorSupport/decorators/subclass ../support/TileInfo ../support/TileInfoTilemapCache ../support/TilemapCache ../../geometry/SpatialReference".split(" "),function(b,a,q,e,k,g,h,n,c,f,l,x,B){b.ArcGISCachedService=u=>{u=class extends u{constructor(){super(...arguments); |
|
this.copyright=null;this.maxScale=this.minScale=0;this.tilemapCache=this.tileInfo=this.spatialReference=null}destroy(){this.tilemapCache?.destroy?.()}readMinScale(p,v){return null!=v.minLOD&&null!=v.maxLOD?p:0}readMaxScale(p,v){return null!=v.minLOD&&null!=v.maxLOD?p:0}get supportsBlankTile(){return 10.2<=this.version}readTilemapCache(p,v,E){p=v.capabilities?.includes("Tilemap");let {minLOD:H,maxLOD:G,minScale:z,maxScale:D}=v;if(null==H&&null==G&&0!==z&&0!==D){z=z?Math.round(1E4*z)/1E4:Math.round(1E4* |
|
v.tileInfo.lods[0].scale)/1E4;D=D?Math.round(1E4*D)/1E4:Math.round(1E4*v.tileInfo.lods[v.tileInfo.lods.length-1].scale)/1E4;for(var A of v.tileInfo.lods){const K=Math.round(1E4*A.scale)/1E4;H=K>=z?A.level:H;G=K>=D?A.level:G}}return p?new x.TilemapCache({layer:this,minLOD:H,maxLOD:G}):v.tileInfo?(A=new f,A.read(v.tileInfo,E),new l(A,H,G)):null}};a.__decorate([e.property({json:{read:{source:"copyrightText"}}})],u.prototype,"copyright",void 0);a.__decorate([e.property()],u.prototype,"minScale",void 0); |
|
a.__decorate([n.reader("service","minScale")],u.prototype,"readMinScale",null);a.__decorate([e.property()],u.prototype,"maxScale",void 0);a.__decorate([n.reader("service","maxScale")],u.prototype,"readMaxScale",null);a.__decorate([e.property({type:B})],u.prototype,"spatialReference",void 0);a.__decorate([e.property({readOnly:!0})],u.prototype,"supportsBlankTile",null);a.__decorate([e.property({type:f})],u.prototype,"tileInfo",void 0);a.__decorate([e.property()],u.prototype,"tilemapCache",void 0); |
|
a.__decorate([n.reader("service","tilemapCache",["capabilities","tileInfo"])],u.prototype,"readTilemapCache",null);a.__decorate([e.property()],u.prototype,"version",void 0);return u=a.__decorate([c.subclass("esri.layers.mixins.ArcGISCachedService")],u)};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/layers/support/TileInfo":function(){define("../../chunks/tslib.es6 ../../core/jsonMap ../../core/JSONSupport ../../core/unitUtils ../../core/accessorSupport/decorators/property ../../core/accessorSupport/ensureType ../../core/RandomLCG ../../core/has ../../core/accessorSupport/decorators/reader ../../core/accessorSupport/decorators/subclass ../../core/accessorSupport/decorators/writer ../../geometry/Point ../../geometry/SpatialReference ../../geometry/support/aaBoundingRect ../../geometry/support/spatialReferenceUtils ../../geometry/support/webMercatorUtils ./LOD ./TileKey".split(" "), |
|
function(b,a,q,e,k,g,h,n,c,f,l,x,B,u,p,v,E,H){var G;a=new a.JSONMap({PNG:"png",PNG8:"png8",PNG24:"png24",PNG32:"png32",JPEG:"jpg",JPG:"jpg",DIB:"dib",TIFF:"tiff",EMF:"emf",PS:"ps",PDF:"pdf",GIF:"gif",SVG:"svg",SVGZ:"svgz",Mixed:"mixed",MIXED:"mixed",LERC:"lerc",LERC2D:"lerc2d",RAW:"raw",pbf:"pbf"});q=G=class extends q.JSONSupport{static create(z={}){const {resolutionFactor:D=1,scales:A,size:K=256,spatialReference:r=B.WebMercator,numLODs:y=24}=z;if(!p.isValid(r)){z=[];if(A)for(var w=0;w<A.length;w++){var F= |
|
A[w];z.push(new E({level:w,scale:F,resolution:F}))}else for(w=5E-4,F=y-1;0<=F;F--)z.unshift(new E({level:F,scale:w,resolution:w})),w*=2;return new G({dpi:96,lods:z,origin:new x(0,0,r),size:[K,K],spatialReference:r})}w=p.getInfo(r);z=z.origin?new x({x:z.origin.x,y:z.origin.y,spatialReference:r}):w?new x({x:w.origin[0],y:w.origin[1],spatialReference:r}):new x({x:0,y:0,spatialReference:r});w=1/(39.37*e.getMetersPerUnitForSR(r)*96);F=[];if(A)for(var I=0;I<A.length;I++){var M=A[I];F.push(new E({level:I, |
|
scale:M,resolution:M*w}))}else{var O=p.isGeographic(r)?512/K*5.916575275917094E8:256/K*5.91657527591555E8;I=Math.ceil(y/D);F.push(new E({level:0,scale:O,resolution:O*w}));for(M=1;M<I;M++)O/=2**D,F.push(new E({level:M,scale:O,resolution:O*w}))}return new G({dpi:96,lods:F,origin:z,size:[K,K],spatialReference:r})}constructor(z){super(z);this.dpi=96;this.spatialReference=this.size=this.origin=this.format=null}get isWrappable(){const {spatialReference:z,origin:D}=this;if(z&&D){const A=p.getInfo(z);return z.isWrappable&& |
|
!!A&&Math.abs(A.origin[0]-D.x)<=A.dx}return!1}readOrigin(z,D){return x.fromJSON({spatialReference:D.spatialReference,...z})}set lods(z){const D=[],A=this._levelToLOD={};z&&z.forEach(K=>{D.push(K.scale);A[K.level]=K});this._set("scales",D);this._set("lods",z);this._initializeUpsampleLevels()}readSize(z,D){return[D.cols,D.rows]}writeSize(z,D){D.cols=z[0];D.rows=z[1]}zoomToScale(z){const D=this.scales;if(0>=z)return D[0];if(z>=D.length-1)return D[D.length-1];const A=Math.floor(z);return D[A]/(D[A]/D[A+ |
|
1])**(z-A)}scaleToZoom(z){const D=this.scales,A=D.length-1;let K=0;for(;K<A;K++){const r=D[K],y=D[K+1];if(r<=z)break;if(y===z)return K+1;if(r>z&&y<z)return K+Math.log(r/z)/Math.log(r/y)}return K}tileAt(z,D,A,K){var r=this.lodAt(z);if(!r)return null;let y;if("number"===typeof D)y=D,D=A;else{if(p.equals(D.spatialReference,this.spatialReference))y=D.x,D=D.y;else{K=v.project(D,this.spatialReference);if(null==K)return null;y=K.x;D=K.y}K=A}A=r.resolution*this.size[0];r=r.resolution*this.size[1];K||=new H.TileKey(null, |
|
0,0,0,u.create());K.level=z;K.row=Math.floor((this.origin.y-D)/r+.001);K.col=Math.floor((y-this.origin.x)/A+.001);this.updateTileInfo(K);return K}updateTileInfo(z,D=G.ExtrapolateOptions.NONE){var A=this.lodAt(z.level);A||D!==G.ExtrapolateOptions.POWER_OF_TWO||(D=this.lods[this.lods.length-1],D.level<z.level&&(A=D));if(A){var K=z.level-A.level;D=A.resolution*this.size[0]/2**K;A=A.resolution*this.size[1]/2**K;z.id=`${z.level}/${z.row}/${z.col}`;z.extent||(z.extent=u.create());z.extent[0]=this.origin.x+ |
|
z.col*D;z.extent[1]=this.origin.y-(z.row+1)*A;z.extent[2]=z.extent[0]+D;z.extent[3]=z.extent[1]+A}}upsampleTile(z){const D=this._upsampleLevels[z.level];if(!D||-1===D.parentLevel)return!1;z.level=D.parentLevel;z.row=Math.floor(z.row/D.factor+.001);z.col=Math.floor(z.col/D.factor+.001);this.updateTileInfo(z);return!0}getTileBounds(z,D){var A=this.lodAt(D.level);if(null==A)return null;var {resolution:K}=A;A=K*this.size[0];K*=this.size[1];z[0]=this.origin.x+D.col*A;z[1]=this.origin.y-(D.row+1)*K;z[2]= |
|
z[0]+A;z[3]=z[1]+K;return z}lodAt(z){return this._levelToLOD?.[z]??null}clone(){return G.fromJSON(this.write({}))}getCompatibleForVTL(z){if(this.size[0]!==this.size[1]||256===this.size[0]&&512===z)return null;const D=(512===this.size[0]&&256===z?-1:0)+(this.spatialReference.isGeographic?1:0);if(this.size[0]===z&&0===D)return this;const A=[],K=this.lods.length-D;for(let r=0;r<K;r++){const y=r+D,{scale:w,resolution:F}=0<=y?this.lods[y]:{scale:2*this.lods[0].scale,resolution:2*this.lods[0].resolution}; |
|
A.push(new E({level:r,scale:w,resolution:F}))}return new G({size:[z,z],dpi:this.dpi,format:this.format,compressionQuality:this.compressionQuality,origin:this.origin,spatialReference:this.spatialReference,lods:A})}_initializeUpsampleLevels(){const z=this.lods;this._upsampleLevels=[];let D=null;for(let A=0;A<z.length;A++){const K=z[A];this._upsampleLevels[K.level]={parentLevel:D?D.level:-1,factor:D?D.resolution/K.resolution:0};D=K}}};b.__decorate([k.property({type:Number,json:{write:!0}})],q.prototype, |
|
"compressionQuality",void 0);b.__decorate([k.property({type:Number,json:{write:!0}})],q.prototype,"dpi",void 0);b.__decorate([k.property({type:String,json:{read:a.read,write:a.write,origins:{"web-scene":{read:!1,write:!1}}}})],q.prototype,"format",void 0);b.__decorate([k.property({readOnly:!0})],q.prototype,"isWrappable",null);b.__decorate([k.property({type:x,json:{write:!0}})],q.prototype,"origin",void 0);b.__decorate([c.reader("origin")],q.prototype,"readOrigin",null);b.__decorate([k.property({type:[E], |
|
value:null,json:{write:!0}})],q.prototype,"lods",null);b.__decorate([k.property({readOnly:!0})],q.prototype,"scales",void 0);b.__decorate([k.property({cast:z=>Array.isArray(z)?z:"number"===typeof z?[z,z]:[256,256]})],q.prototype,"size",void 0);b.__decorate([c.reader("size",["rows","cols"])],q.prototype,"readSize",null);b.__decorate([l.writer("size",{cols:{type:g.Integer},rows:{type:g.Integer}})],q.prototype,"writeSize",null);b.__decorate([k.property({type:B,json:{write:!0}})],q.prototype,"spatialReference", |
|
void 0);q=G=b.__decorate([f.subclass("esri.layers.support.TileInfo")],q);(function(z){z=z.ExtrapolateOptions||(z.ExtrapolateOptions={});z[z.NONE=0]="NONE";z[z.POWER_OF_TWO=1]="POWER_OF_TWO"})(q||={});return q})},"esri/layers/support/LOD":function(){define("../../chunks/tslib.es6 ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/accessorSupport/ensureType ../../core/RandomLCG ../../core/has ../../core/accessorSupport/decorators/subclass".split(" "),function(b,a,q,e,k, |
|
g,h){var n;a=n=class extends a.JSONSupport{constructor(c){super(c);this.cols=null;this.level=0;this.origin=this.levelValue=null;this.resolution=0;this.rows=null;this.scale=0}clone(){return new n({cols:this.cols,level:this.level,levelValue:this.levelValue,resolution:this.resolution,rows:this.rows,scale:this.scale})}};b.__decorate([q.property({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"cols",void 0);b.__decorate([q.property({type:e.Integer, |
|
json:{write:!0}})],a.prototype,"level",void 0);b.__decorate([q.property({type:String,json:{write:!0}})],a.prototype,"levelValue",void 0);b.__decorate([q.property({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype,"origin",void 0);b.__decorate([q.property({type:Number,json:{write:!0}})],a.prototype,"resolution",void 0);b.__decorate([q.property({json:{write:!0,origins:{"web-document":{read:!1,write:!1},"portal-item":{read:!1,write:!1}}}})],a.prototype, |
|
"rows",void 0);b.__decorate([q.property({type:Number,json:{write:!0}})],a.prototype,"scale",void 0);return a=n=b.__decorate([h.subclass("esri.layers.support.LOD")],a)})},"esri/layers/support/TileKey":function(){define(["exports"],function(b){class a{constructor(q,e,k,g,h){this.id=q;this.level=e;this.row=k;this.col=g;this.extent=h}}b.TileKey=a;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/layers/support/TileInfoTilemapCache":function(){define(["../../core/Error","../../core/promiseUtils"], |
|
function(b,a){class q{constructor(e,k=0,g=e.lods[e.lods.length-1].level){this.tileInfo=e;this.minLOD=k;this.maxLOD=g;e.lodAt(k)||(this.minLOD=e.lods[0].level);e.lodAt(g)||(this.maxLOD=e.lods[e.lods.length-1].level)}get effectiveMinLOD(){return this.minLOD??this.tileInfo.lods[0].level}get effectiveMaxLOD(){return this.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}getAvailability(e,k,g){const h=this.tileInfo?.lodAt(e);return!h||e<this.minLOD||e>this.maxLOD?"unavailable":h.cols&&h.rows? |
|
g>=h.cols[0]&&g<=h.cols[1]&&k>=h.rows[0]&&k<=h.rows[1]?"unknown":"unavailable":"unknown"}async fetchAvailability(e,k,g,h){await a.waitTick(h);h=this.getAvailability(e,k,g);if("unavailable"===h)throw new b("tile-map:tile-unavailable","Tile is not available",{level:e,row:k,col:g});return h}async fetchAvailabilityUpsample(e,k,g,h,n){await a.waitTick(n);h.level=e;h.row=k;h.col=g;const c=this.tileInfo;c.updateTileInfo(h);return this.fetchAvailability(e,k,g,n).catch(f=>{if(a.isAbortError(f))throw f;if(c.upsampleTile(h))return this.fetchAvailabilityUpsample(h.level, |
|
h.row,h.col,h,n);throw f;})}}return q})},"esri/layers/support/TilemapCache":function(){define("exports ../../chunks/tslib.es6 ../../request ../../core/Accessor ../../core/ByteSizeUnit ../../core/Error ../../core/handleUtils ../../core/has ../../core/LRUCache ../../core/PooledArray ../../core/promiseUtils ../../core/reactiveUtils ../../core/scheduling ../../core/urlUtils ../../core/accessorSupport/decorators/property ../../core/Logger ../../core/RandomLCG ../../core/accessorSupport/decorators/subclass ./TileKey ./Tilemap".split(" "), |
|
function(b,a,q,e,k,g,h,n,c,f,l,x,B,u,p,v,E,H,G,z){var D;b.TilemapCache=D=class extends e{constructor(A){super(A);this._pendingTilemapRequests={};this.request=q;this.size=32;this._prefetchingEnabled=!0}initialize(){this._tilemapCache=new c.LRUCache(2*k.ByteSizeUnit.MEGABYTES);this.addHandles(x.watch(()=>{const {layer:A}=this;return[A?.parsedUrl,A?.tileServers,A?.apiKey,A?.customParameters]},()=>this._initializeTilemapDefinition(),x.initial))}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(A,K,r){return!this.layer.tileInfo.lodAt(A)||A<this.effectiveMinLOD||A>this.effectiveMaxLOD?"unavailable":(A=this._tilemapFromCache(A,K,r,this._tmpTilemapDefinition))?A.getAvailability(K,r):"unknown"}fetchAvailability(A,K,r,y){return!this.layer.tileInfo.lodAt(A)||A<this.effectiveMinLOD||A>this.effectiveMaxLOD?Promise.reject(new g("tile-map:tile-unavailable","Tile is not available",{level:A,row:K,col:r})):this._fetchTilemap(A, |
|
K,r,y).catch(w=>w).then(w=>{if(w instanceof z.Tilemap){w=w.getAvailability(K,r);if("unavailable"===w)throw new g("tile-map:tile-unavailable","Tile is not available",{level:A,row:K,col:r});return w}if(l.isAbortError(w))throw w;return"unknown"})}fetchAvailabilityUpsample(A,K,r,y,w){y.level=A;y.row=K;y.col=r;const F=this.layer.tileInfo;F.updateTileInfo(y);const I=this.fetchAvailability(A,K,r,w).catch(M=>{if(l.isAbortError(M))throw M;if(F.upsampleTile(y))return this.fetchAvailabilityUpsample(y.level, |
|
y.row,y.col,y,w);throw M;});this._fetchAvailabilityUpsamplePrefetch(y.id,A,K,r,w,I);return I}async _fetchAvailabilityUpsamplePrefetch(A,K,r,y,w,F){if(this._prefetchingEnabled&&null!=A){var I=`prefetch-${A}`;if(!this.hasHandles(I)){var M=new AbortController;F.then(()=>M.abort(),()=>M.abort());var O=!1;F=h.makeHandle(()=>{O||(O=!0,M.abort())});this.addHandles(F,I);await B.waitTicks(10,M.signal).catch(()=>{});O||(O=!0,this.removeHandles(I));if(!l.isAborted(M))for(A=new G.TileKey(A,K,r,y),w={...w,signal:M.signal}, |
|
K=this.layer.tileInfo,r=0;D._prefetches.length<D._maxPrefetch&&K.upsampleTile(A);++r){const Q=this.fetchAvailability(A.level,A.row,A.col,w);D._prefetches.push(Q);y=()=>{D._prefetches.removeUnordered(Q)};Q.then(y,y)}}}}_fetchTilemap(A,K,r,y){if(!this.layer.tileInfo.lodAt(A)||A<this.effectiveMinLOD||A>this.effectiveMaxLOD)return Promise.reject(new g("tilemap-cache:level-unavailable",`Level ${A} is unavailable in the service`));const w=this._tmpTilemapDefinition;if(A=this._tilemapFromCache(A,K,r,w))return Promise.resolve(A); |
|
const F=y?.signal;y={...y,signal:null};return new Promise((I,M)=>{l.onAbort(F,()=>M(l.createAbortError()));const O=z.tilemapDefinitionId(w);let Q=this._pendingTilemapRequests[O];if(!Q){Q=z.Tilemap.fromDefinition(w,y).then(X=>{this._tilemapCache.put(O,X,X.byteSize);return X});const V=()=>{delete this._pendingTilemapRequests[O]};this._pendingTilemapRequests[O]=Q;Q.then(V,V)}Q.then(I,M)})}_initializeTilemapDefinition(){if(this.layer.parsedUrl){var {parsedUrl:A,apiKey:K,customParameters:r}=this.layer; |
|
this._tilemapCache.clear();this._tmpTilemapDefinition={service:{url:A.path,query:u.objectToQuery({...A.query,...r,token:K??A.query?.token}),tileServers:this.layer.tileServers,request:this.request},width:this.size,height:this.size,level:0,row:0,col:0}}}_tilemapFromCache(A,K,r,y){y.level=A;y.row=K-K%this.size;y.col=r-r%this.size;A=z.tilemapDefinitionId(y);return this._tilemapCache.get(A)}get test(){}};b.TilemapCache._maxPrefetch=4;b.TilemapCache._prefetches=new f({initialSize:D._maxPrefetch});a.__decorate([p.property({constructOnly:!0})], |
|
b.TilemapCache.prototype,"layer",void 0);a.__decorate([p.property({constructOnly:!0})],b.TilemapCache.prototype,"minLOD",void 0);a.__decorate([p.property({constructOnly:!0})],b.TilemapCache.prototype,"maxLOD",void 0);a.__decorate([p.property({constructOnly:!0})],b.TilemapCache.prototype,"request",void 0);a.__decorate([p.property({constructOnly:!0})],b.TilemapCache.prototype,"size",void 0);b.TilemapCache=D=a.__decorate([H.subclass("esri.layers.support.TilemapCache")],b.TilemapCache);Object.defineProperty(b, |
|
Symbol.toStringTag,{value:"Module"})})},"esri/core/ByteSizeUnit":function(){define(["exports"],function(b){b.ByteSizeUnit=void 0;var a=b.ByteSizeUnit||(b.ByteSizeUnit={});a[a.KILOBYTES=1024]="KILOBYTES";a[a.MEGABYTES=1048576]="MEGABYTES";a[a.GIGABYTES=1073741824]="GIGABYTES";Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/layers/support/Tilemap":function(){define("exports ../../request ../../core/Error ../../core/lang ../../core/typedArrayUtil ../../geometry/support/UintArray".split(" "), |
|
function(b,a,q,e,k,g){function h(c){if(c.service.tileServers?.length){var f=c.service.tileServers;f=`${f&&f.length?f[c.row%f.length]:c.service.url}/tilemap/${c.level}/${c.row}/${c.col}/${c.width}/${c.height}`}else f=`${c.service.url}/tilemap/${c.level}/${c.row}/${c.col}/${c.width}/${c.height}`;(c=c.service.query)&&(f=`${f}?${c}`);return f}class n{constructor(c){if(!c?.location)throw new q("tilemap:missing-location","Location missing from tilemap response");if(!1===c.valid)throw new q("tilemap:invalid", |
|
"Tilemap response was marked as invalid");if(!c.data)throw new q("tilemap:missing-data","Data missing from tilemap response");if(!Array.isArray(c.data))throw new q("tilemap:data-mismatch","Data must be an array of numbers");if(c.data.length!==c.location.width*c.location.height)throw new q("tilemap:data-mismatch","Number of data items does not match width/height of tilemap");const {location:f,data:l}=c;this.location=Object.freeze(e.clone(f));let x=c=!0;const B=g.newUintArray(Math.ceil(this.location.width* |
|
this.location.height/32));let u=0;for(let p=0;p<l.length;p++){const v=p%32;l[p]?(x=!1,B[u]|=1<<v):c=!1;31===v&&++u}x?(this._availability="unavailable",this.byteSize=40):c?(this._availability="available",this.byteSize=40):(this._availability=B,this.byteSize=40+k.estimateSize(B))}getAvailability(c,f){if("unavailable"===this._availability||"available"===this._availability)return this._availability;c=(c-this.location.top)*this.location.width+(f-this.location.left);f=c>>5;const l=this._availability;return 0> |
|
f||f>l.length?"unknown":l[f]&1<<c%32?"available":"unavailable"}static fromDefinition(c,f){const l=c.service.request||a,{row:x,col:B,width:u,height:p}=c,v={query:{f:"json"}};f=f?{...v,...f}:v;return l(h(c),f).then(E=>E.data).catch(E=>{if(422===E?.details?.httpStatus)return{location:{top:x,left:B,width:u,height:p},valid:!0,data:Array(u*p).fill(0)};throw E;}).then(E=>{if(E.location&&(E.location.top!==x||E.location.left!==B||E.location.width!==u||E.location.height!==p))throw new q("tilemap:location-mismatch", |
|
"Tilemap response for different location than requested",{response:E,definition:{top:x,left:B,width:u,height:p}});return n.fromJSON(E)})}static fromJSON(c){return Object.freeze(new n(c))}}b.Tilemap=n;b.tilemapDefinitionId=function(c){return`${c.level}/${c.row}/${c.col}/${c.width}/${c.height}`};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/geometry/support/UintArray":function(){define(["exports","../../core/typedArrayUtil"],function(b,a){b.newUintArray=function(q,e=!1){return q<= |
|
a.nativeArrayMaxSize?e?Array(q).fill(0):Array(q):new Uint32Array(q)};b.uintSubArray=function(q,e,k){return Array.isArray(q)?q.slice(e,e+k):q.subarray(e,e+k)};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/layers/support/imageUtils":function(){define(["exports"],function(b){let a=null;b.checkWebPSupport=function(q){if(a)return a;const e={lossy:"UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",lossless:"UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA\x3d\x3d",alpha:"UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA\x3d\x3d", |
|
animation:"UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA"};return a=new Promise(k=>{const g=new Image;g.onload=()=>{g.onload=g.onerror=null;k(0<g.width&&0<g.height)};g.onerror=()=>{g.onload=g.onerror=null;k(!1)};g.src="data:image/webp;base64,"+e[q]})};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/layers/support/SpriteSource":function(){define(["../../request","../../core/Error","../../core/Logger","../../core/typedArrayUtil", |
|
"../../core/urlUtils"],function(b,a,q,e,k){function g(n){var c=document.createElement("canvas");const f=c.getContext("2d");c.width=n.width;c.height=n.height;f.drawImage(n,0,0,n.width,n.height);c=f.getImageData(0,0,n.width,n.height);return{width:n.width,height:n.height,data:new Uint8Array(c.data)}}class h{constructor(n,c){this._spriteSource=n;this._maxTextureSize=c;this.devicePixelRatio=1;this._spriteImageFormat="png";this._isRetina=!1;this._spritesData={};this.height=this.width=this.image=null;this.loadStatus= |
|
"not-loaded";"url"===n.type&&n.spriteFormat&&(this._spriteImageFormat=n.spriteFormat);n.pixelRatio&&(this.devicePixelRatio=n.pixelRatio);this.baseURL=n.spriteUrl}get spriteNames(){const n=[];for(const c in this._spritesData)n.push(c);n.sort();return n}getSpriteInfo(n){return this._spritesData?this._spritesData[n]:null}async load(n){if(this.baseURL){this.loadStatus="loading";try{await this._loadSprites(n),this.loadStatus="loaded"}catch{this.loadStatus="failed"}}else this.loadStatus="failed"}async _loadSprites(n){this._isRetina= |
|
1.15<this.devicePixelRatio;const {width:c,height:f,data:l,json:x}=await this._getSpriteData(this._spriteSource,n);if((n=Object.keys(x))&&0!==n.length&&l){this._spritesData=x;this.width=c;this.height=f;n=Math.max(this._maxTextureSize,4096);if(c>n||f>n)throw n=`Sprite resource for style ${this.baseURL} is bigger than the maximum allowed of ${n} pixels}`,q.getLogger("esri.layers.support.SpriteSource").error(n),new a("SpriteSource",n);for(let B=0;B<l.length;B+=4)n=l[B+3]/255,l[B]*=n,l[B+1]*=n,l[B+2]*= |
|
n;this.image=l}else this._spritesData=this.image=null,this.width=this.height=0}async _getSpriteData(n,c){if("image"===n.type){if(1.15>this.devicePixelRatio){if(!n.spriteSource1x)throw new a("SpriteSource","no image data provided for low resolution sprites!");c=n.spriteSource1x.image;n=n.spriteSource1x.json}else{if(!n.spriteSource2x)throw new a("SpriteSource","no image data provided for high resolution sprites!");c=n.spriteSource2x.image;n=n.spriteSource2x.json}return"width"in c&&"height"in c&&"data"in |
|
c&&(e.isArrayBuffer(c.data)||e.isUint8ClampedArray(c.data))?{width:c.width,height:c.height,data:new Uint8Array(c.data),json:n}:{...g(c),json:n}}n=k.urlToObject(this.baseURL);const f=n.query?"?"+k.objectToQuery(n.query):"",l=this._isRetina?"@2x":"",x=`${n.path}${l}.${this._spriteImageFormat}${f}`,[B,u]=await Promise.all([b(`${n.path}${l}.json${f}`,c),b(x,{responseType:"image",...c})]);return{...g(u.data),json:B.data}}}return h})},"esri/layers/support/vectorTileLayerLoader":function(){define("exports ../../request ../../core/lang ../../core/promiseUtils ../../core/urlUtils ../../geometry/support/spatialReferenceUtils ../../geometry/support/webMercatorUtils ../../views/2d/engine/vectorTiles/style/VectorTileSource".split(" "), |
|
function(b,a,q,e,k,g,h,n){function c(...u){let p=void 0;for(const v of u)null!=v&&(k.isProtocolRelative(v)?p&&=p.split("://")[0]+":"+v.trim():p=k.isAbsolute(v)?v:k.join(p,v));return p?k.removeTrailingSlash(p):void 0}async function f(u,p,v,E,H){e.throwIfAborted(H);let G,z;if("string"===typeof v){v=k.normalize(v);var D=await a(v,{...H,responseType:"json",query:{f:"json",...H?.query}});D.ssl&&(G&&=G.replace(/^http:/i,"https:"),z&&=z.replace(/^http:/i,"https:"));z=G=v}else null!=v&&(D={data:v},G=v.jsonUrl|| |
|
null,z=E);if((D=D?.data)&&"sources"in D&&D.sources)return u.styleUrl=G||null,x(u,D,z,H);if(!(D&&"sources"in D&&D.sources))return u.sourceUrl?B(u,D,z,!1,p,H):(u.sourceUrl=G||null,B(u,D,z,!0,p,H));throw Error("You must specify the URL or the JSON for a service or for a style.");}function l(u){return"object"===typeof u&&!!u&&"tilejson"in u&&null!=u.tilejson}async function x(u,p,v,E){v=v?k.removeFile(v):k.getAppBaseUrl();u.styleBase=v;u.style=p;p["sprite-format"]&&"webp"===p["sprite-format"].toLowerCase()&& |
|
(u.spriteFormat="webp");const H=[];if(p.sources&&p.sources.esri){const G=p.sources.esri;G.url?await f(u,"esri",c(v,G.url),void 0,E):H.push(f(u,"esri",G,v,E))}for(const G of Object.keys(p.sources))"esri"!==G&&"vector"===p.sources[G].type&&(p.sources[G].url?H.push(f(u,G,c(v,p.sources[G].url),void 0,E)):p.sources[G].tiles&&H.push(f(u,G,p.sources[G],v,E)));await Promise.all(H)}async function B(u,p,v,E,H,G){v=v?k.removeTrailingSlash(v)+"/":k.getAppBaseUrl();if(p.hasOwnProperty("tileInfo")){var z=p?.tileInfo; |
|
null!=z&&(null==z.rows&&(z.rows=512),null==z.cols&&(z.cols=512));z=p}else{z={xmin:-2.0037507067161843E7,ymin:-2.0037507067161843E7,xmax:2.0037507067161843E7,ymax:2.0037507067161843E7,spatialReference:{wkid:102100,latestWkid:3857}};var D=null;if(l(p)){var {bounds:A}=p;A&&(D=h.geographicToWebMercator({x:A[0],y:A[1],spatialReference:q.clone(g.wgs84)}),A=h.geographicToWebMercator({x:A[2],y:A[3],spatialReference:q.clone(g.wgs84)}),D={xmin:D.x,ymin:D.y,xmax:A.x,ymax:A.y,spatialReference:q.clone(g.webMercator)})}null=== |
|
D&&(D=z);A=78271.51696400007;var K=2.958287637957775E8,r=[],y=p.hasOwnProperty("maxzoom")&&null!=p.maxzoom?+p.maxzoom:22;for(let w=0;w<=y;w++)r.push({level:w,scale:K,resolution:A}),A/=2,K/=2;z={capabilities:"TilesOnly",initialExtent:D,fullExtent:z,minScale:0,maxScale:0,tiles:p.tiles,tileInfo:{rows:512,cols:512,dpi:96,format:"pbf",origin:{x:-2.0037508342787E7,y:2.0037508342787E7},lods:r,spatialReference:q.clone(g.webMercator)}}}D=new n(H,k.addQueryParameters(v,G?.query??{}),z);if(!E&&u.primarySourceName in |
|
u.sourceNameToSource){A=u.sourceNameToSource[u.primarySourceName];if(!A.isCompatibleWith(D))return;null!=D.fullExtent&&(null!=A.fullExtent?A.fullExtent.union(D.fullExtent):A.fullExtent=D.fullExtent.clone());A.tileInfo&&D.tileInfo&&A.tileInfo.lods.length<D.tileInfo.lods.length&&(A.tileInfo=D.tileInfo)}E&&(u.sourceBase=v,u.source=p,u.validatedSource=z,u.primarySourceName=H);u.sourceNameToSource[H]=D;if(!l(u)&&"defaultStyles"in p&&!u.style){if(null==p.defaultStyles)throw Error();return"string"===typeof p.defaultStyles? |
|
f(u,"",c(v,p.defaultStyles,"root.json"),void 0,G):f(u,"",p.defaultStyles,c(v,"root.json"),G)}}b.loadMetadata=async function(u,p){const v={source:null,sourceBase:null,sourceUrl:null,validatedSource:null,style:null,styleBase:null,styleUrl:null,sourceNameToSource:{},primarySourceName:"",spriteFormat:"png"},[E,H]="string"===typeof u?[u,null]:[null,u.jsonUrl];await f(v,"esri",u,H,p);return{layerDefinition:v.validatedSource,url:E,serviceUrl:v.sourceUrl,style:v.style,styleUrl:v.styleUrl,spriteUrl:v.style.sprite&& |
|
c(v.styleBase,v.style.sprite),spriteFormat:v.spriteFormat,glyphsUrl:v.style.glyphs&&c(v.styleBase,v.style.glyphs),sourceNameToSource:v.sourceNameToSource,primarySourceName:v.primarySourceName}};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/style/VectorTileSource":function(){define("../../../../../core/lang ../../../../../core/urlUtils ../../../../../geometry/Extent ../../../../../layers/support/TileInfo ../../../../../layers/support/TilemapCache ../TilemapIndex ../TilemapRequest ./VectorTilesRequestManager".split(" "), |
|
function(b,a,q,e,k,g,h,n){class c{constructor(f,l,x){this.initialExtent=this.fullExtent=this.capabilities=this.tileInfo=this.tilemap=null;this.name=f;this.sourceUrl=l;f=a.urlToObject(this.sourceUrl);l=b.clone(x);var B=l.tiles;if(f)for(var u=0;u<B.length;u++){var p=a.urlToObject(B[u]);p&&(a.isAbsolute(p.path)||(p.path=a.join(f.path,p.path)),B[u]=a.addQueryParameters(p.path,{...f.query,...p.query}))}this.tileServers=B;u=x.capabilities&&x.capabilities.split(",").map(v=>v.toLowerCase().trim());B=!0=== |
|
x?.exportTilesAllowed;u=!0===u?.includes("tilemap");p=B&&x.hasOwnProperty("maxExportTilesCount")?x.maxExportTilesCount:0;this.capabilities={operations:{supportsExportTiles:B,supportsTileMap:u},exportTiles:B?{maxExportTilesCount:+p}:null};this.tileInfo=e.fromJSON(l.tileInfo);B=x.tileMap?a.addQueryParameters(a.join(f.path,x.tileMap),f.query??{}):null;u?(this.type="vector-tile",this.tilemap=new h(new k.TilemapCache({layer:{parsedUrl:f,tileInfo:this.tileInfo},minLOD:l.minLOD??this.tileInfo.lods[0].level, |
|
maxLOD:l.maxLOD??this.tileInfo.lods[this.tileInfo.lods.length-1].level}),B)):B&&(this.tilemap=new g(B));this.fullExtent=q.fromJSON(x.fullExtent);this.initialExtent=q.fromJSON(x.initialExtent)}destroy(){this.tilemap?.destroy()}async getRefKey(f,l){return await this.tilemap?.dataKey(f,l)??f}requestTile(f,l,x,B){return n.request(this.tileServers[l%this.tileServers.length],f,l,x,B)}isCompatibleWith(f){var l=this.tileInfo;f=f.tileInfo;if(!l.spatialReference.equals(f.spatialReference)||!l.origin.equals(f.origin)|| |
|
Math.round(l.dpi)!==Math.round(f.dpi))return!1;l=l.lods;f=f.lods;const x=Math.min(l.length,f.length);for(let B=0;B<x;B++){const u=l[B],p=f[B];if(u.level!==p.level||Math.round(u.scale)!==Math.round(p.scale))return!1}return!0}}return c})},"esri/views/2d/engine/vectorTiles/TilemapIndex":function(){define(["../../../../request","../../../../core/promiseUtils","../../tiling/TileKey"],function(b,a,q){class e{constructor(k){this.url=k}destroy(){this._tileIndexPromise=null}async fetchTileIndex(){this._tileIndexPromise|| |
|
(this._tileIndexPromise=b(this.url).then(k=>k.data.index));return this._tileIndexPromise}async dataKey(k,g){const h=await this.fetchTileIndex();a.throwIfAborted(g);return this._getIndexedDataKey(h,k)}_getIndexedDataKey(k,g){const h=[g];if(0>g.level||0>g.row||0>g.col||0<g.row>>g.level||0<g.col>>g.level)return null;for(;0!==g.level;)g=new q(g.level-1,g.row>>1,g.col>>1,g.world),h.push(g);g=h.pop();let n,c;if(1===k)return g;for(;h.length;)if(n=h.pop(),c=(n.col&1)+((n.row&1)<<1),k){if(0===k[c]){g=null; |
|
break}if(1===k[c]){g=n;break}g=n;k=k[c]}return g}}return e})},"esri/views/2d/tiling/TileKey":function(){define(["../../../core/ObjectPool"],function(b){class a{static getId(q,e,k,g){return"object"===typeof q?`${q.level}/${q.row}/${q.col}/${q.world}`:`${q}/${e}/${k}/${g}`}constructor(q,e,k,g){this.set(q,e,k,g)}get key(){return this}get id(){return this.toString()}get normalizedId(){return`${this.level}/${this.row}/${this.col}`}set id(q){this.set(q)}get hash(){return(this.world&3)<<30|(this.col&4095)<< |
|
22|(this.row&4095)<<8|this.level&63}acquire(q,e,k,g){this.set(q,e,k,g)}contains(q){const e=q.level-this.level;return 0<=e&&this.row===q.row>>e&&this.col===q.col>>e&&this.world===q.world}containsChild(q){const e=q.level-this.level;return 0<e&&this.row===q.row>>e&&this.col===q.col>>e&&this.world===q.world}equals(q){return this.level===q.level&&this.row===q.row&&this.col===q.col&&this.world===q.world}clone(){return new a(this)}release(){this.world=this.col=this.row=this.level=0}set(q,e,k,g){if(null== |
|
q)this.world=this.col=this.row=this.level=0;else if("object"===typeof q)this.level=q.level||0,this.row=q.row||0,this.col=q.col||0,this.world=q.world||0;else if("string"===typeof q){const [h,n,c,f]=q.split("/");this.level=parseFloat(h);this.row=parseFloat(n);this.col=parseFloat(c);this.world=parseFloat(f)}else this.level=+q,this.row=+e,this.col=+k,this.world=+g||0;return this}toString(){return`${this.level}/${this.row}/${this.col}/${this.world}`}getParentKey(){return 0>=this.level?null:new a(this.level- |
|
1,this.row>>1,this.col>>1,this.world)}getNeighborId(q,e){return`${this.level}/${this.row+e}/${this.col+q}/${this.world}`}getChildKeys(){const q=this.level+1,e=this.row<<1,k=this.col<<1,g=this.world;return[new a(q,e,k,g),new a(q,e,k+1,g),new a(q,e+1,k,g),new a(q,e+1,k+1,g)]}compareRowMajor(q){return this.row<q.row?-1:this.row>q.row?1:this.col<q.col?-1:this.col>q.col?1:0}}a.pool=new b(a,null,null,25,50);return a})},"esri/views/2d/engine/vectorTiles/TilemapRequest":function(){define(["../../../../request", |
|
"../../../../core/maybe","../../../../core/promiseUtils","../../tiling/TileKey"],function(b,a,q,e){class k{constructor(g,h){this._tilemap=g;this._tileIndexUrl=h}destroy(){this._tilemap=a.destroyMaybe(this._tilemap);this._tileIndexPromise=null}async fetchTileIndex(g){this._tileIndexPromise||(this._tileIndexPromise=b(this._tileIndexUrl,{query:{...g?.query}}).then(h=>h.data.index));return this._tileIndexPromise}dataKey(g,h){const {level:n,row:c,col:f}=g,l=new e(g);return this._tilemap.fetchAvailabilityUpsample(n, |
|
c,f,l,h).then(()=>{l.world=g.world;return l}).catch(x=>{if(q.isAbortError(x))throw x;return null})}}return k})},"esri/views/2d/engine/vectorTiles/style/VectorTilesRequestManager":function(){define("exports ../../../../../request ../../../../../core/lang ../../../../../core/MapUtils ../../../../../core/promiseUtils ../../../../../core/urlUtils".split(" "),function(b,a,q,e,k,g){function h(f,l){return e.getOrCreateMapValue(c,f,()=>new n(f)).getData(l).finally(()=>c.delete(f))}class n{constructor(f){this._tileUrl= |
|
f;this._abortController=this._promise=null;this._abortOptions=[]}getData(f){if(null==this._promise||k.isAborted(this._abortController?.signal))this._promise=this._makeRequest(this._tileUrl);const l=this._abortOptions;l.push(f);k.onAbort(f,()=>{l.every(x=>k.isAborted(x))&&this._abortController.abort()});return this._promise.then(x=>q.clone(x))}async _makeRequest(f){this._abortController=new AbortController;({data:f}=await a(f,{responseType:"array-buffer",signal:this._abortController.signal}));return f}} |
|
const c=new Map;b.request=function(f,l,x,B,u){f=g.urlToObject(f);const p=f.query;if(p)for(const [v,E]of Object.entries(p))switch(E){case "{x}":p[v]=B.toString();break;case "{y}":p[v]=x.toString();break;case "{z}":p[v]=l.toString()}l=g.addQueryParameters(f.path.replaceAll(/\{z\}/gi,l.toString()).replaceAll(/\{y\}/gi,x.toString()).replaceAll(/\{x\}/gi,B.toString()),{...f.query});return h(l,u)};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/portal/support/jsonContext":function(){define(["exports", |
|
"../../core/urlUtils","../Portal"],function(b,a,q){function e(k,g){return{origin:g,url:a.urlToObject(k.itemUrl),portal:k.portal||q.getDefault(),portalItem:k}}b.createForItemRead=function(k,g){return{...e(k,g),readResourcePaths:[]}};b.createForItemWrite=function(k,g,h){const n=a.urlToObject(k.itemUrl);return{...e(k,g),messages:[],writtenProperties:[],blockedRelativeUrls:[],verifyItemRelativeUrls:n?{rootPath:n.path,writtenUrls:[]}:null,resources:h?{toAdd:[],toUpdate:[],toKeep:[],pendingOperations:[]}: |
|
null}};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/tileInfoUtils":function(){define(["exports","../../../../geometry/Point","../../../../layers/support/LOD","../../../../layers/support/TileInfo"],function(b,a,q,e){b.areSchemasOverlapping=function(k,g){if(k===g)return!0;if(null==k&&null!=g||null!=k&&null==g||null==k||null==g||!k.spatialReference.equals(g.spatialReference)||k.dpi!==g.dpi)return!1;var h=k.origin;const n=g.origin;if(1E-6<=Math.abs(h.x- |
|
n.x)||1E-6<=Math.abs(h.y-n.y))return!1;k.lods[0].scale>g.lods[0].scale?(h=k,k=g):h=g;for(g=h.lods[0].scale;g>=k.lods[k.lods.length-1].scale-1E-6;g/=2)if(1E-6>Math.abs(g-k.lods[0].scale))return!0;return!1};b.unionTileInfos=function(k,g){if(k===g)return k;if(null==k&&null!=g)return g;if(null!=k&&null==g)return k;if(null==k||null==g)return null;const h=k.size[0],n=k.format,c=k.dpi,f=new a({x:k.origin.x,y:k.origin.y}),l=k.spatialReference;var x=k.lods[0].scale>g.lods[0].scale?k.lods[0]:g.lods[0];k=(k.lods[k.lods.length- |
|
1].scale<=g.lods[g.lods.length-1].scale?k.lods[k.lods.length-1]:g.lods[g.lods.length-1]).scale;g=[];let B=x.scale;x=x.resolution;let u=0;for(;B>k;)g.push(new q({level:u,resolution:x,scale:B})),u++,B/=2,x/=2;return new e({size:[h,h],dpi:c,format:n||"pbf",origin:f,lods:g,spatialReference:l})};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/style/StyleRepository":function(){define(["./StyleDefinition","./StyleLayer"],function(b,a){class q{constructor(e){this._style= |
|
e;this.backgroundBucketIds=[];this._uidToLayer=new Map;this._layerByName={};this._runningId=0;e.layers||(e.layers=[]);this.version=parseFloat(e.version);if(this.layers=e.layers.map((k,g,h)=>this._create(k,g,h)).filter(k=>!!k))for(e=0;e<this.layers.length;e++){const k=this.layers[e];this._layerByName[k.id]=k;this._uidToLayer.set(k.uid,k);k.type===b.StyleLayerType.BACKGROUND&&this.backgroundBucketIds.push(k.id)}this._identifyRefLayers()}isPainterDataDriven(e){return(e=this._layerByName[e])?e.isPainterDataDriven(): |
|
!1}getStyleLayerId(e){return e>=this.layers.length?null:this.layers[e].id}getStyleLayerByUID(e){return this._uidToLayer.get(e)??null}getStyleLayerIndex(e){return(e=this._layerByName[e])?this.layers.indexOf(e):-1}setStyleLayer(e,k){if(e?.id){var g=this._style;null!=k&&k>=this.layers.length&&(k=this.layers.length-1);var h=!0,n;if(n=this._layerByName[e.id]){const c=this.layers.indexOf(n);k||=c;k===c?(h=!1,n=q._recreateLayer(e,n),this.layers[k]=n,g.layers[k]=e):(this.layers.splice(c,1),g.layers.splice(c, |
|
1),n=this._create(e,k,this.layers),this.layers.splice(k,0,n),g.layers.splice(k,0,e))}else n=this._create(e,k,this.layers),!k||k>=this.layers.length?(this.layers.push(n),g.layers.push(e)):(this.layers.splice(k,0,n),g.layers.splice(k,0,e));this._layerByName[e.id]=n;this._uidToLayer.set(n.uid,n);h&&this._recomputeZValues();this._identifyRefLayers()}}getStyleLayer(e){return(e=this._layerByName[e])?{type:e.typeName,id:e.id,source:e.source,"source-layer":e.sourceLayer,minzoom:e.minzoom,maxzoom:e.maxzoom, |
|
filter:e.filter,layout:e.layout,paint:e.paint}:null}deleteStyleLayer(e){const k=this._layerByName[e];k&&(delete this._layerByName[e],this._uidToLayer.delete(k.uid),e=this.layers.indexOf(k),this.layers.splice(e,1),this._style.layers.splice(e,1),this._recomputeZValues(),this._identifyRefLayers())}getLayerById(e){return this._layerByName[e]}getLayoutProperties(e){return(e=this._layerByName[e])?e.layout:null}getPaintProperties(e){return(e=this._layerByName[e])?e.paint:null}setPaintProperties(e,k){if(e= |
|
this._layerByName[e]){var g=q._recreateLayer({type:e.typeName,id:e.id,source:e.source,"source-layer":e.sourceLayer,minzoom:e.minzoom,maxzoom:e.maxzoom,filter:e.filter,layout:e.layout,paint:k},e),h=this.layers.indexOf(e);this.layers[h]=g;this._style.layers[h].paint=k;this._layerByName[e.id]=g;this._uidToLayer.set(e.uid,g)}}setLayoutProperties(e,k){if(e=this._layerByName[e]){var g=q._recreateLayer({type:e.typeName,id:e.id,source:e.source,"source-layer":e.sourceLayer,minzoom:e.minzoom,maxzoom:e.maxzoom, |
|
filter:e.filter,layout:k,paint:e.paint},e),h=this.layers.indexOf(e);this.layers[h]=g;this._style.layers[h].layout=k;this._layerByName[e.id]=g;this._uidToLayer.set(e.uid,g)}}setStyleLayerVisibility(e,k){if(e=this._layerByName[e]){var g=e.layout||{};g.visibility=k;k=q._recreateLayer({type:e.typeName,id:e.id,source:e.source,"source-layer":e.sourceLayer,minzoom:e.minzoom,maxzoom:e.maxzoom,filter:e.filter,layout:g,paint:e.paint},e);var h=this.layers.indexOf(e);this.layers[h]=k;this._style.layers[h].layout= |
|
g;this._layerByName[e.id]=k;this._uidToLayer.set(e.uid,k)}}getStyleLayerVisibility(e){return(e=this._layerByName[e])?e.layout?.visibility??"visible":"none"}_recomputeZValues(){const e=this.layers,k=1/(e.length+1);for(let g=0;g<e.length;g++)e[g].z=1-(1+g)*k}_identifyRefLayers(){const e=[],k=[];let g=0;for(const c of this.layers){const f=c.layout;if(c.type===b.StyleLayerType.FILL){var h=c,n=c.source+"|"+c.sourceLayer;n+="|"+(f?.visibility??"");n+="|"+c.minzoom;n+="|"+c.maxzoom;n+="|"+JSON.stringify(c.filter); |
|
if(h.hasDataDrivenFill||h.hasDataDrivenOutline)n+="|"+g;e.push({key:n,layer:c})}else if(c.type===b.StyleLayerType.LINE){h=c;n=c.paint;n=null!=n&&(null!=n["line-pattern"]||null!=n["line-dasharray"]);let l=c.source+"|"+c.sourceLayer;l+="|"+(f?.visibility??"");l+="|"+c.minzoom;l+="|"+c.maxzoom;l+="|"+JSON.stringify(c.filter);l+="|"+(void 0!==f?f["line-cap"]:"");l+="|"+(void 0!==f?f["line-join"]:"");if(h.hasDataDrivenLine||n)l+="|"+g;k.push({key:l,layer:c})}++g}this._assignRefLayers(e);this._assignRefLayers(k)}_assignRefLayers(e){e.sort((f, |
|
l)=>f.key<l.key?-1:f.key>l.key?1:0);let k,g;const h=e.length;for(let f=0;f<h;f++){const l=e[f];if(l.key===k)l.layer.refLayerId=g;else if(k=l.key,g=l.layer.id,l.layer.type===b.StyleLayerType.FILL){if(!l.layer.getPaintProperty("fill-outline-color"))for(var n=f+1;n<h;n++){var c=e[n];if(c.key===k){if(c.layer.getPaintProperty("fill-outline-color")){e[f]=c;e[n]=l;g=c.layer.id;break}}else break}}else if(l.layer.type===b.StyleLayerType.LINE)for(n=l.layer,c=f+1;c<h;c++){const x=e[c];if(x.key!==k)break;const B= |
|
x.layer;if(n.canUseThinTessellation&&!B.canUseThinTessellation||!n.canUseThinTessellation&&(B.getPaintProperty("line-pattern")||B.getPaintProperty("line-dasharray")))n=B,e[f]=x,e[c]=l,g=x.layer.id}}}_create(e,k,g){k=1-1/(g.length+1)*(1+k);g=this._runningId++;switch(e.type){case "background":return new a.BackgroundStyleLayer(b.StyleLayerType.BACKGROUND,e,k,g);case "fill":return new a.FillStyleLayer(b.StyleLayerType.FILL,e,k,g);case "line":return new a.LineStyleLayer(b.StyleLayerType.LINE,e,k,g);case "symbol":return new a.SymbolStyleLayer(b.StyleLayerType.SYMBOL, |
|
e,k,g);case "raster":console.warn(`Unsupported vector tile raster layer ${e.id}`);break;case "circle":return new a.CircleStyleLayer(b.StyleLayerType.CIRCLE,e,k,g)}return null}static _recreateLayer(e,k){switch(e.type){case "background":return new a.BackgroundStyleLayer(b.StyleLayerType.BACKGROUND,e,k.z,k.uid);case "fill":return new a.FillStyleLayer(b.StyleLayerType.FILL,e,k.z,k.uid);case "line":return new a.LineStyleLayer(b.StyleLayerType.LINE,e,k.z,k.uid);case "symbol":return new a.SymbolStyleLayer(b.StyleLayerType.SYMBOL, |
|
e,k.z,k.uid);case "raster":console.warn(`Unsupported vector tile raster layer ${e.id}`);break;case "circle":return new a.CircleStyleLayer(b.StyleLayerType.CIRCLE,e,k.z,k.uid)}return null}}return q})},"esri/views/2d/engine/vectorTiles/style/StyleDefinition":function(){define(["exports","../../../../../symbols/cim/enums"],function(b,a){b.StyleLayerType=void 0;(function(e){e[e.BACKGROUND=0]="BACKGROUND";e[e.FILL=1]="FILL";e[e.LINE=2]="LINE";e[e.SYMBOL=3]="SYMBOL";e[e.CIRCLE=4]="CIRCLE"})(b.StyleLayerType|| |
|
(b.StyleLayerType={}));b.Visibility=void 0;(function(e){e[e.VISIBLE=0]="VISIBLE";e[e.NONE=1]="NONE"})(b.Visibility||(b.Visibility={}));b.SymbolPlacement=void 0;(function(e){e[e.POINT=0]="POINT";e[e.LINE=1]="LINE";e[e.LINE_CENTER=2]="LINE_CENTER"})(b.SymbolPlacement||(b.SymbolPlacement={}));b.RotationAlignment=void 0;(function(e){e[e.MAP=0]="MAP";e[e.VIEWPORT=1]="VIEWPORT";e[e.AUTO=2]="AUTO"})(b.RotationAlignment||(b.RotationAlignment={}));b.TextJustification=void 0;(function(e){e[e.AUTO=0]="AUTO"; |
|
e[e.LEFT=1]="LEFT";e[e.CENTER=2]="CENTER";e[e.RIGHT=3]="RIGHT"})(b.TextJustification||(b.TextJustification={}));b.SymbolAnchor=void 0;(function(e){e[e.CENTER=0]="CENTER";e[e.LEFT=1]="LEFT";e[e.RIGHT=2]="RIGHT";e[e.TOP=3]="TOP";e[e.BOTTOM=4]="BOTTOM";e[e.TOP_LEFT=5]="TOP_LEFT";e[e.TOP_RIGHT=6]="TOP_RIGHT";e[e.BOTTOM_LEFT=7]="BOTTOM_LEFT";e[e.BOTTOM_RIGHT=8]="BOTTOM_RIGHT"})(b.SymbolAnchor||(b.SymbolAnchor={}));b.TextTransform=void 0;(function(e){e[e.NONE=0]="NONE";e[e.UPPERCASE=1]="UPPERCASE";e[e.LOWERCASE= |
|
2]="LOWERCASE"})(b.TextTransform||(b.TextTransform={}));b.TranslateAnchor=void 0;(function(e){e[e.MAP=0]="MAP";e[e.VIEWPORT=1]="VIEWPORT"})(b.TranslateAnchor||(b.TranslateAnchor={}));b.TextWritingMode=void 0;(function(e){e[e.HORIZONTAL=0]="HORIZONTAL";e[e.VERTICAL=1]="VERTICAL"})(b.TextWritingMode||(b.TextWritingMode={}));class q{}q.backgroundLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:b.Visibility.VISIBLE}};q.fillLayoutDefinition={visibility:{type:"enum",values:["visible", |
|
"none"],default:b.Visibility.VISIBLE}};q.lineLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:b.Visibility.VISIBLE},"line-cap":{type:"enum",values:["butt","round","square"],default:a.CapType.BUTT},"line-join":{type:"enum",values:["bevel","round","miter"],default:a.JoinType.MITER},"line-miter-limit":{type:"number",default:2},"line-round-limit":{type:"number",default:1.05}};q.symbolLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:b.Visibility.VISIBLE}, |
|
"symbol-avoid-edges":{type:"boolean",default:!1},"symbol-placement":{type:"enum",values:["point","line","line-center"],default:b.SymbolPlacement.POINT},"symbol-sort-key":{type:"number",default:-1},"symbol-spacing":{type:"number",minimum:1,default:250},"icon-allow-overlap":{type:"boolean",default:!1},"icon-anchor":{type:"enum",values:"center left right top bottom top-left top-right bottom-left bottom-right".split(" "),default:b.SymbolAnchor.CENTER},"icon-ignore-placement":{type:"boolean",default:!1}, |
|
"icon-image":{type:"string"},"icon-keep-upright":{type:"boolean",default:!1},"icon-offset":{type:"array",value:"number",length:2,default:[0,0]},"icon-optional":{type:"boolean",default:!1},"icon-padding":{type:"number",minimum:0,default:2},"icon-rotate":{type:"number",default:0},"icon-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:b.RotationAlignment.AUTO},"icon-size":{type:"number",minimum:0,default:1},"text-allow-overlap":{type:"boolean",default:!1},"text-anchor":{type:"enum", |
|
values:"center left right top bottom top-left top-right bottom-left bottom-right".split(" "),default:b.SymbolAnchor.CENTER},"text-field":{type:"string"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"]},"text-ignore-placement":{type:"boolean",default:!1},"text-justify":{type:"enum",values:["auto","left","center","right"],default:b.TextJustification.CENTER},"text-keep-upright":{type:"boolean",default:!0},"text-letter-spacing":{type:"number",default:0}, |
|
"text-line-height":{type:"number",default:1.2},"text-max-angle":{type:"number",minimum:0,default:45},"text-max-width":{type:"number",minimum:0,default:10},"text-offset":{type:"array",value:"number",length:2,default:[0,0]},"text-optional":{type:"boolean",default:!1},"text-padding":{type:"number",minimum:0,default:2},"text-rotate":{type:"number",default:0},"text-rotation-alignment":{type:"enum",values:["map","viewport","auto"],default:b.RotationAlignment.AUTO},"text-size":{type:"number",minimum:0,default:16}, |
|
"text-transform":{type:"enum",values:["none","uppercase","lowercase"],default:b.TextTransform.NONE},"text-writing-mode":{type:"array",value:"enum",values:["horizontal","vertical"],default:[b.TextWritingMode.HORIZONTAL]}};q.circleLayoutDefinition={visibility:{type:"enum",values:["visible","none"],default:b.Visibility.VISIBLE}};q.backgroundPaintDefinition={"background-color":{type:"color",default:[0,0,0,1]},"background-opacity":{type:"number",minimum:0,maximum:1,default:1},"background-pattern":{type:"string"}}; |
|
q.fillPaintDefinition={"fill-antialias":{type:"boolean",default:!0},"fill-color":{type:"color",default:[0,0,0,1]},"fill-opacity":{type:"number",minimum:0,maximum:1,default:1},"fill-outline-color":{type:"color",default:[0,0,0,0]},"fill-pattern":{type:"string"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0]},"fill-translate-anchor":{type:"enum",values:["map","viewport"],default:b.TranslateAnchor.MAP}};q.linePaintDefinition={"line-blur":{type:"number",minimum:0,default:0},"line-color":{type:"color", |
|
default:[0,0,0,1]},"line-dasharray":{type:"array",value:"number",default:[]},"line-gap-width":{type:"number",minimum:0,default:0},"line-offset":{type:"number",default:0},"line-opacity":{type:"number",minimum:0,maximum:1,default:1},"line-pattern":{type:"string"},"line-translate":{type:"array",value:"number",length:2,default:[0,0]},"line-translate-anchor":{type:"enum",values:["map","viewport"],default:b.TranslateAnchor.MAP},"line-width":{type:"number",minimum:0,default:1}};q.symbolPaintDefinition={"icon-color":{type:"color", |
|
default:[0,0,0,1]},"icon-halo-blur":{type:"number",minimum:0,default:0},"icon-halo-color":{type:"color",default:[0,0,0,0]},"icon-halo-width":{type:"number",minimum:0,default:0},"icon-opacity":{type:"number",minimum:0,maximum:1,default:1},"icon-translate":{type:"array",value:"number",length:2,default:[0,0]},"icon-translate-anchor":{type:"enum",values:["map","viewport"],default:b.TranslateAnchor.MAP},"text-color":{type:"color",default:[0,0,0,1]},"text-halo-blur":{type:"number",minimum:0,default:0}, |
|
"text-halo-color":{type:"color",default:[0,0,0,0]},"text-halo-width":{type:"number",minimum:0,default:0},"text-opacity":{type:"number",minimum:0,maximum:1,default:1},"text-translate":{type:"array",value:"number",length:2,default:[0,0]},"text-translate-anchor":{type:"enum",values:["map","viewport"],default:b.TranslateAnchor.MAP}};q.rasterPaintDefinition={"raster-opacity":{type:"number",minimum:0,maximum:1,default:1},"raster-hue-rotate":{type:"number",default:0},"raster-brightness-min":{type:"number", |
|
minimum:0,maximum:1,default:0},"raster-brightness-max":{type:"number",minimum:0,maximum:1,default:1},"raster-saturation":{type:"number",minimum:-1,maximum:1,default:0},"raster-contrast":{type:"number",minimum:-1,maximum:1,default:0},"raster-fade-duration":{type:"number",minimum:0,default:300}};q.circlePaintDefinition={"circle-blur":{type:"number",minimum:0,default:0},"circle-color":{type:"color",default:[0,0,0,1]},"circle-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-radius":{type:"number", |
|
minimum:0,default:5},"circle-stroke-color":{type:"color",default:[0,0,0,1]},"circle-stroke-opacity":{type:"number",minimum:0,maximum:1,default:1},"circle-stroke-width":{type:"number",minimum:0,default:0},"circle-translate":{type:"array",value:"number",length:2,default:[0,0]},"circle-translate-anchor":{type:"enum",values:["map","viewport"],default:b.TranslateAnchor.MAP}};b.StyleDefinition=q;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/symbols/cim/enums":function(){define(["exports"], |
|
function(b){b.CapType=void 0;(function(a){a[a.BUTT=0]="BUTT";a[a.ROUND=1]="ROUND";a[a.SQUARE=2]="SQUARE";a[a.UNKNOWN=4]="UNKNOWN"})(b.CapType||(b.CapType={}));b.JoinType=void 0;(function(a){a[a.BEVEL=0]="BEVEL";a[a.ROUND=1]="ROUND";a[a.MITER=2]="MITER";a[a.UNKNOWN=4]="UNKNOWN"})(b.JoinType||(b.JoinType={}));b.Alignment=void 0;(function(a){a[a.SCREEN=0]="SCREEN";a[a.MAP=1]="MAP"})(b.Alignment||(b.Alignment={}));b.ExternalColorMixMode=void 0;(function(a){a[a.Tint=0]="Tint";a[a.Ignore=1]="Ignore";a[a.Multiply= |
|
99]="Multiply"})(b.ExternalColorMixMode||(b.ExternalColorMixMode={}));b.ExtremityPlacement=void 0;(function(a){a.Both="Both";a.JustBegin="JustBegin";a.JustEnd="JustEnd";a.None="None"})(b.ExtremityPlacement||(b.ExtremityPlacement={}));b.FillMode=void 0;(function(a){a[a.Mosaic=0]="Mosaic";a[a.Centered=1]="Centered"})(b.FillMode||(b.FillMode={}));b.FontEffects=void 0;(function(a){a[a.Normal=0]="Normal";a[a.Superscript=1]="Superscript";a[a.Subscript=2]="Subscript"})(b.FontEffects||(b.FontEffects={})); |
|
b.FontEncoding=void 0;(function(a){a[a.MSSymbol=0]="MSSymbol";a[a.Unicode=1]="Unicode"})(b.FontEncoding||(b.FontEncoding={}));b.FontType=void 0;(function(a){a[a.Unspecified=0]="Unspecified";a[a.TrueType=1]="TrueType";a[a.PSOpenType=2]="PSOpenType";a[a.TTOpenType=3]="TTOpenType";a[a.Type1=4]="Type1"})(b.FontType||(b.FontType={}));b.AngleAlignment=void 0;(function(a){a[a.Display=0]="Display";a[a.Map=1]="Map"})(b.AngleAlignment||(b.AngleAlignment={}));b.AnimatedSymbolRepeatType=void 0;(function(a){a.None= |
|
"None";a.Loop="Loop";a.Oscillate="Oscillate"})(b.AnimatedSymbolRepeatType||(b.AnimatedSymbolRepeatType={}));b.DominantSizeAxis=void 0;(function(a){a[a.Z=0]="Z";a[a.X=1]="X";a[a.Y=2]="Y"})(b.DominantSizeAxis||(b.DominantSizeAxis={}));b.RotationOrder=void 0;(function(a){a[a.XYZ=0]="XYZ";a[a.ZXY=1]="ZXY";a[a.YXZ=2]="YXZ"})(b.RotationOrder||(b.RotationOrder={}));b.BalloonCalloutStyle=void 0;(function(a){a[a.Rectangle=0]="Rectangle";a[a.RoundedRectangle=1]="RoundedRectangle";a[a.Oval=2]="Oval"})(b.BalloonCalloutStyle|| |
|
(b.BalloonCalloutStyle={}));b.BlendingMode=void 0;(function(a){a[a.None=0]="None";a[a.Alpha=1]="Alpha";a[a.Screen=2]="Screen";a[a.Multiply=3]="Multiply";a[a.Add=4]="Add"})(b.BlendingMode||(b.BlendingMode={}));b.BlockProgression=void 0;(function(a){a[a.TTB=0]="TTB";a[a.RTL=1]="RTL";a[a.BTT=2]="BTT"})(b.BlockProgression||(b.BlockProgression={}));b.BillBoardMode=void 0;(function(a){a[a.None=0]="None";a[a.SignPost=1]="SignPost";a[a.FaceNearPlane=2]="FaceNearPlane"})(b.BillBoardMode||(b.BillBoardMode= |
|
{}));b.CGAAttributeType=void 0;(function(a){a[a.Float=0]="Float";a[a.String=1]="String";a[a.Boolean=2]="Boolean"})(b.CGAAttributeType||(b.CGAAttributeType={}));b.ClippingType=void 0;(function(a){a[a.Intersect=0]="Intersect";a[a.Subtract=1]="Subtract"})(b.ClippingType||(b.ClippingType={}));b.GeometricEffectArrowType=void 0;(function(a){a.OpenEnded="OpenEnded";a.Block="Block";a.Crossed="Crossed"})(b.GeometricEffectArrowType||(b.GeometricEffectArrowType={}));b.GeometricEffectControlMeasureLineRule=void 0; |
|
(function(a){a.FullGeometry="FullGeometry";a.PerpendicularFromFirstSegment="PerpendicularFromFirstSegment";a.ReversedFirstSegment="ReversedFirstSegment";a.PerpendicularToSecondSegment="PerpendicularToSecondSegment";a.SecondSegmentWithTicks="SecondSegmentWithTicks";a.DoublePerpendicular="DoublePerpendicular";a.OppositeToFirstSegment="OppositeToFirstSegment";a.TriplePerpendicular="TriplePerpendicular";a.HalfCircleFirstSegment="HalfCircleFirstSegment";a.HalfCircleSecondSegment="HalfCircleSecondSegment"; |
|
a.HalfCircleExtended="HalfCircleExtended";a.OpenCircle="OpenCircle";a.CoverageEdgesWithTicks="CoverageEdgesWithTicks";a.GapExtentWithDoubleTicks="GapExtentWithDoubleTicks";a.GapExtentMidline="GapExtentMidline";a.Chevron="Chevron";a.PerpendicularWithArc="PerpendicularWithArc";a.ClosedHalfCircle="ClosedHalfCircle";a.TripleParallelExtended="TripleParallelExtended";a.ParallelWithTicks="ParallelWithTicks";a.Parallel="Parallel";a.PerpendicularToFirstSegment="PerpendicularToFirstSegment";a.ParallelOffset= |
|
"ParallelOffset";a.OffsetOpposite="OffsetOpposite";a.OffsetSame="OffsetSame";a.CircleWithArc="CircleWithArc";a.DoubleJog="DoubleJog";a.PerpendicularOffset="PerpendicularOffset";a.LineExcludingLastSegment="LineExcludingLastSegment";a.MultivertexArrow="MultivertexArrow";a.CrossedArrow="CrossedArrow";a.ChevronArrow="ChevronArrow";a.ChevronArrowOffset="ChevronArrowOffset";a.PartialFirstSegment="PartialFirstSegment";a.Arch="Arch";a.CurvedParallelTicks="CurvedParallelTicks";a.Arc90Degrees="Arc90Degrees"; |
|
a.TipWithPerpendicularAndTicks="TipWithPerpendicularAndTicks"})(b.GeometricEffectControlMeasureLineRule||(b.GeometricEffectControlMeasureLineRule={}));b.GeometricEffectDonutMethod=void 0;(function(a){a.Mitered="Mitered";a.Bevelled="Bevelled";a.Rounded="Rounded";a.Square="Square";a.TrueBuffer="TrueBuffer"})(b.GeometricEffectDonutMethod||(b.GeometricEffectDonutMethod={}));b.GeometricEffectEnclosingPolygonMethod=void 0;(function(a){a.ClosePath="ClosePath";a.ConvexHull="ConvexHull";a.RectangularBox="RectangularBox"})(b.GeometricEffectEnclosingPolygonMethod|| |
|
(b.GeometricEffectEnclosingPolygonMethod={}));b.GeometricEffectExtensionOrigin=void 0;(function(a){a.BeginningOfLine="BeginningOfLine";a.EndOfLine="EndOfLine"})(b.GeometricEffectExtensionOrigin||(b.GeometricEffectExtensionOrigin={}));b.GeometricEffectOffsetMethod=void 0;(function(a){a.Mitered="Mitered";a.Bevelled="Bevelled";a.Rounded="Rounded";a.Square="Square"})(b.GeometricEffectOffsetMethod||(b.GeometricEffectOffsetMethod={}));b.GeometricEffectOffsetOption=void 0;(function(a){a.Fast="Fast";a.Accurate= |
|
"Accurate"})(b.GeometricEffectOffsetOption||(b.GeometricEffectOffsetOption={}));b.GeometricEffectOffsetTangentMethod=void 0;(function(a){a.BeginningOfLine="BeginningOfLine";a.EndOfLine="EndOfLine"})(b.GeometricEffectOffsetTangentMethod||(b.GeometricEffectOffsetTangentMethod={}));b.GeometricEffectWaveform=void 0;(function(a){a.Sinus="Sinus";a.Square="Square";a.Triangle="Triangle";a.Random="Random"})(b.GeometricEffectWaveform||(b.GeometricEffectWaveform={}));b.GlyphHinting=void 0;(function(a){a[a.None= |
|
0]="None";a[a.Default=1]="Default";a[a.Force=2]="Force"})(b.GlyphHinting||(b.GlyphHinting={}));b.GradientAlignment=void 0;(function(a){a[a.Buffered=0]="Buffered";a[a.Left=1]="Left";a[a.Right=2]="Right";a[a.AlongLine=3]="AlongLine"})(b.GradientAlignment||(b.GradientAlignment={}));b.GradientFillMethod=void 0;(function(a){a[a.Linear=0]="Linear";a[a.Rectangular=1]="Rectangular";a[a.Circular=2]="Circular";a[a.Buffered=3]="Buffered"})(b.GradientFillMethod||(b.GradientFillMethod={}));b.GradientStrokeType= |
|
void 0;(function(a){a[a.Discrete=0]="Discrete";a[a.Continuous=1]="Continuous"})(b.GradientStrokeType||(b.GradientStrokeType={}));b.GradientStrokeMethod=void 0;(function(a){a[a.AcrossLine=0]="AcrossLine";a[a.AloneLine=1]="AloneLine"})(b.GradientStrokeMethod||(b.GradientStrokeMethod={}));b.HorizontalAlignment=void 0;(function(a){a[a.Left=0]="Left";a[a.Right=1]="Right";a[a.Center=2]="Center";a[a.Justify=3]="Justify"})(b.HorizontalAlignment||(b.HorizontalAlignment={}));b.LeaderLineStyle=void 0;(function(a){a[a.Base= |
|
0]="Base";a[a.MidPoint=1]="MidPoint";a[a.ThreePoint=2]="ThreePoint";a[a.FourPoint=3]="FourPoint";a[a.Underline=4]="Underline";a[a.CircularCW=5]="CircularCW";a[a.CircularCCW=6]="CircularCCW"})(b.LeaderLineStyle||(b.LeaderLineStyle={}));b.LineCapStyle=void 0;(function(a){a.Butt="Butt";a.Round="Round";a.Square="Square"})(b.LineCapStyle||(b.LineCapStyle={}));b.LineDashEnding=void 0;(function(a){a.NoConstraint="NoConstraint";a.HalfPattern="HalfPattern";a.HalfGap="HalfGap";a.FullPattern="FullPattern";a.FullGap= |
|
"FullGap";a.Custom="Custom"})(b.LineDashEnding||(b.LineDashEnding={}));b.LineDecorationStyle=void 0;(function(a){a[a.None=-1]="None";a[a.Custom=0]="Custom";a[a.Circle=1]="Circle";a[a.OpenArrow=2]="OpenArrow";a[a.ClosedArrow=3]="ClosedArrow";a[a.Diamond=4]="Diamond"})(b.LineDecorationStyle||(b.LineDecorationStyle={}));b.LineGapType=void 0;(function(a){a[a.ExtraLeading=0]="ExtraLeading";a[a.Multiple=1]="Multiple";a[a.Exact=2]="Exact"})(b.LineGapType||(b.LineGapType={}));b.LineJoinStyle=void 0;(function(a){a.Bevel= |
|
"Bevel";a.Round="Round";a.Miter="Miter"})(b.LineJoinStyle||(b.LineJoinStyle={}));b.ExpressionReturnType=void 0;(function(a){a[a.Default=0]="Default";a[a.String=1]="String";a[a.Numeric=2]="Numeric"})(b.ExpressionReturnType||(b.ExpressionReturnType={}));b.MarkerPlacementType=void 0;(function(a){a[a.InsidePolygon=0]="InsidePolygon";a[a.PolygonCenter=1]="PolygonCenter";a[a.RandomlyInsidePolygon=2]="RandomlyInsidePolygon"})(b.MarkerPlacementType||(b.MarkerPlacementType={}));b.MaterialMode=void 0;(function(a){a[a.Tint= |
|
0]="Tint";a[a.Replace=1]="Replace";a[a.Multiply=2]="Multiply"})(b.MaterialMode||(b.MaterialMode={}));b.PlacementClip=void 0;(function(a){a[a.ClipAtBoundary=0]="ClipAtBoundary";a[a.RemoveIfCenterOutsideBoundary=1]="RemoveIfCenterOutsideBoundary";a[a.DoNotTouchBoundary=2]="DoNotTouchBoundary";a[a.DoNotClip=3]="DoNotClip"})(b.PlacementClip||(b.PlacementClip={}));b.PlacementEndings=void 0;(function(a){a.NoConstraint="NoConstraint";a.WithMarkers="WithMarkers";a.WithFullGap="WithFullGap";a.WithHalfGap= |
|
"WithHalfGap";a.Custom="Custom"})(b.PlacementEndings||(b.PlacementEndings={}));b.PlacementGridType=void 0;(function(a){a.Fixed="Fixed";a.Random="Random";a.RandomFixedQuantity="RandomFixedQuantity"})(b.PlacementGridType||(b.PlacementGridType={}));b.PlacementOnLineRelativeTo=void 0;(function(a){a.LineMiddle="LineMiddle";a.LineBeginning="LineBeginning";a.LineEnd="LineEnd";a.SegmentMidpoint="SegmentMidpoint"})(b.PlacementOnLineRelativeTo||(b.PlacementOnLineRelativeTo={}));b.PlacementPolygonCenterMethod= |
|
void 0;(function(a){a.OnPolygon="OnPolygon";a.CenterOfMass="CenterOfMass";a.BoundingBoxCenter="BoundingBoxCenter"})(b.PlacementPolygonCenterMethod||(b.PlacementPolygonCenterMethod={}));b.PlacementRandomlyAlongLineRandomization=void 0;(function(a){a[a.Low=0]="Low";a[a.Medium=1]="Medium";a[a.High=2]="High"})(b.PlacementRandomlyAlongLineRandomization||(b.PlacementRandomlyAlongLineRandomization={}));b.PlacementStepPosition=void 0;(function(a){a[a.MarkerCenter=0]="MarkerCenter";a[a.MarkerBounds=1]="MarkerBounds"})(b.PlacementStepPosition|| |
|
(b.PlacementStepPosition={}));b.PointSymbolCalloutScale=void 0;(function(a){a[a.None=0]="None";a[a.PropUniform=1]="PropUniform";a[a.PropNonuniform=2]="PropNonuniform";a[a.DifUniform=3]="DifUniform";a[a.DifNonuniform=4]="DifNonuniform"})(b.PointSymbolCalloutScale||(b.PointSymbolCalloutScale={}));b.Simple3DLineStyle=void 0;(function(a){a.Tube="Tube";a.Strip="Strip";a.Wall="Wall"})(b.Simple3DLineStyle||(b.Simple3DLineStyle={}));b.SizeVariationMethod=void 0;(function(a){a[a.Random=0]="Random";a[a.Increasing= |
|
1]="Increasing";a[a.Decreasing=2]="Decreasing";a[a.IncreasingThenDecreasing=3]="IncreasingThenDecreasing"})(b.SizeVariationMethod||(b.SizeVariationMethod={}));b.SymbolUnits=void 0;(function(a){a[a.Relative=0]="Relative";a[a.Absolute=1]="Absolute"})(b.SymbolUnits||(b.SymbolUnits={}));b.TextCase=void 0;(function(a){a[a.Normal=0]="Normal";a[a.LowerCase=1]="LowerCase";a[a.Allcaps=2]="Allcaps"})(b.TextCase||(b.TextCase={}));b.TextReadingDirection=void 0;(function(a){a[a.LTR=0]="LTR";a[a.RTL=1]="RTL"})(b.TextReadingDirection|| |
|
(b.TextReadingDirection={}));b.TextureFilter=void 0;(function(a){a.Draft="Draft";a.Picture="Picture";a.Text="Text"})(b.TextureFilter||(b.TextureFilter={}));b.VerticalAlignment=void 0;(function(a){a[a.Top=0]="Top";a[a.Center=1]="Center";a[a.Baseline=2]="Baseline";a[a.Bottom=3]="Bottom"})(b.VerticalAlignment||(b.VerticalAlignment={}));b.VerticalGlyphOrientation=void 0;(function(a){a[a.Right=0]="Right";a[a.Upright=1]="Upright"})(b.VerticalGlyphOrientation||(b.VerticalGlyphOrientation={}));b.WaterbodySize= |
|
void 0;(function(a){a[a.Small=0]="Small";a[a.Medium=1]="Medium";a[a.Large=2]="Large"})(b.WaterbodySize||(b.WaterbodySize={}));b.WaveStrength=void 0;(function(a){a[a.Calm=0]="Calm";a[a.Rippled=1]="Rippled";a[a.Slight=2]="Slight";a[a.Moderate=3]="Moderate"})(b.WaveStrength||(b.WaveStrength={}));Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/style/StyleLayer":function(){define("exports ../../../../../geometry/support/aaBoundingRect ../enums ../GeometryUtils ../shaders/VTLBackgroundMaterial ../shaders/VTLCircleMaterial ../shaders/VTLFillMaterial ../shaders/VTLLineMaterial ../shaders/VTLSymbolMaterial ./Filter ./StyleDefinition ./StyleProperty ../../webgl/definitions".split(" "), |
|
function(b,a,q,e,k,g,h,n,c,f,l,x,B){function u(r){r=r?.getGeometry();if(null==r)return null;let y=Infinity,w=Infinity,F=-Infinity,I=-Infinity;for(const M of r)if(M)for(const O of M)y=Math.min(y,O.x),w=Math.min(w,O.y),F=Math.max(F,O.x),I=Math.max(I,O.y);return a.fromValues(y,w,F,I)}b.CapType=void 0;(function(r){r[r.BUTT=0]="BUTT";r[r.ROUND=1]="ROUND";r[r.SQUARE=2]="SQUARE";r[r.UNKNOWN=4]="UNKNOWN"})(b.CapType||(b.CapType={}));class p{constructor(r,y,w,F,I,M){this.layer=r;this.feature=y;this.bounds= |
|
w;this.normalizationRatio=F;this.normalizationOffsetX=I;this.normalizationOffsetY=M}}class v{constructor(r,y,w,F){this.type=r;this.typeName=y.type;this.id=y.id;this.source=y.source;this.sourceLayer=y["source-layer"];this.minzoom=y.minzoom;this.maxzoom=y.maxzoom;this.filter=y.filter;this.layout=y.layout;this.paint=y.paint;this.z=w;this.uid=F;switch(r){case l.StyleLayerType.BACKGROUND:this._layoutDefinition=l.StyleDefinition.backgroundLayoutDefinition;this._paintDefinition=l.StyleDefinition.backgroundPaintDefinition; |
|
break;case l.StyleLayerType.FILL:this._layoutDefinition=l.StyleDefinition.fillLayoutDefinition;this._paintDefinition=l.StyleDefinition.fillPaintDefinition;break;case l.StyleLayerType.LINE:this._layoutDefinition=l.StyleDefinition.lineLayoutDefinition;this._paintDefinition=l.StyleDefinition.linePaintDefinition;break;case l.StyleLayerType.SYMBOL:this._layoutDefinition=l.StyleDefinition.symbolLayoutDefinition;this._paintDefinition=l.StyleDefinition.symbolPaintDefinition;break;case l.StyleLayerType.CIRCLE:this._layoutDefinition= |
|
l.StyleDefinition.circleLayoutDefinition,this._paintDefinition=l.StyleDefinition.circlePaintDefinition}this._layoutProperties=this._parseLayout(this.layout);this._paintProperties=this._parsePaint(this.paint)}getFeatureFilter(){return void 0!==this._featureFilter?this._featureFilter:this._featureFilter=f.createFilter(this.filter)}getLayoutProperty(r){return this._layoutProperties[r]}getPaintProperty(r){return this._paintProperties[r]}getLayoutValue(r,y,w){let F;const I=this._layoutProperties[r];I&& |
|
(F=I.getValue(y,w));void 0===F&&(F=this._layoutDefinition[r]["default"]);return F}getPaintValue(r,y,w){let F;const I=this._paintProperties[r];I&&(F=I.getValue(y,w));void 0===F&&(F=this._paintDefinition[r]["default"]);return F}isPainterDataDriven(){const r=this._paintProperties;if(r)for(const y in r)if(r[y].isDataDriven)return!0;return!1}isIntersectingFeature(r,y,w,F,I,M,O){return!1}getFeatureInflatedBounds(r,y,w,F){return null}_parseLayout(r){const y={};for(const w in r){const F=this._layoutDefinition[w]; |
|
F&&(y[w]=new x(F,r[w]))}return y}_parsePaint(r){const y={};for(const w in r){const F=this._paintDefinition[w];F&&(y[w]=new x(F,r[w]))}return y}computeAttributesKey(r,y,w,F){let I=0,M=0;for(const O of y){y=3;if(!O||O!==F){const {isLayout:Q,isOptional:V}=w[O];y=Q?this.getLayoutProperty(O):this.getPaintProperty(O);y=y?.interpolator?2:y?.isDataDriven?1:V&&!y?3:0}M|=y<<I;I+=2}return M<<3|r}}class E extends v{constructor(r,y,w,F){super(r,y,w,F);this.backgroundMaterial=new k.VTLBackgroundMaterial(this.computeAttributesKey(q.ShaderProgramType.BACKGROUND, |
|
k.VTLBackgroundMaterial.ATTRIBUTES,k.VTLBackgroundMaterial.ATTRIBUTES_INFO))}}class H extends v{constructor(r,y,w,F){super(r,y,w,F);r=this.getPaintProperty("fill-color");y=this.getPaintProperty("fill-opacity");w=this.getPaintProperty("fill-pattern");this.hasDataDrivenColor=r?.isDataDriven;this.hasDataDrivenOpacity=y?.isDataDriven;this.hasDataDrivenFill=this.hasDataDrivenColor||this.hasDataDrivenOpacity||w?.isDataDriven;y=this.getPaintProperty("fill-outline-color");this.outlineUsesFillColor=!y;this.hasDataDrivenOutlineColor= |
|
y?.isDataDriven;this.hasDataDrivenOutline=y?y.isDataDriven:r?r.isDataDriven:!1;this.hasDataDrivenOutline=(y?this.hasDataDrivenOutlineColor:this.hasDataDrivenColor)||this.hasDataDrivenOpacity;this.fillMaterial=new h.VTLFillMaterial(this.computeAttributesKey(q.ShaderProgramType.FILL,h.VTLFillMaterial.ATTRIBUTES,h.VTLFillMaterial.ATTRIBUTES_INFO));this.outlineMaterial=new h.VTLOutlineMaterial(this.computeAttributesKey(q.ShaderProgramType.OUTLINE,this.outlineUsesFillColor?h.VTLOutlineMaterial.ATTRIBUTES_FILL: |
|
h.VTLOutlineMaterial.ATTRIBUTES_OUTLINE,this.outlineUsesFillColor?h.VTLOutlineMaterial.ATTRIBUTES_INFO_FILL:h.VTLOutlineMaterial.ATTRIBUTES_INFO_OUTLINE),this.outlineUsesFillColor)}getFeatureInflatedBounds(r,y,w,F){w=u(r);if(!w)return null;r=this.getPaintValue("fill-translate",y,r);F*=Math.max(r[0],r[1]);w[0]-=F;w[2]-=F;w[1]+=F;w[3]+=F;return w}isIntersectingFeature(r,y,w,F,I,M,O){const Q=F.getGeometry();if(!Q)return!1;const V=8/O.normalizationRatio;r=r/O.normalizationRatio+O.normalizationOffsetX; |
|
y=y/O.normalizationRatio+O.normalizationOffsetY;F=e.translateAnchor(this.getPaintValue("fill-translate",I,F),this.getPaintValue("fill-translate-anchor",I,F),M,8);r-=V*F.x;y-=V*F.y;return e.pointInPolygon(r,y,Q)?!0:e.distanceFromToPolylineWithinThreshold(r,y,Q,V*w)}}class G extends v{constructor(r,y,w,F){super(r,y,w,F);r=this.getPaintProperty("line-pattern");this.lineMaterial=new n.VTLLineMaterial(this.computeAttributesKey(q.ShaderProgramType.LINE,n.VTLLineMaterial.ATTRIBUTES,n.VTLLineMaterial.ATTRIBUTES_INFO, |
|
r?"line-dasharray":""));this.hasDataDrivenLine=this.getPaintProperty("line-blur")?.isDataDriven||this.getPaintProperty("line-color")?.isDataDriven||this.getPaintProperty("line-gap-width")?.isDataDriven||this.getPaintProperty("line-offset")?.isDataDriven||this.getPaintProperty("line-opacity")?.isDataDriven||this.getPaintProperty("line-pattern")?.isDataDriven||this.getPaintProperty("line-dasharray")?.isDataDriven||this.getLayoutProperty("line-cap")?.isDataDriven||this.getPaintProperty("line-width")?.isDataDriven; |
|
this.canUseThinTessellation=!1;!this.hasDataDrivenLine&&(r=this.getPaintProperty("line-width"),!r||"number"===typeof r&&.5*r<B.thinLineHalfWidthThreshold)&&(r=this.getPaintProperty("line-offset"),!r||"number"===typeof r&&0===r)&&(this.canUseThinTessellation=!0)}getDashKey(r,y){switch(y){case b.CapType.BUTT:y="Butt";break;case b.CapType.ROUND:y="Round";break;case b.CapType.SQUARE:y="Square";break;default:y="Butt"}return`dasharray-[${r.toString()}]-${y}`}getFeatureInflatedBounds(r,y,w,F){w=u(r);if(!w)return null; |
|
var I=this.getPaintValue("line-translate",y,r);I=F*Math.max(I[0],I[1]);w[0]-=I;w[2]-=I;w[1]+=I;w[3]+=I;I=F*Math.abs(this.getPaintValue("line-offset",y,r)||0);r=this.getPaintValue("line-width",y,r);F*=r/2;w[0]-=I+F;w[1]-=I+F;w[2]+=I+F;w[3]+=I+F;return w}isIntersectingFeature(r,y,w,F,I,M,O){let Q=F.getGeometry();if(!Q)return!1;const V=8/O.normalizationRatio;r=r/O.normalizationRatio+O.normalizationOffsetX;y=y/O.normalizationRatio+O.normalizationOffsetY;M=e.translateAnchor(this.getPaintValue("line-translate", |
|
I,F),this.getPaintValue("line-translate-anchor",I,F),M,8);r-=V*M.x;y-=V*M.y;M=V*this.getPaintValue("line-offset",I,F)||0;0!==M&&(Q=e.offsetLine(Q,-M));F=this.getPaintValue("line-width",I,F);return e.distanceFromToPolylineWithinThreshold(r,y,Q,V*(w+F/2))}}class z extends v{constructor(r,y,w,F){super(r,y,w,F);this.iconMaterial=new c.VTLIconMaterial(this.computeAttributesKey(q.ShaderProgramType.ICON,c.VTLIconMaterial.ATTRIBUTES,c.VTLIconMaterial.ATTRIBUTES_INFO));this.textMaterial=new c.VTLTextMaterial(this.computeAttributesKey(q.ShaderProgramType.TEXT, |
|
c.VTLTextMaterial.ATTRIBUTES,c.VTLTextMaterial.ATTRIBUTES_INFO));this.hasDataDrivenIcon=this.getPaintProperty("icon-color")?.isDataDriven||this.getPaintProperty("icon-halo-blur")?.isDataDriven||this.getPaintProperty("icon-halo-color")?.isDataDriven||this.getPaintProperty("icon-halo-width")?.isDataDriven||this.getPaintProperty("icon-opacity")?.isDataDriven||this.getLayoutProperty("icon-size")?.isDataDriven;this.hasDataDrivenText=this.getPaintProperty("text-color")?.isDataDriven||this.getPaintProperty("text-halo-blur")?.isDataDriven|| |
|
this.getPaintProperty("text-halo-color")?.isDataDriven||this.getPaintProperty("text-halo-width")?.isDataDriven||this.getPaintProperty("text-opacity")?.isDataDriven||this.getLayoutProperty("text-size")?.isDataDriven}}class D extends v{constructor(r,y,w,F){super(r,y,w,F);this.circleMaterial=new g.VTLCircleMaterial(this.computeAttributesKey(q.ShaderProgramType.CIRCLE,g.VTLCircleMaterial.ATTRIBUTES,g.VTLCircleMaterial.ATTRIBUTES_INFO))}getFeatureInflatedBounds(r,y,w,F){w=u(r);if(!w)return null;var I= |
|
this.getPaintValue("circle-translate",y,r);I=Math.max(I[0],I[1]);w[0]-=I;w[2]-=I;w[1]+=I;w[3]+=I;r=8*(this.getPaintValue("circle-radius",y,r)+this.getPaintValue("circle-stroke-width",y,r));F*=r/2;w[0]-=F;w[1]-=F;w[2]+=F;w[3]+=F;return w}isIntersectingFeature(r,y,w,F,I,M,O){var Q=F.getGeometry();if(!Q)return!1;const V=8/O.normalizationRatio;r=r/O.normalizationRatio+O.normalizationOffsetX;y=y/O.normalizationRatio+O.normalizationOffsetY;w*=V;M=e.translateAnchor(this.getPaintValue("circle-translate", |
|
I,F),this.getPaintValue("circle-translate-anchor",I,F),M,V);F=V*(this.getPaintValue("circle-radius",I,F)+this.getPaintValue("circle-stroke-width",I,F));for(const X of Q)if(X)for(const Z of X)if(Q=Z.x+M.x,I=Z.y+M.y,Math.sqrt((r-Q)*(r-Q)+(y-I)*(y-I))-w<=F)return!0;return!1}}class A{constructor(r,y,w){this.allowOverlap=r.getLayoutValue("icon-allow-overlap",y);this.ignorePlacement=r.getLayoutValue("icon-ignore-placement",y);this.keepUpright=r.getLayoutValue("icon-keep-upright",y);this.optional=r.getLayoutValue("icon-optional", |
|
y);this.rotationAlignment=r.getLayoutValue("icon-rotation-alignment",y);this.rotationAlignment===l.RotationAlignment.AUTO&&(this.rotationAlignment=w?l.RotationAlignment.MAP:l.RotationAlignment.VIEWPORT);w=r.getLayoutProperty("icon-anchor");w?.isDataDriven?this._anchorProp=w:this.anchor=r.getLayoutValue("icon-anchor",y);w=r.getLayoutProperty("icon-offset");w?.isDataDriven?this._offsetProp=w:this.offset=r.getLayoutValue("icon-offset",y);w=r.getLayoutProperty("icon-padding");w?.isDataDriven?this._paddingProp= |
|
w:this.padding=r.getLayoutValue("icon-padding",y);w=r.getLayoutProperty("icon-rotate");w?.isDataDriven?this._rotateProp=w:this.rotate=r.getLayoutValue("icon-rotate",y);w=r.getLayoutProperty("icon-size");w?.isDataDriven?this._sizeProp=w:this.size=r.getLayoutValue("icon-size",y)}update(r,y){this._anchorProp&&(this.anchor=this._anchorProp.getValue(r,y));this._offsetProp&&(this.offset=this._offsetProp.getValue(r,y));this._paddingProp&&(this.padding=this._paddingProp.getValue(r,y));this._rotateProp&&(this.rotate= |
|
this._rotateProp.getValue(r,y));this._sizeProp&&(this.size=this._sizeProp.getValue(r,y))}}class K{constructor(r,y,w){this.allowOverlap=r.getLayoutValue("text-allow-overlap",y);this.ignorePlacement=r.getLayoutValue("text-ignore-placement",y);this.keepUpright=r.getLayoutValue("text-keep-upright",y);this.optional=r.getLayoutValue("text-optional",y);this.rotationAlignment=r.getLayoutValue("text-rotation-alignment",y);this.rotationAlignment===l.RotationAlignment.AUTO&&(this.rotationAlignment=w?l.RotationAlignment.MAP: |
|
l.RotationAlignment.VIEWPORT);w=r.getLayoutProperty("text-anchor");w?.isDataDriven?this._anchorProp=w:this.anchor=r.getLayoutValue("text-anchor",y);w=r.getLayoutProperty("text-justify");w?.isDataDriven?this._justifyProp=w:this.justify=r.getLayoutValue("text-justify",y);w=r.getLayoutProperty("text-letter-spacing");w?.isDataDriven?this._letterSpacingProp=w:this.letterSpacing=r.getLayoutValue("text-letter-spacing",y);w=r.getLayoutProperty("text-line-height");w?.isDataDriven?this._lineHeightProp=w:this.lineHeight= |
|
r.getLayoutValue("text-line-height",y);w=r.getLayoutProperty("text-max-angle");w?.isDataDriven?this._maxAngleProp=w:this.maxAngle=r.getLayoutValue("text-max-angle",y);w=r.getLayoutProperty("text-max-width");w?.isDataDriven?this._maxWidthProp=w:this.maxWidth=r.getLayoutValue("text-max-width",y);w=r.getLayoutProperty("text-offset");w?.isDataDriven?this._offsetProp=w:this.offset=r.getLayoutValue("text-offset",y);w=r.getLayoutProperty("text-padding");w?.isDataDriven?this._paddingProp=w:this.padding=r.getLayoutValue("text-padding", |
|
y);w=r.getLayoutProperty("text-rotate");w?.isDataDriven?this._rotateProp=w:this.rotate=r.getLayoutValue("text-rotate",y);w=r.getLayoutProperty("text-size");w?.isDataDriven?this._sizeProp=w:this.size=r.getLayoutValue("text-size",y);w=r.getLayoutProperty("text-writing-mode");w?.isDataDriven?this._writingModeProp=w:this.writingMode=r.getLayoutValue("text-writing-mode",y)}update(r,y){this._anchorProp&&(this.anchor=this._anchorProp.getValue(r,y));this._justifyProp&&(this.justify=this._justifyProp.getValue(r, |
|
y));this._letterSpacingProp&&(this.letterSpacing=this._letterSpacingProp.getValue(r,y));this._lineHeightProp&&(this.lineHeight=this._lineHeightProp.getValue(r,y));this._maxAngleProp&&(this.maxAngle=this._maxAngleProp.getValue(r,y));this._maxWidthProp&&(this.maxWidth=this._maxWidthProp.getValue(r,y));this._offsetProp&&(this.offset=this._offsetProp.getValue(r,y));this._paddingProp&&(this.padding=this._paddingProp.getValue(r,y));this._rotateProp&&(this.rotate=this._rotateProp.getValue(r,y));this._sizeProp&& |
|
(this.size=this._sizeProp.getValue(r,y));this._writingModeProp&&(this.writingMode=this._writingModeProp.getValue(r,y))}}b.BackgroundStyleLayer=E;b.CircleStyleLayer=D;b.FillStyleLayer=H;b.IconLayout=A;b.IndexItem=p;b.LineStyleLayer=G;b.StyleLayer=v;b.SymbolStyleLayer=z;b.TextLayout=K;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/enums":function(){define(["exports"],function(b){b.BucketType=void 0;(function(a){a[a.FILL=1]="FILL";a[a.LINE=2]="LINE"; |
|
a[a.SYMBOL=3]="SYMBOL";a[a.CIRCLE=4]="CIRCLE"})(b.BucketType||(b.BucketType={}));b.ShaderProgramType=void 0;(function(a){a[a.BACKGROUND=0]="BACKGROUND";a[a.FILL=1]="FILL";a[a.OUTLINE=2]="OUTLINE";a[a.LINE=3]="LINE";a[a.ICON=4]="ICON";a[a.CIRCLE=5]="CIRCLE";a[a.TEXT=6]="TEXT";a[a.TILEINFO=7]="TILEINFO"})(b.ShaderProgramType||(b.ShaderProgramType={}));b.StyleUpdateType=void 0;(function(a){a[a.PAINTER_CHANGED=0]="PAINTER_CHANGED";a[a.LAYOUT_CHANGED=1]="LAYOUT_CHANGED";a[a.LAYER_CHANGED=2]="LAYER_CHANGED"; |
|
a[a.LAYER_REMOVED=3]="LAYER_REMOVED";a[a.SPRITES_CHANGED=4]="SPRITES_CHANGED"})(b.StyleUpdateType||(b.StyleUpdateType={}));Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/GeometryUtils":function(){define(["exports","../../../../geometry/support/coordsUtils","../../../../geometry/support/TileClipper"],function(b,a,q){function e(f,l){f%=l;return 0<=f?f:f+l}const k=Number.POSITIVE_INFINITY,g=Math.PI,h=128/g,n=256/360,c=1/Math.LN2;b.between=function(f, |
|
l,x){return f>=l&&f<=x||f>=x&&f<=l};b.c2pi=2*g;b.cDegTo256=n;b.cDegToRad=g/180;b.cInfinity=k;b.cPi=g;b.cRadTo256=h;b.degToByte=function(f){return e(f*n,256)};b.distanceFromToPolylineWithinThreshold=function(f,l,x,B){let u,p,v;B*=B;for(const E of x){const H=E.length;if(!(2>H)){x=E[0].x;u=E[0].y;for(let G=1;G<H;++G){p=E[G].x;v=E[G].y;if(a.distanceToSegmentSquared(f,l,x,u,p,v)<B)return!0;x=p;u=v}}}return!1};b.getTileMargins=function(f){return 8+Math.max(16*(f-14),0)};b.interpolate=function(f,l,x){return f* |
|
(1-x)+l*x};b.isCircleOverlapingRect=function(f,l,x,B,u,p,v){l=Math.max(B,Math.min(l,p))-l;x=Math.max(u,Math.min(x,v))-x;return l*l+x*x<=f*f};b.log2=function(f){return Math.log(f)*c};b.offsetLine=function(f,l){if(0===l||Number.isNaN(l))return f;const x=[],B=new q.Point(0,0),u=new q.Point(0,0),p=new q.Point(0,0);for(let E=0;E<f.length;E++){const H=f[E],G=[];for(let z=0;z<H.length;z++){var v=H[z-1];const D=H[z],A=H[z+1];0===z?B.setCoords(0,0):B.assignSub(D,v).normalize().rightPerpendicular();z===H.length- |
|
1?u.setCoords(0,0):u.assignSub(A,D).normalize().rightPerpendicular();p.assignAdd(B,u).normalize();v=p.x*u.x+p.y*u.y;0!==v&&p.scale(1/v);G.push(q.Point.add(D,p.scale(l)))}x.push(G)}return x};b.pointInPolygon=function(f,l,x){let B=0,u,p;for(const v of x){x=v.length;for(let E=1;E<x;++E)u=v[E-1],p=v[E],u.y>l!==p.y>l&&(0<(p.x-u.x)*(l-u.y)-(p.y-u.y)*(f-u.x)?B++:B--)}return 0!==B};b.positiveMod=e;b.radToByte=function(f){return e(f*h,256)};b.sqr=function(f){return f*f};b.translateAnchor=function(f,l,x,B){f= |
|
new q.Point(f[0],f[1]);f.scale(B);"viewport"===l&&(l=Math.PI/180*-x,f.rotate(Math.cos(l),Math.sin(l)));return f};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/geometry/support/TileClipper":function(){define(["exports"],function(b){b.GeometryType=void 0;(function(c){c[c.Unknown=0]="Unknown";c[c.Point=1]="Point";c[c.LineString=2]="LineString";c[c.Polygon=3]="Polygon"})(b.GeometryType||(b.GeometryType={}));class a{constructor(c,f){this.x=c;this.y=f}clone(){return new a(this.x, |
|
this.y)}equals(c,f){return c===this.x&&f===this.y}isEqual(c){return c.x===this.x&&c.y===this.y}setCoords(c,f){this.x=c;this.y=f;return this}normalize(){var c=this.x;const f=this.y;c=Math.sqrt(c*c+f*f);this.x/=c;this.y/=c;return this}rightPerpendicular(){const c=this.x;this.x=this.y;this.y=-c;return this}leftPerpendicular(){const c=this.x;this.x=-this.y;this.y=c;return this}move(c,f){this.x+=c;this.y+=f;return this}assign(c){this.x=c.x;this.y=c.y;return this}assignAdd(c,f){this.x=c.x+f.x;this.y=c.y+ |
|
f.y;return this}assignSub(c,f){this.x=c.x-f.x;this.y=c.y-f.y;return this}rotate(c,f){const l=this.x,x=this.y;this.x=l*c-x*f;this.y=l*f+x*c;return this}scale(c){this.x*=c;this.y*=c;return this}length(){const c=this.x,f=this.y;return Math.sqrt(c*c+f*f)}sub(c){this.x-=c.x;this.y-=c.y;return this}add(c){this.x+=c.x;this.y+=c.y;return this}static distance(c,f){const l=f.x-c.x;c=f.y-c.y;return Math.sqrt(l*l+c*c)}static add(c,f){return new a(c.x+f.x,c.y+f.y)}static sub(c,f){return new a(c.x-f.x,c.y-f.y)}} |
|
class q{constructor(c,f,l){this.ratio=c;this.x=f;this.y=l}}class e{constructor(c,f,l,x=8,B=8){this._lines=[];this._starts=[];this.validateTessellation=!0;this._pixelRatio=x;this._pixelMargin=B;this._tileSize=512*x;this._dz=c;this._yPos=f;this._xPos=l}setPixelMargin(c){c!==this._pixelMargin&&(this._pixelMargin=c,this.setExtent(this._extent))}setExtent(c){this._extent=c;this._finalRatio=this._tileSize/c*(1<<this._dz);let f=this._pixelRatio*this._pixelMargin;f/=this._finalRatio;c>>=this._dz;f>c&&(f= |
|
c);this._margin=f;this._xmin=c*this._xPos-f;this._ymin=c*this._yPos-f;this._xmax=this._xmin+c+2*f;this._ymax=this._ymin+c+2*f}reset(c){this._type=c;this._lines=[];this._starts=[];this._line=null;this._start=0}moveTo(c,f){this._pushLine();this._prevIsIn=this._isIn(c,f);this._moveTo(c,f,this._prevIsIn);this._prevPt=new a(c,f);this._firstPt=new a(c,f);this._dist=0}lineTo(c,f){const l=this._isIn(c,f),x=new a(c,f),B=a.distance(this._prevPt,x);if(l)if(this._prevIsIn)this._lineTo(c,f,!0);else{var u=this._prevPt; |
|
var p=x;c=this._intersect(p,u);this._start=this._dist+B*(1-this._r);this._lineTo(c.x,c.y,!0);this._lineTo(p.x,p.y,!0)}else if(this._prevIsIn)p=this._prevPt,u=x,c=this._intersect(p,u),this._lineTo(c.x,c.y,!0),this._lineTo(u.x,u.y,!1);else{const E=this._prevPt;if(!(E.x<=this._xmin&&x.x<=this._xmin||E.x>=this._xmax&&x.x>=this._xmax||E.y<=this._ymin&&x.y<=this._ymin||E.y>=this._ymax&&x.y>=this._ymax)){c=[];if(E.x<this._xmin&&x.x>this._xmin||E.x>this._xmin&&x.x<this._xmin){f=(this._xmin-E.x)/(x.x-E.x); |
|
var v=E.y+f*(x.y-E.y);v<=this._ymin?p=!1:v>=this._ymax?p=!0:c.push(new q(f,this._xmin,v))}if(E.x<this._xmax&&x.x>this._xmax||E.x>this._xmax&&x.x<this._xmax)f=(this._xmax-E.x)/(x.x-E.x),v=E.y+f*(x.y-E.y),v<=this._ymin?p=!1:v>=this._ymax?p=!0:c.push(new q(f,this._xmax,v));if(E.y<this._ymin&&x.y>this._ymin||E.y>this._ymin&&x.y<this._ymin)f=(this._ymin-E.y)/(x.y-E.y),v=E.x+f*(x.x-E.x),v<=this._xmin?u=!1:v>=this._xmax?u=!0:c.push(new q(f,v,this._ymin));if(E.y<this._ymax&&x.y>this._ymax||E.y>this._ymax&& |
|
x.y<this._ymax)f=(this._ymax-E.y)/(x.y-E.y),v=E.x+f*(x.x-E.x),v<=this._xmin?u=!1:v>=this._xmax?u=!0:c.push(new q(f,v,this._ymax));if(0===c.length)u?p?this._lineTo(this._xmax,this._ymax,!0):this._lineTo(this._xmax,this._ymin,!0):p?this._lineTo(this._xmin,this._ymax,!0):this._lineTo(this._xmin,this._ymin,!0);else if(1<c.length&&c[0].ratio>c[1].ratio)this._start=this._dist+B*c[1].ratio,this._lineTo(c[1].x,c[1].y,!0),this._lineTo(c[0].x,c[0].y,!0);else for(this._start=this._dist+B*c[0].ratio,u=0;u<c.length;u++)this._lineTo(c[u].x, |
|
c[u].y,!0)}this._lineTo(x.x,x.y,!1)}this._dist+=B;this._prevIsIn=l;this._prevPt=x}close(){if(2<this._line.length){var c=this._firstPt,f=this._prevPt;c.x===f.x&&c.y===f.y||this.lineTo(c.x,c.y);c=this._line;for(f=c.length;4<=f;)if(c[0].x===c[1].x&&c[0].x===c[f-2].x||c[0].y===c[1].y&&c[0].y===c[f-2].y)c.pop(),c[0].x=c[f-2].x,c[0].y=c[f-2].y,--f;else break}}result(c=!0){this._pushLine();if(0===this._lines.length)return null;this._type===b.GeometryType.Polygon&&c&&h.simplify(this._tileSize,this._margin* |
|
this._finalRatio,this._lines);return this._lines}resultWithStarts(){if(this._type!==b.GeometryType.LineString)throw Error("Only valid for lines");this._pushLine();const c=this._lines,f=c.length;if(0===f)return null;const l=[];for(let x=0;x<f;x++)l.push({line:c[x],start:this._starts[x]||0});return l}_isIn(c,f){return c>=this._xmin&&c<=this._xmax&&f>=this._ymin&&f<=this._ymax}_intersect(c,f){let l,x,B;if(f.x>=this._xmin&&f.x<=this._xmax)x=f.y<=this._ymin?this._ymin:this._ymax,B=(x-c.y)/(f.y-c.y),l= |
|
c.x+B*(f.x-c.x);else if(f.y>=this._ymin&&f.y<=this._ymax)l=f.x<=this._xmin?this._xmin:this._xmax,B=(l-c.x)/(f.x-c.x),x=c.y+B*(f.y-c.y);else{x=f.y<=this._ymin?this._ymin:this._ymax;l=f.x<=this._xmin?this._xmin:this._xmax;const u=(l-c.x)/(f.x-c.x),p=(x-c.y)/(f.y-c.y);u<p?(B=u,x=c.y+u*(f.y-c.y)):(B=p,l=c.x+p*(f.x-c.x))}this._r=B;return new a(l,x)}_pushLine(){this._line&&(this._type===b.GeometryType.Point?0<this._line.length&&(this._lines.push(this._line),this._starts.push(this._start)):this._type=== |
|
b.GeometryType.LineString?1<this._line.length&&(this._lines.push(this._line),this._starts.push(this._start)):this._type===b.GeometryType.Polygon&&3<this._line.length&&(this._lines.push(this._line),this._starts.push(this._start)));this._line=[];this._start=0}_moveTo(c,f,l){this._type!==b.GeometryType.Polygon?l&&(c=Math.round((c-(this._xmin+this._margin))*this._finalRatio),f=Math.round((f-(this._ymin+this._margin))*this._finalRatio),this._line.push(new a(c,f))):(l||(c<this._xmin&&(c=this._xmin),c>this._xmax&& |
|
(c=this._xmax),f<this._ymin&&(f=this._ymin),f>this._ymax&&(f=this._ymax)),c=Math.round((c-(this._xmin+this._margin))*this._finalRatio),f=Math.round((f-(this._ymin+this._margin))*this._finalRatio),this._line.push(new a(c,f)),this._isV=this._isH=!1)}_lineTo(c,f,l){if(this._type!==b.GeometryType.Polygon)if(l){c=Math.round((c-(this._xmin+this._margin))*this._finalRatio);f=Math.round((f-(this._ymin+this._margin))*this._finalRatio);if(0<this._line.length&&(l=this._line[this._line.length-1],l.equals(c,f)))return; |
|
this._line.push(new a(c,f))}else this._line&&0<this._line.length&&this._pushLine();else if(l||(c<this._xmin&&(c=this._xmin),c>this._xmax&&(c=this._xmax),f<this._ymin&&(f=this._ymin),f>this._ymax&&(f=this._ymax)),c=Math.round((c-(this._xmin+this._margin))*this._finalRatio),f=Math.round((f-(this._ymin+this._margin))*this._finalRatio),this._line&&0<this._line.length){l=this._line[this._line.length-1];const x=l.x===c,B=l.y===f;x&&B||(this._isH&&x?(l.x=c,l.y=f,l=this._line[this._line.length-2],l.x===c&& |
|
l.y===f?(this._line.pop(),1>=this._line.length?this._isV=this._isH=!1:(l=this._line[this._line.length-2],this._isH=l.x===c,this._isV=l.y===f)):(this._isH=l.x===c,this._isV=l.y===f)):this._isV&&B?(l.x=c,l.y=f,l=this._line[this._line.length-2],l.x===c&&l.y===f?(this._line.pop(),1>=this._line.length?this._isV=this._isH=!1:(l=this._line[this._line.length-2],this._isH=l.x===c,this._isV=l.y===f)):(this._isH=l.x===c,this._isV=l.y===f)):(this._line.push(new a(c,f)),this._isH=x,this._isV=B))}else this._line.push(new a(c, |
|
f))}}class k{setExtent(c){this._ratio=4096===c?1:4096/c}get validateTessellation(){return 1>this._ratio}reset(c){this._lines=[];this._line=null}moveTo(c,f){this._line&&this._lines.push(this._line);this._line=[];const l=this._ratio;this._line.push(new a(c*l,f*l))}lineTo(c,f){const l=this._ratio;this._line.push(new a(c*l,f*l))}close(){const c=this._line;c&&!c[0].isEqual(c[c.length-1])&&c.push(c[0])}result(){this._line&&this._lines.push(this._line);return 0===this._lines.length?null:this._lines}}var g; |
|
(function(c){c[c.sideLeft=0]="sideLeft";c[c.sideRight=1]="sideRight";c[c.sideTop=2]="sideTop";c[c.sideBottom=3]="sideBottom"})(g||={});class h{static simplify(c,f,l){if(l){var x=-f,B=c+f,u=-f,p=c+f;c=[];f=[];var v=l.length;for(let E=0;E<v;++E){const H=l[E];if(!H||2>H.length)continue;let G=H[0],z;const D=H.length;for(let A=1;A<D;++A)z=H[A],G.x===z.x&&(G.x<=x&&(G.y>z.y?(c.push(E),c.push(A),c.push(g.sideLeft),c.push(-1)):(f.push(E),f.push(A),f.push(g.sideLeft),f.push(-1))),G.x>=B&&(G.y<z.y?(c.push(E), |
|
c.push(A),c.push(g.sideRight),c.push(-1)):(f.push(E),f.push(A),f.push(g.sideRight),f.push(-1)))),G.y===z.y&&(G.y<=u&&(G.x<z.x?(c.push(E),c.push(A),c.push(g.sideTop),c.push(-1)):(f.push(E),f.push(A),f.push(g.sideTop),f.push(-1))),G.y>=p&&(G.x>z.x?(c.push(E),c.push(A),c.push(g.sideBottom),c.push(-1)):(f.push(E),f.push(A),f.push(g.sideBottom),f.push(-1)))),G=z}0!==c.length&&0!==f.length&&(h.fillParent(l,f,c),h.fillParent(l,c,f),x=[],h.calcDeltas(x,f,c),h.calcDeltas(x,c,f),h.addDeltas(x,l))}}static fillParent(c, |
|
f,l){const x=l.length,B=f.length;for(let H=0;H<B;H+=4){var u=f[H],p=f[H+1];const G=f[H+2],z=c[u][p-1];u=c[u][p];p=8092;let D=-1;for(let A=0;A<x;A+=4){if(l[A+2]!==G)continue;var v=l[A];const K=l[A+1];var E=c[v][K-1];v=c[v][K];switch(G){case g.sideLeft:case g.sideRight:n(z.y,E.y,v.y)&&n(u.y,E.y,v.y)&&(E=Math.abs(v.y-E.y),E<p&&(p=E,D=A));break;case g.sideTop:case g.sideBottom:n(z.x,E.x,v.x)&&n(u.x,E.x,v.x)&&(E=Math.abs(v.x-E.x),E<p&&(p=E,D=A))}}f[H+3]=D}}static calcDeltas(c,f,l){const x=f.length;for(let B= |
|
0;B<x;B+=4){const u=h.calcDelta(B,f,l,[]);c.push(f[B]);c.push(f[B+1]);c.push(f[B+2]);c.push(u)}}static calcDelta(c,f,l,x){c=f[c+3];if(-1===c)return 0;const B=x.length;if(1<B&&x[B-2]===c)return 0;x.push(c);return h.calcDelta(c,l,f,x)+1}static addDeltas(c,f){const l=c.length;let x=0;for(var B=0;B<l;B+=4){var u=c[B+3];u>x&&(x=u)}for(B=0;B<l;B+=4){u=f[c[B]];const p=c[B+1],v=x-c[B+3];switch(c[B+2]){case g.sideLeft:u[p-1].x-=v;u[p].x-=v;1===p&&(u[u.length-1].x-=v);p===u.length-1&&(u[0].x-=v);break;case g.sideRight:u[p- |
|
1].x+=v;u[p].x+=v;1===p&&(u[u.length-1].x+=v);p===u.length-1&&(u[0].x+=v);break;case g.sideTop:u[p-1].y-=v;u[p].y-=v;1===p&&(u[u.length-1].y-=v);p===u.length-1&&(u[0].y-=v);break;case g.sideBottom:u[p-1].y+=v,u[p].y+=v,1===p&&(u[u.length-1].y+=v),p===u.length-1&&(u[0].y+=v)}}}}const n=(c,f,l)=>c>=f&&c<=l||c>=l&&c<=f;b.Point=a;b.SimpleBuilder=k;b.TileClipper=e;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/shaders/VTLBackgroundMaterial":function(){define(["exports", |
|
"./VTLMaterial","../../../../webgl/enums","../../../../webgl/VertexElementDescriptor"],function(b,a,q,e){class k extends a.VTLMaterial{constructor(g){super(g)}geometryInfo(){return k.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return k.ATTRIBUTES}attributesInfo(){return k.ATTRIBUTES_INFO}}k.ATTRIBUTES=[];k.GEOMETRY_LAYOUT=[new e.VertexElementDescriptor("a_pos",2,q.DataType.BYTE,0,2)];k.ATTRIBUTES_INFO={};b.VTLBackgroundMaterial=k;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})}, |
|
"esri/views/2d/engine/vectorTiles/shaders/VTLMaterial":function(){define(["exports","../MemoryBuffer","./enums","../../../../webgl/enums","../../../../webgl/VertexElementDescriptor"],function(b,a,q,e,k){class g{constructor(c){this._locations=new Map;this._key=c}get key(){return this._key}get type(){return this._key&7}defines(){return[]}getStride(){this._layoutInfo||this._buildAttributesInfo();return this._stride}getAttributeLocations(){0===this._locations.size&&this._buildAttributesInfo();return this._locations}getLayoutInfo(){this._layoutInfo|| |
|
this._buildAttributesInfo();return this._layoutInfo}getEncodingInfos(){this._propertyEncodingInfo||this._buildAttributesInfo();return this._propertyEncodingInfo}getUniforms(){this._uniforms||this._buildAttributesInfo();return this._uniforms}getShaderHeader(){this._shaderHeader||this._buildAttributesInfo();return this._shaderHeader}getShaderMain(){this._shaderMain||this._buildAttributesInfo();return this._shaderMain}setDataUniforms(c,f,l,x,B){var u=this.getUniforms();for(const p of u){const {name:v, |
|
type:E,getValue:H}=p;u=H(l,f,x,B);if(null!==u)switch(E){case "float":c.setUniform1f(v,u);break;case "vec2":c.setUniform2fv(v,u);break;case "vec4":c.setUniform4fv(v,u)}}}encodeAttributes(c,f,l,x){const B=this.attributesInfo(),u=this.getEncodingInfos(),p=[];let v=0,E=0;for(const G of Object.keys(u)){var H=u[G];const {type:z,precisionFactor:D,isLayout:A}=B[G],K=A?l.getLayoutProperty(G):l.getPaintProperty(G),r=K.interpolator?.getInterpolationRange(f);let y=0;for(const w of H){const {offset:F,bufferElementsToAdd:I}= |
|
w;if(0<I){for(H=0;H<I;H++)p.push(0);v+=E;E=w.bufferElementsToAdd}H=x??K.getValue(r?r[y]:f,c);switch(z){case q.EncodingType.R8_SIGNED:case q.EncodingType.R8_UNSIGNED:p[v]|=this._encodeByte(H*(D||1),8*F);break;case q.EncodingType.R16_SIGNED:case q.EncodingType.R16_UNSIGNED:p[v]|=this._encodeShort(H*(D||1),8*F);break;case q.EncodingType.R8G8_SIGNED:case q.EncodingType.R8G8_UNSIGNED:p[v]|=this._encodeByte(H*(D||1),8*F);p[v]|=this._encodeByte(H*(D||1),8*F+8);break;case q.EncodingType.R16G16_SIGNED:case q.EncodingType.R16G16_UNSIGNED:p[v]|= |
|
this._encodeShort(H*(D||1),8*F);p[v]|=this._encodeShort(H*(D||1),8*F+16);break;case q.EncodingType.R8G8B8A8_SIGNED:case q.EncodingType.R8G8B8A8_UNSIGNED:p[v]|=this._encodeByte(H*(D||1),8*F);p[v]|=this._encodeByte(H*(D||1),8*F+8);p[v]|=this._encodeByte(H*(D||1),8*F+16);p[v]|=this._encodeByte(H*(D||1),8*F+24);break;case q.EncodingType.R8G8B8A8_COLOR:p[v]=this._encodeColor(H);break;case q.EncodingType.R16G16B16A16_DASHARRAY:case q.EncodingType.R16G16B16A16_PATTERN:this._encodePattern(v,p,H);break;default:throw Error("Unsupported encoding type"); |
|
}y++}}return p}getAtributeState(c){const f=3+2*c;c=0|this._bit(f);return c|=this._bit(f+1)<<1}_buildAttributesInfo(){const c=[],f={};var l={},x=-1;const B=this.attributesInfo();var u=this.attributes();let p=-1;for(const G of u){p++;u=this.getAtributeState(p);if(u===q.AttributeStatus.UNIFORM||u===q.AttributeStatus.UNUSED)continue;var v=B[G];const z=[];f[G]=z;v=v.type;for(let D=0;D<u;D++){const {dataType:A,bytesPerElement:K,count:r,normalized:y}=g._encodingInfo[v],w=K*r;var E=`${A}-${!0===y}`;let F= |
|
l[E],I=0;!F||4<F.count+r?(x++,F={dataIndex:x,count:0,offset:0},4!==r&&(l[E]=F),c.push({location:-1,name:"a_data_"+x,count:r,type:A,normalized:y}),I=Math.ceil(Math.max(w/4,1))):(E=c[F.dataIndex],E.count+=r,I=Math.ceil(Math.max(E.count*K/4,1))-Math.ceil(Math.max(F.offset/4,1)));z.push({dataIndex:F.dataIndex,offset:F.offset,bufferElementsToAdd:I});F.offset+=w;F.count+=r}}for(const G of c)switch(G.type){case e.DataType.BYTE:case e.DataType.UNSIGNED_BYTE:G.count=4;break;case e.DataType.SHORT:case e.DataType.UNSIGNED_SHORT:G.count+= |
|
G.count%2}this._buildVertexBufferLayout(c);l=0;x=this._layoutInfo.geometry;for(var H of x)this._locations.set(H.name,l++);if(H=this._layoutInfo.opacity)for(const G of H)this._locations.set(G.name,l++);this._buildShaderInfo(c,f);this._propertyEncodingInfo=f}_buildVertexBufferLayout(c){const f={},l=this.geometryInfo();let x=l[0].stride;if(0===c.length)f.geometry=l;else{const B=[];let u=x;for(const p of c)x+=h(p.type)*p.count;for(const p of l)B.push(new k.VertexElementDescriptor(p.name,p.count,p.type, |
|
p.offset,x,p.normalized));for(const p of c)B.push(new k.VertexElementDescriptor(p.name,p.count,p.type,u,x,p.normalized)),u+=h(p.type)*p.count;f.geometry=B}this.opacityInfo()&&(f.opacity=this.opacityInfo());this._layoutInfo=f;this._stride=x}_buildShaderInfo(c,f){let l="\n",x="\n";const B=[];for(var u of c)l+=`attribute ${this._getType(u.count)} ${u.name};\n`;var p=this.attributes();c=this.attributesInfo();u=-1;for(const H of p){u++;const {name:G,type:z,precisionFactor:D,isLayout:A}=c[H];p=D&&1!==D? |
|
` * ${1/D}`:"";const {bytesPerElement:K,count:r}=g._encodingInfo[z];var v=y=>`a_data_${y.dataIndex}${n(r,y.offset,K)}`;switch(this.getAtributeState(u)){case q.AttributeStatus.UNIFORM:p=this._getType(r);var E=`u_${G}`;B.push({name:E,type:p,getValue:(w,F,I,M)=>{I=A?w.getLayoutValue(H,F):w.getPaintValue(H,F);if(z===q.EncodingType.R16G16B16A16_DASHARRAY){w=w.getDashKey(I,w.getLayoutValue("line-cap",F));M=M.getMosaicItemPosition(w,!1);if(null==M)return null;const {tl:O,br:Q}=M;return[O[0],Q[1],Q[0],O[1]]}if(z=== |
|
q.EncodingType.R16G16B16A16_PATTERN){M=M.getMosaicItemPosition(I,!H.includes("line-"));if(null==M)return null;const {tl:O,br:Q}=M;return[O[0],Q[1],Q[0],O[1]]}return z===q.EncodingType.R8G8B8A8_COLOR?(M=I[3],[M*I[0],M*I[1],M*I[2],M]):I}});l+=`uniform ${p} ${E};\n`;x+=`${p} ${G} = ${E};\n`;break;case q.AttributeStatus.DATA_DRIVEN:E=v(f[H][0]);x+=`${this._getType(r)} ${G} = ${E}${p};\n`;break;case q.AttributeStatus.INTERPOLATED_DATA_DRIVEN:E=`u_t_${G}`;B.push({name:E,type:"float",getValue:(w,F,I,M)=> |
|
(A?w.getLayoutProperty(H):w.getPaintProperty(H)).interpolator.interpolationUniformValue(I,F)});l+=`uniform float ${E};\n`;const y=v(f[H][0]);v=v(f[H][1]);x+=`${this._getType(r)} ${G} = mix(${y}${p}, ${v}${p}, ${E});\n`}}this._shaderHeader=l;this._shaderMain=x;this._uniforms=B}_bit(c){return(this._key&1<<c)>>c}_getType(c){switch(c){case 1:return"float";case 2:return"vec2";case 3:return"vec3";case 4:return"vec4"}throw Error("Invalid count");}_encodeColor(c){const f=255*c[3];return a.i8888to32(c[0]* |
|
f,c[1]*f,c[2]*f,f)}_encodePattern(c,f,l){if(l?.rect){var x=l.rect,B=l.width;l=l.height;f[c]=this._encodeShort(x.x+2,0);f[c]|=this._encodeShort(x.y+2+l,16);f[c+1]=this._encodeShort(x.x+2+B,0);f[c+1]|=this._encodeShort(x.y+2,16)}}_encodeByte(c,f){return(c&255)<<f}_encodeShort(c,f){return(c&65535)<<f}}g._encodingInfo={[q.EncodingType.R8_SIGNED]:{dataType:e.DataType.BYTE,bytesPerElement:1,count:1,normalized:!1},[q.EncodingType.R8_UNSIGNED]:{dataType:e.DataType.UNSIGNED_BYTE,bytesPerElement:1,count:1, |
|
normalized:!1},[q.EncodingType.R16_SIGNED]:{dataType:e.DataType.SHORT,bytesPerElement:2,count:1,normalized:!1},[q.EncodingType.R16_UNSIGNED]:{dataType:e.DataType.UNSIGNED_SHORT,bytesPerElement:2,count:1,normalized:!1},[q.EncodingType.R8G8_SIGNED]:{dataType:e.DataType.BYTE,bytesPerElement:1,count:2,normalized:!1},[q.EncodingType.R8G8_UNSIGNED]:{dataType:e.DataType.UNSIGNED_BYTE,bytesPerElement:1,count:2,normalized:!1},[q.EncodingType.R16G16_SIGNED]:{dataType:e.DataType.SHORT,bytesPerElement:2,count:2, |
|
normalized:!1},[q.EncodingType.R16G16_UNSIGNED]:{dataType:e.DataType.UNSIGNED_SHORT,bytesPerElement:2,count:2,normalized:!1},[q.EncodingType.R8G8B8A8_SIGNED]:{dataType:e.DataType.BYTE,bytesPerElement:1,count:4,normalized:!1},[q.EncodingType.R8G8B8A8_UNSIGNED]:{dataType:e.DataType.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!1},[q.EncodingType.R8G8B8A8_COLOR]:{dataType:e.DataType.UNSIGNED_BYTE,bytesPerElement:1,count:4,normalized:!0},[q.EncodingType.R16G16B16A16_DASHARRAY]:{dataType:e.DataType.UNSIGNED_SHORT, |
|
bytesPerElement:2,count:4,normalized:!1},[q.EncodingType.R16G16B16A16_PATTERN]:{dataType:e.DataType.UNSIGNED_SHORT,bytesPerElement:2,count:4,normalized:!1}};const h=c=>{switch(c){case e.DataType.FLOAT:case e.DataType.INT:case e.DataType.UNSIGNED_INT:return 4;case e.DataType.SHORT:case e.DataType.UNSIGNED_SHORT:case e.DataType.HALF_FLOAT:return 2;case e.DataType.BYTE:case e.DataType.UNSIGNED_BYTE:return 1}},n=(c,f,l)=>{f/=l;if(1===c)switch(f){case 0:return".x";case 1:return".y";case 2:return".z";case 3:return".w"}else if(2=== |
|
c)switch(f){case 0:return".xy";case 1:return".yz";case 2:return".zw"}else if(3===c)switch(f){case 0:return".xyz";case 1:return".yzw"}return""};b.VTLMaterial=g;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/MemoryBuffer":function(){define(["../../../../core/has"],function(b){class a{constructor(q){this._array=[];this._stride=q}get array(){return this._array}get index(){return 4*this._array.length/this._stride}get itemSize(){return this._stride}get sizeInBytes(){return 4* |
|
this._array.length}reset(){this.array.length=0}toBuffer(){return(new Uint32Array(this._array)).buffer}static i1616to32(q,e){return 65535&q|e<<16}static i8888to32(q,e,k,g){return q&255|(e&255)<<8|(k&255)<<16|g<<24}static i8816to32(q,e,k){return q&255|(e&255)<<8|k<<16}}return a})},"esri/views/2d/engine/vectorTiles/shaders/enums":function(){define(["exports"],function(b){b.EncodingType=void 0;(function(a){a[a.R8_SIGNED=0]="R8_SIGNED";a[a.R8_UNSIGNED=1]="R8_UNSIGNED";a[a.R16_SIGNED=2]="R16_SIGNED";a[a.R16_UNSIGNED= |
|
3]="R16_UNSIGNED";a[a.R8G8_SIGNED=4]="R8G8_SIGNED";a[a.R8G8_UNSIGNED=5]="R8G8_UNSIGNED";a[a.R16G16_SIGNED=6]="R16G16_SIGNED";a[a.R16G16_UNSIGNED=7]="R16G16_UNSIGNED";a[a.R8G8B8A8_SIGNED=8]="R8G8B8A8_SIGNED";a[a.R8G8B8A8_UNSIGNED=9]="R8G8B8A8_UNSIGNED";a[a.R8G8B8A8_COLOR=10]="R8G8B8A8_COLOR";a[a.R16G16B16A16_DASHARRAY=11]="R16G16B16A16_DASHARRAY";a[a.R16G16B16A16_PATTERN=12]="R16G16B16A16_PATTERN"})(b.EncodingType||(b.EncodingType={}));b.AttributeStatus=void 0;(function(a){a[a.UNIFORM=0]="UNIFORM"; |
|
a[a.DATA_DRIVEN=1]="DATA_DRIVEN";a[a.INTERPOLATED_DATA_DRIVEN=2]="INTERPOLATED_DATA_DRIVEN";a[a.UNUSED=3]="UNUSED"})(b.AttributeStatus||(b.AttributeStatus={}));Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/enums":function(){define(["exports"],function(b){b.ClearBufferBit=void 0;(function(a){a[a.DEPTH_BUFFER_BIT=256]="DEPTH_BUFFER_BIT";a[a.STENCIL_BUFFER_BIT=1024]="STENCIL_BUFFER_BIT";a[a.COLOR_BUFFER_BIT=16384]="COLOR_BUFFER_BIT"})(b.ClearBufferBit||(b.ClearBufferBit= |
|
{}));b.PrimitiveType=void 0;(function(a){a[a.POINTS=0]="POINTS";a[a.LINES=1]="LINES";a[a.LINE_LOOP=2]="LINE_LOOP";a[a.LINE_STRIP=3]="LINE_STRIP";a[a.TRIANGLES=4]="TRIANGLES";a[a.TRIANGLE_STRIP=5]="TRIANGLE_STRIP";a[a.TRIANGLE_FAN=6]="TRIANGLE_FAN"})(b.PrimitiveType||(b.PrimitiveType={}));b.BlendFactor=void 0;(function(a){a[a.ZERO=0]="ZERO";a[a.ONE=1]="ONE";a[a.SRC_COLOR=768]="SRC_COLOR";a[a.ONE_MINUS_SRC_COLOR=769]="ONE_MINUS_SRC_COLOR";a[a.SRC_ALPHA=770]="SRC_ALPHA";a[a.ONE_MINUS_SRC_ALPHA=771]= |
|
"ONE_MINUS_SRC_ALPHA";a[a.DST_ALPHA=772]="DST_ALPHA";a[a.ONE_MINUS_DST_ALPHA=773]="ONE_MINUS_DST_ALPHA";a[a.DST_COLOR=774]="DST_COLOR";a[a.ONE_MINUS_DST_COLOR=775]="ONE_MINUS_DST_COLOR";a[a.SRC_ALPHA_SATURATE=776]="SRC_ALPHA_SATURATE";a[a.CONSTANT_COLOR=32769]="CONSTANT_COLOR";a[a.ONE_MINUS_CONSTANT_COLOR=32770]="ONE_MINUS_CONSTANT_COLOR";a[a.CONSTANT_ALPHA=32771]="CONSTANT_ALPHA";a[a.ONE_MINUS_CONSTANT_ALPHA=32772]="ONE_MINUS_CONSTANT_ALPHA"})(b.BlendFactor||(b.BlendFactor={}));b.BlendOperation= |
|
void 0;(function(a){a[a.ADD=32774]="ADD";a[a.MIN=32775]="MIN";a[a.MAX=32776]="MAX";a[a.SUBTRACT=32778]="SUBTRACT";a[a.REVERSE_SUBTRACT=32779]="REVERSE_SUBTRACT"})(b.BlendOperation||(b.BlendOperation={}));b.BufferType=void 0;(function(a){a[a.ARRAY_BUFFER=34962]="ARRAY_BUFFER";a[a.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER";a[a.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER";a[a.PIXEL_PACK_BUFFER=35051]="PIXEL_PACK_BUFFER";a[a.PIXEL_UNPACK_BUFFER=35052]="PIXEL_UNPACK_BUFFER";a[a.COPY_READ_BUFFER=36662]= |
|
"COPY_READ_BUFFER";a[a.COPY_WRITE_BUFFER=36663]="COPY_WRITE_BUFFER";a[a.TRANSFORM_FEEDBACK_BUFFER=35982]="TRANSFORM_FEEDBACK_BUFFER"})(b.BufferType||(b.BufferType={}));b.Face=void 0;(function(a){a[a.FRONT=1028]="FRONT";a[a.BACK=1029]="BACK";a[a.FRONT_AND_BACK=1032]="FRONT_AND_BACK"})(b.Face||(b.Face={}));b.CullMode=void 0;(function(a){a[a.CW=2304]="CW";a[a.CCW=2305]="CCW"})(b.CullMode||(b.CullMode={}));b.DataType=void 0;(function(a){a[a.BYTE=5120]="BYTE";a[a.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE";a[a.SHORT= |
|
5122]="SHORT";a[a.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT";a[a.INT=5124]="INT";a[a.UNSIGNED_INT=5125]="UNSIGNED_INT";a[a.FLOAT=5126]="FLOAT";a[a.HALF_FLOAT=5131]="HALF_FLOAT"})(b.DataType||(b.DataType={}));b.CompareFunction=void 0;(function(a){a[a.NEVER=512]="NEVER";a[a.LESS=513]="LESS";a[a.EQUAL=514]="EQUAL";a[a.LEQUAL=515]="LEQUAL";a[a.GREATER=516]="GREATER";a[a.NOTEQUAL=517]="NOTEQUAL";a[a.GEQUAL=518]="GEQUAL";a[a.ALWAYS=519]="ALWAYS"})(b.CompareFunction||(b.CompareFunction={}));b.StencilOperation= |
|
void 0;(function(a){a[a.ZERO=0]="ZERO";a[a.KEEP=7680]="KEEP";a[a.REPLACE=7681]="REPLACE";a[a.INCR=7682]="INCR";a[a.DECR=7683]="DECR";a[a.INVERT=5386]="INVERT";a[a.INCR_WRAP=34055]="INCR_WRAP";a[a.DECR_WRAP=34056]="DECR_WRAP"})(b.StencilOperation||(b.StencilOperation={}));b.TextureSamplingMode=void 0;(function(a){a[a.NEAREST=9728]="NEAREST";a[a.LINEAR=9729]="LINEAR";a[a.NEAREST_MIPMAP_NEAREST=9984]="NEAREST_MIPMAP_NEAREST";a[a.LINEAR_MIPMAP_NEAREST=9985]="LINEAR_MIPMAP_NEAREST";a[a.NEAREST_MIPMAP_LINEAR= |
|
9986]="NEAREST_MIPMAP_LINEAR";a[a.LINEAR_MIPMAP_LINEAR=9987]="LINEAR_MIPMAP_LINEAR"})(b.TextureSamplingMode||(b.TextureSamplingMode={}));b.TextureWrapMode=void 0;(function(a){a[a.CLAMP_TO_EDGE=33071]="CLAMP_TO_EDGE";a[a.REPEAT=10497]="REPEAT";a[a.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"})(b.TextureWrapMode||(b.TextureWrapMode={}));b.TextureType=void 0;(function(a){a[a.TEXTURE_2D=3553]="TEXTURE_2D";a[a.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP";a[a.TEXTURE_3D=32879]="TEXTURE_3D";a[a.TEXTURE_CUBE_MAP_POSITIVE_X= |
|
34069]="TEXTURE_CUBE_MAP_POSITIVE_X";a[a.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X";a[a.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y";a[a.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y";a[a.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z";a[a.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z";a[a.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY"})(b.TextureType||(b.TextureType={}));b.PixelFormat=void 0;(function(a){a[a.DEPTH_COMPONENT= |
|
6402]="DEPTH_COMPONENT";a[a.DEPTH_STENCIL=34041]="DEPTH_STENCIL";a[a.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8";a[a.ALPHA=6406]="ALPHA";a[a.RGB=6407]="RGB";a[a.RGBA=6408]="RGBA";a[a.LUMINANCE=6409]="LUMINANCE";a[a.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA";a[a.RED=6403]="RED";a[a.RG=33319]="RG";a[a.RED_INTEGER=36244]="RED_INTEGER";a[a.RG_INTEGER=33320]="RG_INTEGER";a[a.RGB_INTEGER=36248]="RGB_INTEGER";a[a.RGBA_INTEGER=36249]="RGBA_INTEGER"})(b.PixelFormat||(b.PixelFormat={}));b.SizedPixelFormat=void 0; |
|
(function(a){a[a.RGBA4=32854]="RGBA4";a[a.R16F=33325]="R16F";a[a.RG16F=33327]="RG16F";a[a.RGB32F=34837]="RGB32F";a[a.RGBA16F=34842]="RGBA16F";a[a.R32F=33326]="R32F";a[a.RG32F=33328]="RG32F";a[a.RGBA32F=34836]="RGBA32F";a[a.R11F_G11F_B10F=35898]="R11F_G11F_B10F";a[a.RGB8=32849]="RGB8";a[a.RGBA8=32856]="RGBA8";a[a.RGB5_A1=32855]="RGB5_A1";a[a.R8=33321]="R8";a[a.RG8=33323]="RG8";a[a.R8I=33329]="R8I";a[a.R8UI=33330]="R8UI";a[a.R16I=33331]="R16I";a[a.R16UI=33332]="R16UI";a[a.R32I=33333]="R32I";a[a.R32UI= |
|
33334]="R32UI";a[a.RG8I=33335]="RG8I";a[a.RG8UI=33336]="RG8UI";a[a.RG16I=33337]="RG16I";a[a.RG16UI=33338]="RG16UI";a[a.RG32I=33339]="RG32I";a[a.RG32UI=33340]="RG32UI";a[a.RGB16F=34843]="RGB16F";a[a.RGB9_E5=35901]="RGB9_E5";a[a.SRGB8=35905]="SRGB8";a[a.SRGB8_ALPHA8=35907]="SRGB8_ALPHA8";a[a.RGB565=36194]="RGB565";a[a.RGBA32UI=36208]="RGBA32UI";a[a.RGB32UI=36209]="RGB32UI";a[a.RGBA16UI=36214]="RGBA16UI";a[a.RGB16UI=36215]="RGB16UI";a[a.RGBA8UI=36220]="RGBA8UI";a[a.RGB8UI=36221]="RGB8UI";a[a.RGBA32I= |
|
36226]="RGBA32I";a[a.RGB32I=36227]="RGB32I";a[a.RGBA16I=36232]="RGBA16I";a[a.RGB16I=36233]="RGB16I";a[a.RGBA8I=36238]="RGBA8I";a[a.RGB8I=36239]="RGB8I";a[a.R8_SNORM=36756]="R8_SNORM";a[a.RG8_SNORM=36757]="RG8_SNORM";a[a.RGB8_SNORM=36758]="RGB8_SNORM";a[a.RGBA8_SNORM=36759]="RGBA8_SNORM";a[a.RGB10_A2=32857]="RGB10_A2";a[a.RGB10_A2UI=36975]="RGB10_A2UI"})(b.SizedPixelFormat||(b.SizedPixelFormat={}));b.PixelType=void 0;(function(a){a[a.FLOAT=5126]="FLOAT";a[a.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE";a[a.UNSIGNED_INT_24_8= |
|
34042]="UNSIGNED_INT_24_8";a[a.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4";a[a.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1";a[a.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5";a[a.BYTE=5120]="BYTE";a[a.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT";a[a.SHORT=5122]="SHORT";a[a.UNSIGNED_INT=5125]="UNSIGNED_INT";a[a.INT=5124]="INT";a[a.HALF_FLOAT=5131]="HALF_FLOAT";a[a.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV";a[a.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV"; |
|
a[a.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV";a[a.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV"})(b.PixelType||(b.PixelType={}));b.RenderbufferFormat=void 0;(function(a){a[a.DEPTH_COMPONENT16=33189]="DEPTH_COMPONENT16";a[a.STENCIL_INDEX8=36168]="STENCIL_INDEX8";a[a.DEPTH_STENCIL=34041]="DEPTH_STENCIL";a[a.DEPTH_COMPONENT24=33190]="DEPTH_COMPONENT24";a[a.DEPTH_COMPONENT32F=36012]="DEPTH_COMPONENT32F";a[a.DEPTH24_STENCIL8=35056]="DEPTH24_STENCIL8";a[a.DEPTH32F_STENCIL8= |
|
36013]="DEPTH32F_STENCIL8"})(b.RenderbufferFormat||(b.RenderbufferFormat={}));b.Usage=void 0;(function(a){a[a.STATIC_DRAW=35044]="STATIC_DRAW";a[a.DYNAMIC_DRAW=35048]="DYNAMIC_DRAW";a[a.STREAM_DRAW=35040]="STREAM_DRAW";a[a.STATIC_READ=35045]="STATIC_READ";a[a.DYNAMIC_READ=35049]="DYNAMIC_READ";a[a.STREAM_READ=35041]="STREAM_READ";a[a.STATIC_COPY=35046]="STATIC_COPY";a[a.DYNAMIC_COPY=35050]="DYNAMIC_COPY";a[a.STREAM_COPY=35042]="STREAM_COPY"})(b.Usage||(b.Usage={}));b.ShaderType=void 0;(function(a){a[a.FRAGMENT_SHADER= |
|
35632]="FRAGMENT_SHADER";a[a.VERTEX_SHADER=35633]="VERTEX_SHADER"})(b.ShaderType||(b.ShaderType={}));b.FramebufferTarget=void 0;(function(a){a[a.FRAMEBUFFER=36160]="FRAMEBUFFER";a[a.READ_FRAMEBUFFER=36008]="READ_FRAMEBUFFER";a[a.DRAW_FRAMEBUFFER=36009]="DRAW_FRAMEBUFFER"})(b.FramebufferTarget||(b.FramebufferTarget={}));b.ResourceType=void 0;(function(a){a[a.Texture=0]="Texture";a[a.BufferObject=1]="BufferObject";a[a.VertexArrayObject=2]="VertexArrayObject";a[a.Shader=3]="Shader";a[a.Program=4]="Program"; |
|
a[a.FramebufferObject=5]="FramebufferObject";a[a.Renderbuffer=6]="Renderbuffer";a[a.TransformFeedback=7]="TransformFeedback";a[a.Sync=8]="Sync";a[a.UNCOUNTED=9]="UNCOUNTED";a[a.LinesOfCode=9]="LinesOfCode";a[a.Uniform=10]="Uniform";a[a.COUNT=11]="COUNT"})(b.ResourceType||(b.ResourceType={}));b.ColorAttachment=void 0;(function(a){a[a.COLOR_ATTACHMENT0=36064]="COLOR_ATTACHMENT0";a[a.COLOR_ATTACHMENT1=36065]="COLOR_ATTACHMENT1";a[a.COLOR_ATTACHMENT2=36066]="COLOR_ATTACHMENT2";a[a.COLOR_ATTACHMENT3=36067]= |
|
"COLOR_ATTACHMENT3";a[a.COLOR_ATTACHMENT4=36068]="COLOR_ATTACHMENT4";a[a.COLOR_ATTACHMENT5=36069]="COLOR_ATTACHMENT5";a[a.COLOR_ATTACHMENT6=36070]="COLOR_ATTACHMENT6";a[a.COLOR_ATTACHMENT7=36071]="COLOR_ATTACHMENT7";a[a.COLOR_ATTACHMENT8=36072]="COLOR_ATTACHMENT8";a[a.COLOR_ATTACHMENT9=36073]="COLOR_ATTACHMENT9";a[a.COLOR_ATTACHMENT10=36074]="COLOR_ATTACHMENT10";a[a.COLOR_ATTACHMENT11=36075]="COLOR_ATTACHMENT11";a[a.COLOR_ATTACHMENT12=36076]="COLOR_ATTACHMENT12";a[a.COLOR_ATTACHMENT13=36077]="COLOR_ATTACHMENT13"; |
|
a[a.COLOR_ATTACHMENT14=36078]="COLOR_ATTACHMENT14";a[a.COLOR_ATTACHMENT15=36079]="COLOR_ATTACHMENT15"})(b.ColorAttachment||(b.ColorAttachment={}));b.SpecialDrawBuffers=void 0;(function(a){a[a.NONE=0]="NONE";a[a.BACK=1029]="BACK"})(b.SpecialDrawBuffers||(b.SpecialDrawBuffers={}));b.CompressedTextureFormat=void 0;(function(a){a[a.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT";a[a.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT";a[a.COMPRESSED_RGBA_S3TC_DXT3_EXT= |
|
33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT";a[a.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT";a[a.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC";a[a.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC";a[a.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC";a[a.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC";a[a.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2";a[a.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2";a[a.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2= |
|
37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2";a[a.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2";a[a.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC";a[a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC"})(b.CompressedTextureFormat||(b.CompressedTextureFormat={}));b.UniformType=void 0;(function(a){a[a.FLOAT=5126]="FLOAT";a[a.FLOAT_VEC2=35664]="FLOAT_VEC2";a[a.FLOAT_VEC3=35665]="FLOAT_VEC3";a[a.FLOAT_VEC4=35666]= |
|
"FLOAT_VEC4";a[a.INT=5124]="INT";a[a.INT_VEC2=35667]="INT_VEC2";a[a.INT_VEC3=35668]="INT_VEC3";a[a.INT_VEC4=35669]="INT_VEC4";a[a.BOOL=35670]="BOOL";a[a.BOOL_VEC2=35671]="BOOL_VEC2";a[a.BOOL_VEC3=35672]="BOOL_VEC3";a[a.BOOL_VEC4=35673]="BOOL_VEC4";a[a.FLOAT_MAT2=35674]="FLOAT_MAT2";a[a.FLOAT_MAT3=35675]="FLOAT_MAT3";a[a.FLOAT_MAT4=35676]="FLOAT_MAT4";a[a.SAMPLER_2D=35678]="SAMPLER_2D";a[a.SAMPLER_CUBE=35680]="SAMPLER_CUBE";a[a.UNSIGNED_INT=5125]="UNSIGNED_INT";a[a.UNSIGNED_INT_VEC2=36294]="UNSIGNED_INT_VEC2"; |
|
a[a.UNSIGNED_INT_VEC3=36295]="UNSIGNED_INT_VEC3";a[a.UNSIGNED_INT_VEC4=36296]="UNSIGNED_INT_VEC4";a[a.FLOAT_MAT2x3=35685]="FLOAT_MAT2x3";a[a.FLOAT_MAT2x4=35686]="FLOAT_MAT2x4";a[a.FLOAT_MAT3x2=35687]="FLOAT_MAT3x2";a[a.FLOAT_MAT3x4=35688]="FLOAT_MAT3x4";a[a.FLOAT_MAT4x2=35689]="FLOAT_MAT4x2";a[a.FLOAT_MAT4x3=35690]="FLOAT_MAT4x3";a[a.SAMPLER_3D=35679]="SAMPLER_3D";a[a.SAMPLER_2D_SHADOW=35682]="SAMPLER_2D_SHADOW";a[a.SAMPLER_2D_ARRAY=36289]="SAMPLER_2D_ARRAY";a[a.SAMPLER_2D_ARRAY_SHADOW=36292]="SAMPLER_2D_ARRAY_SHADOW"; |
|
a[a.SAMPLER_CUBE_SHADOW=36293]="SAMPLER_CUBE_SHADOW";a[a.INT_SAMPLER_2D=36298]="INT_SAMPLER_2D";a[a.INT_SAMPLER_3D=36299]="INT_SAMPLER_3D";a[a.INT_SAMPLER_CUBE=36300]="INT_SAMPLER_CUBE";a[a.INT_SAMPLER_2D_ARRAY=36303]="INT_SAMPLER_2D_ARRAY";a[a.UNSIGNED_INT_SAMPLER_2D=36306]="UNSIGNED_INT_SAMPLER_2D";a[a.UNSIGNED_INT_SAMPLER_3D=36307]="UNSIGNED_INT_SAMPLER_3D";a[a.UNSIGNED_INT_SAMPLER_CUBE=36308]="UNSIGNED_INT_SAMPLER_CUBE";a[a.UNSIGNED_INT_SAMPLER_2D_ARRAY=36311]="UNSIGNED_INT_SAMPLER_2D_ARRAY"})(b.UniformType|| |
|
(b.UniformType={}));b.SyncParameter=void 0;(function(a){a[a.OBJECT_TYPE=37138]="OBJECT_TYPE";a[a.SYNC_CONDITION=37139]="SYNC_CONDITION";a[a.SYNC_STATUS=37140]="SYNC_STATUS";a[a.SYNC_FLAGS=37141]="SYNC_FLAGS"})(b.SyncParameter||(b.SyncParameter={}));b.SyncStatus=void 0;(function(a){a[a.UNSIGNALED=37144]="UNSIGNALED";a[a.SIGNALED=37145]="SIGNALED"})(b.SyncStatus||(b.SyncStatus={}));b.ClientWaitSyncStatus=void 0;(function(a){a[a.ALREADY_SIGNALED=37146]="ALREADY_SIGNALED";a[a.TIMEOUT_EXPIRED=37147]="TIMEOUT_EXPIRED"; |
|
a[a.CONDITION_SATISFIED=37148]="CONDITION_SATISFIED";a[a.WAIT_FAILED=37149]="WAIT_FAILED"})(b.ClientWaitSyncStatus||(b.ClientWaitSyncStatus={}));b.SyncCondition=void 0;(function(a){a[a.SYNC_GPU_COMMANDS_COMPLETE=37143]="SYNC_GPU_COMMANDS_COMPLETE"})(b.SyncCondition||(b.SyncCondition={}));b.SyncFlag=void 0;(function(a){a[a.SYNC_FLUSH_COMMANDS_BIT=1]="SYNC_FLUSH_COMMANDS_BIT"})(b.SyncFlag||(b.SyncFlag={}));b.DepthStencilAttachment=33306;b.baseTextureUnit=33984;Object.defineProperty(b,Symbol.toStringTag, |
|
{value:"Module"})})},"esri/views/webgl/VertexElementDescriptor":function(){define(["exports"],function(b){class a{constructor(q,e,k,g,h,n=!1,c=0){this.name=q;this.count=e;this.type=k;this.offset=g;this.stride=h;this.normalized=n;this.divisor=c}}b.VertexElementDescriptor=a;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/shaders/VTLCircleMaterial":function(){define(["exports","./enums","./VTLMaterial","../../../../webgl/enums","../../../../webgl/VertexElementDescriptor"], |
|
function(b,a,q,e,k){class g extends q.VTLMaterial{constructor(h){super(h)}geometryInfo(){return g.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return g.ATTRIBUTES}attributesInfo(){return g.ATTRIBUTES_INFO}}g.ATTRIBUTES="circle-radius circle-color circle-opacity circle-stroke-width circle-stroke-color circle-stroke-opacity circle-blur".split(" ");g.GEOMETRY_LAYOUT=[new k.VertexElementDescriptor("a_pos",2,e.DataType.SHORT,0,4)];g.ATTRIBUTES_INFO={"circle-radius":{name:"radius",type:a.EncodingType.R8_UNSIGNED}, |
|
"circle-color":{name:"color",type:a.EncodingType.R8G8B8A8_COLOR},"circle-opacity":{name:"opacity",type:a.EncodingType.R8_UNSIGNED,precisionFactor:100},"circle-stroke-width":{name:"stroke_width",type:a.EncodingType.R8_UNSIGNED,precisionFactor:4},"circle-stroke-color":{name:"stroke_color",type:a.EncodingType.R8G8B8A8_COLOR},"circle-stroke-opacity":{name:"stroke_opacity",type:a.EncodingType.R8_UNSIGNED,precisionFactor:100},"circle-blur":{name:"blur",type:a.EncodingType.R8_UNSIGNED,precisionFactor:32}}; |
|
b.VTLCircleMaterial=g;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/shaders/VTLFillMaterial":function(){define(["exports","./enums","./VTLMaterial","../../../../webgl/enums","../../../../webgl/VertexElementDescriptor"],function(b,a,q,e,k){class g extends q.VTLMaterial{constructor(n){super(n)}geometryInfo(){return g.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return g.ATTRIBUTES}attributesInfo(){return g.ATTRIBUTES_INFO}}g.ATTRIBUTES=["fill-color", |
|
"fill-opacity","fill-pattern"];g.GEOMETRY_LAYOUT=[new k.VertexElementDescriptor("a_pos",2,e.DataType.SHORT,0,4)];g.ATTRIBUTES_INFO={"fill-color":{name:"color",type:a.EncodingType.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:a.EncodingType.R8_UNSIGNED,precisionFactor:100},"fill-pattern":{name:"tlbr",type:a.EncodingType.R16G16B16A16_PATTERN,isOptional:!0}};class h extends q.VTLMaterial{constructor(n,c){super(n);this._usefillColor=c}geometryInfo(){return h.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return this._usefillColor? |
|
h.ATTRIBUTES_FILL:h.ATTRIBUTES_OUTLINE}attributesInfo(){return this._usefillColor?h.ATTRIBUTES_INFO_FILL:h.ATTRIBUTES_INFO_OUTLINE}}h.ATTRIBUTES_OUTLINE=["fill-outline-color","fill-opacity"];h.ATTRIBUTES_FILL=["fill-color","fill-opacity"];h.GEOMETRY_LAYOUT=[new k.VertexElementDescriptor("a_pos",2,e.DataType.SHORT,0,8),new k.VertexElementDescriptor("a_offset",2,e.DataType.BYTE,4,8),new k.VertexElementDescriptor("a_xnormal",2,e.DataType.BYTE,6,8)];h.ATTRIBUTES_INFO_OUTLINE={"fill-outline-color":{name:"color", |
|
type:a.EncodingType.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:a.EncodingType.R8_UNSIGNED,precisionFactor:100}};h.ATTRIBUTES_INFO_FILL={"fill-color":{name:"color",type:a.EncodingType.R8G8B8A8_COLOR},"fill-opacity":{name:"opacity",type:a.EncodingType.R8_UNSIGNED,precisionFactor:100}};b.VTLFillMaterial=g;b.VTLOutlineMaterial=h;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/shaders/VTLLineMaterial":function(){define(["exports","./enums","./VTLMaterial", |
|
"../../../../webgl/enums","../../../../webgl/VertexElementDescriptor"],function(b,a,q,e,k){class g extends q.VTLMaterial{constructor(h){super(h)}geometryInfo(){return g.GEOMETRY_LAYOUT}opacityInfo(){return null}attributes(){return g.ATTRIBUTES}attributesInfo(){return g.ATTRIBUTES_INFO}}g.ATTRIBUTES="line-blur line-color line-gap-width line-offset line-opacity line-width line-pattern line-dasharray".split(" ");g.GEOMETRY_LAYOUT=[new k.VertexElementDescriptor("a_pos",2,e.DataType.SHORT,0,16),new k.VertexElementDescriptor("a_extrude_offset", |
|
4,e.DataType.BYTE,4,16),new k.VertexElementDescriptor("a_dir_normal",4,e.DataType.BYTE,8,16),new k.VertexElementDescriptor("a_accumulatedDistance",2,e.DataType.UNSIGNED_SHORT,12,16)];g.ATTRIBUTES_INFO={"line-width":{name:"width",type:a.EncodingType.R8_UNSIGNED,precisionFactor:2},"line-gap-width":{name:"gap_width",type:a.EncodingType.R8_UNSIGNED,precisionFactor:2},"line-offset":{name:"offset",type:a.EncodingType.R8_SIGNED,precisionFactor:2},"line-color":{name:"color",type:a.EncodingType.R8G8B8A8_COLOR}, |
|
"line-opacity":{name:"opacity",type:a.EncodingType.R8_UNSIGNED,precisionFactor:100},"line-blur":{name:"blur",type:a.EncodingType.R8_UNSIGNED,precisionFactor:4},"line-pattern":{name:"tlbr",type:a.EncodingType.R16G16B16A16_PATTERN,isOptional:!0},"line-dasharray":{name:"tlbr",type:a.EncodingType.R16G16B16A16_DASHARRAY,isOptional:!0}};b.VTLLineMaterial=g;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/shaders/VTLSymbolMaterial":function(){define(["exports", |
|
"./enums","./VTLMaterial","../../../../webgl/enums","../../../../webgl/VertexElementDescriptor"],function(b,a,q,e,k){const g=[new k.VertexElementDescriptor("a_pos",2,e.DataType.SHORT,0,16),new k.VertexElementDescriptor("a_vertexOffset",2,e.DataType.SHORT,4,16),new k.VertexElementDescriptor("a_texAngleRange",4,e.DataType.UNSIGNED_BYTE,8,16),new k.VertexElementDescriptor("a_levelInfo",4,e.DataType.UNSIGNED_BYTE,12,16)],h=[new k.VertexElementDescriptor("a_opacityInfo",1,e.DataType.UNSIGNED_BYTE,0,1)]; |
|
class n extends q.VTLMaterial{constructor(f){super(f)}geometryInfo(){return g}opacityInfo(){return h}attributes(){return n.ATTRIBUTES}attributesInfo(){return n.ATTRIBUTES_INFO}}n.ATTRIBUTES="icon-color icon-opacity icon-halo-blur icon-halo-color icon-halo-width icon-size".split(" ");n.ATTRIBUTES_INFO={"icon-color":{name:"color",type:a.EncodingType.R8G8B8A8_COLOR},"icon-opacity":{name:"opacity",type:a.EncodingType.R8_UNSIGNED,precisionFactor:100},"icon-halo-color":{name:"halo_color",type:a.EncodingType.R8G8B8A8_COLOR}, |
|
"icon-halo-width":{name:"halo_width",type:a.EncodingType.R8_UNSIGNED,precisionFactor:4},"icon-halo-blur":{name:"halo_blur",type:a.EncodingType.R8_UNSIGNED,precisionFactor:4},"icon-size":{name:"size",type:a.EncodingType.R8_UNSIGNED,precisionFactor:32,isLayout:!0}};class c extends q.VTLMaterial{constructor(f){super(f)}geometryInfo(){return g}opacityInfo(){return h}attributes(){return c.ATTRIBUTES}attributesInfo(){return c.ATTRIBUTES_INFO}}c.ATTRIBUTES="text-color text-opacity text-halo-blur text-halo-color text-halo-width text-size".split(" "); |
|
c.ATTRIBUTES_INFO={"text-color":{name:"color",type:a.EncodingType.R8G8B8A8_COLOR},"text-opacity":{name:"opacity",type:a.EncodingType.R8_UNSIGNED,precisionFactor:100},"text-halo-color":{name:"halo_color",type:a.EncodingType.R8G8B8A8_COLOR},"text-halo-width":{name:"halo_width",type:a.EncodingType.R8_UNSIGNED,precisionFactor:4},"text-halo-blur":{name:"halo_blur",type:a.EncodingType.R8_UNSIGNED,precisionFactor:4},"text-size":{name:"size",type:a.EncodingType.R8_UNSIGNED,isLayout:!0}};b.VTLIconMaterial= |
|
n;b.VTLTextMaterial=c;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/style/Filter":function(){define(["../expression/expression","../expression/types"],function(b,a){class q{constructor(e){this._expression=e}filter(e,k){if(!this._expression)return!0;try{return this._expression.evaluate(e,k)}catch(g){return console.log(g.message),!0}}static createFilter(e){if(!e)return null;this.isLegacyFilter(e)&&(e=this.convertLegacyFilter(e));try{const k=b.createExpression(e, |
|
null,a.booleanType);return new q(k)}catch(k){return console.log(k.message),null}}static isLegacyFilter(e){if(!Array.isArray(e)||0===e.length)return!0;switch(e[0]){case "\x3d\x3d":case "!\x3d":case "\x3e":case "\x3c":case "\x3e\x3d":case "\x3c\x3d":return 3===e.length&&"string"===typeof e[1]&&!Array.isArray(e[2]);case "in":return 3<=e.length&&"string"===typeof e[1]&&!Array.isArray(e[2]);case "!in":return!0;case "any":case "all":for(let k=1;k<e.length;k++)if(this.isLegacyFilter(e[k]))return!0;return!1; |
|
case "none":return!0;case "has":return 2===e.length&&("$id"===e[1]||"$type"===e[1]);case "!has":return!0;default:return!1}}static convertLegacyFilter(e){if(!Array.isArray(e)||0===e.length)return!0;const k=e[0];if(1===e.length)return"any"!==k;switch(k){case "\x3d\x3d":return q.convertComparison("\x3d\x3d",e[1],e[2]);case "!\x3d":return q.negate(q.convertComparison("\x3d\x3d",e[1],e[2]));case "\x3e":case "\x3c":case "\x3e\x3d":case "\x3c\x3d":return q.convertComparison(k,e[1],e[2]);case "in":return q.convertIn(e[1], |
|
e.slice(2));case "!in":return q.negate(q.convertIn(e[1],e.slice(2)));case "any":case "all":case "none":return q.convertCombining(k,e.slice(1));case "has":return q.convertHas(e[1]);case "!has":return q.negate(q.convertHas(e[1]));default:throw Error("Unexpected legacy filter.");}}static convertComparison(e,k,g){switch(k){case "$type":return[e,["geometry-type"],g];case "$id":return[e,["id"],g];default:return[e,["get",k],g]}}static convertIn(e,k){switch(e){case "$type":return["in",["geometry-type"],["literal", |
|
k]];case "$id":return["in",["id"],["literal",k]];default:return["in",["get",e],["literal",k]]}}static convertHas(e){switch(e){case "$type":return!0;case "$id":return["has-id"];default:return["has",e]}}static convertCombining(e,k){return[e].concat(k.map(this.convertLegacyFilter))}static negate(e){return["!",e]}}return q})},"esri/views/2d/engine/vectorTiles/expression/expression":function(){define("exports ../../../../../Color ../../../../../core/colorUtils ../../../../../geometry/support/TileClipper ../../../unitBezier ../GeometryUtils ./types".split(" "), |
|
function(b,a,q,e,k,g,h){function n(d,m,t){var C=typeof d;if("string"===C||"boolean"===C||"number"===C||null===d){if(t)switch(t.kind){case "string":"string"!==C&&(d=Y.toString(d));break;case "number":"number"!==C&&(d=Y.toNumber(d));break;case "color":d=Y.toColor(d)}d=["literal",d]}if(!Array.isArray(d)||0===d.length)throw Error("Expression must be a non empty array");C=d[0];if("string"!==typeof C)throw Error("First element of expression must be a string");const L=oa[C];if(void 0===L)throw Error(`Invalid expression operator "${C}"`); |
|
if(!L)throw Error(`Unimplemented expression operator "${C}"`);return L.parse(d,m,t)}class c{constructor(d){this._parent=d;this._vars={}}add(d,m){this._vars[d]=m}get(d){return this._vars[d]?this._vars[d]:this._parent?this._parent.get(d):null}}class f{constructor(){this.type=h.valueType}static parse(d){if(1<d.length)throw Error('"id" does not expect arguments');return new f}evaluate(d,m){return d?.id}}class l{constructor(){this.type=h.stringType}static parse(d){if(1<d.length)throw Error('"geometry-type" does not expect arguments'); |
|
return new l}evaluate(d,m){if(!d)return null;switch(d.type){case e.GeometryType.Point:return"Point";case e.GeometryType.LineString:return"LineString";case e.GeometryType.Polygon:return"Polygon";default:return null}}}class x{constructor(){this.type=h.objectType}static parse(d){if(1<d.length)throw Error('"properties" does not expect arguments');return new x}evaluate(d,m){return d?.values}}class B{constructor(){this.type=h.numberType}static parse(d){if(1<d.length)throw Error('"zoom" does not expect arguments'); |
|
return new B}evaluate(d,m){return m}}class u{constructor(d,m,t){this._lhs=d;this._rhs=m;this._compare=t;this.type=h.booleanType}static parse(d,m,t){if(3!==d.length&&4!==d.length)throw Error(`"${d[0]}" expects 2 or 3 arguments`);if(4===d.length)throw Error(`"${d[0]}" collator not supported`);return new u(n(d[1],m),n(d[2],m),t)}evaluate(d,m){return this._compare(this._lhs.evaluate(d,m),this._rhs.evaluate(d,m))}}class p extends u{static parse(d,m){return u.parse(d,m,(t,C)=>t===C)}}class v extends u{static parse(d, |
|
m){return u.parse(d,m,(t,C)=>t!==C)}}class E extends u{static parse(d,m){return u.parse(d,m,(t,C)=>t<C)}}class H extends u{static parse(d,m){return u.parse(d,m,(t,C)=>t<=C)}}class G extends u{static parse(d,m){return u.parse(d,m,(t,C)=>t>C)}}class z extends u{static parse(d,m){return u.parse(d,m,(t,C)=>t>=C)}}class D{constructor(d){this._arg=d;this.type=h.booleanType}static parse(d,m){if(2!==d.length)throw Error('"!" expects 1 argument');return new D(n(d[1],m))}evaluate(d,m){return!this._arg.evaluate(d, |
|
m)}}class A{constructor(d){this._args=d;this.type=h.booleanType}static parse(d,m){const t=[];for(let C=1;C<d.length;C++)t.push(n(d[C],m));return new A(t)}evaluate(d,m){for(const t of this._args)if(!t.evaluate(d,m))return!1;return!0}}class K{constructor(d){this._args=d;this.type=h.booleanType}static parse(d,m){const t=[];for(let C=1;C<d.length;C++)t.push(n(d[C],m));return new K(t)}evaluate(d,m){for(const t of this._args)if(t.evaluate(d,m))return!0;return!1}}class r{constructor(d){this._args=d;this.type= |
|
h.booleanType}static parse(d,m){const t=[];for(let C=1;C<d.length;C++)t.push(n(d[C],m));return new r(t)}evaluate(d,m){for(const t of this._args)if(t.evaluate(d,m))return!1;return!0}}class y{constructor(d,m,t){this.type=d;this._args=m;this._fallback=t}static parse(d,m,t){if(4>d.length)throw Error('"case" expects at least 3 arguments');if(1===d.length%2)throw Error('"case" expects an odd number of arguments');let C;const L=[];for(let P=1;P<d.length-1;P+=2){const U=n(d[P],m),S=n(d[P+1],m,t);C||(C=S.type); |
|
L.push({condition:U,output:S})}d=n(d[d.length-1],m,t);C||(C=d.type);return new y(C,L,d)}evaluate(d,m){for(const t of this._args)if(t.condition.evaluate(d,m))return t.output.evaluate(d,m);return this._fallback.evaluate(d,m)}}class w{constructor(d,m){this.type=d;this._args=m}static parse(d,m){if(2>d.length)throw Error('"coalesce" expects at least 1 argument');let t;const C=[];for(let L=1;L<d.length;L++){const P=n(d[L],m);t||(t=P.type);C.push(P)}return new w(t,C)}evaluate(d,m){for(const t of this._args){const C= |
|
t.evaluate(d,m);if(null!==C)return C}return null}}class F{constructor(d,m,t,C,L){this.type=d;this._input=m;this._labels=t;this._outputs=C;this._fallback=L}static parse(d,m){if(3>d.length)throw Error('"match" expects at least 3 arguments');if(0===d.length%2)throw Error('"case" expects an even number of arguments');let t;const C=n(d[1],m),L=[],P={};let U;for(let aa=2;aa<d.length-1;aa+=2){var S=d[aa];Array.isArray(S)||(S=[S]);for(const fa of S){S=typeof fa;if("string"!==S&&"number"!==S)throw Error('"match" requires string or number literal as labels'); |
|
if(!U)U=S;else if(S!==U)throw Error('"match" requires labels to have the same type');P[fa]=L.length}S=n(d[aa+1],m);t||(t=S.type);L.push(S)}return new F(t,C,P,L,n(d[d.length-1],m))}evaluate(d,m){const t=this._input.evaluate(d,m);return(this._outputs[this._labels[t]]||this._fallback).evaluate(d,m)}}class I{constructor(d,m,t,C,L){this._operator=d;this.type=m;this.interpolation=t;this.input=C;this._stops=L}static parse(d,m,t){const C=d[0];if(5>d.length)throw Error(`"${C}" expects at least 4 arguments`); |
|
const L=d[1];if(!Array.isArray(L)||0===L.length)throw Error(`"${L}" is not a valid interpolation`);switch(L[0]){case "linear":if(1!==L.length)throw Error("Linear interpolation cannot have parameters");break;case "exponential":if(2!==L.length||"number"!==typeof L[1])throw Error("Exponential interpolation requires one numeric argument");break;case "cubic-bezier":if(5!==L.length)throw Error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1");for(var P=1;5>P;P++){var U= |
|
L[P];if("number"!==typeof U||0>U||1<U)throw Error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1");}break;default:throw Error(`"${d[0]}" unknown interpolation type "${L[0]}"`);}if(1!==d.length%2)throw Error(`"${C}" expects an even number of arguments`);P=n(d[2],m,h.numberType);let S;"interpolate-hcl"===C||"interpolate-lab"===C?S=h.colorType:t&&"value"!==t.kind&&(S=t);t=[];for(U=3;U<d.length;U+=2){const aa=d[U];if("number"!==typeof aa)throw Error(`"${C}" requires stop inputs as literal numbers`); |
|
if(t.length&&t[t.length-1][0]>=aa)throw Error(`"${C}" requires strictly ascending stop inputs`);const fa=n(d[U+1],m,S);S||(S=fa.type);t.push([aa,fa])}if(S&&S!==h.colorType&&S!==h.numberType&&("array"!==S.kind||S.itemType!==h.numberType))throw Error(`"${C}" cannot interpolate type ${h.typeToString(S)}`);return new I(C,S,L,P,t)}evaluate(d,m){var t=this._stops;if(1===t.length)return t[0][1].evaluate(d,m);var C=this.input.evaluate(d,m);if(C<=t[0][0])return t[0][1].evaluate(d,m);if(C>=t[t.length-1][0])return t[t.length- |
|
1][1].evaluate(d,m);let L=0;for(;++L<t.length&&!(C<t[L][0]););const P=I.interpolationRatio(this.interpolation,C,t[L-1][0],t[L][0]);C=t[L-1][1].evaluate(d,m);const U=t[L][1].evaluate(d,m);if("interpolate"===this._operator){if("array"===this.type.kind&&Array.isArray(C)&&Array.isArray(U))return C.map((S,aa)=>g.interpolate(S,U[aa],P));if("color"===this.type.kind&&C instanceof a&&U instanceof a)return C=new a(C),d=new a(U),new a([g.interpolate(C.r,d.r,P),g.interpolate(C.g,d.g,P),g.interpolate(C.b,d.b, |
|
P),g.interpolate(C.a,d.a,P)]);if("number"===this.type.kind&&"number"===typeof C&&"number"===typeof U)return g.interpolate(C,U,P);throw Error(`"${this._operator}" cannot interpolate type ${h.typeToString(this.type)}`);}if("interpolate-hcl"===this._operator)return d=q.toLCH(C),m=q.toLCH(U),t=m.h-d.h,d=q.toRGB({h:d.h+P*(180<t||-180>t?t-360*Math.round(t/360):t),c:g.interpolate(d.c,m.c,P),l:g.interpolate(d.l,m.l,P)}),new a({a:g.interpolate(C.a,U.a,P),...d});if("interpolate-lab"===this._operator)return d= |
|
q.toLAB(C),m=q.toLAB(U),d=q.toRGB({l:g.interpolate(d.l,m.l,P),a:g.interpolate(d.a,m.a,P),b:g.interpolate(d.b,m.b,P)}),new a({a:g.interpolate(C.a,U.a,P),...d});throw Error(`Unexpected operator "${this._operator}"`);}interpolationUniformValue(d,m){const t=this._stops;if(1===t.length||d>=t[t.length-1][0])return 0;let C=0;for(;++C<t.length&&!(d<t[C][0]););return I.interpolationRatio(this.interpolation,m,t[C-1][0],t[C][0])}getInterpolationRange(d){const m=this._stops;if(1===m.length)return d=m[0][0],[d, |
|
d];var t=m[m.length-1][0];if(d>=t)return[t,t];for(t=0;++t<m.length&&!(d<m[t][0]););return[m[t-1][0],m[t][0]]}static interpolationRatio(d,m,t,C){let L=0;"linear"===d[0]?L=I._exponentialInterpolationRatio(m,1,t,C):"exponential"===d[0]?L=I._exponentialInterpolationRatio(m,d[1],t,C):"cubic-bezier"===d[0]&&(L=k.unitBezier(d[1],d[2],d[3],d[4])(I._exponentialInterpolationRatio(m,1,t,C),1E-5));0>L?L=0:1<L&&(L=1);return L}static _exponentialInterpolationRatio(d,m,t,C){C-=t;if(0===C)return 0;d-=t;return 1=== |
|
m?d/C:(m**d-1)/(m**C-1)}}class M{constructor(d,m,t){this.type=d;this._input=m;this._stops=t}static parse(d,m){if(5>d.length)throw Error('"step" expects at least 4 arguments');if(1!==d.length%2)throw Error('"step" expects an even number of arguments');const t=n(d[1],m,h.numberType);let C;const L=[];L.push([-Infinity,n(d[2],m)]);for(let P=3;P<d.length;P+=2){const U=d[P];if("number"!==typeof U)throw Error('"step" requires stop inputs as literal numbers');if(L.length&&L[L.length-1][0]>=U)throw Error('"step" requires strictly ascending stop inputs'); |
|
const S=n(d[P+1],m);C||(C=S.type);L.push([U,S])}return new M(C,t,L)}evaluate(d,m){const t=this._stops;if(1===t.length)return t[0][1].evaluate(d,m);const C=this._input.evaluate(d,m);let L=0;for(;++L<t.length&&!(C<t[L][0]););return this._stops[L-1][1].evaluate(d,m)}}class O{constructor(d,m){this.type=d;this._output=m}static parse(d,m,t){if(4>d.length)throw Error('"let" expects at least 3 arguments');if(1===d.length%2)throw Error('"let" expects an odd number of arguments');const C=new c(m);for(let L= |
|
1;L<d.length-1;L+=2){const P=d[L];if("string"!==typeof P)throw Error(`"let" requires a string to define variable names - found ${P}`);C.add(P,n(d[L+1],m))}d=n(d[d.length-1],C,t);return new O(d.type,d)}evaluate(d,m){return this._output.evaluate(d,m)}}class Q{constructor(d,m){this.type=d;this.output=m}static parse(d,m,t){if(2!==d.length||"string"!==typeof d[1])throw Error('"var" requires just one literal string argument');m=m.get(d[1]);if(!m)throw Error(`${d[1]} must be defined before being used in a "var" expression`); |
|
return new Q(t||h.valueType,m)}evaluate(d,m){return this.output.evaluate(d,m)}}class V{constructor(d,m,t){this.type=d;this._index=m;this._array=t}static parse(d,m){if(3!==d.length)throw Error('"at" expects 2 arguments');const t=n(d[1],m,h.numberType);d=n(d[2],m);return new V(d.type.itemType,t,d)}evaluate(d,m){const t=this._index.evaluate(d,m);d=this._array.evaluate(d,m);if(0>t||t>=d.length)throw Error('"at" index out of bounds');if(t!==Math.floor(t))throw Error('"at" index must be an integer');return d[t]}} |
|
class X{constructor(d,m){this._key=d;this._obj=m;this.type=h.valueType}static parse(d,m){let t;switch(d.length){case 2:return t=n(d[1],m),new X(t);case 3:return t=n(d[1],m),d=n(d[2],m),new X(t,d);default:throw Error('"get" expects 1 or 2 arguments');}}evaluate(d,m){const t=this._key.evaluate(d,m);return this._obj?this._obj.evaluate(d,m)[t]:d?.values[t]}}class Z{constructor(d,m){this._key=d;this._obj=m;this.type=h.booleanType}static parse(d,m){let t;switch(d.length){case 2:return t=n(d[1],m),new Z(t); |
|
case 3:return t=n(d[1],m),d=n(d[2],m),new Z(t,d);default:throw Error('"has" expects 1 or 2 arguments');}}evaluate(d,m){const t=this._key.evaluate(d,m);return this._obj?(d=this._obj.evaluate(d,m),t in d):!!d?.values[t]}}class ha{constructor(d,m){this._key=d;this._vals=m;this.type=h.booleanType}static parse(d,m){if(3!==d.length)throw Error('"in" expects 2 arguments');return new ha(n(d[1],m),n(d[2],m))}evaluate(d,m){const t=this._key.evaluate(d,m);return this._vals.evaluate(d,m).includes(t)}}class ba{constructor(d, |
|
m,t){this._item=d;this._array=m;this._from=t;this.type=h.numberType}static parse(d,m){if(3>d.length||4<d.length)throw Error('"index-of" expects 3 or 4 arguments');const t=n(d[1],m),C=n(d[2],m);return 4===d.length?(d=n(d[3],m,h.numberType),new ba(t,C,d)):new ba(t,C)}evaluate(d,m){const t=this._item.evaluate(d,m),C=this._array.evaluate(d,m);if(this._from){d=this._from.evaluate(d,m);if(d!==Math.floor(d))throw Error('"index-of" index must be an integer');return C.indexOf(t,d)}return C.indexOf(t)}}class J{constructor(d){this._arg= |
|
d;this.type=h.numberType}static parse(d,m){if(2!==d.length)throw Error('"length" expects 2 arguments');d=n(d[1],m);return new J(d)}evaluate(d,m){d=this._arg.evaluate(d,m);if("string"===typeof d||Array.isArray(d))return d.length;throw Error('"length" expects string or array');}}class N{constructor(d,m,t,C){this.type=d;this._array=m;this._from=t;this._to=C}static parse(d,m){if(3>d.length||4<d.length)throw Error('"slice" expects 2 or 3 arguments');const t=n(d[1],m),C=n(d[2],m,h.numberType);if(C.type!== |
|
h.numberType)throw Error('"slice" index must return a number');if(4===d.length){d=n(d[3],m,h.numberType);if(d.type!==h.numberType)throw Error('"slice" index must return a number');return new N(t.type,t,C,d)}return new N(t.type,t,C)}evaluate(d,m){const t=this._array.evaluate(d,m);if(!Array.isArray(t)&&"string"!==typeof t)throw Error('"slice" input must be an array or a string');const C=this._from.evaluate(d,m);if(0>C||C>=t.length)throw Error('"slice" index out of bounds');if(C!==Math.floor(C))throw Error('"slice" index must be an integer'); |
|
if(this._to){d=this._to.evaluate(d,m);if(0>d||d>=t.length)throw Error('"slice" index out of bounds');if(d!==Math.floor(d))throw Error('"slice" index must be an integer');return t.slice(C,d)}return t.slice(C)}}class R{constructor(){this.type=h.booleanType}static parse(d){if(1!==d.length)throw Error('"has-id" expects no arguments');return new R}evaluate(d,m){return void 0!==d?.id}}class T{constructor(d,m){this._args=d;this._calculate=m;this.type=h.numberType}static parse(d,m,t){d=d.slice(1).map(C=> |
|
n(C,m));return new T(d,t)}evaluate(d,m){let t;this._args&&(t=this._args.map(C=>C.evaluate(d,m)));return this._calculate(t)}}class da extends T{static parse(d,m){switch(d.length){case 2:return T.parse(d,m,t=>-t[0]);case 3:return T.parse(d,m,t=>t[0]-t[1]);default:throw Error('"-" expects 1 or 2 arguments');}}}class pa extends T{static parse(d,m){return T.parse(d,m,t=>{let C=1;for(const L of t)C*=L;return C})}}class qa extends T{static parse(d,m){if(3===d.length)return T.parse(d,m,t=>t[0]/t[1]);throw Error('"/" expects 2 arguments'); |
|
}}class ra extends T{static parse(d,m){if(3===d.length)return T.parse(d,m,t=>t[0]%t[1]);throw Error('"%" expects 2 arguments');}}class sa extends T{static parse(d,m){if(3===d.length)return T.parse(d,m,t=>t[0]**t[1]);throw Error('"^" expects 1 or 2 arguments');}}class ta extends T{static parse(d,m){return T.parse(d,m,t=>{let C=0;for(const L of t)C+=L;return C})}}class W{constructor(d,m){this._args=d;this._calculate=m;this.type=h.numberType}static parse(d,m){const t=d.slice(1).map(C=>n(C,m));return new W(t, |
|
W.ops[d[0]])}evaluate(d,m){let t;this._args&&(t=this._args.map(C=>C.evaluate(d,m)));return this._calculate(t)}}W.ops={abs:d=>Math.abs(d[0]),acos:d=>Math.acos(d[0]),asin:d=>Math.asin(d[0]),atan:d=>Math.atan(d[0]),ceil:d=>Math.ceil(d[0]),cos:d=>Math.cos(d[0]),e:()=>Math.E,floor:d=>Math.floor(d[0]),ln:d=>Math.log(d[0]),ln2:()=>Math.LN2,log10:d=>Math.log(d[0])/Math.LN10,log2:d=>Math.log(d[0])/Math.LN2,max:d=>Math.max(...d),min:d=>Math.min(...d),pi:()=>Math.PI,round:d=>Math.round(d[0]),sin:d=>Math.sin(d[0]), |
|
sqrt:d=>Math.sqrt(d[0]),tan:d=>Math.tan(d[0])};class ia{constructor(d){this._args=d;this.type=h.stringType}static parse(d,m){return new ia(d.slice(1).map(t=>n(t,m)))}evaluate(d,m){return this._args.map(t=>t.evaluate(d,m)).join("")}}class ea{constructor(d,m){this._arg=d;this._calculate=m;this.type=h.stringType}static parse(d,m){if(2!==d.length)throw Error(`${d[0]} expects 1 argument`);m=n(d[1],m);return new ea(m,ea.ops[d[0]])}evaluate(d,m){return this._calculate(this._arg.evaluate(d,m))}}ea.ops={downcase:d=> |
|
d.toLowerCase(),upcase:d=>d.toUpperCase()};class ja{constructor(d){this._args=d;this.type=h.colorType}static parse(d,m){if(4!==d.length)throw Error('"rgb" expects 3 arguments');d=d.slice(1).map(t=>n(t,m));return new ja(d)}evaluate(d,m){const t=this._validate(this._args[0].evaluate(d,m)),C=this._validate(this._args[1].evaluate(d,m));d=this._validate(this._args[2].evaluate(d,m));return new a({r:t,g:C,b:d})}_validate(d){if("number"!==typeof d||0>d||255<d)throw Error(`${d}: invalid color component`); |
|
return Math.round(d)}}class ka{constructor(d){this._args=d;this.type=h.colorType}static parse(d,m){if(5!==d.length)throw Error('"rgba" expects 4 arguments');d=d.slice(1).map(t=>n(t,m));return new ka(d)}evaluate(d,m){const t=this._validate(this._args[0].evaluate(d,m)),C=this._validate(this._args[1].evaluate(d,m)),L=this._validate(this._args[2].evaluate(d,m));d=this._validateAlpha(this._args[3].evaluate(d,m));return new a({r:t,g:C,b:L,a:d})}_validate(d){if("number"!==typeof d||0>d||255<d)throw Error(`${d}: invalid color component`); |
|
return Math.round(d)}_validateAlpha(d){if("number"!==typeof d||0>d||1<d)throw Error(`${d}: invalid alpha color component`);return d}}class la{constructor(d){this._color=d;this.type=h.arrayType(h.numberType,4)}static parse(d,m){if(2!==d.length)throw Error('"to-rgba" expects 1 argument');d=n(d[1],m);return new la(d)}evaluate(d,m){return(new a(this._color.evaluate(d,m))).toRgba()}}class ca{constructor(d,m){this.type=d;this._args=m}static parse(d,m){var t=d[0];if(2>d.length)throw Error(`${t} expects at least one argument`); |
|
let C=1,L;if("array"===t){if(2<d.length){switch(d[1]){case "string":L=h.stringType;break;case "number":L=h.numberType;break;case "boolean":L=h.booleanType;break;default:throw Error('"array" type argument must be string, number or boolean');}C++}else L=h.valueType;if(3<d.length){var P=d[2];if(null!==P&&("number"!==typeof P||0>P||P!==Math.floor(P)))throw Error('"array" length argument must be a positive integer literal');C++}L=h.arrayType(L,P)}else switch(t){case "string":L=h.stringType;break;case "number":L= |
|
h.numberType;break;case "boolean":L=h.booleanType;break;case "object":L=h.objectType}for(t=[];C<d.length;C++)P=n(d[C],m),t.push(P);return new ca(L,t)}evaluate(d,m){let t;for(const C of this._args){const L=C.evaluate(d,m);t=h.getType(L);if(h.matchType(t,this.type))return L}throw Error(`Expected ${h.typeToString(this.type)} but got ${h.typeToString(t)}`);}}class Y{constructor(d,m){this.type=d;this._args=m}static parse(d,m){var t=d[0];const C=Y.types[t];if(C===h.booleanType||C===h.stringType){if(2!== |
|
d.length)throw Error(`${t} expects one argument`);}else if(2>d.length)throw Error(`${t} expects at least one argument`);t=[];for(let L=1;L<d.length;L++){const P=n(d[L],m);t.push(P)}return new Y(C,t)}evaluate(d,m){if(this.type===h.booleanType)return!!this._args[0].evaluate(d,m);if(this.type===h.stringType)return h.valueToString(this._args[0].evaluate(d,m));if(this.type===h.numberType){for(const C of this._args){var t=Number(C.evaluate(d,m));if(!isNaN(t))return t}return null}if(this.type===h.colorType){for(t of this._args)try{const C= |
|
Y.toColor(t.evaluate(d,m));if(C instanceof a)return C}catch{}return null}}static toBoolean(d){return!!d}static toString(d){return h.valueToString(d)}static toNumber(d){const m=Number(d);if(isNaN(m))throw Error(`"${d}" is not a number`);return m}static toColor(d){if(d instanceof a)return d;if("string"===typeof d){const m=a.fromString(d);if(m)return m;throw Error(`"${d}" is not a color`);}if(Array.isArray(d))return a.fromArray(d);throw Error(`"${d}" is not a color`);}}Y.types={"to-boolean":h.booleanType, |
|
"to-color":h.colorType,"to-number":h.numberType,"to-string":h.stringType};class ma{constructor(d){this._val=d;this.type=h.getType(d)}static parse(d){if(2!==d.length)throw Error('"literal" expects 1 argument');return new ma(d[1])}evaluate(d,m){return this._val}}class na{constructor(d){this._arg=d;this.type=h.stringType}static parse(d,m){if(2!==d.length)throw Error('"typeof" expects 1 argument');return new na(n(d[1],m))}evaluate(d,m){return h.typeToString(h.getType(this._arg.evaluate(d,m)))}}const oa= |
|
{array:ca,boolean:ca,collator:null,format:null,image:null,literal:ma,number:ca,"number-format":null,object:ca,string:ca,"to-boolean":Y,"to-color":Y,"to-number":Y,"to-string":Y,typeof:na,accumulated:null,"feature-state":null,"geometry-type":l,id:f,"line-progress":null,properties:x,at:V,get:X,has:Z,in:ha,"index-of":ba,length:J,slice:N,"!":D,"!\x3d":v,"\x3c":E,"\x3c\x3d":H,"\x3d\x3d":p,"\x3e":G,"\x3e\x3d":z,all:A,any:K,case:y,coalesce:w,match:F,within:null,interpolate:I,"interpolate-hcl":I,"interpolate-lab":I, |
|
step:M,let:O,var:Q,concat:ia,downcase:ea,"is-supported-script":null,"resolved-locale":null,upcase:ea,rgb:ja,rgba:ka,"to-rgba":la,"-":da,"*":pa,"/":qa,"%":ra,"^":sa,"+":ta,abs:W,acos:W,asin:W,atan:W,ceil:W,cos:W,e:W,floor:W,ln:W,ln2:W,log10:W,log2:W,max:W,min:W,pi:W,round:W,sin:W,sqrt:W,tan:W,zoom:B,"heatmap-density":null,"has-id":R,none:r};b.ALL=A;b.ANY=K;b.Add=ta;b.Assert=ca;b.At=V;b.Calculate=W;b.Case=y;b.Coalesce=w;b.Coerce=Y;b.Concat=ia;b.Div=qa;b.EQ=p;b.GE=z;b.GT=G;b.GeomType=l;b.Get=X;b.Has= |
|
Z;b.HasID=R;b.ID=f;b.In=ha;b.IndexOf=ba;b.Interpolate=I;b.LE=H;b.LT=E;b.Length=J;b.Let=O;b.Literal=ma;b.Match=F;b.Mod=ra;b.Mul=pa;b.NE=v;b.NONE=r;b.NOT=D;b.Pow=sa;b.Properties=x;b.Rgb=ja;b.Rgba=ka;b.Slice=N;b.Step=M;b.String=ea;b.Sub=da;b.ToRgba=la;b.TypeOf=na;b.Var=Q;b.Zoom=B;b.createExpression=n;b.ops=oa;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/unitBezier":function(){define(["exports"],function(b){function a(k,g,h,n){function c(v,E){var H;let G,z;G=v;for(H= |
|
0;8>H;H++){z=((x*G+l)*G+f)*G-v;if(Math.abs(z)<E)return G;var D=(3*x*G+2*l)*G+f;if(1E-6>Math.abs(D))break;G-=z/D}D=0;H=1;G=v;if(G<D)return D;if(G>H)return H;for(;D<H;){z=((x*G+l)*G+f)*G;if(Math.abs(z-v)<E)break;v>z?D=G:H=G;G=.5*(H-D)+D}return G}const f=3*k,l=3*(h-k)-f,x=1-f-l,B=3*g,u=3*(n-g)-B,p=1-B-u;return function(v,E=1E-6){v=c(v,E);return((p*v+u)*v+B)*v}}const q=/^cubic-bezier\((.*)\)/,e={};e.ease=a(.25,.1,.25,1);e.linear=a(0,0,1,1);e.easeIn=e["ease-in"]=a(.42,0,1,1);e.easeOut=e["ease-out"]=a(0, |
|
0,.58,1);e.easeInOut=e["ease-in-out"]=a(.42,0,.58,1);b.easingFunctions=e;b.parse=function(k){let g=e[k]||null;!g&&(k=q.exec(k))&&(k=k[1].split(",").map(h=>parseFloat(h.trim())),4!==k.length||k.some(h=>isNaN(h))||(g=a.apply(a,k)));return g};b.unitBezier=a;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/expression/types":function(){define(["exports","../../../../../Color"],function(b,a){function q(p,v){return{kind:"array",itemType:p,n:v}}function e(p){if("array"=== |
|
p.kind){const v=e(p.itemType);return"number"===typeof p.n?`array<${v}, ${p.n}>`:"value"===p.itemType.kind?"array":`array<${v}>`}return p.kind}function k(p){if(null===p)return h;if("string"===typeof p)return c;if("boolean"===typeof p)return f;if("number"===typeof p)return n;if(p instanceof a)return l;if(Array.isArray(p)){let v;for(const E of p){const H=k(E);if(!v)v=H;else if(v!==H){v=B;break}}return q(v||B,p.length)}return"object"===typeof p?x:B}function g(p,v){if("array"===v.kind)return"array"=== |
|
p.kind&&(0===p.n&&"value"===p.itemType.kind||g(p.itemType,v.itemType))&&("number"!==typeof v.n||v.n===p.n);if("value"===v.kind)for(const E of u)if(g(p,E))return!0;return v.kind===p.kind}const h={kind:"null"},n={kind:"number"},c={kind:"string"},f={kind:"boolean"},l={kind:"color"},x={kind:"object"},B={kind:"value"},u=[h,n,c,f,l,x,q(B)];b.arrayType=q;b.booleanType=f;b.colorType=l;b.getType=k;b.matchType=g;b.nullType=h;b.numberType=n;b.objectType=x;b.stringType=c;b.typeToString=e;b.valueToString=function(p){if(null=== |
|
p)return"";const v=typeof p;return"string"===v?p:"number"===v||"boolean"===v?String(p):p instanceof a?p.toString():JSON.stringify(p)};b.valueType=B;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/2d/engine/vectorTiles/style/StyleProperty":function(){define(["../../../../../Color","../GeometryUtils","../expression/expression","../expression/types"],function(b,a,q,e){class k{constructor(g,h){this.isDataDriven=!1;this.interpolator=null;switch(g.type){case "number":var n=!0; |
|
break;case "color":n=!0;break;case "array":n="number"===g.value;break;default:n=!1}null==h&&(h=g.default);if(Array.isArray(h)&&0<h.length&&q.ops[h[0]]){n={number:e.numberType,color:e.colorType,string:e.stringType,boolean:e.booleanType,enum:e.stringType};try{var c="array"===g.type?e.arrayType(n[g.value]||e.valueType,g.length):n[g.type];const f=q.createExpression(h,null,c);this.getValue=this._buildExpression(f,g);this.isDataDriven=!0;f instanceof q.Interpolate&&f.input instanceof q.Zoom&&(this.interpolator= |
|
f)}catch(f){console.log(f.message),this.getValue=this._buildSimple(g.default)}}else{n&&"interval"===h.type&&(n=!1);if(c=h?.stops&&0<h.stops.length)for(const f of h.stops)f[1]=this._validate(f[1],g);if(this.isDataDriven=h?!!h.property:!1)if(void 0!==h.default&&(h.default=this._validate(h.default,g)),c)switch(h.type){case "identity":this.getValue=this._buildIdentity(h,g);break;case "categorical":this.getValue=this._buildCategorical(h,g);break;default:this.getValue=n?this._buildInterpolate(h,g):this._buildInterval(h, |
|
g)}else this.getValue=this._buildIdentity(h,g);else c?this.getValue=n?this._buildZoomInterpolate(h):this._buildZoomInterval(h):(h=this._validate(h,g),this.getValue=this._buildSimple(h))}}_validate(g,h){if("number"===h.type){if(null!=h.minimum&&g<h.minimum)return h.minimum;if(null!=h.maximum&&g>h.maximum)return h.maximum}else"color"===h.type?g=k._parseColor(g):"enum"===h.type?"string"===typeof g&&(g=h.values.indexOf(g)):"array"===h.type&&"enum"===h.value?g=g.map(n=>"string"===typeof n?h.values.indexOf(n): |
|
n):"string"===h.type&&(g=e.valueToString(g));return g}_buildSimple(g){return()=>g}_buildExpression(g,h){return(n,c)=>{try{const f=g.evaluate(c,n);return void 0===f?h.default:this._validate(f,h)}catch(f){return console.log(f.message),h.default}}}_buildIdentity(g,h){return(n,c)=>{let f;c&&(f=c.values[g.property]);void 0!==f&&(f=this._validate(f,h));return null!=f?f:void 0!==g.default?g.default:h.default}}_buildCategorical(g,h){return(n,c)=>{let f;c&&(f=c.values[g.property]);f=this._categorical(f,g.stops); |
|
return void 0!==f?f:void 0!==g.default?g.default:h.default}}_buildInterval(g,h){return(n,c)=>{let f;c&&(f=c.values[g.property]);return"number"===typeof f?this._interval(f,g.stops):void 0!==g.default?g.default:h.default}}_buildInterpolate(g,h){return(n,c)=>{let f;c&&(f=c.values[g.property]);return"number"===typeof f?this._interpolate(f,g.stops,g.base||1):void 0!==g.default?g.default:h.default}}_buildZoomInterpolate(g){return h=>this._interpolate(h,g.stops,g.base||1)}_buildZoomInterval(g){return h=> |
|
this._interval(h,g.stops)}_categorical(g,h){const n=h.length;for(let c=0;c<n;c++)if(h[c][0]===g)return h[c][1]}_interval(g,h){const n=h.length;let c=0;for(let f=0;f<n;f++)if(h[f][0]<=g)c=f;else break;return h[c][1]}_interpolate(g,h,n){const c=h.length;for(let x=0;x<c;x++){const B=h[x];if(B[0]<=g)var f=B;else{var l=B;break}}if(f&&l){h=l[0]-f[0];g-=f[0];n=1===n?g/h:(n**g-1)/(n**h-1);if(Array.isArray(f[1])){f=f[1];l=l[1];g=[];for(h=0;h<f.length;h++)g.push(a.interpolate(f[h],l[h],n));return g}return a.interpolate(f[1], |
|
l[1],n)}if(f)return f[1];if(l)return l[1]}static _isEmpty(g){for(const h in g)if(g.hasOwnProperty(h))return!1;return!0}static _parseColor(g){if(Array.isArray(g))return g;"string"===typeof g&&(g=new b(g));if(g instanceof b&&!this._isEmpty(g))return b.toUnitRGBA(g)}}return k})},"esri/views/2d/engine/webgl/definitions":function(){define(["exports"],function(b){b.AttributeDataType=void 0;var a=b.AttributeDataType||(b.AttributeDataType={});a[a.FilterFlags=0]="FilterFlags";a[a.Animation=1]="Animation"; |
|
a[a.GPGPU=2]="GPGPU";a[a.VV=3]="VV";a[a.DD0=4]="DD0";a[a.DD1=5]="DD1";a[a.DD2=6]="DD2";b.MAX_TILE_RESHUFFLES_PER_FRAME=1;b.RESHUFFLING_EXEMPT_DRAW_CALLS=10;b.RESHUFFLING_EXEMPT_MEMORY_BYTES=1048576;b.RESHUFFLING_TARGET_DRAW_EFFICIENCY=.75;b.RESHUFFLING_TARGET_MEMORY_EFFICIENCY=.75;b.angleFactor256=256/360;b.animationUnit=2;b.attributeStoreInitialSize=256;b.attributeStoreTextureSize=1024;b.averageGlyphMosaicItem={metrics:{width:15,height:17,left:0,top:-7,advance:14}};b.bitsetFillHasPatternHeightPrecisionFactor= |
|
32;b.bitsetFillHasPatternWidthPrecisionFactor=64;b.bitsetFillHasUnresolvedReplacementColor=8;b.bitsetFillRandomPatternOffset=4;b.bitsetGenericConsiderAlphaOnly=16;b.bitsetGenericLockColor=2;b.bitsetLineScaleDash=4;b.bitsetMarkerAlignmentMap=1;b.bitsetMarkerAlignmentScreen=0;b.bitsetMarkerOutlineAllowColorOverride=4;b.bitsetMarkerScaleSymbolsProportionally=8;b.bitsetTypeFillOutline=1;b.bufferDataMinimumSize=128;b.bufferDataPoolSize=4;b.chartMaxFields=10;b.collisionBoxPadding=16;b.collisionBucketSize= |
|
128;b.collisionEarlyRejectBucketSize=16;b.collisionMaxZoomDelta=1;b.collisionPlacementPadding=8;b.collisionTileBoxSize=4;b.compressionFactorForU16=128;b.dataDrivenUnit0=4;b.dataDrivenUnit1=5;b.dataDrivenUnit2=6;b.debugLabels=!1;b.defaultSdfTextureSize=128;b.displayRecordIntPerElement=8;b.dotDensityMaxFields=8;b.effectFlag0=16;b.enableEarlyLabelDiscard=!1;b.extrudeScale=64;b.filterFlag0=8;b.filterFlagsUnit=1;b.glyphSize=24;b.gpgpuUnit=12;b.heuristicGlyphsPerFeature=10;b.heuristicGlyphsPerLine=50;b.highlightReasonsCount= |
|
3;b.hittestSmallSymbolThreshold=3;b.hittestToleranceDesktop=1;b.hittestToleranceMobile=3;b.hittestToleranceSmallSymbol=3;b.labelPlacementOffsetPadding=4;b.magicLabelLineHeight=29;b.maxGeohashLevel=12;b.maxGpuUploadsPerFrame=2;b.maxRepresentableInt=16777216;b.maxTextLineWidth=512;b.minMaxZoomPrecisionFactor=10;b.minTextLineWidth=32;b.nanMagicNumber=1E-30;b.patchPixelBufferAllocSize=500;b.patternFillRasterizationScale=2;b.pictureFillColor=4294967295;b.randomInsidePolygonTextureSize=1024;b.rasterTileSize= |
|
256;b.spritePadding=2;b.svgSdfTextureInnerSize=252;b.svgSdfTextureSize=256;b.textureBindingBitmap=0;b.textureBindingGlyphAtlas=0;b.textureBindingHighlight0=5;b.textureBindingHighlight1=6;b.textureBindingRenderer0=5;b.textureBindingRenderer1=6;b.textureBindingSpriteAtlas=0;b.textureUploadManagerBudget=4;b.textureUploadManagerChunkSize=128;b.thinLineHalfWidthThreshold=1.05;b.tileSize=512;b.visualVariableUnit=3;b.vtlHighResCutoff=1.15;b.vtlTextureBindingUnitGlyphs=6;b.vtlTextureBindingUnitSprites=5; |
|
b.webglMaxInnerStops=6;b.webglMaxStops=8;Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/capabilities":function(){define(["exports","./contextUtils"],function(b,a){function q(g){if("undefined"===typeof WebGL2RenderingContext)return null;var h=document.createElement("canvas");if(!h)return null;let n=a.createContext(h,{failIfMajorPerformanceCaveat:!0});null==n&&(n=a.createContext(h),null!=n&&(g.majorPerformanceCaveat=!0));if(null==n)return n;g.available=!0;g.maxTextureSize= |
|
n.getParameter(n.MAX_TEXTURE_SIZE);g.supportsVertexShaderSamplers=0<n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS);if(h=n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT))g.supportsHighPrecisionFragment=0<h.precision;return n}let e;class k{constructor(){this.majorPerformanceCaveat=this.available=!1;this.maxTextureSize=0;this.supportsColorBufferHalfFloat=this.supportsColorBufferFloatBlend=this.supportsColorBufferFloat=this.supportsHighPrecisionFragment=this.supportsVertexShaderSamplers=!1}} |
|
b.getWebGLCapabilities=function(){if(!e){{const g=new k,h=q(g);null!=h&&(g.supportsColorBufferFloat=null!==h.getExtension("EXT_color_buffer_float"),g.supportsColorBufferFloatBlend=null!==h.getExtension("EXT_float_blend"),g.supportsColorBufferHalfFloat=g.supportsColorBufferFloat||null!==h.getExtension("EXT_color_buffer_half_float"));e=g}}return e};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"esri/views/webgl/contextUtils":function(){define(["exports"],function(b){b.createContext= |
|
function(a,q={}){return(a=a.getContext("webgl2",q))?a:null};Object.defineProperty(b,Symbol.toStringTag,{value:"Module"})})},"*noref":1}}); |
|
define("../chunks/tslib.es6 ../request ../core/asyncUtils ../core/Error ../core/lang ../core/MultiOriginJSONSupport ../core/promiseUtils ../core/urlUtils ../core/accessorSupport/decorators/property ../core/has ../core/Logger ../core/accessorSupport/decorators/reader ../core/accessorSupport/decorators/subclass ../core/accessorSupport/decorators/writer ../geometry/Extent ../geometry/SpatialReference ./Layer ./mixins/APIKeyMixin ./mixins/ArcGISCachedService ./mixins/ArcGISService ./mixins/BlendLayer ./mixins/CustomParametersMixin ./mixins/OperationalLayer ./mixins/PortalLayer ./mixins/ScaleRangeLayer ./support/imageUtils ./support/SpriteSource ./support/TileInfo ./support/TilemapCache ./support/vectorTileLayerLoader ../portal/support/jsonContext ../portal/support/urlUtils ../chunks/persistableUrlUtils ../views/2d/engine/vectorTiles/tileInfoUtils ../views/2d/engine/vectorTiles/style/StyleRepository ../views/webgl/capabilities".split(" "),function(b, |
|
a,q,e,k,g,h,n,c,f,l,x,B,u,p,v,E,H,G,z,D,A,K,r,y,w,F,I,M,O,Q,V,X,Z,ha,ba){g=class extends D.BlendLayer(y.ScaleRangeLayer(G.ArcGISCachedService(z.ArcGISService(K.OperationalLayer(r.PortalLayer(A.CustomParametersMixin(H.APIKeyMixin(g.MultiOriginJSONMixin(E))))))))){constructor(...J){super(...J);this._spriteSourceMap=new Map;this.isReference=this.currentStyleInfo=null;this.operationalLayerType="VectorTileLayer";this.tilemapCache=this.style=null;this.type="vector-tile";this.path=this.url=null}normalizeCtorArgs(J, |
|
N){return"string"===typeof J?{url:J,...N}:J}destroy(){if(this.sourceNameToSource)for(const J of Object.values(this.sourceNameToSource))J?.destroy();this.primarySource?.destroy();this._spriteSourceMap.clear()}async prefetchResources(J){await this.loadSpriteSource(globalThis.devicePixelRatio||1,J)}load(J){const N=this.loadFromPortal({supportedTypes:["Vector Tile Service"],supportsData:!1},J).catch(h.throwIfAbortError).then(async()=>{if(this.portalItem?.id){var R=`${this.portalItem.itemCdnUrl}/resources/styles/root.json`; |
|
(await a(R,{...J,query:{f:"json",...this.customParameters,token:this.apiKey}})).data&&this.read({url:R},Q.createForItemRead(this.portalItem,"portal-item"))}}).catch(h.throwIfAbortError).then(()=>this._loadStyle(J));this.addResolvingPromise(N);return Promise.resolve(this)}get attributionDataUrl(){var J=this.currentStyleInfo;J=J?.serviceUrl&&n.urlToObject(J.serviceUrl);return J?(J=this._getDefaultAttribution(J.path))?n.addQueryParameters(J,{...this.customParameters,token:this.apiKey}):null:null}get capabilities(){const J= |
|
this.primarySource;return J?J.capabilities:{operations:{supportsExportTiles:!1,supportsTileMap:!1},exportTiles:null}}get fullExtent(){return this.primarySource?.fullExtent||null}get initialExtent(){return this.primarySource?.initialExtent||null}get parsedUrl(){return this.serviceUrl?n.urlToObject(this.serviceUrl):null}get serviceUrl(){return this.currentStyleInfo?.serviceUrl||null}get spatialReference(){return this.tileInfo?.spatialReference??null}get styleUrl(){return this.currentStyleInfo?.styleUrl|| |
|
null}writeStyleUrl(J,N){J&&n.isProtocolRelative(J)&&(J=`https:${J}`);const R=V.parseKnownArcGISOnlineDomain(J);N.styleUrl=X.ensureMainOnlineDomain(J,R)}get tileInfo(){const J=[];for(var N in this.sourceNameToSource)J.push(this.sourceNameToSource[N]);N=this.primarySource?.tileInfo||new I;if(1<J.length)for(let R=0;R<J.length;R++)Z.areSchemasOverlapping(N,J[R].tileInfo)&&(N=Z.unionTileInfos(N,J[R].tileInfo));return N}readTilemapCache(J,N){return N.capabilities?.includes("Tilemap")?new M.TilemapCache({layer:this}): |
|
null}readVersion(J,N){return N.version?parseFloat(N.version):parseFloat(N.currentVersion)}async loadSpriteSource(J=1,N){if(!this._spriteSourceMap.has(J)){var R=ba.getWebGLCapabilities().maxTextureSize;const T=this.currentStyleInfo?.spriteUrl?n.addQueryParameters(this.currentStyleInfo.spriteUrl,{...this.customParameters,token:this.apiKey}):null;R=new F({type:"url",spriteUrl:T,pixelRatio:J,spriteFormat:this.currentStyleInfo?.spriteFormat},R);await R.load(N);this._spriteSourceMap.set(J,R)}return this._spriteSourceMap.get(J)}async setSpriteSource(J, |
|
N){if(!J)return null;var R=ba.getWebGLCapabilities().maxTextureSize,T=J.spriteUrl;T=T?n.addQueryParameters(T,{...this.customParameters,token:this.apiKey}):null;if(!T&&"url"===J.type)return null;R=new F(J,R);try{await R.load(N);const da=J.pixelRatio||1;this._spriteSourceMap.clear();this._spriteSourceMap.set(da,R);T&&this.currentStyleInfo&&(this.currentStyleInfo.spriteUrl=T);this.emit("spriteSource-change",{spriteSource:R});return R}catch(da){h.throwIfAbortError(da)}return null}async loadStyle(J,N){const R= |
|
J||this.style||this.url;if(this._loadingTask&&"string"===typeof R&&this.url===R)return this._loadingTask.promise;this._loadingTask?.abort();this._loadingTask=q.createTask(T=>{this._spriteSourceMap.clear();return this._getSourceAndStyle(R,{signal:T})},N);return this._loadingTask.promise}getStyleLayerId(J){return this.styleRepository.getStyleLayerId(J)}getStyleLayerIndex(J){return this.styleRepository.getStyleLayerIndex(J)}getPaintProperties(J){return k.clone(this.styleRepository?.getPaintProperties(J))}setPaintProperties(J, |
|
N){const R=this.styleRepository.isPainterDataDriven(J);this.styleRepository.setPaintProperties(J,N);const T=this.styleRepository.isPainterDataDriven(J);this.emit("paint-change",{layer:J,paint:N,isDataDriven:R||T})}getStyleLayer(J){return k.clone(this.styleRepository.getStyleLayer(J))}setStyleLayer(J,N){this.styleRepository.setStyleLayer(J,N);this.emit("style-layer-change",{layer:J,index:N})}deleteStyleLayer(J){this.styleRepository.deleteStyleLayer(J);this.emit("delete-style-layer",{layer:J})}getLayoutProperties(J){return k.clone(this.styleRepository.getLayoutProperties(J))}setLayoutProperties(J, |
|
N){this.styleRepository.setLayoutProperties(J,N);this.emit("layout-change",{layer:J,layout:N})}setStyleLayerVisibility(J,N){this.styleRepository.setStyleLayerVisibility(J,N);this.emit("style-layer-visibility-change",{layer:J,visibility:N})}getStyleLayerVisibility(J){return this.styleRepository.getStyleLayerVisibility(J)}write(J,N){return N?.origin&&!this.styleUrl?(N.messages&&N.messages.push(new e("vectortilelayer:unsupported",`VectorTileLayer (${this.title}, ${this.id}) with style defined by JSON only are not supported`, |
|
{layer:this})),null):super.write(J,N)}getTileUrl(J,N,R){return null}async _getSourceAndStyle(J,N){if(!J)throw Error("invalid style!");N=await O.loadMetadata(J,{...N,query:{...this.customParameters,token:this.apiKey}});"webp"!==N.spriteFormat||await w.checkWebPSupport("lossy")||(N.spriteFormat="png");this._set("currentStyleInfo",{...N});"string"===typeof J?(this.url=J,this.style=null):(this.url=null,this.style=J);this._set("sourceNameToSource",N.sourceNameToSource);this._set("primarySource",N.sourceNameToSource[N.primarySourceName]); |
|
this._set("styleRepository",new ha(N.style));this.read(N.layerDefinition,{origin:"service"});this.emit("load-style")}_getDefaultAttribution(J){var N=J.match(/^https?:\/\/(?:basemaps|basemapsbeta|basemapsdev)(?:-api)?\.arcgis\.com(\/[^/]+)?\/arcgis\/rest\/services\/([^/]+(\/[^/]+)*)\/vectortileserver/i);J="OpenStreetMap_v2 OpenStreetMap_Daylight_v2 OpenStreetMap_Export_v2 OpenStreetMap_FTS_v2 OpenStreetMap_GCS_v2 World_Basemap World_Basemap_v2 World_Basemap_Export_v2 World_Basemap_GCS_v2 World_Basemap_WGS84 World_Contours_v2 World_Hillshade_v2".split(" "); |
|
if(N){var R=N[2]&&N[2].toLowerCase();if(R){N=N[1]||"";for(const T of J)if(T.toLowerCase().includes(R))return n.normalize(`//static.arcgis.com/attribution/Vector${N}/${T}`)}}}async _loadStyle(J){return this._loadingTask?.promise??this.loadStyle(null,J)}};b.__decorate([c.property({readOnly:!0})],g.prototype,"attributionDataUrl",null);b.__decorate([c.property({type:["show","hide"]})],g.prototype,"listMode",void 0);b.__decorate([c.property({json:{read:!0,write:!0}})],g.prototype,"blendMode",void 0);b.__decorate([c.property({readOnly:!0, |
|
json:{read:!1}})],g.prototype,"capabilities",null);b.__decorate([c.property({readOnly:!0})],g.prototype,"currentStyleInfo",void 0);b.__decorate([c.property({json:{read:!1},readOnly:!0,type:p})],g.prototype,"fullExtent",null);b.__decorate([c.property({json:{read:!1},readOnly:!0,type:p})],g.prototype,"initialExtent",null);b.__decorate([c.property({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],g.prototype,"isReference",void 0);b.__decorate([c.property({type:["VectorTileLayer"]})], |
|
g.prototype,"operationalLayerType",void 0);b.__decorate([c.property({readOnly:!0})],g.prototype,"parsedUrl",null);b.__decorate([c.property()],g.prototype,"style",void 0);b.__decorate([c.property({readOnly:!0})],g.prototype,"serviceUrl",null);b.__decorate([c.property({type:v,readOnly:!0})],g.prototype,"spatialReference",null);b.__decorate([c.property({readOnly:!0})],g.prototype,"styleRepository",void 0);b.__decorate([c.property({readOnly:!0})],g.prototype,"sourceNameToSource",void 0);b.__decorate([c.property({readOnly:!0})], |
|
g.prototype,"primarySource",void 0);b.__decorate([c.property({type:String,readOnly:!0,json:{write:{ignoreOrigin:!0},origins:{"web-document":{write:{ignoreOrigin:!0,isRequired:!0}}}}})],g.prototype,"styleUrl",null);b.__decorate([u.writer(["portal-item","web-document"],"styleUrl")],g.prototype,"writeStyleUrl",null);b.__decorate([c.property({json:{read:!1,origins:{service:{read:!1}}},readOnly:!0,type:I})],g.prototype,"tileInfo",null);b.__decorate([c.property()],g.prototype,"tilemapCache",void 0);b.__decorate([x.reader("service", |
|
"tilemapCache",["capabilities","tileInfo"])],g.prototype,"readTilemapCache",null);b.__decorate([c.property({json:{read:!1},readOnly:!0,value:"vector-tile"})],g.prototype,"type",void 0);b.__decorate([c.property({json:{origins:{"web-document":{read:{source:"styleUrl"}},"portal-item":{read:{source:"url"}}},write:!1,read:!1}})],g.prototype,"url",void 0);b.__decorate([c.property({readOnly:!0})],g.prototype,"version",void 0);b.__decorate([x.reader("version",["version","currentVersion"])],g.prototype,"readVersion", |
|
null);b.__decorate([c.property({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],g.prototype,"path",void 0);return g=b.__decorate([B.subclass("esri.layers.VectorTileLayer")],g)}); |