@kong-ui-public/documentation 1.5.78 → 1.6.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 (63) hide show
  1. package/dist/{arc-DZdQjcG8-C_2Dx6GQ.js → arc-DZdQjcG8-CduayE88.js} +2 -2
  2. package/dist/{architectureDiagram-3BPJPVTR-By_DXDyu-DTj86bUZ.js → architectureDiagram-3BPJPVTR-By_DXDyu-U3MSLbOU.js} +1506 -1513
  3. package/dist/blockDiagram-GPEHLZMM-9Cp9Hbl7-CKP-SiVG.js +3268 -0
  4. package/dist/{c4Diagram-AAUBKEIU-ftdwlfdB-CYiERTWJ.js → c4Diagram-AAUBKEIU-ftdwlfdB-D3A61SdV.js} +11 -12
  5. package/dist/{channel-DM9j7IFL-CjNPz4Hd.js → channel-DM9j7IFL-DxqBUxfY.js} +1 -1
  6. package/dist/{chunk-2J33WTMH-CBbjVzWb-BAAd-TK5.js → chunk-2J33WTMH-CBbjVzWb-0og4LHQ-.js} +7 -8
  7. package/dist/chunk-4BX2VUAB-C_NnimAy--QQ0Db2V.js +8 -0
  8. package/dist/{chunk-55IACEB6-DZn1aNO0-_bs5ibIB.js → chunk-55IACEB6-DZn1aNO0-A3zOZ7dT.js} +1 -1
  9. package/dist/{chunk-727SXJPM-B2_6_WLv-CzbzsbtK.js → chunk-727SXJPM-B2_6_WLv-Bs3CxHaX.js} +548 -549
  10. package/dist/{chunk-AQP2D5EJ-DEAEiJjW-BPr5JvkB.js → chunk-AQP2D5EJ-DEAEiJjW-DTbwZT8N.js} +446 -458
  11. package/dist/{chunk-FMBD7UC4-D_tZ4Dxg-BUygZnCT.js → chunk-FMBD7UC4-D_tZ4Dxg-DwjoPGUH.js} +1 -1
  12. package/dist/{chunk-ND2GUHAM-Duw3k8MU-Dr8SD23L.js → chunk-ND2GUHAM-Duw3k8MU-HmrdHLJ9.js} +1 -1
  13. package/dist/{chunk-QZHKN3VN-DN6nBdn0-DxWE5zsM.js → chunk-QZHKN3VN-DN6nBdn0-BvQOETVz.js} +1 -1
  14. package/dist/classDiagram-4FO5ZUOK-Du5qFrfN-BqXc0etQ.js +17 -0
  15. package/dist/classDiagram-v2-Q7XG4LA2-DM6zutfc-BqXc0etQ.js +17 -0
  16. package/dist/{cose-bilkent-S5V4N54A-0ZumbVgj-BKcFQWbE.js → cose-bilkent-S5V4N54A-0ZumbVgj-0z7CQbIH.js} +465 -465
  17. package/dist/{cytoscape.esm-BDIiOYYO-BbddfVIJ.js → cytoscape.esm-BDIiOYYO-C1jMBhD8.js} +356 -371
  18. package/dist/dagre-BM42HDAG-qMWMsyLb-DGMrq3i3.js +288 -0
  19. package/dist/{dagre-DJxg_nfI-BzVw7cNP.js → dagre-DJxg_nfI-hVOVexz-.js} +9 -9
  20. package/dist/{diagram-2AECGRRQ-B2gF_dHe-DCRSlKG-.js → diagram-2AECGRRQ-B2gF_dHe-Bv_EpxRz.js} +10 -14
  21. package/dist/{diagram-5GNKFQAL-DJ9WwRrD-DtSWJY6-.js → diagram-5GNKFQAL-DJ9WwRrD-WVvm0Icu.js} +4 -4
  22. package/dist/{diagram-KO2AKTUF-RfkqD-VW-ZR9mxccc.js → diagram-KO2AKTUF-RfkqD-VW-yyAds1Qq.js} +153 -156
  23. package/dist/{diagram-LMA3HP47-Ct7s9hIt-DXtPBRn4.js → diagram-LMA3HP47-Ct7s9hIt-Dy6f9BAO.js} +21 -22
  24. package/dist/{diagram-OG6HWLK6-BSYJ2CoI-DX1BfXw6.js → diagram-OG6HWLK6-BSYJ2CoI-ckmfat-L.js} +79 -81
  25. package/dist/documentation.es.js +1 -1
  26. package/dist/documentation.umd.js +374 -374
  27. package/dist/{erDiagram-TEJ5UH35-BudwiSYX-BPA5-1u6.js → erDiagram-TEJ5UH35-BudwiSYX-bVzp1Kjr.js} +134 -135
  28. package/dist/{flowDiagram-I6XJVG4X-B23Smlxp-Cb24VZnb.js → flowDiagram-I6XJVG4X-B23Smlxp-ClHvdCdJ.js} +842 -849
  29. package/dist/{ganttDiagram-6RSMTGT7-C-i89z_P-DEdTFlTH.js → ganttDiagram-6RSMTGT7-C-i89z_P-t5UAyRM5.js} +46 -46
  30. package/dist/gitGraphDiagram-PVQCEYII-DpVfXnUD-Cg3smOdz.js +734 -0
  31. package/dist/{graphlib-D2YdGpuK-CM8PX5pf.js → graphlib-D2YdGpuK-CnQPmzkS.js} +17 -17
  32. package/dist/{index-Dpyqhws4.js → index-DfVKdDwj.js} +16258 -16515
  33. package/dist/{infoDiagram-5YYISTIA-CDUwzFql-BsbTK2Me.js → infoDiagram-5YYISTIA-CDUwzFql-Bmthmcp4.js} +2 -2
  34. package/dist/{ishikawaDiagram-YF4QCWOH-MfYdx0rK-DsWP0O6d.js → ishikawaDiagram-YF4QCWOH-MfYdx0rK-cbltssua.js} +137 -138
  35. package/dist/{journeyDiagram-JHISSGLW-C_udOPtJ-BkIf9B4Q.js → journeyDiagram-JHISSGLW-C_udOPtJ-BjAvgSAR.js} +13 -13
  36. package/dist/{kanban-definition-UN3LZRKU-C1Su-UOY-6sw-wDwK.js → kanban-definition-UN3LZRKU-C1Su-UOY-DZ93dsWZ.js} +334 -336
  37. package/dist/{katex-D7tFlpqA-B7yKriH4.js → katex-D7tFlpqA-BOSQxXe1.js} +254 -256
  38. package/dist/{linear-1MXhYum8-CfR5ywK4.js → linear-1MXhYum8-9C1jno9G.js} +5 -5
  39. package/dist/{mindmap-definition-RKZ34NQL-MuSV765K-Cv2rDIFS.js → mindmap-definition-RKZ34NQL-MuSV765K-Kub1iXFv.js} +94 -97
  40. package/dist/{ordinal-D9ksOc8y-CrGveXkB.js → ordinal-D9ksOc8y-2hZwLyEk.js} +1 -1
  41. package/dist/{pieDiagram-4H26LBE5-TgFp7J6_-C8m2xJbj.js → pieDiagram-4H26LBE5-TgFp7J6_-i6NxP3Xz.js} +43 -44
  42. package/dist/{quadrantDiagram-W4KKPZXB-DKPne3o_-D0Tfl8NQ.js → quadrantDiagram-W4KKPZXB-DKPne3o_-DXLHqRuR.js} +351 -353
  43. package/dist/{requirementDiagram-4Y6WPE33-vh8uUAp_-C5zLx-_o.js → requirementDiagram-4Y6WPE33-vh8uUAp_-CHtsISxP.js} +384 -386
  44. package/dist/{sankeyDiagram-5OEKKPKP-Cgs6W_El-DBrv4QL_.js → sankeyDiagram-5OEKKPKP-Cgs6W_El-D7GZyd8n.js} +178 -178
  45. package/dist/{sequenceDiagram-3UESZ5HK-C5F57Dkt-D6DqZiJP.js → sequenceDiagram-3UESZ5HK-C5F57Dkt-BW1Hb7UW.js} +643 -653
  46. package/dist/{stateDiagram-AJRCARHV-09dUKG6Y-9QhAIhCk.js → stateDiagram-AJRCARHV-09dUKG6Y-Dm2a1vNu.js} +5 -5
  47. package/dist/stateDiagram-v2-BHNVJYJU-CWqmRt12-DbWzZ-j-.js +16 -0
  48. package/dist/style.css +1 -1
  49. package/dist/timeline-definition-PNZ67QCA-CCndyx0V-B5CT96H-.js +1095 -0
  50. package/dist/{vennDiagram-CIIHVFJN-DQfKxM3L-086u82L3.js → vennDiagram-CIIHVFJN-DQfKxM3L-qUaKEl7l.js} +596 -603
  51. package/dist/{wardley-L42UT6IY-BjAkE_cs-li1xYed9.js → wardley-L42UT6IY-BjAkE_cs-C-giFqos.js} +5760 -5809
  52. package/dist/wardleyDiagram-YWT4CUSO-Bf9L2NsL-DXPF2Ee9.js +639 -0
  53. package/dist/{xychartDiagram-2RQKCTM6-ChNH3q1U--vbcTXH5.js → xychartDiagram-2RQKCTM6-ChNH3q1U-a59DsJDA.js} +10 -10
  54. package/package.json +4 -4
  55. package/dist/blockDiagram-GPEHLZMM-9Cp9Hbl7-CSQRWfog.js +0 -3278
  56. package/dist/chunk-4BX2VUAB-C_NnimAy-B-8x_g6K.js +0 -9
  57. package/dist/classDiagram-4FO5ZUOK-Du5qFrfN-DLmqgbj1.js +0 -17
  58. package/dist/classDiagram-v2-Q7XG4LA2-DM6zutfc-DLmqgbj1.js +0 -17
  59. package/dist/dagre-BM42HDAG-qMWMsyLb-BzK2-5zM.js +0 -291
  60. package/dist/gitGraphDiagram-PVQCEYII-DpVfXnUD-BtfdBLxW.js +0 -747
  61. package/dist/stateDiagram-v2-BHNVJYJU-CWqmRt12-Br5eF-5b.js +0 -16
  62. package/dist/timeline-definition-PNZ67QCA-CCndyx0V-CkhwKYjQ.js +0 -1106
  63. package/dist/wardleyDiagram-YWT4CUSO-Bf9L2NsL-CCMCDU5F.js +0 -647
