/* COPYRIGHT Esri - https://js.arcgis.com/5.0.18/LICENSE.txt */
import e from"../../Color.js";import{isSome as r}from"../../core/arrayUtils.js";import{sequentialDarkSchemes as o,sequentialLightSchemes as t}from"./color.js";import a from"./support/colors.js";import{createThemes as n,filterSchemesByName as i,getRawSchemes as m,filterSchemesByTag as s,getThemesforBasemap as l}from"./support/symbologyUtils.js";const c={color:"#4c64c9",density:.8,layerEffect:"drop-shadow(1px, 1px, 3px, rgba(0,0,0,0.75))"},p={color:"#00ffff",density:.8,layerEffect:"bloom(1.4, 0.6px, 0)"},f={flowSpeed:10,trailLength:100,trailWidth:1,trailCap:"butt",minSize:1,maxSize:4},d={flowSpeed:3,trailLength:.7,trailWidth:8,trailCap:"butt",minSize:4,maxSize:16},h=n({themeDictionary:{"flow-line":{name:"flow-line",label:"TODO",description:"TODO",schemes:{default:{light:{common:{...f,...c},primary:"seq-lines-purple-brown",secondary:[...t,...o].filter(e=>"seq-lines-purple-brown"!==e)},dark:{common:{...f,...p},primary:"seq-mentone-beach",secondary:[...o,...t].filter(e=>"seq-mentone-beach"!==e)}}}},"wave-front":{name:"wave-front",label:"TODO",description:"TODO",schemes:{default:{light:{common:{...d,...c},primary:"seq-lines-purple-brown",secondary:[...t,...o].filter(e=>"seq-lines-purple-brown"!==e)},dark:{common:{...d,...p},primary:"seq-mentone-beach",secondary:[...o,...t].filter(e=>"seq-mentone-beach"!==e)}}}}}});function u(e){return l(h,e)}function b(e){const o=e.theme||"flow-line",t=m({basemap:e.basemap,basemapTheme:e.basemapTheme,theme:h.get(o)});if(!t)return;const{schemesInfo:a,basemapId:n,basemapTheme:i}=t,s=a.common,l={...e,basemap:n};return{primaryScheme:S(l,a.primary,s),secondarySchemes:a.secondary.map(e=>S(l,e,s)).filter(r),basemapId:n,basemapTheme:i}}function y(e){return i(e.name,b(e))}function w(e){return s(e.includedTags,e.excludedTags,b(e))}function g(r){if(!r)return;const o={...r};return o.colors=o.colors.map(r=>new e(r)),o.tags=[...o.tags],o.color&&(o.color=new e(o.color)),o}function S(r,o,t){const n=r.theme||"flow-line",i=a[o];if(!i)return;const m=i.stops;return{id:`${n}/${r.basemap}/${o}`,name:i.name,tags:[...i.tags],theme:n,color:new e(t.color),colors:m.map(r=>new e(r)),density:t.density,flowSpeed:t.flowSpeed,trailLength:"wave-front"===n&&r.hasSizeVariable?2*t.trailLength:t.trailLength,trailWidth:t.trailWidth,trailCap:t.trailCap,layerEffect:t.layerEffect,minSize:t.minSize,maxSize:t.maxSize,minOpacity:.25,maxOpacity:1}}export{g as cloneScheme,y as getSchemeByName,b as getSchemes,w as getSchemesByTag,u as getThemes};
