UNPKG

ranui

Version:

A framework-agnostic Web Components UI library built on native custom elements, with TypeScript types, light/dark theming, SSR and PWA support.

631 lines (630 loc) 41.4 kB
import { n as d } from "./chunk-Y2CYZVJY-0JxdZxki.js"; import { m as y, p as Y } from "./src-DtRLxcYO.js"; import { T as ot, b as X, x as H } from "./chunk-WYO6CB5R-DDHkKowO.js"; import { $ as kt, J as mt, K as ut, Q as yt, X as gt, Y as xt, Z as bt, et as rt, g as C, nt as wt, q as Mt, rt as G, tt as Lt, u as _t } from "./chunk-ICXQ74PX-DR8rL-xF.js"; import { t as St } from "./line-BIPmUVxO.js"; import { n as Ot } from "./chunk-Q4XR5HBZ-3BHjjc9u.js"; import { i as at, n as $t, r as I, t as A } from "./chunk-7BUUIJ7U-9hiBbc7O.js"; import { n as Et } from "./chunk-OGEWGWER-BV51ll2w.js"; import { i as Ut, n as vt } from "./chunk-C7G6YPKG-CA-DNpvI.js"; import { t as Wt } from "./rough.esm-BWe9E0Nz.js"; import { r as V } from "./chunk-ZGVPDNZ5-6uMbTJXy.js"; var Xt = /* @__PURE__ */ d((r, t, a, e, n, s = !1, o) => { t.arrowTypeStart && et(r, "start", t.arrowTypeStart, a, e, n, s, o), t.arrowTypeEnd && et(r, "end", t.arrowTypeEnd, a, e, n, s, o); }, "addEdgeMarkers"), Yt = { arrow_cross: { type: "cross", fill: !1 }, arrow_point: { type: "point", fill: !0 }, arrow_barb: { type: "barb", fill: !0 }, arrow_barb_neo: { 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 } }, Ht = [ "cross", "point", "circle", "lollipop", "aggregation", "extension", "composition", "dependency", "barb" ], et = /* @__PURE__ */ d((r, t, a, e, n, s, o = !1, i) => { const f = Yt[a], k = f && Ht.includes(f.type); if (!f) { y.warn(`Unknown arrow type: ${a}`); return; } const l = `${n}_${s}-${f.type}${t === "start" ? "Start" : "End"}${o && k ? "-margin" : ""}`; if (i && i.trim() !== "") { const p = `${l}_${i.replace(/[^\dA-Za-z]/g, "_")}`; if (!document.getElementById(p)) { const c = document.getElementById(l); if (c) { const h = c.cloneNode(!0); h.id = p, h.querySelectorAll("path, circle, line").forEach((m) => { m.setAttribute("stroke", i), f.fill && m.setAttribute("fill", i); }), c.parentNode?.appendChild(h); } } r.attr(`marker-${t}`, `url(${e}#${p})`); } else r.attr(`marker-${t}`, `url(${e}#${l})`); }, "addEdgeMarker"), Tt = /* @__PURE__ */ d((r) => typeof r == "string" ? r : H()?.flowchart?.curve, "resolveEdgeCurveType"), j = /* @__PURE__ */ new Map(), L = /* @__PURE__ */ new Map(), tr = /* @__PURE__ */ d(() => { j.clear(), L.clear(); }, "clear"), P = /* @__PURE__ */ d((r) => r ? typeof r == "string" ? r : r.reduce((t, a) => t + ";" + a, "") : "", "getLabelStyles"), rr = /* @__PURE__ */ d(async (r, t) => { const a = H(); let e = ot(a); const { labelStyles: n } = Ut(t); t.labelStyle = n; const s = r.insert("g").attr("class", "edgeLabel"), o = s.insert("g").attr("class", "label").attr("data-id", t.id), i = t.labelType === "markdown", f = await Ot(r, t.label, { style: P(t.labelStyle), useHtmlLabels: e, addSvgBackground: !0, isNode: !1, markdown: i, width: void 0 }, a); o.node().appendChild(f), y.info("abc82", t, t.labelType); let k = f.getBBox(), l = k; if (e) { const c = f.children[0], h = Y(f); k = c.getBoundingClientRect(), l = k, h.attr("width", k.width), h.attr("height", k.height); } else { const c = Y(f).select("text").node(); c && typeof c.getBBox == "function" && (l = c.getBBox()); } o.attr("transform", A(l, e)), j.set(t.id, s), t.width = k.width, t.height = k.height; let p; if (t.startLabelLeft) { const c = r.insert("g").attr("class", "edgeTerminals"), h = c.insert("g").attr("class", "inner"), m = await V(h, t.startLabelLeft, P(t.labelStyle) || "", !1, !1); p = m; let u = m.getBBox(); if (e) { const w = m.children[0], x = Y(m); u = w.getBoundingClientRect(), x.attr("width", u.width), x.attr("height", u.height); } h.attr("transform", A(u, e)), L.get(t.id) || L.set(t.id, {}), L.get(t.id).startLeft = c, Q(p, t.startLabelLeft); } if (t.startLabelRight) { const c = r.insert("g").attr("class", "edgeTerminals"), h = c.insert("g").attr("class", "inner"), m = await V(h, t.startLabelRight, P(t.labelStyle) || "", !1, !1); p = m; let u = m.getBBox(); if (e) { const w = m.children[0], x = Y(m); u = w.getBoundingClientRect(), x.attr("width", u.width), x.attr("height", u.height); } h.attr("transform", A(u, e)), L.get(t.id) || L.set(t.id, {}), L.get(t.id).startRight = c, Q(p, t.startLabelRight); } if (t.endLabelLeft) { const c = r.insert("g").attr("class", "edgeTerminals"), h = c.insert("g").attr("class", "inner"), m = await V(c, t.endLabelLeft, P(t.labelStyle) || "", !1, !1); p = m; let u = m.getBBox(); if (e) { const w = m.children[0], x = Y(m); u = w.getBoundingClientRect(), x.attr("width", u.width), x.attr("height", u.height); } h.attr("transform", A(u, e)), L.get(t.id) || L.set(t.id, {}), L.get(t.id).endLeft = c, Q(p, t.endLabelLeft); } if (t.endLabelRight) { const c = r.insert("g").attr("class", "edgeTerminals"), h = c.insert("g").attr("class", "inner"), m = await V(c, t.endLabelRight, P(t.labelStyle) || "", !1, !1); p = m; let u = m.getBBox(); if (e) { const w = m.children[0], x = Y(m); u = w.getBoundingClientRect(), x.attr("width", u.width), x.attr("height", u.height); } h.attr("transform", A(u, e)), L.get(t.id) || L.set(t.id, {}), L.get(t.id).endRight = c, Q(p, t.endLabelRight); } return f; }, "insertEdgeLabel"); function Q(r, t) { ot(H()) && r && (r.style.width = t.length * 9 + "px", r.style.height = "12px"); } d(Q, "setTerminalWidth"); var ar = /* @__PURE__ */ d((r, t) => { y.debug("Moving label abc88 ", r.id, r.label, j.get(r.id), t); let a = t.updatedPath ? t.updatedPath : t.originalPath; const { subGraphTitleTotalMargin: e } = Et(H()); if (r.label) { const n = j.get(r.id); let s = r.x, o = r.y; if (a) { const i = C.calcLabelPosition(a); y.debug("Moving label " + r.label + " from (", s, ",", o, ") to (", i.x, ",", i.y, ") abc88"), t.updatedPath && (s = i.x, o = i.y); } n.attr("transform", `translate(${s}, ${o + e / 2})`); } if (r.startLabelLeft) { const n = L.get(r.id).startLeft; let s = r.x, o = r.y; if (a) { const i = C.calcTerminalLabelPosition(r.arrowTypeStart ? 10 : 0, "start_left", a); s = i.x, o = i.y; } n.attr("transform", `translate(${s}, ${o})`); } if (r.startLabelRight) { const n = L.get(r.id).startRight; let s = r.x, o = r.y; if (a) { const i = C.calcTerminalLabelPosition(r.arrowTypeStart ? 10 : 0, "start_right", a); s = i.x, o = i.y; } n.attr("transform", `translate(${s}, ${o})`); } if (r.endLabelLeft) { const n = L.get(r.id).endLeft; let s = r.x, o = r.y; if (a) { const i = C.calcTerminalLabelPosition(r.arrowTypeEnd ? 10 : 0, "end_left", a); s = i.x, o = i.y; } n.attr("transform", `translate(${s}, ${o})`); } if (r.endLabelRight) { const n = L.get(r.id).endRight; let s = r.x, o = r.y; if (a) { const i = C.calcTerminalLabelPosition(r.arrowTypeEnd ? 10 : 0, "end_right", a); s = i.x, o = i.y; } n.attr("transform", `translate(${s}, ${o})`); } }, "positionEdgeLabel"), Bt = /* @__PURE__ */ d((r, t) => { if (!r?.isLabelEdge || !r?.id?.endsWith("-to-label") || !Array.isArray(t) || t.length !== 2) return t; const [a, e] = t, n = Math.abs(e.x - a.x), s = Math.abs(e.y - a.y); return n < 1e-3 || s < 1e-3 ? t : s >= n ? [ a, { x: a.x, y: e.y }, e ] : [ a, { x: e.x, y: a.y }, e ]; }, "orthogonalizeToLabelClippedPoints"), zt = /* @__PURE__ */ d((r, t) => { const a = r.x, e = r.y, n = Math.abs(t.x - a), s = Math.abs(t.y - e), o = r.width / 2, i = r.height / 2; return n >= o || s >= i; }, "outsideNode"), Ct = /* @__PURE__ */ d((r, t, a) => { y.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}`); const e = r.x, n = r.y, s = Math.abs(e - a.x), o = r.width / 2; let i = a.x < t.x ? o - s : o + s; const f = r.height / 2, k = Math.abs(t.y - a.y), l = Math.abs(t.x - a.x); if (Math.abs(n - t.y) * o > Math.abs(e - t.x) * f) { let p = a.y < t.y ? t.y - f - n : n - f - t.y; i = l * p / k; const c = { x: a.x < t.x ? a.x + i : a.x - l + i, y: a.y < t.y ? a.y + k - p : a.y - k + p }; return i === 0 && (c.x = t.x, c.y = t.y), l === 0 && (c.x = t.x), k === 0 && (c.y = t.y), y.debug(`abc89 top/bottom calc, Q ${k}, q ${p}, R ${l}, r ${i}`, c), c; } else { a.x < t.x ? i = t.x - o - e : i = e - o - t.x; let p = k * i / l, c = a.x < t.x ? a.x + l - i : a.x - l + i, h = a.y < t.y ? a.y + p : a.y - p; return y.debug(`sides calc abc89, Q ${k}, q ${p}, R ${l}, r ${i}`, { _x: c, _y: h }), i === 0 && (c = t.x, h = t.y), l === 0 && (c = t.x), k === 0 && (h = t.y), { x: c, y: h }; } }, "intersection"), nt = /* @__PURE__ */ d((r, t) => { y.warn("abc88 cutPathAtIntersect", r, t); let a = [], e = r[0], n = !1; return r.forEach((s) => { if (y.info("abc88 checking point", s, t), !zt(t, s) && !n) { const o = Ct(t, e, s); y.debug("abc88 inside", s, e, o), y.debug("abc88 intersection", o, t); let i = !1; a.forEach((f) => { i = i || f.x === o.x && f.y === o.y; }), a.some((f) => f.x === o.x && f.y === o.y) ? y.warn("abc88 no intersect", o, a) : a.push(o), n = !0; } else y.warn("abc88 outside", s, e), e = s, n || a.push(s); }), y.debug("returning points", a), a; }, "cutPathAtIntersect"); function it(r) { const t = [], a = []; for (let e = 1; e < r.length - 1; e++) { const n = r[e - 1], s = r[e], o = r[e + 1]; (n.x === s.x && s.y === o.y && Math.abs(s.x - o.x) > 5 && Math.abs(s.y - n.y) > 5 || n.y === s.y && s.x === o.x && Math.abs(s.x - n.x) > 5 && Math.abs(s.y - o.y) > 5) && (t.push(s), a.push(e)); } return { cornerPoints: t, cornerPointPositions: a }; } d(it, "extractCornerPoints"); var st = /* @__PURE__ */ d(function(r, t, a) { const e = t.x - r.x, n = t.y - r.y, s = a / Math.sqrt(e * e + n * n); return { x: t.x - s * e, y: t.y - s * n }; }, "findAdjacentPoint"), Rt = /* @__PURE__ */ d(function(r) { const { cornerPointPositions: t } = it(r), a = []; for (let e = 0; e < r.length; e++) if (t.includes(e)) { const n = r[e - 1], s = r[e + 1], o = r[e], i = st(n, o, 5), f = st(s, o, 5), k = f.x - i.x, l = f.y - i.y; a.push(i); const p = Math.sqrt(2) * 2; let c = { x: o.x, y: o.y }; if (Math.abs(s.x - n.x) > 10 && Math.abs(s.y - n.y) >= 10) { y.debug("Corner point fixing", Math.abs(s.x - n.x), Math.abs(s.y - n.y)); const h = 5; o.x === i.x ? c = { x: k < 0 ? i.x - h + p : i.x + h - p, y: l < 0 ? i.y - p : i.y + p } : c = { x: k < 0 ? i.x - p : i.x + p, y: l < 0 ? i.y - h + p : i.y + h - p }; } else y.debug("Corner point skipping fixing", Math.abs(s.x - n.x), Math.abs(s.y - n.y)); a.push(c, f); } else a.push(r[e]); return a; }, "fixCorners"), qt = /* @__PURE__ */ d((r, t, a) => { const e = r - t - a, n = 2, s = 2, o = Math.floor(e / 4); return `0 ${t} ${Array(o).fill(`${n} ${s}`).join(" ")} ${a}`; }, "generateDashArray"), er = /* @__PURE__ */ d(function(r, t, a, e, n, s, o, i = !1) { if (!o) throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`); const { handDrawnSeed: f, layout: k } = H(); let l = t.points, p = !1; const c = n; var h = s; const m = []; for (const g in t.cssCompiledStyles) vt(g) || m.push(t.cssCompiledStyles[g]); if (k === "swimlane") { if (h.intersect && c.intersect && Array.isArray(l) && l.length >= 2) if (l.length === 2) l = [c.intersect(l[0]), h.intersect(l[1])]; else { const g = l.slice(1, -1), E = g[0], S = g[g.length - 1], O = 0.5, z = Math.abs(l[l.length - 1].x - S.x) < O && Math.abs(l[l.length - 1].y - S.y) < O, U = c.intersect(E), v = z ? S : h.intersect(S), W = Math.abs(v.x - S.x) < O && Math.abs(v.y - S.y) < O, q = Math.abs(U.x - E.x) < O && Math.abs(U.y - E.y) < O ? [] : [U], ft = W ? [] : [v]; l = [ ...q, ...g, ...ft ]; } l = Bt(t, l); } else h.intersect && c.intersect && !i && (l = l.slice(1, t.points.length - 1), l.unshift(c.intersect(l[0])), l.push(h.intersect(l[l.length - 1]))); const u = btoa(JSON.stringify(l)); t.toCluster && (y.info("to cluster abc88", a.get(t.toCluster)), l = nt(t.points, a.get(t.toCluster).node), p = !0), t.fromCluster && (y.debug("from cluster abc88", a.get(t.fromCluster), JSON.stringify(l, null, 2)), l = nt(l.reverse(), a.get(t.fromCluster).node).reverse(), p = !0); let w = l.filter((g) => !Number.isNaN(g.y)); const x = Tt(t.curve); x !== "rounded" && (w = Rt(w)); let b = G; switch (x) { case "linear": b = G; break; case "basis": b = rt; break; case "cardinal": b = kt; break; case "bumpX": b = Lt; break; case "bumpY": b = wt; break; case "catmullRom": b = yt; break; case "monotoneX": b = gt; break; case "monotoneY": b = bt; break; case "natural": b = xt; break; case "step": b = mt; break; case "stepAfter": b = ut; break; case "stepBefore": b = Mt; break; case "rounded": b = G; break; default: b = rt; } const { x: D, y: R } = $t(t), T = St().x(D).y(R).curve(b); let _; switch (t.thickness) { case "normal": _ = "edge-thickness-normal"; break; case "thick": _ = "edge-thickness-thick"; break; case "invisible": _ = "edge-thickness-invisible"; break; default: _ = "edge-thickness-normal"; } switch (t.pattern) { case "solid": _ += " edge-pattern-solid"; break; case "dotted": _ += " edge-pattern-dotted"; break; case "dashed": _ += " edge-pattern-dashed"; break; default: _ += " edge-pattern-solid"; } let M, Z = x === "rounded" ? lt(ct(w, t), 5) : T(w); const $ = Array.isArray(t.style) ? t.style : [t.style]; let tt = $.find((g) => g?.startsWith("stroke:")), B = ""; t.animate && (B = "edge-animation-fast"), t.animation && (B = "edge-animation-" + t.animation); let J = !1; if (t.look === "handDrawn") { const g = Wt.svg(r); Object.assign([], w); const E = g.path(Z, { roughness: 0.3, seed: f }); _ += " transition", M = Y(E).select("path").attr("id", `${o}-${t.id}`).attr("class", " " + _ + (t.classes ? " " + t.classes : "") + (B ? " " + B : "")).attr("style", $ ? $.reduce((O, z) => O + ";" + z, "") : ""); let S = M.attr("d"); M.attr("d", S), r.node().appendChild(M.node()); } else { const g = m.join(";"), E = $ ? $.reduce((W, q) => W + q + ";", "") : "", S = (g ? g + ";" + E + ";" : E) + ";" + ($ ? $.reduce((W, q) => W + ";" + q, "") : ""); M = r.append("path").attr("d", Z).attr("id", `${o}-${t.id}`).attr("class", " " + _ + (t.classes ? " " + t.classes : "") + (B ? " " + B : "")).attr("style", S), tt = S.match(/stroke:([^;]+)/)?.[1], J = t.animate === !0 || !!t.animation || g.includes("animation"); const O = M.node(), z = typeof O.getTotalLength == "function" ? O.getTotalLength() : 0, U = at[t.arrowTypeStart] || 0, v = at[t.arrowTypeEnd] || 0; if (t.look === "neo" && !J) { const W = `stroke-dasharray: ${t.pattern === "dotted" || t.pattern === "dashed" ? qt(z, U, v) : `0 ${U} ${z - U - v} ${v}`}; stroke-dashoffset: 0;`; M.attr("style", W + M.attr("style")); } } M.attr("data-edge", !0), M.attr("data-et", "edge"), M.attr("data-id", t.id), M.attr("data-points", u), M.attr("data-look", _t(t.look)), t.showPoints && w.forEach((g) => { r.append("circle").style("stroke", "red").style("fill", "red").attr("r", 1).attr("cx", g.x).attr("cy", g.y); }); let N = ""; (H().flowchart.arrowMarkerAbsolute || H().state.arrowMarkerAbsolute) && (N = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, N = N.replace(/\(/g, "\\(").replace(/\)/g, "\\)")), y.info("arrowTypeStart", t.arrowTypeStart), y.info("arrowTypeEnd", t.arrowTypeEnd); const dt = !J && t?.look === "neo"; Xt(M, t, N, o, e, dt, tt); const pt = Math.floor(l.length / 2), ht = l[pt]; C.isLabelCoordinateInPath(ht, M.attr("d")) || (p = !0); let F = {}; return p && (F.updatedPath = l), F.originalPath = t.points, F; }, "insertEdge"); function lt(r, t) { if (r.length < 2) return ""; let a = ""; const e = r.length, n = 1e-5; for (let s = 0; s < e; s++) { const o = r[s], i = r[s - 1], f = r[s + 1]; if (s === 0) a += `M${o.x},${o.y}`; else if (s === e - 1) a += `L${o.x},${o.y}`; else { const k = o.x - i.x, l = o.y - i.y, p = f.x - o.x, c = f.y - o.y, h = Math.hypot(k, l), m = Math.hypot(p, c); if (h < n || m < n) { a += `L${o.x},${o.y}`; continue; } const u = k / h, w = l / h, x = p / m, b = c / m, D = u * x + w * b, R = Math.acos(Math.max(-1, Math.min(1, D))); if (R < n || Math.abs(Math.PI - R) < n) { a += `L${o.x},${o.y}`; continue; } const T = Math.min(t / Math.sin(R / 2), h / 2, m / 2), _ = o.x - u * T, M = o.y - w * T, Z = o.x + x * T, $ = o.y + b * T; a += `L${_},${M}`, a += `Q${o.x},${o.y} ${Z},${$}`; } } return a; } d(lt, "generateRoundedPath"); function K(r, t) { if (!r || !t) return { angle: 0, deltaX: 0, deltaY: 0 }; const a = t.x - r.x, e = t.y - r.y; return { angle: Math.atan2(e, a), deltaX: a, deltaY: e }; } d(K, "calculateDeltaAndAngle"); function ct(r, t) { const a = r.map((n) => ({ ...n })); if (r.length >= 2 && I[t.arrowTypeStart]) { const n = I[t.arrowTypeStart], s = r[0], o = r[1], { angle: i } = K(s, o), f = n * Math.cos(i), k = n * Math.sin(i); a[0].x = s.x + f, a[0].y = s.y + k; } const e = r.length; if (e >= 2 && I[t.arrowTypeEnd]) { const n = I[t.arrowTypeEnd], s = r[e - 1], o = r[e - 2], { angle: i } = K(o, s), f = n * Math.cos(i), k = n * Math.sin(i); a[e - 1].x = s.x - f, a[e - 1].y = s.y - k; } return a; } d(ct, "applyMarkerOffsetsToPoints"); var At = /* @__PURE__ */ d((r, t, a, e) => { t.forEach((n) => { Pt[n](r, a, e); }); }, "insertMarkers"), Pt = { extension: /* @__PURE__ */ d((r, t, a) => { y.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", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").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"), r.append("marker").attr("id", a + "_" + t + "-extensionStart-margin").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").attr("viewBox", "0 0 20 14").append("polygon").attr("points", "10,7 18,13 18,1").style("stroke-width", 2).style("stroke-dasharray", "0"), r.append("defs").append("marker").attr("id", a + "_" + t + "-extensionEnd-margin").attr("class", "marker extension " + t).attr("refX", 9).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").attr("viewBox", "0 0 20 14").append("polygon").attr("points", "10,1 10,13 18,7").style("stroke-width", 2).style("stroke-dasharray", "0"); }, "extension"), composition: /* @__PURE__ */ d((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"), r.append("defs").append("marker").attr("id", a + "_" + t + "-compositionStart-margin").attr("class", "marker composition " + t).attr("refX", 15).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 0).attr("viewBox", "0 0 15 15").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), r.append("defs").append("marker").attr("id", a + "_" + t + "-compositionEnd-margin").attr("class", "marker composition " + t).attr("refX", 3.5).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 0).attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); }, "composition"), aggregation: /* @__PURE__ */ d((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"), r.append("defs").append("marker").attr("id", a + "_" + t + "-aggregationStart-margin").attr("class", "marker aggregation " + t).attr("refX", 15).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 2).attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), r.append("defs").append("marker").attr("id", a + "_" + t + "-aggregationEnd-margin").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 2).attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"); }, "aggregation"), dependency: /* @__PURE__ */ d((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"), r.append("defs").append("marker").attr("id", a + "_" + t + "-dependencyStart-margin").attr("class", "marker dependency " + t).attr("refX", 4).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 0).attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), r.append("defs").append("marker").attr("id", a + "_" + t + "-dependencyEnd-margin").attr("class", "marker dependency " + t).attr("refX", 16).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("path").style("stroke-width", 0).attr("d", "M 18,7 L9,13 L14,7 L9,1 Z"); }, "dependency"), lollipop: /* @__PURE__ */ d((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), r.append("defs").append("marker").attr("id", a + "_" + t + "-lollipopStart-margin").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("circle").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6).attr("stroke-width", 2), r.append("defs").append("marker").attr("id", a + "_" + t + "-lollipopEnd-margin").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").attr("markerUnits", "userSpaceOnUse").append("circle").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6).attr("stroke-width", 2); }, "lollipop"), point: /* @__PURE__ */ d((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"), r.append("marker").attr("id", a + "_" + t + "-pointEnd-margin").attr("class", "marker " + t).attr("viewBox", "0 0 11.5 14").attr("refX", 11.5).attr("refY", 7).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 10.5).attr("markerHeight", 14).attr("orient", "auto").append("path").attr("d", "M 0 0 L 11.5 7 L 0 14 z").attr("class", "arrowMarkerPath").style("stroke-width", 0).style("stroke-dasharray", "1,0"), r.append("marker").attr("id", a + "_" + t + "-pointStart-margin").attr("class", "marker " + t).attr("viewBox", "0 0 11.5 14").attr("refX", 1).attr("refY", 7).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11.5).attr("markerHeight", 14).attr("orient", "auto").append("polygon").attr("points", "0,7 11.5,14 11.5,0").attr("class", "arrowMarkerPath").style("stroke-width", 0).style("stroke-dasharray", "1,0"); }, "point"), circle: /* @__PURE__ */ d((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"), r.append("marker").attr("id", a + "_" + t + "-circleEnd-margin").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refY", 5).attr("refX", 12.25).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 14).attr("markerHeight", 14).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 0).style("stroke-dasharray", "1,0"), r.append("marker").attr("id", a + "_" + t + "-circleStart-margin").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -2).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 14).attr("markerHeight", 14).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 0).style("stroke-dasharray", "1,0"); }, "circle"), cross: /* @__PURE__ */ d((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"), r.append("marker").attr("id", a + "_" + t + "-crossEnd-margin").attr("class", "marker cross " + t).attr("viewBox", "0 0 15 15").attr("refX", 17.7).attr("refY", 7.5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 1,1 L 14,14 M 1,14 L 14,1").attr("class", "arrowMarkerPath").style("stroke-width", 2.5), r.append("marker").attr("id", a + "_" + t + "-crossStart-margin").attr("class", "marker cross " + t).attr("viewBox", "0 0 15 15").attr("refX", -3.5).attr("refY", 7.5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 1,1 L 14,14 M 1,14 L 14,1").attr("class", "arrowMarkerPath").style("stroke-width", 2.5).style("stroke-dasharray", "1,0"); }, "cross"), barb: /* @__PURE__ */ d((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"), barbNeo: /* @__PURE__ */ d((r, t, a) => { const { themeVariables: e } = X(), { transitionColor: n } = e; r.append("defs").append("marker").attr("id", a + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L11,14 L13,7 L11,0 Z"), r.append("defs").append("marker").attr("id", a + "_" + t + "-barbEnd-margin").attr("refX", 17).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M 19,7 L11,14 L13,7 L11,0 Z").attr("fill", `${n}`); }, "barbNeo"), only_one: /* @__PURE__ */ d((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"), zero_or_one: /* @__PURE__ */ d((r, t, a) => { const e = 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"); e.append("circle").attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6), e.append("path").attr("d", "M9,0 L9,18"); const n = 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"); n.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6), n.append("path").attr("d", "M21,0 L21,18"); }, "zero_or_one"), one_or_more: /* @__PURE__ */ d((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"), zero_or_more: /* @__PURE__ */ d((r, t, a) => { const e = 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"); e.append("circle").attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6), e.append("path").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18"); const n = 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"); n.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6), n.append("path").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18"); }, "zero_or_more"), only_one_neo: /* @__PURE__ */ d((r, t, a) => { const { themeVariables: e } = X(), { strokeWidth: n } = e; 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").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M9,0 L9,18 M15,0 L15,18").attr("stroke-width", `${n}`), 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").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M3,0 L3,18 M9,0 L9,18").attr("stroke-width", `${n}`); }, "only_one_neo"), zero_or_one_neo: /* @__PURE__ */ d((r, t, a) => { const { themeVariables: e } = X(), { strokeWidth: n, mainBkg: s } = e, o = 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").attr("markerUnits", "userSpaceOnUse"); o.append("circle").attr("fill", s ?? "white").attr("cx", 21).attr("cy", 9).attr("stroke-width", `${n}`).attr("r", 6), o.append("path").attr("d", "M9,0 L9,18").attr("stroke-width", `${n}`); const 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("markerUnits", "userSpaceOnUse").attr("orient", "auto"); i.append("circle").attr("fill", s ?? "white").attr("cx", 9).attr("cy", 9).attr("stroke-width", `${n}`).attr("r", 6), i.append("path").attr("d", "M21,0 L21,18").attr("stroke-width", `${n}`); }, "zero_or_one_neo"), one_or_more_neo: /* @__PURE__ */ d((r, t, a) => { const { themeVariables: e } = X(), { strokeWidth: n } = e; 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").attr("markerUnits", "userSpaceOnUse").append("path").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width", `${n}`), 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("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width", `${n}`); }, "one_or_more_neo"), zero_or_more_neo: /* @__PURE__ */ d((r, t, a) => { const { themeVariables: e } = X(), { strokeWidth: n, mainBkg: s } = e, o = 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("markerUnits", "userSpaceOnUse").attr("orient", "auto"); o.append("circle").attr("fill", s ?? "white").attr("cx", 45.5).attr("cy", 18).attr("r", 6).attr("stroke-width", `${n}`), o.append("path").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width", `${n}`); const 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").attr("markerUnits", "userSpaceOnUse"); i.append("circle").attr("fill", s ?? "white").attr("cx", 11).attr("cy", 18).attr("r", 6).attr("stroke-width", `${n}`), i.append("path").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width", `${n}`); }, "zero_or_more_neo"), requirement_arrow: /* @__PURE__ */ d((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"), requirement_contains: /* @__PURE__ */ d((r, t, a) => { const e = 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"); e.append("circle").attr("cx", 10).attr("cy", 10).attr("r", 9).attr("fill", "none"), e.append("line").attr("x1", 1).attr("x2", 19).attr("y1", 10).attr("y2", 10), e.append("line").attr("y1", 1).attr("y2", 19).attr("x1", 10).attr("x2", 10); }, "requirement_contains"), requirement_arrow_neo: /* @__PURE__ */ d((r, t, a) => { const { themeVariables: e } = X(), { strokeWidth: n } = e; 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").attr("markerUnits", "userSpaceOnUse").attr("stroke-width", `${n}`).attr("viewBox", "0 0 25 20").append("path").attr("d", `M0,0 L20,10 M20,10 L0,20`).attr("stroke-linejoin", "miter"); }, "requirement_arrow_neo"), requirement_contains_neo: /* @__PURE__ */ d((r, t, a) => { const { themeVariables: e } = X(), { strokeWidth: n } = e, s = 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").attr("markerUnits", "userSpaceOnUse").append("g"); s.append("circle").attr("cx", 10).attr("cy", 10).attr("r", 9).attr("fill", "none"), s.append("line").attr("x1", 1).attr("x2", 19).attr("y1", 10).attr("y2", 10), s.append("line").attr("y1", 1).attr("y2", 19).attr("x1", 10).attr("x2", 10), s.selectAll("*").attr("stroke-width", `${n}`); }, "requirement_contains_neo") }, nr = At; export { nr as a, rr as i, j as n, ar as o, er as r, L as s, tr as t };