import{n as a}from"./src-C042FyXq.js";import{b as p}from"./chunk-ABZYJK2D-M8yn2N69.js";var d=a(t=>{let{handDrawnSeed:e}=p();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),h=a(t=>{let e=f([...t.cssCompiledStyles||[],...t.cssStyles||[],...t.labelStyle||[]]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),f=a(t=>{let e=new Map;return t.forEach(s=>{let[i,l]=s.split(":");e.set(i.trim(),l==null?void 0:l.trim())}),e},"styles2Map"),y=a(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"),u=a(t=>{let{stylesArray:e}=h(t),s=[],i=[],l=[],n=[];return e.forEach(r=>{let o=r[0];y(o)?s.push(r.join(":")+" !important"):(i.push(r.join(":")+" !important"),o.includes("stroke")&&l.push(r.join(":")+" !important"),o==="fill"&&n.push(r.join(":")+" !important"))}),{labelStyles:s.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:l,backgroundStyles:n}},"styles2String"),g=a((t,e)=>{var o;let{themeVariables:s,handDrawnSeed:i}=p(),{nodeBorder:l,mainBkg:n}=s,{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")||l,seed:i,strokeWidth:((o=r.get("stroke-width"))==null?void 0:o.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:c(r.get("stroke-dasharray"))},e)},"userNodeOverrides"),c=a(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]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray");export{g as a,u as i,y as n,d as r,h as t};
