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