likec4 1.59.4 → 1.61.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.
Files changed (186) hide show
  1. package/README.md +2 -0
  2. package/__app__/codegen/react.mjs +4 -10
  3. package/__app__/codegen/webcomponent.mjs +6 -131
  4. package/__app__/index.html +15 -15
  5. package/__app__/src/aichat/index.mjs +11 -7
  6. package/__app__/src/chunks/AIChat.mjs +1355 -739
  7. package/__app__/src/chunks/ErrorComponent.mjs +444 -0
  8. package/__app__/src/chunks/Header.mjs +269 -0
  9. package/__app__/src/chunks/ViewReact.mjs +438 -0
  10. package/__app__/src/chunks/find.mjs +38 -0
  11. package/__app__/src/chunks/hooks.mjs +158 -472
  12. package/__app__/src/chunks/libs/@tabler/icons-react.mjs +340 -0
  13. package/__app__/src/chunks/libs/@tanstack-ai.mjs +11841 -1417
  14. package/__app__/src/chunks/libs/@tanstack.mjs +5110 -2404
  15. package/__app__/src/chunks/libs/fast-equals.mjs +507 -214
  16. package/__app__/src/chunks/libs/html-to-image.mjs +613 -0
  17. package/__app__/src/chunks/libs/nanostores.mjs +170 -0
  18. package/__app__/src/chunks/libs/react-resizable-panels.mjs +2792 -0
  19. package/__app__/src/chunks/react.mjs +22 -0
  20. package/__app__/src/chunks/rolldown-runtime.mjs +16 -29
  21. package/__app__/src/chunks/router.mjs +106 -0
  22. package/__app__/src/chunks/scope.mjs +106 -0
  23. package/__app__/src/chunks/searchParams.mjs +29 -0
  24. package/__app__/src/chunks/single-index.mjs +465 -0
  25. package/__app__/src/chunks/styled-system.mjs +1826 -2528
  26. package/__app__/src/chunks/useAsync.mjs +69 -0
  27. package/__app__/src/chunks/useSyncedRef.mjs +16 -0
  28. package/__app__/src/components/ColorSchemeToggle.mjs +124 -0
  29. package/__app__/src/components/CopyToClipboard.mjs +53 -0
  30. package/__app__/src/components/ErrorComponent.mjs +1 -0
  31. package/__app__/src/components/NavigationPanel.mjs +63 -0
  32. package/__app__/src/components/NotFound.mjs +155 -0
  33. package/__app__/src/components/ViewOutlet.mjs +9 -0
  34. package/__app__/src/components/model-diff/CompareModelProvider.mjs +44 -0
  35. package/__app__/src/components/model-diff/ModelDiffPanel.mjs +179 -0
  36. package/__app__/src/components/model-diff/compare-model.mjs +76 -0
  37. package/__app__/src/components/model-diff/state.mjs +45 -0
  38. package/__app__/src/components/search/OverviewSearch.mjs +92 -0
  39. package/__app__/src/components/search/OverviewSearchAdapter.mjs +94 -0
  40. package/__app__/src/components/sidebar/DiagramTree.css.mjs +48 -0
  41. package/__app__/src/components/sidebar/DiagramsTree.mjs +304 -0
  42. package/__app__/src/components/sidebar/Drawer.mjs +178 -0
  43. package/__app__/src/components/sidebar/SidebarBurger.mjs +28 -0
  44. package/__app__/src/components/sidebar/data.mjs +94 -0
  45. package/__app__/src/components/sidebar/state.mjs +16 -0
  46. package/__app__/src/components/view-page/Header.mjs +1 -0
  47. package/__app__/src/components/view-page/SelectProject.mjs +258 -0
  48. package/__app__/src/components/view-page/ShareModal.mjs +111 -0
  49. package/__app__/src/components/view-page/share-modal/AlertLocalhost.mjs +31 -0
  50. package/__app__/src/components/view-page/share-modal/CopyButtonChild.mjs +36 -0
  51. package/__app__/src/components/view-page/share-modal/EmbedPanel.mjs +100 -0
  52. package/__app__/src/components/view-page/share-modal/WebcomponentsPanel.mjs +264 -0
  53. package/__app__/src/components/view-page/state.mjs +17 -0
  54. package/__app__/src/context/LikeC4CustomizationContext.mjs +26 -0
  55. package/__app__/src/context/LikeC4IconRendererContext.mjs +29 -0
  56. package/__app__/src/context/LikeC4ModelContext.mjs +34 -0
  57. package/__app__/src/context/LikeC4ProjectsContext.mjs +40 -0
  58. package/__app__/src/context/ModelDiffsContext.mjs +33 -0
  59. package/__app__/src/context/safeCtx.mjs +14 -0
  60. package/__app__/src/fonts.css +112 -1
  61. package/__app__/src/hooks.mjs +1 -0
  62. package/__app__/src/main.mjs +6 -29151
  63. package/__app__/src/pages/EmbedPage.mjs +93 -0
  64. package/__app__/src/pages/ExportPage.mjs +691 -0
  65. package/__app__/src/pages/ProjectsOverview.mjs +23 -0
  66. package/__app__/src/pages/ViewAsD2.mjs +105 -0
  67. package/__app__/src/pages/ViewAsDot.mjs +65 -0
  68. package/__app__/src/pages/ViewAsMmd.mjs +109 -0
  69. package/__app__/src/pages/ViewAsPuml.mjs +105 -0
  70. package/__app__/src/pages/ViewEditor.mjs +220 -0
  71. package/__app__/src/pages/ViewReact.mjs +1 -0
  72. package/__app__/src/pages/export-layout.mjs +95 -0
  73. package/__app__/src/pages/export-page-params.mjs +9 -0
  74. package/__app__/src/pages/styles.css.mjs +23 -0
  75. package/__app__/src/routeTree.gen.mjs +105 -0
  76. package/__app__/src/router.mjs +1 -0
  77. package/__app__/src/routes/__root.mjs +65 -0
  78. package/__app__/src/routes/index.css.mjs +29 -0
  79. package/__app__/src/routes/index.mjs +32 -0
  80. package/__app__/src/routes/project._projectId/-components.mjs +100 -0
  81. package/__app__/src/routes/project._projectId/embed._viewId.mjs +5 -0
  82. package/__app__/src/routes/project._projectId/export._viewId.mjs +24 -0
  83. package/__app__/src/routes/project._projectId/index.mjs +14 -0
  84. package/__app__/src/routes/project._projectId/route.mjs +93 -0
  85. package/__app__/src/routes/project._projectId/view._viewId.d2.mjs +34 -0
  86. package/__app__/src/routes/project._projectId/view._viewId.dot.mjs +41 -0
  87. package/__app__/src/routes/project._projectId/view._viewId.index.mjs +7 -0
  88. package/__app__/src/routes/project._projectId/view._viewId.mjs +23 -0
  89. package/__app__/src/routes/project._projectId/view._viewId.mmd.mjs +39 -0
  90. package/__app__/src/routes/project._projectId/view._viewId.puml.mjs +34 -0
  91. package/__app__/src/routes/projects.mjs +36 -0
  92. package/__app__/src/routes/single-index.mjs +1 -0
  93. package/__app__/src/routes/webcomponent._.mjs +94 -0
  94. package/__app__/src/style.css +18497 -1
  95. package/config/schema.json +146 -97
  96. package/dist/app/render-view-client.css +1 -1
  97. package/dist/app/render-view-client.js +394 -238
  98. package/dist/chunks/enableServer.mjs +1 -1
  99. package/dist/chunks/filenames.mjs +25 -17
  100. package/dist/chunks/generate-likec4.mjs +5 -0
  101. package/dist/chunks/index.d.mts +255 -194
  102. package/dist/chunks/index2.d.mts +8246 -3610
  103. package/dist/chunks/libs/@chenglou/pretext.mjs +9 -0
  104. package/dist/chunks/libs/@chevrotain/gast.mjs +27 -1
  105. package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +81 -9
  106. package/dist/chunks/libs/@logtape/logtape.mjs +5 -4
  107. package/dist/chunks/libs/@lume/kiwi.mjs +1 -1
  108. package/dist/chunks/libs/@ts-graphviz/common.d.mts +2 -4
  109. package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -1
  110. package/dist/chunks/libs/birpc.mjs +1 -1
  111. package/dist/chunks/libs/chevrotain-allstar.mjs +2 -2
  112. package/dist/chunks/libs/chevrotain.mjs +88 -36
  113. package/dist/chunks/libs/clone.mjs +1 -0
  114. package/dist/chunks/libs/eventemitter3.mjs +1 -1
  115. package/dist/chunks/libs/fast-equals.mjs +1 -0
  116. package/dist/chunks/libs/fontkit.mjs +1 -0
  117. package/dist/chunks/libs/json5.mjs +4 -4
  118. package/dist/chunks/libs/langium.d.mts +6707 -6715
  119. package/dist/chunks/libs/langium.mjs +16 -24
  120. package/dist/chunks/libs/merge-error-cause.mjs +1 -1
  121. package/dist/chunks/libs/p-limit.mjs +1 -0
  122. package/dist/chunks/libs/p-queue.mjs +1 -1
  123. package/dist/chunks/libs/package-manager-detector.mjs +1 -1
  124. package/dist/chunks/libs/pako.mjs +1 -1
  125. package/dist/chunks/libs/pathe.mjs +1 -1
  126. package/dist/chunks/libs/pretty-ms.mjs +1 -1
  127. package/dist/chunks/libs/remeda.mjs +1 -1
  128. package/dist/chunks/libs/ufo.mjs +1 -1
  129. package/dist/chunks/libs/unstorage.mjs +1 -1
  130. package/dist/chunks/libs/which.mjs +1 -1
  131. package/dist/chunks/node.mjs +111 -77
  132. package/dist/chunks/rolldown-runtime.mjs +1 -1
  133. package/dist/chunks/sequence-view.mjs +1 -1
  134. package/dist/chunks/vite-plugin.mjs +185 -166
  135. package/dist/cli/index.mjs +254 -1306
  136. package/dist/config/index.d.mts +66 -5
  137. package/dist/config/index.mjs +1 -1
  138. package/dist/generators/likec4.d.mts +6530 -0
  139. package/dist/generators/likec4.mjs +1 -0
  140. package/dist/index.d.mts +2 -4
  141. package/dist/model/index.d.mts +0 -7
  142. package/dist/vite-plugin/index.d.mts +83 -58
  143. package/dist/vite-plugin/index.mjs +1 -1
  144. package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +8 -0
  145. package/dist/vite-plugin/internal/index.d.mts +92 -17
  146. package/dist/vite-plugin/internal/index.mjs +225 -126
  147. package/generators/likec4/package.json +4 -0
  148. package/package.json +134 -122
  149. package/react/index.d.mts +7496 -26659
  150. package/react/index.mjs +533 -63936
  151. package/react/rolldown-runtime-CfRud99p.js +1 -0
  152. package/skills/likec4-dsl/SKILL.md +474 -0
  153. package/skills/likec4-dsl/evals/evals-public.json +207 -0
  154. package/skills/likec4-dsl/evals/grading-spec.json +603 -0
  155. package/skills/likec4-dsl/references/bridge-leanix-drawio.md +42 -0
  156. package/skills/likec4-dsl/references/cli.md +168 -0
  157. package/skills/likec4-dsl/references/configuration.md +266 -0
  158. package/skills/likec4-dsl/references/deployment.md +160 -0
  159. package/skills/likec4-dsl/references/diffs.md +52 -0
  160. package/skills/likec4-dsl/references/dynamic-views.md +455 -0
  161. package/skills/likec4-dsl/references/examples.md +370 -0
  162. package/skills/likec4-dsl/references/identifier-validity.md +90 -0
  163. package/skills/likec4-dsl/references/include-predicates-wildcards.md +180 -0
  164. package/skills/likec4-dsl/references/model.md +182 -0
  165. package/skills/likec4-dsl/references/predicates.md +123 -0
  166. package/skills/likec4-dsl/references/relationships-bidirectional.md +176 -0
  167. package/skills/likec4-dsl/references/specification.md +79 -0
  168. package/skills/likec4-dsl/references/style-tokens-colors.md +150 -0
  169. package/skills/likec4-dsl/references/troubleshooting.md +101 -0
  170. package/skills/likec4-dsl/references/views.md +329 -0
  171. package/vite-plugin-modules.d.ts +126 -51
  172. package/__app__/src/chunks/LikeC4Styles.mjs +0 -2306
  173. package/__app__/src/chunks/ProjectsOverview.mjs +0 -537
  174. package/__app__/src/chunks/es.mjs +0 -439
  175. package/__app__/src/chunks/libs/@floating-ui.mjs +0 -2532
  176. package/__app__/src/chunks/libs/@mantine.mjs +0 -13868
  177. package/__app__/src/chunks/libs/@xstate/react.mjs +0 -2015
  178. package/__app__/src/chunks/libs/@xyflow/react.mjs +0 -5367
  179. package/__app__/src/chunks/libs/bezier-js.mjs +0 -1007
  180. package/__app__/src/chunks/libs/d3.mjs +0 -2817
  181. package/__app__/src/chunks/libs/framer.mjs +0 -5926
  182. package/__app__/src/chunks/libs/zod.mjs +0 -3176
  183. package/dist/chunks/libs/@chevrotain/types.d.mts +0 -108
  184. package/dist/chunks/libs/picomatch.mjs +0 -1
  185. package/dist/chunks/libs/zod.d.mts +0 -3840
  186. package/dist/chunks/libs/zod.mjs +0 -65