@@ -0,0 +1,639 @@
1
+ import { G as Mt, K as $t, i as Ct, f as Pt, W as Nt, U as zt, p as g, s as _, ah as At, o as Tt, g as J, a0 as It, A as Lt, H as Et, Z as H } from "./index-DfVKdDwj.js";
2
+ import { t as Bt } from "./chunk-4BX2VUAB-C_NnimAy--QQ0Db2V.js";
3
+ import { r as Ft } from "./wardley-L42UT6IY-BjAkE_cs-C-giFqos.js";
4
+ var Y = /* @__PURE__ */ g((r, e) => {
5
+ let a = r <= 1 ? r * 100 : r;
6
+ if (a < 0 || a > 100) throw Error(`${e} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${r}`);
7
+ return a;
8
+ }, "toPercent"), A = /* @__PURE__ */ g((r, e, a) => ({
9
+ x: Y(e, `${a} evolution`),
10
+ y: Y(r, `${a} visibility`)
11
+ }), "toCoordinates"), K = /* @__PURE__ */ g((r) => {
12
+ if (r) {
13
+ if (r === "+<>") return "bidirectional";
14
+ if (r === "+<") return "backward";
15
+ if (r === "+>") return "forward";
16
+ }
17
+ }, "getFlowFromPort"), Rt = /* @__PURE__ */ g((r) => {
18
+ if (!r?.startsWith("+")) return {};
19
+ let e = /^\+'([^']*)'/.exec(r)?.[1];
20
+ return r.includes("<>") ? {
21
+ flow: "bidirectional",
22
+ label: e
23
+ } : r.includes("<") ? {
24
+ flow: "backward",
25
+ label: e
26
+ } : r.includes(">") ? {
27
+ flow: "forward",
28
+ label: e
29
+ } : { label: e };
30
+ }, "extractFlowFromArrow"), Ot = /* @__PURE__ */ g((r, e) => {
31
+ if (Bt(r, e), r.size && e.setSize(r.size.width, r.size.height), r.evolution) {
32
+ let a = r.evolution.stages.map((n) => n.secondName ? `${n.name.trim()} / ${n.secondName.trim()}` : n.name.trim()), x = r.evolution.stages.filter((n) => n.boundary !== void 0).map((n) => n.boundary);
33
+ e.updateAxes({
34
+ stages: a,
35
+ stageBoundaries: x
36
+ });
37
+ }
38
+ if (r.anchors.forEach((a) => {
39
+ let x = A(a.visibility, a.evolution, `Anchor "${a.name}"`);
40
+ e.addNode(a.name, a.name, x.x, x.y, "anchor");
41
+ }), r.components.forEach((a) => {
42
+ let x = A(a.visibility, a.evolution, `Component "${a.name}"`), n = a.label ? (a.label.negX ? -1 : 1) * a.label.offsetX : void 0, s = a.label ? (a.label.negY ? -1 : 1) * a.label.offsetY : void 0, u = a.decorator?.strategy;
43
+ e.addNode(a.name, a.name, x.x, x.y, "component", n, s, a.inertia, u);
44
+ }), r.notes.forEach((a) => {
45
+ let x = A(a.visibility, a.evolution, `Note "${a.text}"`);
46
+ e.addNote(a.text, x.x, x.y);
47
+ }), r.pipelines.forEach((a) => {
48
+ let x = e.getNode(a.parent);
49
+ if (!x || typeof x.y != "number") throw Error(`Pipeline "${a.parent}" must reference an existing component with coordinates.`);
50
+ let n = x.y;
51
+ e.startPipeline(a.parent), a.components.forEach((s) => {
52
+ let u = `${a.parent}_${s.name}`, M = s.label ? (s.label.negX ? -1 : 1) * s.label.offsetX : void 0, y = s.label ? (s.label.negY ? -1 : 1) * s.label.offsetY : void 0, R = Y(s.evolution, `Pipeline component "${s.name}" evolution`);
53
+ e.addNode(u, s.name, R, n, "pipeline-component", M, y), e.addPipelineComponent(a.parent, u);
54
+ });
55
+ }), r.links.forEach((a) => {
56
+ let x = !!a.arrow && (a.arrow.includes("-.->") || a.arrow.includes(".-.")), n = K(a.fromPort) ?? K(a.toPort), { flow: s, label: u } = Rt(a.arrow);
57
+ !n && s && (n = s);
58
+ let M = a.linkLabel, y = u ?? M;
59
+ e.addLink(e.resolveNodeId(a.from), e.resolveNodeId(a.to), x, y, n);
60
+ }), r.evolves.forEach((a) => {
61
+ let x = e.getNode(a.component);
62
+ if (x?.y !== void 0) {
63
+ let n = Y(a.target, `Evolve target for "${a.component}"`);
64
+ e.addTrend(a.component, n, x.y);
65
+ }
66
+ }), r.annotations.length > 0) {
67
+ let a = r.annotations[0], x = A(a.x, a.y, "Annotations box");
68
+ e.setAnnotationsBox(x.x, x.y);
69
+ }
70
+ r.annotation.forEach((a) => {
71
+ let x = A(a.x, a.y, `Annotation ${a.number}`);
72
+ e.addAnnotation(a.number, [{
73
+ x: x.x,
74
+ y: x.y
75
+ }], a.text);
76
+ }), r.accelerators.forEach((a) => {
77
+ let x = A(a.x, a.y, `Accelerator "${a.name}"`);
78
+ e.addAccelerator(a.name, x.x, x.y);
79
+ }), r.deaccelerators.forEach((a) => {
80
+ let x = A(a.x, a.y, `Deaccelerator "${a.name}"`);
81
+ e.addDeaccelerator(a.name, x.x, x.y);
82
+ });
83
+ }, "populateDb"), Q = {
84
+ parser: { yy: void 0 },
85
+ parse: /* @__PURE__ */ g(async (r) => {
86
+ let e = await Ft("wardley", r);
87
+ J.debug(e);
88
+ let a = Q.parser?.yy;
89
+ if (!a || typeof a.addNode != "function") throw Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
90
+ Ot(e, a);
91
+ }, "parse")
92
+ }, I, w = new (I = class {
93
+ constructor() {
94
+ this.nodes = /* @__PURE__ */ new Map(), this.links = [], this.trends = /* @__PURE__ */ new Map(), this.pipelines = /* @__PURE__ */ new Map(), this.annotations = [], this.notes = [], this.accelerators = [], this.deaccelerators = [], this.axes = {};
95
+ }
96
+ addNode(e) {
97
+ let a = this.nodes.get(e.id) ?? {
98
+ id: e.id,
99
+ label: e.label
100
+ }, x = {
101
+ ...a,
102
+ ...e,
103
+ className: e.className ?? a.className,
104
+ labelOffsetX: e.labelOffsetX ?? a.labelOffsetX,
105
+ labelOffsetY: e.labelOffsetY ?? a.labelOffsetY
106
+ };
107
+ this.nodes.set(e.id, x);
108
+ }
109
+ addLink(e) {
110
+ this.links.push(e);
111
+ }
112
+ addTrend(e) {
113
+ this.trends.set(e.nodeId, e);
114
+ }
115
+ startPipeline(e) {
116
+ this.pipelines.set(e, {
117
+ nodeId: e,
118
+ componentIds: []
119
+ });
120
+ let a = this.nodes.get(e);
121
+ a && (a.isPipelineParent = !0);
122
+ }
123
+ addPipelineComponent(e, a) {
124
+ let x = this.pipelines.get(e);
125
+ x && x.componentIds.push(a);
126
+ let n = this.nodes.get(a);
127
+ n && (n.inPipeline = !0);
128
+ }
129
+ addAnnotation(e) {
130
+ this.annotations.push(e);
131
+ }
132
+ addNote(e) {
133
+ this.notes.push(e);
134
+ }
135
+ addAccelerator(e) {
136
+ this.accelerators.push(e);
137
+ }
138
+ addDeaccelerator(e) {
139
+ this.deaccelerators.push(e);
140
+ }
141
+ setAnnotationsBox(e, a) {
142
+ this.annotationsBox = {
143
+ x: e,
144
+ y: a
145
+ };
146
+ }
147
+ setAxes(e) {
148
+ this.axes = {
149
+ ...this.axes,
150
+ ...e
151
+ };
152
+ }
153
+ setSize(e, a) {
154
+ this.size = {
155
+ width: e,
156
+ height: a
157
+ };
158
+ }
159
+ getNode(e) {
160
+ return this.nodes.get(e);
161
+ }
162
+ resolveNodeId(e) {
163
+ if (this.nodes.has(e)) return e;
164
+ for (let [a, x] of this.nodes) if (x.label === e) return a;
165
+ return e;
166
+ }
167
+ build() {
168
+ let e = [];
169
+ for (let a of this.nodes.values()) {
170
+ if (typeof a.x != "number" || typeof a.y != "number") throw Error(`Node "${a.label}" is missing coordinates`);
171
+ e.push(a);
172
+ }
173
+ return {
174
+ nodes: e,
175
+ links: [...this.links],
176
+ trends: [...this.trends.values()],
177
+ pipelines: [...this.pipelines.values()],
178
+ annotations: [...this.annotations],
179
+ notes: [...this.notes],
180
+ accelerators: [...this.accelerators],
181
+ deaccelerators: [...this.deaccelerators],
182
+ annotationsBox: this.annotationsBox,
183
+ axes: { ...this.axes },
184
+ size: this.size
185
+ };
186
+ }
187
+ clear() {
188
+ this.nodes.clear(), this.links = [], this.trends.clear(), this.pipelines.clear(), this.annotations = [], this.notes = [], this.accelerators = [], this.deaccelerators = [], this.annotationsBox = void 0, this.axes = {}, this.size = void 0;
189
+ }
190
+ }, g(I, "WardleyBuilder"), I)();
191
+ function tt() {
192
+ return H()["wardley-beta"];
193
+ }
194
+ g(tt, "getConfig");
195
+ function et(r, e, a, x, n, s, u, M, y) {
196
+ w.addNode({
197
+ id: r,
198
+ label: e,
199
+ x: a,
200
+ y: x,
201
+ className: n,
202
+ labelOffsetX: s,
203
+ labelOffsetY: u,
204
+ inertia: M,
205
+ sourceStrategy: y
206
+ });
207
+ }
208
+ g(et, "addNode");
209
+ function at(r, e, a = !1, x, n) {
210
+ w.addLink({
211
+ source: r,
212
+ target: e,
213
+ dashed: a,
214
+ label: x,
215
+ flow: n
216
+ });
217
+ }
218
+ g(at, "addLink");
219
+ function rt(r, e, a) {
220
+ w.addTrend({
221
+ nodeId: r,
222
+ targetX: e,
223
+ targetY: a
224
+ });
225
+ }
226
+ g(rt, "addTrend");
227
+ function ot(r, e, a) {
228
+ w.addAnnotation({
229
+ number: r,
230
+ coordinates: e,
231
+ text: a
232
+ });
233
+ }
234
+ g(ot, "addAnnotation");
235
+ function nt(r, e, a) {
236
+ w.addNote({
237
+ text: r,
238
+ x: e,
239
+ y: a
240
+ });
241
+ }
242
+ g(nt, "addNote");
243
+ function it(r, e, a) {
244
+ w.addAccelerator({
245
+ name: r,
246
+ x: e,
247
+ y: a
248
+ });
249
+ }
250
+ g(it, "addAccelerator");
251
+ function lt(r, e, a) {
252
+ w.addDeaccelerator({
253
+ name: r,
254
+ x: e,
255
+ y: a
256
+ });
257
+ }
258
+ g(lt, "addDeaccelerator");
259
+ function st(r, e) {
260
+ w.setAnnotationsBox(r, e);
261
+ }
262
+ g(st, "setAnnotationsBox");
263
+ function dt(r, e) {
264
+ w.setSize(r, e);
265
+ }
266
+ g(dt, "setSize");
267
+ function ct(r) {
268
+ w.startPipeline(r);
269
+ }
270
+ g(ct, "startPipeline");
271
+ function pt(r, e) {
272
+ w.addPipelineComponent(r, e);
273
+ }
274
+ g(pt, "addPipelineComponent");
275
+ function xt(r) {
276
+ w.setAxes(r);
277
+ }
278
+ g(xt, "updateAxes");
279
+ function ht(r) {
280
+ return w.getNode(r);
281
+ }
282
+ g(ht, "getNode");
283
+ function yt(r) {
284
+ return w.resolveNodeId(r);
285
+ }
286
+ g(yt, "resolveNodeId");
287
+ function ft() {
288
+ return w.build();
289
+ }
290
+ g(ft, "getWardleyData");
291
+ function gt() {
292
+ w.clear(), Et();
293
+ }
294
+ g(gt, "clear");
295
+ var Xt = {
296
+ getConfig: tt,
297
+ addNode: et,
298
+ addLink: at,
299
+ addTrend: rt,
300
+ addAnnotation: ot,
301
+ addNote: nt,
302
+ addAccelerator: it,
303
+ addDeaccelerator: lt,
304
+ setAnnotationsBox: st,
305
+ setSize: dt,
306
+ startPipeline: ct,
307
+ addPipelineComponent: pt,
308
+ updateAxes: xt,
309
+ getNode: ht,
310
+ resolveNodeId: yt,
311
+ getWardleyData: ft,
312
+ clear: gt,
313
+ setAccTitle: zt,
314
+ getAccTitle: Nt,
315
+ setDiagramTitle: Pt,
316
+ getDiagramTitle: Ct,
317
+ getAccDescription: $t,
318
+ setAccDescription: Mt
319
+ }, Yt = [
320
+ "Genesis",
321
+ "Custom Built",
322
+ "Product",
323
+ "Commodity"
324
+ ], Dt = /* @__PURE__ */ g(() => {
325
+ let { themeVariables: r } = H();
326
+ return {
327
+ backgroundColor: r.wardley?.backgroundColor ?? r.background ?? "#fff",
328
+ axisColor: r.wardley?.axisColor ?? "#000",
329
+ axisTextColor: r.wardley?.axisTextColor ?? r.primaryTextColor ?? "#222",
330
+ gridColor: r.wardley?.gridColor ?? "rgba(100, 100, 100, 0.2)",
331
+ componentFill: r.wardley?.componentFill ?? "#fff",
332
+ componentStroke: r.wardley?.componentStroke ?? "#000",
333
+ componentLabelColor: r.wardley?.componentLabelColor ?? r.primaryTextColor ?? "#222",
334
+ linkStroke: r.wardley?.linkStroke ?? "#000",
335
+ evolutionStroke: r.wardley?.evolutionStroke ?? "#dc3545",
336
+ annotationStroke: r.wardley?.annotationStroke ?? "#000",
337
+ annotationTextColor: r.wardley?.annotationTextColor ?? r.primaryTextColor ?? "#222",
338
+ annotationFill: r.wardley?.annotationFill ?? r.background ?? "#fff"
339
+ };
340
+ }, "getTheme"), Wt = /* @__PURE__ */ g(() => {
341
+ let r = H()["wardley-beta"];
342
+ return {
343
+ width: r?.width ?? 900,
344
+ height: r?.height ?? 600,
345
+ padding: r?.padding ?? 48,
346
+ nodeRadius: r?.nodeRadius ?? 6,
347
+ nodeLabelOffset: r?.nodeLabelOffset ?? 8,
348
+ axisFontSize: r?.axisFontSize ?? 12,
349
+ labelFontSize: r?.labelFontSize ?? 10,
350
+ showGrid: r?.showGrid ?? !1,
351
+ useMaxWidth: r?.useMaxWidth ?? !0
352
+ };
353
+ }, "getConfigValues"), Ht = {
354
+ parser: Q,
355
+ db: Xt,
356
+ renderer: { draw: /* @__PURE__ */ g((r, e, a, x) => {
357
+ J.debug(`Rendering Wardley map
358
+ ` + r);
359
+ let n = Wt(), s = Dt(), u = n.nodeRadius * 1.6, M = x.db, y = M.getWardleyData(), R = M.getDiagramTitle(), $ = y.size?.width ?? n.width, k = y.size?.height ?? n.height, L = It(e);
360
+ L.selectAll("*").remove(), Lt(L, k, $, n.useMaxWidth), L.attr("viewBox", `0 0 ${$} ${k}`);
361
+ let v = L.append("g").attr("class", "wardley-map"), D = L.append("defs");
362
+ D.append("marker").attr("id", `arrow-${e}`).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerWidth", 6).attr("markerHeight", 6).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("fill", s.evolutionStroke).attr("stroke", "none"), D.append("marker").attr("id", `link-arrow-end-${e}`).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerWidth", 5).attr("markerHeight", 5).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("fill", s.linkStroke).attr("stroke", "none"), D.append("marker").attr("id", `link-arrow-start-${e}`).attr("viewBox", "0 0 10 10").attr("refX", 1).attr("refY", 5).attr("markerWidth", 5).attr("markerHeight", 5).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z").attr("fill", s.linkStroke).attr("stroke", "none"), v.append("rect").attr("class", "wardley-background").attr("width", $).attr("height", k).attr("fill", s.backgroundColor);
363
+ let E = $ - n.padding * 2, B = k - n.padding * 2;
364
+ R && v.append("text").attr("class", "wardley-title").attr("x", $ / 2).attr("y", n.padding / 2).attr("fill", s.axisTextColor).attr("font-size", n.axisFontSize * 1.05).attr("font-weight", "bold").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(R);
365
+ let P = /* @__PURE__ */ g((t) => n.padding + t / 100 * E, "projectX"), N = /* @__PURE__ */ g((t) => k - n.padding - t / 100 * B, "projectY"), O = v.append("g").attr("class", "wardley-axes");
366
+ O.append("line").attr("x1", n.padding).attr("x2", $ - n.padding).attr("y1", k - n.padding).attr("y2", k - n.padding).attr("stroke", s.axisColor).attr("stroke-width", 1), O.append("line").attr("x1", n.padding).attr("x2", n.padding).attr("y1", n.padding).attr("y2", k - n.padding).attr("stroke", s.axisColor).attr("stroke-width", 1);
367
+ let ut = y.axes.xLabel ?? "Evolution", mt = y.axes.yLabel ?? "Visibility";
368
+ O.append("text").attr("class", "wardley-axis-label wardley-axis-label-x").attr("x", n.padding + E / 2).attr("y", k - n.padding / 4).attr("fill", s.axisTextColor).attr("font-size", n.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").text(ut), O.append("text").attr("class", "wardley-axis-label wardley-axis-label-y").attr("x", n.padding / 3).attr("y", n.padding + B / 2).attr("fill", s.axisTextColor).attr("font-size", n.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").attr("transform", `rotate(-90 ${n.padding / 3} ${n.padding + B / 2})`).text(mt);
369
+ let F = y.axes.stages && y.axes.stages.length > 0 ? y.axes.stages : Yt;
370
+ if (F.length > 0) {
371
+ let t = v.append("g").attr("class", "wardley-stages"), i = y.axes.stageBoundaries, o = [];
372
+ if (i && i.length === F.length) {
373
+ let l = 0;
374
+ i.forEach((c) => {
375
+ o.push({
376
+ start: l,
377
+ end: c
378
+ }), l = c;
379
+ });
380
+ } else {
381
+ let l = 1 / F.length;
382
+ F.forEach((c, p) => {
383
+ o.push({
384
+ start: p * l,
385
+ end: (p + 1) * l
386
+ });
387
+ });
388
+ }
389
+ F.forEach((l, c) => {
390
+ let p = o[c], f = n.padding + p.start * E, h = (f + (n.padding + p.end * E)) / 2;
391
+ c > 0 && t.append("line").attr("x1", f).attr("x2", f).attr("y1", n.padding).attr("y2", k - n.padding).attr("stroke", "#000").attr("stroke-width", 1).attr("stroke-dasharray", "5 5").attr("opacity", 0.8), t.append("text").attr("class", "wardley-stage-label").attr("x", h).attr("y", k - n.padding / 1.5).attr("fill", s.axisTextColor).attr("font-size", n.axisFontSize - 2).attr("text-anchor", "middle").text(l);
392
+ });
393
+ }
394
+ if (n.showGrid) {
395
+ let t = v.append("g").attr("class", "wardley-grid");
396
+ for (let i = 1; i < 4; i++) {
397
+ let o = i / 4, l = n.padding + E * o;
398
+ t.append("line").attr("x1", l).attr("x2", l).attr("y1", n.padding).attr("y2", k - n.padding).attr("stroke", s.gridColor).attr("stroke-dasharray", "2 6"), t.append("line").attr("x1", n.padding).attr("x2", $ - n.padding).attr("y1", k - n.padding - B * o).attr("y2", k - n.padding - B * o).attr("stroke", s.gridColor).attr("stroke-dasharray", "2 6");
399
+ }
400
+ }
401
+ let d = /* @__PURE__ */ new Map();
402
+ if (y.nodes.forEach((t) => {
403
+ d.set(t.id, {
404
+ x: P(t.x),
405
+ y: N(t.y),
406
+ node: t
407
+ });
408
+ }), y.pipelines.length > 0) {
409
+ let t = v.append("g").attr("class", "wardley-pipelines"), i = v.append("g").attr("class", "wardley-pipeline-links");
410
+ y.pipelines.forEach((o) => {
411
+ if (o.componentIds.length === 0) return;
412
+ let l = o.componentIds.map((h) => ({
413
+ id: h,
414
+ pos: d.get(h),
415
+ node: y.nodes.find((m) => m.id === h)
416
+ })).filter((h) => h.pos && h.node).sort((h, m) => h.node.x - m.node.x);
417
+ for (let h = 0; h < l.length - 1; h++) {
418
+ let m = l[h], S = l[h + 1];
419
+ i.append("line").attr("class", "wardley-pipeline-evolution-link").attr("x1", m.pos.x).attr("y1", m.pos.y).attr("x2", S.pos.x).attr("y2", S.pos.y).attr("stroke", s.linkStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4");
420
+ }
421
+ let c = 1 / 0, p = -1 / 0, f = 0;
422
+ if (o.componentIds.forEach((h) => {
423
+ let m = d.get(h);
424
+ m && (c = Math.min(c, m.x), p = Math.max(p, m.x), f = m.y);
425
+ }), c !== 1 / 0 && p !== -1 / 0) {
426
+ let h = n.nodeRadius * 4, m = f - h / 2, S = d.get(o.nodeId);
427
+ S && (S.x = (c + p) / 2, S.y = m - u / 6), t.append("rect").attr("class", "wardley-pipeline-box").attr("x", c - 15).attr("y", m).attr("width", p - c + 30).attr("height", h).attr("fill", "none").attr("stroke", s.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
428
+ }
429
+ });
430
+ }
431
+ let V = v.append("g").attr("class", "wardley-links"), Z = /* @__PURE__ */ new Map();
432
+ y.pipelines.forEach((t) => {
433
+ Z.set(t.nodeId, new Set(t.componentIds));
434
+ });
435
+ let U = y.links.filter((t) => !(!d.has(t.source) || !d.has(t.target) || Z.get(t.target)?.has(t.source)));
436
+ V.selectAll("line").data(U).enter().append("line").attr("class", (t) => `wardley-link${t.dashed ? " wardley-link--dashed" : ""}`).attr("x1", (t) => {
437
+ let i = d.get(t.source), o = d.get(t.target), l = y.nodes.find((h) => h.id === t.source).isPipelineParent ? u / Math.sqrt(2) : n.nodeRadius, c = o.x - i.x, p = o.y - i.y, f = Math.sqrt(c * c + p * p);
438
+ return i.x + c / f * l;
439
+ }).attr("y1", (t) => {
440
+ let i = d.get(t.source), o = d.get(t.target), l = y.nodes.find((h) => h.id === t.source).isPipelineParent ? u / Math.sqrt(2) : n.nodeRadius, c = o.x - i.x, p = o.y - i.y, f = Math.sqrt(c * c + p * p);
441
+ return i.y + p / f * l;
442
+ }).attr("x2", (t) => {
443
+ let i = d.get(t.source), o = d.get(t.target), l = y.nodes.find((h) => h.id === t.target).isPipelineParent ? u / Math.sqrt(2) : n.nodeRadius, c = i.x - o.x, p = i.y - o.y, f = Math.sqrt(c * c + p * p);
444
+ return o.x + c / f * l;
445
+ }).attr("y2", (t) => {
446
+ let i = d.get(t.source), o = d.get(t.target), l = y.nodes.find((h) => h.id === t.target).isPipelineParent ? u / Math.sqrt(2) : n.nodeRadius, c = i.x - o.x, p = i.y - o.y, f = Math.sqrt(c * c + p * p);
447
+ return o.y + p / f * l;
448
+ }).attr("stroke", s.linkStroke).attr("stroke-width", 1).attr("stroke-dasharray", (t) => t.dashed ? "6 6" : null).attr("marker-end", (t) => t.flow === "forward" || t.flow === "bidirectional" ? `url(#link-arrow-end-${e})` : null).attr("marker-start", (t) => t.flow === "backward" || t.flow === "bidirectional" ? `url(#link-arrow-start-${e})` : null), V.selectAll("text").data(U.filter((t) => t.label)).enter().append("text").attr("class", "wardley-link-label").attr("x", (t) => {
449
+ let i = d.get(t.source), o = d.get(t.target), l = (i.x + o.x) / 2, c = o.y - i.y, p = o.x - i.x;
450
+ return l + c / Math.sqrt(p * p + c * c) * 8;
451
+ }).attr("y", (t) => {
452
+ let i = d.get(t.source), o = d.get(t.target), l = (i.y + o.y) / 2, c = o.x - i.x, p = o.y - i.y, f = Math.sqrt(c * c + p * p);
453
+ return l + -c / f * 8;
454
+ }).attr("fill", s.axisTextColor).attr("font-size", n.labelFontSize).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("transform", (t) => {
455
+ let i = d.get(t.source), o = d.get(t.target), l = (i.x + o.x) / 2, c = (i.y + o.y) / 2, p = o.x - i.x, f = o.y - i.y, h = Math.sqrt(p * p + f * f), m = f / h, S = -p / h, q = l + m * 8, j = c + S * 8, T = Math.atan2(f, p) * 180 / Math.PI;
456
+ return (T > 90 || T < -90) && (T += 180), `rotate(${T} ${q} ${j})`;
457
+ }).text((t) => t.label);
458
+ let wt = v.append("g").attr("class", "wardley-trends"), kt = y.trends.map((t) => {
459
+ let i = d.get(t.nodeId);
460
+ if (!i) return null;
461
+ let o = P(t.targetX), l = N(t.targetY), c = o - i.x, p = l - i.y, f = Math.sqrt(c * c + p * p), h = n.nodeRadius + 2;
462
+ return {
463
+ origin: i,
464
+ targetX: o,
465
+ targetY: l,
466
+ adjustedX2: f > h ? o - c / f * h : o,
467
+ adjustedY2: f > h ? l - p / f * h : l
468
+ };
469
+ }).filter((t) => t !== null);
470
+ wt.selectAll("line").data(kt).enter().append("line").attr("class", "wardley-trend").attr("x1", (t) => t.origin.x).attr("y1", (t) => t.origin.y).attr("x2", (t) => t.adjustedX2).attr("y2", (t) => t.adjustedY2).attr("stroke", s.evolutionStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4").attr("marker-end", `url(#arrow-${e})`);
471
+ let C = v.append("g").attr("class", "wardley-nodes").selectAll("g").data(y.nodes).enter().append("g").attr("class", (t) => ["wardley-node", t.className ? `wardley-node--${t.className}` : ""].filter(Boolean).join(" "));
472
+ C.filter((t) => t.sourceStrategy === "outsource").append("circle").attr("class", "wardley-outsource-overlay").attr("cx", (t) => d.get(t.id).x).attr("cy", (t) => d.get(t.id).y).attr("r", n.nodeRadius * 2).attr("fill", "#666").attr("stroke", s.componentStroke).attr("stroke-width", 1), C.filter((t) => t.sourceStrategy === "buy").append("circle").attr("class", "wardley-buy-overlay").attr("cx", (t) => d.get(t.id).x).attr("cy", (t) => d.get(t.id).y).attr("r", n.nodeRadius * 2).attr("fill", "#ccc").attr("stroke", s.componentStroke).attr("stroke-width", 1), C.filter((t) => t.sourceStrategy === "build").append("circle").attr("class", "wardley-build-overlay").attr("cx", (t) => d.get(t.id).x).attr("cy", (t) => d.get(t.id).y).attr("r", n.nodeRadius * 2).attr("fill", "#eee").attr("stroke", "#000").attr("stroke-width", 1);
473
+ let z = C.filter((t) => t.sourceStrategy === "market");
474
+ z.append("circle").attr("class", "wardley-market-overlay").attr("cx", (t) => d.get(t.id).x).attr("cy", (t) => d.get(t.id).y).attr("r", n.nodeRadius * 2).attr("fill", "white").attr("stroke", s.componentStroke).attr("stroke-width", 1), C.filter((t) => !t.isPipelineParent && t.sourceStrategy !== "market" && t.className !== "anchor").append("circle").attr("cx", (t) => d.get(t.id).x).attr("cy", (t) => d.get(t.id).y).attr("r", n.nodeRadius).attr("fill", s.componentFill).attr("stroke", s.componentStroke).attr("stroke-width", 1);
475
+ let W = n.nodeRadius * 0.7, b = n.nodeRadius * 1.2;
476
+ if (z.append("line").attr("class", "wardley-market-line").attr("x1", (t) => d.get(t.id).x).attr("y1", (t) => d.get(t.id).y - b).attr("x2", (t) => d.get(t.id).x - b * Math.cos(Math.PI / 6)).attr("y2", (t) => d.get(t.id).y + b * Math.sin(Math.PI / 6)).attr("stroke", s.componentStroke).attr("stroke-width", 1), z.append("line").attr("class", "wardley-market-line").attr("x1", (t) => d.get(t.id).x - b * Math.cos(Math.PI / 6)).attr("y1", (t) => d.get(t.id).y + b * Math.sin(Math.PI / 6)).attr("x2", (t) => d.get(t.id).x + b * Math.cos(Math.PI / 6)).attr("y2", (t) => d.get(t.id).y + b * Math.sin(Math.PI / 6)).attr("stroke", s.componentStroke).attr("stroke-width", 1), z.append("line").attr("class", "wardley-market-line").attr("x1", (t) => d.get(t.id).x + b * Math.cos(Math.PI / 6)).attr("y1", (t) => d.get(t.id).y + b * Math.sin(Math.PI / 6)).attr("x2", (t) => d.get(t.id).x).attr("y2", (t) => d.get(t.id).y - b).attr("stroke", s.componentStroke).attr("stroke-width", 1), z.append("circle").attr("class", "wardley-market-dot").attr("cx", (t) => d.get(t.id).x).attr("cy", (t) => d.get(t.id).y - b).attr("r", W).attr("fill", "white").attr("stroke", s.componentStroke).attr("stroke-width", 2), z.append("circle").attr("class", "wardley-market-dot").attr("cx", (t) => d.get(t.id).x - b * Math.cos(Math.PI / 6)).attr("cy", (t) => d.get(t.id).y + b * Math.sin(Math.PI / 6)).attr("r", W).attr("fill", "white").attr("stroke", s.componentStroke).attr("stroke-width", 2), z.append("circle").attr("class", "wardley-market-dot").attr("cx", (t) => d.get(t.id).x + b * Math.cos(Math.PI / 6)).attr("cy", (t) => d.get(t.id).y + b * Math.sin(Math.PI / 6)).attr("r", W).attr("fill", "white").attr("stroke", s.componentStroke).attr("stroke-width", 2), C.filter((t) => t.isPipelineParent === !0).append("rect").attr("x", (t) => d.get(t.id).x - u / 2).attr("y", (t) => d.get(t.id).y - u / 2).attr("width", u).attr("height", u).attr("fill", s.componentFill).attr("stroke", s.componentStroke).attr("stroke-width", 1), C.filter((t) => t.inertia === !0).append("line").attr("class", "wardley-inertia").attr("x1", (t) => {
477
+ let i = d.get(t.id), o = t.isPipelineParent ? u / 2 + 15 : n.nodeRadius + 15;
478
+ return t.sourceStrategy && (o += n.nodeRadius + 10), i.x + o;
479
+ }).attr("y1", (t) => {
480
+ let i = d.get(t.id), o = t.isPipelineParent ? u : n.nodeRadius * 2;
481
+ return i.y - o / 2;
482
+ }).attr("x2", (t) => {
483
+ let i = d.get(t.id), o = t.isPipelineParent ? u / 2 + 15 : n.nodeRadius + 15;
484
+ return t.sourceStrategy && (o += n.nodeRadius + 10), i.x + o;
485
+ }).attr("y2", (t) => {
486
+ let i = d.get(t.id), o = t.isPipelineParent ? u : n.nodeRadius * 2;
487
+ return i.y + o / 2;
488
+ }).attr("stroke", s.componentStroke).attr("stroke-width", 6), C.append("text").attr("x", (t) => {
489
+ let i = d.get(t.id);
490
+ if (t.className === "anchor") return t.labelOffsetX === void 0 ? i.x : i.x + t.labelOffsetX;
491
+ let o = n.nodeLabelOffset;
492
+ t.sourceStrategy && t.labelOffsetX === void 0 && (o += 10);
493
+ let l = t.labelOffsetX ?? o;
494
+ return i.x + l;
495
+ }).attr("y", (t) => {
496
+ let i = d.get(t.id);
497
+ if (t.className === "anchor") return t.labelOffsetY === void 0 ? i.y - 3 : i.y + t.labelOffsetY;
498
+ let o = -n.nodeLabelOffset;
499
+ t.sourceStrategy && t.labelOffsetY === void 0 && (o -= 10);
500
+ let l = t.labelOffsetY ?? o;
501
+ return i.y + l;
502
+ }).attr("class", "wardley-node-label").attr("fill", (t) => t.className === "evolved" ? s.evolutionStroke : t.className === "anchor" ? "#000" : s.componentLabelColor).attr("font-size", n.labelFontSize).attr("font-weight", (t) => t.className === "anchor" ? "bold" : "normal").attr("text-anchor", (t) => t.className === "anchor" ? "middle" : "start").attr("dominant-baseline", (t) => t.className === "anchor" ? "middle" : "auto").text((t) => t.label), y.annotations.length > 0) {
503
+ let t = v.append("g").attr("class", "wardley-annotations");
504
+ if (y.annotations.forEach((i) => {
505
+ let o = i.coordinates.map((l) => ({
506
+ x: P(l.x),
507
+ y: N(l.y)
508
+ }));
509
+ if (o.length > 1) for (let l = 0; l < o.length - 1; l++) t.append("line").attr("class", "wardley-annotation-line").attr("x1", o[l].x).attr("y1", o[l].y).attr("x2", o[l + 1].x).attr("y2", o[l + 1].y).attr("stroke", s.axisColor).attr("stroke-width", 1.5).attr("stroke-dasharray", "4 4");
510
+ o.forEach((l) => {
511
+ let c = t.append("g").attr("class", "wardley-annotation");
512
+ c.append("circle").attr("cx", l.x).attr("cy", l.y).attr("r", 10).attr("fill", "white").attr("stroke", s.axisColor).attr("stroke-width", 1.5), c.append("text").attr("x", l.x).attr("y", l.y).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", 10).attr("fill", s.axisTextColor).attr("font-weight", "bold").text(i.number);
513
+ });
514
+ }), y.annotationsBox) {
515
+ let i = P(y.annotationsBox.x), o = N(y.annotationsBox.y), l = t.append("g").attr("class", "wardley-annotations-box"), c = [...y.annotations].filter((f) => f.text).sort((f, h) => f.number - h.number), p = [];
516
+ if (c.forEach((f, h) => {
517
+ let m = l.append("text").attr("x", i + 10).attr("y", o + 10 + (h + 1) * 16).attr("font-size", 11).attr("fill", s.axisTextColor).attr("text-anchor", "start").attr("dominant-baseline", "middle").text(`${f.number}. ${f.text}`);
518
+ p.push(m);
519
+ }), p.length > 0) {
520
+ let f = 0, h = 0;
521
+ p.forEach((G) => {
522
+ let X = G.node(), vt = X.getComputedTextLength();
523
+ f = Math.max(f, vt);
524
+ let St = X.getBBox();
525
+ h = Math.max(h, St.height);
526
+ });
527
+ let m = f + 20 + 105, S = c.length * 16 + 20 + h / 2, q = n.padding, j = $ - n.padding - m, T = n.padding, bt = k - n.padding - S;
528
+ i = Math.max(q, Math.min(i, j)), o = Math.max(T, Math.min(o, bt)), p.forEach((G, X) => {
529
+ G.attr("x", i + 10).attr("y", o + 10 + (X + 1) * 16);
530
+ }), l.insert("rect", "text").attr("x", i).attr("y", o).attr("width", m).attr("height", S).attr("fill", "white").attr("stroke", s.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
531
+ }
532
+ }
533
+ }
534
+ if (y.notes.length > 0) {
535
+ let t = v.append("g").attr("class", "wardley-notes");
536
+ y.notes.forEach((i) => {
537
+ let o = P(i.x), l = N(i.y);
538
+ t.append("text").attr("x", o).attr("y", l).attr("text-anchor", "start").attr("font-size", 11).attr("fill", s.axisTextColor).attr("font-weight", "bold").text(i.text);
539
+ });
540
+ }
541
+ if (y.accelerators.length > 0) {
542
+ let t = v.append("g").attr("class", "wardley-accelerators");
543
+ y.accelerators.forEach((i) => {
544
+ let o = P(i.x), l = N(i.y), c = `
545
+ M ${o} ${l - 30 / 2}
546
+ L ${o + 60 - 20} ${l - 30 / 2}
547
+ L ${o + 60 - 20} ${l - 30 / 2 - 8}
548
+ L ${o + 60} ${l}
549
+ L ${o + 60 - 20} ${l + 30 / 2 + 8}
550
+ L ${o + 60 - 20} ${l + 30 / 2}
551
+ L ${o} ${l + 30 / 2}
552
+ Z
553
+ `;
554
+ t.append("path").attr("d", c).attr("fill", "white").attr("stroke", s.componentStroke).attr("stroke-width", 1), t.append("text").attr("x", o + 60 / 2).attr("y", l + 30 / 2 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", s.axisTextColor).attr("font-weight", "bold").text(i.name);
555
+ });
556
+ }
557
+ if (y.deaccelerators.length > 0) {
558
+ let t = v.append("g").attr("class", "wardley-deaccelerators");
559
+ y.deaccelerators.forEach((i) => {
560
+ let o = P(i.x), l = N(i.y), c = `
561
+ M ${o + 60} ${l - 30 / 2}
562
+ L ${o + 20} ${l - 30 / 2}
563
+ L ${o + 20} ${l - 30 / 2 - 8}
564
+ L ${o} ${l}
565
+ L ${o + 20} ${l + 30 / 2 + 8}
566
+ L ${o + 20} ${l + 30 / 2}
567
+ L ${o + 60} ${l + 30 / 2}
568
+ Z
569
+ `;
570
+ t.append("path").attr("d", c).attr("fill", "white").attr("stroke", s.componentStroke).attr("stroke-width", 1), t.append("text").attr("x", o + 60 / 2).attr("y", l + 30 / 2 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", s.axisTextColor).attr("font-weight", "bold").text(i.name);
571
+ });
572
+ }
573
+ }, "draw") },
574
+ styles: /* @__PURE__ */ g(({ wardley: r } = {}) => {
575
+ let e = _(_(At(), Tt().themeVariables).wardley, r);
576
+ return `
577
+ .wardley-background {
578
+ fill: ${e.backgroundColor};
579
+ }
580
+ .wardley-axes line, .wardley-axes path {
581
+ stroke: ${e.axisColor};
582
+ }
583
+ .wardley-axis-label {
584
+ fill: ${e.axisTextColor};
585
+ }
586
+ .wardley-stage-label {
587
+ fill: ${e.axisTextColor};
588
+ }
589
+ .wardley-grid line {
590
+ stroke: ${e.gridColor};
591
+ }
592
+ .wardley-node circle {
593
+ fill: ${e.componentFill};
594
+ stroke: ${e.componentStroke};
595
+ }
596
+ .wardley-node-label {
597
+ fill: ${e.componentLabelColor};
598
+ }
599
+ .wardley-link {
600
+ stroke: ${e.linkStroke};
601
+ }
602
+ .wardley-link--dashed {
603
+ stroke-dasharray: 4 4;
604
+ }
605
+ .wardley-link-label {
606
+ fill: ${e.axisTextColor};
607
+ }
608
+ .wardley-trend line {
609
+ stroke: ${e.evolutionStroke};
610
+ }
611
+ .wardley-annotation-line {
612
+ stroke: ${e.annotationStroke};
613
+ }
614
+ .wardley-annotation circle {
615
+ fill: ${e.annotationFill};
616
+ stroke: ${e.annotationStroke};
617
+ }
618
+ .wardley-annotation text {
619
+ fill: ${e.annotationTextColor};
620
+ }
621
+ .wardley-annotations-box rect {
622
+ fill: ${e.annotationFill};
623
+ stroke: ${e.annotationStroke};
624
+ }
625
+ .wardley-annotations-box text {
626
+ fill: ${e.annotationTextColor};
627
+ }
628
+ .wardley-pipeline-box {
629
+ stroke: ${e.componentStroke};
630
+ }
631
+ .wardley-notes text {
632
+ fill: ${e.axisTextColor};
633
+ }
634
+ `;
635
+ }, "styles")
636
+ };
637
+ export {
638
+ Ht as diagram
639
+ };