/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["../chunks/_rollupPluginBabelHelpers","../chunks/tslib.es6","../request","../core/Error","../core/accessorSupport/decorators/property","../core/arrayUtils","../core/has","../core/accessorSupport/ensureType","../core/accessorSupport/decorators/subclass","../geometry/Extent","../geometry/SpatialReference","../geometry/support/aaBoundingRect","./Layer","./mixins/BlendLayer","./mixins/RefreshableLayer","./mixins/ScaleRangeLayer","./support/TileInfo"],(function(e,t,r,o,a,l,n,s,i,p,c,u,y,d,f,h,g){"use strict";const _={id:"0/0/0",level:0,row:0,col:0,extent:null};let b=function(t){function a(){var e;return(e=t.apply(this,arguments)||this).tileInfo=g.create({spatialReference:c.WebMercator,size:256}),e.type="base-tile",e.fullExtent=new p(-20037508.342787,-20037508.34278,20037508.34278,20037508.342787,c.WebMercator),e.spatialReference=c.WebMercator,e}e._inheritsLoose(a,t);var l=a.prototype;return l.getTileBounds=function(e,t,r,o){const a=o||u.create();return _.level=e,_.row=t,_.col=r,_.extent=a,this.tileInfo.updateTileInfo(_),_.extent=null,a},l.fetchTile=function(e,t,o,a={}){const{signal:l}=a,n=this.getTileUrl(e,t,o),s={responseType:"image",signal:l,query:{...this.refreshParameters}};return r(n,s).then((e=>e.data))},l.getTileUrl=function(){throw new o("basetilelayer:gettileurl-not-implemented","getTileUrl() is not implemented")},a}(d.BlendLayer(h.ScaleRangeLayer(f.RefreshableLayer(y))));t.__decorate([a.property({type:g})],b.prototype,"tileInfo",void 0),t.__decorate([a.property({type:["show","hide"]})],b.prototype,"listMode",void 0),t.__decorate([a.property({readOnly:!0,value:"base-tile"})],b.prototype,"type",void 0),t.__decorate([a.property({nonNullable:!0})],b.prototype,"fullExtent",void 0),t.__decorate([a.property()],b.prototype,"spatialReference",void 0),b=t.__decorate([i.subclass("esri.layers.BaseTileLayer")],b);return b}));
