{"version":3,"sources":["webpack:///./node_modules/@arcgis/core/views/3d/layers/WMTSLayerView3D.js","webpack:///./node_modules/@arcgis/core/views/layers/RefreshableLayerView.js"],"names":["p","getLogger","c","super","arguments","this","type","e","view","then","basemapTerrain","tilingSchemeLocked","i","tilingScheme","r","layer","activeLayer","s","tileMatrixSet","tileInfo","t","_getTileInfoSupportError","fullExtent","_getTileInfoCompatibilityError","_getCompatibleTileMatrixSet","tileMatrixSetId","id","_set","addResolvingPromise","when","_initialized","emit","canResume","_getTileInfoError","suspended","updatingHandles","add","refresh","error","notifyChange","tileMatrixSets","find","readOnly","prototype","d","a","handles","doRefresh","catch","declaredClass"],"mappings":"kHAAA,iMAIuoB,MAAMA,EAAE,OAAEC,UAAU,wCAAwC,IAAIC,EAAE,cAAc,cAAD,CAAG,eAAE,eAAE,WAAM,cAAcC,SAASC,WAAWC,KAAKC,KAAK,UAAU,2BAA2B,OAAM,EAAG,aAAa,MAAMC,EAAE,eAAEF,KAAKG,KAAK,mCAAmCC,KAAK,KAAM,MAAMF,EAAE,IAAI,IAAI,OAAE,wCAAwC,sFAAsF,IAAIF,KAAKG,KAAKE,eAAeC,mBAAmB,MAAMJ,IAAI,MAAMK,EAAEP,KAAKG,KAAKE,eAAeG,aAAaC,EAAET,KAAKU,MAAMC,YAAY,IAAIC,EAAE,GAAGH,GAAGA,EAAEI,cAAc,CAACD,EAAEH,EAAEI,cAAc,MAAMX,EAAEU,EAAEE,SAASC,EAAEf,KAAKgB,yBAAyBd,EAAEU,EAAEK,aAAajB,KAAKkB,+BAA+BhB,EAAEK,GAAG,GAAGQ,EAAE,MAAMA,MAAM,CAAC,GAAGH,EAAEZ,KAAKmB,+BAA+BP,EAAE,MAAMV,IAAIO,EAAEW,gBAAgBR,EAAES,GAAGrB,KAAKsB,KAAK,WAAWV,EAAEE,UAAUd,KAAKsB,KAAK,aAAaV,EAAEK,YAAYjB,KAAKU,MAAMO,WAAWL,EAAEK,aAAcjB,KAAKuB,oBAAoBrB,G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AAY,GAAQ,eAAE,CAAC,kBAAKzC,EAAEyC,UAAU,gBAAW,GAAQzC,EAAE,eAAE,CAAC,eAAE,yCAAyCA,GAAG,IAAI0C,EAAE1C,G,oCCJr9F,oIAI+Z,MAAM2C,EAAEA,IAAI,IAAI3C,EAAE,cAAc2C,EAAE,aAAaxC,KAAKyC,QAAQV,IAAI,eAAE/B,KAAK,QAAQ,UAAU,KAAMA,KAAK0C,YAAYC,MAAOlC,IAAI,eAAEA,IAAI,OAAEb,UAAUI,KAAK4C,eAAeX,MAAMxB,OAAS,0BAA0B,OAAO,eAAE,CAAC,kBAAKZ,EAAEyC,UAAU,aAAQ,GAAQzC,EAAE,eAAE,CAAC,eAAE,4CAA4CA,GAAGA","file":"js/chunk-68f8e1d9.59befbe8.js","sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.21/esri/copyright.txt for details.\n*/\nimport{_ as e}from\"../../../chunks/tslib.es6.js\";import t from\"../../../core/Error.js\";import i from\"../../../core/Logger.js\";import{whenTrueOnce as r}from\"../../../core/watchUtils.js\";import{property as s}from\"../../../core/accessorSupport/decorators/property.js\";import\"../../../core/has.js\";import\"../../../core/accessorSupport/ensureType.js\";import{subclass as o}from\"../../../core/accessorSupport/decorators/subclass.js\";import{LayerView3D as a}from\"./LayerView3D.js\";import{TiledLayerView3D as l}from\"./TiledLayerView3D.js\";import n from\"../../layers/LayerView.js\";import{RefreshableLayerView as h}from\"../../layers/RefreshableLayerView.js\";const p=i.getLogger(\"esri.views.3d.layers.WMTSLayerView3d\");let c=class extends(h(l(a(n)))){constructor(){super(...arguments),this.type=\"wmts-3d\"}get hasMixedImageFormats(){return!0}initialize(){const e=r(this.view,\"basemapTerrain.tilingSchemeDone\").then((()=>{const e=()=>new t(\"layerview:no-compatible-tiling-scheme\",\"None of the tiling schemes supported by the service are compatible with the scene.\");if(!this.view.basemapTerrain.tilingSchemeLocked)throw e();const i=this.view.basemapTerrain.tilingScheme,r=this.layer.activeLayer;let s;if(r&&r.tileMatrixSet){s=r.tileMatrixSet;const e=s.tileInfo,t=this._getTileInfoSupportError(e,s.fullExtent)||this._getTileInfoCompatibilityError(e,i);if(t)throw t}else{if(s=this._getCompatibleTileMatrixSet(),!s)throw e();r.tileMatrixSetId=s.id}this._set(\"tileInfo\",s.tileInfo),this._set(\"fullExtent\",s.fullExtent),this.layer.fullExtent=s.fullExtent}));this.addResolvingPromise(e),this.when((()=>this._initialized()))}refresh(){this.emit(\"data-changed\")}canResume(){if(!super.canResume())return!1;const e=this.layer.activeLayer.tileMatrixSet;return e&&!this._getTileInfoError(e.tileInfo,e.fullExtent)}async doRefresh(){this.suspended||this.emit(\"data-changed\")}_initialized(){this.updatingHandles.add(this,\"layer.activeLayer.styleId\",(()=>this.refresh())),this.updatingHandles.add(this,\"tileMatrixSet\",(()=>this.refresh())),this.updatingHandles.add(this.layer,\"activeLayer\",(e=>{let t=e.tileMatrixSet;if(t){const e=this._getTileInfoError(t.tileInfo,t.fullExtent);e&&(p.error(\"The selected tile matrix set is not compatible with the view\",e),t=null)}else t=this._getCompatibleTileMatrixSet(),t?e.tileMatrixSetId=t.id:p.error(\"The layer does not provide a tiling scheme that is compatible with the view\");this.notifyChange(\"suspended\"),this.canResume()&&this.refresh()}))}_getCompatibleTileMatrixSet(){return this.layer.activeLayer.tileMatrixSets.find((e=>{const t=e.tileInfo;return!this._getTileInfoError(t,e.fullExtent)}))}_getTileInfoError(e,t){return this._getTileInfoSupportError(e,t)||this._getTileInfoCompatibilityError(e,this.view.basemapTerrain.tilingScheme)}};e([s({readOnly:!0})],c.prototype,\"hasMixedImageFormats\",null),e([s()],c.prototype,\"fullExtent\",void 0),e([s()],c.prototype,\"layer\",void 0),e([s()],c.prototype,\"suspended\",void 0),e([s()],c.prototype,\"tileInfo\",void 0),c=e([o(\"esri.views.3d.layers.WMTSLayerView3D\")],c);var d=c;export{d as default};\n","/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.21/esri/copyright.txt for details.\n*/\nimport{_ as r}from\"../../chunks/tslib.es6.js\";import e from\"../../core/Logger.js\";import{isAbortError as s}from\"../../core/promiseUtils.js\";import{on as o}from\"../../core/watchUtils.js\";import{property as t}from\"../../core/accessorSupport/decorators/property.js\";import\"../../core/has.js\";import\"../../core/accessorSupport/ensureType.js\";import{subclass as i}from\"../../core/accessorSupport/decorators/subclass.js\";const a=a=>{let c=class extends a{initialize(){this.handles.add(o(this,\"layer\",\"refresh\",(()=>{this.doRefresh().catch((r=>{s(r)||e.getLogger(this.declaredClass).error(r)}))})),\"RefreshableLayerView\")}};return r([t()],c.prototype,\"layer\",void 0),c=r([i(\"esri.layers.mixins.RefreshableLayerView\")],c),c};export{a as RefreshableLayerView,a as default};\n"],"sourceRoot":""}