{"version":3,"sources":["node_modules/@arcgis/core/layers/support/ExportImageParameters.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 r from \"../../core/Accessor.js\";\nimport { sqlAnd as s } from \"../../core/sql.js\";\nimport { property as t } from \"../../core/accessorSupport/decorators/property.js\";\nimport \"../../core/has.js\";\nimport \"../../core/Logger.js\";\nimport \"../../core/RandomLCG.js\";\nimport { subclass as i } from \"../../core/accessorSupport/decorators/subclass.js\";\nimport { isInScaleRange as a } from \"../../geometry/support/scaleUtils.js\";\nimport { getLayerFloorFilterClause as o } from \"./floorFilterUtils.js\";\nimport { isExportDynamic as l } from \"./sublayerUtils.js\";\nconst n = {\n visible: \"visibleSublayers\",\n definitionExpression: \"layerDefs\",\n labelingInfo: \"hasDynamicLayers\",\n labelsVisible: \"hasDynamicLayers\",\n opacity: \"hasDynamicLayers\",\n minScale: \"visibleSublayers\",\n maxScale: \"visibleSublayers\",\n renderer: \"hasDynamicLayers\",\n source: \"hasDynamicLayers\"\n};\nlet y = class extends r {\n constructor(e) {\n super(e), this.floors = null, this.scale = 0;\n }\n destroy() {\n this.layer = null;\n }\n get dynamicLayers() {\n if (!this.hasDynamicLayers) return null;\n const e = this.visibleSublayers.map(e => {\n const r = o(this.floors, e);\n return e.toExportImageJSON(r);\n });\n return e.length ? JSON.stringify(e) : null;\n }\n get hasDynamicLayers() {\n return this.layer && l(this.visibleSublayers, this.layer.serviceSublayers, this.layer.gdbVersion);\n }\n set layer(e) {\n this._get(\"layer\") !== e && (this._set(\"layer\", e), this.removeHandles(\"layer\"), e && this.addHandles([e.allSublayers.on(\"change\", () => this.notifyChange(\"visibleSublayers\")), e.on(\"sublayer-update\", e => this.notifyChange(n[e.propertyName]))], \"layer\"));\n }\n get layers() {\n const e = this.visibleSublayers;\n return e ? e.length ? \"show:\" + e.map(e => e.id).join(\",\") : \"show:-1\" : null;\n }\n get layerDefs() {\n const e = !!this.floors?.length,\n r = this.visibleSublayers.filter(r => null != r.definitionExpression || e && null != r.floorInfo);\n return r.length ? JSON.stringify(r.reduce((e, r) => {\n const t = o(this.floors, r),\n i = s(t, r.definitionExpression);\n return null != i && (e[r.id] = i), e;\n }, {})) : null;\n }\n get version() {\n this.commitProperty(\"layers\"), this.commitProperty(\"layerDefs\"), this.commitProperty(\"dynamicLayers\");\n const e = this.layer;\n return e && (e.commitProperty(\"dpi\"), e.commitProperty(\"imageFormat\"), e.commitProperty(\"imageTransparency\"), e.commitProperty(\"gdbVersion\")), (this._get(\"version\") || 0) + 1;\n }\n get visibleSublayers() {\n const e = [];\n if (!this.layer) return e;\n const r = this.layer.sublayers,\n s = this.scale,\n t = r => {\n r.visible && (0 === s || a(s, r.minScale, r.maxScale)) && (r.sublayers ? r.sublayers.forEach(t) : e.unshift(r));\n };\n r && r.forEach(t);\n const i = this._get(\"visibleSublayers\");\n return !i || i.length !== e.length || i.some((r, s) => e[s] !== r) ? e : i;\n }\n toJSON() {\n const e = this.layer;\n let r = {\n dpi: e.dpi,\n format: e.imageFormat,\n transparent: e.imageTransparency,\n gdbVersion: e.gdbVersion || null\n };\n return this.hasDynamicLayers && this.dynamicLayers ? r.dynamicLayers = this.dynamicLayers : r = {\n ...r,\n layers: this.layers,\n layerDefs: this.layerDefs\n }, r;\n }\n};\ne([t({\n readOnly: !0\n})], y.prototype, \"dynamicLayers\", null), e([t()], y.prototype, \"floors\", void 0), e([t({\n readOnly: !0\n})], y.prototype, \"hasDynamicLayers\", null), e([t()], y.prototype, \"layer\", null), e([t({\n readOnly: !0\n})], y.prototype, \"layers\", null), e([t({\n readOnly: !0\n})], y.prototype, \"layerDefs\", null), e([t({\n type: Number\n})], y.prototype, \"scale\", void 0), e([t({\n readOnly: !0\n})], y.prototype, \"version\", null), e([t({\n readOnly: !0\n})], y.prototype, \"visibleSublayers\", null), y = e([i(\"esri.layers.support.ExportImagePar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