import{W as h}from"./chunk-JB23YLA3.js";import{h as i}from"./chunk-7DHJDT2N.js";var c=i(e=>{let{handDrawnSeed:r}=h();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:r}},"solidStateFill"),p=i(e=>{let r=d([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:r,stylesArray:[...r]}},"compileStyles"),d=i(e=>{let r=new Map;return e.forEach(l=>{let[a,t]=l.split(":");r.set(a.trim(),t?.trim())}),r},"styles2Map"),y=i(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),m=i(e=>{let{stylesArray:r}=p(e),l=[],a=[],t=[],o=[];return r.forEach(s=>{let n=s[0];y(n)?l.push(s.join(":")+" !important"):(a.push(s.join(":")+" !important"),n.includes("stroke")&&t.push(s.join(":")+" !important"),n==="fill"&&o.push(s.join(":")+" !important"))}),{labelStyles:l.join(";"),nodeStyles:a.join(";"),stylesArray:r,borderStyles:t,backgroundStyles:o}},"styles2String"),S=i((e,r)=>{let{themeVariables:l,handDrawnSeed:a}=h(),{nodeBorder:t,mainBkg:o}=l,{stylesMap:s}=p(e);return Object.assign({roughness:.7,fill:s.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:s.get("stroke")||t,seed:a,strokeWidth:s.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:u(s.get("stroke-dasharray"))},r)},"userNodeOverrides"),u=i(e=>{if(!e)return[0,0];let r=e.trim().split(/\s+/).map(Number);if(r.length===1){let t=isNaN(r[0])?0:r[0];return[t,t]}let l=isNaN(r[0])?0:r[0],a=isNaN(r[1])?0:r[1];return[l,a]},"getStrokeDashArray");export{c as a,p as b,y as c,m as d,S as e};
