likec4 1.57.0 → 1.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__app__/codegen/react.mjs +7 -8
- package/__app__/codegen/webcomponent.mjs +70 -881
- package/__app__/src/aichat/index.mjs +8 -1
- package/__app__/src/chunks/AIChat.mjs +959 -0
- package/__app__/src/chunks/DiagramActorProvider.mjs +7638 -0
- package/__app__/src/chunks/LikeC4Styles.mjs +1866 -0
- package/__app__/src/chunks/Markdown.mjs +146 -0
- package/__app__/src/chunks/NavigationPanel.mjs +61 -0
- package/__app__/src/chunks/ProjectsOverview.mjs +540 -0
- package/__app__/src/chunks/adhoc-editor.mjs +3386 -0
- package/__app__/src/chunks/es.mjs +439 -0
- package/__app__/src/chunks/hooks.mjs +145 -0
- package/__app__/src/chunks/libs/@dagrejs/dagre.mjs +1894 -0
- package/__app__/src/chunks/libs/@floating-ui.mjs +2218 -0
- package/__app__/src/chunks/libs/@mantine.mjs +12070 -0
- package/__app__/src/chunks/libs/@tabler/icons-react.mjs +252 -0
- package/__app__/src/chunks/libs/@tanstack-ai.mjs +1768 -0
- package/__app__/src/chunks/libs/@tanstack.mjs +2718 -0
- package/__app__/src/chunks/libs/@xstate/react.mjs +1982 -0
- package/__app__/src/chunks/libs/@xyflow/react.mjs +5256 -0
- package/__app__/src/chunks/libs/bezier-js.mjs +1003 -0
- package/__app__/src/chunks/libs/d3.mjs +2842 -0
- package/__app__/src/chunks/libs/fast-equals.mjs +268 -0
- package/__app__/src/chunks/libs/framer.mjs +5872 -0
- package/__app__/src/chunks/libs/remeda.mjs +642 -0
- package/__app__/src/chunks/libs/zod.mjs +3170 -0
- package/__app__/src/chunks/rolldown-runtime.mjs +23 -0
- package/__app__/src/chunks/styled-system.mjs +1040 -0
- package/__app__/src/fonts.css +1 -1
- package/__app__/src/main.mjs +14816 -14
- package/__app__/src/style.css +1 -1
- package/dist/chunks/enableServer.mjs +1 -1
- package/dist/chunks/filenames.mjs +2 -2
- package/dist/chunks/index2.d.mts +1877 -734
- package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
- package/dist/chunks/libs/@logtape/logtape.mjs +4 -3
- package/dist/chunks/libs/chevrotain-allstar.mjs +2 -2
- package/dist/chunks/libs/chevrotain.mjs +25 -25
- package/dist/chunks/libs/langium.mjs +1 -1
- package/dist/chunks/libs/merge-error-cause.mjs +1 -1
- package/dist/chunks/libs/pretty-ms.mjs +1 -1
- package/dist/chunks/libs/remeda.mjs +1 -1
- package/dist/chunks/libs/ufo.mjs +1 -1
- package/dist/chunks/libs/unstorage.mjs +1 -1
- package/dist/chunks/libs/which.mjs +1 -1
- package/dist/chunks/libs/zod.mjs +65 -0
- package/dist/chunks/node.mjs +73 -62
- package/dist/chunks/{plugin.mjs → vite-plugin.mjs} +41 -41
- package/dist/cli/index.mjs +184 -144
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/model/index.d.mts +1 -1
- package/dist/vite-plugin/index.mjs +1 -1
- package/dist/vite-plugin/internal/index.d.mts +52 -57
- package/dist/vite-plugin/internal/index.mjs +946 -1
- package/package.json +46 -47
- package/react/index.d.mts +92 -23
- package/react/index.mjs +44551 -42605
- package/__app__/chunks/AIChat2.mjs +0 -2
- package/__app__/chunks/DiagramActorProvider.mjs +0 -10
- package/__app__/chunks/EmbedPage.mjs +0 -1
- package/__app__/chunks/ExportPage.mjs +0 -2
- package/__app__/chunks/LikeC4Diagram.mjs +0 -19
- package/__app__/chunks/LikeC4Styles.mjs +0 -48
- package/__app__/chunks/Markdown.mjs +0 -1
- package/__app__/chunks/NavigationPanel.mjs +0 -1
- package/__app__/chunks/ViewReact.mjs +0 -1
- package/__app__/chunks/adhoc-editor.mjs +0 -1
- package/__app__/chunks/aichat.mjs +0 -1
- package/__app__/chunks/box.mjs +0 -1
- package/__app__/chunks/create-style-context.mjs +0 -1
- package/__app__/chunks/css.mjs +0 -1
- package/__app__/chunks/factory.mjs +0 -1
- package/__app__/chunks/hooks.mjs +0 -1
- package/__app__/chunks/hstack.mjs +0 -1
- package/__app__/chunks/libs/@dagrejs/dagre.mjs +0 -1
- package/__app__/chunks/libs/@floating-ui/core.mjs +0 -1
- package/__app__/chunks/libs/@floating-ui/dom.mjs +0 -1
- package/__app__/chunks/libs/@floating-ui/react.mjs +0 -1
- package/__app__/chunks/libs/@mantine/core.mjs +0 -41
- package/__app__/chunks/libs/@mantine/hooks.mjs +0 -1
- package/__app__/chunks/libs/@nanostores/react.mjs +0 -1
- package/__app__/chunks/libs/@react-hookz/web.mjs +0 -1
- package/__app__/chunks/libs/@tabler/icons-react.mjs +0 -358
- package/__app__/chunks/libs/@tanstack/ai-client.mjs +0 -2
- package/__app__/chunks/libs/@tanstack/ai-react-ui.mjs +0 -1
- package/__app__/chunks/libs/@tanstack/ai-react.mjs +0 -1
- package/__app__/chunks/libs/@tanstack/ai.mjs +0 -2
- package/__app__/chunks/libs/@tanstack/history.mjs +0 -1
- package/__app__/chunks/libs/@tanstack/react-router.mjs +0 -3
- package/__app__/chunks/libs/@tanstack/router-core.mjs +0 -1
- package/__app__/chunks/libs/@xstate/react.mjs +0 -1
- package/__app__/chunks/libs/@xstate/store.mjs +0 -1
- package/__app__/chunks/libs/@xyflow/react.mjs +0 -7
- package/__app__/chunks/libs/@zag-js/anatomy.mjs +0 -1
- package/__app__/chunks/libs/@zag-js/collection.mjs +0 -1
- package/__app__/chunks/libs/@zag-js/core.mjs +0 -1
- package/__app__/chunks/libs/@zag-js/react.mjs +0 -1
- package/__app__/chunks/libs/@zag-js/tree-view.mjs +0 -1
- package/__app__/chunks/libs/bezier-js.mjs +0 -1
- package/__app__/chunks/libs/copy-anything.mjs +0 -1
- package/__app__/chunks/libs/d3-path.mjs +0 -1
- package/__app__/chunks/libs/d3-shape.mjs +0 -1
- package/__app__/chunks/libs/fast-equals.mjs +0 -1
- package/__app__/chunks/libs/framer-motion.mjs +0 -9
- package/__app__/chunks/libs/html-to-image.mjs +0 -2
- package/__app__/chunks/libs/motion-dom.mjs +0 -1
- package/__app__/chunks/libs/nanostores.mjs +0 -1
- package/__app__/chunks/libs/react-error-boundary.mjs +0 -1
- package/__app__/chunks/libs/react-resizable-panels.mjs +0 -1
- package/__app__/chunks/libs/remeda.mjs +0 -1
- package/__app__/chunks/libs/superjson.mjs +0 -1
- package/__app__/chunks/libs/zod.mjs +0 -64
- package/__app__/chunks/rolldown-runtime.mjs +0 -1
- package/__app__/chunks/styles.css.mjs +0 -1
- package/__app__/chunks/txt.mjs +0 -1
- package/__app__/chunks/useLikeC4Project.mjs +0 -1
- package/__app__/src/pages/AdHocViewEditor.mjs +0 -1
- package/__app__/src/pages/EmbedPage.mjs +0 -1
- package/__app__/src/pages/ExportPage.mjs +0 -1
- package/__app__/src/pages/ProjectsOverview.mjs +0 -1
- package/__app__/src/pages/ViewAsD2.mjs +0 -1
- package/__app__/src/pages/ViewAsDot.mjs +0 -1
- package/__app__/src/pages/ViewAsMmd.mjs +0 -1
- package/__app__/src/pages/ViewAsPuml.mjs +0 -1
- package/__app__/src/pages/ViewEditor.mjs +0 -1
- package/__app__/src/pages/ViewReact.mjs +0 -1
- package/dist/chunks/libs/@chevrotain/utils.mjs +0 -1
- package/dist/chunks/libs/@hono/mcp.mjs +0 -70
- package/dist/chunks/libs/@hono/node-server.mjs +0 -1
- package/dist/chunks/libs/@logtape/logtape.d.mts +0 -1023
- package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +0 -12
- package/dist/chunks/libs/ajv.mjs +0 -1
- package/dist/chunks/libs/ansi-align.mjs +0 -2
- package/dist/chunks/libs/ansi-regex.mjs +0 -1
- package/dist/chunks/libs/ansi-styles.mjs +0 -1
- package/dist/chunks/libs/atomically.mjs +0 -1
- package/dist/chunks/libs/boxen.mjs +0 -22
- package/dist/chunks/libs/conf.mjs +0 -1
- package/dist/chunks/libs/defu.mjs +0 -1
- package/dist/chunks/libs/destr.mjs +0 -1
- package/dist/chunks/libs/find-up-simple.mjs +0 -1
- package/dist/chunks/libs/get-port.mjs +0 -1
- package/dist/chunks/libs/hono.mjs +0 -1
- package/dist/chunks/libs/is-docker.mjs +0 -1
- package/dist/chunks/libs/is-error-instance.mjs +0 -1
- package/dist/chunks/libs/is-inside-container.mjs +0 -1
- package/dist/chunks/libs/is-plain-obj.mjs +0 -1
- package/dist/chunks/libs/isexe.mjs +0 -1
- package/dist/chunks/libs/ky.mjs +0 -3
- package/dist/chunks/libs/p-debounce.mjs +0 -1
- package/dist/chunks/libs/p-limit.mjs +0 -1
- package/dist/chunks/libs/p-timeout.mjs +0 -1
- package/dist/chunks/libs/package-up.mjs +0 -1
- package/dist/chunks/libs/parse-ms.mjs +0 -1
- package/dist/chunks/libs/safe-stringify.mjs +0 -1
- package/dist/chunks/libs/strip-indent.mjs +0 -1
- package/dist/chunks/libs/tinyrainbow.mjs +0 -1
- package/dist/chunks/libs/ts-graphviz.mjs +0 -1
- package/dist/chunks/libs/unctx.mjs +0 -1
- package/dist/chunks/libs/vscode-languageserver.mjs +0 -1
- package/dist/chunks/libs/word-wrap.mjs +0 -12
- package/dist/vite-plugin/internal/chunks/libs/@nanostores/react.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/libs/birpc.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/libs/fast-equals.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/libs/nanostores.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/libs/remeda.mjs +0 -1
- package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +0 -1
|
@@ -0,0 +1,1866 @@
|
|
|
1
|
+
import { i as e } from "./rolldown-runtime.mjs";
|
|
2
|
+
import { C as t, H as n, K as r, M as i, N as a, V as o, W as s, h as c, v as l, y as u } from "./libs/remeda.mjs";
|
|
3
|
+
import { Dt as d, Mt as f, Nt as p, Ot as m, Zt as h, bt as g, h as _, jt as v, m as y, mt as b } from "./libs/@mantine.mjs";
|
|
4
|
+
import { E as x, M as S, N as C, c as w, d as T, f as E, g as D, h as O, l as k, u as A } from "./styled-system.mjs";
|
|
5
|
+
import { _ as j, c as M, d as N, i as P, l as F, m as I, p as L, v as R } from "./libs/@tabler/icons-react.mjs";
|
|
6
|
+
import { n as z, o as B, r as ee, t as te } from "./Markdown.mjs";
|
|
7
|
+
import { d as ne, f as re, h as V, i as H, m as ie, n as U, p as W, r as ae, t as oe, v as G } from "./libs/@xyflow/react.mjs";
|
|
8
|
+
import { n as se, t as K } from "./libs/fast-equals.mjs";
|
|
9
|
+
import { t as ce } from "./libs/bezier-js.mjs";
|
|
10
|
+
import { c as le, f as ue, n as de, r as fe, u as pe } from "./libs/framer.mjs";
|
|
11
|
+
import { createContext as q, forwardRef as J, memo as Y, useContext as me, useEffect as he, useMemo as ge, useRef as _e, useState as ve } from "react";
|
|
12
|
+
import { c as X } from "react/compiler-runtime";
|
|
13
|
+
import { Fragment as Z, jsx as Q, jsxs as $ } from "react/jsx-runtime";
|
|
14
|
+
import { extractStep as ye, invariant as be, isStepEdgeId as xe, nonexhaustive as Se } from "@likec4/core";
|
|
15
|
+
import { BBox as Ce, vector as we, vector as Te } from "@likec4/core/geometry";
|
|
16
|
+
import { invariant as Ee } from "@likec4/core/utils";
|
|
17
|
+
import { LikeC4Styles as De } from "@likec4/core/styles";
|
|
18
|
+
import { RichText as Oe, ensureSizes as ke } from "@likec4/core/types";
|
|
19
|
+
//#region ../diagram/src/context/IconRenderer.tsx
|
|
20
|
+
var Ae = q(null);
|
|
21
|
+
function IconRendererProvider(e) {
|
|
22
|
+
let t = X(5), { value: n, children: r } = e;
|
|
23
|
+
if (me(Ae)) {
|
|
24
|
+
let e;
|
|
25
|
+
return t[0] === r ? e = t[1] : (e = /* @__PURE__ */ Q(Z, { children: r }), t[0] = r, t[1] = e), e;
|
|
26
|
+
}
|
|
27
|
+
let i;
|
|
28
|
+
return t[2] !== r || t[3] !== n ? (i = /* @__PURE__ */ Q(Ae.Provider, {
|
|
29
|
+
value: n,
|
|
30
|
+
children: r
|
|
31
|
+
}), t[2] = r, t[3] = n, t[4] = i) : i = t[4], i;
|
|
32
|
+
}
|
|
33
|
+
function decodeSvgDataUrl(e) {
|
|
34
|
+
if (!e.startsWith("data:image/svg+xml")) return null;
|
|
35
|
+
try {
|
|
36
|
+
if (e.includes(";base64,")) {
|
|
37
|
+
let t = e.split(";base64,")[1];
|
|
38
|
+
if (t) return atob(t);
|
|
39
|
+
} else {
|
|
40
|
+
let t = e.split(",")[1];
|
|
41
|
+
if (t) return decodeURIComponent(t);
|
|
42
|
+
}
|
|
43
|
+
} catch {}
|
|
44
|
+
return null;
|
|
45
|
+
}
|
|
46
|
+
function IconRenderer({ element: e, className: t, style: n }) {
|
|
47
|
+
let r = me(Ae);
|
|
48
|
+
if (!e || !e.icon || e.icon === "none") return null;
|
|
49
|
+
let i;
|
|
50
|
+
switch (!0) {
|
|
51
|
+
case e.icon.startsWith("data:image/svg+xml"):
|
|
52
|
+
i = /* @__PURE__ */ Q(SvgDataUrlIcon, {
|
|
53
|
+
dataUrl: e.icon,
|
|
54
|
+
alt: e.title
|
|
55
|
+
});
|
|
56
|
+
break;
|
|
57
|
+
case e.icon.startsWith("http://"):
|
|
58
|
+
case e.icon.startsWith("https://"):
|
|
59
|
+
case e.icon.startsWith("data:image"):
|
|
60
|
+
i = /* @__PURE__ */ Q("img", {
|
|
61
|
+
src: e.icon,
|
|
62
|
+
alt: e.title
|
|
63
|
+
});
|
|
64
|
+
break;
|
|
65
|
+
case !!r:
|
|
66
|
+
i = /* @__PURE__ */ Q(r, { node: e });
|
|
67
|
+
break;
|
|
68
|
+
default:
|
|
69
|
+
i = null;
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
return i ? /* @__PURE__ */ Q("div", {
|
|
73
|
+
className: S(t, "likec4-element-icon"),
|
|
74
|
+
"data-likec4-icon": e.icon,
|
|
75
|
+
style: n,
|
|
76
|
+
children: i
|
|
77
|
+
}) : null;
|
|
78
|
+
}
|
|
79
|
+
var je = {
|
|
80
|
+
browser: j,
|
|
81
|
+
cylinder: I,
|
|
82
|
+
mobile: L,
|
|
83
|
+
person: P,
|
|
84
|
+
queue: M,
|
|
85
|
+
rectangle: F,
|
|
86
|
+
storage: I,
|
|
87
|
+
bucket: I,
|
|
88
|
+
document: N,
|
|
89
|
+
component: F
|
|
90
|
+
};
|
|
91
|
+
function IconOrShapeRenderer(e) {
|
|
92
|
+
let t = X(12), { element: n, className: r, style: i } = e;
|
|
93
|
+
if (!n.icon || n.icon === "none") {
|
|
94
|
+
let e = je[n.shape], a;
|
|
95
|
+
t[0] === r ? a = t[1] : (a = S(r, "likec4-shape-icon"), t[0] = r, t[1] = a);
|
|
96
|
+
let o;
|
|
97
|
+
t[2] === e ? o = t[3] : (o = /* @__PURE__ */ Q(e, {}), t[2] = e, t[3] = o);
|
|
98
|
+
let s;
|
|
99
|
+
return t[4] !== i || t[5] !== a || t[6] !== o ? (s = /* @__PURE__ */ Q("div", {
|
|
100
|
+
className: a,
|
|
101
|
+
style: i,
|
|
102
|
+
children: o
|
|
103
|
+
}), t[4] = i, t[5] = a, t[6] = o, t[7] = s) : s = t[7], s;
|
|
104
|
+
}
|
|
105
|
+
let a;
|
|
106
|
+
return t[8] !== r || t[9] !== n || t[10] !== i ? (a = /* @__PURE__ */ Q(IconRenderer, {
|
|
107
|
+
element: n,
|
|
108
|
+
className: r,
|
|
109
|
+
style: i
|
|
110
|
+
}), t[8] = r, t[9] = n, t[10] = i, t[11] = a) : a = t[11], a;
|
|
111
|
+
}
|
|
112
|
+
function SvgDataUrlIcon(e) {
|
|
113
|
+
let t = X(11), n, r;
|
|
114
|
+
t[0] === e ? (n = t[1], r = t[2]) : ({dataUrl: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
115
|
+
let i;
|
|
116
|
+
t[3] === n ? i = t[4] : (i = decodeSvgDataUrl(n), t[3] = n, t[4] = i);
|
|
117
|
+
let a = i;
|
|
118
|
+
if (!a) return null;
|
|
119
|
+
let o;
|
|
120
|
+
t[5] === Symbol.for("react.memo_cache_sentinel") ? (o = { display: "contents" }, t[5] = o) : o = t[5];
|
|
121
|
+
let s;
|
|
122
|
+
t[6] === a ? s = t[7] : (s = { __html: a }, t[6] = a, t[7] = s);
|
|
123
|
+
let c;
|
|
124
|
+
return t[8] !== r || t[9] !== s ? (c = /* @__PURE__ */ Q("span", {
|
|
125
|
+
...r,
|
|
126
|
+
style: o,
|
|
127
|
+
dangerouslySetInnerHTML: s
|
|
128
|
+
}), t[8] = r, t[9] = s, t[10] = c) : c = t[10], c;
|
|
129
|
+
}
|
|
130
|
+
//#endregion
|
|
131
|
+
//#region ../diagram/src/base/Background.tsx
|
|
132
|
+
function literalToEnum(e) {
|
|
133
|
+
switch (e) {
|
|
134
|
+
case "dots": return U.Dots;
|
|
135
|
+
case "lines": return U.Lines;
|
|
136
|
+
case "cross": return U.Cross;
|
|
137
|
+
default: Se(e);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
var compareProps = (e, t) => typeof e.background == "string" && typeof t.background == "string" ? e.background === t.background : K(e.background, t.background), Me = Y((e) => {
|
|
141
|
+
let t = X(6), { background: n } = e;
|
|
142
|
+
if (typeof n == "string") {
|
|
143
|
+
let e;
|
|
144
|
+
t[0] === n ? e = t[1] : (e = literalToEnum(n), t[0] = n, t[1] = e);
|
|
145
|
+
let r;
|
|
146
|
+
return t[2] === e ? r = t[3] : (r = /* @__PURE__ */ Q(oe, {
|
|
147
|
+
variant: e,
|
|
148
|
+
size: 2,
|
|
149
|
+
gap: 20
|
|
150
|
+
}), t[2] = e, t[3] = r), r;
|
|
151
|
+
}
|
|
152
|
+
let r;
|
|
153
|
+
return t[4] === n ? r = t[5] : (r = /* @__PURE__ */ Q(oe, { ...n }), t[4] = n, t[5] = r), r;
|
|
154
|
+
}, compareProps);
|
|
155
|
+
Me.displayName = "Background";
|
|
156
|
+
//#endregion
|
|
157
|
+
//#region ../diagram/src/hooks/useCallbackRef.ts
|
|
158
|
+
function useCallbackRef(e) {
|
|
159
|
+
let t = _e(e);
|
|
160
|
+
return t.current = e, ge(() => {
|
|
161
|
+
function callbackRef(...e) {
|
|
162
|
+
return t.current?.(...e);
|
|
163
|
+
}
|
|
164
|
+
return callbackRef;
|
|
165
|
+
}, []);
|
|
166
|
+
}
|
|
167
|
+
//#endregion
|
|
168
|
+
//#region ../diagram/src/hooks/useXYFlow.ts
|
|
169
|
+
function useXYFlow() {
|
|
170
|
+
return re();
|
|
171
|
+
}
|
|
172
|
+
function useXYStore(e, t) {
|
|
173
|
+
return W(useCallbackRef(e), t ?? se);
|
|
174
|
+
}
|
|
175
|
+
function useXYStoreApi() {
|
|
176
|
+
return ie();
|
|
177
|
+
}
|
|
178
|
+
function useCurrentZoomAtLeast(e) {
|
|
179
|
+
let t = X(2), t0;
|
|
180
|
+
return t[0] === e ? t0 = t[1] : (t0 = (t) => t.transform[2] >= e, t[0] = e, t[1] = t0), W(t0);
|
|
181
|
+
}
|
|
182
|
+
var selectZoom = (e) => e.transform[2] < .2;
|
|
183
|
+
function useIsZoomTooSmall() {
|
|
184
|
+
return W(selectZoom);
|
|
185
|
+
}
|
|
186
|
+
//#endregion
|
|
187
|
+
//#region ../diagram/src/utils/roundDpr.ts
|
|
188
|
+
function getDevicePixelRatio() {
|
|
189
|
+
let e = typeof window < "u" && typeof window.devicePixelRatio == "number" ? window.devicePixelRatio : 1;
|
|
190
|
+
return r(Math.floor(e), {
|
|
191
|
+
min: 1,
|
|
192
|
+
max: 4
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
var Ne;
|
|
196
|
+
function roundDpr(e) {
|
|
197
|
+
return Ne ??= getDevicePixelRatio(), Ne < 2 ? Math.round(e) : Math.round(e * Ne) / Ne;
|
|
198
|
+
}
|
|
199
|
+
//#endregion
|
|
200
|
+
//#region ../diagram/src/utils/xyflow.ts
|
|
201
|
+
function nodeToRect(e) {
|
|
202
|
+
return {
|
|
203
|
+
x: Math.trunc(e.internals.positionAbsolute.x),
|
|
204
|
+
y: Math.trunc(e.internals.positionAbsolute.y),
|
|
205
|
+
width: Math.round(e.measured?.width ?? e.width ?? e.initialWidth ?? 0),
|
|
206
|
+
height: Math.round(e.measured?.height ?? e.height ?? e.initialHeight ?? 0)
|
|
207
|
+
};
|
|
208
|
+
}
|
|
209
|
+
function getNodeCenter(e) {
|
|
210
|
+
let { width: t, height: n } = G(e), { x: r, y: i } = e.internals.positionAbsolute;
|
|
211
|
+
return {
|
|
212
|
+
x: Math.round(r + t / 2),
|
|
213
|
+
y: Math.round(i + n / 2)
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
function getNodeIntersectionFromCenterToPoint(e, t, n = 0) {
|
|
217
|
+
let { width: r, height: i } = e, a = Ce.center(e), o = we(t.x, t.y).subtract(a), s = (n + r / 2) / o.x, c = (n + i / 2) / o.y, l = Math.min(Math.abs(s), Math.abs(c));
|
|
218
|
+
return we(o).multiply(l).add(a).trunc().toObject();
|
|
219
|
+
}
|
|
220
|
+
function bezierControlPoints(e) {
|
|
221
|
+
let [t, ...r] = e;
|
|
222
|
+
Ee(t, "start should be defined");
|
|
223
|
+
let i = [];
|
|
224
|
+
for (; n(r, 3);) {
|
|
225
|
+
let [e, n, a, ...o] = r, s = new ce(t[0], t[1], e[0], e[1], n[0], n[1], a[0], a[1]), c = s.inflections();
|
|
226
|
+
c.length === 0 && c.push(.5), c.forEach((e) => {
|
|
227
|
+
let { x: t, y: n } = s.get(e);
|
|
228
|
+
i.push({
|
|
229
|
+
x: Math.trunc(t),
|
|
230
|
+
y: Math.trunc(n)
|
|
231
|
+
});
|
|
232
|
+
}), r = o, t = a;
|
|
233
|
+
}
|
|
234
|
+
return Ee(r.length === 0, "all points should be consumed"), Ee(n(i, 1), "at least one control point should be generated"), i;
|
|
235
|
+
}
|
|
236
|
+
function isSamePoint(e, t) {
|
|
237
|
+
if (e === t) return !0;
|
|
238
|
+
let [n, r] = i(e) ? e : [e.x, e.y], [a, o] = i(t) ? t : [t.x, t.y];
|
|
239
|
+
return Math.hypot(a - n, o - r) < 2.1;
|
|
240
|
+
}
|
|
241
|
+
function stopPropagation(e) {
|
|
242
|
+
e.nativeEvent.stopImmediatePropagation(), e.stopPropagation();
|
|
243
|
+
}
|
|
244
|
+
var printPoint = (e) => `${Math.trunc(e[0])},${Math.trunc(e[1])}`;
|
|
245
|
+
function bezierPath(e) {
|
|
246
|
+
let [t, ...r] = e;
|
|
247
|
+
Ee(t, "start should be defined");
|
|
248
|
+
let i = `M ${printPoint(t)}`;
|
|
249
|
+
for (; n(r, 3);) {
|
|
250
|
+
let [e, t, n, ...a] = r;
|
|
251
|
+
i += ` C ${printPoint(e)} ${printPoint(t)} ${printPoint(n)}`, r = a;
|
|
252
|
+
}
|
|
253
|
+
return Ee(r.length === 0, "all points should be consumed"), i;
|
|
254
|
+
}
|
|
255
|
+
function parsePadding(e, t) {
|
|
256
|
+
if (typeof e == "number") return Math.floor((t - t / (1 + e)) * .5);
|
|
257
|
+
if (typeof e == "string" && e.endsWith("px")) {
|
|
258
|
+
let t = parseFloat(e);
|
|
259
|
+
if (!Number.isNaN(t)) return Math.floor(t);
|
|
260
|
+
}
|
|
261
|
+
if (typeof e == "string" && e.endsWith("%")) {
|
|
262
|
+
let n = parseFloat(e);
|
|
263
|
+
if (!Number.isNaN(n)) return Math.floor(t * n * .01);
|
|
264
|
+
}
|
|
265
|
+
return console.error(`[React Flow] The padding value "${e}" is invalid. Please provide a number or a string with a valid unit (px or %).`), 0;
|
|
266
|
+
}
|
|
267
|
+
function parsePaddings(e, t, n) {
|
|
268
|
+
if (typeof e == "string" || typeof e == "number") {
|
|
269
|
+
let r = parsePadding(e, n), i = parsePadding(e, t);
|
|
270
|
+
return {
|
|
271
|
+
top: r,
|
|
272
|
+
right: i,
|
|
273
|
+
bottom: r,
|
|
274
|
+
left: i,
|
|
275
|
+
x: i * 2,
|
|
276
|
+
y: r * 2
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
if (typeof e == "object") {
|
|
280
|
+
let r = parsePadding(e.top ?? e.y ?? 0, n), i = parsePadding(e.bottom ?? e.y ?? 0, n), a = parsePadding(e.left ?? e.x ?? 0, t), o = parsePadding(e.right ?? e.x ?? 0, t);
|
|
281
|
+
return {
|
|
282
|
+
top: r,
|
|
283
|
+
right: o,
|
|
284
|
+
bottom: i,
|
|
285
|
+
left: a,
|
|
286
|
+
x: a + o,
|
|
287
|
+
y: r + i
|
|
288
|
+
};
|
|
289
|
+
}
|
|
290
|
+
return {
|
|
291
|
+
top: 0,
|
|
292
|
+
right: 0,
|
|
293
|
+
bottom: 0,
|
|
294
|
+
left: 0,
|
|
295
|
+
x: 0,
|
|
296
|
+
y: 0
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
//#endregion
|
|
300
|
+
//#region ../diagram/src/base/Base.ts
|
|
301
|
+
var _setDimmed = (e, t) => (e.data.dimmed ?? !1) === t ? e : {
|
|
302
|
+
...e,
|
|
303
|
+
data: {
|
|
304
|
+
...e.data,
|
|
305
|
+
dimmed: t
|
|
306
|
+
}
|
|
307
|
+
};
|
|
308
|
+
function setDimmed(e, t) {
|
|
309
|
+
return t === void 0 ? (t) => _setDimmed(t, e) : _setDimmed(e, t);
|
|
310
|
+
}
|
|
311
|
+
var _setHovered = (e, t) => (e.data.hovered ?? !1) === t ? e : {
|
|
312
|
+
...e,
|
|
313
|
+
data: {
|
|
314
|
+
...e.data,
|
|
315
|
+
hovered: t
|
|
316
|
+
}
|
|
317
|
+
};
|
|
318
|
+
function setHovered(e, t) {
|
|
319
|
+
return t === void 0 ? (t) => _setHovered(t, e) : _setHovered(e, t);
|
|
320
|
+
}
|
|
321
|
+
function _setData(e, t) {
|
|
322
|
+
return a(e.data, t) ? e : {
|
|
323
|
+
...e,
|
|
324
|
+
data: {
|
|
325
|
+
...e.data,
|
|
326
|
+
...t
|
|
327
|
+
}
|
|
328
|
+
};
|
|
329
|
+
}
|
|
330
|
+
function setData(e, t) {
|
|
331
|
+
return t === void 0 ? (t) => _setData(t, e) : _setData(e, t);
|
|
332
|
+
}
|
|
333
|
+
var Pe = {
|
|
334
|
+
setDimmed,
|
|
335
|
+
setHovered,
|
|
336
|
+
setData
|
|
337
|
+
}, Fe = {
|
|
338
|
+
Compound: 1,
|
|
339
|
+
Edge: 20,
|
|
340
|
+
EdgeLabel: 25,
|
|
341
|
+
Element: 20,
|
|
342
|
+
Max: 30
|
|
343
|
+
}, Ie = .05, Le = {
|
|
344
|
+
default: "16px",
|
|
345
|
+
withControls: {
|
|
346
|
+
top: "58px",
|
|
347
|
+
left: "16px",
|
|
348
|
+
right: "16px",
|
|
349
|
+
bottom: "16px"
|
|
350
|
+
}
|
|
351
|
+
};
|
|
352
|
+
//#endregion
|
|
353
|
+
//#region ../diagram/src/base/BaseXYFlow.tsx
|
|
354
|
+
function BaseXYFlow(e) {
|
|
355
|
+
let t = X(85), n, r, i, a, o, s, c, l, u, d, f, p, m, h, g, _, y, b, x, C, w, T;
|
|
356
|
+
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], s = t[6], c = t[7], l = t[8], u = t[9], d = t[10], f = t[11], p = t[12], m = t[13], h = t[14], g = t[15], _ = t[16], y = t[17], b = t[18], x = t[19], C = t[20], w = t[21], T = t[22]) : ({nodes: o, edges: a, onEdgesChange: l, onNodesChange: p, className: r, pannable: g, zoomable: _, nodesSelectable: y, nodesDraggable: b, background: x, children: n, colorMode: i, fitViewPadding: C, fitView: w, zoomOnDoubleClick: T, onViewportResize: m, onMoveEnd: u, onNodeMouseEnter: d, onNodeMouseLeave: f, onEdgeMouseEnter: s, onEdgeMouseLeave: c, ...h} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = s, t[7] = c, t[8] = l, t[9] = u, t[10] = d, t[11] = f, t[12] = p, t[13] = m, t[14] = h, t[15] = g, t[16] = _, t[17] = y, t[18] = b, t[19] = x, t[20] = C, t[21] = w, t[22] = T);
|
|
357
|
+
let E = g === void 0 ? !0 : g, D = _ === void 0 ? !0 : _, O = y === void 0 ? !0 : y, k = b === void 0 ? !1 : b, A = x === void 0 ? "dots" : x, j = C === void 0 ? 0 : C, M = w === void 0 ? !0 : w, N = T === void 0 ? !1 : T, P;
|
|
358
|
+
t[23] === j ? P = t[24] : (P = {
|
|
359
|
+
minZoom: Ie,
|
|
360
|
+
maxZoom: 1,
|
|
361
|
+
padding: j,
|
|
362
|
+
includeHiddenNodes: !1
|
|
363
|
+
}, t[23] = j, t[24] = P);
|
|
364
|
+
let F = P, I = A !== "transparent" && A !== "solid", L = useIsZoomTooSmall(), R = useXYStoreApi(), { colorScheme: z } = v();
|
|
365
|
+
i ||= z === "auto" ? "system" : z;
|
|
366
|
+
let B = i, ee = o, te = a, re = A === "transparent" && "bg-transparent", V;
|
|
367
|
+
t[25] !== r || t[26] !== re ? (V = S(re, r), t[25] = r, t[26] = re, t[27] = V) : V = t[27];
|
|
368
|
+
let H;
|
|
369
|
+
t[28] === L ? H = t[29] : (H = L && { "data-likec4-zoom-small": !0 }, t[28] = L, t[29] = H);
|
|
370
|
+
let ie = !E && D, U;
|
|
371
|
+
t[30] === D ? U = t[31] : (U = !D && { zoomActivationKeyCode: null }, t[30] = D, t[31] = U);
|
|
372
|
+
let W = D ? 3 : 1, ae = D ? Ie : 1, oe = D || E, G;
|
|
373
|
+
t[32] === E ? G = t[33] : (G = !E && {
|
|
374
|
+
panActivationKeyCode: null,
|
|
375
|
+
selectionKeyCode: null
|
|
376
|
+
}, t[32] = E, t[33] = G);
|
|
377
|
+
let se = k || O, K = p, ce = l, t25;
|
|
378
|
+
t[34] !== u || t[35] !== R ? (t25 = (e, t) => {
|
|
379
|
+
let { x: n, y: r, zoom: i } = t, a = roundDpr(n), o = roundDpr(r);
|
|
380
|
+
(n !== a || r !== o) && R.setState({ transform: [
|
|
381
|
+
a,
|
|
382
|
+
o,
|
|
383
|
+
i
|
|
384
|
+
] }), u?.(e, {
|
|
385
|
+
x: a,
|
|
386
|
+
y: o,
|
|
387
|
+
zoom: i
|
|
388
|
+
});
|
|
389
|
+
}, t[34] = u, t[35] = R, t[36] = t25) : t25 = t[36];
|
|
390
|
+
let le = useCallbackRef(t25), t27;
|
|
391
|
+
t[37] !== d || t[38] !== p ? (t27 = (e, t) => {
|
|
392
|
+
if (d) {
|
|
393
|
+
d(e, t);
|
|
394
|
+
return;
|
|
395
|
+
}
|
|
396
|
+
p([{
|
|
397
|
+
id: t.id,
|
|
398
|
+
type: "replace",
|
|
399
|
+
item: Pe.setHovered(t, !0)
|
|
400
|
+
}]);
|
|
401
|
+
}, t[37] = d, t[38] = p, t[39] = t27) : t27 = t[39];
|
|
402
|
+
let ue = useCallbackRef(t27), t29;
|
|
403
|
+
t[40] !== f || t[41] !== p ? (t29 = (e, t) => {
|
|
404
|
+
if (f) {
|
|
405
|
+
f(e, t);
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
p([{
|
|
409
|
+
id: t.id,
|
|
410
|
+
type: "replace",
|
|
411
|
+
item: Pe.setHovered(t, !1)
|
|
412
|
+
}]);
|
|
413
|
+
}, t[40] = f, t[41] = p, t[42] = t29) : t29 = t[42];
|
|
414
|
+
let de = useCallbackRef(t29), t31;
|
|
415
|
+
t[43] !== s || t[44] !== l ? (t31 = (e, t) => {
|
|
416
|
+
if (s) {
|
|
417
|
+
s(e, t);
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
l([{
|
|
421
|
+
id: t.id,
|
|
422
|
+
type: "replace",
|
|
423
|
+
item: Pe.setHovered(t, !0)
|
|
424
|
+
}]);
|
|
425
|
+
}, t[43] = s, t[44] = l, t[45] = t31) : t31 = t[45];
|
|
426
|
+
let fe = useCallbackRef(t31), t33;
|
|
427
|
+
t[46] !== c || t[47] !== l ? (t33 = (e, t) => {
|
|
428
|
+
if (c) {
|
|
429
|
+
c(e, t);
|
|
430
|
+
return;
|
|
431
|
+
}
|
|
432
|
+
l([{
|
|
433
|
+
id: t.id,
|
|
434
|
+
type: "replace",
|
|
435
|
+
item: Pe.setHovered(t, !1)
|
|
436
|
+
}]);
|
|
437
|
+
}, t[46] = c, t[47] = l, t[48] = t33) : t33 = t[48];
|
|
438
|
+
let pe = useCallbackRef(t33), q;
|
|
439
|
+
t[49] !== A || t[50] !== I ? (q = I && /* @__PURE__ */ Q(Me, { background: A }), t[49] = A, t[50] = I, t[51] = q) : q = t[51];
|
|
440
|
+
let J;
|
|
441
|
+
t[52] === m ? J = t[53] : (J = m && /* @__PURE__ */ Q(ViewportResizeHanlder, { onViewportResize: m }), t[52] = m, t[53] = J);
|
|
442
|
+
let Y;
|
|
443
|
+
return t[54] !== n || t[55] !== i || t[56] !== a || t[57] !== M || t[58] !== F || t[59] !== o || t[60] !== k || t[61] !== O || t[62] !== l || t[63] !== p || t[64] !== E || t[65] !== h || t[66] !== V || t[67] !== H || t[68] !== ie || t[69] !== U || t[70] !== W || t[71] !== ae || t[72] !== oe || t[73] !== G || t[74] !== se || t[75] !== le || t[76] !== ue || t[77] !== de || t[78] !== fe || t[79] !== pe || t[80] !== q || t[81] !== J || t[82] !== N || t[83] !== D ? (Y = /* @__PURE__ */ $(ne, {
|
|
444
|
+
colorMode: B,
|
|
445
|
+
nodes: ee,
|
|
446
|
+
edges: te,
|
|
447
|
+
className: V,
|
|
448
|
+
...H,
|
|
449
|
+
zoomOnPinch: D,
|
|
450
|
+
zoomOnScroll: ie,
|
|
451
|
+
...U,
|
|
452
|
+
zoomOnDoubleClick: N,
|
|
453
|
+
maxZoom: W,
|
|
454
|
+
minZoom: ae,
|
|
455
|
+
fitView: M,
|
|
456
|
+
fitViewOptions: F,
|
|
457
|
+
preventScrolling: oe,
|
|
458
|
+
defaultMarkerColor: "var(--xy-edge-stroke)",
|
|
459
|
+
noDragClassName: "nodrag",
|
|
460
|
+
noPanClassName: "nopan",
|
|
461
|
+
noWheelClassName: "nowheel",
|
|
462
|
+
panOnScroll: E,
|
|
463
|
+
panOnDrag: E,
|
|
464
|
+
...G,
|
|
465
|
+
elementsSelectable: O,
|
|
466
|
+
nodesFocusable: se,
|
|
467
|
+
edgesFocusable: !1,
|
|
468
|
+
nodesDraggable: k,
|
|
469
|
+
nodeDragThreshold: 4,
|
|
470
|
+
nodeClickDistance: 3,
|
|
471
|
+
paneClickDistance: 3,
|
|
472
|
+
elevateNodesOnSelect: !1,
|
|
473
|
+
selectNodesOnDrag: !1,
|
|
474
|
+
onNodesChange: K,
|
|
475
|
+
onEdgesChange: ce,
|
|
476
|
+
onMoveEnd: le,
|
|
477
|
+
onNodeMouseEnter: ue,
|
|
478
|
+
onNodeMouseLeave: de,
|
|
479
|
+
onEdgeMouseEnter: fe,
|
|
480
|
+
onEdgeMouseLeave: pe,
|
|
481
|
+
onNodeDoubleClick: stopPropagation,
|
|
482
|
+
onEdgeDoubleClick: stopPropagation,
|
|
483
|
+
...h,
|
|
484
|
+
children: [
|
|
485
|
+
q,
|
|
486
|
+
J,
|
|
487
|
+
n
|
|
488
|
+
]
|
|
489
|
+
}), t[54] = n, t[55] = i, t[56] = a, t[57] = M, t[58] = F, t[59] = o, t[60] = k, t[61] = O, t[62] = l, t[63] = p, t[64] = E, t[65] = h, t[66] = V, t[67] = H, t[68] = ie, t[69] = U, t[70] = W, t[71] = ae, t[72] = oe, t[73] = G, t[74] = se, t[75] = le, t[76] = ue, t[77] = de, t[78] = fe, t[79] = pe, t[80] = q, t[81] = J, t[82] = N, t[83] = D, t[84] = Y) : Y = t[84], Y;
|
|
490
|
+
}
|
|
491
|
+
var selectDimensions = ({ width: e, height: t }) => (e || 1) * (t || 1), ViewportResizeHanlder = (e) => {
|
|
492
|
+
let t = X(2), { onViewportResize: n } = e, r = W(selectDimensions), i;
|
|
493
|
+
return t[0] === r ? i = t[1] : (i = [r], t[0] = r, t[1] = i), B(n, i), null;
|
|
494
|
+
}, Re = q(null), ze = Re.Provider;
|
|
495
|
+
function useRootContainerContext() {
|
|
496
|
+
return me(Re);
|
|
497
|
+
}
|
|
498
|
+
function useRootContainer() {
|
|
499
|
+
let e = useRootContainerContext();
|
|
500
|
+
if (!e) throw Error("useRootContainer must be used within a RootContainer");
|
|
501
|
+
return e;
|
|
502
|
+
}
|
|
503
|
+
function useRootContainerRef() {
|
|
504
|
+
return useRootContainer().ref;
|
|
505
|
+
}
|
|
506
|
+
function useRootContainerElement() {
|
|
507
|
+
return useRootContainer().ref.current;
|
|
508
|
+
}
|
|
509
|
+
//#endregion
|
|
510
|
+
//#region ../diagram/src/components/RootContainer.tsx
|
|
511
|
+
function RootContainer(e) {
|
|
512
|
+
let t = X(18), { id: n, className: r, reduceGraphics: i, children: a } = e, o = i === void 0 ? !1 : i, s = _e(null), [c] = ve(_temp), l = z(c), u = `#${n}`, d;
|
|
513
|
+
t[0] !== c || t[1] !== n || t[2] !== o || t[3] !== u ? (d = {
|
|
514
|
+
id: n,
|
|
515
|
+
ref: s,
|
|
516
|
+
selector: u,
|
|
517
|
+
reducedGraphics: o,
|
|
518
|
+
$panning: c
|
|
519
|
+
}, t[0] = c, t[1] = n, t[2] = o, t[3] = u, t[4] = d) : d = t[4];
|
|
520
|
+
let f = d, p;
|
|
521
|
+
t[5] === r ? p = t[6] : (p = S("likec4-root", r), t[5] = r, t[6] = p);
|
|
522
|
+
let m;
|
|
523
|
+
t[7] === o ? m = t[8] : (m = o && { "data-likec4-reduced-graphics": !0 }, t[7] = o, t[8] = m);
|
|
524
|
+
let h;
|
|
525
|
+
t[9] !== a || t[10] !== f ? (h = /* @__PURE__ */ Q(ze, {
|
|
526
|
+
value: f,
|
|
527
|
+
children: a
|
|
528
|
+
}), t[9] = a, t[10] = f, t[11] = h) : h = t[11];
|
|
529
|
+
let g;
|
|
530
|
+
return t[12] !== n || t[13] !== l || t[14] !== p || t[15] !== m || t[16] !== h ? (g = /* @__PURE__ */ Q("div", {
|
|
531
|
+
id: n,
|
|
532
|
+
className: p,
|
|
533
|
+
ref: s,
|
|
534
|
+
"data-likec4-diagram-panning": l,
|
|
535
|
+
...m,
|
|
536
|
+
children: h
|
|
537
|
+
}), t[12] = n, t[13] = l, t[14] = p, t[15] = m, t[16] = h, t[17] = g) : g = t[17], g;
|
|
538
|
+
}
|
|
539
|
+
function _temp() {
|
|
540
|
+
return /* @__PURE__ */ ee(!1);
|
|
541
|
+
}
|
|
542
|
+
//#endregion
|
|
543
|
+
//#region ../diagram/src/context/DefaultMantineProvider.tsx
|
|
544
|
+
var Be = d({
|
|
545
|
+
autoContrast: !0,
|
|
546
|
+
primaryColor: "indigo",
|
|
547
|
+
cursorType: "pointer",
|
|
548
|
+
defaultRadius: "sm",
|
|
549
|
+
fontFamily: "var(--likec4-app-font, var(--likec4-app-font-default))",
|
|
550
|
+
headings: {
|
|
551
|
+
fontWeight: "medium",
|
|
552
|
+
sizes: {
|
|
553
|
+
h1: { fontWeight: "bold" },
|
|
554
|
+
h2: { fontWeight: "medium" }
|
|
555
|
+
}
|
|
556
|
+
},
|
|
557
|
+
fontSizes: {
|
|
558
|
+
xxs: "var(--font-sizes-xxs)",
|
|
559
|
+
xs: "var(--font-sizes-xs)",
|
|
560
|
+
sm: "var(--font-sizes-sm)",
|
|
561
|
+
md: "var(--font-sizes-md)",
|
|
562
|
+
lg: "var(--font-sizes-lg)",
|
|
563
|
+
xl: "var(--font-sizes-xl)"
|
|
564
|
+
},
|
|
565
|
+
spacing: {
|
|
566
|
+
xs: "var(--spacing-xs)",
|
|
567
|
+
sm: "var(--spacing-sm)",
|
|
568
|
+
md: "var(--spacing-md)",
|
|
569
|
+
lg: "var(--spacing-lg)",
|
|
570
|
+
xl: "var(--spacing-xl)"
|
|
571
|
+
},
|
|
572
|
+
components: {
|
|
573
|
+
SegmentedControl: y.extend({ vars: (e, t) => ({ root: { "--sc-font-size": e.fontSizes[t.fz ?? t.size] } }) }),
|
|
574
|
+
Portal: g.extend({ defaultProps: { reuseTargetNode: !0 } }),
|
|
575
|
+
Tooltip: _.extend({ defaultProps: { color: "dark" } })
|
|
576
|
+
}
|
|
577
|
+
});
|
|
578
|
+
function DefaultMantineProvider(e) {
|
|
579
|
+
let t = X(8), n, r, i;
|
|
580
|
+
t[0] === e ? (n = t[1], r = t[2], i = t[3]) : ({children: n, theme: i, ...r} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i);
|
|
581
|
+
let a = i ?? Be, o;
|
|
582
|
+
return t[4] !== n || t[5] !== r || t[6] !== a ? (o = /* @__PURE__ */ Q(m, {
|
|
583
|
+
defaultColorScheme: "auto",
|
|
584
|
+
theme: a,
|
|
585
|
+
...r,
|
|
586
|
+
children: n
|
|
587
|
+
}), t[4] = n, t[5] = r, t[6] = a, t[7] = o) : o = t[7], o;
|
|
588
|
+
}
|
|
589
|
+
//#endregion
|
|
590
|
+
//#region ../diagram/src/context/EnsureMantine.tsx
|
|
591
|
+
function EnsureMantine(e) {
|
|
592
|
+
let t = X(7), { children: n } = e, r = me(f), t1;
|
|
593
|
+
t[0] === r ? t1 = t[1] : (t1 = () => {
|
|
594
|
+
r || console.warn("LikeC4Diagram must be a child of MantineProvider");
|
|
595
|
+
}, t[0] = r, t[1] = t1);
|
|
596
|
+
let i;
|
|
597
|
+
if (t[2] === Symbol.for("react.memo_cache_sentinel") ? (i = [], t[2] = i) : i = t[2], he(t1, i), !r) {
|
|
598
|
+
let e;
|
|
599
|
+
return t[3] === n ? e = t[4] : (e = /* @__PURE__ */ Q(DefaultMantineProvider, { children: n }), t[3] = n, t[4] = e), e;
|
|
600
|
+
}
|
|
601
|
+
let a;
|
|
602
|
+
return t[5] === n ? a = t[6] : (a = /* @__PURE__ */ Q(Z, { children: n }), t[5] = n, t[6] = a), a;
|
|
603
|
+
}
|
|
604
|
+
//#endregion
|
|
605
|
+
//#region ../diagram/src/context/FramerMotionConfig.tsx
|
|
606
|
+
function FramerMotionConfig(e) {
|
|
607
|
+
let t = X(6), { reducedMotion: n, children: r } = e, i = n === void 0 ? "user" : n, a = p()?.(), o;
|
|
608
|
+
t[0] === a ? o = t[1] : (o = a && { nonce: a }, t[0] = a, t[1] = o);
|
|
609
|
+
let s;
|
|
610
|
+
return t[2] !== r || t[3] !== i || t[4] !== o ? (s = /* @__PURE__ */ Q(ue, {
|
|
611
|
+
features: le,
|
|
612
|
+
strict: !0,
|
|
613
|
+
children: /* @__PURE__ */ Q(pe, {
|
|
614
|
+
reducedMotion: i,
|
|
615
|
+
...o,
|
|
616
|
+
children: r
|
|
617
|
+
})
|
|
618
|
+
}), t[2] = r, t[3] = i, t[4] = o, t[5] = s) : s = t[5], s;
|
|
619
|
+
}
|
|
620
|
+
//#endregion
|
|
621
|
+
//#region ../diagram/src/context/LikeC4ModelContext.tsx
|
|
622
|
+
var Ve = q(null), He = Ve.Provider, Ue = q(null), We = Ue.Provider;
|
|
623
|
+
function useOptionalLikeC4Model() {
|
|
624
|
+
return me(Ve);
|
|
625
|
+
}
|
|
626
|
+
function useOptionalCurrentViewModel() {
|
|
627
|
+
return me(Ue);
|
|
628
|
+
}
|
|
629
|
+
//#endregion
|
|
630
|
+
//#region ../diagram/src/hooks/useId.ts
|
|
631
|
+
function useId$1() {
|
|
632
|
+
let e = X(2), t = h(), n;
|
|
633
|
+
return e[0] === t ? n = e[1] : (n = t.replace("mantine-", "likec4-"), e[0] = t, e[1] = n), n;
|
|
634
|
+
}
|
|
635
|
+
e(useId$1, "useId");
|
|
636
|
+
//#endregion
|
|
637
|
+
//#region ../diagram/src/hooks/useLikeC4Styles.ts
|
|
638
|
+
function useLikeC4Styles() {
|
|
639
|
+
return useOptionalLikeC4Model()?.$styles ?? De.DEFAULT;
|
|
640
|
+
}
|
|
641
|
+
//#endregion
|
|
642
|
+
//#region ../diagram/src/utils/view-bounds.ts
|
|
643
|
+
function pickViewBounds(e, t) {
|
|
644
|
+
if (e._type === "dynamic") try {
|
|
645
|
+
if ((t ?? e.variant) === "sequence") return be(e.sequenceLayout, "Sequence layout is not available"), be(e.sequenceLayout.bounds, "Sequence layout bounds are not available"), e.sequenceLayout.bounds;
|
|
646
|
+
} catch (e) {
|
|
647
|
+
console.error(e);
|
|
648
|
+
}
|
|
649
|
+
return e.bounds;
|
|
650
|
+
}
|
|
651
|
+
function calcEdgeBounds({ points: e, controlPoints: t, labelBBox: n }) {
|
|
652
|
+
let r = Infinity, i = Infinity, a = -Infinity, o = -Infinity;
|
|
653
|
+
if (t) for (let e of t) r = Math.min(r, e.x), i = Math.min(i, e.y), a = Math.max(a, e.x), o = Math.max(o, e.y);
|
|
654
|
+
else for (let [t, n] of e) r = Math.min(r, t), i = Math.min(i, n), a = Math.max(a, t), o = Math.max(o, n);
|
|
655
|
+
return n && (r = Math.min(r, n.x), i = Math.min(i, n.y), a = Math.max(a, n.x + n.width), o = Math.max(o, n.y + n.height)), {
|
|
656
|
+
x: r,
|
|
657
|
+
y: i,
|
|
658
|
+
width: a - r,
|
|
659
|
+
height: o - i
|
|
660
|
+
};
|
|
661
|
+
}
|
|
662
|
+
function calcViewBounds({ nodes: e, edges: t }) {
|
|
663
|
+
return Ce.expand(Ce.merge(...e, ...t.map(calcEdgeBounds).filter((e) => isFinite(e.x) && isFinite(e.y))), 20);
|
|
664
|
+
}
|
|
665
|
+
//#endregion
|
|
666
|
+
//#region ../diagram/src/base-primitives/edge/EdgeContainer.tsx
|
|
667
|
+
function EdgeContainer(e) {
|
|
668
|
+
let t = X(33), { className: n, component: r, selectable: i, selected: a, data: o, animated: s, children: c, style: l } = e, u = r === void 0 ? "g" : r, d = i === void 0 ? !1 : i, f = a === void 0 ? !1 : a, p, m, h, g, _;
|
|
669
|
+
t[0] === o ? (p = t[1], m = t[2], h = t[3], g = t[4], _ = t[5]) : ({color: m, hovered: h, active: g, dimmed: _, ...p} = o, t[0] = o, t[1] = p, t[2] = m, t[3] = h, t[4] = g, t[5] = _);
|
|
670
|
+
let v = m === void 0 ? "gray" : m, y = h === void 0 ? !1 : h, b = g === void 0 ? !1 : g, x = _ === void 0 ? !1 : _, C = s === void 0 ? !1 : s;
|
|
671
|
+
C ||= b;
|
|
672
|
+
let w = f && "selected", T = d && "selectable", E;
|
|
673
|
+
t[6] !== n || t[7] !== w || t[8] !== T ? (E = S(n, "likec4-edge-container", w, T), t[6] = n, t[7] = w, t[8] = T, t[9] = E) : E = t[9];
|
|
674
|
+
let D = p.dir ?? "forward", O;
|
|
675
|
+
t[10] === C ? O = t[11] : (O = C && { "data-likec4-animated": C }, t[10] = C, t[11] = O);
|
|
676
|
+
let k;
|
|
677
|
+
t[12] === f ? k = t[13] : (k = f && { "data-likec4-selected": f }, t[12] = f, t[13] = k);
|
|
678
|
+
let A;
|
|
679
|
+
t[14] === x ? A = t[15] : (A = x !== !1 && { "data-likec4-dimmed": x }, t[14] = x, t[15] = A);
|
|
680
|
+
let j;
|
|
681
|
+
t[16] !== v || t[17] !== b || t[18] !== y || t[19] !== E || t[20] !== D || t[21] !== O || t[22] !== k || t[23] !== A ? (j = {
|
|
682
|
+
className: E,
|
|
683
|
+
"data-likec4-color": v,
|
|
684
|
+
"data-edge-dir": D,
|
|
685
|
+
"data-edge-active": b,
|
|
686
|
+
"data-likec4-hovered": y,
|
|
687
|
+
...O,
|
|
688
|
+
...k,
|
|
689
|
+
...A
|
|
690
|
+
}, t[16] = v, t[17] = b, t[18] = y, t[19] = E, t[20] = D, t[21] = O, t[22] = k, t[23] = A, t[24] = j) : j = t[24];
|
|
691
|
+
let M = j;
|
|
692
|
+
if (u === "svg") {
|
|
693
|
+
let e;
|
|
694
|
+
return t[25] !== c || t[26] !== M || t[27] !== l ? (e = /* @__PURE__ */ Q("svg", {
|
|
695
|
+
style: l,
|
|
696
|
+
...M,
|
|
697
|
+
children: c
|
|
698
|
+
}), t[25] = c, t[26] = M, t[27] = l, t[28] = e) : e = t[28], e;
|
|
699
|
+
}
|
|
700
|
+
be(u === "g", "EdgeContainer: component must be \"g\" or \"svg\"");
|
|
701
|
+
let N;
|
|
702
|
+
return t[29] !== c || t[30] !== M || t[31] !== l ? (N = /* @__PURE__ */ Q("g", {
|
|
703
|
+
style: l,
|
|
704
|
+
...M,
|
|
705
|
+
children: c
|
|
706
|
+
}), t[29] = c, t[30] = M, t[31] = l, t[32] = N) : N = t[32], N;
|
|
707
|
+
}
|
|
708
|
+
//#endregion
|
|
709
|
+
//#region ../diagram/src/base-primitives/edge/EdgeLabel.tsx
|
|
710
|
+
var Ge = J((e, t) => {
|
|
711
|
+
let n = X(33), r, i, a, o, s;
|
|
712
|
+
n[0] === e ? (r = n[1], i = n[2], a = n[3], o = n[4], s = n[5]) : ({edgeProps: o, pointerEvents: s, className: i, children: r, ...a} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = a, n[4] = o, n[5] = s);
|
|
713
|
+
let { id: c, data: l, selected: d, selectable: f } = o, { label: p, technology: m, hovered: h } = l, g = h === void 0 ? !1 : h, _ = d === void 0 ? !1 : d, v = f === void 0 ? !1 : f, y = s === void 0 ? "all" : s, b;
|
|
714
|
+
n[6] === c ? b = n[7] : (b = xe(c) ? ye(c) : null, n[6] = c, n[7] = b);
|
|
715
|
+
let C = b, w = C !== null, T;
|
|
716
|
+
n[8] !== p || n[9] !== m ? (T = u(p) || u(m), n[8] = p, n[9] = m, n[10] = T) : T = n[10];
|
|
717
|
+
let D = T, O;
|
|
718
|
+
n[11] !== i || n[12] !== w || n[13] !== y || n[14] !== v ? (O = S("likec4-edge-label", E({
|
|
719
|
+
pointerEvents: y,
|
|
720
|
+
isStepEdge: w,
|
|
721
|
+
cursor: v || w ? "pointer" : "default"
|
|
722
|
+
}), i), n[11] = i, n[12] = w, n[13] = y, n[14] = v, n[15] = O) : O = n[15];
|
|
723
|
+
let k = g && !_ ? 1.06 : 1, A;
|
|
724
|
+
n[16] === k ? A = n[17] : (A = { scale: k }, n[16] = k, n[17] = A);
|
|
725
|
+
let j;
|
|
726
|
+
n[18] === C ? j = n[19] : (j = C !== null && /* @__PURE__ */ Q(x, {
|
|
727
|
+
className: "likec4-edge-label__step-number",
|
|
728
|
+
children: C
|
|
729
|
+
}), n[18] = C, n[19] = j);
|
|
730
|
+
let M;
|
|
731
|
+
n[20] !== r || n[21] !== D || n[22] !== p || n[23] !== m ? (M = D && /* @__PURE__ */ $(x, {
|
|
732
|
+
className: "likec4-edge-label__contents",
|
|
733
|
+
children: [
|
|
734
|
+
u(p) && /* @__PURE__ */ Q(x, {
|
|
735
|
+
lineClamp: 5,
|
|
736
|
+
className: "likec4-edge-label__text",
|
|
737
|
+
children: p
|
|
738
|
+
}),
|
|
739
|
+
u(m) && /* @__PURE__ */ Q(x, {
|
|
740
|
+
className: "likec4-edge-label__technology",
|
|
741
|
+
children: "[ " + m + " ]"
|
|
742
|
+
}),
|
|
743
|
+
r
|
|
744
|
+
]
|
|
745
|
+
}), n[20] = r, n[21] = D, n[22] = p, n[23] = m, n[24] = M) : M = n[24];
|
|
746
|
+
let N;
|
|
747
|
+
return n[25] !== c || n[26] !== t || n[27] !== a || n[28] !== A || n[29] !== j || n[30] !== M || n[31] !== O ? (N = /* @__PURE__ */ $(fe, {
|
|
748
|
+
ref: t,
|
|
749
|
+
className: O,
|
|
750
|
+
"data-edge-id": c,
|
|
751
|
+
animate: A,
|
|
752
|
+
...a,
|
|
753
|
+
children: [j, M]
|
|
754
|
+
}), n[25] = c, n[26] = t, n[27] = a, n[28] = A, n[29] = j, n[30] = M, n[31] = O, n[32] = N) : N = n[32], N;
|
|
755
|
+
});
|
|
756
|
+
Ge.displayName = "EdgeLabel";
|
|
757
|
+
//#endregion
|
|
758
|
+
//#region ../diagram/src/base-primitives/edge/EdgeLabelContainer.tsx
|
|
759
|
+
var toCssVarValue = (e) => e === void 0 ? "" : t(e) ? `${Math.trunc(e)}px` : e;
|
|
760
|
+
function EdgeLabelContainer(e) {
|
|
761
|
+
let t = X(42), n, r, i, a, o, s;
|
|
762
|
+
t[0] === e ? (n = t[1], r = t[2], i = t[3], a = t[4], o = t[5], s = t[6]) : ({edgeProps: s, labelPosition: a, className: r, style: i, children: n, ...o} = e, t[0] = e, t[1] = n, t[2] = r, t[3] = i, t[4] = a, t[5] = o, t[6] = s);
|
|
763
|
+
let { id: c, selected: l, data: u, animated: d } = s, f = l === void 0 ? !1 : l, { hovered: p, active: m, dimmed: h, labelBBox: g, color: _ } = u, v = p === void 0 ? !1 : p, y = m === void 0 ? !1 : m, b = h === void 0 ? !1 : h, x = _ === void 0 ? "gray" : _, C = a?.x ?? g?.x, w = a?.y ?? g?.y;
|
|
764
|
+
if (C === void 0 || w === void 0) return null;
|
|
765
|
+
let T = a?.translate ?? "";
|
|
766
|
+
d ||= y;
|
|
767
|
+
let E = c, D;
|
|
768
|
+
t[7] === r ? D = t[8] : (D = S("nodrag nopan", "likec4-edge-label-container", r), t[7] = r, t[8] = D);
|
|
769
|
+
let O = d || y, k;
|
|
770
|
+
t[9] === d ? k = t[10] : (k = d && { "data-likec4-animated": d }, t[9] = d, t[10] = k);
|
|
771
|
+
let A;
|
|
772
|
+
t[11] === f ? A = t[12] : (A = f !== !1 && { "data-likec4-selected": f }, t[11] = f, t[12] = A);
|
|
773
|
+
let j;
|
|
774
|
+
t[13] === b ? j = t[14] : (j = b !== !1 && { "data-likec4-dimmed": b }, t[13] = b, t[14] = j);
|
|
775
|
+
let M;
|
|
776
|
+
t[15] === C ? M = t[16] : (M = toCssVarValue(C), t[15] = C, t[16] = M);
|
|
777
|
+
let N;
|
|
778
|
+
t[17] === w ? N = t[18] : (N = toCssVarValue(w), t[17] = w, t[18] = N);
|
|
779
|
+
let P = `translate(${M}, ${N}) ${T}`, F;
|
|
780
|
+
t[19] === P ? F = t[20] : (F = { transform: P }, t[19] = P, t[20] = F);
|
|
781
|
+
let I;
|
|
782
|
+
t[21] === g ? I = t[22] : (I = g && { maxWidth: g.width + 20 }, t[21] = g, t[22] = I);
|
|
783
|
+
let L;
|
|
784
|
+
t[23] !== i || t[24] !== I ? (L = {
|
|
785
|
+
...i,
|
|
786
|
+
...I
|
|
787
|
+
}, t[23] = i, t[24] = I, t[25] = L) : L = t[25];
|
|
788
|
+
let R;
|
|
789
|
+
t[26] !== n || t[27] !== L ? (R = /* @__PURE__ */ Q("div", {
|
|
790
|
+
style: L,
|
|
791
|
+
children: n
|
|
792
|
+
}), t[26] = n, t[27] = L, t[28] = R) : R = t[28];
|
|
793
|
+
let z;
|
|
794
|
+
return t[29] !== x || t[30] !== c || t[31] !== y || t[32] !== v || t[33] !== o || t[34] !== O || t[35] !== k || t[36] !== A || t[37] !== j || t[38] !== F || t[39] !== R || t[40] !== D ? (z = /* @__PURE__ */ Q(ae, { children: /* @__PURE__ */ Q("div", {
|
|
795
|
+
...o,
|
|
796
|
+
className: D,
|
|
797
|
+
"data-likec4-hovered": v,
|
|
798
|
+
"data-likec4-color": x,
|
|
799
|
+
"data-edge-active": y,
|
|
800
|
+
"data-edge-animated": O,
|
|
801
|
+
...k,
|
|
802
|
+
...A,
|
|
803
|
+
...j,
|
|
804
|
+
style: F,
|
|
805
|
+
children: R
|
|
806
|
+
}, E) }), t[29] = x, t[30] = c, t[31] = y, t[32] = v, t[33] = o, t[34] = O, t[35] = k, t[36] = A, t[37] = j, t[38] = F, t[39] = R, t[40] = D, t[41] = z) : z = t[41], z;
|
|
807
|
+
}
|
|
808
|
+
//#endregion
|
|
809
|
+
//#region ../diagram/src/base-primitives/edge/EdgeMarkers.tsx
|
|
810
|
+
var Open = (e) => {
|
|
811
|
+
let t = X(3), n;
|
|
812
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ Q("path", {
|
|
813
|
+
d: "M0,0 L7,4 L0,8 L4,4 Z",
|
|
814
|
+
stroke: "context-stroke",
|
|
815
|
+
fill: "context-stroke",
|
|
816
|
+
strokeDasharray: 0,
|
|
817
|
+
strokeWidth: 1,
|
|
818
|
+
strokeLinecap: "round"
|
|
819
|
+
}), t[0] = n) : n = t[0];
|
|
820
|
+
let r;
|
|
821
|
+
return t[1] === e ? r = t[2] : (r = /* @__PURE__ */ Q("marker", {
|
|
822
|
+
viewBox: "-4 -4 14 16",
|
|
823
|
+
refX: 5,
|
|
824
|
+
refY: 4,
|
|
825
|
+
markerWidth: "7",
|
|
826
|
+
markerHeight: "8",
|
|
827
|
+
preserveAspectRatio: "xMaxYMid meet",
|
|
828
|
+
orient: "auto-start-reverse",
|
|
829
|
+
...e,
|
|
830
|
+
children: n
|
|
831
|
+
}), t[1] = e, t[2] = r), r;
|
|
832
|
+
}, Arrow = (e) => {
|
|
833
|
+
let t = X(3), n;
|
|
834
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ Q("path", {
|
|
835
|
+
d: "M 0 0 L 8 3 L 0 6 L 1 3 z",
|
|
836
|
+
fill: "context-stroke",
|
|
837
|
+
strokeWidth: 0
|
|
838
|
+
}), t[0] = n) : n = t[0];
|
|
839
|
+
let r;
|
|
840
|
+
return t[1] === e ? r = t[2] : (r = /* @__PURE__ */ Q("marker", {
|
|
841
|
+
viewBox: "-1 -1 12 10",
|
|
842
|
+
refX: 4,
|
|
843
|
+
refY: 3,
|
|
844
|
+
markerWidth: "8",
|
|
845
|
+
markerHeight: "6",
|
|
846
|
+
preserveAspectRatio: "xMaxYMid meet",
|
|
847
|
+
orient: "auto-start-reverse",
|
|
848
|
+
...e,
|
|
849
|
+
children: n
|
|
850
|
+
}), t[1] = e, t[2] = r), r;
|
|
851
|
+
}, Crow = (e) => {
|
|
852
|
+
let t = X(3), n;
|
|
853
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ Q("path", {
|
|
854
|
+
d: "M 8 0 L 0 4 L 8 8 M 8 4 L 0 4",
|
|
855
|
+
fill: "none",
|
|
856
|
+
strokeWidth: 1
|
|
857
|
+
}), t[0] = n) : n = t[0];
|
|
858
|
+
let r;
|
|
859
|
+
return t[1] === e ? r = t[2] : (r = /* @__PURE__ */ Q("marker", {
|
|
860
|
+
viewBox: "-1 -1 12 12",
|
|
861
|
+
refX: 8,
|
|
862
|
+
refY: 4,
|
|
863
|
+
markerWidth: "8",
|
|
864
|
+
markerHeight: "8",
|
|
865
|
+
preserveAspectRatio: "xMaxYMid meet",
|
|
866
|
+
orient: "auto-start-reverse",
|
|
867
|
+
...e,
|
|
868
|
+
children: n
|
|
869
|
+
}), t[1] = e, t[2] = r), r;
|
|
870
|
+
}, OArrow = (e) => {
|
|
871
|
+
let t = X(3), n;
|
|
872
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ Q("path", {
|
|
873
|
+
d: "M 0 0 L 8 3 L 0 6 L 1 3 z",
|
|
874
|
+
stroke: "context-stroke",
|
|
875
|
+
fill: "var(--likec4-background-color)",
|
|
876
|
+
strokeWidth: 1.25,
|
|
877
|
+
strokeLinejoin: "miter",
|
|
878
|
+
strokeLinecap: "square"
|
|
879
|
+
}), t[0] = n) : n = t[0];
|
|
880
|
+
let r;
|
|
881
|
+
return t[1] === e ? r = t[2] : (r = /* @__PURE__ */ Q("marker", {
|
|
882
|
+
viewBox: "-1 -1 12 10",
|
|
883
|
+
refX: 4,
|
|
884
|
+
refY: 3,
|
|
885
|
+
markerWidth: "8",
|
|
886
|
+
markerHeight: "6",
|
|
887
|
+
preserveAspectRatio: "xMaxYMid meet",
|
|
888
|
+
orient: "auto-start-reverse",
|
|
889
|
+
...e,
|
|
890
|
+
children: n
|
|
891
|
+
}), t[1] = e, t[2] = r), r;
|
|
892
|
+
}, Diamond = (e) => {
|
|
893
|
+
let t = X(3), n;
|
|
894
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ Q("path", {
|
|
895
|
+
d: "M5,0 L10,4 L5,8 L0,4 Z",
|
|
896
|
+
fill: "context-stroke",
|
|
897
|
+
strokeWidth: 0,
|
|
898
|
+
strokeLinecap: "round"
|
|
899
|
+
}), t[0] = n) : n = t[0];
|
|
900
|
+
let r;
|
|
901
|
+
return t[1] === e ? r = t[2] : (r = /* @__PURE__ */ Q("marker", {
|
|
902
|
+
viewBox: "-4 -4 16 14",
|
|
903
|
+
refX: 5,
|
|
904
|
+
refY: 4,
|
|
905
|
+
markerWidth: "10",
|
|
906
|
+
markerHeight: "8",
|
|
907
|
+
preserveAspectRatio: "xMaxYMid meet",
|
|
908
|
+
orient: "auto-start-reverse",
|
|
909
|
+
...e,
|
|
910
|
+
children: n
|
|
911
|
+
}), t[1] = e, t[2] = r), r;
|
|
912
|
+
}, ODiamond = (e) => {
|
|
913
|
+
let t = X(3), n;
|
|
914
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ Q("path", {
|
|
915
|
+
d: "M5,0 L10,4 L5,8 L0,4 Z",
|
|
916
|
+
stroke: "context-stroke",
|
|
917
|
+
fill: "var(--likec4-background-color)",
|
|
918
|
+
strokeWidth: 1.25,
|
|
919
|
+
strokeLinecap: "round"
|
|
920
|
+
}), t[0] = n) : n = t[0];
|
|
921
|
+
let r;
|
|
922
|
+
return t[1] === e ? r = t[2] : (r = /* @__PURE__ */ Q("marker", {
|
|
923
|
+
viewBox: "-4 -4 16 14",
|
|
924
|
+
refX: 6,
|
|
925
|
+
refY: 4,
|
|
926
|
+
markerWidth: "10",
|
|
927
|
+
markerHeight: "8",
|
|
928
|
+
preserveAspectRatio: "xMaxYMid meet",
|
|
929
|
+
orient: "auto-start-reverse",
|
|
930
|
+
...e,
|
|
931
|
+
children: n
|
|
932
|
+
}), t[1] = e, t[2] = r), r;
|
|
933
|
+
}, Dot = (e) => {
|
|
934
|
+
let t = X(3), n;
|
|
935
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ Q("circle", {
|
|
936
|
+
strokeWidth: 0,
|
|
937
|
+
fill: "context-stroke",
|
|
938
|
+
cx: 4,
|
|
939
|
+
cy: 4,
|
|
940
|
+
r: 3
|
|
941
|
+
}), t[0] = n) : n = t[0];
|
|
942
|
+
let r;
|
|
943
|
+
return t[1] === e ? r = t[2] : (r = /* @__PURE__ */ Q("marker", {
|
|
944
|
+
viewBox: "0 0 10 10",
|
|
945
|
+
refX: 4,
|
|
946
|
+
refY: 4,
|
|
947
|
+
markerWidth: "6",
|
|
948
|
+
markerHeight: "6",
|
|
949
|
+
...e,
|
|
950
|
+
children: n
|
|
951
|
+
}), t[1] = e, t[2] = r), r;
|
|
952
|
+
}, ODot = (e) => {
|
|
953
|
+
let t = X(3), n;
|
|
954
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ Q("circle", {
|
|
955
|
+
strokeWidth: 1.25,
|
|
956
|
+
stroke: "context-stroke",
|
|
957
|
+
fill: "var(--likec4-background-color)",
|
|
958
|
+
cx: 4,
|
|
959
|
+
cy: 4,
|
|
960
|
+
r: 3
|
|
961
|
+
}), t[0] = n) : n = t[0];
|
|
962
|
+
let r;
|
|
963
|
+
return t[1] === e ? r = t[2] : (r = /* @__PURE__ */ Q("marker", {
|
|
964
|
+
viewBox: "0 0 10 10",
|
|
965
|
+
refX: 4,
|
|
966
|
+
refY: 4,
|
|
967
|
+
markerWidth: "6",
|
|
968
|
+
markerHeight: "6",
|
|
969
|
+
...e,
|
|
970
|
+
children: n
|
|
971
|
+
}), t[1] = e, t[2] = r), r;
|
|
972
|
+
}, Ke = {
|
|
973
|
+
Arrow,
|
|
974
|
+
Crow,
|
|
975
|
+
OArrow,
|
|
976
|
+
Open,
|
|
977
|
+
Diamond,
|
|
978
|
+
ODiamond,
|
|
979
|
+
Dot,
|
|
980
|
+
ODot
|
|
981
|
+
};
|
|
982
|
+
function arrowTypeToMarker(e) {
|
|
983
|
+
if (!(!e || e === "none")) switch (e) {
|
|
984
|
+
case "normal": return "Arrow";
|
|
985
|
+
case "crow": return "Crow";
|
|
986
|
+
case "onormal": return "OArrow";
|
|
987
|
+
case "diamond": return "Diamond";
|
|
988
|
+
case "odiamond": return "ODiamond";
|
|
989
|
+
case "open":
|
|
990
|
+
case "vee": return "Open";
|
|
991
|
+
case "dot": return "Dot";
|
|
992
|
+
case "odot": return "ODot";
|
|
993
|
+
default: Se(e);
|
|
994
|
+
}
|
|
995
|
+
}
|
|
996
|
+
//#endregion
|
|
997
|
+
//#region ../diagram/src/base-primitives/edge/EdgePath.tsx
|
|
998
|
+
var qe = J((e, t) => {
|
|
999
|
+
let n = X(54), { edgeProps: r, isDragging: i, onEdgePointerDown: a, strokeWidth: o, svgPath: s } = e, { id: c, data: l, selectable: u, style: d, interactionWidth: f } = r, { line: p, dir: m, tail: h, head: g } = l, _ = u === void 0 ? !0 : u, v = i === void 0 ? !1 : i, y = arrowTypeToMarker(h), b = arrowTypeToMarker(g ?? "normal");
|
|
1000
|
+
m === "back" && ([y, b] = [b, y]);
|
|
1001
|
+
let x = y ? Ke[y] : null, w = b ? Ke[b] : null, E = p === "dotted", D = E || p === "dashed", O;
|
|
1002
|
+
E ? O = "1,8" : D && (O = "8,10");
|
|
1003
|
+
let k, A, j, M, N, P, F, I;
|
|
1004
|
+
if (n[0] !== w || n[1] !== x || n[2] !== c || n[3] !== f || n[4] !== v || n[5] !== a || n[6] !== _ || n[7] !== d || n[8] !== s || n[9] !== t) {
|
|
1005
|
+
let e = T();
|
|
1006
|
+
n[18] !== f || n[19] !== v || n[20] !== a || n[21] !== _ || n[22] !== s ? (A = _ && /* @__PURE__ */ Q("path", {
|
|
1007
|
+
className: S("react-flow__edge-interaction", C({ fill: "none" })),
|
|
1008
|
+
onPointerDown: a,
|
|
1009
|
+
d: s,
|
|
1010
|
+
style: {
|
|
1011
|
+
strokeWidth: f ?? 10,
|
|
1012
|
+
stroke: "currentcolor",
|
|
1013
|
+
strokeOpacity: 0,
|
|
1014
|
+
...v ? { display: "none" } : {}
|
|
1015
|
+
}
|
|
1016
|
+
}), n[18] = f, n[19] = v, n[20] = a, n[21] = _, n[22] = s, n[23] = A) : A = n[23];
|
|
1017
|
+
let r = `path("${s}")`, i;
|
|
1018
|
+
n[24] === r ? i = n[25] : (i = { offsetPath: r }, n[24] = r, n[25] = i), j = /* @__PURE__ */ Q("circle", {
|
|
1019
|
+
className: S("likec4-edge-middle-point", e.middlePoint),
|
|
1020
|
+
"data-edge-id": c,
|
|
1021
|
+
style: i
|
|
1022
|
+
}), P = e.markersCtx, F = a;
|
|
1023
|
+
let o;
|
|
1024
|
+
n[26] !== x || n[27] !== c ? (o = x && /* @__PURE__ */ Q(x, { id: "start" + c }), n[26] = x, n[27] = c, n[28] = o) : o = n[28];
|
|
1025
|
+
let l;
|
|
1026
|
+
n[29] !== w || n[30] !== c ? (l = w && /* @__PURE__ */ Q(w, { id: "end" + c }), n[29] = w, n[30] = c, n[31] = l) : l = n[31], n[32] !== o || n[33] !== l ? (I = /* @__PURE__ */ $("defs", { children: [o, l] }), n[32] = o, n[33] = l, n[34] = I) : I = n[34], k = /* @__PURE__ */ Q("path", {
|
|
1027
|
+
className: S("react-flow__edge-path", "hide-on-reduced-graphics", e.pathBg, v && C({ display: "none" })),
|
|
1028
|
+
d: s,
|
|
1029
|
+
style: d,
|
|
1030
|
+
strokeLinecap: "round"
|
|
1031
|
+
}), M = t, N = S("react-flow__edge-path", e.path, _ && "react-flow__edge-interaction"), n[0] = w, n[1] = x, n[2] = c, n[3] = f, n[4] = v, n[5] = a, n[6] = _, n[7] = d, n[8] = s, n[9] = t, n[10] = k, n[11] = A, n[12] = j, n[13] = M, n[14] = N, n[15] = P, n[16] = F, n[17] = I;
|
|
1032
|
+
} else k = n[10], A = n[11], j = n[12], M = n[13], N = n[14], P = n[15], F = n[16], I = n[17];
|
|
1033
|
+
let L = x ? `url(#start${c})` : void 0, R = w ? `url(#end${c})` : void 0, z;
|
|
1034
|
+
n[35] !== O || n[36] !== o || n[37] !== d || n[38] !== s || n[39] !== L || n[40] !== R || n[41] !== M || n[42] !== N ? (z = /* @__PURE__ */ Q("path", {
|
|
1035
|
+
ref: M,
|
|
1036
|
+
className: N,
|
|
1037
|
+
d: s,
|
|
1038
|
+
style: d,
|
|
1039
|
+
strokeWidth: o,
|
|
1040
|
+
strokeLinecap: "round",
|
|
1041
|
+
strokeDasharray: O,
|
|
1042
|
+
markerStart: L,
|
|
1043
|
+
markerEnd: R
|
|
1044
|
+
}), n[35] = O, n[36] = o, n[37] = d, n[38] = s, n[39] = L, n[40] = R, n[41] = M, n[42] = N, n[43] = z) : z = n[43];
|
|
1045
|
+
let B;
|
|
1046
|
+
n[44] !== k || n[45] !== z || n[46] !== P || n[47] !== F || n[48] !== I ? (B = /* @__PURE__ */ $("g", {
|
|
1047
|
+
className: P,
|
|
1048
|
+
onPointerDown: F,
|
|
1049
|
+
children: [
|
|
1050
|
+
I,
|
|
1051
|
+
k,
|
|
1052
|
+
z
|
|
1053
|
+
]
|
|
1054
|
+
}), n[44] = k, n[45] = z, n[46] = P, n[47] = F, n[48] = I, n[49] = B) : B = n[49];
|
|
1055
|
+
let ee;
|
|
1056
|
+
return n[50] !== A || n[51] !== j || n[52] !== B ? (ee = /* @__PURE__ */ $(Z, { children: [
|
|
1057
|
+
A,
|
|
1058
|
+
j,
|
|
1059
|
+
B
|
|
1060
|
+
] }), n[50] = A, n[51] = j, n[52] = B, n[53] = ee) : ee = n[53], ee;
|
|
1061
|
+
});
|
|
1062
|
+
qe.displayName = "EdgePath";
|
|
1063
|
+
//#endregion
|
|
1064
|
+
//#region ../diagram/src/base-primitives/element/ElementActionButtons.tsx
|
|
1065
|
+
var Je = {
|
|
1066
|
+
normal: {
|
|
1067
|
+
originY: 0,
|
|
1068
|
+
opacity: .75,
|
|
1069
|
+
scale: .8,
|
|
1070
|
+
y: 0
|
|
1071
|
+
},
|
|
1072
|
+
selected: {
|
|
1073
|
+
originY: 0,
|
|
1074
|
+
opacity: 1,
|
|
1075
|
+
scale: .9,
|
|
1076
|
+
y: 7
|
|
1077
|
+
},
|
|
1078
|
+
hovered: {
|
|
1079
|
+
originY: 0,
|
|
1080
|
+
opacity: 1,
|
|
1081
|
+
scale: 1.12,
|
|
1082
|
+
y: 7
|
|
1083
|
+
}
|
|
1084
|
+
};
|
|
1085
|
+
function ElementActionButtons(e) {
|
|
1086
|
+
let t = X(12), { selected: n, data: r, buttons: i } = e, a = n === void 0 ? !1 : n, { hovered: o } = r, s = o === void 0 ? !1 : o, c = h();
|
|
1087
|
+
if (!i.length) return null;
|
|
1088
|
+
let l;
|
|
1089
|
+
bb0: switch (!0) {
|
|
1090
|
+
case s:
|
|
1091
|
+
l = "hovered";
|
|
1092
|
+
break bb0;
|
|
1093
|
+
case a:
|
|
1094
|
+
l = "selected";
|
|
1095
|
+
break bb0;
|
|
1096
|
+
default: l = "normal";
|
|
1097
|
+
}
|
|
1098
|
+
let u;
|
|
1099
|
+
t[0] === Symbol.for("react.memo_cache_sentinel") ? (u = O(), t[0] = u) : u = t[0];
|
|
1100
|
+
let d = l, f = `${s}-${a}`, p;
|
|
1101
|
+
t[1] === Symbol.for("react.memo_cache_sentinel") ? (p = S("nodrag nopan"), t[1] = p) : p = t[1];
|
|
1102
|
+
let m;
|
|
1103
|
+
if (t[2] !== i || t[3] !== c) {
|
|
1104
|
+
let t9;
|
|
1105
|
+
t[5] === c ? t9 = t[6] : (t9 = (e, t) => /* @__PURE__ */ Q(b, {
|
|
1106
|
+
component: de,
|
|
1107
|
+
className: D({}),
|
|
1108
|
+
initial: !1,
|
|
1109
|
+
whileTap: { scale: 1 },
|
|
1110
|
+
whileHover: { scale: 1.3 },
|
|
1111
|
+
tabIndex: -1,
|
|
1112
|
+
onClick: e.onClick,
|
|
1113
|
+
onDoubleClick: stopPropagation,
|
|
1114
|
+
children: e.icon || /* @__PURE__ */ Q(R, {})
|
|
1115
|
+
}, `${c}-${e.key ?? t}`), t[5] = c, t[6] = t9), m = i.map(t9), t[2] = i, t[3] = c, t[4] = m;
|
|
1116
|
+
} else m = t[4];
|
|
1117
|
+
let g;
|
|
1118
|
+
return t[7] !== s || t[8] !== f || t[9] !== m || t[10] !== l ? (g = /* @__PURE__ */ Q("div", {
|
|
1119
|
+
className: u,
|
|
1120
|
+
children: /* @__PURE__ */ Q(fe, {
|
|
1121
|
+
layoutRoot: !0,
|
|
1122
|
+
initial: !1,
|
|
1123
|
+
variants: Je,
|
|
1124
|
+
animate: d,
|
|
1125
|
+
layoutDependency: f,
|
|
1126
|
+
"data-likec4-hovered": s,
|
|
1127
|
+
className: p,
|
|
1128
|
+
onClick: stopPropagation,
|
|
1129
|
+
children: m
|
|
1130
|
+
})
|
|
1131
|
+
}), t[7] = s, t[8] = f, t[9] = m, t[10] = l, t[11] = g) : g = t[11], g;
|
|
1132
|
+
}
|
|
1133
|
+
//#endregion
|
|
1134
|
+
//#region ../diagram/src/base-primitives/element/ElementData.tsx
|
|
1135
|
+
var resolveIconColor = (e, t) => {
|
|
1136
|
+
let n = t.style.iconColor;
|
|
1137
|
+
if (!n) return;
|
|
1138
|
+
let r = e.colors(n).elements;
|
|
1139
|
+
return n === t.color ? r.stroke : r.fill;
|
|
1140
|
+
}, Ye = J((e, t) => {
|
|
1141
|
+
let n = X(28), r, i, a, o;
|
|
1142
|
+
n[0] === e ? (r = n[1], i = n[2], a = n[3], o = n[4]) : ({className: r, style: o, data: i, ...a} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = a, n[4] = o);
|
|
1143
|
+
let s = useLikeC4Styles(), c;
|
|
1144
|
+
n[5] !== i.style || n[6] !== s ? (c = i.style.iconSize ? s.nodeSizes(i.style).values.iconSize : void 0, n[5] = i.style, n[6] = s, n[7] = c) : c = n[7];
|
|
1145
|
+
let l = c, u;
|
|
1146
|
+
n[8] !== i || n[9] !== s ? (u = resolveIconColor(s, i), n[8] = i, n[9] = s, n[10] = u) : u = n[10];
|
|
1147
|
+
let d = u, f;
|
|
1148
|
+
n[11] !== r || n[12] !== i.style.iconPosition || n[13] !== d ? (f = S(r, k({
|
|
1149
|
+
iconPosition: i.style.iconPosition,
|
|
1150
|
+
withIconColor: !!d
|
|
1151
|
+
}), "likec4-element"), n[11] = r, n[12] = i.style.iconPosition, n[13] = d, n[14] = f) : f = n[14];
|
|
1152
|
+
let p;
|
|
1153
|
+
n[15] === l ? p = n[16] : (p = l && { "--likec4-icon-size": `${l}px` }, n[15] = l, n[16] = p);
|
|
1154
|
+
let m;
|
|
1155
|
+
n[17] === d ? m = n[18] : (m = d && { "--likec4-icon-color": d }, n[17] = d, n[18] = m);
|
|
1156
|
+
let h;
|
|
1157
|
+
n[19] !== o || n[20] !== p || n[21] !== m ? (h = {
|
|
1158
|
+
...o,
|
|
1159
|
+
...p,
|
|
1160
|
+
...m
|
|
1161
|
+
}, n[19] = o, n[20] = p, n[21] = m, n[22] = h) : h = n[22];
|
|
1162
|
+
let g;
|
|
1163
|
+
return n[23] !== a || n[24] !== t || n[25] !== f || n[26] !== h ? (g = /* @__PURE__ */ Q("div", {
|
|
1164
|
+
...a,
|
|
1165
|
+
ref: t,
|
|
1166
|
+
className: f,
|
|
1167
|
+
style: h
|
|
1168
|
+
}), n[23] = a, n[24] = t, n[25] = f, n[26] = h, n[27] = g) : g = n[27], g;
|
|
1169
|
+
}), Icon = (e) => {
|
|
1170
|
+
let t = X(6), n, r;
|
|
1171
|
+
t[0] === e ? (n = t[1], r = t[2]) : ({data: n, ...r} = e, t[0] = e, t[1] = n, t[2] = r);
|
|
1172
|
+
let i;
|
|
1173
|
+
return t[3] !== n || t[4] !== r ? (i = /* @__PURE__ */ Q(IconRenderer, {
|
|
1174
|
+
element: n,
|
|
1175
|
+
...r
|
|
1176
|
+
}), t[3] = n, t[4] = r, t[5] = i) : i = t[5], i;
|
|
1177
|
+
}, Xe = J((e, t) => {
|
|
1178
|
+
let n = X(9), r, i;
|
|
1179
|
+
n[0] === e ? (r = n[1], i = n[2]) : ({className: r, ...i} = e, n[0] = e, n[1] = r, n[2] = i);
|
|
1180
|
+
let a;
|
|
1181
|
+
n[3] === r ? a = n[4] : (a = S(r, "likec4-element-node-content"), n[3] = r, n[4] = a);
|
|
1182
|
+
let o;
|
|
1183
|
+
return n[5] !== i || n[6] !== t || n[7] !== a ? (o = /* @__PURE__ */ Q("div", {
|
|
1184
|
+
...i,
|
|
1185
|
+
className: a,
|
|
1186
|
+
ref: t
|
|
1187
|
+
}), n[5] = i, n[6] = t, n[7] = a, n[8] = o) : o = n[8], o;
|
|
1188
|
+
}), Ze = J((e, t) => {
|
|
1189
|
+
let n = X(11), r, i, a;
|
|
1190
|
+
n[0] === e ? (r = n[1], i = n[2], a = n[3]) : ({data: a, className: r, ...i} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = a);
|
|
1191
|
+
let { title: o } = a, s;
|
|
1192
|
+
n[4] === r ? s = n[5] : (s = S(r, "likec4-element-title"), n[4] = r, n[5] = s);
|
|
1193
|
+
let c;
|
|
1194
|
+
return n[6] !== i || n[7] !== t || n[8] !== s || n[9] !== o ? (c = /* @__PURE__ */ Q("div", {
|
|
1195
|
+
...i,
|
|
1196
|
+
className: s,
|
|
1197
|
+
"data-likec4-node-title": "",
|
|
1198
|
+
ref: t,
|
|
1199
|
+
children: o
|
|
1200
|
+
}), n[6] = i, n[7] = t, n[8] = s, n[9] = o, n[10] = c) : c = n[10], c;
|
|
1201
|
+
}), Qe = J((e, t) => {
|
|
1202
|
+
let n = X(10), r, i, a, o;
|
|
1203
|
+
n[0] === e ? (r = n[1], i = n[2], a = n[3], o = n[4]) : ({data: a, children: r, className: i, ...o} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = a, n[4] = o);
|
|
1204
|
+
let s = a?.technology ?? r, c;
|
|
1205
|
+
return n[5] !== i || n[6] !== o || n[7] !== t || n[8] !== s ? (c = u(s) ? /* @__PURE__ */ Q("div", {
|
|
1206
|
+
...o,
|
|
1207
|
+
className: S(i, "likec4-element-technology"),
|
|
1208
|
+
"data-likec4-node-technology": "",
|
|
1209
|
+
ref: t,
|
|
1210
|
+
children: s
|
|
1211
|
+
}) : null, n[5] = i, n[6] = o, n[7] = t, n[8] = s, n[9] = c) : c = n[9], c;
|
|
1212
|
+
}), $e = J((e, t) => {
|
|
1213
|
+
let n = X(16), r, i, a;
|
|
1214
|
+
n[0] === e ? (r = n[1], i = n[2], a = n[3]) : ({data: a, className: r, ...i} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = a);
|
|
1215
|
+
let { description: o } = a;
|
|
1216
|
+
if (!o) return null;
|
|
1217
|
+
let s;
|
|
1218
|
+
n[4] === o ? s = n[5] : (s = Oe.from(o), n[4] = o, n[5] = s);
|
|
1219
|
+
let c = s, l;
|
|
1220
|
+
n[6] === r ? l = n[7] : (l = S(r, "likec4-element-description"), n[6] = r, n[7] = l);
|
|
1221
|
+
let u = c.isMarkdown ? "8rem" : void 0, d;
|
|
1222
|
+
n[8] === u ? d = n[9] : (d = { maxHeight: u }, n[8] = u, n[9] = d);
|
|
1223
|
+
let f;
|
|
1224
|
+
return n[10] !== c || n[11] !== i || n[12] !== t || n[13] !== l || n[14] !== d ? (f = /* @__PURE__ */ Q(te, {
|
|
1225
|
+
...i,
|
|
1226
|
+
className: l,
|
|
1227
|
+
"data-likec4-node-description": "",
|
|
1228
|
+
value: c,
|
|
1229
|
+
uselikec4palette: !0,
|
|
1230
|
+
hideIfEmpty: !0,
|
|
1231
|
+
style: d,
|
|
1232
|
+
ref: t
|
|
1233
|
+
}), n[10] = c, n[11] = i, n[12] = t, n[13] = l, n[14] = d, n[15] = f) : f = n[15], f;
|
|
1234
|
+
});
|
|
1235
|
+
function ElementData(e) {
|
|
1236
|
+
let t = X(8), { data: n } = e, r;
|
|
1237
|
+
t[0] === n ? r = t[1] : (r = /* @__PURE__ */ Q(Icon, { data: n }), t[0] = n, t[1] = r);
|
|
1238
|
+
let i;
|
|
1239
|
+
t[2] === n ? i = t[3] : (i = /* @__PURE__ */ $(Xe, { children: [
|
|
1240
|
+
/* @__PURE__ */ Q(Ze, { data: n }),
|
|
1241
|
+
/* @__PURE__ */ Q(Qe, { data: n }),
|
|
1242
|
+
/* @__PURE__ */ Q($e, { data: n })
|
|
1243
|
+
] }), t[2] = n, t[3] = i);
|
|
1244
|
+
let a;
|
|
1245
|
+
return t[4] !== n || t[5] !== r || t[6] !== i ? (a = /* @__PURE__ */ $(Ye, {
|
|
1246
|
+
data: n,
|
|
1247
|
+
children: [r, i]
|
|
1248
|
+
}), t[4] = n, t[5] = r, t[6] = i, t[7] = a) : a = t[7], a;
|
|
1249
|
+
}
|
|
1250
|
+
ElementData.Root = Ye, ElementData.Icon = Icon, ElementData.Content = Xe, ElementData.Title = Ze, ElementData.Technology = Qe, ElementData.Description = $e;
|
|
1251
|
+
//#endregion
|
|
1252
|
+
//#region ../diagram/src/base-primitives/element/ElementNodeContainer.tsx
|
|
1253
|
+
var et = {
|
|
1254
|
+
normal: { scale: 1 },
|
|
1255
|
+
hovered: { scale: 1.05 },
|
|
1256
|
+
selected: { scale: 1.02 },
|
|
1257
|
+
tap: { scale: .98 }
|
|
1258
|
+
}, tt = J((e, t) => {
|
|
1259
|
+
let n = X(34), r, i, a, o, s;
|
|
1260
|
+
n[0] === e ? (r = n[1], i = n[2], a = n[3], o = n[4], s = n[5]) : ({nodeProps: s, className: i, style: o, children: r, ...a} = e, n[0] = e, n[1] = r, n[2] = i, n[3] = a, n[4] = o, n[5] = s);
|
|
1261
|
+
let { selected: c, selectable: l, data: u } = s, d = c === void 0 ? !1 : c, f = l === void 0 ? !1 : l, p, m, h, g, _;
|
|
1262
|
+
if (n[6] !== d || n[7] !== u) {
|
|
1263
|
+
let { hovered: e, dimmed: t, ...r } = u;
|
|
1264
|
+
p = r, h = e === void 0 ? !1 : e, m = t === void 0 ? !1 : t;
|
|
1265
|
+
bb0: switch (!0) {
|
|
1266
|
+
case h:
|
|
1267
|
+
_ = "hovered";
|
|
1268
|
+
break bb0;
|
|
1269
|
+
case d:
|
|
1270
|
+
_ = "selected";
|
|
1271
|
+
break bb0;
|
|
1272
|
+
default: _ = "normal";
|
|
1273
|
+
}
|
|
1274
|
+
g = ke(p.style ?? {}), n[6] = d, n[7] = u, n[8] = p, n[9] = m, n[10] = h, n[11] = g, n[12] = _;
|
|
1275
|
+
} else p = n[8], m = n[9], h = n[10], g = n[11], _ = n[12];
|
|
1276
|
+
let { size: v, padding: y, textSize: b } = g, x;
|
|
1277
|
+
n[13] === i ? x = n[14] : (x = S(A(), "group", i), n[13] = i, n[14] = x);
|
|
1278
|
+
let C;
|
|
1279
|
+
n[15] !== f || n[16] !== _ ? (C = f && {
|
|
1280
|
+
animate: _,
|
|
1281
|
+
whileTap: "tap"
|
|
1282
|
+
}, n[15] = f, n[16] = _, n[17] = C) : C = n[17];
|
|
1283
|
+
let w;
|
|
1284
|
+
n[18] === m ? w = n[19] : (w = m !== !1 && { "data-likec4-dimmed": m }, n[18] = m, n[19] = w);
|
|
1285
|
+
let T = o, E;
|
|
1286
|
+
return n[20] !== r || n[21] !== p.color || n[22] !== p.shape || n[23] !== h || n[24] !== y || n[25] !== t || n[26] !== a || n[27] !== v || n[28] !== x || n[29] !== C || n[30] !== w || n[31] !== T || n[32] !== b ? (E = /* @__PURE__ */ Q(fe, {
|
|
1287
|
+
ref: t,
|
|
1288
|
+
className: x,
|
|
1289
|
+
variants: et,
|
|
1290
|
+
initial: !1,
|
|
1291
|
+
...C,
|
|
1292
|
+
"data-likec4-hovered": h,
|
|
1293
|
+
"data-likec4-color": p.color,
|
|
1294
|
+
"data-likec4-shape": p.shape,
|
|
1295
|
+
"data-likec4-shape-size": v,
|
|
1296
|
+
"data-likec4-spacing": y,
|
|
1297
|
+
"data-likec4-text-size": b,
|
|
1298
|
+
...w,
|
|
1299
|
+
style: T,
|
|
1300
|
+
tabIndex: -1,
|
|
1301
|
+
...a,
|
|
1302
|
+
children: r
|
|
1303
|
+
}), n[20] = r, n[21] = p.color, n[22] = p.shape, n[23] = h, n[24] = y, n[25] = t, n[26] = a, n[27] = v, n[28] = x, n[29] = C, n[30] = w, n[31] = T, n[32] = b, n[33] = E) : E = n[33], E;
|
|
1304
|
+
});
|
|
1305
|
+
tt.displayName = "ElementNodeContainer";
|
|
1306
|
+
//#endregion
|
|
1307
|
+
//#region ../diagram/src/base-primitives/element/ElementShape.tsx
|
|
1308
|
+
function cylinderSVGPath(e, t, n = .07) {
|
|
1309
|
+
let r = Math.round(e / 2), i = r, a = roundDpr(n * r), o = t - 2 * a;
|
|
1310
|
+
return {
|
|
1311
|
+
path: ` M ${e},${a}
|
|
1312
|
+
a ${i},${a} 0,0,0 ${-e} 0
|
|
1313
|
+
l 0,${o}
|
|
1314
|
+
a ${i},${a} 0,0,0 ${e} 0
|
|
1315
|
+
l 0,${-o}
|
|
1316
|
+
z
|
|
1317
|
+
`.replace(/\s+/g, " ").trim(),
|
|
1318
|
+
ry: a,
|
|
1319
|
+
rx: i
|
|
1320
|
+
};
|
|
1321
|
+
}
|
|
1322
|
+
function docSVGPath(e, t) {
|
|
1323
|
+
let n = roundDpr(t - t / 8 / 2), r = roundDpr(t / 6);
|
|
1324
|
+
return { path: `
|
|
1325
|
+
M 0 ${n}
|
|
1326
|
+
V 6
|
|
1327
|
+
Q 0 0 6 0
|
|
1328
|
+
H ${e - 6}
|
|
1329
|
+
Q ${e} 0 ${e} 6
|
|
1330
|
+
V ${n}
|
|
1331
|
+
C ${roundDpr(e * .75)} ${n + r}, ${roundDpr(e * .5)} ${n - r}, 0 ${n}
|
|
1332
|
+
`.replace(/\s+/g, " ").trim() };
|
|
1333
|
+
}
|
|
1334
|
+
function bucketSVGPath(e, t) {
|
|
1335
|
+
let n = e / 2, r = roundDpr(n), i = roundDpr(Math.min(t / 8, r * .08)), a = roundDpr(r * .8), o = roundDpr(i * 1.05), s = i, c = t - o, l = n - a;
|
|
1336
|
+
return {
|
|
1337
|
+
path: `
|
|
1338
|
+
M ${e},${s}
|
|
1339
|
+
a ${r},${i} 0,0,0 ${-e} 0
|
|
1340
|
+
L ${l},${c}
|
|
1341
|
+
a ${a},${o} 0,0,0 ${a * 2} 0
|
|
1342
|
+
Z
|
|
1343
|
+
`.replace(/\s+/g, " ").trim(),
|
|
1344
|
+
topRx: r,
|
|
1345
|
+
topRy: i,
|
|
1346
|
+
bottomRx: a,
|
|
1347
|
+
bottomRy: o
|
|
1348
|
+
};
|
|
1349
|
+
}
|
|
1350
|
+
function queueSVGPath(e, t, n = .185) {
|
|
1351
|
+
let r = t, i = Math.round(r / 2), a = roundDpr(r / 2 * n);
|
|
1352
|
+
return {
|
|
1353
|
+
path: `
|
|
1354
|
+
M ${a},0
|
|
1355
|
+
a ${a},${i} 0,0,0 0 ${r}
|
|
1356
|
+
l ${e - 2 * a},0
|
|
1357
|
+
a ${a},${i} 0,0,0 0 ${-r}
|
|
1358
|
+
z`.replace(/\s+/g, " ").trim(),
|
|
1359
|
+
ry: i,
|
|
1360
|
+
rx: a
|
|
1361
|
+
};
|
|
1362
|
+
}
|
|
1363
|
+
var nt = {
|
|
1364
|
+
width: 115,
|
|
1365
|
+
height: 120,
|
|
1366
|
+
path: "M57.9197 0C10.9124 0 33.5766 54.75 33.5766 54.75C38.6131 62.25 45.3285 60.75 45.3285 66C45.3285 70.5 39.4526 72 33.5766 72.75C24.3431 72.75 15.9489 71.25 7.55474 84.75C2.51825 93 0 120 0 120H115C115 120 112.482 93 108.285 84.75C99.8905 70.5 91.4963 72.75 82.2628 72C76.3869 71.25 70.5109 69.75 70.5109 65.25C70.5109 60.75 77.2263 62.25 82.2628 54C82.2628 54.75 104.927 0 57.9197 0V0Z"
|
|
1367
|
+
}, ComponentTopLeftRect = (e) => {
|
|
1368
|
+
let t = X(5), { index: n, size: r } = e, i, a, o, s, c;
|
|
1369
|
+
bb0: switch (r) {
|
|
1370
|
+
case "xs":
|
|
1371
|
+
case "sm":
|
|
1372
|
+
i = 40, a = 18, o = -16, s = 16, c = 10;
|
|
1373
|
+
break bb0;
|
|
1374
|
+
case "md":
|
|
1375
|
+
i = 60, a = 26, o = -20, s = 22, c = 14;
|
|
1376
|
+
break bb0;
|
|
1377
|
+
case "lg":
|
|
1378
|
+
case "xl":
|
|
1379
|
+
i = 70, a = 32, o = -24, s = 32, c = 18;
|
|
1380
|
+
break bb0;
|
|
1381
|
+
default: Se(r);
|
|
1382
|
+
}
|
|
1383
|
+
let l = s + (a + c) * n, u;
|
|
1384
|
+
return t[0] !== a || t[1] !== o || t[2] !== l || t[3] !== i ? (u = /* @__PURE__ */ Q("rect", {
|
|
1385
|
+
x: o,
|
|
1386
|
+
y: l,
|
|
1387
|
+
width: i,
|
|
1388
|
+
height: a,
|
|
1389
|
+
rx: 3,
|
|
1390
|
+
className: "top-left-rect",
|
|
1391
|
+
strokeWidth: 2
|
|
1392
|
+
}), t[0] = a, t[1] = o, t[2] = l, t[3] = i, t[4] = u) : u = t[4], u;
|
|
1393
|
+
};
|
|
1394
|
+
function ShapeSvg(e) {
|
|
1395
|
+
let t = X(94), { shape: n, w: r, h: i, size: a } = e, o = a === void 0 ? "md" : a;
|
|
1396
|
+
switch (n) {
|
|
1397
|
+
case "component": {
|
|
1398
|
+
let e;
|
|
1399
|
+
t[0] !== i || t[1] !== r ? (e = /* @__PURE__ */ Q("rect", {
|
|
1400
|
+
width: r,
|
|
1401
|
+
height: i,
|
|
1402
|
+
rx: 6,
|
|
1403
|
+
strokeWidth: 0
|
|
1404
|
+
}), t[0] = i, t[1] = r, t[2] = e) : e = t[2];
|
|
1405
|
+
let n, a;
|
|
1406
|
+
t[3] === o ? (n = t[4], a = t[5]) : (n = /* @__PURE__ */ Q(ComponentTopLeftRect, {
|
|
1407
|
+
index: 0,
|
|
1408
|
+
size: o
|
|
1409
|
+
}), a = /* @__PURE__ */ Q(ComponentTopLeftRect, {
|
|
1410
|
+
index: 1,
|
|
1411
|
+
size: o
|
|
1412
|
+
}), t[3] = o, t[4] = n, t[5] = a);
|
|
1413
|
+
let s;
|
|
1414
|
+
return t[6] !== e || t[7] !== n || t[8] !== a ? (s = /* @__PURE__ */ $(Z, { children: [
|
|
1415
|
+
e,
|
|
1416
|
+
n,
|
|
1417
|
+
a
|
|
1418
|
+
] }), t[6] = e, t[7] = n, t[8] = a, t[9] = s) : s = t[9], s;
|
|
1419
|
+
}
|
|
1420
|
+
case "mobile": {
|
|
1421
|
+
let e;
|
|
1422
|
+
t[10] !== i || t[11] !== r ? (e = /* @__PURE__ */ Q("rect", {
|
|
1423
|
+
width: r,
|
|
1424
|
+
height: i,
|
|
1425
|
+
rx: 6,
|
|
1426
|
+
"data-likec4-fill": "mix-stroke",
|
|
1427
|
+
strokeWidth: 0
|
|
1428
|
+
}), t[10] = i, t[11] = r, t[12] = e) : e = t[12];
|
|
1429
|
+
let n = i / 2, a;
|
|
1430
|
+
t[13] === n ? a = t[14] : (a = /* @__PURE__ */ Q("circle", {
|
|
1431
|
+
cx: 17,
|
|
1432
|
+
cy: n,
|
|
1433
|
+
r: 12
|
|
1434
|
+
}), t[13] = n, t[14] = a);
|
|
1435
|
+
let o = r - 44, s = i - 24, c;
|
|
1436
|
+
t[15] !== o || t[16] !== s ? (c = /* @__PURE__ */ Q("rect", {
|
|
1437
|
+
x: 33,
|
|
1438
|
+
y: 12,
|
|
1439
|
+
width: o,
|
|
1440
|
+
height: s,
|
|
1441
|
+
rx: 5
|
|
1442
|
+
}), t[15] = o, t[16] = s, t[17] = c) : c = t[17];
|
|
1443
|
+
let l;
|
|
1444
|
+
t[18] !== a || t[19] !== c ? (l = /* @__PURE__ */ $("g", {
|
|
1445
|
+
"data-likec4-fill": "fill",
|
|
1446
|
+
strokeWidth: 0,
|
|
1447
|
+
children: [a, c]
|
|
1448
|
+
}), t[18] = a, t[19] = c, t[20] = l) : l = t[20];
|
|
1449
|
+
let u;
|
|
1450
|
+
return t[21] !== e || t[22] !== l ? (u = /* @__PURE__ */ $(Z, { children: [e, l] }), t[21] = e, t[22] = l, t[23] = u) : u = t[23], u;
|
|
1451
|
+
}
|
|
1452
|
+
case "document": {
|
|
1453
|
+
let e;
|
|
1454
|
+
t[24] !== i || t[25] !== r ? (e = docSVGPath(r, i), t[24] = i, t[25] = r, t[26] = e) : e = t[26];
|
|
1455
|
+
let { path: n } = e, a;
|
|
1456
|
+
return t[27] === n ? a = t[28] : (a = /* @__PURE__ */ Q("path", {
|
|
1457
|
+
d: n,
|
|
1458
|
+
"data-likec4-fill": "fill",
|
|
1459
|
+
strokeWidth: 2
|
|
1460
|
+
}), t[27] = n, t[28] = a), a;
|
|
1461
|
+
}
|
|
1462
|
+
case "browser": {
|
|
1463
|
+
let e;
|
|
1464
|
+
t[29] !== i || t[30] !== r ? (e = /* @__PURE__ */ Q("rect", {
|
|
1465
|
+
width: r,
|
|
1466
|
+
height: i,
|
|
1467
|
+
rx: 6,
|
|
1468
|
+
"data-likec4-fill": "mix-stroke",
|
|
1469
|
+
strokeWidth: 0
|
|
1470
|
+
}), t[29] = i, t[30] = r, t[31] = e) : e = t[31];
|
|
1471
|
+
let n, a, o;
|
|
1472
|
+
t[32] === Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ Q("circle", {
|
|
1473
|
+
cx: 16,
|
|
1474
|
+
cy: 17,
|
|
1475
|
+
r: 7
|
|
1476
|
+
}), a = /* @__PURE__ */ Q("circle", {
|
|
1477
|
+
cx: 36,
|
|
1478
|
+
cy: 17,
|
|
1479
|
+
r: 7
|
|
1480
|
+
}), o = /* @__PURE__ */ Q("circle", {
|
|
1481
|
+
cx: 56,
|
|
1482
|
+
cy: 17,
|
|
1483
|
+
r: 7
|
|
1484
|
+
}), t[32] = n, t[33] = a, t[34] = o) : (n = t[32], a = t[33], o = t[34]);
|
|
1485
|
+
let s = r - 80, c;
|
|
1486
|
+
t[35] === s ? c = t[36] : (c = /* @__PURE__ */ Q("rect", {
|
|
1487
|
+
x: 70,
|
|
1488
|
+
y: 8,
|
|
1489
|
+
width: s,
|
|
1490
|
+
height: 17,
|
|
1491
|
+
rx: 4
|
|
1492
|
+
}), t[35] = s, t[36] = c);
|
|
1493
|
+
let l = r - 20, u = i - 42, d;
|
|
1494
|
+
t[37] !== l || t[38] !== u ? (d = /* @__PURE__ */ Q("rect", {
|
|
1495
|
+
x: 10,
|
|
1496
|
+
y: 32,
|
|
1497
|
+
width: l,
|
|
1498
|
+
height: u,
|
|
1499
|
+
rx: 4
|
|
1500
|
+
}), t[37] = l, t[38] = u, t[39] = d) : d = t[39];
|
|
1501
|
+
let f;
|
|
1502
|
+
t[40] !== d || t[41] !== c ? (f = /* @__PURE__ */ $("g", {
|
|
1503
|
+
"data-likec4-fill": "fill",
|
|
1504
|
+
strokeWidth: 0,
|
|
1505
|
+
children: [
|
|
1506
|
+
n,
|
|
1507
|
+
a,
|
|
1508
|
+
o,
|
|
1509
|
+
c,
|
|
1510
|
+
d
|
|
1511
|
+
]
|
|
1512
|
+
}), t[40] = d, t[41] = c, t[42] = f) : f = t[42];
|
|
1513
|
+
let p;
|
|
1514
|
+
return t[43] !== f || t[44] !== e ? (p = /* @__PURE__ */ $(Z, { children: [e, f] }), t[43] = f, t[44] = e, t[45] = p) : p = t[45], p;
|
|
1515
|
+
}
|
|
1516
|
+
case "person": {
|
|
1517
|
+
let e;
|
|
1518
|
+
t[46] !== i || t[47] !== r ? (e = /* @__PURE__ */ Q("rect", {
|
|
1519
|
+
width: r,
|
|
1520
|
+
height: i,
|
|
1521
|
+
rx: 6,
|
|
1522
|
+
strokeWidth: 0
|
|
1523
|
+
}), t[46] = i, t[47] = r, t[48] = e) : e = t[48];
|
|
1524
|
+
let n = r - nt.width - 6, a = i - nt.height, o;
|
|
1525
|
+
t[49] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ Q("path", {
|
|
1526
|
+
strokeWidth: 0,
|
|
1527
|
+
d: nt.path
|
|
1528
|
+
}), t[49] = o) : o = t[49];
|
|
1529
|
+
let s;
|
|
1530
|
+
t[50] !== n || t[51] !== a ? (s = /* @__PURE__ */ Q("svg", {
|
|
1531
|
+
x: n,
|
|
1532
|
+
y: a,
|
|
1533
|
+
width: nt.width,
|
|
1534
|
+
height: nt.height,
|
|
1535
|
+
viewBox: `0 0 ${nt.width} ${nt.height}`,
|
|
1536
|
+
"data-likec4-fill": "mix-stroke",
|
|
1537
|
+
children: o
|
|
1538
|
+
}), t[50] = n, t[51] = a, t[52] = s) : s = t[52];
|
|
1539
|
+
let c;
|
|
1540
|
+
return t[53] !== e || t[54] !== s ? (c = /* @__PURE__ */ $(Z, { children: [e, s] }), t[53] = e, t[54] = s, t[55] = c) : c = t[55], c;
|
|
1541
|
+
}
|
|
1542
|
+
case "queue": {
|
|
1543
|
+
let e;
|
|
1544
|
+
t[56] !== i || t[57] !== r ? (e = queueSVGPath(r, i), t[56] = i, t[57] = r, t[58] = e) : e = t[58];
|
|
1545
|
+
let { path: n, rx: a, ry: o } = e, s;
|
|
1546
|
+
t[59] === n ? s = t[60] : (s = /* @__PURE__ */ Q("path", {
|
|
1547
|
+
d: n,
|
|
1548
|
+
strokeWidth: 2
|
|
1549
|
+
}), t[59] = n, t[60] = s);
|
|
1550
|
+
let c = o - .75, l;
|
|
1551
|
+
t[61] !== a || t[62] !== o || t[63] !== c ? (l = /* @__PURE__ */ Q("ellipse", {
|
|
1552
|
+
cx: a,
|
|
1553
|
+
cy: o,
|
|
1554
|
+
ry: c,
|
|
1555
|
+
rx: a,
|
|
1556
|
+
"data-likec4-fill": "mix-stroke",
|
|
1557
|
+
strokeWidth: 2
|
|
1558
|
+
}), t[61] = a, t[62] = o, t[63] = c, t[64] = l) : l = t[64];
|
|
1559
|
+
let u;
|
|
1560
|
+
return t[65] !== s || t[66] !== l ? (u = /* @__PURE__ */ $(Z, { children: [s, l] }), t[65] = s, t[66] = l, t[67] = u) : u = t[67], u;
|
|
1561
|
+
}
|
|
1562
|
+
case "bucket": {
|
|
1563
|
+
let e;
|
|
1564
|
+
t[68] !== i || t[69] !== r ? (e = bucketSVGPath(r, i), t[68] = i, t[69] = r, t[70] = e) : e = t[70];
|
|
1565
|
+
let { path: n, topRx: a, topRy: o } = e, s;
|
|
1566
|
+
t[71] === n ? s = t[72] : (s = /* @__PURE__ */ Q("path", {
|
|
1567
|
+
d: n,
|
|
1568
|
+
strokeWidth: 2
|
|
1569
|
+
}), t[71] = n, t[72] = s);
|
|
1570
|
+
let c = r / 2, l;
|
|
1571
|
+
t[73] !== c || t[74] !== a || t[75] !== o ? (l = /* @__PURE__ */ Q("ellipse", {
|
|
1572
|
+
cx: c,
|
|
1573
|
+
cy: o,
|
|
1574
|
+
rx: a,
|
|
1575
|
+
ry: o,
|
|
1576
|
+
"data-likec4-fill": "mix-stroke",
|
|
1577
|
+
strokeWidth: 2
|
|
1578
|
+
}), t[73] = c, t[74] = a, t[75] = o, t[76] = l) : l = t[76];
|
|
1579
|
+
let u;
|
|
1580
|
+
return t[77] !== s || t[78] !== l ? (u = /* @__PURE__ */ $(Z, { children: [s, l] }), t[77] = s, t[78] = l, t[79] = u) : u = t[79], u;
|
|
1581
|
+
}
|
|
1582
|
+
case "storage":
|
|
1583
|
+
case "cylinder": {
|
|
1584
|
+
let e;
|
|
1585
|
+
t[80] !== i || t[81] !== r ? (e = cylinderSVGPath(r, i), t[80] = i, t[81] = r, t[82] = e) : e = t[82];
|
|
1586
|
+
let { path: n, rx: a, ry: o } = e, s;
|
|
1587
|
+
t[83] === n ? s = t[84] : (s = /* @__PURE__ */ Q("path", {
|
|
1588
|
+
d: n,
|
|
1589
|
+
strokeWidth: 2
|
|
1590
|
+
}), t[83] = n, t[84] = s);
|
|
1591
|
+
let c = a - .75, l;
|
|
1592
|
+
t[85] !== a || t[86] !== o || t[87] !== c ? (l = /* @__PURE__ */ Q("ellipse", {
|
|
1593
|
+
cx: a,
|
|
1594
|
+
cy: o,
|
|
1595
|
+
ry: o,
|
|
1596
|
+
rx: c,
|
|
1597
|
+
"data-likec4-fill": "mix-stroke",
|
|
1598
|
+
strokeWidth: 2
|
|
1599
|
+
}), t[85] = a, t[86] = o, t[87] = c, t[88] = l) : l = t[88];
|
|
1600
|
+
let u;
|
|
1601
|
+
return t[89] !== s || t[90] !== l ? (u = /* @__PURE__ */ $(Z, { children: [s, l] }), t[89] = s, t[90] = l, t[91] = u) : u = t[91], u;
|
|
1602
|
+
}
|
|
1603
|
+
default: {
|
|
1604
|
+
let e;
|
|
1605
|
+
return t[92] === n ? e = t[93] : (e = Se(n), t[92] = n, t[93] = e), e;
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
}
|
|
1609
|
+
function ShapeSvgOutline(e) {
|
|
1610
|
+
let t = X(25), { shape: n, w: r, h: i } = e, a;
|
|
1611
|
+
bb0: switch (n) {
|
|
1612
|
+
case "bucket": {
|
|
1613
|
+
let e = r + 6, n = i + 6, o;
|
|
1614
|
+
t[0] !== e || t[1] !== n ? (o = bucketSVGPath(e, n), t[0] = e, t[1] = n, t[2] = o) : o = t[2];
|
|
1615
|
+
let s;
|
|
1616
|
+
t[3] === o.path ? s = t[4] : (s = /* @__PURE__ */ Q("g", {
|
|
1617
|
+
transform: "translate(-3 -3)",
|
|
1618
|
+
children: /* @__PURE__ */ Q("path", { d: o.path })
|
|
1619
|
+
}), t[3] = o.path, t[4] = s), a = s;
|
|
1620
|
+
break bb0;
|
|
1621
|
+
}
|
|
1622
|
+
case "queue": {
|
|
1623
|
+
let e = r + 6, n = i + 6, o;
|
|
1624
|
+
t[5] !== e || t[6] !== n ? (o = queueSVGPath(e, n), t[5] = e, t[6] = n, t[7] = o) : o = t[7];
|
|
1625
|
+
let s;
|
|
1626
|
+
t[8] === o.path ? s = t[9] : (s = /* @__PURE__ */ Q("g", {
|
|
1627
|
+
transform: "translate(-3 -3)",
|
|
1628
|
+
children: /* @__PURE__ */ Q("path", { d: o.path })
|
|
1629
|
+
}), t[8] = o.path, t[9] = s), a = s;
|
|
1630
|
+
break bb0;
|
|
1631
|
+
}
|
|
1632
|
+
case "document": {
|
|
1633
|
+
let e = r + 6, n = i + 6, o;
|
|
1634
|
+
t[10] !== e || t[11] !== n ? (o = docSVGPath(e, n), t[10] = e, t[11] = n, t[12] = o) : o = t[12];
|
|
1635
|
+
let s;
|
|
1636
|
+
t[13] === o.path ? s = t[14] : (s = /* @__PURE__ */ Q("g", {
|
|
1637
|
+
transform: "translate(-3 -3)",
|
|
1638
|
+
children: /* @__PURE__ */ Q("path", { d: o.path })
|
|
1639
|
+
}), t[13] = o.path, t[14] = s), a = s;
|
|
1640
|
+
break bb0;
|
|
1641
|
+
}
|
|
1642
|
+
case "storage":
|
|
1643
|
+
case "cylinder": {
|
|
1644
|
+
let e = r + 6, n = i + 6, o;
|
|
1645
|
+
t[15] !== e || t[16] !== n ? (o = cylinderSVGPath(e, n), t[15] = e, t[16] = n, t[17] = o) : o = t[17];
|
|
1646
|
+
let s;
|
|
1647
|
+
t[18] === o.path ? s = t[19] : (s = /* @__PURE__ */ Q("g", {
|
|
1648
|
+
transform: "translate(-3 -3)",
|
|
1649
|
+
children: /* @__PURE__ */ Q("path", { d: o.path })
|
|
1650
|
+
}), t[18] = o.path, t[19] = s), a = s;
|
|
1651
|
+
break bb0;
|
|
1652
|
+
}
|
|
1653
|
+
default: {
|
|
1654
|
+
let e = r + 6, n = i + 6, o;
|
|
1655
|
+
t[20] !== e || t[21] !== n ? (o = /* @__PURE__ */ Q("rect", {
|
|
1656
|
+
x: -3,
|
|
1657
|
+
y: -3,
|
|
1658
|
+
width: e,
|
|
1659
|
+
height: n,
|
|
1660
|
+
rx: 8
|
|
1661
|
+
}), t[20] = e, t[21] = n, t[22] = o) : o = t[22], a = o;
|
|
1662
|
+
}
|
|
1663
|
+
}
|
|
1664
|
+
let o;
|
|
1665
|
+
return t[23] === a ? o = t[24] : (o = /* @__PURE__ */ Q("g", {
|
|
1666
|
+
className: "likec4-shape-outline",
|
|
1667
|
+
children: a
|
|
1668
|
+
}), t[23] = a, t[24] = o), o;
|
|
1669
|
+
}
|
|
1670
|
+
function ElementShape(e) {
|
|
1671
|
+
let t = X(38), { data: n, width: r, height: i, showSelectionOutline: a } = e, o = a === void 0 ? !0 : a, s = r && r > 10 ? r : n.width, c = i && i > 10 ? i : n.height, l = n.style?.multiple ?? !1, u = n.style?.border ?? "none", d = u !== "none";
|
|
1672
|
+
if (n.shape === "rectangle") {
|
|
1673
|
+
let e;
|
|
1674
|
+
t[0] === u ? e = t[1] : (e = { borderStyle: u }, t[0] = u, t[1] = e);
|
|
1675
|
+
let n;
|
|
1676
|
+
t[2] !== o || t[3] !== d ? (n = w({
|
|
1677
|
+
shapetype: "html",
|
|
1678
|
+
withBorder: d,
|
|
1679
|
+
withOutline: o
|
|
1680
|
+
}), t[2] = o, t[3] = d, t[4] = n) : n = t[4];
|
|
1681
|
+
let r;
|
|
1682
|
+
t[5] === l ? r = t[6] : (r = l && /* @__PURE__ */ Q("div", { className: "likec4-shape-multiple" }), t[5] = l, t[6] = r);
|
|
1683
|
+
let i;
|
|
1684
|
+
t[7] === Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ Q("div", { className: "likec4-shape-outline" }), t[7] = i) : i = t[7];
|
|
1685
|
+
let a;
|
|
1686
|
+
return t[8] !== e || t[9] !== n || t[10] !== r ? (a = /* @__PURE__ */ $("div", {
|
|
1687
|
+
style: e,
|
|
1688
|
+
className: n,
|
|
1689
|
+
children: [r, i]
|
|
1690
|
+
}), t[8] = e, t[9] = n, t[10] = r, t[11] = a) : a = t[11], a;
|
|
1691
|
+
}
|
|
1692
|
+
let f;
|
|
1693
|
+
t[12] === o ? f = t[13] : (f = w({
|
|
1694
|
+
shapetype: "svg",
|
|
1695
|
+
withOutline: o
|
|
1696
|
+
}), t[12] = o, t[13] = f);
|
|
1697
|
+
let p = f, m;
|
|
1698
|
+
t[14] !== p || t[15] !== n.shape || t[16] !== n.style?.size || t[17] !== c || t[18] !== l || t[19] !== s ? (m = l && /* @__PURE__ */ Q("svg", {
|
|
1699
|
+
className: p,
|
|
1700
|
+
"data-likec4-shape-multiple": "true",
|
|
1701
|
+
viewBox: `0 0 ${s} ${c}`,
|
|
1702
|
+
children: /* @__PURE__ */ Q(ShapeSvg, {
|
|
1703
|
+
shape: n.shape,
|
|
1704
|
+
size: n.style?.size,
|
|
1705
|
+
w: s,
|
|
1706
|
+
h: c
|
|
1707
|
+
})
|
|
1708
|
+
}), t[14] = p, t[15] = n.shape, t[16] = n.style?.size, t[17] = c, t[18] = l, t[19] = s, t[20] = m) : m = t[20];
|
|
1709
|
+
let h = `0 0 ${s} ${c}`, g;
|
|
1710
|
+
t[21] !== n.shape || t[22] !== c || t[23] !== s ? (g = /* @__PURE__ */ Q(ShapeSvgOutline, {
|
|
1711
|
+
shape: n.shape,
|
|
1712
|
+
w: s,
|
|
1713
|
+
h: c
|
|
1714
|
+
}), t[21] = n.shape, t[22] = c, t[23] = s, t[24] = g) : g = t[24];
|
|
1715
|
+
let _ = n.style?.size, v;
|
|
1716
|
+
t[25] !== n.shape || t[26] !== c || t[27] !== _ || t[28] !== s ? (v = /* @__PURE__ */ Q(ShapeSvg, {
|
|
1717
|
+
shape: n.shape,
|
|
1718
|
+
size: _,
|
|
1719
|
+
w: s,
|
|
1720
|
+
h: c
|
|
1721
|
+
}), t[25] = n.shape, t[26] = c, t[27] = _, t[28] = s, t[29] = v) : v = t[29];
|
|
1722
|
+
let y;
|
|
1723
|
+
t[30] !== p || t[31] !== h || t[32] !== g || t[33] !== v ? (y = /* @__PURE__ */ $("svg", {
|
|
1724
|
+
className: p,
|
|
1725
|
+
viewBox: h,
|
|
1726
|
+
children: [g, v]
|
|
1727
|
+
}), t[30] = p, t[31] = h, t[32] = g, t[33] = v, t[34] = y) : y = t[34];
|
|
1728
|
+
let b;
|
|
1729
|
+
return t[35] !== m || t[36] !== y ? (b = /* @__PURE__ */ $(Z, { children: [m, y] }), t[35] = m, t[36] = y, t[37] = b) : b = t[37], b;
|
|
1730
|
+
}
|
|
1731
|
+
//#endregion
|
|
1732
|
+
//#region ../diagram/src/base-primitives/memoEdge.ts
|
|
1733
|
+
var isSame = (e, t) => Math.abs(e - t) < 2.5, edgePropsEqual = (e, t) => e.id === t.id && K(e.selected ?? !1, t.selected ?? !1) && K(e.animated ?? !1, t.animated ?? !1) && K(e.source, t.source) && K(e.target, t.target) && isSame(e.sourceX, t.sourceX) && isSame(e.sourceY, t.sourceY) && isSame(e.targetX, t.targetX) && isSame(e.targetY, t.targetY) && K(e.sourceHandleId ?? null, t.sourceHandleId ?? null) && K(e.targetHandleId ?? null, t.targetHandleId ?? null) && K(e.sourcePosition, t.sourcePosition) && K(e.targetPosition, t.targetPosition) && K(e.data, t.data);
|
|
1734
|
+
function memoEdge(e) {
|
|
1735
|
+
let t = Y(e, edgePropsEqual);
|
|
1736
|
+
return t.displayName = `MemoEdge(${e.displayName || e.name})`, t;
|
|
1737
|
+
}
|
|
1738
|
+
//#endregion
|
|
1739
|
+
//#region ../diagram/src/base-primitives/NodeHandles.tsx
|
|
1740
|
+
function DefaultHandles(e) {
|
|
1741
|
+
let t = X(7), { direction: n } = e, r = n === void 0 ? "TB" : n, i, a;
|
|
1742
|
+
bb0: switch (r) {
|
|
1743
|
+
case "TB":
|
|
1744
|
+
i = V.Bottom, a = V.Top;
|
|
1745
|
+
break bb0;
|
|
1746
|
+
case "BT":
|
|
1747
|
+
i = V.Top, a = V.Bottom;
|
|
1748
|
+
break bb0;
|
|
1749
|
+
case "LR":
|
|
1750
|
+
i = V.Right, a = V.Left;
|
|
1751
|
+
break bb0;
|
|
1752
|
+
case "RL":
|
|
1753
|
+
i = V.Left, a = V.Right;
|
|
1754
|
+
break bb0;
|
|
1755
|
+
default: Se(r);
|
|
1756
|
+
}
|
|
1757
|
+
let o;
|
|
1758
|
+
t[0] === i ? o = t[1] : (o = /* @__PURE__ */ Q(H, {
|
|
1759
|
+
type: "source",
|
|
1760
|
+
position: i,
|
|
1761
|
+
className: "likec4-node-handle-center"
|
|
1762
|
+
}), t[0] = i, t[1] = o);
|
|
1763
|
+
let s;
|
|
1764
|
+
t[2] === a ? s = t[3] : (s = /* @__PURE__ */ Q(H, {
|
|
1765
|
+
type: "target",
|
|
1766
|
+
position: a,
|
|
1767
|
+
className: "likec4-node-handle-center"
|
|
1768
|
+
}), t[2] = a, t[3] = s);
|
|
1769
|
+
let c;
|
|
1770
|
+
return t[4] !== o || t[5] !== s ? (c = /* @__PURE__ */ $(Z, { children: [o, s] }), t[4] = o, t[5] = s, t[6] = c) : c = t[6], c;
|
|
1771
|
+
}
|
|
1772
|
+
//#endregion
|
|
1773
|
+
//#region ../diagram/src/components/Logo.tsx
|
|
1774
|
+
var rt = J((e, t) => {
|
|
1775
|
+
let n = X(5), r, i;
|
|
1776
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ Q("path", {
|
|
1777
|
+
fill: "#5E98AF",
|
|
1778
|
+
d: "M33.95 33.78V0H2.37A2.37 2.37 0 0 0 0 2.35V33.9h33.95v-.12ZM38.57 33.78H55.6v-14.6c0-1.3-1.06-2.35-2.36-2.35H38.57v16.95ZM33.95 38.37H17.04v14.6c0 1.29 1.06 2.35 2.36 2.35h14.67V38.37h-.12ZM38.57 38.37v16.95h14.67c1.3 0 2.36-1.06 2.36-2.36v-14.6H38.57Z"
|
|
1779
|
+
}), i = /* @__PURE__ */ Q("path", {
|
|
1780
|
+
className: C({
|
|
1781
|
+
fill: "[#FCFBF7]",
|
|
1782
|
+
_light: { fill: "[#222221]" }
|
|
1783
|
+
}),
|
|
1784
|
+
d: "M71.61 12.08c-.06 3.61.3 29.95.23 31.87 0 1.8 0 3.6.06 5.41 0 .3.18.58.47.58 4.1.18 8.13-.17 12.22-.11 1.34.05 2.69 0 3.97 0 1.29-.06 1.4-.59 1.35-1.63-.06-1.63-.06-3.08-.06-4.65-.06-.82-.53-1.11-1.23-1.11-2.4.06-4.8-.06-7.19.06-.4.06-.82.06-1.23.06-.7-.06-.87-.24-.93-1v-.86c-.18-4.83.17-9.83.17-14.66-.06-4.07 0-7.73-.06-11.34 0-1.57 0-3.14-.05-4.65-.06-.93 0-1.92-.24-2.85-.11-.35-.29-.81-.7-.81h-5.5c-.93 0-1.22.64-1.28 1.57v4.12ZM103.81 35c-.17-6.63-.1-13.67-.05-20.24 0-2.04-.12-4.25-.12-6.28 0-2.21-.87-2.1-2.04-2.15-1.7-.06-2.46-.06-4.15-.06-1.11-.06-1.58.23-1.58 1.34 0 5.7-.18 21.8-.12 24.13.06 2.33.3 12.91.18 15.24-.06.81 0 1.62.06 2.44.05.29.23.58.7.58 1.93-.12 3.74-.12 5.67-.17.7-.06 1.28-.24 1.58-1 .05-.4-.12-11.04-.12-13.83Zm13.92 4.47c0-2.03-.3-7.56-.23-8.72 0-.17.11-.4.17-.4.12 0 .35.11.41.17 1.87 2.44 10.64 19.36 11.7 19.42.28.06.58.06.87.06 1.99-.12 3.74 0 5.73 0 2.04 0 .7-1.98.35-2.5-.53-.76-7.48-13.14-7.9-13.9-1.16-1.98-2.16-4.13-3.32-6.05-.12-.23-.24-.58-.18-.81.12-.7.3-1.34.59-1.98a93.18 93.18 0 0 1 4.55-8.14c1.88-2.97 2.93-4.83 4.45-7.5.35-.64.58-1.34.82-2.1.05-.29-.18-.58-.53-.58-1.11-.05-5.15 0-6.43 0-.59 0-1.17.12-1.46.64-.76 1.46-8.6 15.7-9.35 16.98-.06.12-.24.18-.41.18 0 0-.12-.18-.12-.3-.06-3.25.53-13.9.4-16.04-.05-1.28-.28-1.4-1.57-1.46-1.4-.05-3.33-.05-4.73-.05-1.3 0-1.4.7-1.58 1.62-.06.18-.06 5.64-.06 8.09 0 3.54-.3 25.76.11 32.8 0 .7.18 1.1.77 1.1 1.57-.12 3.91 0 5.49 0 1.11 0 1.29-.12 1.29-1.98 0-2.5.23-4.77.23-7.85 0-.23-.06-.46-.06-.7Zm25.66-1.4h-.06c0 1.46-.05 2.97 0 4.49.06 1.86.18 3.72.3 5.58 0 .64.17.81.76.93 1.22.29 2.4.35 3.62.35 3.16-.12 6.31.11 9.47 0 1.29-.06 1.87.06 3.16-.18 1.17-.23 1.58-.87 1.58-2.61-.12-1.1-.06-1.57-.06-2.91 0-1.92-1.35-2.56-2.52-2.5-.81.06-4.73-.06-6.31-.06-2.63.06-2.22.4-2.22-2.33 0-2.2.06-5.05.06-7.32 0-1.22.11-1.63 1.28-1.63h7.31c1.17.17 1.99-.64 1.99-1.86 0-1.22.12-1.28.12-2.5l-.18-1.75c-.12-.99-.47-1.33-1.46-1.33-.64 0-1.29.05-1.93.11-2.52.18-3.68-.17-6.14 0-.82 0-.93-.11-1-.87-.23-2.27 0-4.77.24-7.04.06-.93.3-1.1 1.17-1.16l8.24-.06c1.11-.11 1.46-.06 1.4-1.16-.11-1.69.06-3.43-.11-5.12-.12-.93-.41-1.1-1.46-1.1-1.76.05-2.17.05-3.92.17-1.75.06-8.77.06-10.46.06-2.46 0-2.63-.18-2.7 2.8-.1 2.32-.05 4.7-.05 7.09 0 4.07-.23 18.66-.12 21.92Zm47.76-24.82c.06-1.92 0-3.5 0-5.35 0-2.15-3.92-1.92-5.32-1.86a18.95 18.95 0 0 0-15.08 9.77c-.82 1.57-1.4 3.2-1.81 4.88a34 34 0 0 0-.59 12.15c.41 3.78 1.4 7.56 3.74 10.59 4.04 5.3 11.46 7.15 17.83 6.16.3-.06.59-.11.82-.29.18-.11.35-.35.35-.58l.18-3.31c.06-1.05 0-1 0-2.04 0-1.4-2.93-.35-4.74-.35-1.75 0-3.62-.06-5.2-.87-2.8-1.57-4.38-4.71-5.26-7.68-1-3.2-1.23-6.63-.64-9.88.7-4.25 2.74-9.13 7.25-10.59 2.57-.87 5.31-.58 7.89-.29.35.06.58-.17.58-.46Zm26.77 15.3c.06-2.5 0-14.84 0-18.38.06-.82 0-1.63-.11-2.45-.06-.99-.24-1.28-1.29-1.33h-4.44c-.82 0-1.35.4-1.82 1.27-1.34 3.2-10.75 24.02-12.15 26.58-.53.99-1 1.63-1 2.68v4.24c0 .76-.06 1.28 1.23 1.28l11.1-.06c1.47 0 1.47.3 1.47 1.1 0 .88-.12 4.9-.12 5.3 0 .58.12 1.16 1.23 1.16h5.08c1.23 0 1.23-.7 1.23-2.03.06-1.17-.06-3.5-.06-4.66 0-.93.18-.98 1.76-.98 1.22 0 1.75-.12 1.75-.88.06-1.57 0-2.67 0-4.42 0-1.04-.93-.98-2.92-.98-.65 0-.7-.18-.7-1.05-.12-1.8-.24-4.6-.24-6.4Zm-7.25-5.94c-.05.7-.11 10.82-.11 12.27-.06.81-.24 1.05-1 1.1-1.93.06-3.85.06-5.78.06-.47 0-.65-.4-.41-.87.23-.4 4.85-11.57 6.13-14.48.18-.17.24-.35.41-.52.18-.12.41-.18.59-.23.06 0 .23.29.23.46 0 .76-.06 1.51-.06 2.21Z"
|
|
1785
|
+
}), n[0] = r, n[1] = i) : (r = n[0], i = n[1]);
|
|
1786
|
+
let a;
|
|
1787
|
+
return n[2] !== e || n[3] !== t ? (a = /* @__PURE__ */ $("svg", {
|
|
1788
|
+
ref: t,
|
|
1789
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1790
|
+
fill: "none",
|
|
1791
|
+
viewBox: "0 0 222 56",
|
|
1792
|
+
...e,
|
|
1793
|
+
children: [r, i]
|
|
1794
|
+
}), n[2] = e, n[3] = t, n[4] = a) : a = n[4], a;
|
|
1795
|
+
}), it = J((e, t) => {
|
|
1796
|
+
let n = X(4), r;
|
|
1797
|
+
n[0] === Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ Q("path", {
|
|
1798
|
+
fill: "#5E98AF",
|
|
1799
|
+
d: "M33.95 33.78V0H2.37A2.37 2.37 0 0 0 0 2.35V33.9h33.95v-.12ZM38.57 33.78H55.6v-14.6c0-1.3-1.06-2.35-2.36-2.35H38.57v16.95ZM33.95 38.37H17.04v14.6c0 1.29 1.06 2.35 2.36 2.35h14.67V38.37h-.12ZM38.57 38.37v16.95h14.67c1.3 0 2.36-1.06 2.36-2.36v-14.6H38.57Z"
|
|
1800
|
+
}), n[0] = r) : r = n[0];
|
|
1801
|
+
let i;
|
|
1802
|
+
return n[1] !== e || n[2] !== t ? (i = /* @__PURE__ */ Q("svg", {
|
|
1803
|
+
ref: t,
|
|
1804
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1805
|
+
fill: "none",
|
|
1806
|
+
viewBox: "0 0 56 56",
|
|
1807
|
+
...e,
|
|
1808
|
+
children: r
|
|
1809
|
+
}), n[1] = e, n[2] = t, n[3] = i) : i = n[3], i;
|
|
1810
|
+
}), scheme = (e) => `[data-mantine-color-scheme="${e}"]`, at = scheme("dark"), generateCompoundColors = (e, t, n, r) => `
|
|
1811
|
+
${`${e} :is([data-likec4-color="${t}"][data-compound-depth="${r}"])`} {
|
|
1812
|
+
--likec4-palette-fill: ${n.fill};
|
|
1813
|
+
--likec4-palette-stroke: ${n.stroke};
|
|
1814
|
+
}
|
|
1815
|
+
`;
|
|
1816
|
+
function toStyle(e, t) {
|
|
1817
|
+
let { rootSelector: n, name: r, colors: i } = t, { elements: a, relationships: o } = i, s = `${n} :is([data-likec4-color=${r}])`;
|
|
1818
|
+
return [`
|
|
1819
|
+
${s} {
|
|
1820
|
+
--likec4-palette-fill: ${a.fill};
|
|
1821
|
+
--likec4-palette-stroke: ${a.stroke};
|
|
1822
|
+
--likec4-palette-hiContrast: ${a.hiContrast};
|
|
1823
|
+
--likec4-palette-loContrast: ${a.loContrast};
|
|
1824
|
+
--likec4-palette-relation-stroke: ${o.line};
|
|
1825
|
+
--likec4-palette-relation-label: ${o.label};
|
|
1826
|
+
--likec4-palette-relation-label-bg: ${o.labelBg};
|
|
1827
|
+
--likec4-palette-relation-stroke-selected: oklch(from ${o.line} calc(l - 0.15) c h);
|
|
1828
|
+
}
|
|
1829
|
+
${at} ${s} {
|
|
1830
|
+
--likec4-palette-relation-stroke-selected: oklch(from ${o.line} calc(l + 0.15) c h);
|
|
1831
|
+
}
|
|
1832
|
+
|
|
1833
|
+
`, ...e.colorsForCompounds(a, 5).map((e, t) => generateCompoundColors(n, r, e, t + 1))].map((e) => e.trim()).join("\n");
|
|
1834
|
+
}
|
|
1835
|
+
function generateBuiltInColorStyles(e, t) {
|
|
1836
|
+
return s(e.theme.colors, o(), c(([n, r]) => toStyle(e, {
|
|
1837
|
+
rootSelector: t,
|
|
1838
|
+
name: n,
|
|
1839
|
+
colors: r
|
|
1840
|
+
})), l("\n"));
|
|
1841
|
+
}
|
|
1842
|
+
function LikeC4Styles$1(e) {
|
|
1843
|
+
let t = X(7), { id: n } = e, r = `#${n}`, i = p()?.(), a = useLikeC4Styles(), o;
|
|
1844
|
+
t[0] !== a || t[1] !== r ? (o = generateBuiltInColorStyles(a, r), t[0] = a, t[1] = r, t[2] = o) : o = t[2];
|
|
1845
|
+
let s = o, c;
|
|
1846
|
+
return t[3] !== s || t[4] !== n || t[5] !== i ? (c = /* @__PURE__ */ Q(ot, {
|
|
1847
|
+
id: n,
|
|
1848
|
+
nonce: i,
|
|
1849
|
+
colorsStyles: s
|
|
1850
|
+
}), t[3] = s, t[4] = n, t[5] = i, t[6] = c) : c = t[6], c;
|
|
1851
|
+
}
|
|
1852
|
+
e(LikeC4Styles$1, "LikeC4Styles");
|
|
1853
|
+
var ot = Y((e) => {
|
|
1854
|
+
let t = X(6), { id: n, nonce: r, colorsStyles: i } = e, a;
|
|
1855
|
+
t[0] === i ? a = t[1] : (a = { __html: i }, t[0] = i, t[1] = a);
|
|
1856
|
+
let o = r || void 0, s;
|
|
1857
|
+
return t[2] !== n || t[3] !== a || t[4] !== o ? (s = /* @__PURE__ */ Q("style", {
|
|
1858
|
+
type: "text/css",
|
|
1859
|
+
"data-likec4-colors": n,
|
|
1860
|
+
dangerouslySetInnerHTML: a,
|
|
1861
|
+
nonce: o
|
|
1862
|
+
}), t[2] = n, t[3] = a, t[4] = o, t[5] = s) : s = t[5], s;
|
|
1863
|
+
});
|
|
1864
|
+
ot.displayName = "MemoizedStyle";
|
|
1865
|
+
//#endregion
|
|
1866
|
+
export { IconRendererProvider as $, useRootContainerElement as A, getNodeIntersectionFromCenterToPoint as B, useOptionalLikeC4Model as C, RootContainer as D, DefaultMantineProvider as E, Fe as F, roundDpr as G, nodeToRect as H, Pe as I, useXYStore as J, useCurrentZoomAtLeast as K, bezierControlPoints as L, BaseXYFlow as M, Le as N, useRootContainer as O, Ie as P, IconRenderer as Q, bezierPath as R, useOptionalCurrentViewModel as S, EnsureMantine as T, parsePaddings as U, isSamePoint as V, stopPropagation as W, useCallbackRef as X, useXYStoreApi as Y, IconOrShapeRenderer as Z, pickViewBounds as _, memoEdge as a, We as b, ElementData as c, EdgeLabelContainer as d, Ge as f, calcViewBounds as g, calcEdgeBounds as h, DefaultHandles as i, useRootContainerRef as j, useRootContainerContext as k, ElementActionButtons as l, Te as m, rt as n, ElementShape as o, EdgeContainer as p, useXYFlow as q, it as r, tt as s, LikeC4Styles$1 as t, qe as u, useLikeC4Styles as v, FramerMotionConfig as w, He as x, useId$1 as y, getNodeCenter as z };
|