mermaid
Version:
Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.
8 lines (7 loc) • 22.1 kB
JavaScript
import{a as T,b as B,c as K,d as xt}from"./chunk-3ZBQQEZ6.mjs";import{c as Y}from"./chunk-BDKIFH7H.mjs";import{b as kt}from"./chunk-XODN6PIJ.mjs";import{a as yt}from"./chunk-IWDTEBJL.mjs";import{c as ht,d as mt}from"./chunk-D2KP3OBD.mjs";import{f as ft}from"./chunk-YLHEXJF3.mjs";import{m as O}from"./chunk-Q3CC2MQB.mjs";import{Y as E,w as J}from"./chunk-3UWU4A3N.mjs";import{$ as pt,G as N,H as rt,J as at,K as et,L as F,P as nt,S as st,W as ot,X as it,Y as ct,Z as lt,_ as dt,b,h as v}from"./chunk-MGPAVIPZ.mjs";import{a as p}from"./chunk-VELTKBKT.mjs";var bt=p((r,t,a,n,i,s)=>{t.arrowTypeStart&&ut(r,"start",t.arrowTypeStart,a,n,i,s),t.arrowTypeEnd&&ut(r,"end",t.arrowTypeEnd,a,n,i,s)},"addEdgeMarkers"),_t={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},ut=p((r,t,a,n,i,s,e)=>{let o=_t[a];if(!o){b.warn(`Unknown arrow type: ${a}`);return}let l=o.type,m=`${i}_${s}-${l}${t==="start"?"Start":"End"}`;if(e&&e.trim()!==""){let y=e.replace(/[^\dA-Za-z]/g,"_"),f=`${m}_${y}`;if(!document.getElementById(f)){let d=document.getElementById(m);if(d){let x=d.cloneNode(!0);x.id=f,x.querySelectorAll("path, circle, line").forEach(k=>{k.setAttribute("stroke",e),o.fill&&k.setAttribute("fill",e)}),d.parentNode?.appendChild(x)}}r.attr(`marker-${t}`,`url(${n}#${f})`)}else r.attr(`marker-${t}`,`url(${n}#${m})`)},"addEdgeMarker");var $t=p(r=>typeof r=="string"?r:E()?.flowchart?.curve,"resolveEdgeCurveType"),P=new Map,w=new Map,hr=p(()=>{P.clear(),w.clear()},"clear"),W=p(r=>r?typeof r=="string"?r:r.reduce((t,a)=>t+";"+a,""):"","getLabelStyles"),mr=p(async(r,t)=>{let a=E(),n=J(a),{labelStyles:i}=mt(t);t.labelStyle=i;let s=r.insert("g").attr("class","edgeLabel"),e=s.insert("g").attr("class","label").attr("data-id",t.id),o=t.labelType==="markdown",c=await ft(r,t.label,{style:W(t.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1,markdown:o,width:o?void 0:void 0},a);e.node().appendChild(c),b.info("abc82",t,t.labelType);let m=c.getBBox(),y=m;if(n){let d=c.children[0],x=v(c);m=d.getBoundingClientRect(),y=m,x.attr("width",m.width),x.attr("height",m.height)}else{let d=v(c).select("text").node();d&&typeof d.getBBox=="function"&&(y=d.getBBox())}e.attr("transform",T(y,n)),P.set(t.id,s),t.width=m.width,t.height=m.height;let f;if(t.startLabelLeft){let d=r.insert("g").attr("class","edgeTerminals"),x=d.insert("g").attr("class","inner"),h=await Y(x,t.startLabelLeft,W(t.labelStyle)||"",!1,!1);f=h;let k=h.getBBox();if(n){let u=h.children[0],M=v(h);k=u.getBoundingClientRect(),M.attr("width",k.width),M.attr("height",k.height)}x.attr("transform",T(k,n)),w.get(t.id)||w.set(t.id,{}),w.get(t.id).startLeft=d,Q(f,t.startLabelLeft)}if(t.startLabelRight){let d=r.insert("g").attr("class","edgeTerminals"),x=d.insert("g").attr("class","inner"),h=await Y(x,t.startLabelRight,W(t.labelStyle)||"",!1,!1);f=h,x.node().appendChild(h);let k=h.getBBox();if(n){let u=h.children[0],M=v(h);k=u.getBoundingClientRect(),M.attr("width",k.width),M.attr("height",k.height)}x.attr("transform",T(k,n)),w.get(t.id)||w.set(t.id,{}),w.get(t.id).startRight=d,Q(f,t.startLabelRight)}if(t.endLabelLeft){let d=r.insert("g").attr("class","edgeTerminals"),x=d.insert("g").attr("class","inner"),h=await Y(x,t.endLabelLeft,W(t.labelStyle)||"",!1,!1);f=h;let k=h.getBBox();if(n){let u=h.children[0],M=v(h);k=u.getBoundingClientRect(),M.attr("width",k.width),M.attr("height",k.height)}x.attr("transform",T(k,n)),d.node().appendChild(h),w.get(t.id)||w.set(t.id,{}),w.get(t.id).endLeft=d,Q(f,t.endLabelLeft)}if(t.endLabelRight){let d=r.insert("g").attr("class","edgeTerminals"),x=d.insert("g").attr("class","inner"),h=await Y(x,t.endLabelRight,W(t.labelStyle)||"",!1,!1);f=h;let k=h.getBBox();if(n){let u=h.children[0],M=v(h);k=u.getBoundingClientRect(),M.attr("width",k.width),M.attr("height",k.height)}x.attr("transform",T(k,n)),d.node().appendChild(h),w.get(t.id)||w.set(t.id,{}),w.get(t.id).endRight=d,Q(f,t.endLabelRight)}return c},"insertEdgeLabel");function Q(r,t){J(E())&&r&&(r.style.width=t.length*9+"px",r.style.height="12px")}p(Q,"setTerminalWidth");var yr=p((r,t)=>{b.debug("Moving label abc88 ",r.id,r.label,P.get(r.id),t);let a=t.updatedPath?t.updatedPath:t.originalPath,n=E(),{subGraphTitleTotalMargin:i}=kt(n);if(r.label){let s=P.get(r.id),e=r.x,o=r.y;if(a){let l=O.calcLabelPosition(a);b.debug("Moving label "+r.label+" from (",e,",",o,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(e=l.x,o=l.y)}s.attr("transform",`translate(${e}, ${o+i/2})`)}if(r.startLabelLeft){let s=w.get(r.id).startLeft,e=r.x,o=r.y;if(a){let l=O.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_left",a);e=l.x,o=l.y}s.attr("transform",`translate(${e}, ${o})`)}if(r.startLabelRight){let s=w.get(r.id).startRight,e=r.x,o=r.y;if(a){let l=O.calcTerminalLabelPosition(r.arrowTypeStart?10:0,"start_right",a);e=l.x,o=l.y}s.attr("transform",`translate(${e}, ${o})`)}if(r.endLabelLeft){let s=w.get(r.id).endLeft,e=r.x,o=r.y;if(a){let l=O.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_left",a);e=l.x,o=l.y}s.attr("transform",`translate(${e}, ${o})`)}if(r.endLabelRight){let s=w.get(r.id).endRight,e=r.x,o=r.y;if(a){let l=O.calcTerminalLabelPosition(r.arrowTypeEnd?10:0,"end_right",a);e=l.x,o=l.y}s.attr("transform",`translate(${e}, ${o})`)}},"positionEdgeLabel"),Et=p((r,t)=>{let a=r.x,n=r.y,i=Math.abs(t.x-a),s=Math.abs(t.y-n),e=r.width/2,o=r.height/2;return i>=e||s>=o},"outsideNode"),vt=p((r,t,a)=>{b.debug(`intersection calc abc89:
outsidePoint: ${JSON.stringify(t)}
insidePoint : ${JSON.stringify(a)}
node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);let n=r.x,i=r.y,s=Math.abs(n-a.x),e=r.width/2,o=a.x<t.x?e-s:e+s,l=r.height/2,c=Math.abs(t.y-a.y),m=Math.abs(t.x-a.x);if(Math.abs(i-t.y)*e>Math.abs(n-t.x)*l){let y=a.y<t.y?t.y-l-i:i-l-t.y;o=m*y/c;let f={x:a.x<t.x?a.x+o:a.x-m+o,y:a.y<t.y?a.y+c-y:a.y-c+y};return o===0&&(f.x=t.x,f.y=t.y),m===0&&(f.x=t.x),c===0&&(f.y=t.y),b.debug(`abc89 top/bottom calc, Q ${c}, q ${y}, R ${m}, r ${o}`,f),f}else{a.x<t.x?o=t.x-e-n:o=n-e-t.x;let y=c*o/m,f=a.x<t.x?a.x+m-o:a.x-m+o,d=a.y<t.y?a.y+y:a.y-y;return b.debug(`sides calc abc89, Q ${c}, q ${y}, R ${m}, r ${o}`,{_x:f,_y:d}),o===0&&(f=t.x,d=t.y),m===0&&(f=t.x),c===0&&(d=t.y),{x:f,y:d}}},"intersection"),gt=p((r,t)=>{b.warn("abc88 cutPathAtIntersect",r,t);let a=[],n=r[0],i=!1;return r.forEach(s=>{if(b.info("abc88 checking point",s,t),!Et(t,s)&&!i){let e=vt(t,n,s);b.debug("abc88 inside",s,n,e),b.debug("abc88 intersection",e,t);let o=!1;a.forEach(l=>{o=o||l.x===e.x&&l.y===e.y}),a.some(l=>l.x===e.x&&l.y===e.y)?b.warn("abc88 no intersect",e,a):a.push(e),i=!0}else b.warn("abc88 outside",s,n),n=s,i||a.push(s)}),b.debug("returning points",a),a},"cutPathAtIntersect");function Ot(r){let t=[],a=[];for(let n=1;n<r.length-1;n++){let i=r[n-1],s=r[n],e=r[n+1];(i.x===s.x&&s.y===e.y&&Math.abs(s.x-e.x)>5&&Math.abs(s.y-i.y)>5||i.y===s.y&&s.x===e.x&&Math.abs(s.x-i.x)>5&&Math.abs(s.y-e.y)>5)&&(t.push(s),a.push(n))}return{cornerPoints:t,cornerPointPositions:a}}p(Ot,"extractCornerPoints");var wt=p(function(r,t,a){let n=t.x-r.x,i=t.y-r.y,s=Math.sqrt(n*n+i*i),e=a/s;return{x:t.x-e*n,y:t.y-e*i}},"findAdjacentPoint"),Tt=p(function(r){let{cornerPointPositions:t}=Ot(r),a=[];for(let n=0;n<r.length;n++)if(t.includes(n)){let i=r[n-1],s=r[n+1],e=r[n],o=wt(i,e,5),l=wt(s,e,5),c=l.x-o.x,m=l.y-o.y;a.push(o);let y=Math.sqrt(2)*2,f={x:e.x,y:e.y};if(Math.abs(s.x-i.x)>10&&Math.abs(s.y-i.y)>=10){b.debug("Corner point fixing",Math.abs(s.x-i.x),Math.abs(s.y-i.y));let d=5;e.x===o.x?f={x:c<0?o.x-d+y:o.x+d-y,y:m<0?o.y-y:o.y+y}:f={x:c<0?o.x-y:o.x+y,y:m<0?o.y-d+y:o.y+d-y}}else b.debug("Corner point skipping fixing",Math.abs(s.x-i.x),Math.abs(s.y-i.y));a.push(f,l)}else a.push(r[n]);return a},"fixCorners"),Xt=p((r,t,a)=>{let n=r-t-a,i=2,s=2,e=i+s,o=Math.floor(n/e),l=Array(o).fill(`${i} ${s}`).join(" ");return`0 ${t} ${l} ${a}`},"generateDashArray"),kr=p(function(r,t,a,n,i,s,e,o=!1){let{handDrawnSeed:l}=E(),c=t.points,m=!1,y=i;var f=s;let d=[];for(let S in t.cssCompiledStyles)ht(S)||d.push(t.cssCompiledStyles[S]);b.debug("UIO intersect check",t.points,f.x,y.x),f.intersect&&y.intersect&&!o&&(c=c.slice(1,t.points.length-1),c.unshift(y.intersect(c[0])),b.debug("Last point UIO",t.start,"-->",t.end,c[c.length-1],f,f.intersect(c[c.length-1])),c.push(f.intersect(c[c.length-1])));let x=btoa(JSON.stringify(c));t.toCluster&&(b.info("to cluster abc88",a.get(t.toCluster)),c=gt(t.points,a.get(t.toCluster).node),m=!0),t.fromCluster&&(b.debug("from cluster abc88",a.get(t.fromCluster),JSON.stringify(c,null,2)),c=gt(c.reverse(),a.get(t.fromCluster).node).reverse(),m=!0);let h=c.filter(S=>!Number.isNaN(S.y)),k=$t(t.curve);k!=="rounded"&&(h=Tt(h));let u=N;switch(k){case"linear":u=N;break;case"basis":u=F;break;case"cardinal":u=nt;break;case"bumpX":u=at;break;case"bumpY":u=et;break;case"catmullRom":u=st;break;case"monotoneX":u=ot;break;case"monotoneY":u=it;break;case"natural":u=ct;break;case"step":u=lt;break;case"stepAfter":u=pt;break;case"stepBefore":u=dt;break;case"rounded":u=N;break;default:u=F}let{x:M,y:Z}=xt(t),V=rt().x(M).y(Z).curve(u),L;switch(t.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;case"invisible":L="edge-thickness-invisible";break;default:L="edge-thickness-normal"}switch(t.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed";break;default:L+=" edge-pattern-solid"}let g,C=k==="rounded"?Yt(Bt(h,t),5):V(h),_=Array.isArray(t.style)?t.style:[t.style],H=_.find(S=>S?.startsWith("stroke:")),$="";t.animate&&($="edge-animation-fast"),t.animation&&($="edge-animation-"+t.animation);let tt=!1;if(t.look==="handDrawn"){let S=yt.svg(r);Object.assign([],h);let z=S.path(C,{roughness:.3,seed:l});L+=" transition",g=v(z).select("path").attr("id",t.id).attr("class"," "+L+(t.classes?" "+t.classes:"")+($?" "+$:"")).attr("style",_?_.reduce((U,q)=>U+";"+q,""):"");let A=g.attr("d");g.attr("d",A),r.node().appendChild(g.node())}else{let S=d.join(";"),z=_?_.reduce((I,X)=>I+X+";",""):"",A=(S?S+";"+z+";":z)+";"+(_?_.reduce((I,X)=>I+";"+X,""):"");g=r.append("path").attr("d",C).attr("id",t.id).attr("class"," "+L+(t.classes?" "+t.classes:"")+($?" "+$:"")).attr("style",A),H=A.match(/stroke:([^;]+)/)?.[1],tt=t.animate===!0||!!t.animation||S.includes("animation");let U=g.node(),q=typeof U.getTotalLength=="function"?U.getTotalLength():0,G=K[t.arrowTypeStart]||0,D=K[t.arrowTypeEnd]||0;if(t.look==="neo"&&!tt){let X=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Xt(q,G,D):`0 ${G} ${q-G-D} ${D}`}; stroke-dashoffset: 0;`;g.attr("style",X+g.attr("style"))}}g.attr("data-edge",!0),g.attr("data-et","edge"),g.attr("data-id",t.id),g.attr("data-points",x),t.showPoints&&h.forEach(S=>{r.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",S.x).attr("cy",S.y)});let R="";(E().flowchart.arrowMarkerAbsolute||E().state.arrowMarkerAbsolute)&&(R=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,R=R.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),b.info("arrowTypeStart",t.arrowTypeStart),b.info("arrowTypeEnd",t.arrowTypeEnd),bt(g,t,R,e,n,H);let Lt=Math.floor(c.length/2),St=c[Lt];O.isLabelCoordinateInPath(St,g.attr("d"))||(m=!0);let j={};return m&&(j.updatedPath=c),j.originalPath=t.points,j},"insertEdge");function Yt(r,t){if(r.length<2)return"";let a="",n=r.length,i=1e-5;for(let s=0;s<n;s++){let e=r[s],o=r[s-1],l=r[s+1];if(s===0)a+=`M${e.x},${e.y}`;else if(s===n-1)a+=`L${e.x},${e.y}`;else{let c=e.x-o.x,m=e.y-o.y,y=l.x-e.x,f=l.y-e.y,d=Math.hypot(c,m),x=Math.hypot(y,f);if(d<i||x<i){a+=`L${e.x},${e.y}`;continue}let h=c/d,k=m/d,u=y/x,M=f/x,Z=h*u+k*M,V=Math.max(-1,Math.min(1,Z)),L=Math.acos(V);if(L<i||Math.abs(Math.PI-L)<i){a+=`L${e.x},${e.y}`;continue}let g=Math.min(t/Math.sin(L/2),d/2,x/2),C=e.x-h*g,_=e.y-k*g,H=e.x+u*g,$=e.y+M*g;a+=`L${C},${_}`,a+=`Q${e.x},${e.y} ${H},${$}`}}return a}p(Yt,"generateRoundedPath");function Mt(r,t){if(!r||!t)return{angle:0,deltaX:0,deltaY:0};let a=t.x-r.x,n=t.y-r.y;return{angle:Math.atan2(n,a),deltaX:a,deltaY:n}}p(Mt,"calculateDeltaAndAngle");function Bt(r,t){let a=r.map(i=>({...i}));if(r.length>=2&&B[t.arrowTypeStart]){let i=B[t.arrowTypeStart],s=r[0],e=r[1],{angle:o}=Mt(s,e),l=i*Math.cos(o),c=i*Math.sin(o);a[0].x=s.x+l,a[0].y=s.y+c}let n=r.length;if(n>=2&&B[t.arrowTypeEnd]){let i=B[t.arrowTypeEnd],s=r[n-1],e=r[n-2],{angle:o}=Mt(e,s),l=i*Math.cos(o),c=i*Math.sin(o);a[n-1].x=s.x-l,a[n-1].y=s.y-c}return a}p(Bt,"applyMarkerOffsetsToPoints");var Wt=p((r,t,a,n)=>{t.forEach(i=>{Dt[i](r,a,n)})},"insertMarkers"),Ct=p((r,t,a)=>{b.trace("Making markers for ",a),r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+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"),Ht=p((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+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"),Rt=p((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+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"),zt=p((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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"),r.append("defs").append("marker").attr("id",a+"_"+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"),At=p((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+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("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),r.append("defs").append("marker").attr("id",a+"_"+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("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Ut=p((r,t,a)=>{r.append("marker").attr("id",a+"_"+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"),r.append("marker").attr("id",a+"_"+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"),qt=p((r,t,a)=>{r.append("marker").attr("id",a+"_"+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"),r.append("marker").attr("id",a+"_"+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"),It=p((r,t,a)=>{r.append("marker").attr("id",a+"_"+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"),r.append("marker").attr("id",a+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).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")},"cross"),Nt=p((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Qt=p((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),r.append("defs").append("marker").attr("id",a+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),Pt=p((r,t,a)=>{let n=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18");let i=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),i.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Zt=p((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),r.append("defs").append("marker").attr("id",a+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Vt=p((r,t,a)=>{let n=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");let i=r.append("defs").append("marker").attr("id",a+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),i.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),jt=p((r,t,a)=>{r.append("defs").append("marker").attr("id",a+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
L20,10
M20,10
L0,20`)},"requirement_arrow"),Gt=p((r,t,a)=>{let n=r.append("defs").append("marker").attr("id",a+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Dt={extension:Ct,composition:Ht,aggregation:Rt,dependency:zt,lollipop:At,point:Ut,circle:qt,cross:It,barb:Nt,only_one:Qt,zero_or_one:Pt,one_or_more:Zt,zero_or_more:Vt,requirement_arrow:jt,requirement_contains:Gt},gr=Wt;export{hr as a,mr as b,yr as c,kr as d,gr as e};