{"version":3,"sources":["node_modules/@arcgis/core/layers/mixins/ArcGISCachedService.js"],"sourcesContent":["/*\nAll material copyright ESRI, All Rights Reserved, unless otherwise specified.\nSee https://js.arcgis.com/4.31/esri/copyright.txt for details.\n*/\nimport { _ as e } from \"../../chunks/tslib.es6.js\";\nimport \"../../geometry.js\";\nimport { property as o } from \"../../core/accessorSupport/decorators/property.js\";\nimport \"../../core/has.js\";\nimport \"../../core/Logger.js\";\nimport \"../../core/RandomLCG.js\";\nimport { reader as r } from \"../../core/accessorSupport/decorators/reader.js\";\nimport { subclass as t } from \"../../core/accessorSupport/decorators/subclass.js\";\nimport l from \"../support/TileInfo.js\";\nimport i from \"../support/TileInfoTilemapCache.js\";\nimport { TilemapCache as s } from \"../support/TilemapCache.js\";\nimport a from \"../../geometry/SpatialReference.js\";\nconst p = p => {\n let n = class extends p {\n constructor() {\n super(...arguments), this.copyright = null, this.minScale = 0, this.maxScale = 0, this.spatialReference = null, this.tileInfo = null, this.tilemapCache = null;\n }\n destroy() {\n this.tilemapCache?.destroy?.();\n }\n readMinScale(e, o) {\n return null != o.minLOD && null != o.maxLOD ? e : 0;\n }\n readMaxScale(e, o) {\n return null != o.minLOD && null != o.maxLOD ? e : 0;\n }\n get supportsBlankTile() {\n return this.version >= 10.2;\n }\n readTilemapCache(e, o, r) {\n const t = o.capabilities?.includes(\"Tilemap\");\n let {\n minLOD: a,\n maxLOD: p,\n minScale: n,\n maxScale: c\n } = o;\n if (null == a && null == p && 0 !== n && 0 !== c) {\n const e = e => Math.round(1e4 * e) / 1e4;\n n = e(n || o.tileInfo.lods[0].scale), c = e(c || o.tileInfo.lods[o.tileInfo.lods.length - 1].scale);\n for (const r of o.tileInfo.lods) {\n const o = e(r.scale);\n a = o >= n ? r.level : a, p = o >= c ? r.level : p;\n }\n }\n if (t) return new s({\n layer: this,\n minLOD: a,\n maxLOD: p\n });\n if (o.tileInfo) {\n const e = new l();\n return e.read(o.tileInfo, r), new i(e, a, p);\n }\n return null;\n }\n };\n return e([o({\n json: {\n read: {\n source: \"copyrightText\"\n }\n }\n })], n.prototype, \"copyright\", void 0), e([o()], n.prototype, \"minScale\", void 0), e([r(\"service\", \"minScale\")], n.prototype, \"readMinScale\", null), e([o()], n.prototype, \"maxScale\", void 0), e([r(\"service\", \"maxScale\")], n.prototype, \"readMaxScale\", null), e([o({\n type: a\n })], n.prototype, \"spatialReference\", void 0), e([o({\n readOnly: !0\n })], n.prototype, \"supportsBlankTile\", null), e([o({\n type: l\n })], n.prototype, \"tileInfo\", void 0), e([o()], n.prototype, \"tilemapCache\", void 0), e([r(\"service\", \"tilemapCache\", [\"capabilities\", \"tileInfo\"])], n.prototype, \"readTilemapCache\", null), e([o()], n.prototype, \"version\", void 0), n = e([t(\"esri.layers.mixins.ArcGISCachedService\")], n), n;\n};\nexport { p as ArcGISCachedService };"],"mappings":"gUAgBA,IAAMA,EAAIA,GAAK,CACb,IAAIC,EAAI,cAAcD,CAAE,CACtB,aAAc,CACZ,MAAM,GAAG,SAAS,EAAG,KAAK,UAAY,KAAM,KAAK,SAAW,EAAG,KAAK,SAAW,EAAG,KAAK,iBAAmB,KAAM,KAAK,SAAW,KAAM,KAAK,aAAe,IAC5J,CACA,SAAU,CACR,KAAK,cAAc,UAAU,CAC/B,CACA,aAAaE,EAAGC,EAAG,CACjB,OAAeA,EAAE,QAAV,MAA4BA,EAAE,QAAV,KAAmBD,EAAI,CACpD,CACA,aAAaA,EAAGC,EAAG,CACjB,OAAeA,EAAE,QAAV,MAA4BA,EAAE,QAAV,KAAmBD,EAAI,CACpD,CACA,IAAI,mBAAoB,CACtB,OAAO,KAAK,SAAW,IACzB,CACA,iBAAiBA,EAAGC,EAAGC,EAAG,CACxB,IAAMC,EAAIF,EAAE,cAAc,SAAS,SAAS,EACxC,CACF,OAAQG,EACR,OAAQN,EACR,SAAUC,EACV,SAAU,CACZ,EAAIE,EACJ,GAAYG,GAAR,MAAqBN,GAAR,MAAmBC,IAAN,GAAiB,IAAN,EAAS,CA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