mermaid
Version:
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
5 lines • 70.7 kB
JavaScript
import{a as mt,b as Kt}from"./chunk-U6LOUQAF.mjs";import{d as nt}from"./chunk-7CRZUUBC.mjs";import{m as at,o as dt}from"./chunk-INOGIEW4.mjs";import{Ca as Qt,F as Zt,G as I,Ga as Jt,I as Ft,K as qt,L as Ut,X as P,b as S,fa as W}from"./chunk-DMXVZUOD.mjs";import{a as d}from"./chunk-GTKDMUJJ.mjs";function Pt(a,t,e){if(a&&a.length){let[r,s]=t,o=Math.PI/180*e,i=Math.cos(o),n=Math.sin(o);for(let l of a){let[c,h]=l;l[0]=(c-r)*i-(h-s)*n+r,l[1]=(c-r)*n+(h-s)*i+s}}}d(Pt,"t");function Ue(a,t){return a[0]===t[0]&&a[1]===t[1]}d(Ue,"e");function Qe(a,t,e,r=1){let s=e,o=Math.max(t,.1),i=a[0]&&a[0][0]&&typeof a[0][0]=="number"?[a]:a,n=[0,0];if(s)for(let c of i)Pt(c,n,s);let l=function(c,h,p){let f=[];for(let x of c){let w=[...x];Ue(w[0],w[w.length-1])||w.push([w[0][0],w[0][1]]),w.length>2&&f.push(w)}let u=[];h=Math.max(h,.1);let m=[];for(let x of f)for(let w=0;w<x.length-1;w++){let $=x[w],O=x[w+1];if($[1]!==O[1]){let L=Math.min($[1],O[1]);m.push({ymin:L,ymax:Math.max($[1],O[1]),x:L===$[1]?$[0]:O[0],islope:(O[0]-$[0])/(O[1]-$[1])})}}if(m.sort((x,w)=>x.ymin<w.ymin?-1:x.ymin>w.ymin?1:x.x<w.x?-1:x.x>w.x?1:x.ymax===w.ymax?0:(x.ymax-w.ymax)/Math.abs(x.ymax-w.ymax)),!m.length)return u;let g=[],b=m[0].ymin,y=0;for(;g.length||m.length;){if(m.length){let x=-1;for(let w=0;w<m.length&&!(m[w].ymin>b);w++)x=w;m.splice(0,x+1).forEach(w=>{g.push({s:b,edge:w})})}if(g=g.filter(x=>!(x.edge.ymax<=b)),g.sort((x,w)=>x.edge.x===w.edge.x?0:(x.edge.x-w.edge.x)/Math.abs(x.edge.x-w.edge.x)),(p!==1||y%h==0)&&g.length>1)for(let x=0;x<g.length;x+=2){let w=x+1;if(w>=g.length)break;let $=g[x].edge,O=g[w].edge;u.push([[Math.round($.x),b],[Math.round(O.x),b]])}b+=p,g.forEach(x=>{x.edge.x=x.edge.x+p*x.edge.islope}),y++}return u}(i,o,r);if(s){for(let c of i)Pt(c,n,-s);(function(c,h,p){let f=[];c.forEach(u=>f.push(...u)),Pt(f,h,p)})(l,n,-s)}return l}d(Qe,"s");function ft(a,t){var e;let r=t.hachureAngle+90,s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let o=1;return t.roughness>=1&&(((e=t.randomizer)===null||e===void 0?void 0:e.next())||Math.random())>.7&&(o=s),Qe(a,s,r,o||1)}d(ft,"n");var pt=class{static{d(this,"o")}constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){let r=ft(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){let r=[];for(let s of t)r.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],e));return r}};function vt(a){let t=a[0],e=a[1];return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}d(vt,"a");var Bt=class extends pt{static{d(this,"h")}fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);let s=ft(t,Object.assign({},e,{hachureGap:r})),o=Math.PI/180*e.hachureAngle,i=[],n=.5*r*Math.cos(o),l=.5*r*Math.sin(o);for(let[c,h]of s)vt([c,h])&&i.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(i,e)}}},Rt=class extends pt{static{d(this,"r")}fillPolygons(t,e){let r=this._fillPolygons(t,e),s=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),o=this._fillPolygons(t,s);return r.ops=r.ops.concat(o.ops),r}},Tt=class{static{d(this,"i")}constructor(t){this.helper=t}fillPolygons(t,e){let r=ft(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){let r=[],s=e.hachureGap;s<0&&(s=4*e.strokeWidth),s=Math.max(s,.1);let o=e.fillWeight;o<0&&(o=e.strokeWidth/2);let i=s/4;for(let n of t){let l=vt(n),c=l/s,h=Math.ceil(c)-1,p=l-h*s,f=(n[0][0]+n[1][0])/2-s/4,u=Math.min(n[0][1],n[1][1]);for(let m=0;m<h;m++){let g=u+p+m*s,b=f-i+2*Math.random()*i,y=g-i+2*Math.random()*i,x=this.helper.ellipse(b,y,o,o,e);r.push(...x.ops)}}return{type:"fillSketch",ops:r}}},At=class{static{d(this,"c")}constructor(t){this.helper=t}fillPolygons(t,e){let r=ft(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){let r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,s=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,o=[];return t.forEach(i=>{let n=vt(i),l=Math.floor(n/(r+s)),c=(n+s-l*(r+s))/2,h=i[0],p=i[1];h[0]>p[0]&&(h=i[1],p=i[0]);let f=Math.atan((p[1]-h[1])/(p[0]-h[0]));for(let u=0;u<l;u++){let m=u*(r+s),g=m+r,b=[h[0]+m*Math.cos(f)+c*Math.cos(f),h[1]+m*Math.sin(f)+c*Math.sin(f)],y=[h[0]+g*Math.cos(f)+c*Math.cos(f),h[1]+g*Math.sin(f)+c*Math.sin(f)];o.push(...this.helper.doubleLineOps(b[0],b[1],y[0],y[1],e))}}),o}},Gt=class{static{d(this,"l")}constructor(t){this.helper=t}fillPolygons(t,e){let r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,s=e.zigzagOffset<0?r:e.zigzagOffset,o=ft(t,e=Object.assign({},e,{hachureGap:r+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,e)}}zigzagLines(t,e,r){let s=[];return t.forEach(o=>{let i=vt(o),n=Math.round(i/(2*e)),l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);let h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let p=0;p<n;p++){let f=2*p*e,u=2*(p+1)*e,m=Math.sqrt(2*Math.pow(e,2)),g=[l[0]+f*Math.cos(h),l[1]+f*Math.sin(h)],b=[l[0]+u*Math.cos(h),l[1]+u*Math.sin(h)],y=[g[0]+m*Math.cos(h+Math.PI/4),g[1]+m*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(g[0],g[1],y[0],y[1],r),...this.helper.doubleLineOps(y[0],y[1],b[0],b[1],r))}}),s}},z={},Vt=class{static{d(this,"p")}constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},Je=0,Ct=1,te=2,gt={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Et(a,t){return a.type===t}d(Et,"k");function zt(a){let t=[],e=function(i){let n=new Array;for(;i!=="";)if(i.match(/^([ \t\r\n,]+)/))i=i.substr(RegExp.$1.length);else if(i.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:Je,text:RegExp.$1},i=i.substr(RegExp.$1.length);else{if(!i.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:Ct,text:`${parseFloat(RegExp.$1)}`},i=i.substr(RegExp.$1.length)}return n[n.length]={type:te,text:""},n}(a),r="BOD",s=0,o=e[s];for(;!Et(o,te);){let i=0,n=[];if(r==="BOD"){if(o.text!=="M"&&o.text!=="m")return zt("M0,0"+a);s++,i=gt[o.text],r=o.text}else Et(o,Ct)?i=gt[r]:(s++,i=gt[o.text],r=o.text);if(!(s+i<e.length))throw new Error("Path data ended short");for(let l=s;l<s+i;l++){let c=e[l];if(!Et(c,Ct))throw new Error("Param not a number: "+r+","+c.text);n[n.length]=+c.text}if(typeof gt[r]!="number")throw new Error("Bad segment: "+r);{let l={key:r,data:n};t.push(l),s+=i,o=e[s],r==="M"&&(r="L"),r==="m"&&(r="l")}}return t}d(zt,"b");function le(a){let t=0,e=0,r=0,s=0,o=[];for(let{key:i,data:n}of a)switch(i){case"M":o.push({key:"M",data:[...n]}),[t,e]=n,[r,s]=n;break;case"m":t+=n[0],e+=n[1],o.push({key:"M",data:[t,e]}),r=t,s=e;break;case"L":o.push({key:"L",data:[...n]}),[t,e]=n;break;case"l":t+=n[0],e+=n[1],o.push({key:"L",data:[t,e]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],e=n[5];break;case"c":{let l=n.map((c,h)=>h%2?c+e:c+t);o.push({key:"C",data:l}),t=l[4],e=l[5];break}case"Q":o.push({key:"Q",data:[...n]}),t=n[2],e=n[3];break;case"q":{let l=n.map((c,h)=>h%2?c+e:c+t);o.push({key:"Q",data:l}),t=l[2],e=l[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],e=n[6];break;case"a":t+=n[5],e+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,e]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),e=n[0];break;case"v":e+=n[0],o.push({key:"V",data:[e]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],e=n[3];break;case"s":{let l=n.map((c,h)=>h%2?c+e:c+t);o.push({key:"S",data:l}),t=l[2],e=l[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],e=n[1];break;case"t":t+=n[0],e+=n[1],o.push({key:"T",data:[t,e]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=r,e=s}return o}d(le,"y");function ce(a){let t=[],e="",r=0,s=0,o=0,i=0,n=0,l=0;for(let{key:c,data:h}of a){switch(c){case"M":t.push({key:"M",data:[...h]}),[r,s]=h,[o,i]=h;break;case"C":t.push({key:"C",data:[...h]}),r=h[4],s=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[r,s]=h;break;case"H":r=h[0],t.push({key:"L",data:[r,s]});break;case"V":s=h[0],t.push({key:"L",data:[r,s]});break;case"S":{let p=0,f=0;e==="C"||e==="S"?(p=r+(r-n),f=s+(s-l)):(p=r,f=s),t.push({key:"C",data:[p,f,...h]}),n=h[0],l=h[1],r=h[2],s=h[3];break}case"T":{let[p,f]=h,u=0,m=0;e==="Q"||e==="T"?(u=r+(r-n),m=s+(s-l)):(u=r,m=s);let g=r+2*(u-r)/3,b=s+2*(m-s)/3,y=p+2*(u-p)/3,x=f+2*(m-f)/3;t.push({key:"C",data:[g,b,y,x,p,f]}),n=u,l=m,r=p,s=f;break}case"Q":{let[p,f,u,m]=h,g=r+2*(p-r)/3,b=s+2*(f-s)/3,y=u+2*(p-u)/3,x=m+2*(f-m)/3;t.push({key:"C",data:[g,b,y,x,u,m]}),n=p,l=f,r=u,s=m;break}case"A":{let p=Math.abs(h[0]),f=Math.abs(h[1]),u=h[2],m=h[3],g=h[4],b=h[5],y=h[6];p===0||f===0?(t.push({key:"C",data:[r,s,b,y,b,y]}),r=b,s=y):(r!==b||s!==y)&&(he(r,s,b,y,p,f,u,m,g).forEach(function(x){t.push({key:"C",data:x})}),r=b,s=y);break}case"Z":t.push({key:"Z",data:[]}),r=o,s=i}e=c}return t}d(ce,"m");function ct(a,t,e){return[a*Math.cos(e)-t*Math.sin(e),a*Math.sin(e)+t*Math.cos(e)]}d(ct,"w");function he(a,t,e,r,s,o,i,n,l,c){let h=(p=i,Math.PI*p/180);var p;let f=[],u=0,m=0,g=0,b=0;if(c)[u,m,g,b]=c;else{[a,t]=ct(a,t,-h),[e,r]=ct(e,r,-h);let Y=(a-e)/2,V=(t-r)/2,Z=Y*Y/(s*s)+V*V/(o*o);Z>1&&(Z=Math.sqrt(Z),s*=Z,o*=Z);let rt=s*s,st=o*o,Fe=rt*st-rt*V*V-st*Y*Y,qe=rt*V*V+st*Y*Y,Yt=(n===l?-1:1)*Math.sqrt(Math.abs(Fe/qe));g=Yt*s*V/o+(a+e)/2,b=Yt*-o*Y/s+(t+r)/2,u=Math.asin(parseFloat(((t-b)/o).toFixed(9))),m=Math.asin(parseFloat(((r-b)/o).toFixed(9))),a<g&&(u=Math.PI-u),e<g&&(m=Math.PI-m),u<0&&(u=2*Math.PI+u),m<0&&(m=2*Math.PI+m),l&&u>m&&(u-=2*Math.PI),!l&&m>u&&(m-=2*Math.PI)}let y=m-u;if(Math.abs(y)>120*Math.PI/180){let Y=m,V=e,Z=r;m=l&&m>u?u+120*Math.PI/180*1:u+120*Math.PI/180*-1,f=he(e=g+s*Math.cos(m),r=b+o*Math.sin(m),V,Z,s,o,i,0,l,[m,Y,g,b])}y=m-u;let x=Math.cos(u),w=Math.sin(u),$=Math.cos(m),O=Math.sin(m),L=Math.tan(y/4),C=4/3*s*L,E=4/3*o*L,T=[a,t],A=[a+C*w,t-E*x],_=[e+C*O,r-E*$],et=[e,r];if(A[0]=2*T[0]-A[0],A[1]=2*T[1]-A[1],c)return[A,_,et].concat(f);{f=[A,_,et].concat(f);let Y=[];for(let V=0;V<f.length;V+=3){let Z=ct(f[V][0],f[V][1],h),rt=ct(f[V+1][0],f[V+1][1],h),st=ct(f[V+2][0],f[V+2][1],h);Y.push([Z[0],Z[1],rt[0],rt[1],st[0],st[1]])}return Y}}d(he,"x");var Ke={randOffset:d(function(a,t){return k(a,t)},"randOffset"),randOffsetWithRange:d(function(a,t,e){return kt(a,t,e)},"randOffsetWithRange"),ellipse:d(function(a,t,e,r,s){let o=fe(e,r,s);return jt(a,t,s,o).opset},"ellipse"),doubleLineOps:d(function(a,t,e,r,s){return Q(a,t,e,r,s,!0)},"doubleLineOps")};function pe(a,t,e,r,s){return{type:"path",ops:Q(a,t,e,r,s)}}d(pe,"v");function xt(a,t,e){let r=(a||[]).length;if(r>2){let s=[];for(let o=0;o<r-1;o++)s.push(...Q(a[o][0],a[o][1],a[o+1][0],a[o+1][1],e));return t&&s.push(...Q(a[r-1][0],a[r-1][1],a[0][0],a[0][1],e)),{type:"path",ops:s}}return r===2?pe(a[0][0],a[0][1],a[1][0],a[1][1],e):{type:"path",ops:[]}}d(xt,"S");function tr(a,t,e,r,s){return function(o,i){return xt(o,!0,i)}([[a,t],[a+e,t],[a+e,t+r],[a,t+r]],s)}d(tr,"O");function ee(a,t){if(a.length){let e=typeof a[0][0]=="number"?[a]:a,r=yt(e[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:yt(e[0],1.5*(1+.22*t.roughness),ae(t));for(let o=1;o<e.length;o++){let i=e[o];if(i.length){let n=yt(i,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:yt(i,1.5*(1+.22*t.roughness),ae(t));for(let c of n)c.op!=="move"&&r.push(c);for(let c of l)c.op!=="move"&&s.push(c)}}return{type:"path",ops:r.concat(s)}}return{type:"path",ops:[]}}d(ee,"L");function fe(a,t,e){let r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(a/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(e.curveStepCount,e.curveStepCount/Math.sqrt(200)*r)),o=2*Math.PI/s,i=Math.abs(a/2),n=Math.abs(t/2),l=1-e.curveFitting;return i+=k(i*l,e),n+=k(n*l,e),{increment:o,rx:i,ry:n}}d(fe,"T");function jt(a,t,e,r){let[s,o]=ne(r.increment,a,t,r.rx,r.ry,1,r.increment*kt(.1,kt(.4,1,e),e),e),i=St(s,null,e);if(!e.disableMultiStroke&&e.roughness!==0){let[n]=ne(r.increment,a,t,r.rx,r.ry,1.5,0,e),l=St(n,null,e);i=i.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:i}}}d(jt,"D");function re(a,t,e,r,s,o,i,n,l){let c=a,h=t,p=Math.abs(e/2),f=Math.abs(r/2);p+=k(.01*p,l),f+=k(.01*f,l);let u=s,m=o;for(;u<0;)u+=2*Math.PI,m+=2*Math.PI;m-u>2*Math.PI&&(u=0,m=2*Math.PI);let g=2*Math.PI/l.curveStepCount,b=Math.min(g/2,(m-u)/2),y=oe(b,c,h,p,f,u,m,1,l);if(!l.disableMultiStroke){let x=oe(b,c,h,p,f,u,m,1.5,l);y.push(...x)}return i&&(n?y.push(...Q(c,h,c+p*Math.cos(u),h+f*Math.sin(u),l),...Q(c,h,c+p*Math.cos(m),h+f*Math.sin(m),l)):y.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+p*Math.cos(u),h+f*Math.sin(u)]})),{type:"path",ops:y}}d(re,"A");function se(a,t){let e=ce(le(zt(a))),r=[],s=[0,0],o=[0,0];for(let{key:i,data:n}of e)switch(i){case"M":o=[n[0],n[1]],s=[n[0],n[1]];break;case"L":r.push(...Q(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{let[l,c,h,p,f,u]=n;r.push(...er(l,c,h,p,f,u,o,t)),o=[f,u];break}case"Z":r.push(...Q(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]]}return{type:"path",ops:r}}d(se,"_");function Ot(a,t){let e=[];for(let r of a)if(r.length){let s=t.maxRandomnessOffset||0,o=r.length;if(o>2){e.push({op:"move",data:[r[0][0]+k(s,t),r[0][1]+k(s,t)]});for(let i=1;i<o;i++)e.push({op:"lineTo",data:[r[i][0]+k(s,t),r[i][1]+k(s,t)]})}}return{type:"fillPath",ops:e}}d(Ot,"I");function ot(a,t){return function(e,r){let s=e.fillStyle||"hachure";if(!z[s])switch(s){case"zigzag":z[s]||(z[s]=new Bt(r));break;case"cross-hatch":z[s]||(z[s]=new Rt(r));break;case"dots":z[s]||(z[s]=new Tt(r));break;case"dashed":z[s]||(z[s]=new At(r));break;case"zigzag-line":z[s]||(z[s]=new Gt(r));break;default:s="hachure",z[s]||(z[s]=new pt(r))}return z[s]}(t,Ke).fillPolygons(a,t)}d(ot,"C");function ae(a){let t=Object.assign({},a);return t.randomizer=void 0,a.seed&&(t.seed=a.seed+1),t}d(ae,"z");function ue(a){return a.randomizer||(a.randomizer=new Vt(a.seed||0)),a.randomizer.next()}d(ue,"W");function kt(a,t,e,r=1){return e.roughness*r*(ue(e)*(t-a)+a)}d(kt,"E");function k(a,t,e=1){return kt(-a,a,t,e)}d(k,"G");function Q(a,t,e,r,s,o=!1){let i=o?s.disableMultiStrokeFill:s.disableMultiStroke,n=_t(a,t,e,r,s,!0,!1);if(i)return n;let l=_t(a,t,e,r,s,!0,!0);return n.concat(l)}d(Q,"$");function _t(a,t,e,r,s,o,i){let n=Math.pow(a-e,2)+Math.pow(t-r,2),l=Math.sqrt(n),c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=s.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);let p=h/2,f=.2+.2*ue(s),u=s.bowing*s.maxRandomnessOffset*(r-t)/200,m=s.bowing*s.maxRandomnessOffset*(a-e)/200;u=k(u,s,c),m=k(m,s,c);let g=[],b=d(()=>k(p,s,c),"M"),y=d(()=>k(h,s,c),"k"),x=s.preserveVertices;return o&&(i?g.push({op:"move",data:[a+(x?0:b()),t+(x?0:b())]}):g.push({op:"move",data:[a+(x?0:k(h,s,c)),t+(x?0:k(h,s,c))]})),i?g.push({op:"bcurveTo",data:[u+a+(e-a)*f+b(),m+t+(r-t)*f+b(),u+a+2*(e-a)*f+b(),m+t+2*(r-t)*f+b(),e+(x?0:b()),r+(x?0:b())]}):g.push({op:"bcurveTo",data:[u+a+(e-a)*f+y(),m+t+(r-t)*f+y(),u+a+2*(e-a)*f+y(),m+t+2*(r-t)*f+y(),e+(x?0:y()),r+(x?0:y())]}),g}d(_t,"R");function yt(a,t,e){if(!a.length)return[];let r=[];r.push([a[0][0]+k(t,e),a[0][1]+k(t,e)]),r.push([a[0][0]+k(t,e),a[0][1]+k(t,e)]);for(let s=1;s<a.length;s++)r.push([a[s][0]+k(t,e),a[s][1]+k(t,e)]),s===a.length-1&&r.push([a[s][0]+k(t,e),a[s][1]+k(t,e)]);return St(r,null,e)}d(yt,"j");function St(a,t,e){let r=a.length,s=[];if(r>3){let o=[],i=1-e.curveTightness;s.push({op:"move",data:[a[1][0],a[1][1]]});for(let n=1;n+2<r;n++){let l=a[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(i*a[n+1][0]-i*a[n-1][0])/6,l[1]+(i*a[n+1][1]-i*a[n-1][1])/6],o[2]=[a[n+1][0]+(i*a[n][0]-i*a[n+2][0])/6,a[n+1][1]+(i*a[n][1]-i*a[n+2][1])/6],o[3]=[a[n+1][0],a[n+1][1]],s.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}if(t&&t.length===2){let n=e.maxRandomnessOffset;s.push({op:"lineTo",data:[t[0]+k(n,e),t[1]+k(n,e)]})}}else r===3?(s.push({op:"move",data:[a[1][0],a[1][1]]}),s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[2][0],a[2][1]]})):r===2&&s.push(..._t(a[0][0],a[0][1],a[1][0],a[1][1],e,!0,!0));return s}d(St,"q");function ne(a,t,e,r,s,o,i,n){let l=[],c=[];if(n.roughness===0){a/=4,c.push([t+r*Math.cos(-a),e+s*Math.sin(-a)]);for(let h=0;h<=2*Math.PI;h+=a){let p=[t+r*Math.cos(h),e+s*Math.sin(h)];l.push(p),c.push(p)}c.push([t+r*Math.cos(0),e+s*Math.sin(0)]),c.push([t+r*Math.cos(a),e+s*Math.sin(a)])}else{let h=k(.5,n)-Math.PI/2;c.push([k(o,n)+t+.9*r*Math.cos(h-a),k(o,n)+e+.9*s*Math.sin(h-a)]);let p=2*Math.PI+h-.01;for(let f=h;f<p;f+=a){let u=[k(o,n)+t+r*Math.cos(f),k(o,n)+e+s*Math.sin(f)];l.push(u),c.push(u)}c.push([k(o,n)+t+r*Math.cos(h+2*Math.PI+.5*i),k(o,n)+e+s*Math.sin(h+2*Math.PI+.5*i)]),c.push([k(o,n)+t+.98*r*Math.cos(h+i),k(o,n)+e+.98*s*Math.sin(h+i)]),c.push([k(o,n)+t+.9*r*Math.cos(h+.5*i),k(o,n)+e+.9*s*Math.sin(h+.5*i)])}return[c,l]}d(ne,"F");function oe(a,t,e,r,s,o,i,n,l){let c=o+k(.1,l),h=[];h.push([k(n,l)+t+.9*r*Math.cos(c-a),k(n,l)+e+.9*s*Math.sin(c-a)]);for(let p=c;p<=i;p+=a)h.push([k(n,l)+t+r*Math.cos(p),k(n,l)+e+s*Math.sin(p)]);return h.push([t+r*Math.cos(i),e+s*Math.sin(i)]),h.push([t+r*Math.cos(i),e+s*Math.sin(i)]),St(h,null,l)}d(oe,"V");function er(a,t,e,r,s,o,i,n){let l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3],h=[0,0],p=n.disableMultiStroke?1:2,f=n.preserveVertices;for(let u=0;u<p;u++)u===0?l.push({op:"move",data:[i[0],i[1]]}):l.push({op:"move",data:[i[0]+(f?0:k(c[0],n)),i[1]+(f?0:k(c[0],n))]}),h=f?[s,o]:[s+k(c[u],n),o+k(c[u],n)],l.push({op:"bcurveTo",data:[a+k(c[u],n),t+k(c[u],n),e+k(c[u],n),r+k(c[u],n),h[0],h[1]]});return l}d(er,"Z");function ht(a){return[...a]}d(ht,"Q");function ie(a,t=0){let e=a.length;if(e<3)throw new Error("A curve must have at least three points.");let r=[];if(e===3)r.push(ht(a[0]),ht(a[1]),ht(a[2]),ht(a[2]));else{let s=[];s.push(a[0],a[0]);for(let n=1;n<a.length;n++)s.push(a[n]),n===a.length-1&&s.push(a[n]);let o=[],i=1-t;r.push(ht(s[0]));for(let n=1;n+2<s.length;n++){let l=s[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(i*s[n+1][0]-i*s[n-1][0])/6,l[1]+(i*s[n+1][1]-i*s[n-1][1])/6],o[2]=[s[n+1][0]+(i*s[n][0]-i*s[n+2][0])/6,s[n+1][1]+(i*s[n][1]-i*s[n+2][1])/6],o[3]=[s[n+1][0],s[n+1][1]],r.push(o[1],o[2],o[3])}}return r}d(ie,"H");function wt(a,t){return Math.pow(a[0]-t[0],2)+Math.pow(a[1]-t[1],2)}d(wt,"N");function rr(a,t,e){let r=wt(t,e);if(r===0)return wt(a,t);let s=((a[0]-t[0])*(e[0]-t[0])+(a[1]-t[1])*(e[1]-t[1]))/r;return s=Math.max(0,Math.min(1,s)),wt(a,J(t,e,s))}d(rr,"B");function J(a,t,e){return[a[0]+(t[0]-a[0])*e,a[1]+(t[1]-a[1])*e]}d(J,"J");function Ht(a,t,e,r){let s=r||[];if(function(n,l){let c=n[l+0],h=n[l+1],p=n[l+2],f=n[l+3],u=3*h[0]-2*c[0]-f[0];u*=u;let m=3*h[1]-2*c[1]-f[1];m*=m;let g=3*p[0]-2*f[0]-c[0];g*=g;let b=3*p[1]-2*f[1]-c[1];return b*=b,u<g&&(u=g),m<b&&(m=b),u+m}(a,t)<e){let n=a[t+0];s.length?(o=s[s.length-1],i=n,Math.sqrt(wt(o,i))>1&&s.push(n)):s.push(n),s.push(a[t+3])}else{let l=a[t+0],c=a[t+1],h=a[t+2],p=a[t+3],f=J(l,c,.5),u=J(c,h,.5),m=J(h,p,.5),g=J(f,u,.5),b=J(u,m,.5),y=J(g,b,.5);Ht([l,f,g,y],0,e,s),Ht([y,b,m,p],0,e,s)}var o,i;return s}d(Ht,"K");function sr(a,t){return Mt(a,0,a.length,t)}d(sr,"U");function Mt(a,t,e,r,s){let o=s||[],i=a[t],n=a[e-1],l=0,c=1;for(let h=t+1;h<e-1;++h){let p=rr(a[h],i,n);p>l&&(l=p,c=h)}return Math.sqrt(l)>r?(Mt(a,t,c+1,r,o),Mt(a,c,e,r,o)):(o.length||o.push(i),o.push(n)),o}d(Mt,"X");function Dt(a,t=.15,e){let r=[],s=(a.length-1)/3;for(let o=0;o<s;o++)Ht(a,3*o,t,r);return e&&e>0?Mt(r,0,r.length,e):r}d(Dt,"Y");var X="none",it=class{static{d(this,"et")}constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,s,o){let i=this._o(o);return this._d("line",[pe(t,e,r,s,i)],i)}rectangle(t,e,r,s,o){let i=this._o(o),n=[],l=tr(t,e,r,s,i);if(i.fill){let c=[[t,e],[t+r,e],[t+r,e+s],[t,e+s]];i.fillStyle==="solid"?n.push(Ot([c],i)):n.push(ot([c],i))}return i.stroke!==X&&n.push(l),this._d("rectangle",n,i)}ellipse(t,e,r,s,o){let i=this._o(o),n=[],l=fe(r,s,i),c=jt(t,e,i,l);if(i.fill)if(i.fillStyle==="solid"){let h=jt(t,e,i,l).opset;h.type="fillPath",n.push(h)}else n.push(ot([c.estimatedPoints],i));return i.stroke!==X&&n.push(c.opset),this._d("ellipse",n,i)}circle(t,e,r,s){let o=this.ellipse(t,e,r,r,s);return o.shape="circle",o}linearPath(t,e){let r=this._o(e);return this._d("linearPath",[xt(t,!1,r)],r)}arc(t,e,r,s,o,i,n=!1,l){let c=this._o(l),h=[],p=re(t,e,r,s,o,i,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){let f=Object.assign({},c);f.disableMultiStroke=!0;let u=re(t,e,r,s,o,i,!0,!1,f);u.type="fillPath",h.push(u)}else h.push(function(f,u,m,g,b,y,x){let w=f,$=u,O=Math.abs(m/2),L=Math.abs(g/2);O+=k(.01*O,x),L+=k(.01*L,x);let C=b,E=y;for(;C<0;)C+=2*Math.PI,E+=2*Math.PI;E-C>2*Math.PI&&(C=0,E=2*Math.PI);let T=(E-C)/x.curveStepCount,A=[];for(let _=C;_<=E;_+=T)A.push([w+O*Math.cos(_),$+L*Math.sin(_)]);return A.push([w+O*Math.cos(E),$+L*Math.sin(E)]),A.push([w,$]),ot([A],x)}(t,e,r,s,o,i,c));return c.stroke!==X&&h.push(p),this._d("arc",h,c)}curve(t,e){let r=this._o(e),s=[],o=ee(t,r);if(r.fill&&r.fill!==X)if(r.fillStyle==="solid"){let i=ee(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(i.ops)})}else{let i=[],n=t;if(n.length){let l=typeof n[0][0]=="number"?[n]:n;for(let c of l)c.length<3?i.push(...c):c.length===3?i.push(...Dt(ie([c[0],c[0],c[1],c[2]]),10,(1+r.roughness)/2)):i.push(...Dt(ie(c),10,(1+r.roughness)/2))}i.length&&s.push(ot([i],r))}return r.stroke!==X&&s.push(o),this._d("curve",s,r)}polygon(t,e){let r=this._o(e),s=[],o=xt(t,!0,r);return r.fill&&(r.fillStyle==="solid"?s.push(Ot([t],r)):s.push(ot([t],r))),r.stroke!==X&&s.push(o),this._d("polygon",s,r)}path(t,e){let r=this._o(e),s=[];if(!t)return this._d("path",s,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let o=r.fill&&r.fill!=="transparent"&&r.fill!==X,i=r.stroke!==X,n=!!(r.simplification&&r.simplification<1),l=function(h,p,f){let u=ce(le(zt(h))),m=[],g=[],b=[0,0],y=[],x=d(()=>{y.length>=4&&g.push(...Dt(y,p)),y=[]},"i"),w=d(()=>{x(),g.length&&(m.push(g),g=[])},"c");for(let{key:O,data:L}of u)switch(O){case"M":w(),b=[L[0],L[1]],g.push(b);break;case"L":x(),g.push([L[0],L[1]]);break;case"C":if(!y.length){let C=g.length?g[g.length-1]:b;y.push([C[0],C[1]])}y.push([L[0],L[1]]),y.push([L[2],L[3]]),y.push([L[4],L[5]]);break;case"Z":x(),g.push([b[0],b[1]])}if(w(),!f)return m;let $=[];for(let O of m){let L=sr(O,f);L.length&&$.push(L)}return $}(t,1,n?4-4*(r.simplification||1):(1+r.roughness)/2),c=se(t,r);if(o)if(r.fillStyle==="solid")if(l.length===1){let h=se(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else s.push(Ot(l,r));else s.push(ot(l,r));return i&&(n?l.forEach(h=>{s.push(xt(h,!1,r))}):s.push(c)),this._d("path",s,r)}opsToPath(t,e){let r="";for(let s of t.ops){let o=typeof e=="number"&&e>=0?s.data.map(i=>+i.toFixed(e)):s.data;switch(s.op){case"move":r+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":r+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":r+=`L${o[0]} ${o[1]} `}}return r.trim()}toPaths(t){let e=t.sets||[],r=t.options||this.defaultOptions,s=[];for(let o of e){let i=null;switch(o.type){case"path":i={d:this.opsToPath(o),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:X};break;case"fillPath":i={d:this.opsToPath(o),stroke:X,strokeWidth:0,fill:r.fill||X};break;case"fillSketch":i=this.fillSketch(o,r)}i&&s.push(i)}return s}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||X,strokeWidth:r,fill:X}}_mergedShape(t){return t.filter((e,r)=>r===0||e.op!=="move")}},Wt=class{static{d(this,"st")}constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new it(e)}draw(t){let e=t.sets||[],r=t.options||this.getDefaultOptions(),s=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(let i of e)switch(i.type){case"path":s.save(),s.strokeStyle=r.stroke==="none"?"transparent":r.stroke,s.lineWidth=r.strokeWidth,r.strokeLineDash&&s.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(s.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(s,i,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=r.fill||"";let n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,i,o,n),s.restore();break}case"fillSketch":this.fillSketch(s,i,r)}}fillSketch(t,e,r){let s=r.fillWeight;s<0&&(s=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=s,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,s="nonzero"){t.beginPath();for(let o of e.ops){let i=typeof r=="number"&&r>=0?o.data.map(n=>+n.toFixed(r)):o.data;switch(o.op){case"move":t.moveTo(i[0],i[1]);break;case"bcurveTo":t.bezierCurveTo(i[0],i[1],i[2],i[3],i[4],i[5]);break;case"lineTo":t.lineTo(i[0],i[1])}}e.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,s,o){let i=this.gen.line(t,e,r,s,o);return this.draw(i),i}rectangle(t,e,r,s,o){let i=this.gen.rectangle(t,e,r,s,o);return this.draw(i),i}ellipse(t,e,r,s,o){let i=this.gen.ellipse(t,e,r,s,o);return this.draw(i),i}circle(t,e,r,s){let o=this.gen.circle(t,e,r,s);return this.draw(o),o}linearPath(t,e){let r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){let r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,s,o,i,n=!1,l){let c=this.gen.arc(t,e,r,s,o,i,n,l);return this.draw(c),c}curve(t,e){let r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){let r=this.gen.path(t,e);return this.draw(r),r}},bt="http://www.w3.org/2000/svg",It=class{static{d(this,"ot")}constructor(t,e){this.svg=t,this.gen=new it(e)}draw(t){let e=t.sets||[],r=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(bt,"g"),i=t.options.fixedDecimalPlaceDigits;for(let n of e){let l=null;switch(n.type){case"path":l=s.createElementNS(bt,"path"),l.setAttribute("d",this.opsToPath(n,i)),l.setAttribute("stroke",r.stroke),l.setAttribute("stroke-width",r.strokeWidth+""),l.setAttribute("fill","none"),r.strokeLineDash&&l.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(bt,"path"),l.setAttribute("d",this.opsToPath(n,i)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",r.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,r)}l&&o.appendChild(l)}return o}fillSketch(t,e,r){let s=r.fillWeight;s<0&&(s=r.strokeWidth/2);let o=t.createElementNS(bt,"path");return o.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),o.setAttribute("stroke",r.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),r.fillLineDash&&o.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,s,o){let i=this.gen.line(t,e,r,s,o);return this.draw(i)}rectangle(t,e,r,s,o){let i=this.gen.rectangle(t,e,r,s,o);return this.draw(i)}ellipse(t,e,r,s,o){let i=this.gen.ellipse(t,e,r,s,o);return this.draw(i)}circle(t,e,r,s){let o=this.gen.circle(t,e,r,s);return this.draw(o)}linearPath(t,e){let r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){let r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,s,o,i,n=!1,l){let c=this.gen.arc(t,e,r,s,o,i,n,l);return this.draw(c)}curve(t,e){let r=this.gen.curve(t,e);return this.draw(r)}path(t,e){let r=this.gen.path(t,e);return this.draw(r)}},M={canvas:d((a,t)=>new Wt(a,t),"canvas"),svg:d((a,t)=>new It(a,t),"svg"),generator:d(a=>new it(a),"generator"),newSeed:d(()=>it.newSeed(),"newSeed")};var ar=d((a,t)=>{var e=a.x,r=a.y,s=t.x-e,o=t.y-r,i=a.width/2,n=a.height/2,l,c;return Math.abs(o)*i>Math.abs(s)*n?(o<0&&(n=-n),l=o===0?0:n*s/o,c=n):(s<0&&(i=-i),l=i,c=s===0?0:i*o/s),{x:e+l,y:r+c}},"intersectRect"),K=ar;function nr(a,t){t&&a.attr("style",t)}d(nr,"applyStyle");async function or(a){let t=W(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),e=t.append("xhtml:div"),r=a.label;a.label&&Ft(a.label)&&(r=await qt(a.label.replace(Ut.lineBreakRegex,`
`),P()));let s=a.isNode?"nodeLabel":"edgeLabel";return e.html('<span class="'+s+'" '+(a.labelStyle?'style="'+a.labelStyle+'"':"")+">"+r+"</span>"),nr(e,a.labelStyle),e.style("display","inline-block"),e.style("padding-right","1px"),e.style("white-space","nowrap"),e.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}d(or,"addHtmlLabel");var ir=d(async(a,t,e,r)=>{let s=a||"";if(typeof s=="object"&&(s=s[0]),I(P().flowchart.htmlLabels)){s=s.replace(/\\n|\n/g,"<br />"),S.info("vertexText"+s);let o={isNode:r,label:dt(s).replace(/fa[blrs]?:fa-[\w-]+/g,n=>`<i class='${n.replace(":"," ")}'></i>`),labelStyle:t&&t.replace("fill:","color:")};return await or(o)}else{let o=document.createElementNS("http://www.w3.org/2000/svg","text");o.setAttribute("style",t.replace("color:","fill:"));let i=[];typeof s=="string"?i=s.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(s)?i=s:i=[];for(let n of i){let l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),e?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=n.trim(),o.appendChild(l)}return o}},"createLabel"),F=ir;var q=d((a,t,e,r,s)=>["M",a+s,t,"H",a+e-s,"A",s,s,0,0,1,a+e,t+s,"V",t+r-s,"A",s,s,0,0,1,a+e-s,t+r,"H",a+s,"A",s,s,0,0,1,a,t+r-s,"V",t+s,"A",s,s,0,0,1,a+s,t,"Z"].join(" "),"createRoundedRectPathD");var U=d(a=>{let{handDrawnSeed:t}=P();return{fill:a,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:a,seed:t}},"solidStateFill"),de=d(a=>{let t=lr([...a.cssCompiledStyles||[],...a.cssStyles||[]]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),lr=d(a=>{let t=new Map;return a.forEach(e=>{let[r,s]=e.split(":");t.set(r.trim(),s?.trim())}),t},"styles2Map"),D=d(a=>{let{stylesArray:t}=de(a),e=[],r=[],s=[],o=[];return t.forEach(i=>{let n=i[0];n==="color"||n==="font-size"||n==="font-family"||n==="font-weight"||n==="font-style"||n==="text-decoration"||n==="text-align"||n==="text-transform"||n==="line-height"||n==="letter-spacing"||n==="word-spacing"||n==="text-shadow"||n==="text-overflow"||n==="white-space"||n==="word-wrap"||n==="word-break"||n==="overflow-wrap"||n==="hyphens"?e.push(i.join(":")+" !important"):(r.push(i.join(":")+" !important"),n.includes("stroke")&&s.push(i.join(":")+" !important"),n==="fill"&&o.push(i.join(":")+" !important"))}),{labelStyles:e.join(";"),nodeStyles:r.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:o}},"styles2String"),B=d((a,t)=>{let{themeVariables:e,handDrawnSeed:r}=P(),{nodeBorder:s,mainBkg:o}=e,{stylesMap:i}=de(a);return Object.assign({roughness:.7,fill:i.get("fill")||o,fillStyle:"hachure",fillWeight:4,stroke:i.get("stroke")||s,seed:r,strokeWidth:1.3},t)},"userNodeOverrides");var me=d(async(a,t)=>{S.info("Creating subgraph rect for ",t.id,t);let e=P(),{themeVariables:r,handDrawnSeed:s}=e,{clusterBkg:o,clusterBorder:i}=r,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=D(t),p=a.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.id).attr("data-look",t.look),f=I(e.flowchart.htmlLabels),u=p.insert("g").attr("class","cluster-label "),m=await nt(u,t.label,{style:t.labelStyle,useHtmlLabels:f,isNode:!0}),g=m.getBBox();if(I(e.flowchart.htmlLabels)){let C=m.children[0],E=W(m);g=C.getBoundingClientRect(),E.attr("width",g.width),E.attr("height",g.height)}let b=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;let y=t.height,x=t.x-b/2,w=t.y-y/2;S.trace("Data ",t,JSON.stringify(t));let $;if(t.look==="handDrawn"){let C=M.svg(p),E=B(t,{roughness:.7,fill:o,stroke:i,fillWeight:3,seed:s}),T=C.path(q(x,w,b,y,0),E);$=p.insert(()=>(S.debug("Rough node insert CXC",T),T),":first-child"),$.select("path:nth-child(2)").attr("style",c.join(";")),$.select("path").attr("style",h.join(";").replace("fill","stroke"))}else $=p.insert("rect",":first-child"),$.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",x).attr("y",w).attr("width",b).attr("height",y);let{subGraphTitleTopMargin:O}=mt(e);if(u.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+O})`),n){let C=u.select("span");C&&C.attr("style",n)}let L=$.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=g.height-t.padding/2,t.intersect=function(C){return K(t,C)},{cluster:p,labelBBox:g}},"rect"),cr=d((a,t)=>{let e=a.insert("g").attr("class","note-cluster").attr("id",t.id),r=e.insert("rect",":first-child"),s=0*t.padding,o=s/2;r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");let i=r.node().getBBox();return t.width=i.width,t.height=i.height,t.intersect=function(n){return K(t,n)},{cluster:e,labelBBox:{width:0,height:0}}},"noteGroup"),hr=d(async(a,t)=>{let e=P(),{themeVariables:r,handDrawnSeed:s}=e,{altBackground:o,compositeBackground:i,compositeTitleBackground:n,nodeBorder:l}=r,c=a.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),p=c.insert("g").attr("class","cluster-label"),f=c.append("rect"),u=p.node().appendChild(await F(t.label,t.labelStyle,void 0,!0)),m=u.getBBox();if(I(e.flowchart.htmlLabels)){let T=u.children[0],A=W(u);m=T.getBoundingClientRect(),A.attr("width",m.width),A.attr("height",m.height)}let g=0*t.padding,b=g/2,y=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+g;t.width<=m.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;let x=t.height+g,w=t.height+g-m.height-6,$=t.x-y/2,O=t.y-x/2;t.width=y;let L=t.y-t.height/2-b+m.height+2,C;if(t.look==="handDrawn"){let T=t.cssClasses.includes("statediagram-cluster-alt"),A=M.svg(c),_=t.rx||t.ry?A.path(q($,O,y,x,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):A.rectangle($,O,y,x,{seed:s});C=c.insert(()=>_,":first-child");let et=A.rectangle($,L,y,w,{fill:T?o:i,fillStyle:T?"hachure":"solid",stroke:l,seed:s});C=c.insert(()=>_,":first-child"),f=c.insert(()=>et)}else C=h.insert("rect",":first-child"),C.attr("class","outer").attr("x",$).attr("y",O).attr("width",y).attr("height",x).attr("data-look",t.look),f.attr("class","inner").attr("x",$).attr("y",L).attr("width",y).attr("height",w);p.attr("transform",`translate(${t.x-m.width/2}, ${O+1-(I(e.flowchart.htmlLabels)?0:3)})`);let E=C.node().getBBox();return t.height=E.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(T){return K(t,T)},{cluster:c,labelBBox:m}},"roundedWithTitle"),pr=d((a,t)=>{let e=P(),{themeVariables:r,handDrawnSeed:s}=e,{nodeBorder:o}=r,i=a.insert("g").attr("class",t.cssClasses).attr("id",t.id).attr("data-look",t.look),n=i.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;let h=t.height+l,p=t.x-c/2,f=t.y-h/2;t.width=c;let u;if(t.look==="handDrawn"){let b=M.svg(i).rectangle(p,f,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:s});u=i.insert(()=>b,":first-child")}else u=n.insert("rect",":first-child"),u.attr("class","divider").attr("x",p).attr("y",f).attr("width",c).attr("height",h).attr("data-look",t.look);let m=u.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(g){return K(t,g)},{cluster:i,labelBBox:{}}},"divider"),fr=me,ur={rect:me,squareRect:fr,roundedWithTitle:hr,noteGroup:cr,divider:pr},ge=new Map,bs=d(async(a,t)=>{let e=t.shape||"rect",r=await ur[e](a,t);return ge.set(t.id,r),r},"insertCluster");var xs=d(()=>{ge=new Map},"clear");var be=d((a,t,e,r,s)=>{t.arrowTypeStart&&ye(a,"start",t.arrowTypeStart,e,r,s),t.arrowTypeEnd&&ye(a,"end",t.arrowTypeEnd,e,r,s)},"addEdgeMarkers"),dr={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},ye=d((a,t,e,r,s,o)=>{let i=dr[e];if(!i){S.warn(`Unknown arrow type: ${e}`);return}let n=t==="start"?"Start":"End";a.attr(`marker-${t}`,`url(${r}#${s}_${o}-${i}${n})`)},"addEdgeMarker");var $t=new Map,j=new Map,As=d(()=>{$t.clear(),j.clear()},"clear"),ut=d(a=>a?a.reduce((e,r)=>e+";"+r,""):"","getLabelStyles"),Gs=d(async(a,t)=>{let e=I(P().flowchart.htmlLabels),r=await nt(a,t.label,{style:ut(t.labelStyle),useHtmlLabels:e,addSvgBackground:!0,isNode:!1});S.info("abc82",t,t.labelType);let s=a.insert("g").attr("class","edgeLabel"),o=s.insert("g").attr("class","label");o.node().appendChild(r);let i=r.getBBox();if(e){let l=r.children[0],c=W(r);i=l.getBoundingClientRect(),c.attr("width",i.width),c.attr("height",i.height)}o.attr("transform","translate("+-i.width/2+", "+-i.height/2+")"),$t.set(t.id,s),t.width=i.width,t.height=i.height;let n;if(t.startLabelLeft){let l=await F(t.startLabelLeft,ut(t.labelStyle)),c=a.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");n=h.node().appendChild(l);let p=l.getBBox();h.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),j.get(t.id)||j.set(t.id,{}),j.get(t.id).startLeft=c,Lt(n,t.startLabelLeft)}if(t.startLabelRight){let l=await F(t.startLabelRight,ut(t.labelStyle)),c=a.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");n=c.node().appendChild(l),h.node().appendChild(l);let p=l.getBBox();h.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),j.get(t.id)||j.set(t.id,{}),j.get(t.id).startRight=c,Lt(n,t.startLabelRight)}if(t.endLabelLeft){let l=await F(t.endLabelLeft,ut(t.labelStyle)),c=a.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");n=h.node().appendChild(l);let p=l.getBBox();h.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),c.node().appendChild(l),j.get(t.id)||j.set(t.id,{}),j.get(t.id).endLeft=c,Lt(n,t.endLabelLeft)}if(t.endLabelRight){let l=await F(t.endLabelRight,ut(t.labelStyle)),c=a.insert("g").attr("class","edgeTerminals"),h=c.insert("g").attr("class","inner");n=h.node().appendChild(l);let p=l.getBBox();h.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),c.node().appendChild(l),j.get(t.id)||j.set(t.id,{}),j.get(t.id).endRight=c,Lt(n,t.endLabelRight)}return r},"insertEdgeLabel");function Lt(a,t){P().flowchart.htmlLabels&&a&&(a.style.width=t.length*9+"px",a.style.height="12px")}d(Lt,"setTerminalWidth");var Vs=d((a,t)=>{S.debug("Moving label abc88 ",a.id,a.label,$t.get(a.id),t);let e=t.updatedPath?t.updatedPath:t.originalPath,r=P(),{subGraphTitleTotalMargin:s}=mt(r);if(a.label){let o=$t.get(a.id),i=a.x,n=a.y;if(e){let l=at.calcLabelPosition(e);S.debug("Moving label "+a.label+" from (",i,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(i=l.x,n=l.y)}o.attr("transform",`translate(${i}, ${n+s/2})`)}if(a.startLabelLeft){let o=j.get(a.id).startLeft,i=a.x,n=a.y;if(e){let l=at.calcTerminalLabelPosition(a.arrowTypeStart?10:0,"start_left",e);i=l.x,n=l.y}o.attr("transform",`translate(${i}, ${n})`)}if(a.startLabelRight){let o=j.get(a.id).startRight,i=a.x,n=a.y;if(e){let l=at.calcTerminalLabelPosition(a.arrowTypeStart?10:0,"start_right",e);i=l.x,n=l.y}o.attr("transform",`translate(${i}, ${n})`)}if(a.endLabelLeft){let o=j.get(a.id).endLeft,i=a.x,n=a.y;if(e){let l=at.calcTerminalLabelPosition(a.arrowTypeEnd?10:0,"end_left",e);i=l.x,n=l.y}o.attr("transform",`translate(${i}, ${n})`)}if(a.endLabelRight){let o=j.get(a.id).endRight,i=a.x,n=a.y;if(e){let l=at.calcTerminalLabelPosition(a.arrowTypeEnd?10:0,"end_right",e);i=l.x,n=l.y}o.attr("transform",`translate(${i}, ${n})`)}},"positionEdgeLabel"),mr=d((a,t)=>{let e=a.x,r=a.y,s=Math.abs(t.x-e),o=Math.abs(t.y-r),i=a.width/2,n=a.height/2;return s>=i||o>=n},"outsideNode"),gr=d((a,t,e)=>{S.debug(`intersection calc abc89:
outsidePoint: ${JSON.stringify(t)}
insidePoint : ${JSON.stringify(e)}
node : x:${a.x} y:${a.y} w:${a.width} h:${a.height}`);let r=a.x,s=a.y,o=Math.abs(r-e.x),i=a.width/2,n=e.x<t.x?i-o:i+o,l=a.height/2,c=Math.abs(t.y-e.y),h=Math.abs(t.x-e.x);if(Math.abs(s-t.y)*i>Math.abs(r-t.x)*l){let p=e.y<t.y?t.y-l-s:s-l-t.y;n=h*p/c;let f={x:e.x<t.x?e.x+n:e.x-h+n,y:e.y<t.y?e.y+c-p:e.y-c+p};return n===0&&(f.x=t.x,f.y=t.y),h===0&&(f.x=t.x),c===0&&(f.y=t.y),S.debug(`abc89 top/bottom calc, Q ${c}, q ${p}, R ${h}, r ${n}`,f),f}else{e.x<t.x?n=t.x-i-r:n=r-i-t.x;let p=c*n/h,f=e.x<t.x?e.x+h-n:e.x-h+n,u=e.y<t.y?e.y+p:e.y-p;return S.debug(`sides calc abc89, Q ${c}, q ${p}, R ${h}, r ${n}`,{_x:f,_y:u}),n===0&&(f=t.x,u=t.y),h===0&&(f=t.x),c===0&&(u=t.y),{x:f,y:u}}},"intersection"),xe=d((a,t)=>{S.warn("abc88 cutPathAtIntersect",a,t);let e=[],r=a[0],s=!1;return a.forEach(o=>{if(S.info("abc88 checking point",o,t),!mr(t,o)&&!s){let i=gr(t,r,o);S.debug("abc88 inside",o,r,i),S.debug("abc88 intersection",i,t);let n=!1;e.forEach(l=>{n=n||l.x===i.x&&l.y===i.y}),e.some(l=>l.x===i.x&&l.y===i.y)?S.warn("abc88 no intersect",i,e):e.push(i),s=!0}else S.warn("abc88 outside",o,r),r=o,s||e.push(o)}),S.debug("returning points",e),e},"cutPathAtIntersect");function yr(a){let t=[],e=[];for(let r=1;r<a.length-1;r++){let s=a[r-1],o=a[r],i=a[r+1];(s.x===o.x&&o.y===i.y&&Math.abs(o.x-i.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===i.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-i.y)>5)&&(t.push(o),e.push(r))}return{cornerPoints:t,cornerPointPositions:e}}d(yr,"extractCornerPoints");var we=d(function(a,t,e){let r=t.x-a.x,s=t.y-a.y,o=Math.sqrt(r*r+s*s),i=e/o;return{x:t.x-i*r,y:t.y-i*s}},"findAdjacentPoint"),br=d(function(a){let{cornerPointPositions:t}=yr(a),e=[];for(let r=0;r<a.length;r++)if(t.includes(r)){let s=a[r-1],o=a[r+1],i=a[r],n=we(s,i,5),l=we(o,i,5),c=l.x-n.x,h=l.y-n.y;e.push(n);let p=Math.sqrt(2)*2,f={x:i.x,y:i.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){S.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));let u=5;i.x===n.x?f={x:c<0?n.x-u+p:n.x+u-p,y:h<0?n.y-p:n.y+p}:f={x:c<0?n.x-p:n.x+p,y:h<0?n.y-u+p:n.y+u-p}}else S.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));e.push(f,l)}else e.push(a[r]);return e},"fixCorners"),js=d(function(a,t,e,r,s,o,i){let{handDrawnSeed:n}=P(),l=t.points,c=!1,h=s;var p=o;p.intersect&&h.intersect&&(l=l.slice(1,t.points.length-1),l.unshift(h.intersect(l[0])),S.debug("Last point APA12",t.start,"-->",t.end,l[l.length-1],p,p.intersect(l[l.length-1])),l.push(p.intersect(l[l.length-1]))),t.toCluster&&(S.info("to cluster abc88",e.get(t.toCluster)),l=xe(t.points,e.get(t.toCluster).node),c=!0),t.fromCluster&&(S.debug("from cluster abc88",e.get(t.fromCluster),JSON.stringify(l,null,2)),l=xe(l.reverse(),e.get(t.fromCluster).node).reverse(),c=!0);let f=l.filter(E=>!Number.isNaN(E.y));f=br(f);let u=f[f.length-1];if(f.length>1){u=f[f.length-1];let E=f[f.length-2],T=(u.x-E.x)/2,A=(u.y-E.y)/2,_={x:E.x+T,y:E.y+A};f.splice(-1,0,_)}let m=Jt;t.curve&&(m=t.curve);let{x:g,y:b}=Kt(t),y=Qt().x(g).y(b).curve(m),x;switch(t.thickness){case"normal":x="edge-thickness-normal";break;case"thick":x="edge-thickness-thick";break;case"invisible":x="edge-thickness-invisible";break;default:x="edge-thickness-normal"}switch(t.pattern){case"solid":x+=" edge-pattern-solid";break;case"dotted":x+=" edge-pattern-dotted";break;case"dashed":x+=" edge-pattern-dashed";break;default:x+=" edge-pattern-solid"}let w,$=y(f),O=Array.isArray(t.style)?t.style:[t.style];if(t.look==="handDrawn"){let E=M.svg(a);Object.assign([],f);let T=E.path($,{roughness:.3,seed:n});x+=" transition",w=W(T).select("path").attr("id",t.id).attr("class"," "+x+(t.classes?" "+t.classes:"")).attr("style",O?O.reduce((_,et)=>_+";"+et,""):"");let A=w.attr("d");w.attr("d",A),a.node().appendChild(w.node())}else w=a.append("path").attr("d",$).attr("id",t.id).attr("class"," "+x+(t.classes?" "+t.classes:"")).attr("style",O?O.reduce((E,T)=>E+";"+T,""):"");let L="";(P().flowchart.arrowMarkerAbsolute||P().state.arrowMarkerAbsolute)&&(L=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,L=L.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),S.info("arrowTypeStart",t.arrowTypeStart),S.info("arrowTypeEnd",t.arrowTypeEnd),be(w,t,L,i,r);let C={};return c&&(C.updatedPath=l),C.originalPath=t.points,C},"insertEdge");var xr=d((a,t,e,r)=>{t.forEach(s=>{Cr[s](a,e,r)})},"insertMarkers"),wr=d((a,t,e)=>{S.trace("Making markers for ",e),a.append("defs").append("marker").attr("id",e+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),a.append("defs").append("marker").attr("id",e+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),kr=d((a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",e+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Sr=d((a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",e+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Mr=d((a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),a.append("defs").append("marker").attr("id",e+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),vr=d((a,t,e)=>{a.append("defs").append("marker").attr("id",e+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),a.append("defs").append("marker").attr("id",e+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Lr=d((a,t,e)=>{a.append("marker").attr("id",e+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),a.append("marker").attr("id",e+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),$r=d((a,t,e)=>{a.append("marker").attr("id",e+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),a.append("marker").attr("id",e+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),Nr=d((a,t,e)=>{a.append("marker").attr("id",e+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),a.append("marker").attr("id",e+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("vie