/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["exports","../../Color","./support/symbologyUtils","./support/utils"],(function(o,a,t,e){"use strict";const i=[128,128,128,1],r=[128,128,128,1],n="4px",c="40px",l={primary:{color:[227,139,79,1],noDataColor:i,outline:{color:[255,255,255,.25],width:"1px"},noDataSize:"4px",size:"12px",minSize:n,maxSize:c,opacity:.8},secondary:[{color:[128,128,128,1],noDataColor:i,outline:{color:[255,255,255,.25],width:"1px"},noDataSize:"4px",size:"12px",minSize:n,maxSize:c,opacity:.8},{color:[255,255,255,1],noDataColor:i,outline:{color:[128,128,128,.25],width:"1px"},noDataSize:"4px",size:"12px",minSize:n,maxSize:c,opacity:.8}]},p={primary:{color:[227,139,79,1],noDataColor:r,outline:{color:[92,92,92,.25],width:"1px"},noDataSize:"4px",size:"12px",minSize:n,maxSize:c,opacity:.8},secondary:[{color:[178,178,178,1],noDataColor:r,outline:{color:[92,92,92,.25],width:"1px"},noDataSize:"4px",size:"12px",minSize:n,maxSize:c,opacity:.8},{color:[26,26,26,1],noDataColor:r,outline:{color:[128,128,128,.25],width:"1px"},noDataSize:"4px",size:"12px",minSize:n,maxSize:c,opacity:.8}]},d=[0,0,0,0],m={color:d,outline:{color:[166,166,166,.25],width:"1px"}},h={color:d,outline:{color:[153,153,153,.25],width:"1px"}},s={default:{name:"default",label:"Default",description:"Default theme for visualizing features by varying their size to show data.",schemes:{point:{light:l,dark:p},polyline:{light:{primary:{color:[226,119,40,1],noDataColor:i,noDataWidth:"1px",width:"1px",minWidth:"1px",maxWidth:"18px"},secondary:[{color:[77,77,77,1],noDataColor:i,noDataWidth:"1px",width:"1px",minWidth:"1px",maxWidth:"18px"},{color:[153,153,153,1],noDataColor:i,noDataWidth:"1px",width:"1px",minWidth:"1px",maxWidth:"18px"}]},dark:{primary:{color:[226,119,40,1],noDataColor:r,noDataWidth:"1px",width:"1px",minWidth:"1px",maxWidth:"18px"},secondary:[{color:[255,255,255,1],noDataColor:r,noDataWidth:"1px",width:"1px",minWidth:"1px",maxWidth:"18px"},{color:[153,153,153,1],noDataColor:r,noDataWidth:"1px",width:"1px",minWidth:"1px",maxWidth:"18px"}]}},polygon:{light:{primary:{marker:l.primary,background:h,opacity:l.primary.opacity},secondary:[{marker:l.secondary[0],background:h,opacity:l.secondary[0].opacity},{marker:l.secondary[1],background:h,opacity:l.secondary[1].opacity}]},dark:{primary:{marker:p.primary,background:m,opacity:p.primary.opacity},secondary:[{marker:p.secondary[0],background:m,opacity:p.secondary[0].opacity},{marker:p.secondary[1],background:m,opacity:p.secondary[1].opacity}]}}}}},y=t.createThemes({themeDictionary:s});function u(o){return t.getThemesforBasemap(y,o)}function x(o){if("mesh"===o.geometryType)return null;const a="default",e=t.getRawSchemes({basemap:o.basemap,geometryType:o.geometryType,basemapTheme:o.basemapTheme,theme:y.get(a)});if(!e)return;const{schemesInfo:i,basemapId:r,basemapTheme:n}=e;return{primaryScheme:S(o,i.primary),secondarySchemes:i.secondary.map((a=>S(o,a))).filter(Boolean),basemapId:r,basemapTheme:n}}function D(o){if(!o)return;const t={...o};return"color"in t&&t.color&&(t.color=new a(t.color)),"noDataColor"in t&&t.noDataColor&&(t.noDataColor=new a(t.noDataColor)),"outline"in t&&t.outline&&(t.outline={color:t.outline.color&&new a(t.outline.color),width:t.outline.width}),"marker"in t&&t.marker&&(t.marker=D(t.marker)),"background"in t&&t.background&&(t.background=D(t.background)),t}function S(o,a){const t="mesh"!==o.geometryType&&o.worldScale?o.view:null;switch(o.geometryType){case"point":case"multipoint":{const o=a;return z({color:o.color,noDataColor:o.noDataColor,outline:o.outline,size:o.size,noDataSize:o.noDataSize,minSize:o.minSize,maxSize:o.maxSize,opacity:o.opacity||1},t)}case"polyline":{const o=a;return W({color:o.color,noDataColor:o.noDataColor,width:o.width,noDataWidth:o.noDataWidth,minWidth:o.minWidth,maxWidth:o.maxWidth},t)}case"polygon":{const o=a,e=o.marker;return delete e.opacity,w({marker:e,background:o.background,opacity:o.opacity||1},t)}}}function z(o,t){return{color:new a(o.color),noDataColor:new a(o.noDataColor),outline:{color:new a(o.outline.color),width:o.outline.width},size:t?e.toWorldScale(o.size,t):o.size,noDataSize:t?e.toWorldScale(o.noDataSize,t):o.noDataSize,minSize:t?e.toWorldScale(o.minSize,t):o.minSize,maxSize:t?e.toWorldScale(o.maxSize,t):o.maxSize,opacity:o.opacity}}function W(o,t){return{color:new a(o.color),noDataColor:new a(o.noDataColor),width:t?e.toWorldScale(o.width,t):o.width,noDataWidth:t?e.toWorldScale(o.noDataWidth,t):o.noDataWidth,minWidth:t?e.toWorldScale(o.minWidth,t):o.minWidth,maxWidth:t?e.toWorldScale(o.maxWidth,t):o.maxWidth,opacity:1}}function w(o,t){const e=z(o.marker,t);delete e.opacity;return{marker:e,background:{color:new a(o.background.color),outline:{color:new a(o.background.outline.color),width:o.background.outline.width}},opacity:o.opacity}}o.cloneScheme=D,o.getSchemes=x,o.getThemes=u,Object.defineProperties(o,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
