// All material copyright ESRI, All Rights Reserved, unless otherwise specified.// See https://js.arcgis.com/4.6/esri/copyright.txt for details.//>>builtdefine("require exports ../core/tsSupport/extendsHelper ../core/tsSupport/decorateHelper ../core/accessorSupport/decorators ../core/urlUtils ../core/Logger ../core/requireUtils ./Symbol ../portal/Portal ./support/Thumbnail".split(" "),function(h,t,k,c,b,e,l,m,n,p,q){varr=l.getLogger("esri.symbols.WebStyleSymbol");returnfunction(g){functiona(a){a=g.call(this,a)||this;a.styleName=null;a.portal=null;a.styleUrl=null;a.thumbnail=null;a.name=null;a.type="web-style";returna}k(a,g);f=a;a.prototype._readStyleUrl=function(a,d,b){returne.read(a,b)};a.prototype._writeStyleUrl=function(a,d,b,c){d.styleUrl=e.write(a,c);e.isAbsolute(d.styleUrl)&&(d.styleUrl=e.normalize(d.styleUrl))};a.prototype._writeType=function(a,d,b,c){d.type="styleSymbolReference"};a.prototype.read=function(a,b){this.portal=b?b.portal:void0;this.inherited(arguments,[a,b]);returnthis};a.prototype.clone=function(){returnnewf({name:this.name,styleUrl:this.styleUrl,styleName:this.styleName,portal:this.portal})};a.prototype.fetchSymbol=function(){vara=this;returnm.when(h,"./support/styleUtils").then(function(b){b=b.resolveWebStyleSymbol(a,{portal:a.portal});b.otherwise(function(a){r.error("#fetchSymbol()","Failed to create symbol from style",a)});returnb})};c([b.property({json:{write:!1}})],a.prototype,"color",void0);c([b.property({type:String,json:{write:!0}})],a.prototype,"styleName",void0);c([b.property({type:p,json:{write:!1}})],a.prototype,"portal",void0);c([b.property({type:String,json:{write:!0}})],a.prototype,"styleUrl",void0);c([b.reader("styleUrl")],a.prototype,"_readStyleUrl",null);c([b.writer("styleUrl")],a.prototype,"_writeStyleUrl",null);c([b.property({type:q.default,json:{read:!1}})],a.prototype,"thumbnail",void0);c([b.property({type:String,json:{write:!0}})],a.prototype,"name",void0);c([b.property({type:String,readOnly:!0,json:{read:!1}})],a.prototype,"type",void0);c([b.writer("type")],a.prototype,"_writeType",null);returna=f=c([b.subclass("esri.symbols.WebStyleSymbol")],a);varf}(b.declared(n))});