@miragon/event-storming-renderer 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,67 +1,67 @@
1
1
  import e from "diagram-js/lib/Diagram";
2
- import { parseDSLWithDiagnostics as t, serializeDSL as n } from "@miragon/event-storming-dsl";
3
- import { ATTACHABLE_STICKY_KINDS as r, CURRENT_SCHEMA_VERSION as i, DEFAULT_BOARD_LEVEL as a, DEFAULT_BOARD_SIZE as o, HOST_STICKY_KINDS as s, LEVEL_STICKY_KINDS as c, validateBoard as l } from "@miragon/event-storming-schema-model";
4
- import u from "diagram-js/lib/features/change-support";
5
- import d from "diagram-js/lib/draw/BaseRenderer";
6
- import { append as f, attr as p, create as m, remove as h } from "tiny-svg";
7
- import g from "diagram-js/lib/features/selection";
8
- import _ from "diagram-js/lib/navigation/zoomscroll";
9
- import v from "diagram-js/lib/navigation/movecanvas";
10
- import ee from "diagram-js/lib/features/keyboard";
11
- import te from "diagram-js/lib/features/modeling";
12
- import ne from "diagram-js/lib/features/move";
13
- import re from "diagram-js/lib/features/create";
14
- import ie from "diagram-js/lib/features/connect";
15
- import ae from "diagram-js/lib/features/context-pad";
16
- import oe from "diagram-js/lib/features/palette";
17
- import se from "diagram-js/lib/features/rules";
18
- import ce from "diagram-js/lib/features/outline";
19
- import le from "diagram-js/lib/features/popup-menu";
20
- import ue from "diagram-js/lib/features/attach-support";
21
- import de from "diagram-js/lib/command/CommandInterceptor";
22
- import fe from "diagram-js/lib/features/mouse";
23
- import pe from "diagram-js/lib/features/lasso-tool";
24
- import me from "diagram-js/lib/features/rules/RuleProvider";
25
- import he from "diagram-js/lib/features/palette/PaletteTooltipComponent";
26
- import { html as ge } from "diagram-js/lib/ui";
27
- import _e from "diagram-js/lib/features/connection-preview";
28
- import ve from "diagram-js/lib/features/ordering/OrderingProvider";
29
- import ye from "diagram-js/lib/features/resize";
30
- import { MODELER_API_VERSION as be } from "@miragon/modeler-api";
2
+ import { ATTACHABLE_STICKY_KINDS as t, CURRENT_SCHEMA_VERSION as n, DEFAULT_BOARD_LEVEL as r, DEFAULT_BOARD_SIZE as i, HOST_STICKY_KINDS as a, LEVEL_STICKY_KINDS as o, assertDrawable as s, validateBoard as c } from "@miragon/event-storming-schema-model";
3
+ import { parseDSLWithDiagnostics as l, serializeDSL as u } from "@miragon/event-storming-dsl";
4
+ import d from "diagram-js/lib/features/change-support";
5
+ import f from "diagram-js/lib/draw/BaseRenderer";
6
+ import { append as p, attr as m, create as h, remove as g } from "tiny-svg";
7
+ import _ from "diagram-js/lib/features/selection";
8
+ import ee from "diagram-js/lib/navigation/zoomscroll";
9
+ import te from "diagram-js/lib/navigation/movecanvas";
10
+ import ne from "diagram-js/lib/features/keyboard";
11
+ import re from "diagram-js/lib/features/modeling";
12
+ import ie from "diagram-js/lib/features/move";
13
+ import ae from "diagram-js/lib/features/create";
14
+ import oe from "diagram-js/lib/features/connect";
15
+ import se from "diagram-js/lib/features/context-pad";
16
+ import ce from "diagram-js/lib/features/palette";
17
+ import le from "diagram-js/lib/features/rules";
18
+ import ue from "diagram-js/lib/features/outline";
19
+ import de from "diagram-js/lib/features/popup-menu";
20
+ import fe from "diagram-js/lib/features/attach-support";
21
+ import pe from "diagram-js/lib/command/CommandInterceptor";
22
+ import me from "diagram-js/lib/features/mouse";
23
+ import he from "diagram-js/lib/features/lasso-tool";
24
+ import ge from "diagram-js/lib/features/rules/RuleProvider";
25
+ import _e from "diagram-js/lib/features/palette/PaletteTooltipComponent";
26
+ import { html as ve } from "diagram-js/lib/ui";
27
+ import ye from "diagram-js/lib/features/connection-preview";
28
+ import be from "diagram-js/lib/features/ordering/OrderingProvider";
29
+ import xe from "diagram-js/lib/features/resize";
30
+ import { MODELER_API_VERSION as Se } from "@miragon/modeler-api";
31
31
  //#region src/io/saveSvg.ts
