PageSourceSearch

https://oma.mustankorkea.fi/e-services/mustankorkea/assets/ElevationLayer-Z-PrKZHj.js

js mustankorkea.fi collected 2026-10-02 12:01:15 UTC 6,385 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ElevationQuery-BAyltjc_.js","./index-CqPNX-8v.js","./index-M7HaBUb6.css"])))=>i.map(i=>d[i]);
2import{hM as _,b as g,af as w,ag as d,fi as V,_ as c,ac as y,eQ as b,B as s,C as o,by as m,hb as T,F as S}from"./index-CqPNX-8v.js";import{S as D}from"./MultiOriginJSONSupport-B8nz9JSa.js";import{p as $}from"./ArcGISCachedService-ehzuXMxV.js";import{l as x}from"./ArcGISService-Bzpr5Uba.js";import{b as I}from"./OperationalLayer-D60O-K26.js";import{j as E}from"./PortalLayer-DL_qN72h.js";import{y as L}from"./commonProperties-DS-sc0vO.js";import{h as O}from"./WorkerHandle-ouceUE7H.js";import"./TileInfoTilemapCache-Wd4uIDQ0.js";import"./TilemapCache-Bx0cb8Fs.js";import"./ByteSizeUnit-BsxeN7wM.js";import"./LRUCache-hSEMha-3.js";import"./MemCache-8Ik29I6m.js";import"./memoryEstimations-DKcilaE1.js";import"./portalItemUtils-D9ZF5UEn.js";class N{constructor(e,t,r,l){this._hasNoDataValues=null,this._minValue=null,this._maxValue=null,"pixelData"in e?(this.values=e.pixelData,this.width=e.width,this.height=e.height,this.noDataValue=e.noDataValue):(this.values=e,this.width=t,this.height=r,this.noDataValue=l)}get hasNoDataValues(){if(this._hasNoDataValues==null){const e=this.noDataValue;this._hasNoDataValues=this.values.includes(e)}return this._hasNoDataValues}get minValue(){return this._ensureBounds(),this._minValue}get maxValue(){return this._ensureBounds(),this._maxValue}get cachedMemory(){return this.values.byteLength+256}_ensureBounds(){if(this._minValue!=null)return;const{noDataValue:e,values:t}=this;let r=1/0,l=-1/0,u=!0;for(const n of t)n===e?this._hasNoDataValues=!0:(r=n<r?n:r,l=n>l?n:l,u=!1);u?(this._minValue=0,this._maxValue=0):(this._minValue=r,this._maxValue=l>-3e38?l:0)}}class f extends O{constructor(e=null){super("LercWorker","_decode",{_decode:t=>[t.buffer]},e,{strategy:"dedicated"}),this.schedule=e,this.ref=0}decode(e,t,r){return e&&e.byteLength!==0?this.invoke({buffer:e,options:t},r):Promise.resolve(null)}release(){--this.ref<=0&&(p.forEach((e,t)=>{e===this&&p.delete(t)}),this.destroy())}}const p=new Map;function M(i=null){let e=p.get(i);return e||(i!=null?(e=new f(t=>i.immediate.schedule(t)),p.set(i,e)):(e=new f,p.set(null,e))),++e.ref,e}let a=class extends $(x(I(E(D(b))))){constructor(...i){super(...i),this.capabilities={operations:{supportsTileMap:!1}},this.copyright=null,this.heightModelInfo=null,this.path=null,this.minScale=void 0,this.maxScale=void 0,this.opacity=1,this.operationalLayerType="ArcGISTiledElevationServiceLayer",this.sourceJSON=null,this.type="elevation",this.url=null,this.version=null,this._lercDecoder=M()}normalizeCtorArgs(i,e){return typeof i=="string"?{url:i,...e}:i}destroy(){this._lercDecoder=_(this._lercDecoder)}readCapabilities(i,e){const t=e.capabilities&&e.capabilities.split(",").map(r=>r.toLowerCase().trim());return t?{operations:{supportsTileMap:t.includes("tilemap")}}:{operations:{supportsTileMap:!1}}}readVersion(i,e){let t=e.currentVersion;return t||(t=9.3),t}load(i){const e=i!=null?i.signal:null;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:["Image Service"],supportsData:!1,validateItem:t=>{if(t.typeKeywords){for(let r=0;r<t.typeKeywords.length;r++)if(t.typeKeywords[r].toLowerCase()==="elevation 3d layer")return!0}throw new g("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}' ",{type:"Image Service",expectedType:"Image Service Elevation 3D Layer"})}},i).catch(w).then(()=>this._fetchImageService(e))),Promise.resolve(this)}fetchTile(i,e,t,r){const l=r==null?void 0:r.signal,u={responseType:"array-buffer",signal:l},n={noDataValue:r==null?void 0:r.noDataValue,returnFileInfo:!0};return this.load().then(()=>this._fetchTileAvailability(i,e,t,r)).then(()=>d(this.getTileUrl(i,e,t),u)).then(h=>this._lercDecoder.decode(h.data,n,l)).then(h=>new N(h))}getTileUrl(i,e,t){const r=!this.capabilities.operations.supportsTileMap&&this.supportsBlankTile,l=V({...this.parsedUrl.query,blankTile:!r&&null});return`${this.parsedUrl.path}/tile/${i}/${e}/${t}${l?"?"+l:""}`}async queryElevation(i,e){const{ElevationQuery:t}=await c(()=>import("./ElevationQuery-BAyltjc_.js"),__vite__mapDeps([0,1,2]),import.meta.url);return y(e),new t().query(this,i,e)}async createElevationSampler(i,e){const{ElevationQuery:t}=await c(()=>import("./ElevationQuery-BAyltjc_.js"),__vite__mapDeps([0,1,2]),import.meta.url);return y(e),new t().createSampler(this,i,e)}_fetchTileAvailability(i,e,t,r){return this.tilemapCache?this.tilemapCache.fetchAvailability(i,e,t,r):Promise.resolve("unknown")}async _fetchImageService(i){var r;if(this.sourceJSON)return this.sourceJSON;const e={query:{f:"json",...this.parsedUrl.query},responseType:"json",signal:i},t=await d(this.parsedUrl.path,e);t.ssl&&(this.url=(r=this.url)==null?void 0:r.replace(/^http:/i,"https:")),this.sourceJSON=t.data,this.read(t.data,{origin:"service",url:this.parsedUrl})}
2get hasOverriddenFetchTile(){return!this.fetchTile[v]}};s([o({readOnly:!0})],a.prototype,"capabilities",void 0),s([m("service","capabilities",["capabilities"])],a.prototype,"readCapabilities",null),s([o({json:{read:{source:"copyrightText"}}})],a.prototype,"copyright",void 0),s([o({readOnly:!0,type:T})],a.prototype,"heightModelInfo",void 0),s([o({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],a.prototype,"path",void 0),s([o({type:["show","hide"]})],a.prototype,"listMode",void 0),s([o({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],a.prototype,"minScale",void 0),s([o({json:{read:!1,write:!1,origins:{service:{read:!1,write:!1},"portal-item":{read:!1,write:!1},"web-document":{read:!1,write:!1}}},readOnly:!0})],a.prototype,"maxScale",void 0),s([o({json:{read:!1,write:!1,origins:{"web-document":{read:!1,write:!1}}}})],a.prototype,"opacity",void 0),s([o({type:["ArcGISTiledElevationServiceLayer"]})],a.prototype,"operationalLayerType",void 0),s([o()],a.prototype,"sourceJSON",void 0),s([o({json:{read:!1},value:"elevation",readOnly:!0})],a.prototype,"type",void 0),s([o(L)],a.prototype,"url",void 0),s([o()],a.prototype,"version",void 0),s([m("version",["currentVersion"])],a.prototype,"readVersion",null),a=s([S("esri.layers.ElevationLayer")],a);const v=Symbol("default-fetch-tile");a.prototype.fetchTile[v]=!0;const W=a;export{W as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.