@@ -1,2306 +0,0 @@
1
- import { i as r } from "./rolldown-runtime.mjs";
2
- import { A as i, F as a, R as o, S as s, _ as c, c as l, j as u, y as d } from "./hooks.mjs";
3
- import { Et as f, Lt as p, Mt as m, Nt as h, O as g, Pt as _, Rt as v, X as y, Y as b, _ as x, in as S, r as C, u as w, v as T, vt as E, xt as D, zt as O } from "./libs/@mantine.mjs";
4
- import { A as k, I as A, L as j, M, N, _ as P, d as F, f as I, k as L, m as R, p as z, t as B, u as V, v as H } from "./styled-system.mjs";
5
- import { _ as U, a as W, b as ee, f as te, g as ne, h as re, i as ie, m as ae, n as oe, t as se } from "./libs/@xyflow/react.mjs";
6
- import { n as ce, t as G } from "./libs/fast-equals.mjs";
7
- import { t as le } from "./libs/bezier-js.mjs";
8
- import { d as ue, f as de, i as fe, l as pe, n as me, r as he, u as ge } from "./libs/framer.mjs";
9
- import { createContext as K, forwardRef as q, memo as J, useContext as Y, useEffect as _e, useMemo as ve, useRef as ye, useState as be } from "react";
10
- import { c as X } from "react/compiler-runtime";
11
- import { Fragment as Z, jsx as Q, jsxs as $ } from "react/jsx-runtime";
12
- import { invariant as xe, nonexhaustive as Se } from "@likec4/core";
13
- import { BBox as Ce, vector as we } from "@likec4/core/geometry";
14
- import { invariant as Te } from "@likec4/core/utils";
15
- import { LikeC4Styles as Ee } from "@likec4/core/styles";
16
- import { RichText as De, ensureSizes as Oe } from "@likec4/core/types";
17
- //#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/clamp.js
18
- function t$5(...r) {
19
- return o(ke, r);
20
- }
21
- r(t$5, "t");
22
- var ke = /* @__PURE__ */ r((r, { min: i, max: a }) => i !== void 0 && r < i ? i : a !== void 0 && r > a ? a : r, "n");
23
- //#endregion
24
- //#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/hasAtLeast.js
25
- function t$4(...r) {
26
- return o(Ae, r);
27
- }
28
- r(t$4, "t");
29
- var Ae = /* @__PURE__ */ r((r, i) => r.length >= i, "n");
30
- //#endregion
31
- //#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/entries.js
32
- function t$3(...r) {
33
- return o(Object.entries, r);
34
- }
35
- r(t$3, "t");
36
- //#endregion
37
- //#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/isArray.js
38
- function e$2(r) {
39
- return Array.isArray(r);
40
- }
41
- r(e$2, "e");
42
- //#endregion
43
- //#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/isNumber.js
44
- function e$1(r) {
45
- return typeof r == "number" && !Number.isNaN(r);
46
- }
47
- r(e$1, "e");
48
- //#endregion
49
- //#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/isTruthy.js
50
- function e(r) {
51
- return !!r;
52
- }
53
- //#endregion
54
- //#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/join.js
55
- function t$2(...r) {
56
- return o(je, r);
57
- }
58
- r(t$2, "t");
59
- var je = /* @__PURE__ */ r((r, i) => r.join(i), "n");
60
- //#endregion
61
- //#region ../../node_modules/.pnpm/remeda@2.45.0/node_modules/remeda/dist/pickBy.js
62
- function t$1(...r) {
63
- return o(n, r);
64
- }
65
- r(t$1, "t");
66
- function n(r, i) {
67
- let a = {};
68
- for (let [o, s] of Object.entries(r)) i(s, o, r) && (a[o] = s);
69
- return a;
70
- }
71
- var Me = i("outline", "bolt", "Bolt", [["path", {
72
- d: "M13 3l0 7l6 0l-8 11l0 -7l-6 0l8 -11",
73
- key: "svg-0"
74
- }]]), Ne = i("outline", "browser", "Browser", [
75
- ["path", {
76
- d: "M4 8h16",
77
- key: "svg-0"
78
- }],
79
- ["path", {
80
- d: "M4 6a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2l0 -12",
81
- key: "svg-1"
82
- }],
83
- ["path", {
84
- d: "M8 4v4",
85
- key: "svg-2"
86
- }]
87
- ]), Pe = i("outline", "cylinder", "Cylinder", [["path", {
88
- d: "M5 6a7 3 0 1 0 14 0a7 3 0 1 0 -14 0",
89
- key: "svg-0"
90
- }], ["path", {
91
- d: "M5 6v12c0 1.657 3.134 3 7 3s7 -1.343 7 -3v-12",
92
- key: "svg-1"
93
- }]]), Fe = i("outline", "device-mobile", "DeviceMobile", [
94
- ["path", {
95
- d: "M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14",
96
- key: "svg-0"
97
- }],
98
- ["path", {
99
- d: "M11 4h2",
100
- key: "svg-1"
101
- }],
102
- ["path", {
103
- d: "M12 17v.01",
104
- key: "svg-2"
105
- }]
106
- ]), Ie = i("outline", "file-text", "FileText", [
107
- ["path", {
108
- d: "M14 3v4a1 1 0 0 0 1 1h4",
109
- key: "svg-0"
110
- }],
111
- ["path", {
112
- d: "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2",
113
- key: "svg-1"
114
- }],
115
- ["path", {
116
- d: "M9 9l1 0",
117
- key: "svg-2"
118
- }],
119
- ["path", {
120
- d: "M9 13l6 0",
121
- key: "svg-3"
122
- }],
123
- ["path", {
124
- d: "M9 17l6 0",
125
- key: "svg-4"
126
- }]
127
- ]), Le = i("outline", "rectangular-prism", "RectangularPrism", [
128
- ["path", {
129
- d: "M21 14.008v-5.018a1.98 1.98 0 0 0 -1 -1.717l-4 -2.008a2.016 2.016 0 0 0 -2 0l-10 5.008c-.619 .355 -1 1.01 -1 1.718v5.018c0 .709 .381 1.363 1 1.717l4 2.008a2.016 2.016 0 0 0 2 0l10 -5.008c.619 -.355 1 -1.01 1 -1.718",
130
- key: "svg-0"
131
- }],
132
- ["path", {
133
- d: "M9 21v-7.5",
134
- key: "svg-1"
135
- }],
136
- ["path", {
137
- d: "M9 13.5l11.5 -5.5",
138
- key: "svg-2"
139
- }],
140
- ["path", {
141
- d: "M3.5 11l5.5 2.5",
142
- key: "svg-3"
143
- }]
144
- ]), Re = i("outline", "reorder", "Reorder", [
145
- ["path", {
146
- d: "M3 16a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -2",
147
- key: "svg-0"
148
- }],
149
- ["path", {
150
- d: "M10 16a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -2",
151
- key: "svg-1"
152
- }],
153
- ["path", {
154
- d: "M17 16a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1l0 -2",
155
- key: "svg-2"
156
- }],
157
- ["path", {
158
- d: "M5 11v-3a3 3 0 0 1 3 -3h8a3 3 0 0 1 3 3v3",
159
- key: "svg-3"
160
- }],
161
- ["path", {
162
- d: "M16.5 8.5l2.5 2.5l2.5 -2.5",
163
- key: "svg-4"
164
- }]
165
- ]), ze = i("outline", "user", "User", [["path", {
166
- d: "M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",
167
- key: "svg-0"
168
- }], ["path", {
169
- d: "M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",
170
- key: "svg-1"
171
- }]]), Be = i("outline", "zoom-scan", "ZoomScan", [
172
- ["path", {
173
- d: "M8 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0",
174
- key: "svg-0"
175
- }],
176
- ["path", {
177
- d: "M16 16l-2.5 -2.5",
178
- key: "svg-1"
179
- }],
180
- ["path", {
181
- d: "M3 7v-2a2 2 0 0 1 2 -2h2",
182
- key: "svg-2"
183
- }],
184
- ["path", {
185
- d: "M3 17v2a2 2 0 0 0 2 2h2",
186
- key: "svg-3"
187
- }],
188
- ["path", {
189
- d: "M17 3h2a2 2 0 0 1 2 2v2",
190
- key: "svg-4"
191
- }],
192
- ["path", {
193
- d: "M17 21h2a2 2 0 0 0 2 -2v-2",
194
- key: "svg-5"
195
- }]
196
- ]), Ve = K(null);
197
- function IconRendererProvider(r) {
198
- let i = X(5), { value: a, children: o } = r;
199
- if (Y(Ve)) {
200
- let r;
201
- return i[0] === o ? r = i[1] : (r = /* @__PURE__ */ Q(Z, { children: o }), i[0] = o, i[1] = r), r;
202
- }
203
- let s;
204
- return i[2] !== o || i[3] !== a ? (s = /* @__PURE__ */ Q(Ve.Provider, {
205
- value: a,
206
- children: o
207
- }), i[2] = o, i[3] = a, i[4] = s) : s = i[4], s;
208
- }
209
- function IconRenderer({ element: r, className: i, style: a }) {
210
- let o = Y(Ve);
211
- if (!r || !r.icon || r.icon === "none") return null;
212
- let s;
213
- switch (!0) {
214
- case r.icon.startsWith("data:image/svg+xml"):
215
- s = /* @__PURE__ */ Q(SvgDataUrlIcon, {
216
- dataUrl: r.icon,
217
- alt: r.title
218
- });
219
- break;
220
- case r.icon.startsWith("http://"):
221
- case r.icon.startsWith("https://"):
222
- case r.icon.startsWith("data:image"):
223
- s = /* @__PURE__ */ Q("img", {
224
- src: r.icon,
225
- alt: r.title
226
- });
227
- break;
228
- case !!o:
229
- s = /* @__PURE__ */ Q(o, { node: r });
230
- break;
231
- default: s = /* @__PURE__ */ Q(DefaultIconRenderer, { node: r });
232
- }
233
- return s ? /* @__PURE__ */ Q("div", {
234
- className: A(i, "likec4-element-icon"),
235
- "data-likec4-icon": r.icon,
236
- style: a,
237
- children: s
238
- }) : null;
239
- }
240
- var He = {
241
- browser: Ne,
242
- cylinder: Pe,
243
- mobile: Fe,
244
- person: ze,
245
- queue: Re,
246
- rectangle: Le,
247
- storage: Pe,
248
- bucket: Pe,
249
- document: Ie,
250
- component: Le
251
- };
252
- function IconOrShapeRenderer(r) {
253
- let i = X(12), { element: a, className: o, style: s } = r;
254
- if (!a.icon || a.icon === "none") {
255
- let r = He[a.shape], c;
256
- i[0] === o ? c = i[1] : (c = A(o, "likec4-shape-icon"), i[0] = o, i[1] = c);
257
- let l;
258
- i[2] === r ? l = i[3] : (l = /* @__PURE__ */ Q(r, {}), i[2] = r, i[3] = l);
259
- let u;
260
- return i[4] !== s || i[5] !== c || i[6] !== l ? (u = /* @__PURE__ */ Q("div", {
261
- className: c,
262
- style: s,
263
- children: l
264
- }), i[4] = s, i[5] = c, i[6] = l, i[7] = u) : u = i[7], u;
265
- }
266
- let c;
267
- return i[8] !== o || i[9] !== a || i[10] !== s ? (c = /* @__PURE__ */ Q(IconRenderer, {
268
- element: a,
269
- className: o,
270
- style: s
271
- }), i[8] = o, i[9] = a, i[10] = s, i[11] = c) : c = i[11], c;
272
- }
273
- function SvgDataUrlIcon(r) {
274
- let i = X(11), { dataUrl: a, alt: o } = r;
275
- if (!hasCurrentColorReference(a)) {
276
- let r;
277
- return i[0] !== o || i[1] !== a ? (r = /* @__PURE__ */ Q("img", {
278
- src: a,
279
- alt: o
280
- }), i[0] = o, i[1] = a, i[2] = r) : r = i[2], r;
281
- }
282
- let s;
283
- i[3] === a ? s = i[4] : (s = JSON.stringify(a), i[3] = a, i[4] = s);
284
- let c = `url(${s})`, l = o ? "img" : void 0, u;
285
- i[5] === c ? u = i[6] : (u = {
286
- display: "inline-block",
287
- width: "100%",
288
- height: "100%",
289
- backgroundColor: "currentColor",
290
- maskImage: c,
291
- maskRepeat: "no-repeat",
292
- maskPosition: "center",
293
- maskSize: "contain",
294
- WebkitMaskImage: c,
295
- WebkitMaskRepeat: "no-repeat",
296
- WebkitMaskPosition: "center",
297
- WebkitMaskSize: "contain"
298
- }, i[5] = c, i[6] = u);
299
- let d;
300
- return i[7] !== o || i[8] !== l || i[9] !== u ? (d = /* @__PURE__ */ Q("span", {
301
- role: l,
302
- "aria-label": o,
303
- style: u
304
- }), i[7] = o, i[8] = l, i[9] = u, i[10] = d) : d = i[10], d;
305
- }
306
- function hasCurrentColorReference(r) {
307
- return /currentcolor/i.test(decodeSvgDataUrl(r) ?? "");
308
- }
309
- function decodeSvgDataUrl(r) {
310
- if (!r.startsWith("data:image/svg+xml")) return null;
311
- try {
312
- let i = r.indexOf(",");
313
- if (i === -1) return null;
314
- let a = r.slice(i + 1);
315
- if (r.slice(0, i).endsWith(";base64")) return new TextDecoder().decode(Uint8Array.from(atob(a), (r) => r.charCodeAt(0)));
316
- try {
317
- return decodeURIComponent(a);
318
- } catch {
319
- return a;
320
- }
321
- } catch {
322
- return null;
323
- }
324
- }
325
- var iconUrl = (r, i) => `https://icons.like-c4.dev/${encodeURIComponent(r)}/${encodeURIComponent(i)}.svg`;
326
- function BootstrapIconMask(r) {
327
- let i = X(11), a, o;
328
- i[0] === r ? (a = i[1], o = i[2]) : ({name: a, ...o} = r, i[0] = r, i[1] = a, i[2] = o);
329
- let s;
330
- i[3] === a ? s = i[4] : (s = iconUrl("bootstrap", a), i[3] = a, i[4] = s);
331
- let c = s, l = `url("${c}")`, u = `url("${c}")`, d;
332
- i[5] !== l || i[6] !== u ? (d = {
333
- display: "inline-block",
334
- width: "100%",
335
- height: "100%",
336
- backgroundColor: "currentColor",
337
- maskImage: l,
338
- maskRepeat: "no-repeat",
339
- maskPosition: "center",
340
- maskSize: "contain",
341
- WebkitMaskImage: u,
342
- WebkitMaskRepeat: "no-repeat",
343
- WebkitMaskPosition: "center",
344
- WebkitMaskSize: "contain"
345
- }, i[5] = l, i[6] = u, i[7] = d) : d = i[7];
346
- let f = d, p;
347
- return i[8] !== o || i[9] !== f ? (p = /* @__PURE__ */ Q("span", {
348
- ...o,
349
- "aria-hidden": "true",
350
- style: f
351
- }), i[8] = o, i[9] = f, i[10] = p) : p = i[10], p;
352
- }
353
- function DefaultIconRenderer(r) {
354
- let i = X(11), a, o;
355
- if (i[0] === r ? (a = i[1], o = i[2]) : ({node: a, ...o} = r, i[0] = r, i[1] = a, i[2] = o), !a.icon || a.icon === "none") return null;
356
- let s = a.icon, c, l, u;
357
- if (i[3] !== a.icon || i[4] !== o) {
358
- u = Symbol.for("react.early_return_sentinel");
359
- bb0: {
360
- let [r, i, ...a] = s.split(":");
361
- if (!r || !i || a.length > 0) {
362
- u = null;
363
- break bb0;
364
- }
365
- if (r === "bootstrap") {
366
- u = /* @__PURE__ */ Q(BootstrapIconMask, {
367
- ...o,
368
- name: i
369
- });
370
- break bb0;
371
- }
372
- c = o, l = iconUrl(r, i);
373
- }
374
- i[3] = a.icon, i[4] = o, i[5] = c, i[6] = l, i[7] = u;
375
- } else c = i[5], l = i[6], u = i[7];
376
- if (u !== Symbol.for("react.early_return_sentinel")) return u;
377
- let d;
378
- return i[8] !== c || i[9] !== l ? (d = /* @__PURE__ */ Q("img", {
379
- ...c,
380
- src: l
381
- }), i[8] = c, i[9] = l, i[10] = d) : d = i[10], d;
382
- }
383
- //#endregion
384
- //#region ../diagram/src/base/const.ts
385
- var Ue = {
386
- Compound: 1,
387
- Edge: 20,
388
- EdgeLabel: 25,
389
- Element: 20,
390
- Max: 30
391
- }, We = .05, Ge = {
392
- default: "16px",
393
- withControls: {
394
- top: "58px",
395
- left: "16px",
396
- right: "16px",
397
- bottom: "16px"
398
- }
399
- }, Ke = typeof window > "u";
400
- //#endregion
401
- //#region ../diagram/src/base/Background.tsx
402
- function literalToEnum(r) {
403
- switch (r) {
404
- case "dots": return oe.Dots;
405
- case "lines": return oe.Lines;
406
- case "cross": return oe.Cross;
407
- default: Se(r);
408
- }
409
- }
410
- var compareProps = (r, i) => typeof r.background == "string" && typeof i.background == "string" ? r.background === i.background : G(r.background, i.background), qe = J((r) => {
411
- let i = X(6), { background: a } = r;
412
- if (typeof a == "string") {
413
- let r;
414
- i[0] === a ? r = i[1] : (r = literalToEnum(a), i[0] = a, i[1] = r);
415
- let o;
416
- return i[2] === r ? o = i[3] : (o = /* @__PURE__ */ Q(se, {
417
- variant: r,
418
- size: 2,
419
- gap: 20
420
- }), i[2] = r, i[3] = o), o;
421
- }
422
- let o;
423
- return i[4] === a ? o = i[5] : (o = /* @__PURE__ */ Q(se, { ...a }), i[4] = a, i[5] = o), o;
424
- }, compareProps);
425
- qe.displayName = "Background";
426
- //#endregion
427
- //#region ../diagram/src/hooks/useCallbackRef.ts
428
- function useCallbackRef(r) {
429
- let i = ye(r);
430
- return i.current = r, ve(() => {
431
- function callbackRef(...r) {
432
- return i.current?.(...r);
433
- }
434
- return callbackRef;
435
- }, []);
436
- }
437
- //#endregion
438
- //#region ../diagram/src/hooks/useXYFlow.ts
439
- function useXYFlow() {
440
- return ae();
441
- }
442
- function useXYStore(r, i) {
443
- return re(r, i ?? ce);
444
- }
445
- function selectXYStore(r) {
446
- return r;
447
- }
448
- function useXYStoreApi() {
449
- return ne();
450
- }
451
- function useCurrentZoomAtLeast(r) {
452
- let i = X(2), t0;
453
- return i[0] === r ? t0 = i[1] : (t0 = (i) => i.transform[2] >= r, i[0] = r, i[1] = t0), re(t0);
454
- }
455
- var selectZoom = (r) => r.transform[2] < .2;
456
- function useIsZoomTooSmall() {
457
- return re(selectZoom);
458
- }
459
- //#endregion
460
- //#region ../diagram/src/utils/roundDpr.ts
461
- function getDevicePixelRatio() {
462
- let r = typeof window < "u" && typeof window.devicePixelRatio == "number" ? window.devicePixelRatio : 1;
463
- return t$5(Math.floor(r), {
464
- min: 1,
465
- max: 4
466
- });
467
- }
468
- var Je;
469
- function roundDpr(r) {
470
- return Je ??= getDevicePixelRatio(), Je < 2 ? Math.round(r) : Math.round(r * Je) / Je;
471
- }
472
- //#endregion
473
- //#region ../diagram/src/utils/xyflow.ts
474
- function nodeToRect(r) {
475
- return {
476
- x: Math.trunc(r.internals.positionAbsolute.x),
477
- y: Math.trunc(r.internals.positionAbsolute.y),
478
- width: Math.round(r.measured?.width ?? r.width ?? r.initialWidth ?? 0),
479
- height: Math.round(r.measured?.height ?? r.height ?? r.initialHeight ?? 0)
480
- };
481
- }
482
- function getNodeCenter(r) {
483
- let { width: i, height: a } = ee(r), { x: o, y: s } = r.internals.positionAbsolute;
484
- return {
485
- x: Math.round(o + i / 2),
486
- y: Math.round(s + a / 2)
487
- };
488
- }
489
- function getNodeIntersectionFromCenterToPoint(r, i, a = 0) {
490
- let { width: o, height: s } = r, c = Ce.center(r), l = we(i.x, i.y).subtract(c), u = (a + o / 2) / l.x, d = (a + s / 2) / l.y, f = Math.min(Math.abs(u), Math.abs(d));
491
- return we(l).multiply(f).add(c).trunc().toObject();
492
- }
493
- function bezierControlPoints(r) {
494
- let [i, ...a] = r;
495
- Te(i, "start should be defined");
496
- let o = [];
497
- for (; t$4(a, 3);) {
498
- let [r, s, c, ...l] = a, u = new le(i[0], i[1], r[0], r[1], s[0], s[1], c[0], c[1]), d = u.inflections();
499
- d.length === 0 && d.push(.5), d.forEach((r) => {
500
- let { x: i, y: a } = u.get(r);
501
- o.push({
502
- x: Math.trunc(i),
503
- y: Math.trunc(a)
504
- });
505
- }), a = l, i = c;
506
- }
507
- return Te(a.length === 0, "all points should be consumed"), Te(t$4(o, 1), "at least one control point should be generated"), o;
508
- }
509
- function isSamePoint(r, i) {
510
- if (r === i) return !0;
511
- let [a, o] = e$2(r) ? r : [r.x, r.y], [s, c] = e$2(i) ? i : [i.x, i.y];
512
- return Math.hypot(s - a, c - o) < 2.1;
513
- }
514
- function stopPropagation(r) {
515
- r.nativeEvent.stopImmediatePropagation(), r.stopPropagation();
516
- }
517
- var printPoint = (r) => `${Math.trunc(r[0])},${Math.trunc(r[1])}`;
518
- function bezierPath(r) {
519
- let [i, ...a] = r;
520
- Te(i, "start should be defined");
521
- let o = `M ${printPoint(i)}`;
522
- for (; t$4(a, 3);) {
523
- let [r, i, s, ...c] = a;
524
- o += ` C ${printPoint(r)} ${printPoint(i)} ${printPoint(s)}`, a = c;
525
- }
526
- return Te(a.length === 0, "all points should be consumed"), o;
527
- }
528
- function parsePadding(r, i) {
529
- if (typeof r == "number") return Math.floor((i - i / (1 + r)) * .5);
530
- if (typeof r == "string" && r.endsWith("px")) {
531
- let i = parseFloat(r);
532
- if (!Number.isNaN(i)) return Math.floor(i);
533
- }
534
- if (typeof r == "string" && r.endsWith("%")) {
535
- let a = parseFloat(r);
536
- if (!Number.isNaN(a)) return Math.floor(i * a * .01);
537
- }
538
- return console.error(`[React Flow] The padding value "${r}" is invalid. Please provide a number or a string with a valid unit (px or %).`), 0;
539
- }
540
- function parsePaddings(r, i, a) {
541
- if (typeof r == "string" || typeof r == "number") {
542
- let o = parsePadding(r, a), s = parsePadding(r, i);
543
- return {
544
- top: o,
545
- right: s,
546
- bottom: o,
547
- left: s,
548
- x: s * 2,
549
- y: o * 2
550
- };
551
- }
552
- if (typeof r == "object") {
553
- let o = parsePadding(r.top ?? r.y ?? 0, a), s = parsePadding(r.bottom ?? r.y ?? 0, a), c = parsePadding(r.left ?? r.x ?? 0, i), l = parsePadding(r.right ?? r.x ?? 0, i);
554
- return {
555
- top: o,
556
- right: l,
557
- bottom: s,
558
- left: c,
559
- x: c + l,
560
- y: o + s
561
- };
562
- }
563
- return {
564
- top: 0,
565
- right: 0,
566
- bottom: 0,
567
- left: 0,
568
- x: 0,
569
- y: 0
570
- };
571
- }
572
- //#endregion
573
- //#region ../diagram/src/base/Base.ts
574
- var mergeData = (r, i) => Object.assign({}, r, { data: Object.assign({}, r.data, i) }), _setDimmed = (r, i) => (r.data.dimmed ?? !1) === i ? r : mergeData(r, { dimmed: i });
575
- function setDimmed(r, i) {
576
- return i === void 0 ? (i) => _setDimmed(i, r) : _setDimmed(r, i);
577
- }
578
- var _setHovered = (r, i) => (r.data.hovered ?? !1) === i ? r : mergeData(r, { hovered: i });
579
- function setHovered(r, i) {
580
- return i === void 0 ? (i) => _setHovered(i, r) : _setHovered(r, i);
581
- }
582
- function hasSubObject(r, i) {
583
- return r === i || t$3(i).every(([i, a]) => G(r[i] ?? void 0, a));
584
- }
585
- function _setData(r, i) {
586
- return hasSubObject(r.data, i) ? r : mergeData(r, i);
587
- }
588
- function setData(r, i) {
589
- return i === void 0 ? (i) => _setData(i, r) : _setData(r, i);
590
- }
591
- var Ye = {
592
- setDimmed,
593
- setHovered,
594
- setData
595
- };
596
- //#endregion
597
- //#region ../diagram/src/base/keyboardZoom.ts
598
- function isEditableKeyboardTarget(r) {
599
- if (!(r instanceof HTMLElement)) return !1;
600
- let i = r.tagName.toLowerCase();
601
- return i === "input" || i === "textarea" || i === "select" || r.isContentEditable;
602
- }
603
- function getKeyboardZoomAction(r) {
604
- if (!r.ctrlKey && !r.metaKey || isEditableKeyboardTarget(r.target)) return null;
605
- switch (r.key) {
606
- case "+":
607
- case "=": return "zoom-in";
608
- case "-":
609
- case "_": return "zoom-out";
610
- case "0": return "reset";
611
- default: return null;
612
- }
613
- }
614
- //#endregion
615
- //#region ../diagram/src/base/BaseXYFlow.tsx
616
- var Xe = {
617
- "node.a11yDescription.default": "Press Enter or Space to select this node and reveal its actions.",
618
- "node.a11yDescription.keyboardDisabled": "Keyboard activation is disabled.",
619
- "edge.a11yDescription.default": "Press Enter or Space to select this relationship and reveal its actions."
620
- };
621
- function activateFocusedElement(r) {
622
- if (r.repeat || r.key !== "Enter" && r.key !== " ") return;
623
- let i = r.target;
624
- if (!(i instanceof Element)) return;
625
- let a = i.closest("a,button,input,textarea,select,[role=\"button\"],[role=\"link\"],[contenteditable=\"true\"]");
626
- if (a && !a.classList.contains("react-flow__node") && !a.classList.contains("react-flow__edge")) return;
627
- let o = i.closest(".react-flow__node[data-id], .react-flow__edge[data-id]"), s = o?.ownerDocument.defaultView;
628
- if (!o || !s) return;
629
- r.preventDefault();
630
- let c = o.getBoundingClientRect();
631
- o.dispatchEvent(new s.MouseEvent("click", {
632
- bubbles: !0,
633
- cancelable: !0,
634
- button: 0,
635
- clientX: c.left + c.width / 2,
636
- clientY: c.top + c.height / 2,
637
- detail: 1,
638
- view: s
639
- }));
640
- }
641
- function BaseXYFlow(r) {
642
- let i = X(107), a, o, s, c, l, u, d, f, m, h, g, _, v, y, b, x, S, C, w, T, E, D, O, k, j, M, N, P;
643
- i[0] === r ? (a = i[1], o = i[2], s = i[3], c = i[4], l = i[5], u = i[6], d = i[7], f = i[8], m = i[9], h = i[10], g = i[11], _ = i[12], v = i[13], y = i[14], b = i[15], x = i[16], S = i[17], C = i[18], w = i[19], T = i[20], E = i[21], D = i[22], O = i[23], k = i[24], j = i[25], M = i[26], N = i[27], P = i[28]) : ({nodes: u, edges: l, onEdgesChange: m, onNodesChange: y, className: s, pannable: S, zoomable: E, nodesSelectable: D, nodesDraggable: O, background: k, children: o, colorMode: c, fitViewPadding: j, zoomOnDoubleClick: M, onViewportResize: b, onMoveEnd: g, onNodeMouseEnter: _, onNodeMouseLeave: v, onEdgeMouseEnter: d, onEdgeMouseLeave: f, onKeyDownCapture: h, ariaLabelConfig: a, nodesFocusable: N, edgesFocusable: P, showControls: C, minZoom: w, maxZoom: T, ...x} = r, i[0] = r, i[1] = a, i[2] = o, i[3] = s, i[4] = c, i[5] = l, i[6] = u, i[7] = d, i[8] = f, i[9] = m, i[10] = h, i[11] = g, i[12] = _, i[13] = v, i[14] = y, i[15] = b, i[16] = x, i[17] = S, i[18] = C, i[19] = w, i[20] = T, i[21] = E, i[22] = D, i[23] = O, i[24] = k, i[25] = j, i[26] = M, i[27] = N, i[28] = P);
644
- let F = S === void 0 || S, I = E === void 0 || E, L = D === void 0 || D, R = O !== void 0 && O, z = k === void 0 ? "dots" : k, B = j === void 0 ? 0 : j, V = M !== void 0 && M, H = N === void 0 ? R || L : N, U = P !== void 0 && P, W = w === void 0 ? We : w, ee = T === void 0 ? 3 : T, ne = Math.min(ee, 1), re;
645
- i[29] !== B || i[30] !== W || i[31] !== ne ? (re = {
646
- minZoom: W,
647
- maxZoom: ne,
648
- padding: B,
649
- includeHiddenNodes: !1
650
- }, i[29] = B, i[30] = W, i[31] = ne, i[32] = re) : re = i[32];
651
- let ie = re, ae = z !== "transparent" && z !== "solid", oe = useIsZoomTooSmall(), se = useXYFlow(), ce = useXYStoreApi(), { colorScheme: G } = p();
652
- c ||= G === "auto" ? "system" : G;
653
- let le = x.tabIndex ?? (I ? 0 : void 0), ue = x["aria-label"] !== void 0 || x["aria-labelledby"] !== void 0 || le === void 0 ? x["aria-label"] : "Interactive diagram", t15;
654
- i[33] !== ie || i[34] !== x || i[35] !== se || i[36] !== I ? (t15 = (r) => {
655
- if (x.onKeyDown?.(r), r.defaultPrevented || !I) return;
656
- let i = getKeyboardZoomAction(r.nativeEvent);
657
- if (i) switch (r.preventDefault(), i) {
658
- case "zoom-in":
659
- se.zoomIn();
660
- return;
661
- case "zoom-out":
662
- se.zoomOut();
663
- return;
664
- case "reset":
665
- se.fitView(ie);
666
- return;
667
- }
668
- }, i[33] = ie, i[34] = x, i[35] = se, i[36] = I, i[37] = t15) : t15 = i[37];
669
- let de = useCallbackRef(t15), fe = c, pe = u, me = l, he = z === "transparent" && "bg-transparent", ge;
670
- i[38] !== s || i[39] !== he ? (ge = A(he, s), i[38] = s, i[39] = he, i[40] = ge) : ge = i[40];
671
- let K;
672
- i[41] === oe ? K = i[42] : (K = oe && { "data-likec4-zoom-small": !0 }, i[41] = oe, i[42] = K);
673
- let q = !F && I, J;
674
- i[43] === I ? J = i[44] : (J = !I && { zoomActivationKeyCode: null }, i[43] = I, i[44] = J);
675
- let Y = I ? ee : 1, _e = I ? W : 1, ve = I || F, ye;
676
- i[45] === F ? ye = i[46] : (ye = !F && {
677
- panActivationKeyCode: null,
678
- selectionKeyCode: null
679
- }, i[45] = F, i[46] = ye);
680
- let be;
681
- i[47] === a ? be = i[48] : (be = {
682
- ...Xe,
683
- ...a
684
- }, i[47] = a, i[48] = be);
685
- let Z = y, xe = m, t31;
686
- i[49] !== g || i[50] !== ce ? (t31 = (r, i) => {
687
- let { x: a, y: o, zoom: s } = i, c = roundDpr(a), l = roundDpr(o);
688
- (a !== c || o !== l) && ce.setState({ transform: [
689
- c,
690
- l,
691
- s
692
- ] }), g?.(r, {
693
- x: c,
694
- y: l,
695
- zoom: s
696
- });
697
- }, i[49] = g, i[50] = ce, i[51] = t31) : t31 = i[51];
698
- let Se = useCallbackRef(t31), t33;
699
- i[52] !== _ || i[53] !== y ? (t33 = (r, i) => {
700
- if (_) {
701
- _(r, i);
702
- return;
703
- }
704
- y([{
705
- id: i.id,
706
- type: "replace",
707
- item: Ye.setHovered(i, !0)
708
- }]);
709
- }, i[52] = _, i[53] = y, i[54] = t33) : t33 = i[54];
710
- let Ce = useCallbackRef(t33), t35;
711
- i[55] !== v || i[56] !== y ? (t35 = (r, i) => {
712
- if (v) {
713
- v(r, i);
714
- return;
715
- }
716
- y([{
717
- id: i.id,
718
- type: "replace",
719
- item: Ye.setHovered(i, !1)
720
- }]);
721
- }, i[55] = v, i[56] = y, i[57] = t35) : t35 = i[57];
722
- let we = useCallbackRef(t35), t37;
723
- i[58] !== d || i[59] !== m ? (t37 = (r, i) => {
724
- if (d) {
725
- d(r, i);
726
- return;
727
- }
728
- m([{
729
- id: i.id,
730
- type: "replace",
731
- item: Ye.setHovered(i, !0)
732
- }]);
733
- }, i[58] = d, i[59] = m, i[60] = t37) : t37 = i[60];
734
- let Te = useCallbackRef(t37), t39;
735
- i[61] !== f || i[62] !== m ? (t39 = (r, i) => {
736
- if (f) {
737
- f(r, i);
738
- return;
739
- }
740
- m([{
741
- id: i.id,
742
- type: "replace",
743
- item: Ye.setHovered(i, !1)
744
- }]);
745
- }, i[61] = f, i[62] = m, i[63] = t39) : t39 = i[63];
746
- let Ee = useCallbackRef(t39), t41;
747
- i[64] === h ? t41 = i[65] : (t41 = (r) => {
748
- h?.(r), r.defaultPrevented || activateFocusedElement(r);
749
- }, i[64] = h, i[65] = t41);
750
- let De = useCallbackRef(t41), Oe;
751
- i[66] !== z || i[67] !== ae ? (Oe = ae && /* @__PURE__ */ Q(qe, { background: z }), i[66] = z, i[67] = ae, i[68] = Oe) : Oe = i[68];
752
- let ke;
753
- i[69] === b ? ke = i[70] : (ke = b && /* @__PURE__ */ Q(ViewportResizeHanlder, { onViewportResize: b }), i[69] = b, i[70] = ke);
754
- let Ae;
755
- return i[71] !== ue || i[72] !== o || i[73] !== c || i[74] !== l || i[75] !== U || i[76] !== ie || i[77] !== u || i[78] !== R || i[79] !== H || i[80] !== L || i[81] !== m || i[82] !== de || i[83] !== y || i[84] !== F || i[85] !== x || i[86] !== ge || i[87] !== K || i[88] !== q || i[89] !== J || i[90] !== Y || i[91] !== _e || i[92] !== ve || i[93] !== ye || i[94] !== be || i[95] !== Se || i[96] !== Ce || i[97] !== we || i[98] !== Te || i[99] !== Ee || i[100] !== De || i[101] !== Oe || i[102] !== ke || i[103] !== le || i[104] !== V || i[105] !== I ? (Ae = /* @__PURE__ */ $(te, {
756
- colorMode: fe,
757
- nodes: pe,
758
- edges: me,
759
- className: ge,
760
- ...K,
761
- zoomOnPinch: I,
762
- zoomOnScroll: q,
763
- ...J,
764
- zoomOnDoubleClick: V,
765
- maxZoom: Y,
766
- minZoom: _e,
767
- fitViewOptions: ie,
768
- preventScrolling: ve,
769
- defaultMarkerColor: "var(--xy-edge-stroke)",
770
- noDragClassName: "nodrag",
771
- noPanClassName: "nopan",
772
- noWheelClassName: "nowheel",
773
- panOnScroll: F,
774
- panOnDrag: F,
775
- ...ye,
776
- elementsSelectable: L,
777
- nodesFocusable: H,
778
- edgesFocusable: U,
779
- nodesDraggable: R,
780
- ariaLabelConfig: be,
781
- nodeDragThreshold: 4,
782
- nodeClickDistance: 3,
783
- paneClickDistance: 3,
784
- elevateNodesOnSelect: !1,
785
- selectNodesOnDrag: !1,
786
- onNodesChange: Z,
787
- onEdgesChange: xe,
788
- onMoveEnd: Se,
789
- onNodeMouseEnter: Ce,
790
- onNodeMouseLeave: we,
791
- onEdgeMouseEnter: Te,
792
- onEdgeMouseLeave: Ee,
793
- onNodeDoubleClick: stopPropagation,
794
- onEdgeDoubleClick: stopPropagation,
795
- onKeyDownCapture: De,
796
- ...x,
797
- "aria-label": ue,
798
- tabIndex: le,
799
- onKeyDown: de,
800
- children: [
801
- Oe,
802
- ke,
803
- o
804
- ]
805
- }), i[71] = ue, i[72] = o, i[73] = c, i[74] = l, i[75] = U, i[76] = ie, i[77] = u, i[78] = R, i[79] = H, i[80] = L, i[81] = m, i[82] = de, i[83] = y, i[84] = F, i[85] = x, i[86] = ge, i[87] = K, i[88] = q, i[89] = J, i[90] = Y, i[91] = _e, i[92] = ve, i[93] = ye, i[94] = be, i[95] = Se, i[96] = Ce, i[97] = we, i[98] = Te, i[99] = Ee, i[100] = De, i[101] = Oe, i[102] = ke, i[103] = le, i[104] = V, i[105] = I, i[106] = Ae) : Ae = i[106], Ae;
806
- }
807
- var selectDimensions = ({ width: r, height: i }) => (r || 1) * (i || 1), ViewportResizeHanlder = (r) => {
808
- let i = X(2), { onViewportResize: a } = r, o = re(selectDimensions), c;
809
- return i[0] === o ? c = i[1] : (c = [o], i[0] = o, i[1] = c), s(a, c), null;
810
- }, Ze = K(null), Qe = Ze.Provider;
811
- function useRootContainerContext() {
812
- return Y(Ze);
813
- }
814
- function useRootContainer() {
815
- let r = useRootContainerContext();
816
- if (!r) throw Error("useRootContainer must be used within a RootContainer");
817
- return r;
818
- }
819
- function useRootContainerRef() {
820
- return useRootContainer().ref;
821
- }
822
- function useRootContainerElement() {
823
- return useRootContainer().ref.current;
824
- }
825
- //#endregion
826
- //#region ../diagram/src/components/RootContainer.tsx
827
- function RootContainer(r) {
828
- let i = X(18), { id: a, className: o, reduceGraphics: s, children: l } = r, u = s !== void 0 && s, d = ye(null), [f] = be(_temp$1), p = c(f), m = `#${a}`, h;
829
- i[0] !== f || i[1] !== a || i[2] !== u || i[3] !== m ? (h = {
830
- id: a,
831
- ref: d,
832
- selector: m,
833
- reducedGraphics: u,
834
- $panning: f
835
- }, i[0] = f, i[1] = a, i[2] = u, i[3] = m, i[4] = h) : h = i[4];
836
- let g = h, _;
837
- i[5] === o ? _ = i[6] : (_ = A("likec4-root", o), i[5] = o, i[6] = _);
838
- let v;
839
- i[7] === u ? v = i[8] : (v = u && { "data-likec4-reduced-graphics": !0 }, i[7] = u, i[8] = v);
840
- let y;
841
- i[9] !== l || i[10] !== g ? (y = /* @__PURE__ */ Q(Qe, {
842
- value: g,
843
- children: l
844
- }), i[9] = l, i[10] = g, i[11] = y) : y = i[11];
845
- let b;
846
- return i[12] !== a || i[13] !== p || i[14] !== _ || i[15] !== v || i[16] !== y ? (b = /* @__PURE__ */ Q("div", {
847
- id: a,
848
- className: _,
849
- ref: d,
850
- "data-likec4-diagram-panning": p,
851
- ...v,
852
- children: y
853
- }), i[12] = a, i[13] = p, i[14] = _, i[15] = v, i[16] = y, i[17] = b) : b = i[17], b;
854
- }
855
- function _temp$1() {
856
- return /* @__PURE__ */ d(!1);
857
- }
858
- r(_temp$1, "_temp");
859
- //#endregion
860
- //#region ../diagram/src/LikeC4MantineProvider.tsx
861
- function t(r) {
862
- return N.var(r);
863
- }
864
- var $e = [
865
- "xs",
866
- "sm",
867
- "md",
868
- "lg",
869
- "xl"
870
- ], sizes = (r) => Object.fromEntries($e.map((i) => [i, t(`${r}.${i}`)])), et = [
871
- 0,
872
- 1,
873
- 2,
874
- 3,
875
- 4,
876
- 5,
877
- 6,
878
- 7,
879
- 8,
880
- 9
881
- ], mapColor = (r) => u(et, (i) => t(`colors.${r}.${i}`)), tt = [
882
- j({ textStyle: "h1" }),
883
- j({ textStyle: "h2" }),
884
- j({ textStyle: "h3" }),
885
- j({ textStyle: "h4" }),
886
- j({ textStyle: "h5" }),
887
- j({ textStyle: "h6" })
888
- ], nt = h({
889
- primaryColor: "likec4",
890
- cursorType: "pointer",
891
- autoContrast: !0,
892
- primaryShade: {
893
- light: 5,
894
- dark: 6
895
- },
896
- colors: { likec4: mapColor("likec4.accent") },
897
- fontFamily: t("fonts.body"),
898
- fontFamilyMonospace: t("fonts.mono"),
899
- headings: {
900
- fontFamily: t("fonts.display"),
901
- fontWeight: t("fontWeights.bold")
902
- },
903
- defaultRadius: "sm",
904
- fontWeights: {
905
- regular: t("fontWeights.normal"),
906
- medium: t("fontWeights.medium"),
907
- semibold: t("fontWeights.semibold"),
908
- bold: t("fontWeights.bold")
909
- },
910
- fontSizes: {
911
- ...sizes("fontSizes"),
912
- xxs: t("fontSizes.xxs")
913
- },
914
- spacing: {
915
- ...sizes("spacing"),
916
- xxs: t("spacing.xxs")
917
- },
918
- radius: sizes("radii"),
919
- shadows: sizes("shadows"),
920
- lineHeights: sizes("lineHeights"),
921
- components: {
922
- Card: y.extend({
923
- defaultProps: { radius: "md" },
924
- classNames: { root: j({ bg: "surface.default" }) }
925
- }),
926
- Paper: f.extend({
927
- defaultProps: { radius: "md" },
928
- classNames: { root: j({ bg: "surface.default" }) }
929
- }),
930
- Title: C.extend({ classNames: (r, i) => ({ root: tt[(i.order ?? 1) - 1] }) }),
931
- Code: b.extend({ classNames: { root: j({ bg: "surface.code" }) } }),
932
- Table: w.extend({ classNames: { th: j({
933
- fontSize: "xxs",
934
- fontWeight: "bold",
935
- color: "text.dimmed",
936
- textTransform: "uppercase",
937
- letterSpacing: "caps.sm"
938
- }) } }),
939
- Tooltip: T.extend({ defaultProps: {
940
- color: "dark",
941
- fz: "xs",
942
- withArrow: !1,
943
- openDelay: 600,
944
- closeDelay: 120,
945
- offset: 8
946
- } }),
947
- SegmentedControl: x.extend({ vars: (r, i) => ({ root: { "--sc-font-size": r.fontSizes[i.fz ?? i.size] } }) }),
948
- Popover: D.extend({ defaultProps: {
949
- withArrow: !1,
950
- radius: "sm",
951
- shadow: "lg"
952
- } }),
953
- Menu: g.extend({ defaultProps: {
954
- radius: "sm",
955
- shadow: "lg"
956
- } })
957
- }
958
- }), semantic = (r) => ({
959
- dark: r,
960
- light: r
961
- }), resolver = (r) => ({
962
- variables: { "--mantine-radius-default": t("radii.sm") },
963
- ...semantic({
964
- "--mantine-color-text": t("colors.text"),
965
- "--mantine-color-body": t("colors.surface.default"),
966
- "--mantine-color-placeholder": t("colors.text.non-essential"),
967
- "--mantine-color-anchor": t("colors.text.link"),
968
- "--mantine-color-disabled": t("colors.disabled.body"),
969
- "--mantine-color-disabled-color": t("colors.disabled.text"),
970
- "--mantine-color-disabled-hover": t("colors.disabled.body"),
971
- "--mantine-color-disabled-border": t("colors.disabled.border"),
972
- "--mantine-color-default": t("colors.surface.default"),
973
- "--mantine-color-default-color": t("colors.text"),
974
- "--mantine-color-default-border": t("colors.border.default"),
975
- "--mantine-color-default-hover": t("colors.surface.hover")
976
- })
977
- });
978
- function LikeC4MantineProvider(r) {
979
- let i = X(12), a, o, s, c;
980
- i[0] === r ? (a = i[1], o = i[2], s = i[3], c = i[4]) : ({children: a, defaultColorScheme: s, theme: c, ...o} = r, i[0] = r, i[1] = a, i[2] = o, i[3] = s, i[4] = c);
981
- let l = s === void 0 ? "auto" : s, u;
982
- i[5] === c ? u = i[6] : (u = c ? m(nt, c) : nt, i[5] = c, i[6] = u);
983
- let d = u, f;
984
- return i[7] !== a || i[8] !== l || i[9] !== d || i[10] !== o ? (f = /* @__PURE__ */ Q(_, {
985
- defaultColorScheme: l,
986
- theme: d,
987
- cssVariablesResolver: resolver,
988
- ...o,
989
- children: a
990
- }), i[7] = a, i[8] = l, i[9] = d, i[10] = o, i[11] = f) : f = i[11], f;
991
- }
992
- //#endregion
993
- //#region ../diagram/src/context/EnsureMantine.tsx
994
- function EnsureMantine(r) {
995
- let i = X(7), { children: a } = r, o = Y(v), t1;
996
- i[0] === o ? t1 = i[1] : (t1 = () => {
997
- o || console.warn("LikeC4Diagram must be a child of LikeC4MantineProvider");
998
- }, i[0] = o, i[1] = t1);
999
- let s;
1000
- if (i[2] === Symbol.for("react.memo_cache_sentinel") ? (s = [], i[2] = s) : s = i[2], _e(t1, s), !o) {
1001
- let r;
1002
- return i[3] === a ? r = i[4] : (r = /* @__PURE__ */ Q(LikeC4MantineProvider, { children: a }), i[3] = a, i[4] = r), r;
1003
- }
1004
- let c;
1005
- return i[5] === a ? c = i[6] : (c = /* @__PURE__ */ Q(Z, { children: a }), i[5] = a, i[6] = c), c;
1006
- }
1007
- //#endregion
1008
- //#region ../diagram/src/context/FramerMotionConfig.tsx
1009
- function FramerMotionConfig(r) {
1010
- let i = X(6), { reducedMotion: a, children: o } = r, s = a === void 0 ? "user" : a, c = O()?.(), l;
1011
- i[0] === c ? l = i[1] : (l = c && { nonce: c }, i[0] = c, i[1] = l);
1012
- let u;
1013
- return i[2] !== o || i[3] !== s || i[4] !== l ? (u = /* @__PURE__ */ Q(de, {
1014
- features: pe,
1015
- strict: !0,
1016
- children: /* @__PURE__ */ Q(ge, {
1017
- reducedMotion: s,
1018
- ...l,
1019
- children: o
1020
- })
1021
- }), i[2] = o, i[3] = s, i[4] = l, i[5] = u) : u = i[5], u;
1022
- }
1023
- //#endregion
1024
- //#region ../diagram/src/context/LikeC4ModelContext.tsx
1025
- var rt = K(null), it = rt.Provider, at = K(null), ot = at.Provider;
1026
- function useOptionalLikeC4Model() {
1027
- return Y(rt);
1028
- }
1029
- function useOptionalCurrentViewModel() {
1030
- return Y(at);
1031
- }
1032
- //#endregion
1033
- //#region ../diagram/src/hooks/useLikeC4Styles.ts
1034
- function useLikeC4Styles() {
1035
- return useOptionalLikeC4Model()?.$styles ?? Ee.DEFAULT;
1036
- }
1037
- //#endregion
1038
- //#region ../diagram/src/hooks/useId.ts
1039
- function useId$1() {
1040
- let r = X(2), i = S(), a;
1041
- return r[0] === i ? a = r[1] : (a = i.replace("mantine-", "likec4-"), r[0] = i, r[1] = a), a;
1042
- }
1043
- r(useId$1, "useId");
1044
- //#endregion
1045
- //#region ../diagram/src/context/LikeC4ProjectsContext.ts
1046
- var st = K(null), ct = st.Provider;
1047
- function useOptionalProjectsContext() {
1048
- return Y(st);
1049
- }
1050
- //#endregion
1051
- //#region ../diagram/src/hooks/useLikeC4Project.ts
1052
- var lt = [];
1053
- function onProjectChange(r) {
1054
- console.warn(`Triggered callback to change project to ${r}, but no <LikeC4ProjectsProvider/> found`);
1055
- }
1056
- var ut = {
1057
- projects: lt,
1058
- onProjectChange
1059
- };
1060
- function useLikeC4ProjectsContext() {
1061
- return useOptionalProjectsContext() ?? ut;
1062
- }
1063
- function useLikeC4Projects() {
1064
- return useLikeC4ProjectsContext().projects;
1065
- }
1066
- function useChangeLikeC4Project() {
1067
- return useLikeC4ProjectsContext().onProjectChange;
1068
- }
1069
- function useLikeC4ProjectId() {
1070
- let r = useOptionalLikeC4Model();
1071
- if (!r) throw Error("No LikeC4ModelProvider found");
1072
- return r.projectId;
1073
- }
1074
- //#endregion
1075
- //#region ../diagram/src/components/Logo.tsx
1076
- var dt = q((r, i) => {
1077
- let a = X(5), o, s;
1078
- a[0] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ Q("path", {
1079
- fill: "#5E98AF",
1080
- 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"
1081
- }), s = /* @__PURE__ */ Q("path", {
1082
- className: j({
1083
- fill: "[#FCFBF7]",
1084
- _light: { fill: "[#222221]" }
1085
- }),
1086
- 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"
1087
- }), a[0] = o, a[1] = s) : (o = a[0], s = a[1]);
1088
- let c;
1089
- return a[2] !== r || a[3] !== i ? (c = /* @__PURE__ */ $("svg", {
1090
- ref: i,
1091
- xmlns: "http://www.w3.org/2000/svg",
1092
- fill: "none",
1093
- viewBox: "0 0 222 56",
1094
- ...r,
1095
- children: [o, s]
1096
- }), a[2] = r, a[3] = i, a[4] = c) : c = a[4], c;
1097
- }), ft = q((r, i) => {
1098
- let a = X(4), o;
1099
- a[0] === Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ Q("path", {
1100
- fill: "#5E98AF",
1101
- 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"
1102
- }), a[0] = o) : o = a[0];
1103
- let s;
1104
- return a[1] !== r || a[2] !== i ? (s = /* @__PURE__ */ Q("svg", {
1105
- ref: i,
1106
- xmlns: "http://www.w3.org/2000/svg",
1107
- fill: "none",
1108
- viewBox: "0 0 56 56",
1109
- ...r,
1110
- children: o
1111
- }), a[1] = r, a[2] = i, a[3] = s) : s = a[3], s;
1112
- });
1113
- //#endregion
1114
- //#region ../diagram/src/base-primitives/edge/EdgeContainer.tsx
1115
- function EdgeContainer(r) {
1116
- let i = X(47), a, o, s, c, l, u, d, f, p, m, h, g;
1117
- if (i[0] !== r) {
1118
- let { className: _, component: v, selectable: y, selected: b, data: x, animated: S, children: C, style: w, ...T } = r;
1119
- a = C, s = w, o = v === void 0 ? "g" : v;
1120
- let E = y !== void 0 && y, D = b !== void 0 && b, O, k, j, M, N;
1121
- i[13] === x ? (O = i[14], k = i[15], j = i[16], M = i[17], N = i[18]) : ({color: k, hovered: j, active: M, dimmed: N, ...O} = x, i[13] = x, i[14] = O, i[15] = k, i[16] = j, i[17] = M, i[18] = N);
1122
- let P = k === void 0 ? "gray" : k, F = j !== void 0 && j, I = M !== void 0 && M, L = N !== void 0 && N, R = S !== void 0 && S;
1123
- R ||= I;
1124
- let z = D && "selected", B = E && "selectable";
1125
- i[19] !== _ || i[20] !== z || i[21] !== B ? (c = A(_, "likec4-edge-container", z, B), i[19] = _, i[20] = z, i[21] = B, i[22] = c) : c = i[22], l = P, u = O.dir ?? "forward", d = I, f = F, i[23] === R ? p = i[24] : (p = R && { "data-likec4-animated": R }, i[23] = R, i[24] = p), i[25] === D ? m = i[26] : (m = D && { "data-likec4-selected": D }, i[25] = D, i[26] = m), i[27] === L ? h = i[28] : (h = L !== !1 && { "data-likec4-dimmed": L }, i[27] = L, i[28] = h), g = t$1(T, _temp), i[0] = r, i[1] = a, i[2] = o, i[3] = s, i[4] = c, i[5] = l, i[6] = u, i[7] = d, i[8] = f, i[9] = p, i[10] = m, i[11] = h, i[12] = g;
1126
- } else a = i[1], o = i[2], s = i[3], c = i[4], l = i[5], u = i[6], d = i[7], f = i[8], p = i[9], m = i[10], h = i[11], g = i[12];
1127
- let _;
1128
- i[29] !== c || i[30] !== l || i[31] !== u || i[32] !== d || i[33] !== f || i[34] !== p || i[35] !== m || i[36] !== h || i[37] !== g ? (_ = {
1129
- className: c,
1130
- "data-likec4-color": l,
1131
- "data-edge-dir": u,
1132
- "data-edge-active": d,
1133
- "data-likec4-hovered": f,
1134
- ...p,
1135
- ...m,
1136
- ...h,
1137
- ...g
1138
- }, i[29] = c, i[30] = l, i[31] = u, i[32] = d, i[33] = f, i[34] = p, i[35] = m, i[36] = h, i[37] = g, i[38] = _) : _ = i[38];
1139
- let v = _;
1140
- if (o === "svg") {
1141
- let r;
1142
- return i[39] !== a || i[40] !== v || i[41] !== s ? (r = /* @__PURE__ */ Q("svg", {
1143
- style: s,
1144
- ...v,
1145
- children: a
1146
- }), i[39] = a, i[40] = v, i[41] = s, i[42] = r) : r = i[42], r;
1147
- }
1148
- xe(o === "g", "EdgeContainer: component must be \"g\" or \"svg\"");
1149
- let y;
1150
- return i[43] !== a || i[44] !== v || i[45] !== s ? (y = /* @__PURE__ */ Q("g", {
1151
- style: s,
1152
- ...v,
1153
- children: a
1154
- }), i[43] = a, i[44] = v, i[45] = s, i[46] = y) : y = i[46], y;
1155
- }
1156
- function _temp(r, i) {
1157
- return r !== void 0 && i.startsWith("data-");
1158
- }
1159
- //#endregion
1160
- //#region ../diagram/src/base-primitives/edge/EdgeLabel.tsx
1161
- var pt = q((r, i) => {
1162
- let a = X(34), o, s, c, l, u, d, f;
1163
- a[0] === r ? (o = a[1], s = a[2], c = a[3], l = a[4], u = a[5], d = a[6], f = a[7]) : ({edgeProps: u, isSequenceStep: d, stepNum: l, pointerEvents: f, className: s, children: o, ...c} = r, a[0] = r, a[1] = o, a[2] = s, a[3] = c, a[4] = l, a[5] = u, a[6] = d, a[7] = f);
1164
- let { id: p, data: m, selected: h, selectable: g } = u, { label: _, technology: v, hovered: y } = m, b = y !== void 0 && y, x = h !== void 0 && h, S = g !== void 0 && g, C = d !== void 0 && d, w = f === void 0 ? "all" : f, T;
1165
- a[8] !== _ || a[9] !== v ? (T = e(_) || e(v), a[8] = _, a[9] = v, a[10] = T) : T = a[10];
1166
- let E = T, D;
1167
- a[11] !== s || a[12] !== C || a[13] !== w || a[14] !== S ? (D = A("likec4-edge-label", R({
1168
- pointerEvents: w,
1169
- isStepEdge: C,
1170
- cursor: S || C ? "pointer" : "default"
1171
- }), s), a[11] = s, a[12] = C, a[13] = w, a[14] = S, a[15] = D) : D = a[15];
1172
- let O = b && !x ? 1.06 : 1, k;
1173
- a[16] === O ? k = a[17] : (k = { scale: O }, a[16] = O, a[17] = k);
1174
- let j;
1175
- a[18] !== C || a[19] !== l ? (j = C && l && /* @__PURE__ */ Q(L, {
1176
- className: "likec4-edge-label__step-number",
1177
- children: l
1178
- }), a[18] = C, a[19] = l, a[20] = j) : j = a[20];
1179
- let M;
1180
- a[21] !== o || a[22] !== E || a[23] !== _ || a[24] !== v ? (M = E && /* @__PURE__ */ $(L, {
1181
- className: "likec4-edge-label__contents",
1182
- children: [
1183
- e(_) && /* @__PURE__ */ Q(L, {
1184
- lineClamp: 5,
1185
- className: "likec4-edge-label__text",
1186
- children: _
1187
- }),
1188
- e(v) && /* @__PURE__ */ Q(L, {
1189
- className: "likec4-edge-label__technology",
1190
- children: "[ " + v + " ]"
1191
- }),
1192
- o
1193
- ]
1194
- }), a[21] = o, a[22] = E, a[23] = _, a[24] = v, a[25] = M) : M = a[25];
1195
- let N;
1196
- return a[26] !== p || a[27] !== i || a[28] !== c || a[29] !== k || a[30] !== j || a[31] !== M || a[32] !== D ? (N = /* @__PURE__ */ $(he, {
1197
- ref: i,
1198
- className: D,
1199
- "data-edge-id": p,
1200
- animate: k,
1201
- ...c,
1202
- children: [j, M]
1203
- }), a[26] = p, a[27] = i, a[28] = c, a[29] = k, a[30] = j, a[31] = M, a[32] = D, a[33] = N) : N = a[33], N;
1204
- });
1205
- pt.displayName = "EdgeLabel";
1206
- //#endregion
1207
- //#region ../diagram/src/base-primitives/edge/EdgeLabelContainer.tsx
1208
- var toCssVarValue = (r) => r === void 0 ? "" : e$1(r) ? `${Math.trunc(r)}px` : r;
1209
- function EdgeLabelContainer(r) {
1210
- let i = X(42), a, o, s, c, l, u;
1211
- i[0] === r ? (a = i[1], o = i[2], s = i[3], c = i[4], l = i[5], u = i[6]) : ({edgeProps: u, labelPosition: c, className: o, style: s, children: a, ...l} = r, i[0] = r, i[1] = a, i[2] = o, i[3] = s, i[4] = c, i[5] = l, i[6] = u);
1212
- let { id: d, selected: f, data: p, animated: m } = u, h = f !== void 0 && f, { hovered: g, active: _, dimmed: v, labelBBox: y, color: b } = p, x = g !== void 0 && g, S = _ !== void 0 && _, C = v !== void 0 && v, w = b === void 0 ? "gray" : b, T = c?.x ?? y?.x, E = c?.y ?? y?.y;
1213
- if (T === void 0 || E === void 0) return null;
1214
- let D = c?.translate ?? "";
1215
- m ||= S;
1216
- let O = d, k;
1217
- i[7] === o ? k = i[8] : (k = A("nodrag nopan", "likec4-edge-label-container", o), i[7] = o, i[8] = k);
1218
- let j = m || S, M;
1219
- i[9] === m ? M = i[10] : (M = m && { "data-likec4-animated": m }, i[9] = m, i[10] = M);
1220
- let N;
1221
- i[11] === h ? N = i[12] : (N = h !== !1 && { "data-likec4-selected": h }, i[11] = h, i[12] = N);
1222
- let P;
1223
- i[13] === C ? P = i[14] : (P = C !== !1 && { "data-likec4-dimmed": C }, i[13] = C, i[14] = P);
1224
- let F;
1225
- i[15] === T ? F = i[16] : (F = toCssVarValue(T), i[15] = T, i[16] = F);
1226
- let I;
1227
- i[17] === E ? I = i[18] : (I = toCssVarValue(E), i[17] = E, i[18] = I);
1228
- let L = `translate(${F}, ${I}) ${D}`, R;
1229
- i[19] === L ? R = i[20] : (R = { transform: L }, i[19] = L, i[20] = R);
1230
- let z;
1231
- i[21] === y ? z = i[22] : (z = y && { maxWidth: y.width + 20 }, i[21] = y, i[22] = z);
1232
- let B;
1233
- i[23] !== s || i[24] !== z ? (B = {
1234
- ...s,
1235
- ...z
1236
- }, i[23] = s, i[24] = z, i[25] = B) : B = i[25];
1237
- let V;
1238
- i[26] !== a || i[27] !== B ? (V = /* @__PURE__ */ Q("div", {
1239
- style: B,
1240
- children: a
1241
- }), i[26] = a, i[27] = B, i[28] = V) : V = i[28];
1242
- let H;
1243
- return i[29] !== w || i[30] !== d || i[31] !== S || i[32] !== x || i[33] !== l || i[34] !== j || i[35] !== M || i[36] !== N || i[37] !== P || i[38] !== R || i[39] !== V || i[40] !== k ? (H = /* @__PURE__ */ Q(ie, { children: /* @__PURE__ */ Q("div", {
1244
- ...l,
1245
- className: k,
1246
- "data-likec4-hovered": x,
1247
- "data-likec4-color": w,
1248
- "data-edge-active": S,
1249
- "data-edge-animated": j,
1250
- ...M,
1251
- ...N,
1252
- ...P,
1253
- style: R,
1254
- children: V
1255
- }, O) }), i[29] = w, i[30] = d, i[31] = S, i[32] = x, i[33] = l, i[34] = j, i[35] = M, i[36] = N, i[37] = P, i[38] = R, i[39] = V, i[40] = k, i[41] = H) : H = i[41], H;
1256
- }
1257
- //#endregion
1258
- //#region ../diagram/src/base-primitives/edge/EdgeMarkers.tsx
1259
- var Open = (r) => {
1260
- let i = X(3), a;
1261
- i[0] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ Q("path", {
1262
- d: "M0,0 L7,4 L0,8 L4,4 Z",
1263
- stroke: "context-stroke",
1264
- fill: "context-stroke",
1265
- strokeDasharray: 0,
1266
- strokeWidth: 1,
1267
- strokeLinecap: "round"
1268
- }), i[0] = a) : a = i[0];
1269
- let o;
1270
- return i[1] === r ? o = i[2] : (o = /* @__PURE__ */ Q("marker", {
1271
- viewBox: "-4 -4 14 16",
1272
- refX: 5,
1273
- refY: 4,
1274
- markerWidth: "7",
1275
- markerHeight: "8",
1276
- preserveAspectRatio: "xMaxYMid meet",
1277
- orient: "auto-start-reverse",
1278
- ...r,
1279
- children: a
1280
- }), i[1] = r, i[2] = o), o;
1281
- }, Arrow = (r) => {
1282
- let i = X(3), a;
1283
- i[0] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ Q("path", {
1284
- d: "M 0 0 L 8 3 L 0 6 L 1 3 z",
1285
- fill: "context-stroke",
1286
- strokeWidth: 0
1287
- }), i[0] = a) : a = i[0];
1288
- let o;
1289
- return i[1] === r ? o = i[2] : (o = /* @__PURE__ */ Q("marker", {
1290
- viewBox: "-1 -1 12 10",
1291
- refX: 4,
1292
- refY: 3,
1293
- markerWidth: "8",
1294
- markerHeight: "6",
1295
- preserveAspectRatio: "xMaxYMid meet",
1296
- orient: "auto-start-reverse",
1297
- ...r,
1298
- children: a
1299
- }), i[1] = r, i[2] = o), o;
1300
- }, Crow = (r) => {
1301
- let i = X(3), a;
1302
- i[0] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ Q("path", {
1303
- d: "M 8 0 L 0 4 L 8 8 M 8 4 L 0 4",
1304
- fill: "none",
1305
- strokeWidth: 1
1306
- }), i[0] = a) : a = i[0];
1307
- let o;
1308
- return i[1] === r ? o = i[2] : (o = /* @__PURE__ */ Q("marker", {
1309
- viewBox: "-1 -1 12 12",
1310
- refX: 8,
1311
- refY: 4,
1312
- markerWidth: "8",
1313
- markerHeight: "8",
1314
- preserveAspectRatio: "xMaxYMid meet",
1315
- orient: "auto-start-reverse",
1316
- ...r,
1317
- children: a
1318
- }), i[1] = r, i[2] = o), o;
1319
- }, OArrow = (r) => {
1320
- let i = X(3), a;
1321
- i[0] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ Q("path", {
1322
- d: "M 0 0 L 8 3 L 0 6 L 1 3 z",
1323
- stroke: "context-stroke",
1324
- fill: "var(--likec4-background-color)",
1325
- strokeWidth: 1.25,
1326
- strokeLinejoin: "miter",
1327
- strokeLinecap: "square"
1328
- }), i[0] = a) : a = i[0];
1329
- let o;
1330
- return i[1] === r ? o = i[2] : (o = /* @__PURE__ */ Q("marker", {
1331
- viewBox: "-1 -1 12 10",
1332
- refX: 4,
1333
- refY: 3,
1334
- markerWidth: "8",
1335
- markerHeight: "6",
1336
- preserveAspectRatio: "xMaxYMid meet",
1337
- orient: "auto-start-reverse",
1338
- ...r,
1339
- children: a
1340
- }), i[1] = r, i[2] = o), o;
1341
- }, Diamond = (r) => {
1342
- let i = X(3), a;
1343
- i[0] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ Q("path", {
1344
- d: "M5,0 L10,4 L5,8 L0,4 Z",
1345
- fill: "context-stroke",
1346
- strokeWidth: 0,
1347
- strokeLinecap: "round"
1348
- }), i[0] = a) : a = i[0];
1349
- let o;
1350
- return i[1] === r ? o = i[2] : (o = /* @__PURE__ */ Q("marker", {
1351
- viewBox: "-4 -4 16 14",
1352
- refX: 5,
1353
- refY: 4,
1354
- markerWidth: "10",
1355
- markerHeight: "8",
1356
- preserveAspectRatio: "xMaxYMid meet",
1357
- orient: "auto-start-reverse",
1358
- ...r,
1359
- children: a
1360
- }), i[1] = r, i[2] = o), o;
1361
- }, ODiamond = (r) => {
1362
- let i = X(3), a;
1363
- i[0] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ Q("path", {
1364
- d: "M5,0 L10,4 L5,8 L0,4 Z",
1365
- stroke: "context-stroke",
1366
- fill: "var(--likec4-background-color)",
1367
- strokeWidth: 1.25,
1368
- strokeLinecap: "round"
1369
- }), i[0] = a) : a = i[0];
1370
- let o;
1371
- return i[1] === r ? o = i[2] : (o = /* @__PURE__ */ Q("marker", {
1372
- viewBox: "-4 -4 16 14",
1373
- refX: 6,
1374
- refY: 4,
1375
- markerWidth: "10",
1376
- markerHeight: "8",
1377
- preserveAspectRatio: "xMaxYMid meet",
1378
- orient: "auto-start-reverse",
1379
- ...r,
1380
- children: a
1381
- }), i[1] = r, i[2] = o), o;
1382
- }, Dot = (r) => {
1383
- let i = X(3), a;
1384
- i[0] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ Q("circle", {
1385
- strokeWidth: 0,
1386
- fill: "context-stroke",
1387
- cx: 4,
1388
- cy: 4,
1389
- r: 3
1390
- }), i[0] = a) : a = i[0];
1391
- let o;
1392
- return i[1] === r ? o = i[2] : (o = /* @__PURE__ */ Q("marker", {
1393
- viewBox: "0 0 10 10",
1394
- refX: 4,
1395
- refY: 4,
1396
- markerWidth: "6",
1397
- markerHeight: "6",
1398
- ...r,
1399
- children: a
1400
- }), i[1] = r, i[2] = o), o;
1401
- }, ODot = (r) => {
1402
- let i = X(3), a;
1403
- i[0] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ Q("circle", {
1404
- strokeWidth: 1.25,
1405
- stroke: "context-stroke",
1406
- fill: "var(--likec4-background-color)",
1407
- cx: 4,
1408
- cy: 4,
1409
- r: 3
1410
- }), i[0] = a) : a = i[0];
1411
- let o;
1412
- return i[1] === r ? o = i[2] : (o = /* @__PURE__ */ Q("marker", {
1413
- viewBox: "0 0 10 10",
1414
- refX: 4,
1415
- refY: 4,
1416
- markerWidth: "6",
1417
- markerHeight: "6",
1418
- ...r,
1419
- children: a
1420
- }), i[1] = r, i[2] = o), o;
1421
- }, mt = {
1422
- Arrow,
1423
- Crow,
1424
- OArrow,
1425
- Open,
1426
- Diamond,
1427
- ODiamond,
1428
- Dot,
1429
- ODot
1430
- };
1431
- function arrowTypeToMarker(r) {
1432
- if (r && r !== "none") switch (r) {
1433
- case "normal": return "Arrow";
1434
- case "crow": return "Crow";
1435
- case "onormal": return "OArrow";
1436
- case "diamond": return "Diamond";
1437
- case "odiamond": return "ODiamond";
1438
- case "open":
1439
- case "vee": return "Open";
1440
- case "dot": return "Dot";
1441
- case "odot": return "ODot";
1442
- default: Se(r);
1443
- }
1444
- }
1445
- //#endregion
1446
- //#region ../diagram/src/base-primitives/edge/EdgePath.tsx
1447
- var ht = q((r, i) => {
1448
- let a = X(54), { edgeProps: o, isDragging: s, onEdgePointerDown: c, strokeWidth: l, svgPath: u } = r, { id: d, data: f, selectable: p, style: m, interactionWidth: h } = o, { line: g, dir: _, tail: v, head: y } = f, b = p === void 0 || p, x = s !== void 0 && s, S = arrowTypeToMarker(v), C = arrowTypeToMarker(y ?? "normal");
1449
- _ === "back" && ([S, C] = [C, S]);
1450
- let w = S ? mt[S] : null, T = C ? mt[C] : null, E = g === "dotted", D = E || g === "dashed", O;
1451
- E ? O = "1,8" : D && (O = "8,10");
1452
- let k, M, N, P, F, I, L, R;
1453
- if (a[0] !== T || a[1] !== w || a[2] !== d || a[3] !== h || a[4] !== x || a[5] !== c || a[6] !== b || a[7] !== m || a[8] !== u || a[9] !== i) {
1454
- let r = z();
1455
- a[18] !== h || a[19] !== x || a[20] !== c || a[21] !== b || a[22] !== u ? (M = b && /* @__PURE__ */ Q("path", {
1456
- className: A("react-flow__edge-interaction", j({ fill: "none" })),
1457
- onPointerDown: c,
1458
- d: u,
1459
- style: {
1460
- strokeWidth: h ?? 10,
1461
- stroke: "currentcolor",
1462
- strokeOpacity: 0,
1463
- ...x ? { display: "none" } : {}
1464
- }
1465
- }), a[18] = h, a[19] = x, a[20] = c, a[21] = b, a[22] = u, a[23] = M) : M = a[23];
1466
- let o = `path("${u}")`, s;
1467
- a[24] === o ? s = a[25] : (s = { offsetPath: o }, a[24] = o, a[25] = s), N = /* @__PURE__ */ Q("circle", {
1468
- className: A("likec4-edge-middle-point", r.middlePoint),
1469
- "data-edge-id": d,
1470
- style: s
1471
- }), I = r.markersCtx, L = c;
1472
- let l;
1473
- a[26] !== w || a[27] !== d ? (l = w && /* @__PURE__ */ Q(w, { id: "start" + d }), a[26] = w, a[27] = d, a[28] = l) : l = a[28];
1474
- let f;
1475
- a[29] !== T || a[30] !== d ? (f = T && /* @__PURE__ */ Q(T, { id: "end" + d }), a[29] = T, a[30] = d, a[31] = f) : f = a[31], a[32] !== l || a[33] !== f ? (R = /* @__PURE__ */ $("defs", { children: [l, f] }), a[32] = l, a[33] = f, a[34] = R) : R = a[34], k = /* @__PURE__ */ Q("path", {
1476
- className: A("react-flow__edge-path", "hide-on-reduced-graphics", r.pathBg, x && j({ display: "none" })),
1477
- d: u,
1478
- style: m,
1479
- strokeLinecap: "round"
1480
- }), P = i, F = A("react-flow__edge-path", r.path, b && "react-flow__edge-interaction"), a[0] = T, a[1] = w, a[2] = d, a[3] = h, a[4] = x, a[5] = c, a[6] = b, a[7] = m, a[8] = u, a[9] = i, a[10] = k, a[11] = M, a[12] = N, a[13] = P, a[14] = F, a[15] = I, a[16] = L, a[17] = R;
1481
- } else k = a[10], M = a[11], N = a[12], P = a[13], F = a[14], I = a[15], L = a[16], R = a[17];
1482
- let B = w ? `url(#start${d})` : void 0, V = T ? `url(#end${d})` : void 0, H;
1483
- a[35] !== O || a[36] !== l || a[37] !== m || a[38] !== u || a[39] !== B || a[40] !== V || a[41] !== P || a[42] !== F ? (H = /* @__PURE__ */ Q("path", {
1484
- ref: P,
1485
- className: F,
1486
- d: u,
1487
- style: m,
1488
- strokeWidth: l,
1489
- strokeLinecap: "round",
1490
- strokeDasharray: O,
1491
- markerStart: B,
1492
- markerEnd: V
1493
- }), a[35] = O, a[36] = l, a[37] = m, a[38] = u, a[39] = B, a[40] = V, a[41] = P, a[42] = F, a[43] = H) : H = a[43];
1494
- let U;
1495
- a[44] !== k || a[45] !== H || a[46] !== I || a[47] !== L || a[48] !== R ? (U = /* @__PURE__ */ $("g", {
1496
- className: I,
1497
- onPointerDown: L,
1498
- children: [
1499
- R,
1500
- k,
1501
- H
1502
- ]
1503
- }), a[44] = k, a[45] = H, a[46] = I, a[47] = L, a[48] = R, a[49] = U) : U = a[49];
1504
- let W;
1505
- return a[50] !== M || a[51] !== N || a[52] !== U ? (W = /* @__PURE__ */ $(Z, { children: [
1506
- M,
1507
- N,
1508
- U
1509
- ] }), a[50] = M, a[51] = N, a[52] = U, a[53] = W) : W = a[53], W;
1510
- });
1511
- ht.displayName = "EdgePath";
1512
- //#endregion
1513
- //#region ../diagram/src/base-primitives/element/ElementActionButtons.tsx
1514
- var gt = {
1515
- normal: {
1516
- originY: 0,
1517
- opacity: .75,
1518
- scale: .8,
1519
- y: 0
1520
- },
1521
- selected: {
1522
- originY: 0,
1523
- opacity: 1,
1524
- scale: .9,
1525
- y: 7
1526
- },
1527
- hovered: {
1528
- originY: 0,
1529
- opacity: 1,
1530
- scale: 1.12,
1531
- y: 7
1532
- }
1533
- };
1534
- function ElementActionButtons(r) {
1535
- let i = X(14), { selected: a, data: o, buttons: s } = r, c = a !== void 0 && a, { hovered: l } = o, u = l !== void 0 && l, d = S();
1536
- if (!s.length) return null;
1537
- let f;
1538
- bb0: switch (!0) {
1539
- case u:
1540
- f = "hovered";
1541
- break bb0;
1542
- case c:
1543
- f = "selected";
1544
- break bb0;
1545
- default: f = "normal";
1546
- }
1547
- let p = u || c, m;
1548
- i[0] === Symbol.for("react.memo_cache_sentinel") ? (m = P(), i[0] = m) : m = i[0];
1549
- let h = f, g = `${u}-${c}`, _;
1550
- i[1] === Symbol.for("react.memo_cache_sentinel") ? (_ = A("nodrag nopan"), i[1] = _) : _ = i[1];
1551
- let v;
1552
- if (i[2] !== s || i[3] !== d || i[4] !== p) {
1553
- let t9;
1554
- i[6] !== d || i[7] !== p ? (t9 = (r, i) => /* @__PURE__ */ Q(E, {
1555
- component: me,
1556
- className: H({}),
1557
- initial: !1,
1558
- whileTap: { scale: 1 },
1559
- whileHover: { scale: 1.3 },
1560
- tabIndex: p ? 0 : -1,
1561
- inert: !p || void 0,
1562
- "aria-label": r.ariaLabel ?? r.key ?? "Element action",
1563
- onClick: r.onClick,
1564
- onDoubleClick: stopPropagation,
1565
- children: r.icon || /* @__PURE__ */ Q(Me, {})
1566
- }, `${d}-${r.key ?? i}`), i[6] = d, i[7] = p, i[8] = t9) : t9 = i[8], v = s.map(t9), i[2] = s, i[3] = d, i[4] = p, i[5] = v;
1567
- } else v = i[5];
1568
- let y;
1569
- return i[9] !== u || i[10] !== g || i[11] !== v || i[12] !== f ? (y = /* @__PURE__ */ Q("div", {
1570
- className: m,
1571
- children: /* @__PURE__ */ Q(he, {
1572
- layoutRoot: !0,
1573
- initial: !1,
1574
- variants: gt,
1575
- animate: h,
1576
- layoutDependency: g,
1577
- "data-likec4-hovered": u,
1578
- className: _,
1579
- onClick: stopPropagation,
1580
- children: v
1581
- })
1582
- }), i[9] = u, i[10] = g, i[11] = v, i[12] = f, i[13] = y) : y = i[13], y;
1583
- }
1584
- //#endregion
1585
- //#region ../diagram/src/base-primitives/element/ElementData.tsx
1586
- var resolveIconColor = (r, i) => {
1587
- let a = i.style.iconColor;
1588
- if (!a) return;
1589
- let o = r.colors(a).elements;
1590
- return a === i.color ? o.stroke : o.fill;
1591
- };
1592
- function shouldBlendIconWithPalette(r, i) {
1593
- return !i && r?.startsWith("bootstrap:") === !0;
1594
- }
1595
- var _t = q((r, i) => {
1596
- let a = X(29), o, s, c, l;
1597
- a[0] === r ? (o = a[1], s = a[2], c = a[3], l = a[4]) : ({className: o, style: l, data: s, ...c} = r, a[0] = r, a[1] = o, a[2] = s, a[3] = c, a[4] = l);
1598
- let u = useLikeC4Styles(), d;
1599
- a[5] !== s.style || a[6] !== u ? (d = s.style.iconSize ? u.nodeSizes(s.style).values.iconSize : void 0, a[5] = s.style, a[6] = u, a[7] = d) : d = a[7];
1600
- let f = d, p;
1601
- a[8] !== s || a[9] !== u ? (p = resolveIconColor(u, s), a[8] = s, a[9] = u, a[10] = p) : p = a[10];
1602
- let m = p, h = !!m, g;
1603
- a[11] !== o || a[12] !== s.icon || a[13] !== s.style.iconPosition || a[14] !== h ? (g = A(o, F({
1604
- iconPosition: s.style.iconPosition,
1605
- withIconColor: h,
1606
- withIconBlend: shouldBlendIconWithPalette(s.icon, h)
1607
- }), "likec4-element"), a[11] = o, a[12] = s.icon, a[13] = s.style.iconPosition, a[14] = h, a[15] = g) : g = a[15];
1608
- let _;
1609
- a[16] === f ? _ = a[17] : (_ = f && { "--likec4-icon-size": `${f}px` }, a[16] = f, a[17] = _);
1610
- let v;
1611
- a[18] === m ? v = a[19] : (v = m && { "--likec4-icon-color": m }, a[18] = m, a[19] = v);
1612
- let y;
1613
- a[20] !== l || a[21] !== _ || a[22] !== v ? (y = {
1614
- ...l,
1615
- ..._,
1616
- ...v
1617
- }, a[20] = l, a[21] = _, a[22] = v, a[23] = y) : y = a[23];
1618
- let b;
1619
- return a[24] !== c || a[25] !== i || a[26] !== g || a[27] !== y ? (b = /* @__PURE__ */ Q("div", {
1620
- ...c,
1621
- ref: i,
1622
- className: g,
1623
- style: y
1624
- }), a[24] = c, a[25] = i, a[26] = g, a[27] = y, a[28] = b) : b = a[28], b;
1625
- }), Icon = (r) => {
1626
- let i = X(6), a, o;
1627
- i[0] === r ? (a = i[1], o = i[2]) : ({data: a, ...o} = r, i[0] = r, i[1] = a, i[2] = o);
1628
- let s;
1629
- return i[3] !== a || i[4] !== o ? (s = /* @__PURE__ */ Q(IconRenderer, {
1630
- element: a,
1631
- ...o
1632
- }), i[3] = a, i[4] = o, i[5] = s) : s = i[5], s;
1633
- }, vt = q((r, i) => {
1634
- let a = X(9), o, s;
1635
- a[0] === r ? (o = a[1], s = a[2]) : ({className: o, ...s} = r, a[0] = r, a[1] = o, a[2] = s);
1636
- let c;
1637
- a[3] === o ? c = a[4] : (c = A(o, "likec4-element-node-content"), a[3] = o, a[4] = c);
1638
- let l;
1639
- return a[5] !== s || a[6] !== i || a[7] !== c ? (l = /* @__PURE__ */ Q("div", {
1640
- ...s,
1641
- className: c,
1642
- ref: i
1643
- }), a[5] = s, a[6] = i, a[7] = c, a[8] = l) : l = a[8], l;
1644
- }), yt = q((r, i) => {
1645
- let a = X(11), o, s, c;
1646
- a[0] === r ? (o = a[1], s = a[2], c = a[3]) : ({data: c, className: o, ...s} = r, a[0] = r, a[1] = o, a[2] = s, a[3] = c);
1647
- let { title: l } = c, u;
1648
- a[4] === o ? u = a[5] : (u = A(o, "likec4-element-title"), a[4] = o, a[5] = u);
1649
- let d;
1650
- return a[6] !== s || a[7] !== i || a[8] !== u || a[9] !== l ? (d = /* @__PURE__ */ Q("div", {
1651
- ...s,
1652
- className: u,
1653
- "data-likec4-node-title": "",
1654
- ref: i,
1655
- children: l
1656
- }), a[6] = s, a[7] = i, a[8] = u, a[9] = l, a[10] = d) : d = a[10], d;
1657
- }), bt = q((r, i) => {
1658
- let a = X(10), o, s, c, l;
1659
- a[0] === r ? (o = a[1], s = a[2], c = a[3], l = a[4]) : ({data: c, children: o, className: s, ...l} = r, a[0] = r, a[1] = o, a[2] = s, a[3] = c, a[4] = l);
1660
- let u = c?.technology ?? o, d;
1661
- return a[5] !== s || a[6] !== l || a[7] !== i || a[8] !== u ? (d = e(u) ? /* @__PURE__ */ Q("div", {
1662
- ...l,
1663
- className: A(s, "likec4-element-technology"),
1664
- "data-likec4-node-technology": "",
1665
- ref: i,
1666
- children: u
1667
- }) : null, a[5] = s, a[6] = l, a[7] = i, a[8] = u, a[9] = d) : d = a[9], d;
1668
- }), xt = q((r, i) => {
1669
- let a = X(16), o, s, c;
1670
- a[0] === r ? (o = a[1], s = a[2], c = a[3]) : ({data: c, className: o, ...s} = r, a[0] = r, a[1] = o, a[2] = s, a[3] = c);
1671
- let { description: u } = c;
1672
- if (!u) return null;
1673
- let d;
1674
- a[4] === u ? d = a[5] : (d = De.from(u), a[4] = u, a[5] = d);
1675
- let f = d, p;
1676
- a[6] === o ? p = a[7] : (p = A(o, "likec4-element-description"), a[6] = o, a[7] = p);
1677
- let m = f.isMarkdown ? "8rem" : void 0, h;
1678
- a[8] === m ? h = a[9] : (h = { maxHeight: m }, a[8] = m, a[9] = h);
1679
- let g;
1680
- return a[10] !== f || a[11] !== s || a[12] !== i || a[13] !== p || a[14] !== h ? (g = /* @__PURE__ */ Q(l, {
1681
- ...s,
1682
- className: p,
1683
- "data-likec4-node-description": "",
1684
- value: f,
1685
- uselikec4palette: !0,
1686
- hideIfEmpty: !0,
1687
- style: h,
1688
- ref: i
1689
- }), a[10] = f, a[11] = s, a[12] = i, a[13] = p, a[14] = h, a[15] = g) : g = a[15], g;
1690
- });
1691
- function ElementData(r) {
1692
- let i = X(9), { data: a, "aria-hidden": o } = r, s;
1693
- i[0] === a ? s = i[1] : (s = /* @__PURE__ */ Q(Icon, { data: a }), i[0] = a, i[1] = s);
1694
- let c;
1695
- i[2] === a ? c = i[3] : (c = /* @__PURE__ */ $(vt, { children: [
1696
- /* @__PURE__ */ Q(yt, { data: a }),
1697
- /* @__PURE__ */ Q(bt, { data: a }),
1698
- /* @__PURE__ */ Q(xt, { data: a })
1699
- ] }), i[2] = a, i[3] = c);
1700
- let l;
1701
- return i[4] !== o || i[5] !== a || i[6] !== s || i[7] !== c ? (l = /* @__PURE__ */ $(_t, {
1702
- data: a,
1703
- "aria-hidden": o,
1704
- children: [s, c]
1705
- }), i[4] = o, i[5] = a, i[6] = s, i[7] = c, i[8] = l) : l = i[8], l;
1706
- }
1707
- ElementData.Root = _t, ElementData.Icon = Icon, ElementData.Content = vt, ElementData.Title = yt, ElementData.Technology = bt, ElementData.Description = xt;
1708
- //#endregion
1709
- //#region ../diagram/src/base-primitives/element/ElementNodeContainer.tsx
1710
- var St = {
1711
- normal: { scale: 1 },
1712
- hovered: { scale: 1.05 },
1713
- selected: { scale: 1.02 },
1714
- tap: { scale: .98 }
1715
- }, Ct = q((r, i) => {
1716
- let a = X(34), o, s, c, l, u;
1717
- a[0] === r ? (o = a[1], s = a[2], c = a[3], l = a[4], u = a[5]) : ({nodeProps: u, className: s, style: l, children: o, ...c} = r, a[0] = r, a[1] = o, a[2] = s, a[3] = c, a[4] = l, a[5] = u);
1718
- let { selected: d, selectable: f, data: p } = u, m = d !== void 0 && d, h = f !== void 0 && f, g, _, v, y, b;
1719
- if (a[6] !== m || a[7] !== p) {
1720
- let { hovered: r, dimmed: i, ...o } = p;
1721
- g = o, v = r !== void 0 && r, _ = i !== void 0 && i;
1722
- bb0: switch (!0) {
1723
- case v:
1724
- b = "hovered";
1725
- break bb0;
1726
- case m:
1727
- b = "selected";
1728
- break bb0;
1729
- default: b = "normal";
1730
- }
1731
- y = Oe(g.style ?? {}), a[6] = m, a[7] = p, a[8] = g, a[9] = _, a[10] = v, a[11] = y, a[12] = b;
1732
- } else g = a[8], _ = a[9], v = a[10], y = a[11], b = a[12];
1733
- let { size: x, padding: S, textSize: C } = y, w;
1734
- a[13] === s ? w = a[14] : (w = A(I(), "group", s), a[13] = s, a[14] = w);
1735
- let T;
1736
- a[15] !== h || a[16] !== b ? (T = h && {
1737
- animate: b,
1738
- whileTap: "tap"
1739
- }, a[15] = h, a[16] = b, a[17] = T) : T = a[17];
1740
- let E;
1741
- a[18] === _ ? E = a[19] : (E = _ !== !1 && { "data-likec4-dimmed": _ }, a[18] = _, a[19] = E);
1742
- let D = l, O;
1743
- return a[20] !== o || a[21] !== g.color || a[22] !== g.shape || a[23] !== v || a[24] !== S || a[25] !== i || a[26] !== c || a[27] !== x || a[28] !== w || a[29] !== T || a[30] !== E || a[31] !== D || a[32] !== C ? (O = /* @__PURE__ */ Q(he, {
1744
- ref: i,
1745
- className: w,
1746
- variants: St,
1747
- initial: !1,
1748
- ...T,
1749
- "data-likec4-hovered": v,
1750
- "data-likec4-color": g.color,
1751
- "data-likec4-shape": g.shape,
1752
- "data-likec4-shape-size": x,
1753
- "data-likec4-spacing": S,
1754
- "data-likec4-text-size": C,
1755
- ...E,
1756
- style: D,
1757
- tabIndex: -1,
1758
- ...c,
1759
- children: o
1760
- }), a[20] = o, a[21] = g.color, a[22] = g.shape, a[23] = v, a[24] = S, a[25] = i, a[26] = c, a[27] = x, a[28] = w, a[29] = T, a[30] = E, a[31] = D, a[32] = C, a[33] = O) : O = a[33], O;
1761
- });
1762
- Ct.displayName = "ElementNodeContainer";
1763
- //#endregion
1764
- //#region ../diagram/src/base-primitives/element/ElementShape.tsx
1765
- function cylinderSVGPath(r, i, a = .07) {
1766
- let o = Math.round(r / 2), s = o, c = roundDpr(a * o), l = i - 2 * c;
1767
- return {
1768
- path: ` M ${r},${c}
1769
- a ${s},${c} 0,0,0 ${-r} 0
1770
- l 0,${l}
1771
- a ${s},${c} 0,0,0 ${r} 0
1772
- l 0,${-l}
1773
- z
1774
- `.replace(/\s+/g, " ").trim(),
1775
- ry: c,
1776
- rx: s
1777
- };
1778
- }
1779
- function docSVGPath(r, i) {
1780
- let a = roundDpr(i - i / 8 / 2), o = roundDpr(i / 6);
1781
- return { path: `
1782
- M 0 ${a}
1783
- V 6
1784
- Q 0 0 6 0
1785
- H ${r - 6}
1786
- Q ${r} 0 ${r} 6
1787
- V ${a}
1788
- C ${roundDpr(r * .75)} ${a + o}, ${roundDpr(r * .5)} ${a - o}, 0 ${a}
1789
- `.replace(/\s+/g, " ").trim() };
1790
- }
1791
- function bucketSVGPath(r, i) {
1792
- let a = r / 2, o = roundDpr(a), s = roundDpr(Math.min(i / 8, o * .08)), c = roundDpr(o * .8), l = roundDpr(s * 1.05), u = s, d = i - l, f = a - c;
1793
- return {
1794
- path: `
1795
- M ${r},${u}
1796
- a ${o},${s} 0,0,0 ${-r} 0
1797
- L ${f},${d}
1798
- a ${c},${l} 0,0,0 ${c * 2} 0
1799
- Z
1800
- `.replace(/\s+/g, " ").trim(),
1801
- topRx: o,
1802
- topRy: s,
1803
- bottomRx: c,
1804
- bottomRy: l
1805
- };
1806
- }
1807
- function queueSVGPath(r, i, a = .185) {
1808
- let o = i, s = Math.round(o / 2), c = roundDpr(o / 2 * a);
1809
- return {
1810
- path: `
1811
- M ${c},0
1812
- a ${c},${s} 0,0,0 0 ${o}
1813
- l ${r - 2 * c},0
1814
- a ${c},${s} 0,0,0 0 ${-o}
1815
- z`.replace(/\s+/g, " ").trim(),
1816
- ry: s,
1817
- rx: c
1818
- };
1819
- }
1820
- var wt = {
1821
- width: 115,
1822
- height: 120,
1823
- 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"
1824
- }, ComponentTopLeftRect = (r) => {
1825
- let i = X(5), { index: a, size: o } = r, s, c, l, u, d;
1826
- bb0: switch (o) {
1827
- case "xs":
1828
- case "sm":
1829
- s = 40, c = 18, l = -16, u = 16, d = 10;
1830
- break bb0;
1831
- case "md":
1832
- s = 60, c = 26, l = -20, u = 22, d = 14;
1833
- break bb0;
1834
- case "lg":
1835
- case "xl":
1836
- s = 70, c = 32, l = -24, u = 32, d = 18;
1837
- break bb0;
1838
- default: Se(o);
1839
- }
1840
- let f = u + (c + d) * a, p;
1841
- return i[0] !== c || i[1] !== l || i[2] !== f || i[3] !== s ? (p = /* @__PURE__ */ Q("rect", {
1842
- x: l,
1843
- y: f,
1844
- width: s,
1845
- height: c,
1846
- rx: 3,
1847
- className: "top-left-rect",
1848
- strokeWidth: 2
1849
- }), i[0] = c, i[1] = l, i[2] = f, i[3] = s, i[4] = p) : p = i[4], p;
1850
- };
1851
- function ShapeSvg(r) {
1852
- let i = X(94), { shape: a, w: o, h: s, size: c } = r, l = c === void 0 ? "md" : c;
1853
- switch (a) {
1854
- case "component": {
1855
- let r;
1856
- i[0] !== s || i[1] !== o ? (r = /* @__PURE__ */ Q("rect", {
1857
- width: o,
1858
- height: s,
1859
- rx: 6,
1860
- strokeWidth: 0
1861
- }), i[0] = s, i[1] = o, i[2] = r) : r = i[2];
1862
- let a, c;
1863
- i[3] === l ? (a = i[4], c = i[5]) : (a = /* @__PURE__ */ Q(ComponentTopLeftRect, {
1864
- index: 0,
1865
- size: l
1866
- }), c = /* @__PURE__ */ Q(ComponentTopLeftRect, {
1867
- index: 1,
1868
- size: l
1869
- }), i[3] = l, i[4] = a, i[5] = c);
1870
- let u;
1871
- return i[6] !== r || i[7] !== a || i[8] !== c ? (u = /* @__PURE__ */ $(Z, { children: [
1872
- r,
1873
- a,
1874
- c
1875
- ] }), i[6] = r, i[7] = a, i[8] = c, i[9] = u) : u = i[9], u;
1876
- }
1877
- case "mobile": {
1878
- let r;
1879
- i[10] !== s || i[11] !== o ? (r = /* @__PURE__ */ Q("rect", {
1880
- width: o,
1881
- height: s,
1882
- rx: 6,
1883
- "data-likec4-fill": "mix-stroke",
1884
- strokeWidth: 0
1885
- }), i[10] = s, i[11] = o, i[12] = r) : r = i[12];
1886
- let a = s / 2, c;
1887
- i[13] === a ? c = i[14] : (c = /* @__PURE__ */ Q("circle", {
1888
- cx: 17,
1889
- cy: a,
1890
- r: 12
1891
- }), i[13] = a, i[14] = c);
1892
- let l = o - 44, u = s - 24, d;
1893
- i[15] !== l || i[16] !== u ? (d = /* @__PURE__ */ Q("rect", {
1894
- x: 33,
1895
- y: 12,
1896
- width: l,
1897
- height: u,
1898
- rx: 5
1899
- }), i[15] = l, i[16] = u, i[17] = d) : d = i[17];
1900
- let f;
1901
- i[18] !== c || i[19] !== d ? (f = /* @__PURE__ */ $("g", {
1902
- "data-likec4-fill": "fill",
1903
- strokeWidth: 0,
1904
- children: [c, d]
1905
- }), i[18] = c, i[19] = d, i[20] = f) : f = i[20];
1906
- let p;
1907
- return i[21] !== r || i[22] !== f ? (p = /* @__PURE__ */ $(Z, { children: [r, f] }), i[21] = r, i[22] = f, i[23] = p) : p = i[23], p;
1908
- }
1909
- case "document": {
1910
- let r;
1911
- i[24] !== s || i[25] !== o ? (r = docSVGPath(o, s), i[24] = s, i[25] = o, i[26] = r) : r = i[26];
1912
- let { path: a } = r, c;
1913
- return i[27] === a ? c = i[28] : (c = /* @__PURE__ */ Q("path", {
1914
- d: a,
1915
- "data-likec4-fill": "fill",
1916
- strokeWidth: 2
1917
- }), i[27] = a, i[28] = c), c;
1918
- }
1919
- case "browser": {
1920
- let r;
1921
- i[29] !== s || i[30] !== o ? (r = /* @__PURE__ */ Q("rect", {
1922
- width: o,
1923
- height: s,
1924
- rx: 6,
1925
- "data-likec4-fill": "mix-stroke",
1926
- strokeWidth: 0
1927
- }), i[29] = s, i[30] = o, i[31] = r) : r = i[31];
1928
- let a, c, l;
1929
- i[32] === Symbol.for("react.memo_cache_sentinel") ? (a = /* @__PURE__ */ Q("circle", {
1930
- cx: 16,
1931
- cy: 17,
1932
- r: 7
1933
- }), c = /* @__PURE__ */ Q("circle", {
1934
- cx: 36,
1935
- cy: 17,
1936
- r: 7
1937
- }), l = /* @__PURE__ */ Q("circle", {
1938
- cx: 56,
1939
- cy: 17,
1940
- r: 7
1941
- }), i[32] = a, i[33] = c, i[34] = l) : (a = i[32], c = i[33], l = i[34]);
1942
- let u = o - 80, d;
1943
- i[35] === u ? d = i[36] : (d = /* @__PURE__ */ Q("rect", {
1944
- x: 70,
1945
- y: 8,
1946
- width: u,
1947
- height: 17,
1948
- rx: 4
1949
- }), i[35] = u, i[36] = d);
1950
- let f = o - 20, p = s - 42, m;
1951
- i[37] !== f || i[38] !== p ? (m = /* @__PURE__ */ Q("rect", {
1952
- x: 10,
1953
- y: 32,
1954
- width: f,
1955
- height: p,
1956
- rx: 4
1957
- }), i[37] = f, i[38] = p, i[39] = m) : m = i[39];
1958
- let h;
1959
- i[40] !== m || i[41] !== d ? (h = /* @__PURE__ */ $("g", {
1960
- "data-likec4-fill": "fill",
1961
- strokeWidth: 0,
1962
- children: [
1963
- a,
1964
- c,
1965
- l,
1966
- d,
1967
- m
1968
- ]
1969
- }), i[40] = m, i[41] = d, i[42] = h) : h = i[42];
1970
- let g;
1971
- return i[43] !== h || i[44] !== r ? (g = /* @__PURE__ */ $(Z, { children: [r, h] }), i[43] = h, i[44] = r, i[45] = g) : g = i[45], g;
1972
- }
1973
- case "person": {
1974
- let r;
1975
- i[46] !== s || i[47] !== o ? (r = /* @__PURE__ */ Q("rect", {
1976
- width: o,
1977
- height: s,
1978
- rx: 6,
1979
- strokeWidth: 0
1980
- }), i[46] = s, i[47] = o, i[48] = r) : r = i[48];
1981
- let a = o - wt.width - 6, c = s - wt.height, l;
1982
- i[49] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ Q("path", {
1983
- strokeWidth: 0,
1984
- d: wt.path
1985
- }), i[49] = l) : l = i[49];
1986
- let u;
1987
- i[50] !== a || i[51] !== c ? (u = /* @__PURE__ */ Q("svg", {
1988
- x: a,
1989
- y: c,
1990
- width: wt.width,
1991
- height: wt.height,
1992
- viewBox: `0 0 ${wt.width} ${wt.height}`,
1993
- "data-likec4-fill": "mix-stroke",
1994
- children: l
1995
- }), i[50] = a, i[51] = c, i[52] = u) : u = i[52];
1996
- let d;
1997
- return i[53] !== r || i[54] !== u ? (d = /* @__PURE__ */ $(Z, { children: [r, u] }), i[53] = r, i[54] = u, i[55] = d) : d = i[55], d;
1998
- }
1999
- case "queue": {
2000
- let r;
2001
- i[56] !== s || i[57] !== o ? (r = queueSVGPath(o, s), i[56] = s, i[57] = o, i[58] = r) : r = i[58];
2002
- let { path: a, rx: c, ry: l } = r, u;
2003
- i[59] === a ? u = i[60] : (u = /* @__PURE__ */ Q("path", {
2004
- d: a,
2005
- strokeWidth: 2
2006
- }), i[59] = a, i[60] = u);
2007
- let d = l - .75, f;
2008
- i[61] !== c || i[62] !== l || i[63] !== d ? (f = /* @__PURE__ */ Q("ellipse", {
2009
- cx: c,
2010
- cy: l,
2011
- ry: d,
2012
- rx: c,
2013
- "data-likec4-fill": "mix-stroke",
2014
- strokeWidth: 2
2015
- }), i[61] = c, i[62] = l, i[63] = d, i[64] = f) : f = i[64];
2016
- let p;
2017
- return i[65] !== u || i[66] !== f ? (p = /* @__PURE__ */ $(Z, { children: [u, f] }), i[65] = u, i[66] = f, i[67] = p) : p = i[67], p;
2018
- }
2019
- case "bucket": {
2020
- let r;
2021
- i[68] !== s || i[69] !== o ? (r = bucketSVGPath(o, s), i[68] = s, i[69] = o, i[70] = r) : r = i[70];
2022
- let { path: a, topRx: c, topRy: l } = r, u;
2023
- i[71] === a ? u = i[72] : (u = /* @__PURE__ */ Q("path", {
2024
- d: a,
2025
- strokeWidth: 2
2026
- }), i[71] = a, i[72] = u);
2027
- let d = o / 2, f;
2028
- i[73] !== d || i[74] !== c || i[75] !== l ? (f = /* @__PURE__ */ Q("ellipse", {
2029
- cx: d,
2030
- cy: l,
2031
- rx: c,
2032
- ry: l,
2033
- "data-likec4-fill": "mix-stroke",
2034
- strokeWidth: 2
2035
- }), i[73] = d, i[74] = c, i[75] = l, i[76] = f) : f = i[76];
2036
- let p;
2037
- return i[77] !== u || i[78] !== f ? (p = /* @__PURE__ */ $(Z, { children: [u, f] }), i[77] = u, i[78] = f, i[79] = p) : p = i[79], p;
2038
- }
2039
- case "storage":
2040
- case "cylinder": {
2041
- let r;
2042
- i[80] !== s || i[81] !== o ? (r = cylinderSVGPath(o, s), i[80] = s, i[81] = o, i[82] = r) : r = i[82];
2043
- let { path: a, rx: c, ry: l } = r, u;
2044
- i[83] === a ? u = i[84] : (u = /* @__PURE__ */ Q("path", {
2045
- d: a,
2046
- strokeWidth: 2
2047
- }), i[83] = a, i[84] = u);
2048
- let d = c - .75, f;
2049
- i[85] !== c || i[86] !== l || i[87] !== d ? (f = /* @__PURE__ */ Q("ellipse", {
2050
- cx: c,
2051
- cy: l,
2052
- ry: l,
2053
- rx: d,
2054
- "data-likec4-fill": "mix-stroke",
2055
- strokeWidth: 2
2056
- }), i[85] = c, i[86] = l, i[87] = d, i[88] = f) : f = i[88];
2057
- let p;
2058
- return i[89] !== u || i[90] !== f ? (p = /* @__PURE__ */ $(Z, { children: [u, f] }), i[89] = u, i[90] = f, i[91] = p) : p = i[91], p;
2059
- }
2060
- default: {
2061
- let r;
2062
- return i[92] === a ? r = i[93] : (r = Se(a), i[92] = a, i[93] = r), r;
2063
- }
2064
- }
2065
- }
2066
- function ShapeSvgOutline(r) {
2067
- let i = X(25), { shape: a, w: o, h: s } = r, c;
2068
- bb0: switch (a) {
2069
- case "bucket": {
2070
- let r = o + 6, a = s + 6, l;
2071
- i[0] !== r || i[1] !== a ? (l = bucketSVGPath(r, a), i[0] = r, i[1] = a, i[2] = l) : l = i[2];
2072
- let u;
2073
- i[3] === l.path ? u = i[4] : (u = /* @__PURE__ */ Q("g", {
2074
- transform: "translate(-3 -3)",
2075
- children: /* @__PURE__ */ Q("path", { d: l.path })
2076
- }), i[3] = l.path, i[4] = u), c = u;
2077
- break bb0;
2078
- }
2079
- case "queue": {
2080
- let r = o + 6, a = s + 6, l;
2081
- i[5] !== r || i[6] !== a ? (l = queueSVGPath(r, a), i[5] = r, i[6] = a, i[7] = l) : l = i[7];
2082
- let u;
2083
- i[8] === l.path ? u = i[9] : (u = /* @__PURE__ */ Q("g", {
2084
- transform: "translate(-3 -3)",
2085
- children: /* @__PURE__ */ Q("path", { d: l.path })
2086
- }), i[8] = l.path, i[9] = u), c = u;
2087
- break bb0;
2088
- }
2089
- case "document": {
2090
- let r = o + 6, a = s + 6, l;
2091
- i[10] !== r || i[11] !== a ? (l = docSVGPath(r, a), i[10] = r, i[11] = a, i[12] = l) : l = i[12];
2092
- let u;
2093
- i[13] === l.path ? u = i[14] : (u = /* @__PURE__ */ Q("g", {
2094
- transform: "translate(-3 -3)",
2095
- children: /* @__PURE__ */ Q("path", { d: l.path })
2096
- }), i[13] = l.path, i[14] = u), c = u;
2097
- break bb0;
2098
- }
2099
- case "storage":
2100
- case "cylinder": {
2101
- let r = o + 6, a = s + 6, l;
2102
- i[15] !== r || i[16] !== a ? (l = cylinderSVGPath(r, a), i[15] = r, i[16] = a, i[17] = l) : l = i[17];
2103
- let u;
2104
- i[18] === l.path ? u = i[19] : (u = /* @__PURE__ */ Q("g", {
2105
- transform: "translate(-3 -3)",
2106
- children: /* @__PURE__ */ Q("path", { d: l.path })
2107
- }), i[18] = l.path, i[19] = u), c = u;
2108
- break bb0;
2109
- }
2110
- default: {
2111
- let r = o + 6, a = s + 6, l;
2112
- i[20] !== r || i[21] !== a ? (l = /* @__PURE__ */ Q("rect", {
2113
- x: -3,
2114
- y: -3,
2115
- width: r,
2116
- height: a,
2117
- rx: 8
2118
- }), i[20] = r, i[21] = a, i[22] = l) : l = i[22], c = l;
2119
- }
2120
- }
2121
- let l;
2122
- return i[23] === c ? l = i[24] : (l = /* @__PURE__ */ Q("g", {
2123
- className: "likec4-shape-outline",
2124
- children: c
2125
- }), i[23] = c, i[24] = l), l;
2126
- }
2127
- function ElementShape(r) {
2128
- let i = X(38), { data: a, width: o, height: s, showSelectionOutline: c } = r, l = c === void 0 || c, u = o && o > 10 ? o : a.width, d = s && s > 10 ? s : a.height, f = a.style?.multiple ?? !1, p = a.style?.border ?? "none", m = p !== "none";
2129
- if (a.shape === "rectangle") {
2130
- let r;
2131
- i[0] === p ? r = i[1] : (r = { borderStyle: p }, i[0] = p, i[1] = r);
2132
- let a;
2133
- i[2] !== l || i[3] !== m ? (a = V({
2134
- shapetype: "html",
2135
- withBorder: m,
2136
- withOutline: l
2137
- }), i[2] = l, i[3] = m, i[4] = a) : a = i[4];
2138
- let o;
2139
- i[5] === f ? o = i[6] : (o = f && /* @__PURE__ */ Q("div", { className: "likec4-shape-multiple" }), i[5] = f, i[6] = o);
2140
- let s;
2141
- i[7] === Symbol.for("react.memo_cache_sentinel") ? (s = /* @__PURE__ */ Q("div", { className: "likec4-shape-outline" }), i[7] = s) : s = i[7];
2142
- let c;
2143
- return i[8] !== r || i[9] !== a || i[10] !== o ? (c = /* @__PURE__ */ $("div", {
2144
- "aria-hidden": !0,
2145
- style: r,
2146
- className: a,
2147
- children: [o, s]
2148
- }), i[8] = r, i[9] = a, i[10] = o, i[11] = c) : c = i[11], c;
2149
- }
2150
- let h;
2151
- i[12] === l ? h = i[13] : (h = V({
2152
- shapetype: "svg",
2153
- withOutline: l
2154
- }), i[12] = l, i[13] = h);
2155
- let g = h, _;
2156
- i[14] !== g || i[15] !== a.shape || i[16] !== a.style?.size || i[17] !== d || i[18] !== f || i[19] !== u ? (_ = f && /* @__PURE__ */ Q("svg", {
2157
- "aria-hidden": !0,
2158
- className: g,
2159
- "data-likec4-shape-multiple": "true",
2160
- viewBox: `0 0 ${u} ${d}`,
2161
- children: /* @__PURE__ */ Q(ShapeSvg, {
2162
- shape: a.shape,
2163
- size: a.style?.size,
2164
- w: u,
2165
- h: d
2166
- })
2167
- }), i[14] = g, i[15] = a.shape, i[16] = a.style?.size, i[17] = d, i[18] = f, i[19] = u, i[20] = _) : _ = i[20];
2168
- let v = `0 0 ${u} ${d}`, y;
2169
- i[21] !== a.shape || i[22] !== d || i[23] !== u ? (y = /* @__PURE__ */ Q(ShapeSvgOutline, {
2170
- shape: a.shape,
2171
- w: u,
2172
- h: d
2173
- }), i[21] = a.shape, i[22] = d, i[23] = u, i[24] = y) : y = i[24];
2174
- let b = a.style?.size, x;
2175
- i[25] !== a.shape || i[26] !== d || i[27] !== b || i[28] !== u ? (x = /* @__PURE__ */ Q(ShapeSvg, {
2176
- shape: a.shape,
2177
- size: b,
2178
- w: u,
2179
- h: d
2180
- }), i[25] = a.shape, i[26] = d, i[27] = b, i[28] = u, i[29] = x) : x = i[29];
2181
- let S;
2182
- i[30] !== g || i[31] !== v || i[32] !== y || i[33] !== x ? (S = /* @__PURE__ */ $("svg", {
2183
- "aria-hidden": !0,
2184
- className: g,
2185
- viewBox: v,
2186
- children: [y, x]
2187
- }), i[30] = g, i[31] = v, i[32] = y, i[33] = x, i[34] = S) : S = i[34];
2188
- let C;
2189
- return i[35] !== _ || i[36] !== S ? (C = /* @__PURE__ */ $(Z, { children: [_, S] }), i[35] = _, i[36] = S, i[37] = C) : C = i[37], C;
2190
- }
2191
- //#endregion
2192
- //#region ../diagram/src/base-primitives/memoEdge.ts
2193
- var isSame = (r, i) => Math.abs(r - i) < 2.5, edgePropsEqual = (r, i) => r.id === i.id && G(r.selected ?? !1, i.selected ?? !1) && G(r.animated ?? !1, i.animated ?? !1) && G(r.source, i.source) && G(r.target, i.target) && isSame(r.sourceX, i.sourceX) && isSame(r.sourceY, i.sourceY) && isSame(r.targetX, i.targetX) && isSame(r.targetY, i.targetY) && G(r.sourceHandleId ?? null, i.sourceHandleId ?? null) && G(r.targetHandleId ?? null, i.targetHandleId ?? null) && G(r.sourcePosition, i.sourcePosition) && G(r.targetPosition, i.targetPosition) && G(r.data, i.data);
2194
- function memoEdge(r) {
2195
- let i = J(r, edgePropsEqual);
2196
- return i.displayName = `MemoEdge(${r.displayName || r.name})`, i;
2197
- }
2198
- //#endregion
2199
- //#region ../diagram/src/base-primitives/NodeHandles.tsx
2200
- function DefaultHandles(r) {
2201
- let i = X(7), { direction: a } = r, o = a === void 0 ? "TB" : a, s, c;
2202
- bb0: switch (o) {
2203
- case "TB":
2204
- s = U.Bottom, c = U.Top;
2205
- break bb0;
2206
- case "BT":
2207
- s = U.Top, c = U.Bottom;
2208
- break bb0;
2209
- case "LR":
2210
- s = U.Right, c = U.Left;
2211
- break bb0;
2212
- case "RL":
2213
- s = U.Left, c = U.Right;
2214
- break bb0;
2215
- default: Se(o);
2216
- }
2217
- let l;
2218
- i[0] === s ? l = i[1] : (l = /* @__PURE__ */ Q(W, {
2219
- type: "source",
2220
- position: s,
2221
- className: "likec4-node-handle-center"
2222
- }), i[0] = s, i[1] = l);
2223
- let u;
2224
- i[2] === c ? u = i[3] : (u = /* @__PURE__ */ Q(W, {
2225
- type: "target",
2226
- position: c,
2227
- className: "likec4-node-handle-center"
2228
- }), i[2] = c, i[3] = u);
2229
- let d;
2230
- return i[4] !== l || i[5] !== u ? (d = /* @__PURE__ */ $(Z, { children: [l, u] }), i[4] = l, i[5] = u, i[6] = d) : d = i[6], d;
2231
- }
2232
- //#endregion
2233
- //#region ../diagram/src/components/NavigationPanel.tsx
2234
- var { withProvider: Tt, withContext: Et } = k(B), shouldForwardProp = (r, i) => !i.includes(r) && (ue(r) || !M(r)), Dt = q((r, i) => {
2235
- let a = X(11), o, s;
2236
- a[0] === r ? (o = a[1], s = a[2]) : ({className: o, ...s} = r, a[0] = r, a[1] = o, a[2] = s);
2237
- let c;
2238
- a[3] === o ? c = a[4] : (c = A("mantine-active", o), a[3] = o, a[4] = c);
2239
- let l, u;
2240
- a[5] === Symbol.for("react.memo_cache_sentinel") ? (l = /* @__PURE__ */ Q(ft, { "data-logo-icon": !0 }), u = /* @__PURE__ */ Q(dt, { "data-logo-full": !0 }), a[5] = l, a[6] = u) : (l = a[5], u = a[6]);
2241
- let d;
2242
- return a[7] !== s || a[8] !== i || a[9] !== c ? (d = /* @__PURE__ */ $("button", {
2243
- ...s,
2244
- ref: i,
2245
- className: c,
2246
- children: [l, u]
2247
- }), a[7] = s, a[8] = i, a[9] = c, a[10] = d) : d = a[10], d;
2248
- }), Ot = {
2249
- Root: Tt(fe.div, "root", { shouldForwardProp }),
2250
- Body: Et(fe.div, "body", { shouldForwardProp }),
2251
- Logo: Et(Dt, "logo", { shouldForwardProp }),
2252
- Label: Et(fe.div, "label", { shouldForwardProp }),
2253
- Dropdown: Et(fe.div, "dropdown", { shouldForwardProp })
2254
- }, scheme = (r) => `[data-mantine-color-scheme="${r}"]`, kt = scheme("dark"), generateCompoundColors = (r, i, a, o) => `
2255
- ${`${r} :is([data-likec4-color="${i}"][data-compound-depth="${o}"])`} {
2256
- --likec4-palette-fill: ${a.fill};
2257
- --likec4-palette-stroke: ${a.stroke};
2258
- }
2259
- `;
2260
- function toStyle(r, i) {
2261
- let { rootSelector: a, name: o, colors: s } = i, { elements: c, relationships: l } = s, u = `${a} :is([data-likec4-color=${o}])`;
2262
- return [`
2263
- ${u} {
2264
- --likec4-palette-fill: ${c.fill};
2265
- --likec4-palette-stroke: ${c.stroke};
2266
- --likec4-palette-hiContrast: ${c.hiContrast};
2267
- --likec4-palette-loContrast: ${c.loContrast};
2268
- --likec4-palette-relation-stroke: ${l.line};
2269
- --likec4-palette-relation-label: ${l.label};
2270
- --likec4-palette-relation-label-bg: ${l.labelBg};
2271
- --likec4-palette-relation-stroke-selected: oklch(from ${l.line} calc(l - 0.15) c h);
2272
- }
2273
- ${kt} ${u} {
2274
- --likec4-palette-relation-stroke-selected: oklch(from ${l.line} calc(l + 0.15) c h);
2275
- }
2276
-
2277
- `, ...r.colorsForCompounds(c, 5).map((r, i) => generateCompoundColors(a, o, r, i + 1))].map((r) => r.trim()).join("\n");
2278
- }
2279
- function generateBuiltInColorStyles(r, i) {
2280
- return a(r.theme.colors, t$3(), u(([a, o]) => toStyle(r, {
2281
- rootSelector: i,
2282
- name: a,
2283
- colors: o
2284
- })), t$2("\n"));
2285
- }
2286
- function LikeC4Styles$1({ rootSelector: r }) {
2287
- let i = O()?.(), a = useLikeC4Styles(), o = ve(() => generateBuiltInColorStyles(a, r), [r, a.fingerprint]);
2288
- return /* @__PURE__ */ Q(At, {
2289
- id: a.fingerprint,
2290
- nonce: i,
2291
- colorsStyles: o
2292
- });
2293
- }
2294
- r(LikeC4Styles$1, "LikeC4Styles");
2295
- var At = J((r) => {
2296
- let i = X(4), { id: a, nonce: o, colorsStyles: s } = r, c = o || void 0, l;
2297
- return i[0] !== s || i[1] !== a || i[2] !== c ? (l = /* @__PURE__ */ Q("style", {
2298
- type: "text/css",
2299
- "data-likec4-colors": a,
2300
- nonce: c,
2301
- children: s
2302
- }), i[0] = s, i[1] = a, i[2] = c, i[3] = l) : l = i[3], l;
2303
- });
2304
- At.displayName = "MemoizedStyle";
2305
- //#endregion
2306
- export { Ge as $, RootContainer as A, getNodeCenter as B, ot as C, FramerMotionConfig as D, useOptionalLikeC4Model as E, BaseXYFlow as F, stopPropagation as G, isSamePoint as H, Ye as I, useCurrentZoomAtLeast as J, roundDpr as K, hasSubObject as L, useRootContainerContext as M, useRootContainerElement as N, EnsureMantine as O, useRootContainerRef as P, useCallbackRef as Q, bezierControlPoints as R, useLikeC4Styles as S, useOptionalCurrentViewModel as T, nodeToRect as U, getNodeIntersectionFromCenterToPoint as V, parsePaddings as W, useXYStore as X, useXYFlow as Y, useXYStoreApi as Z, useLikeC4Projects as _, ElementShape as a, IconRendererProvider as at, useOptionalProjectsContext as b, ElementActionButtons as c, t$2 as ct, pt as d, e$2 as dt, Ke as et, EdgeContainer as f, t$3 as ft, useLikeC4ProjectId as g, useChangeLikeC4Project as h, memoEdge as i, IconRenderer as it, useRootContainer as j, LikeC4MantineProvider as k, ht as l, e as lt, ft as m, t$5 as mt, Ot as n, Ue as nt, Ct as o, Be as ot, dt as p, t$4 as pt, selectXYStore as q, DefaultHandles as r, IconOrShapeRenderer as rt, ElementData as s, t$1 as st, LikeC4Styles$1 as t, We as tt, EdgeLabelContainer as u, e$1 as ut, useLikeC4ProjectsContext as v, it as w, useId$1 as x, ct as y, bezierPath as z };