// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define("../../chunks/tslib.es6 ../../core/has ../../core/imageUtils ../../core/JSONSupport ../../core/accessorSupport/decorators/property ../../core/accessorSupport/ensureType ../../core/RandomLCG ../../core/accessorSupport/decorators/reader ../../core/accessorSupport/decorators/subclass ../../core/accessorSupport/decorators/writer ../../chunks/persistableUrlUtils".split(" "),function(e,d,q,r,g,t,y,u,v,w,k){function m(a){let b="";for(let c=0;c`d:${c},t:${this.transparent},w:${a}`;if(null!=this.url)return b(this.url);if(null!=this.data){if(this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement)return b(this.data.src);l.has(this.data)||l.set(this.data,++x);return b(l.get(this.data))}return b()}get memoryUsage(){let a;a=0+(null!=this.url?this.url.length:0);if(null!=this.data){const b=this.data;"data"in b?a+=b.data.byteLength:b instanceof HTMLImageElement?a+=b.naturalWidth*b.naturalHeight*3:b instanceof HTMLCanvasElement&& (a+=b.width*b.height*3)}return a}clone(){const a={url:this.url,data:this.data,wrap:this._cloneWrap()};return new h(a)}cloneWithDeduplication(a){var b=a.get(this);if(b)return b;b=this.clone();a.set(this,b);return b}_cloneWrap(){return"string"===typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}static from(a){return"string"===typeof a?new h({url:a}):a instanceof HTMLImageElement||a instanceof HTMLCanvasElement||a instanceof ImageData||a instanceof HTMLVideoElement? new h({data:a}):t.ensureClass(h,a)}};e.__decorate([g.property({type:String,json:{write:k.write}})],d.prototype,"url",null);e.__decorate([g.property({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),g.property()],d.prototype,"data",null);e.__decorate([w.writer("data")],d.prototype,"writeData",null);e.__decorate([u.reader("data")],d.prototype,"readData",null);e.__decorate([g.property({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],d.prototype, "transparent",null);e.__decorate([g.property({json:{write:!0}})],d.prototype,"wrap",void 0);e.__decorate([g.property({readOnly:!0})],d.prototype,"contentHash",null);return d=h=e.__decorate([v.subclass("esri.geometry.support.MeshTexture")],d)});