// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define("exports ../../symbols ../../core/Error ../../layers/support/layerUtils ../Symbol3D ./symbolConversion ../WebStyleSymbol".split(" "),function(f,m,g,n,h,p,k){function l(a,c,d){if(null==a)return null;const {context:b,isLabelSymbol:q}=d;var e=b?.origin;d=b?.messages;if("web-scene"===e&&!(a instanceof h||a instanceof k)){e=p.to3D(a,{retainCIM:!0,hasLabelingContext:q});if(null!=e.symbol)return e.symbol.write(c,b);d?.push(new g("symbol:unsupported",`Symbols of type '${a.declaredClass}' are not supported in scenes. Use 3D symbology instead when working with WebScene and SceneView`, {symbol:a,context:b,error:e.error}));return null}return("web-map"===e||"portal-item"===e&&!n.isSceneServiceLayer(b?.layer))&&(a instanceof h||a instanceof k)?(d?.push(new g("symbol:unsupported",`Symbols of type '${a.declaredClass}' are not supported in web maps and portal items. Use 2D symbology and CIMSymbol instead when working with MapView`,{symbol:a,context:b})),null):a.write(c,b)}f.fromJSON=function(a,c){return m.readSymbol(a,null,c)};f.write=function(a,c,d,b){a=l(a,{},{context:b,isLabelSymbol:!1}); null!=a&&(c[d]=a)};f.writeLabelSymbol=function(a,c,d,b){a=l(a,{},{context:b,isLabelSymbol:!0});null!=a&&(c[d]=a)};Object.defineProperty(f,Symbol.toStringTag,{value:"Module"})});