32
- var xe = [
32
+ var Ce = [
33
33
  "tabindex",
34
34
  "role",
35
35
  "aria-label",
36
36
  "aria-labelledby"
37
37
  ];
38
- function Se(e, t) {
38
+ function we(e, t) {
39
39
  let n = e.getContainer().querySelector(":scope > svg");
40
40
  if (!n) throw Error("No SVG found in the canvas container.");
41
41
  let r = n.cloneNode(!0);
42
- for (let e of xe) r.removeAttribute(e);
43
- let i = t ?? {
42
+ for (let e of Ce) r.removeAttribute(e);
43
+ let a = t ?? {
44
44
  x: 0,
45
45
  y: 0,
46
- ...o
46
+ ...i
47
47
  };
48
- r.setAttribute("xmlns", "http://www.w3.org/2000/svg"), r.setAttribute("viewBox", `${i.x} ${i.y} ${i.width} ${i.height}`), r.setAttribute("width", String(i.width)), r.setAttribute("height", String(i.height));
49
- let a = r.querySelector(".viewport");
50
- return a && a.removeAttribute("transform"), { svg: "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + new XMLSerializer().serializeToString(r) };
48
+ r.setAttribute("xmlns", "http://www.w3.org/2000/svg"), r.setAttribute("viewBox", `${a.x} ${a.y} ${a.width} ${a.height}`), r.setAttribute("width", String(a.width)), r.setAttribute("height", String(a.height));
49
+ let o = r.querySelector(".viewport");
50
+ return o && o.removeAttribute("transform"), { svg: "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + new XMLSerializer().serializeToString(r) };
51
51
  }
52
52
  //#endregion
53
53
  //#region src/model/di-types.ts
54
- var y = "event-storming-root";
55
- function Ce(e) {
54
+ var v = "event-storming-root";
55
+ function Te(e) {
56
56
  return typeof e == "object" && !!e;
57
57
  }
58
- function b(e) {
59
- return Ce(e) && typeof e.eventStormingType == "string" && !("waypoints" in e);
58
+ function y(e) {
59
+ return Te(e) && typeof e.eventStormingType == "string" && !("waypoints" in e);
60
60
  }
61
- function x(e) {
62
- return Ce(e) && typeof e.eventStormingType == "string" && "waypoints" in e;
61
+ function b(e) {
62
+ return Te(e) && typeof e.eventStormingType == "string" && "waypoints" in e;
63
63
  }
64
- var S = [
64
+ var x = [
65
65
  "event",
66
66
  "command",
67
67
  "actor",
@@ -71,33 +71,33 @@ var S = [
71
71
  "external",
72
72
  "hotspot"
73
73
  ];
74
+ function S(e) {
75
+ return x.includes(e);
76
+ }
74
77
  function C(e) {
75
- return S.includes(e);
78
+ return y(e) && S(e.eventStormingType);
76
79
  }
77
80
  function w(e) {
78
- return b(e) && C(e.eventStormingType);
79
- }
80
- function we(e) {
81
- return r.includes(e);
81
+ return t.includes(e);
82
82
  }
83
- function Te(e) {
84
- return s.includes(e);
83
+ function T(e) {
84
+ return a.includes(e);
85
85
  }
86
86
  function Ee(e) {
87
- return b(e) && we(e.eventStormingType);
87
+ return y(e) && w(e.eventStormingType);
88
88
  }
89
- function De(e) {
90
- return b(e) && Te(e.eventStormingType);
89
+ function E(e) {
90
+ return y(e) && T(e.eventStormingType);
91
91
  }
92
- function T(e) {
93
- return b(e) && e.eventStormingType === "drawing";
92
+ function D(e) {
93
+ return y(e) && e.eventStormingType === "drawing";
94
94
  }
95
- function Oe(e) {
96
- return b(e) && e.eventStormingType === "note";
95
+ function De(e) {
96
+ return y(e) && e.eventStormingType === "note";
97
97
  }
98
98
  //#endregion
99
99
  //#region src/theme/palette.ts
100
- var E = {
100
+ var O = {
101
101
  blau: "#335DE5",
102
102
  blauLink: "#2B50D4",
103
103
  blauHell: "#6B8AFF",
@@ -112,7 +112,7 @@ var E = {
112
112
  info: "#335DE5",
113
113
  navy: "#080A20",
114
114
  gradientBrand: "linear-gradient(120deg, #335DE5 30%, #00E676)"
115
- }, ke = [
115
+ }, Oe = [
116
116
  {
117
117
  marker: "***",
118
118
  bold: !0,
@@ -129,28 +129,28 @@ var E = {
129
129
  italic: !0
130
130
  }
131
131
  ];
132
- function D(e) {
132
+ function k(e) {
133
133
  return e.split("\n").map((e) => {
134
134
  let t = e.startsWith("- ");
135
135
  return {
136
136
  bullet: t,
137
- runs: Me(t ? e.slice(2) : e)
137
+ runs: je(t ? e.slice(2) : e)
138
138
  };
139
139
  });
140
140
  }
141
- function Ae(e) {
141
+ function ke(e) {
142
142
  return e.map((e) => {
143
- let t = Pe(e.runs).map((e) => {
143
+ let t = Ne(e.runs).map((e) => {
144
144
  let t = e.bold && e.italic ? "***" : e.bold ? "**" : e.italic ? "*" : "";
145
145
  return t + e.text + t;
146
146
  }).join("");
147
147
  return (e.bullet ? "- " : "") + t;
148
148
  }).join("\n");
149
149
  }
150
- function je(e) {
151
- return D(e).map((e) => (e.bullet ? "• " : "") + e.runs.map((e) => e.text).join("")).join("\n");
150
+ function Ae(e) {
151
+ return k(e).map((e) => (e.bullet ? "• " : "") + e.runs.map((e) => e.text).join("")).join("\n");
152
152
  }
153
- function Me(e) {
153
+ function je(e) {
154
154
  let t = [], n = "", r = () => {
155
155
  n && t.push({
156
156
  text: n,
@@ -159,17 +159,17 @@ function Me(e) {
159
159
  }), n = "";
160
160
  }, i = 0;
161
161
  for (; i < e.length;) {
162
- let a = e[i] === "*" ? Ne(e, i) : void 0;
162
+ let a = e[i] === "*" ? Me(e, i) : void 0;
163
163
  a ? (r(), t.push({
164
164
  text: a.content,
165
165
  bold: a.bold,
166
166
  italic: a.italic
167
167
  }), i = a.end) : (n += e[i], i++);
168
168
  }
169
- return r(), Pe(t);
169
+ return r(), Ne(t);
170
170
  }
171
- function Ne(e, t) {
172
- for (let { marker: n, bold: r, italic: i } of ke) {
171
+ function Me(e, t) {
172
+ for (let { marker: n, bold: r, italic: i } of Oe) {
173
173
  if (!e.startsWith(n, t)) continue;
174
174
  let a = e.indexOf(n, t + n.length);
175
175
  if (!(a <= t + n.length)) return {
@@ -180,7 +180,7 @@ function Ne(e, t) {
180
180
  };
181
181
  }
182
182
  }
183
- function Pe(e) {
183
+ function Ne(e) {
184
184
  let t = [];
185
185
  for (let n of e) {
186
186
  if (!n.text) continue;
@@ -195,7 +195,7 @@ function Pe(e) {
195
195
  }
196
196
  //#endregion
197
197
  //#region src/draw/styles.ts
198
- var O = {
198
+ var A = {
199
199
  event: {
200
200
  label: "Domain Event",
201
201
  width: 130,
@@ -252,124 +252,124 @@ var O = {
252
252
  fill: "#E85D75",
253
253
  stroke: "#C43B55"
254
254
  }
255
- }, k = {
255
+ }, j = {
256
256
  label: "Note",
257
257
  fill: "#ECECEC",
258
258
  stroke: "#C4C4C4"
259
- }, A = {
259
+ }, Pe = {
260
260
  width: 60,
261
261
  height: 40
262
- }, j = 7.5, Fe = {
263
- width: O.aggregate.width,
264
- height: O.aggregate.height
262
+ }, M = 7.5, Fe = {
263
+ width: A.aggregate.width,
264
+ height: A.aggregate.height
265
265
  };
266
- function M(e) {
267
- let t = je(e), n = (t && t.length ? t : "note").split("\n"), r = Math.max(1, ...n.map((e) => e.length));
266
+ function N(e) {
267
+ let t = Ae(e), n = (t && t.length ? t : "note").split("\n"), r = Math.max(1, ...n.map((e) => e.length));
268
268
  return {
269
269
  lines: n,
270
- width: Math.max(Fe.width, Math.round(r * j) + 16),
270
+ width: Math.max(Fe.width, Math.round(r * M) + 16),
271
271
  height: Math.max(Fe.height, n.length * 17 + 16)
272
272
  };
273
273
  }
274
- function N(e, t) {
275
- let n = M(e);
274
+ function P(e, t) {
275
+ let n = N(e);
276
276
  return t.width !== n.width || t.height !== n.height;
277
277
  }
278
- var P = {
279
- paper: E.grau,
280
- ink: E.schwarz,
278
+ var F = {
279
+ paper: O.grau,
280
+ ink: O.schwarz,
281
281
  inkSoft: "#5B5B5B",
282
- surface: E.weiss,
283
- stroke: E.schwarz,
282
+ surface: O.weiss,
283
+ stroke: O.schwarz,
284
284
  arrow: "#9E9E9E",
285
- accent: E.blau,
285
+ accent: O.blau,
286
286
  accentSoft: "rgba(51,93,229,0.12)",
287
- stickyText: E.schwarz
288
- }, F = E.schwarz, I = {
287
+ stickyText: O.schwarz
288
+ }, I = O.schwarz, L = {
289
289
  family: "'Geist Variable', 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif",
290
290
  label: 13
291
- }, Ie = (e) => `<svg width="24" height="24" viewBox="0 0 24 24" class="event-storming-palette-svg">${e}</svg>`, Le = (e, t, n = 0) => Ie(`<rect x="4" y="5" width="16" height="14" fill="${e}" stroke="${t}" stroke-width="1.5"${n ? ` transform="rotate(${n} 12 12)"` : ""}/>`), Re = (e) => `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="event-storming-palette-svg">${e}</svg>`, L = {
291
+ }, Ie = (e) => `<svg width="24" height="24" viewBox="0 0 24 24" class="event-storming-palette-svg">${e}</svg>`, Le = (e, t, n = 0) => Ie(`<rect x="4" y="5" width="16" height="14" fill="${e}" stroke="${t}" stroke-width="1.5"${n ? ` transform="rotate(${n} 12 12)"` : ""}/>`), Re = (e) => `<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false" class="event-storming-palette-svg">${e}</svg>`, R = {
292
292
  draw: Re("<circle cx=\"19\" cy=\"5\" r=\"2\"/><circle cx=\"5\" cy=\"19\" r=\"2\"/><path d=\"M6.5 17.5 17.5 6.5\"/>"),
293
293
  lasso: Re("<path d=\"M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z\"/><path d=\"M5 3a2 2 0 0 0-2 2\"/><path d=\"M19 3a2 2 0 0 1 2 2\"/><path d=\"M5 21a2 2 0 0 1-2-2\"/><path d=\"M9 3h1\"/><path d=\"M9 21h2\"/><path d=\"M14 3h1\"/><path d=\"M3 9v1\"/><path d=\"M21 9v2\"/><path d=\"M3 14v1\"/>"),
294
- note: Le(k.fill, k.stroke)
294
+ note: Le(j.fill, j.stroke)
295
295
  };
296
- for (let e of S) {
297
- let t = O[e];
298
- L[e] = Le(t.fill, t.stroke, e === "hotspot" ? -6 : 0);
296
+ for (let e of x) {
297
+ let t = A[e];
298
+ R[e] = Le(t.fill, t.stroke, e === "hotspot" ? -6 : 0);
299
299
  }
300
300
  function ze(e, t) {
301
301
  return `<svg width="14" height="14" viewBox="0 0 14 14" class="event-storming-palette-svg"><rect x="1" y="1" width="12" height="12" fill="${e}" stroke="${t}" stroke-width="1"/></svg>`;
302
302
  }
303
303
  //#endregion
304
304
  //#region src/palette/EventStormingPaletteProvider.ts
305
- function R(e) {
305
+ function z(e) {
306
306
  if (e.freeArea) return e.freeArea;
307
307
  let t = e.freeRectInsets;
308
308
  return t ? { insets: t } : void 0;
309
309
  }
310
- var Be = 24, z = "stickies-1", B = "stickies-2", Ve = "stickies-3", He = [
310
+ var Be = 24, B = "stickies-1", V = "stickies-2", Ve = "stickies-3", He = [
311
311
  {
312
312
  key: "event",
313
313
  type: "event",
314
- label: O.event.label,
314
+ label: A.event.label,
315
315
  title: "Domain event",
316
316
  shortcut: "E",
317
- group: z
317
+ group: B
318
318
  },
319
319
  {
320
320
  key: "command",
321
321
  type: "command",
322
- label: O.command.label,
322
+ label: A.command.label,
323
323
  title: "Command",
324
324
  shortcut: "C",
325
- group: z
325
+ group: B
326
326
  },
327
327
  {
328
328
  key: "actor",
329
329
  type: "actor",
330
- label: O.actor.label,
330
+ label: A.actor.label,
331
331
  title: "Actor",
332
- group: z
332
+ group: B
333
333
  },
334
334
  {
335
335
  key: "aggregate",
336
336
  type: "aggregate",
337
- label: O.aggregate.label,
337
+ label: A.aggregate.label,
338
338
  title: "Aggregate",
339
- group: z
339
+ group: B
340
340
  },
341
341
  {
342
342
  key: "policy",
343
343
  type: "policy",
344
- label: O.policy.label,
344
+ label: A.policy.label,
345
345
  title: "Policy",
346
- group: B
346
+ group: V
347
347
  },
348
348
  {
349
349
  key: "readmodel",
350
350
  type: "readmodel",
351
- label: O.readmodel.label,
351
+ label: A.readmodel.label,
352
352
  title: "Read model",
353
- group: B
353
+ group: V
354
354
  },
355
355
  {
356
356
  key: "external",
357
357
  type: "external",
358
- label: O.external.label,
358
+ label: A.external.label,
359
359
  title: "External system",
360
- group: B
360
+ group: V
361
361
  },
362
362
  {
363
363
  key: "hotspot",
364
364
  type: "hotspot",
365
- label: O.hotspot.label,
365
+ label: A.hotspot.label,
366
366
  title: "Hotspot",
367
367
  group: Ve
368
368
  },
369
369
  {
370
370
  key: "note",
371
371
  type: "note",
372
- label: k.label,
372
+ label: j.label,
373
373
  title: "Note",
374
374
  group: Ve
375
375
  }
@@ -413,15 +413,15 @@ var Be = 24, z = "stickies-1", B = "stickies-2", Ve = "stickies-3", He = [
413
413
  group: "tools",
414
414
  title: "Lasso",
415
415
  shortcut: "L",
416
- html: `<div class="entry event-storming-palette-entry">${L.lasso}</div>`,
416
+ html: `<div class="entry event-storming-palette-entry">${R.lasso}</div>`,
417
417
  action: { click: (e) => this.lassoTool.activateSelection(e) }
418
418
  }, e["draw-tool"] = {
419
419
  group: "tools",
420
420
  title: "Draw",
421
- html: `<div class="entry event-storming-palette-entry">${L.draw}</div>`,
421
+ html: `<div class="entry event-storming-palette-entry">${R.draw}</div>`,
422
422
  action: { click: () => this.drawTool.toggle() }
423
423
  };
424
- let t = c[this.eventStormingModeling.getLevel()];
424
+ let t = o[this.eventStormingModeling.getLevel()];
425
425
  for (let n of He) {
426
426
  if (n.type !== "note" && !t.includes(n.type)) continue;
427
427
  let r = (e) => {
@@ -432,7 +432,7 @@ var Be = 24, z = "stickies-1", B = "stickies-2", Ve = "stickies-3", He = [
432
432
  group: n.group,
433
433
  title: n.title,
434
434
  ...n.shortcut ? { shortcut: n.shortcut } : {},
435
- html: `<div class="entry event-storming-palette-entry" draggable="true">${L[n.key]}</div>`,
435
+ html: `<div class="entry event-storming-palette-entry" draggable="true">${R[n.key]}</div>`,
436
436
  action: {
437
437
  dragstart: r,
438
438
  click: r
@@ -444,13 +444,13 @@ var Be = 24, z = "stickies-1", B = "stickies-2", Ve = "stickies-3", He = [
444
444
  placeInFreeRect(e) {
445
445
  let { canvas: t, modeling: n, selection: r, elementRegistry: i } = this;
446
446
  if (!t || !n || !r || !i) return !1;
447
- let a = this.freeAreaCentre(t), o = (e) => i.filter(b).some((t) => Math.abs(t.x + t.width / 2 - e.x) < 1 && Math.abs(t.y + t.height / 2 - e.y) < 1);
447
+ let a = this.freeAreaCentre(t), o = (e) => i.filter(y).some((t) => Math.abs(t.x + t.width / 2 - e.x) < 1 && Math.abs(t.y + t.height / 2 - e.y) < 1);
448
448
  for (; o(a);) a.x += Be, a.y += Be;
449
449
  let s = n.createShape(e, a, t.getRootElement());
450
450
  return r.select(s), t.focus(), this.labelEditing?.activate(s), !0;
451
451
  }
452
452
  freeAreaCentre(e) {
453
- let t = this.config && R(this.config), n = t?.center?.();
453
+ let t = this.config && z(this.config), n = t?.center?.();
454
454
  if (n) return {
455
455
  x: n.x,
456
456
  y: n.y
@@ -496,7 +496,7 @@ var qe = class {
496
496
  canvas: { container: this._container },
497
497
  modules: t,
498
498
  eventStormingKeyboard: { undoRedoKeys: this._options.undoRedoKeys ?? !0 },
499
- eventStormingPalette: { freeArea: R(this._options) },
499
+ eventStormingPalette: { freeArea: z(this._options) },
500
500
  eventStormingImporter: { fitOnImport: this._options.fitOnImport ?? !0 }
501
501
  });
502
502
  }
@@ -513,35 +513,35 @@ var qe = class {
513
513
  }
514
514
  async importMap(e) {
515
515
  let t = this._ensureDiagram(), n = t.get("eventBus"), r = t.get("eventStormingImporter");
516
- Ge(e);
516
+ Ge(e), s(e);
517
517
  let i = t.get("eventStormingLabelEditing", !1);
518
518
  i?.suspend(), t.get("popupMenu", !1)?.close(), r.clear();
519
519
  let a = r.import(e);
520
520
  return t.get("commandStack", !1)?.clear(!1), n.fire("import.done", { warnings: a }), i?.resumeAfterImport(), { warnings: a };
521
521
  }
522
522
  async importDSL(e) {
523
- let n = this._ensureDiagram().get("eventBus");
524
- n.fire("import.parse.start", { text: e });
525
- let { board: r, diagnostics: i } = t(e);
526
- n.fire("import.parse.done", {
527
- board: r,
528
- diagnostics: i
523
+ let t = this._ensureDiagram().get("eventBus");
524
+ t.fire("import.parse.start", { text: e });
525
+ let { board: n, diagnostics: r } = l(e);
526
+ t.fire("import.parse.done", {
527
+ board: n,
528
+ diagnostics: r
529
529
  });
530
- let { warnings: a } = await this.importMap(r);
531
- return { warnings: [...i.map((e) => ({
530
+ let { warnings: i } = await this.importMap(n);
531
+ return { warnings: [...r.map((e) => ({
532
532
  message: `Line ${e.line}: ${e.message}`,
533
533
  line: e.line,
534
534
  source: e.text
535
- })), ...a] };
535
+ })), ...i] };
536
536
  }
537
537
  exportMap() {
538
538
  return this.get("eventStormingExporter").export();
539
539
  }
540
540
  exportDSL() {
541
- return n(this.exportMap());
541
+ return u(this.exportMap());
542
542
  }
543
543
  async saveSVG() {
544
- return Se(this.get("canvas"), this.get("boardBounds").contentBounds());
544
+ return we(this.get("canvas"), this.get("boardBounds").contentBounds());
545
545
  }
546
546
  attachTo(e) {
547
547
  e.appendChild(this._container), this.get("canvas").resized();
@@ -603,8 +603,8 @@ var Ze = {
603
603
  }
604
604
  }
605
605
  createSticky(e) {
606
- if (!C(e.elementType)) throw Error(`not a sticky kind: ${e.elementType}`);
607
- let { width: t, height: n } = O[e.elementType];
606
+ if (!S(e.elementType)) throw Error(`not a sticky kind: ${e.elementType}`);
607
+ let { width: t, height: n } = A[e.elementType];
608
608
  return this.elementFactory.createShape({
609
609
  id: e.id,
610
610
  x: e.position.x - t / 2,
@@ -618,7 +618,7 @@ var Ze = {
618
618
  });
619
619
  }
620
620
  createNote(e) {
621
- let { width: t, height: n } = e.size ?? M(e.label), r = e.align?.horizontal, i = e.align?.vertical;
621
+ let { width: t, height: n } = e.size ?? N(e.label), r = e.align?.horizontal, i = e.align?.vertical;
622
622
  return this.elementFactory.createShape({
623
623
  id: e.id,
624
624
  x: e.position.x - t / 2,
@@ -663,7 +663,7 @@ var Ze = {
663
663
  });
664
664
  }
665
665
  createNew(e, t) {
666
- let n = this.uniqueLabel(t), { width: r, height: i } = C(e) ? O[e] : M(n);
666
+ let n = this.uniqueLabel(t), { width: r, height: i } = S(e) ? A[e] : N(n);
667
667
  return this.elementFactory.createShape({
668
668
  id: this.allocateId(e),
669
669
  width: r,
@@ -673,7 +673,7 @@ var Ze = {
673
673
  });
674
674
  }
675
675
  createProvisional() {
676
- let { width: e, height: t } = O.event;
676
+ let { width: e, height: t } = A.event;
677
677
  return this.elementFactory.createShape({
678
678
  id: this.allocateId("event"),
679
679
  width: e,
@@ -720,14 +720,14 @@ var nt = class {
720
720
  if (!t.length) return {
721
721
  x: 0,
722
722
  y: 0,
723
- ...o
723
+ ...i
724
724
  };
725
- let n = Math.min(...t.map((e) => e.x)), r = Math.min(...t.map((e) => e.y)), i = Math.max(...t.map((e) => e.x + e.width)), a = Math.max(...t.map((e) => e.y + e.height));
725
+ let n = Math.min(...t.map((e) => e.x)), r = Math.min(...t.map((e) => e.y)), a = Math.max(...t.map((e) => e.x + e.width)), o = Math.max(...t.map((e) => e.y + e.height));
726
726
  return {
727
727
  x: n - e,
728
728
  y: r - e,
729
- width: i - n + 2 * e,
730
- height: a - r + 2 * e
729
+ width: a - n + 2 * e,
730
+ height: o - r + 2 * e
731
731
  };
732
732
  }
733
733
  isEmpty() {
@@ -750,66 +750,66 @@ var nt = class {
750
750
  setTypeCaptionsVisible(e) {
751
751
  if (e === this._typeCaptionsVisible) return;
752
752
  this._typeCaptionsVisible = e, this.eventBus.fire(it, { typeCaptionsVisible: e });
753
- let t = this.elementRegistry.filter(w);
753
+ let t = this.elementRegistry.filter(C);
754
754
  t.length && this.eventBus.fire("elements.changed", { elements: t });
755
755
  }
756
- }, V = {
757
- __depends__: [u],
756
+ }, H = {
757
+ __depends__: [d],
758
758
  eventStormingViewOptions: ["type", at]
759
- }, ot = 1500, st = -3, ct = "event-storming-kind-caption", lt = 9, ut = 300, dt = P.stickyText, ft = 7, pt = "#FBFBFB", mt = "#B9B9B9", ht = "6 4", gt = "event-storming-sticky-shadow";
759
+ }, ot = 1500, st = -3, ct = "event-storming-kind-caption", lt = 9, ut = 300, dt = F.stickyText, ft = 7, pt = "#FBFBFB", mt = "#B9B9B9", ht = "6 4", gt = "event-storming-sticky-shadow";
760
760
  function _t(e) {
761
761
  let t = e.closest("svg");
762
762
  if (!t) return !1;
763
763
  if (t.querySelector("#event-storming-sticky-shadow")) return !0;
764
- let n = p(m("feDropShadow"), {
764
+ let n = m(h("feDropShadow"), {
765
765
  dx: 0,
766
766
  dy: 5,
767
767
  stdDeviation: 5,
768
768
  "flood-color": "#000000",
769
769
  "flood-opacity": .2
770
- }), r = p(m("filter"), {
770
+ }), r = m(h("filter"), {
771
771
  id: gt,
772
772
  x: "-40%",
773
773
  y: "-40%",
774
774
  width: "180%",
775
775
  height: "180%"
776
776
  });
777
- f(r, n);
778
- let i = m("defs");
779
- return f(i, r), t.insertBefore(i, t.firstChild), !0;
777
+ p(r, n);
778
+ let i = h("defs");
779
+ return p(i, r), t.insertBefore(i, t.firstChild), !0;
780
780
  }
781
- var vt = class extends d {
781
+ var vt = class extends f {
782
782
  viewOptions;
783
783
  static $inject = ["eventBus", "eventStormingViewOptions"];
784
784
  constructor(e, t) {
785
785
  super(e, ot), this.viewOptions = t;
786
786
  }
787
787
  canRender(e) {
788
- return b(e) || x(e);
788
+ return y(e) || b(e);
789
789
  }
790
790
  drawShape(e, t) {
791
791
  let n = t;
792
792
  return n.eventStormingType === "drawing" ? this.drawDrawing(e, n) : this.drawSticky(e, n);
793
793
  }
794
794
  drawDrawing(e, t) {
795
- let n = t.drawingPoints ?? [], r = t.strokeStyle === "dashed" ? "8 5" : t.strokeStyle === "dotted" ? "2 4" : void 0, i = p(m(t.closed ? "polygon" : "polyline"), {
795
+ let n = t.drawingPoints ?? [], r = t.strokeStyle === "dashed" ? "8 5" : t.strokeStyle === "dotted" ? "2 4" : void 0, i = m(h(t.closed ? "polygon" : "polyline"), {
796
796
  points: n.map((e) => `${e.x},${e.y}`).join(" "),
797
797
  fill: "none",
798
- stroke: t.color ?? F,
798
+ stroke: t.color ?? I,
799
799
  "stroke-width": 2,
800
800
  "stroke-linecap": "round",
801
801
  "stroke-linejoin": "round",
802
802
  ...r ? { "stroke-dasharray": r } : {}
803
803
  });
804
- return f(e, i), i;
804
+ return p(e, i), i;
805
805
  }
806
806
  drawSticky(e, t) {
807
- let n = t.eventStormingType, r = C(n) ? O[n] : k, i = t.provisional === !0, a = e;
807
+ let n = t.eventStormingType, r = S(n) ? A[n] : j, i = t.provisional === !0, a = e;
808
808
  if (n === "hotspot") {
809
- let n = p(m("g"), { transform: `rotate(${st} ${t.width / 2} ${t.height / 2})` });
810
- f(e, n), a = n;
809
+ let n = m(h("g"), { transform: `rotate(${st} ${t.width / 2} ${t.height / 2})` });
810
+ p(e, n), a = n;
811
811
  }
812
- let o = p(m("rect"), {
812
+ let o = m(h("rect"), {
813
813
  x: 0,
814
814
  y: 0,
815
815
  width: Math.max(t.width, 1),
@@ -820,32 +820,32 @@ var vt = class extends d {
820
820
  "stroke-width": 1.5,
821
821
  ...i ? { "stroke-dasharray": ht } : {}
822
822
  });
823
- if (_t(e) && o.setAttribute("filter", `url(#${gt})`), f(a, o), i) return o;
824
- if (n === "note" ? Ct(a, t) : bt(a, t), C(n) && this.viewOptions.typeCaptionsVisible()) {
825
- let e = H(O[n].label, t.width / 2, t.height - ft, {
823
+ if (_t(e) && o.setAttribute("filter", `url(#${gt})`), p(a, o), i) return o;
824
+ if (n === "note" ? Ct(a, t) : bt(a, t), S(n) && this.viewOptions.typeCaptionsVisible()) {
825
+ let e = U(A[n].label, t.width / 2, t.height - ft, {
826
826
  "text-anchor": "middle",
827
827
  "font-size": lt,
828
828
  fill: dt
829
829
  });
830
- e.setAttribute("class", ct), e.setAttribute("font-weight", String(ut)), f(a, e);
830
+ e.setAttribute("class", ct), e.setAttribute("font-weight", String(ut)), p(a, e);
831
831
  }
832
832
  return o;
833
833
  }
834
834
  drawConnection(e, t) {
835
- let n = t, [r, i] = At(n), a = p(m("polyline"), {
835
+ let n = t, [r, i] = At(n), a = m(h("polyline"), {
836
836
  points: `${r.x},${r.y} ${i.x},${i.y}`,
837
837
  fill: "none",
838
- stroke: P.arrow,
838
+ stroke: F.arrow,
839
839
  "stroke-width": 1.5,
840
840
  "stroke-linecap": "round"
841
841
  });
842
- if (f(e, a), f(e, Ot(r, i, P.arrow, 11, 5)), n.linkLabel) {
842
+ if (p(e, a), p(e, Ot(r, i, F.arrow, 11, 5)), n.linkLabel) {
843
843
  let t = (r.x + i.x) / 2, a = (r.y + i.y) / 2;
844
- f(e, H(n.linkLabel, t, a - 5, {
844
+ p(e, U(n.linkLabel, t, a - 5, {
845
845
  "text-anchor": "middle",
846
846
  "font-size": 11,
847
847
  "font-style": "italic",
848
- fill: P.inkSoft
848
+ fill: F.inkSoft
849
849
  }));
850
850
  }
851
851
  return a;
@@ -877,24 +877,24 @@ function yt(e, t) {
877
877
  return r.push(i), r;
878
878
  }
879
879
  function bt(e, t) {
880
- let n = t.width - 16, r = Math.max(1, Math.floor(n / j)), i = Math.max(1, Math.floor((t.height - 16) / 17)), a = (t.eventStormingLabel ?? "").split("\n").flatMap((e) => yt(e, r)).slice(0, i), o = t.width / 2, s = t.height / 2 - (a.length - 1) * 17 / 2 + 4;
880
+ let n = t.width - 16, r = Math.max(1, Math.floor(n / M)), i = Math.max(1, Math.floor((t.height - 16) / 17)), a = (t.eventStormingLabel ?? "").split("\n").flatMap((e) => yt(e, r)).slice(0, i), o = t.width / 2, s = t.height / 2 - (a.length - 1) * 17 / 2 + 4;
881
881
  a.forEach((t, n) => {
882
- f(e, H(t, o, s + n * 17, {
882
+ p(e, U(t, o, s + n * 17, {
883
883
  "text-anchor": "middle",
884
- fill: P.stickyText
884
+ fill: F.stickyText
885
885
  }));
886
886
  });
887
887
  }
888
888
  var xt = 2, St = 12.5;
889
889
  function Ct(e, t) {
890
- let n = t.width - 16, r = Math.max(1, Math.floor(n / j)), i = Math.max(1, Math.floor((t.height - 16) / 17)), a = D(t.eventStormingLabel ?? "").flatMap((e) => wt(e, r)).slice(0, i), o = t.alignHorizontal ?? "left", s = t.alignVertical ?? "top", c = o === "left" ? "start" : o === "center" ? "middle" : "end", l = a.length * 17, u = s === "top" ? 8 : s === "middle" ? (t.height - l) / 2 : t.height - 8 - l;
890
+ let n = t.width - 16, r = Math.max(1, Math.floor(n / M)), i = Math.max(1, Math.floor((t.height - 16) / 17)), a = k(t.eventStormingLabel ?? "").flatMap((e) => wt(e, r)).slice(0, i), o = t.alignHorizontal ?? "left", s = t.alignVertical ?? "top", c = o === "left" ? "start" : o === "center" ? "middle" : "end", l = a.length * 17, u = s === "top" ? 8 : s === "middle" ? (t.height - l) / 2 : t.height - 8 - l;
891
891
  a.forEach((n, r) => {
892
- let i = o === "left" ? 8 + (n.indent ? 12 : 0) : o === "center" ? t.width / 2 : t.width - 8, a = p(m("text"), {
892
+ let i = o === "left" ? 8 + (n.indent ? 12 : 0) : o === "center" ? t.width / 2 : t.width - 8, a = m(h("text"), {
893
893
  x: i,
894
894
  y: u + r * 17 + St,
895
- "font-family": I.family,
896
- "font-size": I.label,
897
- fill: P.stickyText,
895
+ "font-family": L.family,
896
+ "font-size": L.label,
897
+ fill: F.stickyText,
898
898
  "text-anchor": c
899
899
  }), s = n.marker ? [{
900
900
  text: "• ",
@@ -902,10 +902,10 @@ function Ct(e, t) {
902
902
  italic: !1
903
903
  }, ...n.runs] : n.runs;
904
904
  for (let e of s) {
905
- let t = m("tspan");
906
- t.textContent = e.text, e.bold && t.setAttribute("font-weight", "600"), e.italic && t.setAttribute("font-style", "italic"), f(a, t);
905
+ let t = h("tspan");
906
+ t.textContent = e.text, e.bold && t.setAttribute("font-weight", "600"), e.italic && t.setAttribute("font-style", "italic"), p(a, t);
907
907
  }
908
- f(e, a);
908
+ p(e, a);
909
909
  });
910
910
  }
911
911
  function wt(e, t) {
@@ -949,32 +949,32 @@ function Dt(e, t, n) {
949
949
  }
950
950
  return r;
951
951
  }
952
- function H(e, t, n, r = {}) {
953
- let i = p(m("text"), {
952
+ function U(e, t, n, r = {}) {
953
+ let i = m(h("text"), {
954
954
  x: t,
955
955
  y: n,
956
- "font-family": I.family,
957
- "font-size": I.label,
958
- fill: P.ink,
956
+ "font-family": L.family,
957
+ "font-size": L.label,
958
+ fill: F.ink,
959
959
  ...r
960
960
  });
961
961
  return i.textContent = e, i;
962
962
  }
963
963
  function Ot(e, t, n, r = 10, i = 5) {
964
964
  let a = Math.atan2(t.y - e.y, t.x - e.x), o = t.x - r * Math.cos(a), s = t.y - r * Math.sin(a), c = `${t.x},${t.y} ${o - i * Math.sin(a)},${s + i * Math.cos(a)} ${o + i * Math.sin(a)},${s - i * Math.cos(a)}`;
965
- return p(m("polygon"), {
965
+ return m(h("polygon"), {
966
966
  points: c,
967
967
  fill: n
968
968
  });
969
969
  }
970
- function U(e) {
970
+ function W(e) {
971
971
  return {
972
972
  x: e.x + e.width / 2,
973
973
  y: e.y + e.height / 2
974
974
  };
975
975
  }
976
976
  function kt(e, t) {
977
- let n = U(e), r = t.x - n.x, i = t.y - n.y;
977
+ let n = W(e), r = t.x - n.x, i = t.y - n.y;
978
978
  if (r === 0 && i === 0) return n;
979
979
  let a = e.width / 2 + 2, o = e.height / 2 + 2, s = Math.min(r === 0 ? Infinity : a / Math.abs(r), i === 0 ? Infinity : o / Math.abs(i));
980
980
  return {
@@ -991,13 +991,13 @@ function At(e) {
991
991
  };
992
992
  return [e, r[r.length - 1] ?? e];
993
993
  }
994
- let i = U(t), a = U(n), o = kt(t, a), s = kt(n, i);
994
+ let i = W(t), a = W(n), o = kt(t, a), s = kt(n, i);
995
995
  return (a.x - i.x) * (s.x - o.x) + (a.y - i.y) * (s.y - o.y) <= 0 ? [i, a] : [o, s];
996
996
  }
997
997
  //#endregion
998
998
  //#region src/draw/index.ts
999
999
  var jt = {
1000
- __depends__: [V],
1000
+ __depends__: [H],
1001
1001
  __init__: ["eventStormingRenderer"],
1002
1002
  eventStormingRenderer: ["type", vt]
1003
1003
  }, Mt = { drawing: 0 }, Nt = .001, Pt = class {
@@ -1041,7 +1041,7 @@ var jt = {
1041
1041
  let n = "attachedTo" in e ? e.attachedTo : void 0;
1042
1042
  if (!n) continue;
1043
1043
  let r = i.get(n);
1044
- !r || !De(r) ? t.push({
1044
+ !r || !E(r) ? t.push({
1045
1045
  message: `“${e.id}” is pinned to “${n}”, which isn't on the board or can't hold a pin. It stays unpinned.`,
1046
1046
  elementId: e.id
1047
1047
  }) : i.get(e.id).host = r;
@@ -1061,8 +1061,8 @@ var jt = {
1061
1061
  return this.config?.fitOnImport !== !1 && this.fitToContent(), this.eventBus.fire("import.render.done", { warnings: t }), t;
1062
1062
  }
1063
1063
  boardRoot() {
1064
- let e = this.elementRegistry.get(y);
1065
- e || (e = this.elementFactory.createRoot({ id: y }), this.canvas.setRootElement(e));
1064
+ let e = this.elementRegistry.get(v);
1065
+ e || (e = this.elementFactory.createRoot({ id: v }), this.canvas.setRootElement(e));
1066
1066
  for (let t of this.canvas.getRootElements()) t !== e && this.canvas.removeRootElement(t);
1067
1067
  return e;
1068
1068
  }
@@ -1104,28 +1104,28 @@ var jt = {
1104
1104
  this.elementRegistry = e;
1105
1105
  }
1106
1106
  export() {
1107
- let e = this.elementRegistry.get(y)?.businessObject, t = e?.config ?? { title: "Untitled Board" }, n = [], r = [];
1107
+ let e = this.elementRegistry.get(v)?.businessObject, t = e?.config ?? { title: "Untitled Board" }, r = [], i = [];
1108
1108
  for (let e of this.elementRegistry.getAll()) if (e.id !== "event-storming-root") {
1109
- if (x(e)) r.push({
1109
+ if (b(e)) i.push({
1110
1110
  id: e.id,
1111
1111
  edgeType: "arrow",
1112
1112
  from: e.source?.id ?? "",
1113
1113
  to: e.target?.id ?? "",
1114
1114
  ...e.linkLabel ? { label: e.linkLabel } : {}
1115
1115
  });
1116
- else if (b(e)) {
1116
+ else if (y(e)) {
1117
1117
  let t = this.buildElement(e);
1118
- t && n.push(t);
1118
+ t && r.push(t);
1119
1119
  }
1120
1120
  }
1121
1121
  let a = {
1122
- schemaVersion: i,
1122
+ schemaVersion: n,
1123
1123
  config: t,
1124
- elements: n,
1125
- edges: r,
1124
+ elements: r,
1125
+ edges: i,
1126
1126
  ...e?.rawPassthrough ? { rawPassthrough: e.rawPassthrough } : {}
1127
1127
  };
1128
- return l(a);
1128
+ return c(a);
1129
1129
  }
1130
1130
  buildElement(e) {
1131
1131
  if (e.eventStormingType === "drawing") {
@@ -1144,7 +1144,7 @@ var jt = {
1144
1144
  ...e.color ? { color: e.color } : {}
1145
1145
  };
1146
1146
  }
1147
- let t = e.eventStormingType === "note" && N(e.eventStormingLabel, e) ? {
1147
+ let t = e.eventStormingType === "note" && P(e.eventStormingLabel, e) ? {
1148
1148
  width: e.width,
1149
1149
  height: e.height
1150
1150
  } : void 0, n = e.eventStormingType === "note" ? It(e) : void 0;
@@ -1185,49 +1185,49 @@ var Rt = {
1185
1185
  return [
1186
1186
  et,
1187
1187
  rt,
1188
- V,
1188
+ H,
1189
1189
  jt,
1190
1190
  Rt
1191
1191
  ];
1192
1192
  }
1193
- }, W = class extends zt {
1193
+ }, Bt = class extends zt {
1194
1194
  _getModules() {
1195
1195
  return [
1196
1196
  ...super._getModules(),
1197
- g,
1198
1197
  _,
1199
- v,
1200
- ee
1198
+ ee,
1199
+ te,
1200
+ ne
1201
1201
  ];
1202
1202
  }
1203
- }, Bt = class extends de {
1203
+ }, Vt = class extends pe {
1204
1204
  static $inject = ["eventBus", "modeling"];
1205
1205
  constructor(e, t) {
1206
1206
  super(e), this.preExecute("element.updateProperties", (e) => {
1207
1207
  let { element: n, properties: r } = e.context, i = r.eventStormingType;
1208
1208
  if (typeof i != "string") return;
1209
1209
  let a = n;
1210
- if (a.host && !we(i) && t.updateAttachment(a, void 0), a.attachers?.length && !Te(i)) for (let e of [...a.attachers]) t.updateAttachment(e, void 0);
1210
+ if (a.host && !w(i) && t.updateAttachment(a, void 0), a.attachers?.length && !T(i)) for (let e of [...a.attachers]) t.updateAttachment(e, void 0);
1211
1211
  });
1212
1212
  }
1213
- }, Vt = {
1214
- __depends__: [ue],
1213
+ }, Ht = {
1214
+ __depends__: [fe],
1215
1215
  __init__: ["eventStormingAttachBehavior"],
1216
- eventStormingAttachBehavior: ["type", Bt]
1216
+ eventStormingAttachBehavior: ["type", Vt]
1217
1217
  };
1218
1218
  //#endregion
1219
1219
  //#region src/modeling/cmd/UpdatePropertiesHandler.ts
1220
- function Ht(e, t, n) {
1220
+ function Ut(e, t, n) {
1221
1221
  n === void 0 ? delete e[t] : e[t] = n;
1222
1222
  }
1223
- var Ut = [
1223
+ var Wt = [
1224
1224
  "x",
1225
1225
  "y",
1226
1226
  "width",
1227
1227
  "height"
1228
1228
  ];
1229
- function Wt(e, t) {
1230
- if (!t.some((e) => Ut.includes(e))) return [e];
1229
+ function Gt(e, t) {
1230
+ if (!t.some((e) => Wt.includes(e))) return [e];
1231
1231
  let n = e;
1232
1232
  return [
1233
1233
  e,
@@ -1235,18 +1235,18 @@ function Wt(e, t) {
1235
1235
  ...n.outgoing ?? []
1236
1236
  ];
1237
1237
  }
1238
- var Gt = class {
1238
+ var Kt = class {
1239
1239
  execute(e) {
1240
1240
  let { element: t, properties: n } = e, r = t, i = {};
1241
- for (let e of Object.keys(n)) i[e] = r[e], Ht(r, e, n[e]);
1242
- return e.oldProperties = i, Wt(t, Object.keys(n));
1241
+ for (let e of Object.keys(n)) i[e] = r[e], Ut(r, e, n[e]);
1242
+ return e.oldProperties = i, Gt(t, Object.keys(n));
1243
1243
  }
1244
1244
  revert(e) {
1245
1245
  let { element: t, oldProperties: n } = e, r = t;
1246
- if (n) for (let e of Object.keys(n)) Ht(r, e, n[e]);
1247
- return Wt(t, Object.keys(n ?? {}));
1246
+ if (n) for (let e of Object.keys(n)) Ut(r, e, n[e]);
1247
+ return Gt(t, Object.keys(n ?? {}));
1248
1248
  }
1249
- }, Kt = "element.updateProperties", qt = class {
1249
+ }, qt = "element.updateProperties", Jt = class {
1250
1250
  commandStack;
1251
1251
  canvas;
1252
1252
  elementRegistry;
@@ -1256,17 +1256,17 @@ var Gt = class {
1256
1256
  "elementRegistry"
1257
1257
  ];
1258
1258
  constructor(e, t, n) {
1259
- this.commandStack = e, this.canvas = t, this.elementRegistry = n, e.registerHandler(Kt, Gt);
1259
+ this.commandStack = e, this.canvas = t, this.elementRegistry = n, e.registerHandler(qt, Kt);
1260
1260
  }
1261
1261
  updateProperties(e, t) {
1262
- this.commandStack.execute(Kt, {
1262
+ this.commandStack.execute(qt, {
1263
1263
  element: e,
1264
1264
  properties: t
1265
1265
  });
1266
1266
  }
1267
1267
  updateLabel(e, t) {
1268
- if (e.eventStormingType === "note" && !N(e.eventStormingLabel, e)) {
1269
- let { width: n, height: r } = M(t), i = e.x + e.width / 2, a = e.y + e.height / 2;
1268
+ if (e.eventStormingType === "note" && !P(e.eventStormingLabel, e)) {
1269
+ let { width: n, height: r } = N(t), i = e.x + e.width / 2, a = e.y + e.height / 2;
1270
1270
  this.updateProperties(e, {
1271
1271
  eventStormingLabel: t,
1272
1272
  width: n,
@@ -1277,9 +1277,9 @@ var Gt = class {
1277
1277
  } else this.updateProperties(e, { eventStormingLabel: t });
1278
1278
  }
1279
1279
  setStickyKind(e, t) {
1280
- if (!C(e.eventStormingType) || !C(t)) throw Error("setStickyKind: only sticky kinds can be retyped");
1280
+ if (!S(e.eventStormingType) || !S(t)) throw Error("setStickyKind: only sticky kinds can be retyped");
1281
1281
  if (e.eventStormingType === t && !e.provisional) return;
1282
- let { width: n, height: r } = O[t], i = e.x + e.width / 2, a = e.y + e.height / 2;
1282
+ let { width: n, height: r } = A[t], i = e.x + e.width / 2, a = e.y + e.height / 2;
1283
1283
  this.updateProperties(e, {
1284
1284
  eventStormingType: t,
1285
1285
  ...e.provisional ? { provisional: void 0 } : {},
@@ -1296,12 +1296,12 @@ var Gt = class {
1296
1296
  this.updateProperties(e, { strokeStyle: t });
1297
1297
  }
1298
1298
  getLevel() {
1299
- return this.elementRegistry.get("event-storming-root")?.businessObject?.config.level ?? a;
1299
+ return this.elementRegistry.get("event-storming-root")?.businessObject?.config.level ?? r;
1300
1300
  }
1301
1301
  setLevel(e) {
1302
1302
  if (this.getLevel() === e) return;
1303
1303
  let t = this.root(), n = t.businessObject ?? { config: { title: "Untitled Board" } };
1304
- this.commandStack.execute(Kt, {
1304
+ this.commandStack.execute(qt, {
1305
1305
  element: t,
1306
1306
  properties: { businessObject: {
1307
1307
  ...n,
@@ -1315,7 +1315,7 @@ var Gt = class {
1315
1315
  root() {
1316
1316
  return this.elementRegistry.get("event-storming-root") ?? this.canvas.getRootElement();
1317
1317
  }
1318
- }, Jt = 24, Yt = [
1318
+ }, Yt = 24, Xt = [
1319
1319
  "eventStormingType",
1320
1320
  "color",
1321
1321
  "drawingPoints",
@@ -1323,8 +1323,8 @@ var Gt = class {
1323
1323
  "strokeStyle",
1324
1324
  "alignHorizontal",
1325
1325
  "alignVertical"
1326
- ], Xt = ["eventStormingType", "linkLabel"];
1327
- function Zt(e, t) {
1326
+ ], Zt = ["eventStormingType", "linkLabel"];
1327
+ function Qt(e, t) {
1328
1328
  let n = {};
1329
1329
  for (let r of t) {
1330
1330
  let t = e[r];
@@ -1332,7 +1332,7 @@ function Zt(e, t) {
1332
1332
  }
1333
1333
  return n;
1334
1334
  }
1335
- var Qt = class {
1335
+ var $t = class {
1336
1336
  selection;
1337
1337
  modeling;
1338
1338
  elementFactory;
@@ -1355,23 +1355,23 @@ var Qt = class {
1355
1355
  this.selection = e, this.modeling = t, this.elementFactory = n, this.esFactory = r, this.canvas = i, this.create = a, this.mouse = o;
1356
1356
  }
1357
1357
  copy() {
1358
- let e = this.selection.get().filter((e) => b(e));
1358
+ let e = this.selection.get().filter((e) => y(e));
1359
1359
  if (!e.length) return !1;
1360
1360
  let t = new Map(e.map((e, t) => [e, t])), n = [], r = /* @__PURE__ */ new Set();
1361
1361
  for (let i of e) for (let e of [...i.incoming ?? [], ...i.outgoing ?? []]) {
1362
- if (!x(e) || r.has(e)) continue;
1362
+ if (!b(e) || r.has(e)) continue;
1363
1363
  let i = t.get(e.source), a = t.get(e.target);
1364
1364
  i !== void 0 && a !== void 0 && (r.add(e), n.push({
1365
1365
  sourceIdx: i,
1366
1366
  targetIdx: a,
1367
- props: Zt(e, Xt)
1367
+ props: Qt(e, Zt)
1368
1368
  }));
1369
1369
  }
1370
1370
  return this.clipboard = {
1371
1371
  shapes: e.map((e) => {
1372
1372
  let n = e.host ? t.get(e.host) : void 0;
1373
1373
  return {
1374
- props: Zt(e, Yt),
1374
+ props: Qt(e, Xt),
1375
1375
  x: e.x,
1376
1376
  y: e.y,
1377
1377
  width: e.width,
@@ -1412,26 +1412,26 @@ var Qt = class {
1412
1412
  ...structuredClone(e.props),
1413
1413
  source: n[e.sourceIdx],
1414
1414
  target: n[e.targetIdx],
1415
- waypoints: [$t(n[e.sourceIdx]), $t(n[e.targetIdx])]
1415
+ waypoints: [en(n[e.sourceIdx]), en(n[e.targetIdx])]
1416
1416
  }))
1417
1417
  };
1418
1418
  }
1419
1419
  insertWithOffset(e) {
1420
1420
  this.pasteCount++;
1421
- let t = Jt * this.pasteCount, n = en(e.shapes), r = this.modeling.createElements([...e.shapes, ...e.connections], {
1421
+ let t = Yt * this.pasteCount, n = tn(e.shapes), r = this.modeling.createElements([...e.shapes, ...e.connections], {
1422
1422
  x: n.cx + t,
1423
1423
  y: n.cy + t
1424
1424
  }, this.canvas.getRootElement());
1425
1425
  return this.selection.select(r), !0;
1426
1426
  }
1427
1427
  };
1428
- function $t(e) {
1428
+ function en(e) {
1429
1429
  return {
1430
1430
  x: e.x + e.width / 2,
1431
1431
  y: e.y + e.height / 2
1432
1432
  };
1433
1433
  }
1434
- function en(e) {
1434
+ function tn(e) {
1435
1435
  let t = Math.min(...e.map((e) => e.x)), n = Math.min(...e.map((e) => e.y)), r = Math.max(...e.map((e) => e.x + e.width)), i = Math.max(...e.map((e) => e.y + e.height));
1436
1436
  return {
1437
1437
  cx: (t + r) / 2,
@@ -1440,13 +1440,13 @@ function en(e) {
1440
1440
  }
1441
1441
  //#endregion
1442
1442
  //#region src/modeling/index.ts
1443
- var tn = {
1444
- __depends__: [fe, re],
1443
+ var nn = {
1444
+ __depends__: [me, ae],
1445
1445
  __init__: ["eventStormingModeling"],
1446
- eventStormingModeling: ["type", qt],
1447
- eventStormingCopyPaste: ["type", Qt]
1448
- }, nn = {
1449
- __depends__: [pe],
1446
+ eventStormingModeling: ["type", Jt],
1447
+ eventStormingCopyPaste: ["type", $t]
1448
+ }, rn = {
1449
+ __depends__: [he],
1450
1450
  __init__: ["eventStormingLassoBehavior"],
1451
1451
  eventStormingLassoBehavior: ["type", class {
1452
1452
  static $inject = [
@@ -1471,43 +1471,43 @@ var tn = {
1471
1471
  };
1472
1472
  //#endregion
1473
1473
  //#region src/rules/EventStormingRules.ts
1474
- function rn(e, t) {
1474
+ function an(e, t) {
1475
1475
  return (e.outgoing ?? []).some((e) => e.target === t);
1476
1476
  }
1477
- function an(e, t) {
1478
- return e.length !== 1 || !Ee(e[0]) || !De(t) ? !1 : "attach";
1477
+ function on(e, t) {
1478
+ return e.length !== 1 || !Ee(e[0]) || !E(t) ? !1 : "attach";
1479
1479
  }
1480
- var on = class extends me {
1480
+ var sn = class extends ge {
1481
1481
  static $inject = ["eventBus"];
1482
1482
  constructor(e) {
1483
1483
  super(e);
1484
1484
  }
1485
1485
  init() {
1486
- this.addRule("connection.start", (e) => w(e.source)), this.addRule("connection.create", (e) => {
1486
+ this.addRule("connection.start", (e) => C(e.source)), this.addRule("connection.create", (e) => {
1487
1487
  let { source: t, target: n } = e;
1488
- return !w(t) || !w(n) || t === n || rn(t, n) ? !1 : { eventStormingType: "arrow" };
1489
- }), this.addRule(["shape.move", "elements.move"], (e) => an(e.shapes ?? (e.shape ? [e.shape] : []), e.target) || !0), this.addRule("shape.create", () => !0), this.addRule("elements.create", () => !0), this.addRule("shape.resize", (e) => {
1490
- if (!Oe(e.shape)) return !1;
1488
+ return !C(t) || !C(n) || t === n || an(t, n) ? !1 : { eventStormingType: "arrow" };
1489
+ }), this.addRule(["shape.move", "elements.move"], (e) => on(e.shapes ?? (e.shape ? [e.shape] : []), e.target) || !0), this.addRule("shape.create", () => !0), this.addRule("elements.create", () => !0), this.addRule("shape.resize", (e) => {
1490
+ if (!De(e.shape)) return !1;
1491
1491
  let { newBounds: t } = e;
1492
- return !t || t.width >= A.width && t.height >= A.height;
1492
+ return !t || t.width >= Pe.width && t.height >= Pe.height;
1493
1493
  });
1494
1494
  }
1495
- }, sn = {
1495
+ }, cn = {
1496
1496
  __init__: ["eventStormingRules"],
1497
- eventStormingRules: ["type", on]
1498
- }, cn = 8, ln = {
1497
+ eventStormingRules: ["type", sn]
1498
+ }, ln = 8, un = {
1499
1499
  __init__: ["elementSnapping"],
1500
1500
  elementSnapping: ["type", class {
1501
1501
  static $inject = ["eventBus", "elementRegistry"];
1502
1502
  constructor(e, t) {
1503
- let n = (e) => t.getAll().filter((t) => b(t) && t.eventStormingType !== "drawing" && !e.has(t.id)).map((e) => ({
1503
+ let n = (e) => t.getAll().filter((t) => y(t) && t.eventStormingType !== "drawing" && !e.has(t.id)).map((e) => ({
1504
1504
  x: e.x + e.width / 2,
1505
1505
  y: e.y + e.height / 2
1506
1506
  })), r = (e, t) => {
1507
1507
  let n, r = 9;
1508
1508
  for (let i of t) {
1509
1509
  let t = Math.abs(i - e);
1510
- t <= cn && t < r && (n = i, r = t);
1510
+ t <= ln && t < r && (n = i, r = t);
1511
1511
  }
1512
1512
  return n;
1513
1513
  };
@@ -1539,7 +1539,7 @@ var on = class extends me {
1539
1539
  });
1540
1540
  }
1541
1541
  }]
1542
- }, un = ".djs-palette-entries .entry", dn = "bottom", fn = class {
1542
+ }, dn = ".djs-palette-entries .entry", fn = "bottom", pn = class {
1543
1543
  palette;
1544
1544
  hoverTooltip;
1545
1545
  static $inject = [
@@ -1554,9 +1554,9 @@ var on = class extends me {
1554
1554
  attachTo(e) {
1555
1555
  this.refreshEntries(), this.hoverTooltip.add({
1556
1556
  container: e,
1557
- selector: un,
1557
+ selector: dn,
1558
1558
  getContent: (e) => this.contentFor(e),
1559
- getPosition: (e) => pn(e)
1559
+ getPosition: (e) => mn(e)
1560
1560
  });
1561
1561
  }
1562
1562
  refreshEntries() {
@@ -1564,31 +1564,31 @@ var on = class extends me {
1564
1564
  }
1565
1565
  contentFor(e) {
1566
1566
  let t = this.entries[e.getAttribute("data-action") ?? ""];
1567
- return t?.title ? ge`<${he} title=${t.title} shortcut=${t.shortcut} />` : null;
1567
+ return t?.title ? ve`<${_e} title=${t.title} shortcut=${t.shortcut} />` : null;
1568
1568
  }
1569
1569
  };
1570
- function pn(e) {
1570
+ function mn(e) {
1571
1571
  let t = e.getBoundingClientRect();
1572
1572
  return {
1573
1573
  x: t.left + t.width / 2,
1574
1574
  y: t.bottom + 8,
1575
- placement: dn
1575
+ placement: fn
1576
1576
  };
1577
1577
  }
1578
1578
  //#endregion
1579
1579
  //#region src/palette/index.ts
1580
- var mn = {
1580
+ var hn = {
1581
1581
  __init__: ["eventStormingPaletteProvider", "paletteTooltip"],
1582
1582
  eventStormingPaletteProvider: ["type", Ue],
1583
- paletteTooltip: ["type", fn]
1584
- }, G = "event-storming-element-settings", hn = {
1583
+ paletteTooltip: ["type", pn]
1584
+ }, G = "event-storming-element-settings", gn = {
1585
1585
  id: "kind",
1586
1586
  name: "Change type"
1587
1587
  };
1588
- function gn(e, t) {
1588
+ function _n(e, t) {
1589
1589
  return e ? `✓ ${t}` : t;
1590
1590
  }
1591
- var _n = class {
1591
+ var vn = class {
1592
1592
  modeling;
1593
1593
  static $inject = ["popupMenu", "eventStormingModeling"];
1594
1594
  constructor(e, t) {
@@ -1596,26 +1596,26 @@ var _n = class {
1596
1596
  }
1597
1597
  getPopupMenuEntries(e) {
1598
1598
  let t = Array.isArray(e) ? e[0] : e;
1599
- return w(t) ? this.kindEntries(t) : {};
1599
+ return C(t) ? this.kindEntries(t) : {};
1600
1600
  }
1601
1601
  kindEntries(e) {
1602
- let t = {}, n = e.provisional === !0, r = c[this.modeling.getLevel()];
1603
- for (let i of S) {
1602
+ let t = {}, n = e.provisional === !0, r = o[this.modeling.getLevel()];
1603
+ for (let i of x) {
1604
1604
  if (!r.includes(i) && (n || i !== e.eventStormingType)) continue;
1605
- let a = O[i];
1605
+ let a = A[i];
1606
1606
  t[`kind-${i}`] = {
1607
- label: n ? a.label : gn(e.eventStormingType === i, a.label),
1607
+ label: n ? a.label : _n(e.eventStormingType === i, a.label),
1608
1608
  imageHtml: ze(a.fill, a.stroke),
1609
- group: hn,
1609
+ group: gn,
1610
1610
  action: () => this.modeling.setStickyKind(e, i)
1611
1611
  };
1612
1612
  }
1613
1613
  return t;
1614
1614
  }
1615
- }, vn = {
1615
+ }, yn = {
1616
1616
  __init__: ["eventStormingElementSettings"],
1617
- eventStormingElementSettings: ["type", _n]
1618
- }, K = "eventStorming.readOnly.changed", yn = 5e3, bn = [
1617
+ eventStormingElementSettings: ["type", vn]
1618
+ }, K = "eventStorming.readOnly.changed", bn = 5e3, xn = [
1619
1619
  "elements.move",
1620
1620
  "shape.move",
1621
1621
  "shape.resize",
@@ -1628,7 +1628,7 @@ var _n = class {
1628
1628
  "connection.reconnect",
1629
1629
  "connection.updateWaypoints",
1630
1630
  "elements.delete"
1631
- ], xn = class extends me {
1631
+ ], Sn = class extends ge {
1632
1632
  bus;
1633
1633
  static $inject = ["eventBus"];
1634
1634
  readOnly = !1;
@@ -1636,7 +1636,7 @@ var _n = class {
1636
1636
  super(e), this.bus = e;
1637
1637
  }
1638
1638
  init() {
1639
- this.addRule(bn, yn, () => !this.readOnly && void 0);
1639
+ this.addRule(xn, bn, () => !this.readOnly && void 0);
1640
1640
  }
1641
1641
  isReadOnly() {
1642
1642
  return this.readOnly;
@@ -1644,11 +1644,11 @@ var _n = class {
1644
1644
  setReadOnly(e) {
1645
1645
  this.readOnly !== e && (this.readOnly = e, this.bus.fire(K, { readOnly: e }));
1646
1646
  }
1647
- }, Sn = {
1648
- __depends__: [se],
1649
- __init__: ["eventStormingReadOnly"],
1650
- eventStormingReadOnly: ["type", xn]
1651
1647
  }, Cn = {
1648
+ __depends__: [le],
1649
+ __init__: ["eventStormingReadOnly"],
1650
+ eventStormingReadOnly: ["type", Sn]
1651
+ }, wn = {
1652
1652
  plus: "<path d=\"M5 12h14\"/><path d=\"M12 5v14\"/>",
1653
1653
  "arrow-right": "<path d=\"M5 12h14\"/><path d=\"m12 5 7 7-7 7\"/>",
1654
1654
  pencil: "<path d=\"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z\"/><path d=\"m15 5 4 4\"/>",
@@ -1668,17 +1668,17 @@ var _n = class {
1668
1668
  x: "<path d=\"M18 6 6 18\"/><path d=\"m6 6 12 12\"/>"
1669
1669
  };
1670
1670
  function q(e) {
1671
- return `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">${Cn[e]}</svg>`;
1671
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false">${wn[e]}</svg>`;
1672
1672
  }
1673
1673
  //#endregion
1674
1674
  //#region src/context-pad/EventStormingContextPadProvider.ts
1675
- var wn = "Append sticky (auto-connect, choose the type after placing)";
1675
+ var Tn = "Append sticky (auto-connect, choose the type after placing)";
1676
1676
  function J(e, t, n = !1) {
1677
1677
  return `<div class="entry event-storming-cp-entry"${n ? " draggable=\"true\"" : ""} title="${t}">${q(e)}</div>`;
1678
1678
  }
1679
1679
  //#endregion
1680
1680
  //#region src/context-pad/index.ts
1681
- var Tn = {
1681
+ var En = {
1682
1682
  __init__: ["eventStormingContextPadProvider"],
1683
1683
  eventStormingContextPadProvider: ["type", class {
1684
1684
  modeling;
@@ -1710,7 +1710,7 @@ var Tn = {
1710
1710
  }
1711
1711
  getContextPadEntries(e) {
1712
1712
  if (this.readOnly?.isReadOnly()) return {};
1713
- if (x(e)) {
1713
+ if (b(e)) {
1714
1714
  let t = e;
1715
1715
  return {
1716
1716
  "edit-label": {
@@ -1727,17 +1727,17 @@ var Tn = {
1727
1727
  }
1728
1728
  };
1729
1729
  }
1730
- if (!b(e)) return {};
1730
+ if (!y(e)) return {};
1731
1731
  let t = e, n = {}, r = t.eventStormingType;
1732
- if (C(r)) {
1732
+ if (S(r)) {
1733
1733
  let e = (e) => {
1734
1734
  let n = this.factory.createProvisional();
1735
1735
  this.create.start(e, n, { source: t });
1736
1736
  };
1737
1737
  n.append = {
1738
1738
  group: "append",
1739
- title: wn,
1740
- html: J("plus", wn, !0),
1739
+ title: Tn,
1740
+ html: J("plus", Tn, !0),
1741
1741
  action: {
1742
1742
  click: e,
1743
1743
  dragstart: e
@@ -1797,36 +1797,36 @@ var Tn = {
1797
1797
  }, n;
1798
1798
  }
1799
1799
  }]
1800
- }, En = "bullet", Dn = [
1800
+ }, Dn = "bullet", On = [
1801
1801
  "left",
1802
1802
  "center",
1803
1803
  "right"
1804
- ], On = [
1804
+ ], kn = [
1805
1805
  "top",
1806
1806
  "middle",
1807
1807
  "bottom"
1808
1808
  ];
1809
- function kn(e, t) {
1809
+ function An(e, t) {
1810
1810
  return e[(e.indexOf(t) + 1) % e.length];
1811
1811
  }
1812
- function An(e, t) {
1812
+ function jn(e, t) {
1813
1813
  let n = e.ownerDocument;
1814
1814
  e.textContent = "";
1815
- for (let r of D(t)) {
1815
+ for (let r of k(t)) {
1816
1816
  let t = n.createElement("div");
1817
- r.bullet && (t.className = En);
1817
+ r.bullet && (t.className = Dn);
1818
1818
  for (let e of r.runs) {
1819
1819
  let r = n.createTextNode(e.text);
1820
- e.italic && (r = jn(n, "i", r)), e.bold && (r = jn(n, "b", r)), t.appendChild(r);
1820
+ e.italic && (r = Mn(n, "i", r)), e.bold && (r = Mn(n, "b", r)), t.appendChild(r);
1821
1821
  }
1822
1822
  r.runs.length === 0 && t.appendChild(n.createElement("br")), e.appendChild(t);
1823
1823
  }
1824
1824
  }
1825
- function jn(e, t, n) {
1825
+ function Mn(e, t, n) {
1826
1826
  let r = e.createElement(t);
1827
1827
  return r.appendChild(n), r;
1828
1828
  }
1829
- function Mn(e) {
1829
+ function Nn(e) {
1830
1830
  let t = [], n = null, r = (e) => (n = {
1831
1831
  bullet: e,
1832
1832
  runs: []
@@ -1847,11 +1847,11 @@ function Mn(e) {
1847
1847
  s.nextSibling && r(!1);
1848
1848
  return;
1849
1849
  }
1850
- if (Nn(s.tagName)) {
1850
+ if (Pn(s.tagName)) {
1851
1851
  a(s);
1852
1852
  return;
1853
1853
  }
1854
- let c = Pn(s, t, o);
1854
+ let c = Fn(s, t, o);
1855
1855
  for (let e of s.childNodes) i(e, c.bold, c.italic);
1856
1856
  }, a = (e) => {
1857
1857
  r(e.classList.contains("bullet") || e.tagName === "LI");
@@ -1859,12 +1859,12 @@ function Mn(e) {
1859
1859
  n = null;
1860
1860
  };
1861
1861
  for (let t of e.childNodes) i(t, !1, !1);
1862
- return Ae(t);
1862
+ return ke(t);
1863
1863
  }
1864
- function Nn(e) {
1864
+ function Pn(e) {
1865
1865
  return e === "DIV" || e === "P" || e === "LI";
1866
1866
  }
1867
- function Pn(e, t, n) {
1867
+ function Fn(e, t, n) {
1868
1868
  let r = e.tagName;
1869
1869
  (r === "B" || r === "STRONG") && (t = !0), (r === "I" || r === "EM") && (n = !0);
1870
1870
  let i = e.style.fontWeight;
@@ -1875,13 +1875,13 @@ function Pn(e, t, n) {
1875
1875
  italic: n
1876
1876
  };
1877
1877
  }
1878
- function Fn(e) {
1878
+ function In(e) {
1879
1879
  let t = e.ownerDocument, n = t.getSelection();
1880
1880
  if (!n) return;
1881
1881
  let r = t.createRange();
1882
1882
  r.selectNodeContents(e), n.removeAllRanges(), n.addRange(r);
1883
1883
  }
1884
- function In(e, t) {
1884
+ function Ln(e, t) {
1885
1885
  let n = e.ownerDocument;
1886
1886
  if (typeof n.execCommand == "function" && n.execCommand("insertText", !1, t)) return;
1887
1887
  let r = n.getSelection();
@@ -1892,24 +1892,24 @@ function In(e, t) {
1892
1892
  let a = n.createTextNode(t);
1893
1893
  i.insertNode(a), i.setStartAfter(a), i.collapse(!0), r.removeAllRanges(), r.addRange(i);
1894
1894
  }
1895
- function Ln(e) {
1895
+ function Rn(e) {
1896
1896
  let t = e.ownerDocument.getSelection();
1897
1897
  if (!t || t.rangeCount === 0) return [];
1898
1898
  let n = t.getRangeAt(0);
1899
1899
  return e.contains(n.commonAncestorContainer) ? Array.from(e.children).filter((e) => n.intersectsNode(e)) : [];
1900
1900
  }
1901
- function Rn(e) {
1902
- zn(e);
1903
- let t = Ln(e);
1901
+ function zn(e) {
1902
+ Bn(e);
1903
+ let t = Rn(e);
1904
1904
  if (t.length === 0) return;
1905
- let n = t.every((e) => e.classList.contains(En));
1906
- for (let e of t) e.classList.toggle(En, !n);
1905
+ let n = t.every((e) => e.classList.contains(Dn));
1906
+ for (let e of t) e.classList.toggle(Dn, !n);
1907
1907
  }
1908
- function zn(e) {
1908
+ function Bn(e) {
1909
1909
  let t = e.ownerDocument, n = null;
1910
- for (let r of Array.from(e.childNodes)) r.nodeType === Node.ELEMENT_NODE && Nn(r.tagName) ? n = null : (n || (n = t.createElement("div"), e.insertBefore(n, r)), n.appendChild(r));
1910
+ for (let r of Array.from(e.childNodes)) r.nodeType === Node.ELEMENT_NODE && Pn(r.tagName) ? n = null : (n || (n = t.createElement("div"), e.insertBefore(n, r)), n.appendChild(r));
1911
1911
  }
1912
- var Bn = {
1912
+ var Vn = {
1913
1913
  horizontal: {
1914
1914
  left: "text-align-start",
1915
1915
  center: "text-align-center",
@@ -1921,7 +1921,7 @@ var Bn = {
1921
1921
  bottom: "align-vertical-justify-end"
1922
1922
  }
1923
1923
  };
1924
- function Vn(e, t) {
1924
+ function Hn(e, t) {
1925
1925
  let n = e.createElement("div");
1926
1926
  n.className = "event-storming-note-toolbar";
1927
1927
  let r = (r, i, a) => {
@@ -1932,19 +1932,19 @@ function Vn(e, t) {
1932
1932
  let i = e.createElement("span");
1933
1933
  return i.className = "event-storming-note-toolbar-separator", n.appendChild(i), r("note-align-horizontal", "Horizontal alignment (click to cycle)", ""), r("note-align-vertical", "Vertical alignment (click to cycle)", ""), n;
1934
1934
  }
1935
- function Hn(e, t, n) {
1936
- let r = Bn[t][n];
1935
+ function Un(e, t, n) {
1936
+ let r = Vn[t][n];
1937
1937
  e.innerHTML = r ? q(r) : "", e.title = t === "horizontal" ? `Horizontal alignment: ${n} (click to cycle)` : `Vertical alignment: ${n} (click to cycle)`;
1938
1938
  }
1939
- function Un(e, t) {
1939
+ function Wn(e, t) {
1940
1940
  e.style.textAlign = t.horizontal, e.style.justifyContent = t.vertical === "top" ? "flex-start" : t.vertical === "middle" ? "center" : "flex-end";
1941
1941
  }
1942
1942
  //#endregion
1943
1943
  //#region src/label-editing/EventStormingLabelEditing.ts
1944
- function Wn(e) {
1944
+ function Gn(e) {
1945
1945
  return e.replace(/(?<!:)\/\//g, "∕∕").replace(/\/\*/g, "∕*").replace(/->/g, "→").replace(/;/g, ",").replace(/\[/g, "(").replace(/\]/g, ")").trim();
1946
1946
  }
1947
- var Gn = class {
1947
+ var Kn = class {
1948
1948
  canvas;
1949
1949
  modeling;
1950
1950
  elementRegistry;
@@ -1965,7 +1965,7 @@ var Gn = class {
1965
1965
  }), e.on("diagram.destroy", () => {
1966
1966
  clearTimeout(this.resumeTimer), this.suspended = null, this.cancel();
1967
1967
  }), e.on("element.dblclick", (e) => {
1968
- b(e.element) ? this.activate(e.element) : x(e.element) && this.activateConnection(e.element);
1968
+ y(e.element) ? this.activate(e.element) : b(e.element) && this.activateConnection(e.element);
1969
1969
  }), e.on(["element.mousedown", "drag.init"], () => this.active?.commit()), e.on("canvas.viewbox.changed", () => this.active?.place());
1970
1970
  }
1971
1971
  suspend() {
@@ -1980,14 +1980,14 @@ var Gn = class {
1980
1980
  resume(e) {
1981
1981
  let t = this.elementRegistry?.get(e.elementId);
1982
1982
  if (e.connection) {
1983
- if (!x(t)) return;
1983
+ if (!b(t)) return;
1984
1984
  this.activateConnection(t);
1985
1985
  } else {
1986
- if (!b(t)) return;
1986
+ if (!y(t)) return;
1987
1987
  this.activate(t);
1988
1988
  }
1989
1989
  let n = this.active?.field;
1990
- n && (n instanceof HTMLTextAreaElement || n instanceof HTMLInputElement ? (n.value = e.value, n instanceof HTMLTextAreaElement && (n.rows = Math.max(2, e.value.split("\n").length)), n.setSelectionRange(e.selectionStart ?? e.value.length, e.selectionEnd ?? e.value.length)) : (An(n, e.value), e.align && this.restoreNoteAlign?.(e.align), qn(n)));
1990
+ n && (n instanceof HTMLTextAreaElement || n instanceof HTMLInputElement ? (n.value = e.value, n instanceof HTMLTextAreaElement && (n.rows = Math.max(2, e.value.split("\n").length)), n.setSelectionRange(e.selectionStart ?? e.value.length, e.selectionEnd ?? e.value.length)) : (jn(n, e.value), e.align && this.restoreNoteAlign?.(e.align), Jn(n)));
1991
1991
  }
1992
1992
  restoreNoteAlign;
1993
1993
  activate(e) {
@@ -2007,7 +2007,7 @@ var Gn = class {
2007
2007
  i || (i = !0, n.removeEventListener("keydown", s), n.removeEventListener("blur", c), n.remove(), this.active = null, this.canvas.restoreFocus?.());
2008
2008
  }, o = () => {
2009
2009
  if (i) return;
2010
- let t = Wn(n.value), r = t && t !== e.eventStormingLabel;
2010
+ let t = Gn(n.value), r = t && t !== e.eventStormingLabel;
2011
2011
  a(), r && this.modeling.updateLabel(e, t);
2012
2012
  }, s = (e) => {
2013
2013
  if (e.key === "Escape") e.preventDefault(), a();
@@ -2034,43 +2034,43 @@ var Gn = class {
2034
2034
  }
2035
2035
  activateNote(e) {
2036
2036
  let t = this.canvas.getContainer(), n = document.createElement("div");
2037
- n.className = "event-storming-label-input event-storming-note-editor", n.contentEditable = "true", n.style.position = "absolute", n.style.transform = "translate(-50%, -50%)", An(n, e.eventStormingLabel ?? "");
2037
+ n.className = "event-storming-label-input event-storming-note-editor", n.contentEditable = "true", n.style.position = "absolute", n.style.transform = "translate(-50%, -50%)", jn(n, e.eventStormingLabel ?? "");
2038
2038
  let r = {
2039
2039
  horizontal: e.alignHorizontal ?? "left",
2040
2040
  vertical: e.alignVertical ?? "top"
2041
2041
  };
2042
- Un(n, r);
2043
- let i = Vn(document, (e) => d(e));
2042
+ Wn(n, r);
2043
+ let i = Hn(document, (e) => d(e));
2044
2044
  i.style.transform = "translate(-50%, -100%)";
2045
2045
  let a = () => {
2046
2046
  let t = this.canvas.zoom(), r = this.canvas.viewbox(), a = (e.x + e.width / 2 - r.x) * t;
2047
2047
  n.style.left = `${a}px`, n.style.top = `${(e.y + e.height / 2 - r.y) * t}px`, n.style.minWidth = `${e.width * t}px`, n.style.minHeight = `${e.height * t}px`, i.style.left = `${a}px`, i.style.top = `${(e.y - r.y) * t - 8}px`;
2048
2048
  };
2049
- a(), t.appendChild(n), t.appendChild(i), n.focus(), Fn(n);
2049
+ a(), t.appendChild(n), t.appendChild(i), n.focus(), In(n);
2050
2050
  let o = (e) => i.querySelector(`[data-action="${e}"]`), s = (e, t) => {
2051
2051
  let n = o(e);
2052
2052
  n?.classList.toggle("active", t), n?.setAttribute("aria-pressed", String(t));
2053
2053
  }, c = () => {
2054
- s("note-bold", Jn("bold")), s("note-italic", Jn("italic"));
2055
- let e = Ln(n);
2054
+ s("note-bold", Yn("bold")), s("note-italic", Yn("italic"));
2055
+ let e = Rn(n);
2056
2056
  s("note-bullet", e.length > 0 && e.every((e) => e.classList.contains("bullet")));
2057
2057
  let t = o("note-align-horizontal");
2058
- t && Hn(t, "horizontal", r.horizontal);
2058
+ t && Un(t, "horizontal", r.horizontal);
2059
2059
  let i = o("note-align-vertical");
2060
- i && Hn(i, "vertical", r.vertical);
2060
+ i && Un(i, "vertical", r.vertical);
2061
2061
  }, l = (e) => {
2062
2062
  typeof document.execCommand == "function" && document.execCommand(e, !1), c();
2063
2063
  }, u = (e) => {
2064
- e === "horizontal" ? r.horizontal = kn(Dn, r.horizontal) : r.vertical = kn(On, r.vertical), Un(n, r), c();
2064
+ e === "horizontal" ? r.horizontal = An(On, r.horizontal) : r.vertical = An(kn, r.vertical), Wn(n, r), c();
2065
2065
  }, d = (e) => {
2066
- e === "note-bold" ? l("bold") : e === "note-italic" ? l("italic") : e === "note-bullet" ? (Rn(n), c()) : u(e === "note-align-horizontal" ? "horizontal" : "vertical");
2066
+ e === "note-bold" ? l("bold") : e === "note-italic" ? l("italic") : e === "note-bullet" ? (zn(n), c()) : u(e === "note-align-horizontal" ? "horizontal" : "vertical");
2067
2067
  }, f = () => c();
2068
2068
  document.addEventListener("selectionchange", f);
2069
2069
  let p = !1, m = () => {
2070
- p || (p = !0, document.removeEventListener("selectionchange", f), n.removeEventListener("keydown", g), n.removeEventListener("blur", _), n.removeEventListener("paste", v), n.remove(), i.remove(), this.active = null, this.restoreNoteAlign = void 0, this.canvas.restoreFocus?.());
2070
+ p || (p = !0, document.removeEventListener("selectionchange", f), n.removeEventListener("keydown", g), n.removeEventListener("blur", _), n.removeEventListener("paste", ee), n.remove(), i.remove(), this.active = null, this.restoreNoteAlign = void 0, this.canvas.restoreFocus?.());
2071
2071
  }, h = () => {
2072
2072
  if (p) return;
2073
- let t = Kn(e, Wn(Mn(n)), r);
2073
+ let t = qn(e, Gn(Nn(n)), r);
2074
2074
  m(), t && this.modeling.updateProperties(e, t);
2075
2075
  }, g = (e) => {
2076
2076
  if (e.key === "Escape") {
@@ -2086,18 +2086,18 @@ var Gn = class {
2086
2086
  (e.metaKey || e.ctrlKey) && (t === "b" || t === "i") && (e.preventDefault(), l(t === "b" ? "bold" : "italic"));
2087
2087
  }, _ = (e) => {
2088
2088
  e.relatedTarget instanceof Node && i.contains(e.relatedTarget) || h();
2089
- }, v = (e) => {
2089
+ }, ee = (e) => {
2090
2090
  e.preventDefault();
2091
2091
  let t = e.clipboardData?.getData("text/plain") ?? "";
2092
- t && In(n, t);
2092
+ t && Ln(n, t);
2093
2093
  };
2094
- n.addEventListener("keydown", g), n.addEventListener("blur", _), n.addEventListener("paste", v), c(), this.restoreNoteAlign = (e) => {
2095
- r.horizontal = e.horizontal, r.vertical = e.vertical, Un(n, r), c();
2094
+ n.addEventListener("keydown", g), n.addEventListener("blur", _), n.addEventListener("paste", ee), c(), this.restoreNoteAlign = (e) => {
2095
+ r.horizontal = e.horizontal, r.vertical = e.vertical, Wn(n, r), c();
2096
2096
  };
2097
- let ee = () => ({
2097
+ let te = () => ({
2098
2098
  elementId: e.id,
2099
2099
  connection: !1,
2100
- value: Mn(n),
2100
+ value: Nn(n),
2101
2101
  align: { ...r }
2102
2102
  });
2103
2103
  this.active = {
@@ -2105,7 +2105,7 @@ var Gn = class {
2105
2105
  place: a,
2106
2106
  commit: h,
2107
2107
  cleanup: m,
2108
- snapshot: ee
2108
+ snapshot: te
2109
2109
  };
2110
2110
  }
2111
2111
  activateConnection(e) {
@@ -2123,7 +2123,7 @@ var Gn = class {
2123
2123
  o || (o = !0, i.removeEventListener("keydown", l), i.removeEventListener("blur", u), i.remove(), this.active = null, this.canvas.restoreFocus?.());
2124
2124
  }, c = () => {
2125
2125
  if (o) return;
2126
- let t = Wn(i.value), n = e.linkLabel ?? "";
2126
+ let t = Gn(i.value), n = e.linkLabel ?? "";
2127
2127
  s(), t !== n && this.modeling.updateProperties(e, { linkLabel: t || void 0 });
2128
2128
  }, l = (e) => {
2129
2129
  e.key === "Escape" ? (e.preventDefault(), s()) : e.key === "Enter" && (e.preventDefault(), c());
@@ -2156,23 +2156,23 @@ var Gn = class {
2156
2156
  };
2157
2157
  }
2158
2158
  };
2159
- function Kn(e, t, n) {
2159
+ function qn(e, t, n) {
2160
2160
  let r = !!t && t !== e.eventStormingLabel, i = n.horizontal !== (e.alignHorizontal ?? "left") || n.vertical !== (e.alignVertical ?? "top");
2161
2161
  if (!r && !i) return null;
2162
2162
  let a = {};
2163
- if (r && (a.eventStormingLabel = t, !N(e.eventStormingLabel, e))) {
2164
- let { width: n, height: r } = M(t);
2163
+ if (r && (a.eventStormingLabel = t, !P(e.eventStormingLabel, e))) {
2164
+ let { width: n, height: r } = N(t);
2165
2165
  a.width = n, a.height = r, a.x = e.x + e.width / 2 - n / 2, a.y = e.y + e.height / 2 - r / 2;
2166
2166
  }
2167
2167
  return i && (a.alignHorizontal = n.horizontal === "left" ? void 0 : n.horizontal, a.alignVertical = n.vertical === "top" ? void 0 : n.vertical), a;
2168
2168
  }
2169
- function qn(e) {
2169
+ function Jn(e) {
2170
2170
  let t = document.createRange();
2171
2171
  t.selectNodeContents(e), t.collapse(!1);
2172
2172
  let n = window.getSelection();
2173
2173
  n?.removeAllRanges(), n?.addRange(t);
2174
2174
  }
2175
- function Jn(e) {
2175
+ function Yn(e) {
2176
2176
  if (typeof document.queryCommandState != "function") return !1;
2177
2177
  try {
2178
2178
  return document.queryCommandState(e);
@@ -2182,10 +2182,10 @@ function Jn(e) {
2182
2182
  }
2183
2183
  //#endregion
2184
2184
  //#region src/label-editing/index.ts
2185
- var Yn = {
2185
+ var Xn = {
2186
2186
  __init__: ["eventStormingLabelEditing"],
2187
- eventStormingLabelEditing: ["type", Gn]
2188
- }, Xn = 2, Zn = 10, Qn = {
2187
+ eventStormingLabelEditing: ["type", Kn]
2188
+ }, Zn = 2, Qn = 10, $n = {
2189
2189
  arrowleft: {
2190
2190
  x: -1,
2191
2191
  y: 0
@@ -2202,7 +2202,7 @@ var Yn = {
2202
2202
  x: 0,
2203
2203
  y: 1
2204
2204
  }
2205
- }, $n = class {
2205
+ }, er = class {
2206
2206
  static $inject = [
2207
2207
  "config.eventStormingKeyboard",
2208
2208
  "canvas",
@@ -2220,12 +2220,12 @@ var Yn = {
2220
2220
  ];
2221
2221
  constructor(e, t, n, r, i, a, o, s, c, l, u, d, f) {
2222
2222
  let p = t.getContainer(), m = e?.undoRedoKeys ?? !0, h = (e) => {
2223
- e.defaultPrevented || er(e.target, p) && (tr(e.target) || g(e) || f?.isReadOnly() || _(e));
2223
+ e.defaultPrevented || tr(e.target, p) && (nr(e.target) || g(e) || f?.isReadOnly() || _(e));
2224
2224
  }, g = (e) => {
2225
2225
  let t = e.ctrlKey || e.metaKey, n = e.key.toLowerCase();
2226
2226
  if (t && n === "a" && !e.shiftKey && !e.altKey) {
2227
2227
  e.preventDefault();
2228
- let t = (d?.getAll() ?? []).filter((e) => b(e) || x(e));
2228
+ let t = (d?.getAll() ?? []).filter((e) => y(e) || b(e));
2229
2229
  r.select(t);
2230
2230
  } else if (t && n === "c") a.copy() && e.preventDefault();
2231
2231
  else if (!t && !e.altKey && n === "l") {
@@ -2248,14 +2248,14 @@ var Yn = {
2248
2248
  let t = c.getLastMoveEvent();
2249
2249
  if (t) {
2250
2250
  e.preventDefault();
2251
- let n = l === "e" ? o.createNew("event", O.event.label) : o.createNew("command", O.command.label);
2251
+ let n = l === "e" ? o.createNew("event", A.event.label) : o.createNew("command", A.command.label);
2252
2252
  s.start(t, n);
2253
2253
  }
2254
- } else if (l in Qn && !t) {
2254
+ } else if (l in $n && !t) {
2255
2255
  let t = r.get();
2256
2256
  if (t.length) {
2257
2257
  e.preventDefault();
2258
- let n = e.shiftKey ? Zn : Xn, r = Qn[l];
2258
+ let n = e.shiftKey ? Qn : Zn, r = $n[l];
2259
2259
  i.moveElements(t, {
2260
2260
  x: r.x * n,
2261
2261
  y: r.y * n
@@ -2266,20 +2266,20 @@ var Yn = {
2266
2266
  document.addEventListener("keydown", h), u.on("diagram.destroy", () => document.removeEventListener("keydown", h));
2267
2267
  }
2268
2268
  };
2269
- function er(e, t) {
2269
+ function tr(e, t) {
2270
2270
  return e instanceof Node ? t.contains(e) || e === document.body || e === document.documentElement : !1;
2271
2271
  }
2272
- function tr(e) {
2272
+ function nr(e) {
2273
2273
  if (!(e instanceof HTMLElement)) return !1;
2274
2274
  let t = e.tagName;
2275
2275
  return t === "INPUT" || t === "TEXTAREA" || e.isContentEditable;
2276
2276
  }
2277
2277
  //#endregion
2278
2278
  //#region src/keyboard/index.ts
2279
- var nr = {
2279
+ var rr = {
2280
2280
  __init__: ["eventStormingKeyboard"],
2281
- eventStormingKeyboard: ["type", $n]
2282
- }, rr = 500, ir = 6, ar = class {
2281
+ eventStormingKeyboard: ["type", er]
2282
+ }, ir = 500, ar = 6, or = class {
2283
2283
  static $inject = ["injector", "eventBus"];
2284
2284
  constructor(e, t) {
2285
2285
  let n = e.get("connectionPreview", !1), r = e.get("eventStormingLabelEditing", !1), i = e.get("popupMenu", !1), a = e.get("modeling", !1), o = e.get("canvas", !1), s = !1;
@@ -2312,14 +2312,14 @@ var nr = {
2312
2312
  let n = o.getAbsoluteBBox(e), c = o.getContainer().getBoundingClientRect();
2313
2313
  i.open(e, G, {
2314
2314
  x: c.left + n.x,
2315
- y: c.top + n.y + n.height + ir
2315
+ y: c.top + n.y + n.height + ar
2316
2316
  }), i.isOpen() ? t.once("popupMenu.close", () => {
2317
2317
  setTimeout(() => {
2318
2318
  s || (e.provisional ? e.parent && a.removeElements([e]) : r?.activate(e));
2319
2319
  }, 0);
2320
2320
  }) : a.removeElements([e]);
2321
2321
  };
2322
- t.on("create.end", rr, (e) => {
2322
+ t.on("create.end", ir, (e) => {
2323
2323
  let { context: t } = e;
2324
2324
  if (!t.source || !t.canExecute || !t.shape) return;
2325
2325
  let n = t.shape;
@@ -2336,14 +2336,14 @@ var nr = {
2336
2336
  } else r && setTimeout(() => r.activate(n), 0);
2337
2337
  });
2338
2338
  }
2339
- }, or = {
2340
- __depends__: [_e],
2339
+ }, sr = {
2340
+ __depends__: [ye],
2341
2341
  __init__: ["eventStormingAppendBehavior"],
2342
- eventStormingAppendBehavior: ["type", ar]
2343
- }, sr = S.map((e) => ({
2344
- value: O[e].fill,
2345
- title: O[e].label
2346
- })), cr = class {
2342
+ eventStormingAppendBehavior: ["type", or]
2343
+ }, cr = x.map((e) => ({
2344
+ value: A[e].fill,
2345
+ title: A[e].label
2346
+ })), lr = class {
2347
2347
  canvas;
2348
2348
  modeling;
2349
2349
  static $inject = [
@@ -2373,7 +2373,7 @@ var nr = {
2373
2373
  value: void 0,
2374
2374
  title: "No color",
2375
2375
  cls: "event-storming-cp-none"
2376
- }, ...sr.map((e) => ({
2376
+ }, ...cr.map((e) => ({
2377
2377
  value: e.value,
2378
2378
  title: e.title,
2379
2379
  cls: ""
@@ -2393,12 +2393,12 @@ var nr = {
2393
2393
  close() {
2394
2394
  this.popover && (this.popover.remove(), this.popover = void 0, document.removeEventListener("click", this.onDocPointer, !0), document.removeEventListener("keydown", this.onKey, !0));
2395
2395
  }
2396
- }, lr = {
2397
- __init__: ["eventStormingColorPicker"],
2398
- eventStormingColorPicker: ["type", cr]
2399
2396
  }, ur = {
2397
+ __init__: ["eventStormingColorPicker"],
2398
+ eventStormingColorPicker: ["type", lr]
2399
+ }, dr = {
2400
2400
  __init__: ["eventStormingOrderingProvider"],
2401
- eventStormingOrderingProvider: ["type", class extends ve {
2401
+ eventStormingOrderingProvider: ["type", class extends be {
2402
2402
  static $inject = ["eventBus"];
2403
2403
  constructor(e) {
2404
2404
  super(e);
@@ -2406,15 +2406,15 @@ var nr = {
2406
2406
  getOrdering(e, t) {
2407
2407
  for (; t.parent;) t = t.parent;
2408
2408
  let n = t.children ?? [];
2409
- if (x(e)) {
2410
- let r = n.filter((t) => t !== e && (T(t) || x(t))).length;
2409
+ if (b(e)) {
2410
+ let r = n.filter((t) => t !== e && (D(t) || b(t))).length;
2411
2411
  return {
2412
2412
  parent: t,
2413
2413
  index: r
2414
2414
  };
2415
2415
  }
2416
- if (T(e)) {
2417
- let r = n.filter((t) => t !== e && T(t)).length;
2416
+ if (D(e)) {
2417
+ let r = n.filter((t) => t !== e && D(t)).length;
2418
2418
  return {
2419
2419
  parent: t,
2420
2420
  index: r
@@ -2423,7 +2423,7 @@ var nr = {
2423
2423
  return { parent: t };
2424
2424
  }
2425
2425
  }]
2426
- }, dr = 12, fr = class {
2426
+ }, fr = 12, pr = class {
2427
2427
  canvas;
2428
2428
  eventBus;
2429
2429
  modeling;
@@ -2502,12 +2502,12 @@ var nr = {
2502
2502
  if (e.button !== 0 || this.isChromeTarget(e)) return;
2503
2503
  e.preventDefault(), e.stopPropagation();
2504
2504
  let t = this.toCanvasPoint(e), n = this.points[0];
2505
- if (n && this.points.length >= 3 && pr(t, n) <= dr) {
2505
+ if (n && this.points.length >= 3 && mr(t, n) <= fr) {
2506
2506
  this.finishClosed();
2507
2507
  return;
2508
2508
  }
2509
2509
  let r = this.points[this.points.length - 1];
2510
- r && pr(t, r) <= dr ? this.points.length >= 2 && this.finish() : (this.points.push(t), this.renderPreview());
2510
+ r && mr(t, r) <= fr ? this.points.length >= 2 && this.finish() : (this.points.push(t), this.renderPreview());
2511
2511
  };
2512
2512
  onDblClick = (e) => {
2513
2513
  this.isChromeTarget(e) || (e.preventDefault(), e.stopPropagation(), this.finish());
@@ -2520,47 +2520,47 @@ var nr = {
2520
2520
  };
2521
2521
  renderPreview() {
2522
2522
  if (this.clearPreview(), !this.points.length) return;
2523
- let e = this.canvas.getLayer("event-storming-draw-preview", 1e3), t = m("g"), n = this.cursor ? [...this.points, this.cursor] : this.points;
2524
- f(t, p(m("polyline"), {
2523
+ let e = this.canvas.getLayer("event-storming-draw-preview", 1e3), t = h("g"), n = this.cursor ? [...this.points, this.cursor] : this.points;
2524
+ p(t, m(h("polyline"), {
2525
2525
  points: n.map((e) => `${e.x},${e.y}`).join(" "),
2526
2526
  fill: "none",
2527
- stroke: F,
2527
+ stroke: I,
2528
2528
  "stroke-width": 2,
2529
2529
  "stroke-linecap": "round",
2530
2530
  "stroke-linejoin": "round",
2531
2531
  "stroke-dasharray": "5 4"
2532
2532
  }));
2533
2533
  let r = this.points[0];
2534
- if (f(t, p(m("circle"), {
2534
+ if (p(t, m(h("circle"), {
2535
2535
  cx: r.x,
2536
2536
  cy: r.y,
2537
2537
  r: this.points.length >= 3 ? 5 : 3,
2538
- fill: P.paper,
2539
- stroke: F,
2538
+ fill: F.paper,
2539
+ stroke: I,
2540
2540
  "stroke-width": 1.5
2541
2541
  })), this.points.length >= 2) {
2542
2542
  let e = this.points[this.points.length - 1];
2543
- f(t, p(m("circle"), {
2543
+ p(t, m(h("circle"), {
2544
2544
  cx: e.x,
2545
2545
  cy: e.y,
2546
2546
  r: 5,
2547
- fill: P.paper,
2548
- stroke: F,
2547
+ fill: F.paper,
2548
+ stroke: I,
2549
2549
  "stroke-width": 1.5
2550
2550
  }));
2551
2551
  }
2552
- f(e, t), this.layer = t;
2552
+ p(e, t), this.layer = t;
2553
2553
  }
2554
2554
  clearPreview() {
2555
- this.layer &&= (h(this.layer), null);
2555
+ this.layer &&= (g(this.layer), null);
2556
2556
  }
2557
2557
  };
2558
- function pr(e, t) {
2558
+ function mr(e, t) {
2559
2559
  return Math.hypot(e.x - t.x, e.y - t.y);
2560
2560
  }
2561
2561
  //#endregion
2562
2562
  //#region src/draw-tool/EventStormingDrawingHandles.ts
2563
- var mr = class {
2563
+ var hr = class {
2564
2564
  eventBus;
2565
2565
  canvas;
2566
2566
  modeling;
@@ -2577,7 +2577,7 @@ var mr = class {
2577
2577
  constructor(e, t, n, r) {
2578
2578
  this.eventBus = e, this.canvas = t, this.modeling = n, this.readOnly = r, e.on(K, () => this.render()), e.on("selection.changed", (e) => {
2579
2579
  let t = e.newSelection ?? [], n = t.length === 1 ? t[0] : null;
2580
- this.attach(T(n) ? n : null);
2580
+ this.attach(D(n) ? n : null);
2581
2581
  }), e.on("element.changed", (e) => {
2582
2582
  this.shape && e.element === this.shape && this.render();
2583
2583
  }), e.on(["diagram.clear", "diagram.destroy"], () => this.attach(null));
@@ -2594,19 +2594,19 @@ var mr = class {
2594
2594
  }
2595
2595
  render() {
2596
2596
  if (this.clear(), !this.shape || this.readOnly?.isReadOnly()) return;
2597
- let e = this.canvas.getLayer("event-storming-drawing-handles", 1100), t = m("g");
2597
+ let e = this.canvas.getLayer("event-storming-drawing-handles", 1100), t = h("g");
2598
2598
  this.absolutePoints().forEach((e, n) => {
2599
- let r = p(m("circle"), {
2599
+ let r = m(h("circle"), {
2600
2600
  cx: e.x,
2601
2601
  cy: e.y,
2602
2602
  r: 5,
2603
- fill: P.paper,
2604
- stroke: P.ink,
2603
+ fill: F.paper,
2604
+ stroke: F.ink,
2605
2605
  "stroke-width": 1.5,
2606
2606
  class: "event-storming-drawing-handle"
2607
2607
  });
2608
- r.addEventListener("mousedown", (e) => this.startDrag(e, n)), f(t, r);
2609
- }), f(e, t), this.group = t;
2608
+ r.addEventListener("mousedown", (e) => this.startDrag(e, n)), p(t, r);
2609
+ }), p(e, t), this.group = t;
2610
2610
  }
2611
2611
  startDrag(e, t) {
2612
2612
  if (e.button !== 0 || !this.shape) return;
@@ -2633,21 +2633,21 @@ var mr = class {
2633
2633
  }
2634
2634
  renderDragPreview(e, t) {
2635
2635
  this.clearDragPreview();
2636
- let n = this.canvas.getLayer("event-storming-drawing-handles", 1100), r = p(m(t ? "polygon" : "polyline"), {
2636
+ let n = this.canvas.getLayer("event-storming-drawing-handles", 1100), r = m(h(t ? "polygon" : "polyline"), {
2637
2637
  points: e.map((e) => `${e.x},${e.y}`).join(" "),
2638
2638
  fill: "none",
2639
- stroke: P.ink,
2639
+ stroke: F.ink,
2640
2640
  "stroke-width": 1.5,
2641
2641
  "stroke-dasharray": "5 4",
2642
2642
  "pointer-events": "none"
2643
2643
  });
2644
- f(n, r), this.dragPreview = r;
2644
+ p(n, r), this.dragPreview = r;
2645
2645
  }
2646
2646
  clearDragPreview() {
2647
- this.dragPreview &&= (h(this.dragPreview), null);
2647
+ this.dragPreview &&= (g(this.dragPreview), null);
2648
2648
  }
2649
2649
  clear() {
2650
- this.clearDragPreview(), this.group &&= (h(this.group), null);
2650
+ this.clearDragPreview(), this.group &&= (g(this.group), null);
2651
2651
  }
2652
2652
  toCanvasPoint(e) {
2653
2653
  let t = this.canvas.getContainer().getBoundingClientRect(), n = this.canvas.viewbox(), r = this.canvas.zoom();
@@ -2656,79 +2656,79 @@ var mr = class {
2656
2656
  y: (e.clientY - t.top) / r + n.y
2657
2657
  };
2658
2658
  }
2659
- }, hr = class {
2659
+ }, gr = class {
2660
2660
  static $inject = ["eventBus", "interactionEvents"];
2661
2661
  constructor(e, t) {
2662
2662
  e.on("interactionEvents.createHit", (e) => {
2663
- if (T(e.element) && e.gfx) return gr(e.element, e.gfx), !1;
2663
+ if (D(e.element) && e.gfx) return _r(e.element, e.gfx), !1;
2664
2664
  }), e.on("interactionEvents.updateHit", (e) => {
2665
- if (T(e.element) && e.gfx) return t.removeHits(e.gfx), gr(e.element, e.gfx), !1;
2665
+ if (D(e.element) && e.gfx) return t.removeHits(e.gfx), _r(e.element, e.gfx), !1;
2666
2666
  });
2667
2667
  }
2668
2668
  };
2669
- function gr(e, t) {
2670
- let n = e.drawingPoints ?? [], r = m(e.closed ? "polygon" : "polyline");
2671
- p(r, {
2669
+ function _r(e, t) {
2670
+ let n = e.drawingPoints ?? [], r = h(e.closed ? "polygon" : "polyline");
2671
+ m(r, {
2672
2672
  points: n.map((e) => `${e.x},${e.y}`).join(" "),
2673
2673
  class: "djs-hit djs-hit-stroke",
2674
2674
  fill: "none",
2675
2675
  stroke: "white",
2676
2676
  "stroke-width": 15,
2677
2677
  "stroke-opacity": 0
2678
- }), f(t, r);
2678
+ }), p(t, r);
2679
2679
  }
2680
2680
  //#endregion
2681
2681
  //#region src/draw-tool/index.ts
2682
- var _r = {
2682
+ var vr = {
2683
2683
  __init__: [
2684
2684
  "eventStormingDrawTool",
2685
2685
  "eventStormingDrawingHandles",
2686
2686
  "eventStormingDrawingHitProvider"
2687
2687
  ],
2688
- eventStormingDrawTool: ["type", fr],
2689
- eventStormingDrawingHandles: ["type", mr],
2690
- eventStormingDrawingHitProvider: ["type", hr]
2691
- }, vr = class {
2688
+ eventStormingDrawTool: ["type", pr],
2689
+ eventStormingDrawingHandles: ["type", hr],
2690
+ eventStormingDrawingHitProvider: ["type", gr]
2691
+ }, yr = class {
2692
2692
  static $inject = ["eventBus"];
2693
2693
  constructor(e) {
2694
2694
  e.on("resize.start", 1500, (e) => {
2695
2695
  let t = e.context;
2696
- Oe(t.shape) && (t.minDimensions = A);
2696
+ De(t.shape) && (t.minDimensions = Pe);
2697
2697
  });
2698
2698
  }
2699
- }, yr = {
2700
- __depends__: [ye],
2699
+ }, br = {
2700
+ __depends__: [xe],
2701
2701
  __init__: ["eventStormingResizeBehavior"],
2702
- eventStormingResizeBehavior: ["type", vr]
2703
- }, br = class extends W {
2702
+ eventStormingResizeBehavior: ["type", yr]
2703
+ }, xr = class extends Bt {
2704
2704
  _getModules() {
2705
2705
  return [
2706
2706
  ...super._getModules(),
2707
- te,
2708
- se,
2709
- ne,
2710
2707
  re,
2708
+ le,
2711
2709
  ie,
2712
2710
  ae,
2713
2711
  oe,
2712
+ se,
2714
2713
  ce,
2715
- le,
2716
- Sn,
2717
- tn,
2718
- Vt,
2719
- sn,
2720
- ln,
2721
- mn,
2722
- Tn,
2723
- Yn,
2724
- nr,
2725
- vn,
2726
- or,
2727
- lr,
2714
+ ue,
2715
+ de,
2716
+ Cn,
2728
2717
  nn,
2718
+ Ht,
2719
+ cn,
2720
+ un,
2721
+ hn,
2722
+ En,
2723
+ Xn,
2724
+ rr,
2725
+ yn,
2726
+ sr,
2729
2727
  ur,
2730
- _r,
2731
- yr
2728
+ rn,
2729
+ dr,
2730
+ vr,
2731
+ br
2732
2732
  ];
2733
2733
  }
2734
2734
  undo() {
@@ -2743,18 +2743,18 @@ var _r = {
2743
2743
  canRedo() {
2744
2744
  return this.get("commandStack").canRedo();
2745
2745
  }
2746
- }, xr = "event-storming";
2747
- function Sr(e = {}) {
2748
- return Tr(new br({
2749
- ...wr(e),
2746
+ }, Sr = "event-storming";
2747
+ function Cr(e = {}) {
2748
+ return Er(new xr({
2749
+ ...Tr(e),
2750
2750
  undoRedoKeys: e.undoRedoKeys ?? !0,
2751
- freeArea: R(e)
2751
+ freeArea: z(e)
2752
2752
  }), !0);
2753
2753
  }
2754
- function Cr(e = {}) {
2755
- return Tr(new W(wr(e)), !1);
2754
+ function wr(e = {}) {
2755
+ return Er(new Bt(Tr(e)), !1);
2756
2756
  }
2757
- function wr(e) {
2757
+ function Tr(e) {
2758
2758
  return {
2759
2759
  width: "100%",
2760
2760
  height: "100%",
@@ -2762,10 +2762,10 @@ function wr(e) {
2762
2762
  fitOnImport: e.fitOnImport ?? !0
2763
2763
  };
2764
2764
  }
2765
- function Tr(e, t) {
2765
+ function Er(e, t) {
2766
2766
  let n = e.get("eventBus"), r = e.get("canvas"), i = e.get("elementRegistry"), a = e.get("selection"), o = /* @__PURE__ */ new Set(), s = 0, c = !1, l = "", u = {
2767
- notation: xr,
2768
- apiVersion: be,
2767
+ notation: Sr,
2768
+ apiVersion: Se,
2769
2769
  editable: t
2770
2770
  };
2771
2771
  return t && n.on("commandStack.changed", () => {
@@ -2773,21 +2773,21 @@ function Tr(e, t) {
2773
2773
  }), {
2774
2774
  meta: u,
2775
2775
  elements: {
2776
- list: () => c ? [] : i.getAll().filter(Y).map((e) => Or(e)),
2776
+ list: () => c ? [] : i.getAll().filter(Y).map((e) => kr(e)),
2777
2777
  reveal(e) {
2778
2778
  if (c) return !1;
2779
2779
  let t = i.get(e);
2780
2780
  return Y(t) ? (a.select(t), r.scrollToElement(t), !0) : !1;
2781
2781
  },
2782
- selection: () => c ? [] : Er(a.get()),
2782
+ selection: () => c ? [] : Dr(a.get()),
2783
2783
  onSelection(e) {
2784
- let t = (t) => e(Er(t.newSelection ?? []));
2784
+ let t = (t) => e(Dr(t.newSelection ?? []));
2785
2785
  return n.on("selection.changed", t), () => n.off("selection.changed", t);
2786
2786
  },
2787
2787
  bounds(e) {
2788
2788
  if (c) return;
2789
2789
  let t = i.get(e);
2790
- return Y(t) ? Dr(t) : void 0;
2790
+ return Y(t) ? Or(t) : void 0;
2791
2791
  }
2792
2792
  },
2793
2793
  diagram: e,
@@ -2818,13 +2818,13 @@ function Tr(e, t) {
2818
2818
  width: n,
2819
2819
  height: i
2820
2820
  };
2821
- return kr(a) ? a : void 0;
2821
+ return Ar(a) ? a : void 0;
2822
2822
  } catch {
2823
2823
  return;
2824
2824
  }
2825
2825
  },
2826
2826
  setViewState(e) {
2827
- !c && kr(e) && r.viewbox({
2827
+ !c && Ar(e) && r.viewbox({
2828
2828
  x: e.x,
2829
2829
  y: e.y,
2830
2830
  width: e.width,
@@ -2844,12 +2844,12 @@ function Tr(e, t) {
2844
2844
  };
2845
2845
  }
2846
2846
  function Y(e) {
2847
- return w(e);
2847
+ return C(e);
2848
2848
  }
2849
- function Er(e) {
2849
+ function Dr(e) {
2850
2850
  return e.filter(Y).map((e) => e.id);
2851
2851
  }
2852
- function Dr(e) {
2852
+ function Or(e) {
2853
2853
  return {
2854
2854
  x: e.x,
2855
2855
  y: e.y,
@@ -2857,14 +2857,14 @@ function Dr(e) {
2857
2857
  height: e.height
2858
2858
  };
2859
2859
  }
2860
- function Or(e) {
2860
+ function kr(e) {
2861
2861
  let t = e.eventStormingLabel;
2862
2862
  return t ? {
2863
2863
  id: e.id,
2864
2864
  name: t
2865
2865
  } : { id: e.id };
2866
2866
  }
2867
- function kr(e) {
2867
+ function Ar(e) {
2868
2868
  if (typeof e != "object" || !e) return !1;
2869
2869
  let { x: t, y: n, width: r, height: i } = e;
2870
2870
  return X(t) && X(n) && X(r) && X(i) && r > 0 && i > 0;
@@ -2874,7 +2874,7 @@ function X(e) {
2874
2874
  }
2875
2875
  //#endregion
2876
2876
  //#region src/board-menu/menu.ts
2877
- var Ar = "Export as .storm", jr = [
2877
+ var jr = "Export as .storm", Mr = [
2878
2878
  {
2879
2879
  value: "big-picture",
2880
2880
  label: "Big picture"
@@ -2888,8 +2888,8 @@ var Ar = "Export as .storm", jr = [
2888
2888
  label: "Software design"
2889
2889
  }
2890
2890
  ];
2891
- function Mr(e) {
2892
- return jr.some((t) => t.value === e);
2891
+ function Nr(e) {
2892
+ return Mr.some((t) => t.value === e);
2893
2893
  }
2894
2894
  function Z(e, t, n, r) {
2895
2895
  return {
@@ -2901,20 +2901,20 @@ function Z(e, t, n, r) {
2901
2901
  onSelect: () => n.onSelect()
2902
2902
  };
2903
2903
  }
2904
- function Nr(e) {
2904
+ function Pr(e) {
2905
2905
  let t = [Z("export-png", "Export as PNG", e.png, "file-image"), Z("export-svg", "Export as SVG", e.svg, "file-code-corner")];
2906
- return e.transparentPng && t.push(Z("export-png-transparent", "Export as PNG (4×, transparent)", e.transparentPng)), e.json && t.push(Z("export-json", "Export as JSON", e.json)), e.storm && t.push(Z("export-storm", Ar, e.storm)), t;
2906
+ return e.transparentPng && t.push(Z("export-png-transparent", "Export as PNG (4×, transparent)", e.transparentPng)), e.json && t.push(Z("export-json", "Export as JSON", e.json)), e.storm && t.push(Z("export-storm", jr, e.storm)), t;
2907
2907
  }
2908
- function Pr(e) {
2908
+ function Fr(e) {
2909
2909
  return {
2910
2910
  model: [{
2911
2911
  kind: "radio",
2912
2912
  id: "level",
2913
2913
  label: "Level",
2914
- options: jr,
2914
+ options: Mr,
2915
2915
  value: () => e.levels.getLevel(),
2916
2916
  onSelect: (t) => {
2917
- Mr(t) && e.levels.setLevel(t);
2917
+ Nr(t) && e.levels.setLevel(t);
2918
2918
  }
2919
2919
  }, {
2920
2920
  kind: "checkbox",
@@ -2926,7 +2926,7 @@ function Pr(e) {
2926
2926
  e.typeCaptions.setTypeCaptionsVisible(t), e.onTypeCaptionsToggled?.(t);
2927
2927
  }
2928
2928
  }],
2929
- export: Nr(e.exports),
2929
+ export: Pr(e.exports),
2930
2930
  help: [{
2931
2931
  kind: "dialog",
2932
2932
  id: "keyboard-shortcuts",
@@ -2938,23 +2938,23 @@ function Pr(e) {
2938
2938
  }
2939
2939
  //#endregion
2940
2940
  //#region src/board-menu/shortcuts.ts
2941
- var Fr = [
2941
+ var Ir = [
2942
2942
  "←",
2943
2943
  "↑",
2944
2944
  "→",
2945
2945
  "↓"
2946
2946
  ];
2947
- function Ir(e, t, n) {
2947
+ function Lr(e, t, n) {
2948
2948
  return t === "mac" ? `⌘${e}` : `${n.ctrl}+${e}`;
2949
2949
  }
2950
- function Lr(e) {
2950
+ function Rr(e) {
2951
2951
  try {
2952
2952
  return new Intl.NumberFormat(e, { style: "percent" }).format(1);
2953
2953
  } catch {
2954
2954
  return new Intl.NumberFormat("en", { style: "percent" }).format(1);
2955
2955
  }
2956
2956
  }
2957
- function Rr(e, t) {
2957
+ function zr(e, t) {
2958
2958
  if (e === "mac") return {
2959
2959
  zoomIn: "⌘+",
2960
2960
  zoomOut: "⌘−",
@@ -2969,7 +2969,7 @@ function Rr(e, t) {
2969
2969
  fit: `${r}+1`
2970
2970
  };
2971
2971
  }
2972
- function zr(e, t) {
2972
+ function Br(e, t) {
2973
2973
  if (e === "mac") return {
2974
2974
  undo: ["⌘Z"],
2975
2975
  redo: ["⌘⇧Z"],
@@ -2978,7 +2978,7 @@ function zr(e, t) {
2978
2978
  paste: ["⌘V"],
2979
2979
  duplicate: ["⌘D"],
2980
2980
  remove: ["⌫"],
2981
- coarseMove: Fr.map((e) => `⇧${e}`),
2981
+ coarseMove: Ir.map((e) => `⇧${e}`),
2982
2982
  lassoDrag: ["⇧ Drag"]
2983
2983
  };
2984
2984
  let { ctrl: n, shift: r } = t;
@@ -2990,27 +2990,27 @@ function zr(e, t) {
2990
2990
  paste: [`${n}+V`],
2991
2991
  duplicate: [`${n}+D`],
2992
2992
  remove: ["Del", "Backspace"],
2993
- coarseMove: Fr.map((e) => `${r}+${e}`),
2993
+ coarseMove: Ir.map((e) => `${r}+${e}`),
2994
2994
  lassoDrag: [`${r}+Drag`]
2995
2995
  };
2996
2996
  }
2997
- function Br(e) {
2997
+ function Vr(e) {
2998
2998
  let { platform: t, messages: n } = e;
2999
2999
  return {
3000
3000
  title: "File",
3001
3001
  rows: [{
3002
3002
  action: n.openFile ?? "Open…",
3003
- keys: [Ir("O", t, n.keyNames)]
3003
+ keys: [Lr("O", t, n.keyNames)]
3004
3004
  }, {
3005
- action: Ar,
3006
- keys: [Ir("S", t, n.keyNames)]
3005
+ action: jr,
3006
+ keys: [Lr("S", t, n.keyNames)]
3007
3007
  }]
3008
3008
  };
3009
3009
  }
3010
- function Vr(e, t = {}) {
3011
- let { platform: n, messages: r } = e, i = Rr(n, r.keyNames), a = zr(n, r.keyNames);
3010
+ function Hr(e, t = {}) {
3011
+ let { platform: n, messages: r } = e, i = zr(n, r.keyNames), a = Br(n, r.keyNames);
3012
3012
  return [
3013
- ...t.fileKeys ? [Br(e)] : [],
3013
+ ...t.fileKeys ? [Vr(e)] : [],
3014
3014
  {
3015
3015
  title: "View",
3016
3016
  rows: [
@@ -3023,7 +3023,7 @@ function Vr(e, t = {}) {
3023
3023
  keys: [i.zoomOut]
3024
3024
  },
3025
3025
  {
3026
- action: r.zoomToActual(Lr(e.lang)),
3026
+ action: r.zoomToActual(Rr(e.lang)),
3027
3027
  keys: [i.zoomToActual]
3028
3028
  },
3029
3029
  {
@@ -3065,7 +3065,7 @@ function Vr(e, t = {}) {
3065
3065
  },
3066
3066
  {
3067
3067
  action: "Move selection",
3068
- keys: Fr
3068
+ keys: Ir
3069
3069
  },
3070
3070
  {
3071
3071
  action: "Move selection in large steps",
@@ -3106,13 +3106,13 @@ function Vr(e, t = {}) {
3106
3106
  }
3107
3107
  //#endregion
3108
3108
  //#region src/board-menu/ShortcutsDialog.ts
3109
- var Q = "event-storming-shortcuts", Hr = "event-storming-shortcuts-title";
3109
+ var Q = "event-storming-shortcuts", Ur = "event-storming-shortcuts-title";
3110
3110
  function $(e, t, n) {
3111
3111
  let r = document.createElement(e);
3112
3112
  return r.className = t, n !== void 0 && (r.textContent = n), r;
3113
3113
  }
3114
- function Ur(e, t) {
3115
- let n = $("section", `${Q}-group`), r = `${Hr}-group-${t}`, i = $("h4", `${Q}-group-title`, e.title);
3114
+ function Wr(e, t) {
3115
+ let n = $("section", `${Q}-group`), r = `${Ur}-group-${t}`, i = $("h4", `${Q}-group-title`, e.title);
3116
3116
  i.id = r;
3117
3117
  let a = $("table", `${Q}-table`);
3118
3118
  a.setAttribute("aria-labelledby", r);
@@ -3126,19 +3126,19 @@ function Ur(e, t) {
3126
3126
  }
3127
3127
  return n.append(i, a), n;
3128
3128
  }
3129
- function Wr(e, t, n) {
3129
+ function Gr(e, t, n) {
3130
3130
  let r = $("div", `${Q}-panel`), i = $("header", `${Q}-header`), a = $("h3", `${Q}-title`, "Keyboard shortcuts");
3131
- a.id = Hr;
3131
+ a.id = Ur;
3132
3132
  let o = $("button", `${Q}-close`);
3133
3133
  o.type = "button", o.setAttribute("aria-label", e.messages.close), o.innerHTML = q("x"), o.addEventListener("click", n), i.append(a, o);
3134
3134
  let s = $("div", `${Q}-body`);
3135
- return s.append(...Vr(e, t).map(Ur)), r.append(i, s), r;
3135
+ return s.append(...Hr(e, t).map(Wr)), r.append(i, s), r;
3136
3136
  }
3137
- function Gr(e, t = {}) {
3137
+ function Kr(e, t = {}) {
3138
3138
  let n;
3139
3139
  function r() {
3140
3140
  let n = $("dialog", Q);
3141
- return n.setAttribute("aria-labelledby", Hr), n.append(Wr(e, t, () => n.close())), n.addEventListener("click", (e) => {
3141
+ return n.setAttribute("aria-labelledby", Ur), n.append(Gr(e, t, () => n.close())), n.addEventListener("click", (e) => {
3142
3142
  e.target === n && n.close();
3143
3143
  }), n.addEventListener("close", () => {
3144
3144
  e.menu.trigger.hidden || e.menu.trigger.focus({ preventScroll: !0 });
@@ -3159,11 +3159,11 @@ function Gr(e, t = {}) {
3159
3159
  }
3160
3160
  //#endregion
3161
3161
  //#region src/draw/icons.ts
3162
- var Kr = "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z", qr = "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z", Jr = "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z", Yr = "M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z", Xr = "M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z", Zr = "M4 7v2c0 .55-.45 1-1 1H2v2h1c.55 0 1 .45 1 1v2c0 1.65 1.35 3 3 3h1v-2H7c-.55 0-1-.45-1-1v-2c0-.84-.35-1.61-.92-2.18L4.85 12l.23-.82C5.65 10.61 6 9.84 6 9V7c0-.55.45-1 1-1h1V4H7C5.35 4 4 5.35 4 7zm16 3c-.55 0-1-.45-1-1V7c0-1.65-1.35-3-3-3h-1v2h1c.55 0 1 .45 1 1v2c0 .84.35 1.61.92 2.18l.23.82-.23.82c-.57.57-.92 1.34-.92 2.18v2c0 .55-.45 1-1 1h-1v2h1c1.65 0 3-1.35 3-3v-2c0-.55.45-1 1-1h1v-2h-1z", Qr = "M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z", $r = "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z", ei = "M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92z", ti = "M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z", ni = "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z", ri = "M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 14h-3v3h-2v-3H8v-2h3v-3h2v3h3v2zm-3-7V3.5L18.5 9H13z", ii = "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z", ai = "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z", oi = "M19 12h-2v3h-3v2h5v-5zM7 9h3V7H5v5h2V9zm14-6H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02z", si = "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z";
3163
- function ci(e, t = 18) {
3162
+ var qr = "M12 12c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0 2c-2.67 0-8 1.34-8 4v2h16v-2c0-2.66-5.33-4-8-4z", Jr = "M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z", Yr = "M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z", Xr = "M12.5 8c-2.65 0-5.05.99-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z", Zr = "M18.4 10.6C16.55 8.99 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16c1.05-3.19 4.05-5.5 7.6-5.5 1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z", Qr = "M4 7v2c0 .55-.45 1-1 1H2v2h1c.55 0 1 .45 1 1v2c0 1.65 1.35 3 3 3h1v-2H7c-.55 0-1-.45-1-1v-2c0-.84-.35-1.61-.92-2.18L4.85 12l.23-.82C5.65 10.61 6 9.84 6 9V7c0-.55.45-1 1-1h1V4H7C5.35 4 4 5.35 4 7zm16 3c-.55 0-1-.45-1-1V7c0-1.65-1.35-3-3-3h-1v2h1c.55 0 1 .45 1 1v2c0 .84.35 1.61.92 2.18l.23.82-.23.82c-.57.57-.92 1.34-.92 2.18v2c0 .55-.45 1-1 1h-1v2h1c1.65 0 3-1.35 3-3v-2c0-.55.45-1 1-1h1v-2h-1z", $r = "M9.4 16.6L4.8 12l4.6-4.6L8 6l-6 6 6 6 1.4-1.4zm5.2 0l4.6-4.6-4.6-4.6L16 6l6 6-6 6-1.4-1.4z", ei = "M19 9h-4V3H9v6H5l7 7 7-7zM5 18v2h14v-2H5z", ti = "M18 16.08c-.76 0-1.44.3-1.96.77L8.91 12.7c.05-.23.09-.46.09-.7s-.04-.47-.09-.7l7.05-4.11c.54.5 1.25.81 2.04.81 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.09.7L8.04 9.81C7.5 9.31 6.79 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.79 0 1.5-.31 2.04-.81l7.12 4.16c-.05.21-.08.43-.08.65 0 1.61 1.31 2.92 2.92 2.92s2.92-1.31 2.92-2.92-1.31-2.92-2.92-2.92z", ni = "M20 6h-8l-2-2H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V8c0-1.1-.9-2-2-2zm0 12H4V8h16v10z", ri = "M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z", ii = "M14 2H6c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm2 14h-3v3h-2v-3H8v-2h3v-3h2v3h3v2zm-3-7V3.5L18.5 9H13z", ai = "M3 18h18v-2H3v2zm0-5h18v-2H3v2zm0-7v2h18V6H3z", oi = "M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z", si = "M19 12h-2v3h-3v2h5v-5zM7 9h3V7H5v5h2V9zm14-6H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 16.01H3V4.99h18v14.02z", ci = "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z";
3163
+ function li(e, t = 18) {
3164
3164
  return `<svg viewBox="0 0 24 24" width="${t}" height="${t}" fill="currentColor" aria-hidden="true"><path d="${e}"/></svg>`;
3165
3165
  }
3166
3166
  //#endregion
3167
- export { jr as BOARD_LEVELS, nt as BoardBounds, P as COLORS, xr as EVENT_STORMING_NOTATION, ar as EventStormingAppendBehavior, Bt as EventStormingAttachBehavior, qe as EventStormingBaseViewer, cr as EventStormingColorPicker, Qe as EventStormingElementFactory, _n as EventStormingElementSettingsProvider, Ft as EventStormingExporter, Pt as EventStormingImporter, Gn as EventStormingLabelEditing, qt as EventStormingModeling, xn as EventStormingReadOnly, vt as EventStormingRenderer, vr as EventStormingResizeBehavior, on as EventStormingRules, at as EventStormingViewOptions, ai as ICON_ADD, Qr as ICON_CODE, Zr as ICON_DATA_OBJECT, Jr as ICON_DELETE, $r as ICON_DOWNLOAD, qr as ICON_EDIT, si as ICON_EYE, oi as ICON_FIT, ti as ICON_FOLDER_OPEN, ni as ICON_IMAGE, ii as ICON_MENU, ri as ICON_NEW, Kr as ICON_PERSON, Xr as ICON_REDO, ei as ICON_SHARE, Yr as ICON_UNDO, E as MIRAGON, br as Modeler, k as NOTE_STYLE, W as NavigatedViewer, G as POPUP_PROVIDER_ID, K as READ_ONLY_CHANGED_EVENT, y as ROOT_ID, S as STICKY_KINDS, O as STICKY_STYLES, Ar as STORM_EXPORT_LABEL, it as VIEW_OPTIONS_CHANGED_EVENT, zt as Viewer, rt as boardBoundsModule, Pr as boardMenu, Vr as boardShortcuts, Ir as commandKeyLabel, Sr as createCollaborativeModeler, Cr as createCollaborativeViewer, Gr as createShortcutsDialog, ln as elementSnappingModule, or as eventStormingAppendModule, Vt as eventStormingAttachModule, lr as eventStormingColorPickerModule, Tn as eventStormingContextPadModule, jt as eventStormingDrawModule, nr as eventStormingKeyboardModule, et as eventStormingModelModule, tn as eventStormingModelingModule, mn as eventStormingPaletteModule, vn as eventStormingPopupModule, Sn as eventStormingReadOnlyModule, yr as eventStormingResizeModule, sn as eventStormingRulesModule, V as eventStormingViewOptionsModule, ci as iconMarkup, Lt as importWarningText, Rt as ioModule, we as isAttachableKind, Ee as isAttachableSticky, x as isEventStormingConnection, b as isEventStormingShape, Te as isHostKind, De as isHostSticky, w as isSticky, C as isStickyKind, Yn as labelEditingModule, D as parseNoteMarkdown, je as plainNoteText, Se as saveSVG, Ae as serializeNoteMarkdown };
3167
+ export { Mr as BOARD_LEVELS, nt as BoardBounds, F as COLORS, Sr as EVENT_STORMING_NOTATION, or as EventStormingAppendBehavior, Vt as EventStormingAttachBehavior, qe as EventStormingBaseViewer, lr as EventStormingColorPicker, Qe as EventStormingElementFactory, vn as EventStormingElementSettingsProvider, Ft as EventStormingExporter, Pt as EventStormingImporter, Kn as EventStormingLabelEditing, Jt as EventStormingModeling, Sn as EventStormingReadOnly, vt as EventStormingRenderer, yr as EventStormingResizeBehavior, sn as EventStormingRules, at as EventStormingViewOptions, oi as ICON_ADD, $r as ICON_CODE, Qr as ICON_DATA_OBJECT, Yr as ICON_DELETE, ei as ICON_DOWNLOAD, Jr as ICON_EDIT, ci as ICON_EYE, si as ICON_FIT, ni as ICON_FOLDER_OPEN, ri as ICON_IMAGE, ai as ICON_MENU, ii as ICON_NEW, qr as ICON_PERSON, Zr as ICON_REDO, ti as ICON_SHARE, Xr as ICON_UNDO, O as MIRAGON, xr as Modeler, j as NOTE_STYLE, Bt as NavigatedViewer, G as POPUP_PROVIDER_ID, K as READ_ONLY_CHANGED_EVENT, v as ROOT_ID, x as STICKY_KINDS, A as STICKY_STYLES, jr as STORM_EXPORT_LABEL, it as VIEW_OPTIONS_CHANGED_EVENT, zt as Viewer, rt as boardBoundsModule, Fr as boardMenu, Hr as boardShortcuts, Lr as commandKeyLabel, Cr as createCollaborativeModeler, wr as createCollaborativeViewer, Kr as createShortcutsDialog, un as elementSnappingModule, sr as eventStormingAppendModule, Ht as eventStormingAttachModule, ur as eventStormingColorPickerModule, En as eventStormingContextPadModule, jt as eventStormingDrawModule, rr as eventStormingKeyboardModule, et as eventStormingModelModule, nn as eventStormingModelingModule, hn as eventStormingPaletteModule, yn as eventStormingPopupModule, Cn as eventStormingReadOnlyModule, br as eventStormingResizeModule, cn as eventStormingRulesModule, H as eventStormingViewOptionsModule, li as iconMarkup, Lt as importWarningText, Rt as ioModule, w as isAttachableKind, Ee as isAttachableSticky, b as isEventStormingConnection, y as isEventStormingShape, T as isHostKind, E as isHostSticky, C as isSticky, S as isStickyKind, Xn as labelEditingModule, k as parseNoteMarkdown, Ae as plainNoteText, we as saveSVG, ke as serializeNoteMarkdown };
3168
3168
 
3169
3169
  //# sourceMappingURL=index.js.map