likec4 1.39.3 → 1.39.4

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.
@@ -1,13 +1,11 @@
1
1
  var __defProp = Object.defineProperty;
2
2
  var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key2] = value;
3
3
  var __publicField = (obj, key2, value) => __defNormalProp(obj, typeof key2 != "symbol" ? key2 + "" : key2, value);
4
- import { useContext, createContext, useMemo, useState, useEffect, forwardRef, createElement, useRef, createRef, Fragment as Fragment$1, useCallback, memo as memo$1, useLayoutEffect, useDeferredValue } from "react";
4
+ import { forwardRef, createElement, useContext, createContext, useMemo, useState, useEffect, useRef, createRef, Fragment as Fragment$1, useCallback, memo as memo$1, useLayoutEffect, useDeferredValue } from "react";
5
5
  import { jsx, Fragment, jsxs } from "react/jsx-runtime";
6
- import { L as LazyMotion, d as domMax, M as MotionConfig, u as useSyncedRef, t, l, s as shallowEqual, a as atom, b as deepEqual, c as useDeepCompareMemo, C, r, e as u, f as t$1, g as useFirstMountState, h as useCustomCompareEffect, i as useStoreApi, j as useStore, k as useReactFlow, m as useInternalNode, n as u$1, o as i, B as Bezier, p as o, q as getNodeDimensions, v as Background$1, w as BackgroundVariant, x as j, y as index, z as xstateReact_cjsExports, A as MotionDiv, D as m, E as n, F as EdgeLabelRenderer, G as e, H as MotionButton, N as NodeToolbar, P as Position, I as n$1, J as Handle, K as d3line, O as curveCatmullRomOpen, Q as d, R as a, S as useDebouncedEffect, T as t$2, U as useUpdateEffect$1, V as xstate_cjsExports, W as useDebouncedCallback, X as AnimatePresence, Y as isMacOs, Z as MotionSpan, _ as m$1, $ as useReducedMotionConfig, a0 as useTimeoutEffect, a1 as ReactRemoveScroll, a2 as n$2, a3 as LayoutGroup, a4 as ErrorBoundary$1, a5 as getBezierPath, a6 as i$1, a7 as i$2, a8 as p, a9 as m$2, aa as a$1, ab as m$3, ac as f, ad as t$3, ae as i$3, af as dagre, ag as l$1, ah as r$1, ai as a$2, aj as ReactFlowProvider, ak as Panel, al as d$1, am as useDragControls, an as useMotionValue, ao as n$3, ap as animate, aq as l$2, ar as autoUpdate, as as computePosition, at as offset$1, au as autoPlacement, av as size, aw as hide, ax as u$2, ay as useCustomCompareMemo, az as toRgba, aA as a$3, aB as mix, aC as toHex, aD as scale, aE as i$4, aF as n$4, aG as y, aH as applyEdgeChanges, aI as applyNodeChanges, aJ as getViewportForBounds, aK as t$4, aL as t$5, aM as D, aN as d$2, aO as e$1, aP as getBoundsOfRects, aQ as boxToRect, aR as nodeToRect } from "./vendors.js";
7
- import { u as useMantineStyleNonce, M as MantineContext, a as MantineProvider, c as createSafeContext, b as createOptionalContext, d as useCallbackRef, e as useDebouncedValue, A as ActionIcon$1, T as Text, f as useId, g as useHover, h as useDebouncedState, i as Tooltip$7, P as Popover, j as PopoverTarget, B as Button, C as ColorSwatch, k as PopoverDropdown, S as Space, D as Divider$1, l as Stack, m as TooltipGroup, F as Flex, n as CheckIcon, r as rem, o as Slider, p as Paper, q as Box$1, G as Group, s as SegmentedControl, t as Menu, v as MenuTarget, w as MenuDropdown, x as MenuItem, y as ThemeIcon, z as Breadcrumbs, E as FloatingIndicator, U as UnstyledButton, H as useUncontrolled, I as clampUseMovePosition, J as useMove, K as useMergedRef, L as HoverCard, N as HoverCardTarget, O as HoverCardDropdown, Q as Notification, R as Code, V as Badge, W as CopyButton, X as Portal, Y as NavLink, Z as useThrottledCallback, _ as createScopedKeydownHandler, $ as ScrollAreaAutosize, a0 as Input, a1 as Highlight, a2 as useFocusTrap, a3 as useTree, a4 as Alert, a5 as Tree, a6 as useStateHistory, a7 as Anchor, a8 as Pill, a9 as useViewportSize, aa as useSessionStorage, ab as Card, ac as CloseButton, ad as ActionIconGroup, ae as Tabs, af as TabsList, ag as TabsTab, ah as TabsPanel, ai as ScrollArea, aj as VisuallyHidden, ak as useWindowEvent, al as FocusTrap, am as Title, an as useFocusWithin, ao as useCombobox, ap as ComboboxOption, aq as Combobox, ar as ComboboxTarget, as as ComboboxDropdown, at as ComboboxOptions, au as ComboboxEmpty, av as useHotkeys, aw as Grid, ax as GridCol, ay as useLocalStorage, az as CardSection, aA as Spoiler, aB as ButtonGroup, aC as useTimeout, aD as useDebouncedCallback$1, aE as getHotkeyHandler } from "./mantine.js";
6
+ import { u as useMantineStyleNonce, L as LazyMotion, d as domMax, M as MotionConfig, a as useSyncedRef, e, t, s as shallowEqual, b as MantineContext, c as MantineProvider, f as atom, g as createSafeContext, h as deepEqual, i as useDeepCompareMemo, j as t$1, k as t$2, l as t$3, m as t$4, n as createOptionalContext, o as useId$1, p as useFirstMountState, q as useCustomCompareEffect, r as useStoreApi, v as useStore, w as useCallbackRef, x as useReactFlow, y as useInternalNode, z as t$5, A as t$6, B as Bezier, C as e$1, D as getNodeDimensions, E as Background$1, F as BackgroundVariant, G as n, H as index, I as xstateReact_cjsExports, J as useDebouncedValue, K as MotionDiv, N as ActionIcon$1, O as m, T as Text, P as e$2, Q as EdgeLabelRenderer, R as e$3, S as MotionButton, U as useHover, V as useDebouncedState, W as NodeToolbar, X as Position, Y as e$4, Z as Handle, _ as d3line, $ as curveCatmullRomOpen, a0 as n$1, a1 as t$7, a2 as useDebouncedEffect, a3 as Tooltip$7, a4 as t$8, a5 as Popover, a6 as PopoverTarget, a7 as Button, a8 as ColorSwatch, a9 as PopoverDropdown, aa as Space, ab as Divider$1, ac as Stack, ad as TooltipGroup, ae as Flex, af as CheckIcon, ag as rem, ah as useUpdateEffect$1, ai as Slider, aj as Paper, ak as Box$1, al as Group, am as SegmentedControl, an as Menu, ao as MenuTarget, ap as MenuDropdown, aq as MenuItem, ar as xstate_cjsExports, as as ThemeIcon, at as Breadcrumbs, au as FloatingIndicator, av as UnstyledButton, aw as useDebouncedCallback, ax as useUncontrolled, ay as clampUseMovePosition, az as useMove, aA as useMergedRef, aB as HoverCard, aC as HoverCardTarget, aD as HoverCardDropdown, aE as Notification, aF as Code, aG as AnimatePresence, aH as isMacOs, aI as Badge, aJ as CopyButton, aK as MotionSpan, aL as Portal, aM as NavLink, aN as useFocusTrap, aO as useReducedMotionConfig, aP as useTimeoutEffect, aQ as ReactRemoveScroll, aR as useThrottledCallback, aS as createScopedKeydownHandler, aT as ScrollAreaAutosize, aU as Input, aV as t$9, aW as Highlight, aX as e$5, aY as LayoutGroup, aZ as ErrorBoundary$1, a_ as useTree, a$ as Alert, b0 as Tree, b1 as getBezierPath, b2 as t$a, b3 as t$b, b4 as e$6, b5 as t$c, b6 as t$d, b7 as n$2, b8 as r, b9 as t$e, ba as n$3, bb as dagre, bc as t$f, bd as t$g, be as t$h, bf as ReactFlowProvider, bg as useStateHistory, bh as Panel, bi as Anchor, bj as Pill, bk as useViewportSize, bl as useSessionStorage, bm as t$i, bn as useDragControls, bo as useMotionValue, bp as Card, bq as CloseButton, br as ActionIconGroup, bs as Tabs, bt as TabsList, bu as TabsTab, bv as TabsPanel, bw as ScrollArea, bx as e$7, by as animate, bz as e$8, bA as VisuallyHidden, bB as useWindowEvent, bC as FocusTrap, bD as Title, bE as useFocusWithin, bF as useCombobox, bG as ComboboxOption, bH as Combobox, bI as ComboboxTarget, bJ as ComboboxDropdown, bK as ComboboxOptions, bL as ComboboxEmpty, bM as useHotkeys, bN as Grid, bO as GridCol, bP as autoUpdate, bQ as computePosition, bR as offset$1, bS as autoPlacement, bT as size, bU as hide, bV as useLocalStorage, bW as CardSection, bX as Spoiler, bY as n$4, bZ as ButtonGroup, b_ as useTimeout, b$ as useDebouncedCallback$1, c0 as useCustomCompareMemo, c1 as toRgba, c2 as t$j, c3 as mix, c4 as toHex, c5 as scale, c6 as t$k, c7 as e$9, c8 as n$5, c9 as applyEdgeChanges, ca as applyNodeChanges, cb as getViewportForBounds, cc as e$a, cd as t$l, ce as getHotkeyHandler, cf as n$6, cg as t$m, ch as e$b, ci as getBoundsOfRects, cj as boxToRect, ck as nodeToRect } from "./vendors.js";
8
7
  import { isTagColorSpecified, nonexhaustive, invariant as invariant$1, isStepEdgeId, extractStep, nonNullable, defaultTheme, ElementShapes, RichText, ancestorsFqn, nameFromFqn, isAncestor as isAncestor$1, ThemeColors, Queue, whereOperatorAsPredicate, GroupElementKind, BBox, getParallelStepsPrefix } from "@likec4/core";
9
8
  import { invariant, toArray, ifirst, ifilter, compareNaturalHierarchically, nonexhaustive as nonexhaustive$1, compareNatural, ifind, nonNullable as nonNullable$1, DefaultMap, isAncestor, sortParentsFirst, nameFromFqn as nameFromFqn$1, delay } from "@likec4/core/utils";
10
- import { I as IconCylinder, a as IconRectangularPrism, b as IconReorder, c as IconUser, d as IconDeviceMobile, e as IconBrowser, f as IconZoomScan, g as IconId, h as IconTransform, i as IconFileSymlink, j as IconSelector, k as IconCheck, l as IconChevronRight, m as IconFocusCentered, n as IconLayoutDashboard, o as IconAlertTriangle, p as IconLayoutCollage, q as IconLayoutBoardSplit, r as IconLayoutAlignLeft, s as IconLayoutAlignCenter, t as IconLayoutAlignRight, u as IconLayoutAlignTop, v as IconLayoutAlignMiddle, w as IconLayoutAlignBottom, x as IconRouteOff, y as IconMenu2, z as IconArrowLeft, A as IconArrowRight, B as IconSearch, C as IconLock, D as IconLockOpen2, E as IconCopy, F as IconLink, G as IconPlayerStopFilled, H as IconPlayerSkipBackFilled, J as IconPlayerSkipForwardFilled, K as IconPlayerPlayFilled, L as IconChevronDown, M as IconStack2, N as IconStarFilled, O as IconFolderFilled, P as IconX, Q as IconInfoCircle, R as IconTarget, S as IconChevronLeft, T as IconExternalLink, U as IconMenu, V as IconHelpCircle, W as IconArrowDownRight } from "./icons.js";
11
9
  import { DefaultShapeSize, DefaultTextSize, DefaultPaddingSize, RichText as RichText$1 } from "@likec4/core/types";
12
10
  import { computeRelationshipsView, treeFromElements } from "@likec4/core/compute-view/relationships";
13
11
  import { normalizeViewPath, VIEW_FOLDERS_SEPARATOR, modelConnection } from "@likec4/core/model";
@@ -31,8 +29,8 @@ function toName(code) {
31
29
  return toChar(x % 52) + name;
32
30
  }
33
31
  function toPhash(h, x) {
34
- let i2 = x.length;
35
- for (; i2; ) h = h * 33 ^ x.charCodeAt(--i2);
32
+ let i = x.length;
33
+ for (; i; ) h = h * 33 ^ x.charCodeAt(--i);
36
34
  return h;
37
35
  }
38
36
  function toHash(value) {
@@ -179,8 +177,8 @@ var wordRegex = /([A-Z])/g, msRegex = /^ms-/, hypenateProperty = memo((property)
179
177
  function splitProps(props, ...keys) {
180
178
  const descriptors = Object.getOwnPropertyDescriptors(props), dKeys = Object.keys(descriptors), split = (k) => {
181
179
  const clone = {};
182
- for (let i2 = 0; i2 < k.length; i2++) {
183
- const key2 = k[i2];
180
+ for (let i = 0; i < k.length; i++) {
181
+ const key2 = k[i];
184
182
  descriptors[key2] && (Object.defineProperty(clone, key2, descriptors[key2]), delete descriptors[key2]);
185
183
  }
186
184
  return clone;
@@ -207,8 +205,8 @@ function finalizeConditions(paths) {
207
205
  return paths.map((path) => conditions.has(path) ? path.replace(underscoreRegex, "") : conditionsSelectorRegex.test(path) ? `[${withoutSpace(path.trim())}]` : path);
208
206
  }
209
207
  function sortConditions(paths) {
210
- return paths.sort((a2, b) => {
211
- const aa = isCondition(a2), bb = isCondition(b);
208
+ return paths.sort((a, b) => {
209
+ const aa = isCondition(a), bb = isCondition(b);
212
210
  return aa && !bb ? 1 : !aa && bb ? -1 : 0;
213
211
  });
214
212
  }
@@ -238,9 +236,9 @@ const resolveShorthand = (prop) => shorthands.get(prop) || prop, context = {
238
236
  css.raw = (...styles) => mergeCss(...styles);
239
237
  const { mergeCss } = createMergeCss(context);
240
238
  function cx() {
241
- let str = "", i2 = 0, arg;
242
- for (; i2 < arguments.length; )
243
- (arg = arguments[i2++]) && typeof arg == "string" && (str && (str += " "), str += arg);
239
+ let str = "", i = 0, arg;
240
+ for (; i < arguments.length; )
241
+ (arg = arguments[i++]) && typeof arg == "string" && (str && (str += " "), str += arg);
244
242
  return str;
245
243
  }
246
244
  const defaults = (conf) => ({
@@ -336,7 +334,445 @@ const FramerMotionConfig = ({
336
334
  var _a;
337
335
  const nonce = (_a = useMantineStyleNonce()) == null ? void 0 : _a();
338
336
  return /* @__PURE__ */ jsx(LazyMotion, { features: domMax, strict: !0, children: /* @__PURE__ */ jsx(MotionConfig, { reducedMotion, ...nonce && { nonce }, children }) });
339
- }, IconRendererContext = createContext(null);
337
+ };
338
+ /**
339
+ * @license @tabler/icons-react v3.34.1 - MIT
340
+ *
341
+ * This source code is licensed under the MIT license.
342
+ * See the LICENSE file in the root directory of this source tree.
343
+ */
344
+ var defaultAttributes = {
345
+ outline: {
346
+ xmlns: "http://www.w3.org/2000/svg",
347
+ width: 24,
348
+ height: 24,
349
+ viewBox: "0 0 24 24",
350
+ fill: "none",
351
+ stroke: "currentColor",
352
+ strokeWidth: 2,
353
+ strokeLinecap: "round",
354
+ strokeLinejoin: "round"
355
+ },
356
+ filled: {
357
+ xmlns: "http://www.w3.org/2000/svg",
358
+ width: 24,
359
+ height: 24,
360
+ viewBox: "0 0 24 24",
361
+ fill: "currentColor",
362
+ stroke: "none"
363
+ }
364
+ };
365
+ /**
366
+ * @license @tabler/icons-react v3.34.1 - MIT
367
+ *
368
+ * This source code is licensed under the MIT license.
369
+ * See the LICENSE file in the root directory of this source tree.
370
+ */
371
+ const createReactComponent = (type, iconName, iconNamePascal, iconNode) => {
372
+ const Component = forwardRef(
373
+ ({ color = "currentColor", size: size2 = 24, stroke = 2, title: title2, className, children, ...rest }, ref) => createElement(
374
+ "svg",
375
+ {
376
+ ref,
377
+ ...defaultAttributes[type],
378
+ width: size2,
379
+ height: size2,
380
+ className: ["tabler-icon", `tabler-icon-${iconName}`, className].join(" "),
381
+ ...type === "filled" ? {
382
+ fill: color
383
+ } : {
384
+ strokeWidth: stroke,
385
+ stroke: color
386
+ },
387
+ ...rest
388
+ },
389
+ [
390
+ title2 && createElement("title", { key: "svg-title" }, title2),
391
+ ...iconNode.map(([tag, attrs]) => createElement(tag, attrs)),
392
+ ...Array.isArray(children) ? children : [children]
393
+ ]
394
+ )
395
+ );
396
+ return Component.displayName = `${iconNamePascal}`, Component;
397
+ };
398
+ /**
399
+ * @license @tabler/icons-react v3.34.1 - MIT
400
+ *
401
+ * This source code is licensed under the MIT license.
402
+ * See the LICENSE file in the root directory of this source tree.
403
+ */
404
+ const __iconNode$R = [["path", { d: "M12 9v4", key: "svg-0" }], ["path", { d: "M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0z", key: "svg-1" }], ["path", { d: "M12 16h.01", key: "svg-2" }]], IconAlertTriangle = createReactComponent("outline", "alert-triangle", "AlertTriangle", __iconNode$R);
405
+ /**
406
+ * @license @tabler/icons-react v3.34.1 - MIT
407
+ *
408
+ * This source code is licensed under the MIT license.
409
+ * See the LICENSE file in the root directory of this source tree.
410
+ */
411
+ const __iconNode$Q = [["path", { d: "M7 7l10 10", key: "svg-0" }], ["path", { d: "M17 8l0 9l-9 0", key: "svg-1" }]], IconArrowDownRight = createReactComponent("outline", "arrow-down-right", "ArrowDownRight", __iconNode$Q);
412
+ /**
413
+ * @license @tabler/icons-react v3.34.1 - MIT
414
+ *
415
+ * This source code is licensed under the MIT license.
416
+ * See the LICENSE file in the root directory of this source tree.
417
+ */
418
+ const __iconNode$P = [["path", { d: "M5 12l14 0", key: "svg-0" }], ["path", { d: "M5 12l6 6", key: "svg-1" }], ["path", { d: "M5 12l6 -6", key: "svg-2" }]], IconArrowLeft = createReactComponent("outline", "arrow-left", "ArrowLeft", __iconNode$P);
419
+ /**
420
+ * @license @tabler/icons-react v3.34.1 - MIT
421
+ *
422
+ * This source code is licensed under the MIT license.
423
+ * See the LICENSE file in the root directory of this source tree.
424
+ */
425
+ const __iconNode$O = [["path", { d: "M5 12l14 0", key: "svg-0" }], ["path", { d: "M13 18l6 -6", key: "svg-1" }], ["path", { d: "M13 6l6 6", key: "svg-2" }]], IconArrowRight = createReactComponent("outline", "arrow-right", "ArrowRight", __iconNode$O);
426
+ /**
427
+ * @license @tabler/icons-react v3.34.1 - MIT
428
+ *
429
+ * This source code is licensed under the MIT license.
430
+ * See the LICENSE file in the root directory of this source tree.
431
+ */
432
+ const __iconNode$N = [["path", { d: "M4 8h16", key: "svg-0" }], ["path", { d: "M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z", key: "svg-1" }], ["path", { d: "M8 4v4", key: "svg-2" }]], IconBrowser = createReactComponent("outline", "browser", "Browser", __iconNode$N);
433
+ /**
434
+ * @license @tabler/icons-react v3.34.1 - MIT
435
+ *
436
+ * This source code is licensed under the MIT license.
437
+ * See the LICENSE file in the root directory of this source tree.
438
+ */
439
+ const __iconNode$M = [["path", { d: "M5 12l5 5l10 -10", key: "svg-0" }]], IconCheck = createReactComponent("outline", "check", "Check", __iconNode$M);
440
+ /**
441
+ * @license @tabler/icons-react v3.34.1 - MIT
442
+ *
443
+ * This source code is licensed under the MIT license.
444
+ * See the LICENSE file in the root directory of this source tree.
445
+ */
446
+ const __iconNode$L = [["path", { d: "M6 9l6 6l6 -6", key: "svg-0" }]], IconChevronDown = createReactComponent("outline", "chevron-down", "ChevronDown", __iconNode$L);
447
+ /**
448
+ * @license @tabler/icons-react v3.34.1 - MIT
449
+ *
450
+ * This source code is licensed under the MIT license.
451
+ * See the LICENSE file in the root directory of this source tree.
452
+ */
453
+ const __iconNode$K = [["path", { d: "M15 6l-6 6l6 6", key: "svg-0" }]], IconChevronLeft = createReactComponent("outline", "chevron-left", "ChevronLeft", __iconNode$K);
454
+ /**
455
+ * @license @tabler/icons-react v3.34.1 - MIT
456
+ *
457
+ * This source code is licensed under the MIT license.
458
+ * See the LICENSE file in the root directory of this source tree.
459
+ */
460
+ const __iconNode$J = [["path", { d: "M9 6l6 6l-6 6", key: "svg-0" }]], IconChevronRight = createReactComponent("outline", "chevron-right", "ChevronRight", __iconNode$J);
461
+ /**
462
+ * @license @tabler/icons-react v3.34.1 - MIT
463
+ *
464
+ * This source code is licensed under the MIT license.
465
+ * See the LICENSE file in the root directory of this source tree.
466
+ */
467
+ const __iconNode$I = [["path", { d: "M7 7m0 2.667a2.667 2.667 0 0 1 2.667 -2.667h8.666a2.667 2.667 0 0 1 2.667 2.667v8.666a2.667 2.667 0 0 1 -2.667 2.667h-8.666a2.667 2.667 0 0 1 -2.667 -2.667z", key: "svg-0" }], ["path", { d: "M4.012 16.737a2.005 2.005 0 0 1 -1.012 -1.737v-10c0 -1.1 .9 -2 2 -2h10c.75 0 1.158 .385 1.5 1", key: "svg-1" }]], IconCopy = createReactComponent("outline", "copy", "Copy", __iconNode$I);
468
+ /**
469
+ * @license @tabler/icons-react v3.34.1 - MIT
470
+ *
471
+ * This source code is licensed under the MIT license.
472
+ * See the LICENSE file in the root directory of this source tree.
473
+ */
474
+ const __iconNode$H = [["path", { d: "M12 6m-7 0a7 3 0 1 0 14 0a7 3 0 1 0 -14 0", key: "svg-0" }], ["path", { d: "M5 6v12c0 1.657 3.134 3 7 3s7 -1.343 7 -3v-12", key: "svg-1" }]], IconCylinder = createReactComponent("outline", "cylinder", "Cylinder", __iconNode$H);
475
+ /**
476
+ * @license @tabler/icons-react v3.34.1 - MIT
477
+ *
478
+ * This source code is licensed under the MIT license.
479
+ * See the LICENSE file in the root directory of this source tree.
480
+ */
481
+ const __iconNode$G = [["path", { d: "M6 5a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v14a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2v-14z", key: "svg-0" }], ["path", { d: "M11 4h2", key: "svg-1" }], ["path", { d: "M12 17v.01", key: "svg-2" }]], IconDeviceMobile = createReactComponent("outline", "device-mobile", "DeviceMobile", __iconNode$G);
482
+ /**
483
+ * @license @tabler/icons-react v3.34.1 - MIT
484
+ *
485
+ * This source code is licensed under the MIT license.
486
+ * See the LICENSE file in the root directory of this source tree.
487
+ */
488
+ const __iconNode$F = [["path", { d: "M12 6h-6a2 2 0 0 0 -2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2 -2v-6", key: "svg-0" }], ["path", { d: "M11 13l9 -9", key: "svg-1" }], ["path", { d: "M15 4h5v5", key: "svg-2" }]], IconExternalLink = createReactComponent("outline", "external-link", "ExternalLink", __iconNode$F);
489
+ /**
490
+ * @license @tabler/icons-react v3.34.1 - MIT
491
+ *
492
+ * This source code is licensed under the MIT license.
493
+ * See the LICENSE file in the root directory of this source tree.
494
+ */
495
+ const __iconNode$E = [["path", { d: "M14 3v4a1 1 0 0 0 1 1h4", key: "svg-0" }], ["path", { d: "M17 21h-10a2 2 0 0 1 -2 -2v-14a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2z", key: "svg-1" }], ["path", { d: "M10 13l-1 2l1 2", key: "svg-2" }], ["path", { d: "M14 13l1 2l-1 2", key: "svg-3" }]], IconFileCode = createReactComponent("outline", "file-code", "FileCode", __iconNode$E);
496
+ /**
497
+ * @license @tabler/icons-react v3.34.1 - MIT
498
+ *
499
+ * This source code is licensed under the MIT license.
500
+ * See the LICENSE file in the root directory of this source tree.
501
+ */
502
+ const __iconNode$D = [["path", { d: "M4 21v-4a3 3 0 0 1 3 -3h5", key: "svg-0" }], ["path", { d: "M9 17l3 -3l-3 -3", key: "svg-1" }], ["path", { d: "M14 3v4a1 1 0 0 0 1 1h4", key: "svg-2" }], ["path", { d: "M5 11v-6a2 2 0 0 1 2 -2h7l5 5v11a2 2 0 0 1 -2 2h-9.5", key: "svg-3" }]], IconFileSymlink = createReactComponent("outline", "file-symlink", "FileSymlink", __iconNode$D);
503
+ /**
504
+ * @license @tabler/icons-react v3.34.1 - MIT
505
+ *
506
+ * This source code is licensed under the MIT license.
507
+ * See the LICENSE file in the root directory of this source tree.
508
+ */
509
+ const __iconNode$C = [["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0" }], ["path", { d: "M4 8v-2a2 2 0 0 1 2 -2h2", key: "svg-1" }], ["path", { d: "M4 16v2a2 2 0 0 0 2 2h2", key: "svg-2" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v2", key: "svg-3" }], ["path", { d: "M16 20h2a2 2 0 0 0 2 -2v-2", key: "svg-4" }]], IconFocusCentered = createReactComponent("outline", "focus-centered", "FocusCentered", __iconNode$C);
510
+ /**
511
+ * @license @tabler/icons-react v3.34.1 - MIT
512
+ *
513
+ * This source code is licensed under the MIT license.
514
+ * See the LICENSE file in the root directory of this source tree.
515
+ */
516
+ const __iconNode$B = [["path", { d: "M5 19l2.757 -7.351a1 1 0 0 1 .936 -.649h12.307a1 1 0 0 1 .986 1.164l-.996 5.211a2 2 0 0 1 -1.964 1.625h-14.026a2 2 0 0 1 -2 -2v-11a2 2 0 0 1 2 -2h4l3 3h7a2 2 0 0 1 2 2v2", key: "svg-0" }]], IconFolderOpen = createReactComponent("outline", "folder-open", "FolderOpen", __iconNode$B);
517
+ /**
518
+ * @license @tabler/icons-react v3.34.1 - MIT
519
+ *
520
+ * This source code is licensed under the MIT license.
521
+ * See the LICENSE file in the root directory of this source tree.
522
+ */
523
+ const __iconNode$A = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M12 16v.01", key: "svg-1" }], ["path", { d: "M12 13a2 2 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483", key: "svg-2" }]], IconHelpCircle = createReactComponent("outline", "help-circle", "HelpCircle", __iconNode$A);
524
+ /**
525
+ * @license @tabler/icons-react v3.34.1 - MIT
526
+ *
527
+ * This source code is licensed under the MIT license.
528
+ * See the LICENSE file in the root directory of this source tree.
529
+ */
530
+ const __iconNode$z = [["path", { d: "M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v10a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z", key: "svg-0" }], ["path", { d: "M9 10m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", key: "svg-1" }], ["path", { d: "M15 8l2 0", key: "svg-2" }], ["path", { d: "M15 12l2 0", key: "svg-3" }], ["path", { d: "M7 16l10 0", key: "svg-4" }]], IconId = createReactComponent("outline", "id", "Id", __iconNode$z);
531
+ /**
532
+ * @license @tabler/icons-react v3.34.1 - MIT
533
+ *
534
+ * This source code is licensed under the MIT license.
535
+ * See the LICENSE file in the root directory of this source tree.
536
+ */
537
+ const __iconNode$y = [["path", { d: "M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0", key: "svg-0" }], ["path", { d: "M12 9h.01", key: "svg-1" }], ["path", { d: "M11 12h1v4h1", key: "svg-2" }]], IconInfoCircle = createReactComponent("outline", "info-circle", "InfoCircle", __iconNode$y);
538
+ /**
539
+ * @license @tabler/icons-react v3.34.1 - MIT
540
+ *
541
+ * This source code is licensed under the MIT license.
542
+ * See the LICENSE file in the root directory of this source tree.
543
+ */
544
+ const __iconNode$x = [["path", { d: "M4 20l16 0", key: "svg-0" }], ["path", { d: "M9 4m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z", key: "svg-1" }]], IconLayoutAlignBottom = createReactComponent("outline", "layout-align-bottom", "LayoutAlignBottom", __iconNode$x);
545
+ /**
546
+ * @license @tabler/icons-react v3.34.1 - MIT
547
+ *
548
+ * This source code is licensed under the MIT license.
549
+ * See the LICENSE file in the root directory of this source tree.
550
+ */
551
+ const __iconNode$w = [["path", { d: "M12 4l0 5", key: "svg-0" }], ["path", { d: "M12 15l0 5", key: "svg-1" }], ["path", { d: "M6 9m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z", key: "svg-2" }]], IconLayoutAlignCenter = createReactComponent("outline", "layout-align-center", "LayoutAlignCenter", __iconNode$w);
552
+ /**
553
+ * @license @tabler/icons-react v3.34.1 - MIT
554
+ *
555
+ * This source code is licensed under the MIT license.
556
+ * See the LICENSE file in the root directory of this source tree.
557
+ */
558
+ const __iconNode$v = [["path", { d: "M4 4l0 16", key: "svg-0" }], ["path", { d: "M8 9m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z", key: "svg-1" }]], IconLayoutAlignLeft = createReactComponent("outline", "layout-align-left", "LayoutAlignLeft", __iconNode$v);
559
+ /**
560
+ * @license @tabler/icons-react v3.34.1 - MIT
561
+ *
562
+ * This source code is licensed under the MIT license.
563
+ * See the LICENSE file in the root directory of this source tree.
564
+ */
565
+ const __iconNode$u = [["path", { d: "M4 12l5 0", key: "svg-0" }], ["path", { d: "M15 12l5 0", key: "svg-1" }], ["path", { d: "M9 6m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z", key: "svg-2" }]], IconLayoutAlignMiddle = createReactComponent("outline", "layout-align-middle", "LayoutAlignMiddle", __iconNode$u);
566
+ /**
567
+ * @license @tabler/icons-react v3.34.1 - MIT
568
+ *
569
+ * This source code is licensed under the MIT license.
570
+ * See the LICENSE file in the root directory of this source tree.
571
+ */
572
+ const __iconNode$t = [["path", { d: "M20 4l0 16", key: "svg-0" }], ["path", { d: "M4 9m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z", key: "svg-1" }]], IconLayoutAlignRight = createReactComponent("outline", "layout-align-right", "LayoutAlignRight", __iconNode$t);
573
+ /**
574
+ * @license @tabler/icons-react v3.34.1 - MIT
575
+ *
576
+ * This source code is licensed under the MIT license.
577
+ * See the LICENSE file in the root directory of this source tree.
578
+ */
579
+ const __iconNode$s = [["path", { d: "M4 4l16 0", key: "svg-0" }], ["path", { d: "M9 8m0 2a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v8a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2z", key: "svg-1" }]], IconLayoutAlignTop = createReactComponent("outline", "layout-align-top", "LayoutAlignTop", __iconNode$s);
580
+ /**
581
+ * @license @tabler/icons-react v3.34.1 - MIT
582
+ *
583
+ * This source code is licensed under the MIT license.
584
+ * See the LICENSE file in the root directory of this source tree.
585
+ */
586
+ const __iconNode$r = [["path", { d: "M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z", key: "svg-0" }], ["path", { d: "M4 12h8", key: "svg-1" }], ["path", { d: "M12 15h8", key: "svg-2" }], ["path", { d: "M12 9h8", key: "svg-3" }], ["path", { d: "M12 4v16", key: "svg-4" }]], IconLayoutBoardSplit = createReactComponent("outline", "layout-board-split", "LayoutBoardSplit", __iconNode$r);
587
+ /**
588
+ * @license @tabler/icons-react v3.34.1 - MIT
589
+ *
590
+ * This source code is licensed under the MIT license.
591
+ * See the LICENSE file in the root directory of this source tree.
592
+ */
593
+ const __iconNode$q = [["path", { d: "M4 4m0 2a2 2 0 0 1 2 -2h12a2 2 0 0 1 2 2v12a2 2 0 0 1 -2 2h-12a2 2 0 0 1 -2 -2z", key: "svg-0" }], ["path", { d: "M10 4l4 16", key: "svg-1" }], ["path", { d: "M12 12l-8 2", key: "svg-2" }]], IconLayoutCollage = createReactComponent("outline", "layout-collage", "LayoutCollage", __iconNode$q);
594
+ /**
595
+ * @license @tabler/icons-react v3.34.1 - MIT
596
+ *
597
+ * This source code is licensed under the MIT license.
598
+ * See the LICENSE file in the root directory of this source tree.
599
+ */
600
+ const __iconNode$p = [["path", { d: "M5 4h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1", key: "svg-0" }], ["path", { d: "M5 16h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1", key: "svg-1" }], ["path", { d: "M15 12h4a1 1 0 0 1 1 1v6a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-6a1 1 0 0 1 1 -1", key: "svg-2" }], ["path", { d: "M15 4h4a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-4a1 1 0 0 1 -1 -1v-2a1 1 0 0 1 1 -1", key: "svg-3" }]], IconLayoutDashboard = createReactComponent("outline", "layout-dashboard", "LayoutDashboard", __iconNode$p);
601
+ /**
602
+ * @license @tabler/icons-react v3.34.1 - MIT
603
+ *
604
+ * This source code is licensed under the MIT license.
605
+ * See the LICENSE file in the root directory of this source tree.
606
+ */
607
+ const __iconNode$o = [["path", { d: "M9 15l6 -6", key: "svg-0" }], ["path", { d: "M11 6l.463 -.536a5 5 0 0 1 7.071 7.072l-.534 .464", key: "svg-1" }], ["path", { d: "M13 18l-.397 .534a5.068 5.068 0 0 1 -7.127 0a4.972 4.972 0 0 1 0 -7.071l.524 -.463", key: "svg-2" }]], IconLink = createReactComponent("outline", "link", "Link", __iconNode$o);
608
+ /**
609
+ * @license @tabler/icons-react v3.34.1 - MIT
610
+ *
611
+ * This source code is licensed under the MIT license.
612
+ * See the LICENSE file in the root directory of this source tree.
613
+ */
614
+ const __iconNode$n = [["path", { d: "M3 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2z", key: "svg-0" }], ["path", { d: "M9 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0", key: "svg-1" }], ["path", { d: "M13 11v-4a4 4 0 1 1 8 0v4", key: "svg-2" }]], IconLockOpen2 = createReactComponent("outline", "lock-open-2", "LockOpen2", __iconNode$n);
615
+ /**
616
+ * @license @tabler/icons-react v3.34.1 - MIT
617
+ *
618
+ * This source code is licensed under the MIT license.
619
+ * See the LICENSE file in the root directory of this source tree.
620
+ */
621
+ const __iconNode$m = [["path", { d: "M5 13a2 2 0 0 1 2 -2h10a2 2 0 0 1 2 2v6a2 2 0 0 1 -2 2h-10a2 2 0 0 1 -2 -2v-6z", key: "svg-0" }], ["path", { d: "M11 16a1 1 0 1 0 2 0a1 1 0 0 0 -2 0", key: "svg-1" }], ["path", { d: "M8 11v-4a4 4 0 1 1 8 0v4", key: "svg-2" }]], IconLock = createReactComponent("outline", "lock", "Lock", __iconNode$m);
622
+ /**
623
+ * @license @tabler/icons-react v3.34.1 - MIT
624
+ *
625
+ * This source code is licensed under the MIT license.
626
+ * See the LICENSE file in the root directory of this source tree.
627
+ */
628
+ const __iconNode$l = [["path", { d: "M4 6l16 0", key: "svg-0" }], ["path", { d: "M4 12l16 0", key: "svg-1" }], ["path", { d: "M4 18l16 0", key: "svg-2" }]], IconMenu2 = createReactComponent("outline", "menu-2", "Menu2", __iconNode$l);
629
+ /**
630
+ * @license @tabler/icons-react v3.34.1 - MIT
631
+ *
632
+ * This source code is licensed under the MIT license.
633
+ * See the LICENSE file in the root directory of this source tree.
634
+ */
635
+ const __iconNode$k = [["path", { d: "M4 8l16 0", key: "svg-0" }], ["path", { d: "M4 16l16 0", key: "svg-1" }]], IconMenu = createReactComponent("outline", "menu", "Menu", __iconNode$k);
636
+ /**
637
+ * @license @tabler/icons-react v3.34.1 - MIT
638
+ *
639
+ * This source code is licensed under the MIT license.
640
+ * See the LICENSE file in the root directory of this source tree.
641
+ */
642
+ const __iconNode$j = [["path", { d: "M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z", key: "svg-0" }], ["path", { d: "M17 4a2 2 0 0 0 2 2a2 2 0 0 0 -2 2a2 2 0 0 0 -2 -2a2 2 0 0 0 2 -2", key: "svg-1" }], ["path", { d: "M19 11h2m-1 -1v2", key: "svg-2" }]], IconMoonStars = createReactComponent("outline", "moon-stars", "MoonStars", __iconNode$j);
643
+ /**
644
+ * @license @tabler/icons-react v3.34.1 - MIT
645
+ *
646
+ * This source code is licensed under the MIT license.
647
+ * See the LICENSE file in the root directory of this source tree.
648
+ */
649
+ const __iconNode$i = [["path", { d: "M21 14.008v-5.018a1.98 1.98 0 0 0 -1 -1.717l-4 -2.008a2.016 2.016 0 0 0 -2 0l-10 5.008c-.619 .355 -1 1.01 -1 1.718v5.018c0 .709 .381 1.363 1 1.717l4 2.008a2.016 2.016 0 0 0 2 0l10 -5.008c.619 -.355 1 -1.01 1 -1.718z", key: "svg-0" }], ["path", { d: "M9 21v-7.5", key: "svg-1" }], ["path", { d: "M9 13.5l11.5 -5.5", key: "svg-2" }], ["path", { d: "M3.5 11l5.5 2.5", key: "svg-3" }]], IconRectangularPrism = createReactComponent("outline", "rectangular-prism", "RectangularPrism", __iconNode$i);
650
+ /**
651
+ * @license @tabler/icons-react v3.34.1 - MIT
652
+ *
653
+ * This source code is licensed under the MIT license.
654
+ * See the LICENSE file in the root directory of this source tree.
655
+ */
656
+ const __iconNode$h = [["path", { d: "M3 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z", key: "svg-0" }], ["path", { d: "M10 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z", key: "svg-1" }], ["path", { d: "M17 15m0 1a1 1 0 0 1 1 -1h2a1 1 0 0 1 1 1v2a1 1 0 0 1 -1 1h-2a1 1 0 0 1 -1 -1z", key: "svg-2" }], ["path", { d: "M5 11v-3a3 3 0 0 1 3 -3h8a3 3 0 0 1 3 3v3", key: "svg-3" }], ["path", { d: "M16.5 8.5l2.5 2.5l2.5 -2.5", key: "svg-4" }]], IconReorder = createReactComponent("outline", "reorder", "Reorder", __iconNode$h);
657
+ /**
658
+ * @license @tabler/icons-react v3.34.1 - MIT
659
+ *
660
+ * This source code is licensed under the MIT license.
661
+ * See the LICENSE file in the root directory of this source tree.
662
+ */
663
+ const __iconNode$g = [["path", { d: "M6 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", key: "svg-0" }], ["path", { d: "M18 5m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0", key: "svg-1" }], ["path", { d: "M12 19h4.5c.71 0 1.372 -.212 1.924 -.576m1.545 -2.459a3.5 3.5 0 0 0 -3.469 -3.965h-.499m-4 0h-3.501a3.5 3.5 0 0 1 -2.477 -5.972m2.477 -1.028h3.5", key: "svg-2" }], ["path", { d: "M3 3l18 18", key: "svg-3" }]], IconRouteOff = createReactComponent("outline", "route-off", "RouteOff", __iconNode$g);
664
+ /**
665
+ * @license @tabler/icons-react v3.34.1 - MIT
666
+ *
667
+ * This source code is licensed under the MIT license.
668
+ * See the LICENSE file in the root directory of this source tree.
669
+ */
670
+ const __iconNode$f = [["path", { d: "M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0", key: "svg-0" }], ["path", { d: "M21 21l-6 -6", key: "svg-1" }]], IconSearch = createReactComponent("outline", "search", "Search", __iconNode$f);
671
+ /**
672
+ * @license @tabler/icons-react v3.34.1 - MIT
673
+ *
674
+ * This source code is licensed under the MIT license.
675
+ * See the LICENSE file in the root directory of this source tree.
676
+ */
677
+ const __iconNode$e = [["path", { d: "M8 9l4 -4l4 4", key: "svg-0" }], ["path", { d: "M16 15l-4 4l-4 -4", key: "svg-1" }]], IconSelector = createReactComponent("outline", "selector", "Selector", __iconNode$e);
678
+ /**
679
+ * @license @tabler/icons-react v3.34.1 - MIT
680
+ *
681
+ * This source code is licensed under the MIT license.
682
+ * See the LICENSE file in the root directory of this source tree.
683
+ */
684
+ const __iconNode$d = [["path", { d: "M6 12m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-0" }], ["path", { d: "M18 6m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-1" }], ["path", { d: "M18 18m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0", key: "svg-2" }], ["path", { d: "M8.7 10.7l6.6 -3.4", key: "svg-3" }], ["path", { d: "M8.7 13.3l6.6 3.4", key: "svg-4" }]], IconShare = createReactComponent("outline", "share", "Share", __iconNode$d);
685
+ /**
686
+ * @license @tabler/icons-react v3.34.1 - MIT
687
+ *
688
+ * This source code is licensed under the MIT license.
689
+ * See the LICENSE file in the root directory of this source tree.
690
+ */
691
+ const __iconNode$c = [["path", { d: "M12 4l-8 4l8 4l8 -4l-8 -4", key: "svg-0" }], ["path", { d: "M4 12l8 4l8 -4", key: "svg-1" }], ["path", { d: "M4 16l8 4l8 -4", key: "svg-2" }]], IconStack2 = createReactComponent("outline", "stack-2", "Stack2", __iconNode$c);
692
+ /**
693
+ * @license @tabler/icons-react v3.34.1 - MIT
694
+ *
695
+ * This source code is licensed under the MIT license.
696
+ * See the LICENSE file in the root directory of this source tree.
697
+ */
698
+ const __iconNode$b = [["path", { d: "M12 12m-4 0a4 4 0 1 0 8 0a4 4 0 1 0 -8 0", key: "svg-0" }], ["path", { d: "M3 12h1m8 -9v1m8 8h1m-9 8v1m-6.4 -15.4l.7 .7m12.1 -.7l-.7 .7m0 11.4l.7 .7m-12.1 -.7l-.7 .7", key: "svg-1" }]], IconSun = createReactComponent("outline", "sun", "Sun", __iconNode$b);
699
+ /**
700
+ * @license @tabler/icons-react v3.34.1 - MIT
701
+ *
702
+ * This source code is licensed under the MIT license.
703
+ * See the LICENSE file in the root directory of this source tree.
704
+ */
705
+ const __iconNode$a = [["path", { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0", key: "svg-0" }], ["path", { d: "M12 12m-5 0a5 5 0 1 0 10 0a5 5 0 1 0 -10 0", key: "svg-1" }], ["path", { d: "M12 12m-9 0a9 9 0 1 0 18 0a9 9 0 1 0 -18 0", key: "svg-2" }]], IconTarget = createReactComponent("outline", "target", "Target", __iconNode$a);
706
+ /**
707
+ * @license @tabler/icons-react v3.34.1 - MIT
708
+ *
709
+ * This source code is licensed under the MIT license.
710
+ * See the LICENSE file in the root directory of this source tree.
711
+ */
712
+ const __iconNode$9 = [["path", { d: "M3 6a3 3 0 1 0 6 0a3 3 0 0 0 -6 0", key: "svg-0" }], ["path", { d: "M21 11v-3a2 2 0 0 0 -2 -2h-6l3 3m0 -6l-3 3", key: "svg-1" }], ["path", { d: "M3 13v3a2 2 0 0 0 2 2h6l-3 -3m0 6l3 -3", key: "svg-2" }], ["path", { d: "M15 18a3 3 0 1 0 6 0a3 3 0 0 0 -6 0", key: "svg-3" }]], IconTransform = createReactComponent("outline", "transform", "Transform", __iconNode$9);
713
+ /**
714
+ * @license @tabler/icons-react v3.34.1 - MIT
715
+ *
716
+ * This source code is licensed under the MIT license.
717
+ * See the LICENSE file in the root directory of this source tree.
718
+ */
719
+ const __iconNode$8 = [["path", { d: "M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0", key: "svg-0" }], ["path", { d: "M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2", key: "svg-1" }]], IconUser = createReactComponent("outline", "user", "User", __iconNode$8);
720
+ /**
721
+ * @license @tabler/icons-react v3.34.1 - MIT
722
+ *
723
+ * This source code is licensed under the MIT license.
724
+ * See the LICENSE file in the root directory of this source tree.
725
+ */
726
+ const __iconNode$7 = [["path", { d: "M18 6l-12 12", key: "svg-0" }], ["path", { d: "M6 6l12 12", key: "svg-1" }]], IconX = createReactComponent("outline", "x", "X", __iconNode$7);
727
+ /**
728
+ * @license @tabler/icons-react v3.34.1 - MIT
729
+ *
730
+ * This source code is licensed under the MIT license.
731
+ * See the LICENSE file in the root directory of this source tree.
732
+ */
733
+ const __iconNode$6 = [["path", { d: "M4 8v-2a2 2 0 0 1 2 -2h2", key: "svg-0" }], ["path", { d: "M4 16v2a2 2 0 0 0 2 2h2", key: "svg-1" }], ["path", { d: "M16 4h2a2 2 0 0 1 2 2v2", key: "svg-2" }], ["path", { d: "M16 20h2a2 2 0 0 0 2 -2v-2", key: "svg-3" }], ["path", { d: "M8 11a3 3 0 1 0 6 0a3 3 0 0 0 -6 0", key: "svg-4" }], ["path", { d: "M16 16l-2.5 -2.5", key: "svg-5" }]], IconZoomScan = createReactComponent("outline", "zoom-scan", "ZoomScan", __iconNode$6);
734
+ /**
735
+ * @license @tabler/icons-react v3.34.1 - MIT
736
+ *
737
+ * This source code is licensed under the MIT license.
738
+ * See the LICENSE file in the root directory of this source tree.
739
+ */
740
+ const __iconNode$5 = [["path", { d: "M9 3a1 1 0 0 1 .608 .206l.1 .087l2.706 2.707h6.586a3 3 0 0 1 2.995 2.824l.005 .176v8a3 3 0 0 1 -2.824 2.995l-.176 .005h-14a3 3 0 0 1 -2.995 -2.824l-.005 -.176v-11a3 3 0 0 1 2.824 -2.995l.176 -.005h4z", key: "svg-0" }]], IconFolderFilled = createReactComponent("filled", "folder-filled", "FolderFilled", __iconNode$5);
741
+ /**
742
+ * @license @tabler/icons-react v3.34.1 - MIT
743
+ *
744
+ * This source code is licensed under the MIT license.
745
+ * See the LICENSE file in the root directory of this source tree.
746
+ */
747
+ const __iconNode$4 = [["path", { d: "M6 4v16a1 1 0 0 0 1.524 .852l13 -8a1 1 0 0 0 0 -1.704l-13 -8a1 1 0 0 0 -1.524 .852z", key: "svg-0" }]], IconPlayerPlayFilled = createReactComponent("filled", "player-play-filled", "PlayerPlayFilled", __iconNode$4);
748
+ /**
749
+ * @license @tabler/icons-react v3.34.1 - MIT
750
+ *
751
+ * This source code is licensed under the MIT license.
752
+ * See the LICENSE file in the root directory of this source tree.
753
+ */
754
+ const __iconNode$3 = [["path", { d: "M19.496 4.136l-12 7a1 1 0 0 0 0 1.728l12 7a1 1 0 0 0 1.504 -.864v-14a1 1 0 0 0 -1.504 -.864z", key: "svg-0" }], ["path", { d: "M4 4a1 1 0 0 1 .993 .883l.007 .117v14a1 1 0 0 1 -1.993 .117l-.007 -.117v-14a1 1 0 0 1 1 -1z", key: "svg-1" }]], IconPlayerSkipBackFilled = createReactComponent("filled", "player-skip-back-filled", "PlayerSkipBackFilled", __iconNode$3);
755
+ /**
756
+ * @license @tabler/icons-react v3.34.1 - MIT
757
+ *
758
+ * This source code is licensed under the MIT license.
759
+ * See the LICENSE file in the root directory of this source tree.
760
+ */
761
+ const __iconNode$2 = [["path", { d: "M3 5v14a1 1 0 0 0 1.504 .864l12 -7a1 1 0 0 0 0 -1.728l-12 -7a1 1 0 0 0 -1.504 .864z", key: "svg-0" }], ["path", { d: "M20 4a1 1 0 0 1 .993 .883l.007 .117v14a1 1 0 0 1 -1.993 .117l-.007 -.117v-14a1 1 0 0 1 1 -1z", key: "svg-1" }]], IconPlayerSkipForwardFilled = createReactComponent("filled", "player-skip-forward-filled", "PlayerSkipForwardFilled", __iconNode$2);
762
+ /**
763
+ * @license @tabler/icons-react v3.34.1 - MIT
764
+ *
765
+ * This source code is licensed under the MIT license.
766
+ * See the LICENSE file in the root directory of this source tree.
767
+ */
768
+ const __iconNode$1 = [["path", { d: "M17 4h-10a3 3 0 0 0 -3 3v10a3 3 0 0 0 3 3h10a3 3 0 0 0 3 -3v-10a3 3 0 0 0 -3 -3z", key: "svg-0" }]], IconPlayerStopFilled = createReactComponent("filled", "player-stop-filled", "PlayerStopFilled", __iconNode$1);
769
+ /**
770
+ * @license @tabler/icons-react v3.34.1 - MIT
771
+ *
772
+ * This source code is licensed under the MIT license.
773
+ * See the LICENSE file in the root directory of this source tree.
774
+ */
775
+ const __iconNode = [["path", { d: "M8.243 7.34l-6.38 .925l-.113 .023a1 1 0 0 0 -.44 1.684l4.622 4.499l-1.09 6.355l-.013 .11a1 1 0 0 0 1.464 .944l5.706 -3l5.693 3l.1 .046a1 1 0 0 0 1.352 -1.1l-1.091 -6.355l4.624 -4.5l.078 -.085a1 1 0 0 0 -.633 -1.62l-6.38 -.926l-2.852 -5.78a1 1 0 0 0 -1.794 0l-2.853 5.78z", key: "svg-0" }]], IconStarFilled = createReactComponent("filled", "star-filled", "StarFilled", __iconNode), IconRendererContext = createContext(null);
340
776
  function IconRendererProvider({
341
777
  value,
342
778
  children
@@ -404,7 +840,7 @@ const HandlerNames = [
404
840
  "onChange",
405
841
  "onCanvasDblClick"
406
842
  ], DiagramEventHandlersReactContext = createContext({
407
- ...l(HandlerNames, (name) => [name, null]),
843
+ ...t(HandlerNames, (name) => [name, null]),
408
844
  handlersRef: {
409
845
  current: {}
410
846
  }
@@ -413,8 +849,8 @@ function DiagramEventHandlers({
413
849
  handlers,
414
850
  children
415
851
  }) {
416
- const handlersRef = useSyncedRef(handlers), deps = HandlerNames.map((name) => t(handlers[name])), value = useMemo(() => ({
417
- ...l(HandlerNames, (name) => handlersRef.current[name] ? [name, (...args) => {
852
+ const handlersRef = useSyncedRef(handlers), deps = HandlerNames.map((name) => e(handlers[name])), value = useMemo(() => ({
853
+ ...t(HandlerNames, (name) => handlersRef.current[name] ? [name, (...args) => {
418
854
  var _a, _b;
419
855
  return (_b = (_a = handlersRef.current)[name]) == null ? void 0 : _b.call(_a, ...args);
420
856
  }] : [name, null]),
@@ -445,7 +881,7 @@ const FeatureNames = [
445
881
  */
446
882
  "Vscode",
447
883
  "ElementTags"
448
- ], AllDisabled = l(
884
+ ], AllDisabled = t(
449
885
  FeatureNames,
450
886
  (name) => [`enable${name}`, !1]
451
887
  ), DiagramFeaturesContext = createContext(AllDisabled), validate = (features) => {
@@ -706,14 +1142,14 @@ const TagStylesContext = createContext({}), radixColors = [
706
1142
  function TagStylesProvider({ children, rootSelector }) {
707
1143
  const tags = useLikeC4Specification().tags, { specs, stylesheet } = useDeepCompareMemo(() => tags ? {
708
1144
  specs: tags,
709
- stylesheet: C(
710
- t$1(tags),
711
- u(([tag, spec]) => [
1145
+ stylesheet: t$1(
1146
+ t$4(tags),
1147
+ t$3(([tag, spec]) => [
712
1148
  `:is(${rootSelector} [data-likec4-tag="${tag}"]) {`,
713
1149
  generateColorVars(spec),
714
1150
  "}"
715
1151
  ]),
716
- r(`
1152
+ t$2(`
717
1153
  `)
718
1154
  )
719
1155
  } : { specs: {}, stylesheet: "" }, [tags, rootSelector]);
@@ -762,14 +1198,18 @@ function useRootContainer() {
762
1198
  const [
763
1199
  ControlsCustomLayoutProvider,
764
1200
  useControlsCustomLayout
765
- ] = createOptionalContext(null), noop = () => {
1201
+ ] = createOptionalContext(null);
1202
+ function useId() {
1203
+ return useId$1().replace("mantine-", "likec4-");
1204
+ }
1205
+ const noop = () => {
766
1206
  }, depsShallowEqual = (d1, d2) => {
767
1207
  if (d1 === d2)
768
1208
  return !0;
769
1209
  if (d1.length !== d2.length)
770
1210
  return !1;
771
- for (const [i2, element] of d1.entries())
772
- if (element !== d2[i2] && !shallowEqual(element, d2[i2]))
1211
+ for (const [i, element] of d1.entries())
1212
+ if (element !== d2[i] && !shallowEqual(element, d2[i]))
773
1213
  return !1;
774
1214
  return !0;
775
1215
  };
@@ -799,7 +1239,7 @@ function useIsZoomTooSmall() {
799
1239
  }
800
1240
  function getDevicePixelRatio() {
801
1241
  const dpr = typeof window < "u" && typeof window.devicePixelRatio == "number" ? window.devicePixelRatio : 1;
802
- return u$1(Math.floor(dpr), {
1242
+ return t$5(Math.floor(dpr), {
803
1243
  min: 1,
804
1244
  max: 4
805
1245
  });
@@ -814,21 +1254,21 @@ function bezierControlPoints(diagramEdge) {
814
1254
  const handles = [
815
1255
  // start
816
1256
  ];
817
- for (; i(bezierPoints, 3); ) {
1257
+ for (; t$6(bezierPoints, 3); ) {
818
1258
  const [cp1, cp2, end, ...rest] = bezierPoints, bezier = new Bezier(start[0], start[1], cp1[0], cp1[1], cp2[0], cp2[1], end[0], end[1]), inflections = bezier.inflections();
819
1259
  inflections.length === 0 && inflections.push(0.5), inflections.forEach((t2) => {
820
- const { x, y: y2 } = bezier.get(t2);
1260
+ const { x, y } = bezier.get(t2);
821
1261
  handles.push({
822
1262
  x: Math.round(x),
823
- y: Math.round(y2)
1263
+ y: Math.round(y)
824
1264
  });
825
1265
  }), bezierPoints = rest, start = end;
826
1266
  }
827
1267
  return invariant(bezierPoints.length === 0, "all points should be consumed"), handles;
828
1268
  }
829
- const isClose = (a2, b) => Math.abs(a2 - b) < 3.1;
830
- function isSamePoint(a2, b) {
831
- const [ax, ay] = o(a2) ? a2 : [a2.x, a2.y], [bx, by] = o(b) ? b : [b.x, b.y];
1269
+ const isClose = (a, b) => Math.abs(a - b) < 3.1;
1270
+ function isSamePoint(a, b) {
1271
+ const [ax, ay] = e$1(a) ? a : [a.x, a.y], [bx, by] = e$1(b) ? b : [b.x, b.y];
832
1272
  return isClose(ax, bx) && isClose(ay, by);
833
1273
  }
834
1274
  function stopPropagation(e2) {
@@ -845,7 +1285,7 @@ function bezierPath(bezierSpline) {
845
1285
  let [start, ...points] = bezierSpline;
846
1286
  invariant(start, "start should be defined");
847
1287
  let path = `M ${start[0]},${start[1]}`;
848
- for (; i(points, 3); ) {
1288
+ for (; t$6(points, 3); ) {
849
1289
  const [cp1, cp2, end, ...rest] = points;
850
1290
  path = path + ` C ${cp1[0]},${cp1[1]} ${cp2[0]},${cp2[1]} ${end[0]},${end[1]}`, points = rest;
851
1291
  }
@@ -898,7 +1338,7 @@ var Base;
898
1338
  }
899
1339
  Base2.setHovered = setHovered;
900
1340
  function _setData(value, state) {
901
- return j(value.data, state) ? value : {
1341
+ return n(value.data, state) ? value : {
902
1342
  ...value,
903
1343
  data: {
904
1344
  ...value.data,
@@ -986,9 +1426,9 @@ const BaseXYFlow = ({
986
1426
  selectNodesOnDrag: !1,
987
1427
  onNodesChange,
988
1428
  onEdgesChange,
989
- onMoveEnd: useCallbackRef((event, { x, y: y2, zoom }) => {
990
- const roundedX = roundDpr(x), roundedY = roundDpr(y2);
991
- (x !== roundedX || y2 !== roundedY) && xystore.setState({ transform: [roundedX, roundedY, zoom] }), onMoveEnd == null || onMoveEnd(event, { x: roundedX, y: roundedY, zoom });
1429
+ onMoveEnd: useCallbackRef((event, { x, y, zoom }) => {
1430
+ const roundedX = roundDpr(x), roundedY = roundDpr(y);
1431
+ (x !== roundedX || y !== roundedY) && xystore.setState({ transform: [roundedX, roundedY, zoom] }), onMoveEnd == null || onMoveEnd(event, { x: roundedX, y: roundedY, zoom });
992
1432
  }),
993
1433
  onNodeMouseEnter: useCallbackRef((_event, node2) => {
994
1434
  if (onNodeMouseEnter) {
@@ -1728,18 +2168,18 @@ function CompoundNodeContainer({
1728
2168
  style: style2,
1729
2169
  ...rest
1730
2170
  }) {
1731
- let opacity = u$1(data.style.opacity ?? 100, {
2171
+ let opacity = t$5(data.style.opacity ?? 100, {
1732
2172
  min: 0,
1733
2173
  max: 100
1734
2174
  });
1735
- const isTransparent = opacity < 99, MIN_OPACITY = 65, borderOpacity = MIN_OPACITY + u$1((100 - MIN_OPACITY) * (opacity / 100), {
2175
+ const isTransparent = opacity < 99, MIN_OPACITY = 65, borderOpacity = MIN_OPACITY + t$5((100 - MIN_OPACITY) * (opacity / 100), {
1736
2176
  min: 0,
1737
2177
  max: 100 - MIN_OPACITY
1738
2178
  }), compoundClass = compoundNode({
1739
2179
  isTransparent,
1740
2180
  inverseColor: opacity < 60,
1741
2181
  borderStyle: data.style.border ?? (isTransparent ? "dashed" : "none")
1742
- }), depth = u$1(data.depth ?? 1, {
2182
+ }), depth = t$5(data.depth ?? 1, {
1743
2183
  min: 1,
1744
2184
  max: 5
1745
2185
  });
@@ -1782,7 +2222,7 @@ function CompoundTitle({ id, data }) {
1782
2222
  /* @__PURE__ */ jsx(Text, { component: "h3", className: "likec4-compound-title", truncate: "end", children: data.title })
1783
2223
  ] });
1784
2224
  }
1785
- const isSame = (a2, b) => Math.abs(a2 - b) < 2.5, edgePropsEqual = (prev, next) => prev.id === next.id && deepEqual(prev.selected ?? !1, next.selected ?? !1) && deepEqual(prev.animated ?? !1, next.animated ?? !1) && deepEqual(prev.source, next.source) && deepEqual(prev.sourceHandleId ?? null, next.sourceHandleId ?? null) && deepEqual(prev.sourcePosition, next.sourcePosition) && deepEqual(prev.target, next.target) && deepEqual(prev.targetHandleId ?? null, next.targetHandleId ?? null) && deepEqual(prev.targetPosition, next.targetPosition) && isSame(prev.sourceX, next.sourceX) && isSame(prev.sourceY, next.sourceY) && isSame(prev.targetX, next.targetX) && isSame(prev.targetY, next.targetY) && deepEqual(prev.data, next.data);
2225
+ const isSame = (a, b) => Math.abs(a - b) < 2.5, edgePropsEqual = (prev, next) => prev.id === next.id && deepEqual(prev.selected ?? !1, next.selected ?? !1) && deepEqual(prev.animated ?? !1, next.animated ?? !1) && deepEqual(prev.source, next.source) && deepEqual(prev.sourceHandleId ?? null, next.sourceHandleId ?? null) && deepEqual(prev.sourcePosition, next.sourcePosition) && deepEqual(prev.target, next.target) && deepEqual(prev.targetHandleId ?? null, next.targetHandleId ?? null) && deepEqual(prev.targetPosition, next.targetPosition) && isSame(prev.sourceX, next.sourceX) && isSame(prev.sourceY, next.sourceY) && isSame(prev.targetX, next.targetX) && isSame(prev.targetY, next.targetY) && deepEqual(prev.data, next.data);
1786
2226
  function customEdge(Edge) {
1787
2227
  return memo$1(Edge, edgePropsEqual);
1788
2228
  }
@@ -1941,7 +2381,7 @@ const EdgeLabel = forwardRef(({
1941
2381
  children: [
1942
2382
  stepNum !== null && /* @__PURE__ */ jsx(Box, { className: classes2.stepNumber, children: stepNum }),
1943
2383
  /* @__PURE__ */ jsxs(Box, { className: classes2.labelContents, children: [
1944
- n(label2) && /* @__PURE__ */ jsx(
2384
+ e$2(label2) && /* @__PURE__ */ jsx(
1945
2385
  Box,
1946
2386
  {
1947
2387
  className: cx(
@@ -1953,7 +2393,7 @@ const EdgeLabel = forwardRef(({
1953
2393
  children: label2
1954
2394
  }
1955
2395
  ),
1956
- n(technology) && /* @__PURE__ */ jsx(Box, { className: classes2.labelTechnology, children: "[ " + technology + " ]" }),
2396
+ e$2(technology) && /* @__PURE__ */ jsx(Box, { className: classes2.labelTechnology, children: "[ " + technology + " ]" }),
1957
2397
  children
1958
2398
  ] })
1959
2399
  ]
@@ -1963,7 +2403,7 @@ const EdgeLabel = forwardRef(({
1963
2403
  EdgeLabel.displayName = "EdgeLabel";
1964
2404
  const toCssVarValue = (value) => {
1965
2405
  if (value !== void 0)
1966
- return e(value) ? `${Math.round(value)}px` : value;
2406
+ return e$3(value) ? `${Math.round(value)}px` : value;
1967
2407
  };
1968
2408
  function EdgeLabelContainer({
1969
2409
  edgeProps: {
@@ -1992,12 +2432,6 @@ function EdgeLabelContainer({
1992
2432
  "div",
1993
2433
  {
1994
2434
  className: cx(
1995
- css({
1996
- display: {
1997
- _reduceGraphicsOnPan: "none",
1998
- _smallZoom: "none"
1999
- }
2000
- }),
2001
2435
  "nodrag nopan",
2002
2436
  "likec4-edge-label-container",
2003
2437
  className
@@ -2324,7 +2758,7 @@ function ElementActionButtons({
2324
2758
  },
2325
2759
  buttons: buttons2
2326
2760
  }) {
2327
- const id = useId(), zoomTooSmall = useIsZoomTooSmall();
2761
+ const id = useId$1(), zoomTooSmall = useIsZoomTooSmall();
2328
2762
  return !buttons2.length || zoomTooSmall ? null : /* @__PURE__ */ jsx(Box, { className: container$4, children: /* @__PURE__ */ jsx(
2329
2763
  MotionDiv,
2330
2764
  {
@@ -2391,7 +2825,7 @@ function ElementDetailsButton({
2391
2825
  icon: icon2,
2392
2826
  onClick
2393
2827
  }) {
2394
- const id = useId();
2828
+ const id = useId$1();
2395
2829
  return /* @__PURE__ */ jsx(Box, { className: cx(container$3, "details-button"), children: /* @__PURE__ */ jsx(
2396
2830
  ActionIcon$1,
2397
2831
  {
@@ -2544,29 +2978,29 @@ const ElementNodeContainer = forwardRef(({
2544
2978
  });
2545
2979
  ElementNodeContainer.displayName = "ElementNodeContainer";
2546
2980
  class VectorImpl {
2547
- constructor(x, y2) {
2548
- this.x = x, this.y = y2;
2981
+ constructor(x, y) {
2982
+ this.x = x, this.y = y;
2549
2983
  }
2550
2984
  static create(position) {
2551
2985
  return new VectorImpl(position.x, position.y);
2552
2986
  }
2553
- static add(a2, b) {
2554
- return { x: a2.x + b.x, y: a2.y + b.y };
2987
+ static add(a, b) {
2988
+ return { x: a.x + b.x, y: a.y + b.y };
2555
2989
  }
2556
- static sub(a2, b) {
2557
- return { x: a2.x - b.x, y: a2.y - b.y };
2990
+ static sub(a, b) {
2991
+ return { x: a.x - b.x, y: a.y - b.y };
2558
2992
  }
2559
- static mul(a2, b) {
2560
- return { x: a2.x * b, y: a2.y * b };
2993
+ static mul(a, b) {
2994
+ return { x: a.x * b, y: a.y * b };
2561
2995
  }
2562
- static dot(a2, b) {
2563
- return a2.x * b.x + a2.y * b.y;
2996
+ static dot(a, b) {
2997
+ return a.x * b.x + a.y * b.y;
2564
2998
  }
2565
- static cross(a2, b) {
2566
- return new VectorImpl(a2.y * b.x - a2.x * b.y, a2.x * b.y - a2.y * b.x);
2999
+ static cross(a, b) {
3000
+ return new VectorImpl(a.y * b.x - a.x * b.y, a.x * b.y - a.y * b.x);
2567
3001
  }
2568
- static setLength(a2, length) {
2569
- return vector(a2).setLength(length);
3002
+ static setLength(a, length) {
3003
+ return vector(a).setLength(length);
2570
3004
  }
2571
3005
  add(b) {
2572
3006
  return new VectorImpl(this.x + b.x, this.y + b.y);
@@ -2966,9 +3400,9 @@ function ElementTitle({ id, data, iconSize: iconSize2 }) {
2966
3400
  },
2967
3401
  className: elementNodeIcon()
2968
3402
  }), classes2 = elementNodeData({
2969
- hasIcon: n(elementIcon2),
3403
+ hasIcon: e$2(elementIcon2),
2970
3404
  hasDescription: !!((_a = data.description) != null && _a.nonEmpty),
2971
- hasTechnology: !n$1(data.technology ?? "")
3405
+ hasTechnology: !e$4(data.technology ?? "")
2972
3406
  }), size2 = nodeSizes(data.style).size, isSmOrXs = size2 === "sm" || size2 === "xs";
2973
3407
  return /* @__PURE__ */ jsxs(
2974
3408
  Box,
@@ -2977,7 +3411,7 @@ function ElementTitle({ id, data, iconSize: iconSize2 }) {
2977
3411
  classes2.root,
2978
3412
  "likec4-element"
2979
3413
  ),
2980
- style: e(iconSize2) ? {
3414
+ style: e$3(iconSize2) ? {
2981
3415
  // @ts-ignore
2982
3416
  "--likec4-icon-size": `${iconSize2}px`
2983
3417
  } : void 0,
@@ -3062,17 +3496,17 @@ const style = {
3062
3496
  }
3063
3497
  });
3064
3498
  function getNodeCenter(node2) {
3065
- const { width, height } = getNodeDimensions(node2), { x, y: y2 } = node2.internals.positionAbsolute;
3499
+ const { width, height } = getNodeDimensions(node2), { x, y } = node2.internals.positionAbsolute;
3066
3500
  return {
3067
3501
  x: x + width / 2,
3068
- y: y2 + height / 2
3502
+ y: y + height / 2
3069
3503
  };
3070
3504
  }
3071
3505
  function getNodeIntersectionFromCenterToPoint(intersectionNode, target, nodeMargin = 0) {
3072
3506
  const nodeCenter = getNodeCenter(intersectionNode), { width, height } = getNodeDimensions(intersectionNode), v = new VectorImpl(target.x, target.y).sub(nodeCenter), xScale = (nodeMargin + (width || 0) / 2) / v.x, yScale = (nodeMargin + (height || 0) / 2) / v.y, scale2 = Math.min(Math.abs(xScale), Math.abs(yScale));
3073
3507
  return vector(v).mul(scale2).add(nodeCenter);
3074
3508
  }
3075
- const curve = d3line().curve(curveCatmullRomOpen).x((d2) => d2.x).y((d2) => d2.y), RelationshipEdge$2 = customEdge((props) => {
3509
+ const curve = d3line().curve(curveCatmullRomOpen).x((d) => d.x).y((d) => d.y), RelationshipEdge$2 = customEdge((props) => {
3076
3510
  const [isControlPointDragging, setIsControlPointDragging] = useState(!1), xyflowStore = useXYStoreApi(), xyflow2 = useXYFlow(), diagram = useDiagram(), {
3077
3511
  enableNavigateTo,
3078
3512
  enableEdgeEditing
@@ -3096,20 +3530,20 @@ const curve = d3line().curve(curveCatmullRomOpen).x((d2) => d2.x).y((d2) => d2.y
3096
3530
  ...data
3097
3531
  },
3098
3532
  style: style2 = {}
3099
- } = props, navigateTo = enableNavigateTo ? data.navigateTo : void 0, sourceNode = nonNullable(useXYInternalNode(source), `source node ${source} not found`), targetNode = nonNullable(useXYInternalNode(target), `target node ${target} not found`), isModified = n(data.controlPoints) || !isSamePoint(sourceNode.internals.positionAbsolute, sourceNode.data.position) || !isSamePoint(targetNode.internals.positionAbsolute, targetNode.data.position);
3533
+ } = props, navigateTo = enableNavigateTo ? data.navigateTo : void 0, sourceNode = nonNullable(useXYInternalNode(source), `source node ${source} not found`), targetNode = nonNullable(useXYInternalNode(target), `target node ${target} not found`), isModified = e$2(data.controlPoints) || !isSamePoint(sourceNode.internals.positionAbsolute, sourceNode.data.position) || !isSamePoint(targetNode.internals.positionAbsolute, targetNode.data.position);
3100
3534
  let controlPoints = data.controlPoints ?? bezierControlPoints(props.data), edgePath;
3101
3535
  if (isModified) {
3102
3536
  const sourceCenterPos = { x: sourceX, y: sourceY }, targetCenterPos = { x: targetX, y: targetY }, nodeMargin = 6, points2 = data.dir === "back" ? [
3103
3537
  targetCenterPos,
3104
- getNodeIntersectionFromCenterToPoint(targetNode, d(controlPoints) ?? sourceCenterPos, nodeMargin),
3538
+ getNodeIntersectionFromCenterToPoint(targetNode, n$1(controlPoints) ?? sourceCenterPos, nodeMargin),
3105
3539
  ...controlPoints,
3106
- getNodeIntersectionFromCenterToPoint(sourceNode, a(controlPoints) ?? targetCenterPos, nodeMargin),
3540
+ getNodeIntersectionFromCenterToPoint(sourceNode, t$7(controlPoints) ?? targetCenterPos, nodeMargin),
3107
3541
  sourceCenterPos
3108
3542
  ] : [
3109
3543
  sourceCenterPos,
3110
- getNodeIntersectionFromCenterToPoint(sourceNode, d(controlPoints) ?? targetCenterPos, nodeMargin),
3544
+ getNodeIntersectionFromCenterToPoint(sourceNode, n$1(controlPoints) ?? targetCenterPos, nodeMargin),
3111
3545
  ...controlPoints,
3112
- getNodeIntersectionFromCenterToPoint(targetNode, a(controlPoints) ?? sourceCenterPos, nodeMargin),
3546
+ getNodeIntersectionFromCenterToPoint(targetNode, t$7(controlPoints) ?? sourceCenterPos, nodeMargin),
3113
3547
  targetCenterPos
3114
3548
  ];
3115
3549
  edgePath = nonNullable(curve(points2));
@@ -3154,10 +3588,10 @@ const curve = d3line().curve(curveCatmullRomOpen).x((d2) => d2.x).y((d2) => d2.y
3154
3588
  };
3155
3589
  if (!isSamePoint(pointer, clientPoint)) {
3156
3590
  setIsControlPointDragging(!0), hasMoved || (diagram.send({ type: "xyflow.edgeEditingStarted", edge: props.data }), hasMoved = !0), pointer = clientPoint;
3157
- const { x, y: y2 } = xyflow2.screenToFlowPosition(pointer, { snapToGrid: !1 }), cp = controlPoints.slice();
3591
+ const { x, y } = xyflow2.screenToFlowPosition(pointer, { snapToGrid: !1 }), cp = controlPoints.slice();
3158
3592
  cp[index2] = {
3159
3593
  x: roundDpr(x),
3160
- y: roundDpr(y2)
3594
+ y: roundDpr(y)
3161
3595
  }, diagram.updateEdgeData(id, {
3162
3596
  controlPoints: cp
3163
3597
  });
@@ -3215,11 +3649,11 @@ const curve = d3line().curve(curveCatmullRomOpen).x((d2) => d2.x).y((d2) => d2.y
3215
3649
  let pointer = { x: e2.clientX, y: e2.clientY };
3216
3650
  const newPoint = vector(xyflow2.screenToFlowPosition(pointer, { snapToGrid: !1 }));
3217
3651
  let insertionIndex = 0, minDistance = 1 / 0;
3218
- for (let i2 = 0; i2 < points2.length - 1; i2++) {
3219
- const a2 = points2[i2], b = points2[i2 + 1], fromCurrentToNext = b.sub(a2), fromCurrentToNew = newPoint.sub(a2), fromNextToNew = newPoint.sub(b);
3652
+ for (let i = 0; i < points2.length - 1; i++) {
3653
+ const a = points2[i], b = points2[i + 1], fromCurrentToNext = b.sub(a), fromCurrentToNew = newPoint.sub(a), fromNextToNew = newPoint.sub(b);
3220
3654
  if (fromCurrentToNext.dot(fromCurrentToNew) * fromCurrentToNext.dot(fromNextToNew) < 0) {
3221
3655
  const distanceToEdge = Math.abs(fromCurrentToNext.cross(fromCurrentToNew).abs() / fromCurrentToNext.abs());
3222
- distanceToEdge < minDistance && (minDistance = distanceToEdge, insertionIndex = i2);
3656
+ distanceToEdge < minDistance && (minDistance = distanceToEdge, insertionIndex = i);
3223
3657
  }
3224
3658
  }
3225
3659
  const newControlPoints = controlPoints.slice() || [];
@@ -3276,16 +3710,16 @@ const curve = d3line().curve(curveCatmullRomOpen).x((d2) => d2.x).y((d2) => d2.y
3276
3710
  onContextMenu: (e2) => {
3277
3711
  e2.preventDefault(), e2.stopPropagation();
3278
3712
  },
3279
- children: controlPoints.map((p2, i2) => /* @__PURE__ */ jsx(
3713
+ children: controlPoints.map((p, i) => /* @__PURE__ */ jsx(
3280
3714
  "circle",
3281
3715
  {
3282
- onPointerDown: (e2) => onControlPointerDown(i2, e2),
3716
+ onPointerDown: (e2) => onControlPointerDown(i, e2),
3283
3717
  className: cx("nodrag nopan", controlPoint),
3284
- cx: Math.round(p2.x),
3285
- cy: Math.round(p2.y),
3718
+ cx: Math.round(p.x),
3719
+ cy: Math.round(p.y),
3286
3720
  r: 3
3287
3721
  },
3288
- "controlPoints" + edgeId + "#" + i2
3722
+ "controlPoints" + edgeId + "#" + i
3289
3723
  ))
3290
3724
  }
3291
3725
  )
@@ -3324,7 +3758,7 @@ const curve = d3line().curve(curveCatmullRomOpen).x((d2) => d2.x).y((d2) => d2.y
3324
3758
  }
3325
3759
  }), buttons22;
3326
3760
  }, [enableNavigateTo, enableRelationshipBrowser, diagram, modelFqn, navigateTo, props.id]);
3327
- return extraButtons && i(extraButtons, 1) && (buttons2 = [...buttons2, ...extraButtons]), /* @__PURE__ */ jsx(ElementActionButtons, { ...props, buttons: buttons2 });
3761
+ return extraButtons && t$6(extraButtons, 1) && (buttons2 = [...buttons2, ...extraButtons]), /* @__PURE__ */ jsx(ElementActionButtons, { ...props, buttons: buttons2 });
3328
3762
  }, DeploymentElementActions = ({
3329
3763
  extraButtons,
3330
3764
  ...props
@@ -3346,7 +3780,7 @@ const curve = d3line().curve(curveCatmullRomOpen).x((d2) => d2.x).y((d2) => d2.y
3346
3780
  }
3347
3781
  }), buttons22;
3348
3782
  }, [enableNavigateTo, enableRelationshipBrowser, diagram, modelFqn, navigateTo, props.id]);
3349
- return extraButtons && i(extraButtons, 1) && (buttons2 = [...buttons2, ...extraButtons]), /* @__PURE__ */ jsx(ElementActionButtons, { ...props, buttons: buttons2 });
3783
+ return extraButtons && t$6(extraButtons, 1) && (buttons2 = [...buttons2, ...extraButtons]), /* @__PURE__ */ jsx(ElementActionButtons, { ...props, buttons: buttons2 });
3350
3784
  }, {
3351
3785
  primary,
3352
3786
  secondary,
@@ -3356,7 +3790,7 @@ const curve = d3line().curve(curveCatmullRomOpen).x((d2) => d2.x).y((d2) => d2.y
3356
3790
  { key: "primary", value: primary.fill },
3357
3791
  { key: "secondary", value: secondary.fill },
3358
3792
  { key: "muted", value: muted.fill }
3359
- ], colors = t$2(otherColors).map((key2) => ({
3793
+ ], colors = t$8(otherColors).map((key2) => ({
3360
3794
  key: key2,
3361
3795
  value: defaultTheme.elements[key2].fill
3362
3796
  })), Tooltip$6 = Tooltip$7.withProps({
@@ -4034,8 +4468,8 @@ const _actorLogic$1 = xstate_cjsExports.setup({
4034
4468
  },
4035
4469
  guards: {
4036
4470
  "was opened on hover": ({ context: context2 }) => context2.activatedBy === "hover",
4037
- "has search query": ({ context: context2 }) => !n$1(context2.searchQuery),
4038
- "search query is empty": ({ context: context2 }) => n$1(context2.searchQuery)
4471
+ "has search query": ({ context: context2 }) => !e$4(context2.searchQuery),
4472
+ "search query is empty": ({ context: context2 }) => e$4(context2.searchQuery)
4039
4473
  }
4040
4474
  }).createMachine({
4041
4475
  id: "breadcrumbs",
@@ -4425,8 +4859,8 @@ const autolayoutButton$1 = css({
4425
4859
  }, _ref) => {
4426
4860
  isVertical || ([nodeSep, rankSep] = [rankSep, nodeSep]);
4427
4861
  const propagateChange = useDebouncedCallback(
4428
- ({ x, y: y2 }) => {
4429
- isVertical || ([x, y2] = [y2, x]), onChange(Math.round(x * MAX_SPACING$1), Math.round(y2 * MAX_SPACING$1));
4862
+ ({ x, y }) => {
4863
+ isVertical || ([x, y] = [y, x]), onChange(Math.round(x * MAX_SPACING$1), Math.round(y * MAX_SPACING$1));
4430
4864
  },
4431
4865
  [onChange, isVertical],
4432
4866
  250,
@@ -5121,7 +5555,7 @@ const selector$7 = (state) => ({
5121
5555
  /* @__PURE__ */ jsx(Text, { component: "div", fw: 500, size: "xl", children: title2 }),
5122
5556
  /* @__PURE__ */ jsxs(HStack, { alignItems: "flex-start", mt: "1", children: [
5123
5557
  /* @__PURE__ */ jsx(ViewBadge, { label: "id", value: id }),
5124
- /* @__PURE__ */ jsx(HStack, { gap: "xs", flexWrap: "wrap", children: tags.map((tag, i2) => /* @__PURE__ */ jsx(
5558
+ /* @__PURE__ */ jsx(HStack, { gap: "xs", flexWrap: "wrap", children: tags.map((tag, i) => /* @__PURE__ */ jsx(
5125
5559
  ElementTag,
5126
5560
  {
5127
5561
  tag,
@@ -5136,7 +5570,7 @@ const selector$7 = (state) => ({
5136
5570
  ] }),
5137
5571
  links.length > 0 && /* @__PURE__ */ jsxs("section", { className: hstack({ alignItems: "baseline" }), children: [
5138
5572
  /* @__PURE__ */ jsx(SectionHeader$1, { children: "Links" }),
5139
- /* @__PURE__ */ jsx(HStack, { gap: "xs", flexWrap: "wrap", children: links.map((link, i2) => /* @__PURE__ */ jsx(Link, { value: link }, `${i2}-${link.url}`)) })
5573
+ /* @__PURE__ */ jsx(HStack, { gap: "xs", flexWrap: "wrap", children: links.map((link, i) => /* @__PURE__ */ jsx(Link, { value: link }, `${i}-${link.url}`)) })
5140
5574
  ] }),
5141
5575
  description2.isEmpty && /* @__PURE__ */ jsx(Text, { component: "div", fw: 500, size: "xs", c: "dimmed", my: "md", style: { userSelect: "none" }, children: "No description" }),
5142
5576
  description2.nonEmpty && /* @__PURE__ */ jsxs("section", { children: [
@@ -5289,7 +5723,7 @@ const selector$7 = (state) => ({
5289
5723
  return e2.id === ((_a2 = s.activeWalkthrough) == null ? void 0 : _a2.stepId);
5290
5724
  });
5291
5725
  return {
5292
- isParallel: n((_a = s.activeWalkthrough) == null ? void 0 : _a.parallelPrefix),
5726
+ isParallel: e$2((_a = s.activeWalkthrough) == null ? void 0 : _a.parallelPrefix),
5293
5727
  hasNext: currentStepIndex < s.xyedges.length - 1,
5294
5728
  hasPrevious: currentStepIndex > 0,
5295
5729
  currentStep: currentStepIndex + 1,
@@ -5383,7 +5817,7 @@ const selector$7 = (state) => ({
5383
5817
  folders,
5384
5818
  viewTitle,
5385
5819
  isDynamicView
5386
- } = xstateReact_cjsExports.useSelector(actor.actorRef, selectBreadcrumbs, deepEqual), folderBreadcrumbs = folders.flatMap(({ folderPath, title: title2 }, i2) => [
5820
+ } = xstateReact_cjsExports.useSelector(actor.actorRef, selectBreadcrumbs, deepEqual), folderBreadcrumbs = folders.flatMap(({ folderPath, title: title2 }, i) => [
5387
5821
  /* @__PURE__ */ jsx(
5388
5822
  UnstyledButton,
5389
5823
  {
@@ -5410,7 +5844,7 @@ const selector$7 = (state) => ({
5410
5844
  },
5411
5845
  folderPath
5412
5846
  ),
5413
- /* @__PURE__ */ jsx(BreadcrumbsSeparator, {}, `separator-${i2}`)
5847
+ /* @__PURE__ */ jsx(BreadcrumbsSeparator, {}, `separator-${i}`)
5414
5848
  ]), viewBreadcrumb = /* @__PURE__ */ jsx(
5415
5849
  UnstyledButton,
5416
5850
  {
@@ -5496,6 +5930,232 @@ const selector$7 = (state) => ({
5496
5930
  }
5497
5931
  ));
5498
5932
  NavigationLink.displayName = "NavigationLink";
5933
+ const backdropBlur$1 = "--_blur", backdropOpacity$1 = "--_opacity", level = "--_level", offset = "--_offset", inset = "--_inset", borderRadius = "--_border-radius", dialog$2 = css.raw({
5934
+ boxSizing: "border-box",
5935
+ margin: "0",
5936
+ position: "fixed",
5937
+ width: "100vw",
5938
+ height: "100vh",
5939
+ maxWidth: "100vw",
5940
+ maxHeight: "100vh",
5941
+ background: "mantine.colors.defaultBorder/50",
5942
+ shadow: "xl",
5943
+ border: "transparent",
5944
+ outline: "none",
5945
+ borderRadius: `var(${borderRadius})`,
5946
+ [backdropBlur$1]: "0px",
5947
+ [level]: "0",
5948
+ [offset]: "0px",
5949
+ [inset]: "calc((1 + var(--_level) * 0.75) * var(--_offset))",
5950
+ [backdropOpacity$1]: "0%",
5951
+ [borderRadius]: "0px",
5952
+ _backdrop: {
5953
+ cursor: "zoom-out"
5954
+ },
5955
+ inset: "0",
5956
+ padding: "0"
5957
+ }), body$1 = css.raw({
5958
+ position: "relative",
5959
+ containerName: "likec4-dialog",
5960
+ containerType: "size",
5961
+ border: "0 solid transparent",
5962
+ overflow: "hidden",
5963
+ width: "100%",
5964
+ height: "100%",
5965
+ background: "mantine.colors.body"
5966
+ }), overlay = sva({
5967
+ slots: ["dialog", "body"],
5968
+ base: {
5969
+ dialog: dialog$2,
5970
+ body: body$1
5971
+ },
5972
+ variants: {
5973
+ fullscreen: {
5974
+ false: {
5975
+ dialog: {
5976
+ sm: {
5977
+ inset: "[var(--_inset) var(--_inset) var(--_offset) var(--_inset)]",
5978
+ width: "calc(100vw - 2 * var(--_inset))",
5979
+ height: "calc(100vh - var(--_offset) - var(--_inset))",
5980
+ [borderRadius]: "6px",
5981
+ padding: "1.5",
5982
+ // 6px
5983
+ [offset]: "1rem"
5984
+ },
5985
+ md: {
5986
+ [offset]: "1rem"
5987
+ },
5988
+ lg: {
5989
+ [offset]: "2rem"
5990
+ },
5991
+ xl: {
5992
+ [offset]: "4rem"
5993
+ }
5994
+ },
5995
+ body: {
5996
+ sm: {
5997
+ borderRadius: `calc(var(${borderRadius}) - 2px)`
5998
+ }
5999
+ }
6000
+ },
6001
+ true: {
6002
+ dialog: {
6003
+ inset: "0",
6004
+ padding: "0"
6005
+ }
6006
+ }
6007
+ },
6008
+ // transparent: {
6009
+ // false: {
6010
+ // },
6011
+ // true: {
6012
+ // dialog: {
6013
+ // background: 'transparent',
6014
+ // },
6015
+ // },
6016
+ // },
6017
+ withBackdrop: {
6018
+ false: {
6019
+ dialog: {
6020
+ _backdrop: {
6021
+ display: "none"
6022
+ }
6023
+ }
6024
+ },
6025
+ true: {
6026
+ dialog: {
6027
+ _backdrop: {
6028
+ backdropFilter: `blur(var(${backdropBlur$1}))`,
6029
+ backgroundColor: {
6030
+ _dark: `[rgb(34 34 34 / var(${backdropOpacity$1}))]`,
6031
+ _light: `[rgb(15 15 15/ var(${backdropOpacity$1}))]`
6032
+ }
6033
+ }
6034
+ }
6035
+ }
6036
+ }
6037
+ },
6038
+ defaultVariants: {
6039
+ fullscreen: !1,
6040
+ withBackdrop: !0
6041
+ }
6042
+ }), Overlay = forwardRef(({
6043
+ onClose,
6044
+ className,
6045
+ classes: classes2,
6046
+ overlayLevel = 0,
6047
+ children,
6048
+ fullscreen = !1,
6049
+ withBackdrop = !0,
6050
+ backdrop,
6051
+ openDelay = 130,
6052
+ ...rest
6053
+ }, ref) => {
6054
+ const [opened, setOpened] = useState(openDelay === 0), focusTrapRef = useFocusTrap(opened), dialogRef = useRef(null), isClosingRef = useRef(!1), motionNotReduced = useReducedMotionConfig() !== !0, onCloseRef = useRef(onClose);
6055
+ onCloseRef.current = onClose;
6056
+ const close = useDebouncedCallback(
6057
+ () => {
6058
+ isClosingRef.current || (isClosingRef.current = !0, onCloseRef.current());
6059
+ },
6060
+ [],
6061
+ 50
6062
+ );
6063
+ useLayoutEffect(() => {
6064
+ var _a, _b;
6065
+ (_a = dialogRef.current) != null && _a.open || (_b = dialogRef.current) == null || _b.showModal();
6066
+ }, []), useTimeoutEffect(() => {
6067
+ setOpened(!0);
6068
+ }, openDelay > 0 ? openDelay : void 0);
6069
+ const styles = overlay({
6070
+ fullscreen,
6071
+ withBackdrop
6072
+ });
6073
+ let targetBackdropOpacity = overlayLevel > 0 ? "50%" : "60%";
6074
+ return (backdrop == null ? void 0 : backdrop.opacity) !== void 0 && (targetBackdropOpacity = `${backdrop.opacity * 100}%`), /* @__PURE__ */ jsx(
6075
+ m.dialog,
6076
+ {
6077
+ ref: useMergedRef(
6078
+ dialogRef,
6079
+ focusTrapRef,
6080
+ ref
6081
+ ),
6082
+ className: cx(
6083
+ classes2 == null ? void 0 : classes2.dialog,
6084
+ className,
6085
+ styles.dialog,
6086
+ fullscreen && ReactRemoveScroll.classNames.fullWidth
6087
+ ),
6088
+ layout: !0,
6089
+ style: {
6090
+ // @ts-ignore
6091
+ [level]: overlayLevel
6092
+ },
6093
+ ...motionNotReduced ? {
6094
+ initial: {
6095
+ [backdropBlur$1]: "0px",
6096
+ [backdropOpacity$1]: "0%",
6097
+ scale: 0.95,
6098
+ originY: 0,
6099
+ translateY: -20,
6100
+ opacity: 0
6101
+ },
6102
+ animate: {
6103
+ [backdropBlur$1]: overlayLevel > 0 ? "4px" : "8px",
6104
+ [backdropOpacity$1]: targetBackdropOpacity,
6105
+ scale: 1,
6106
+ opacity: 1,
6107
+ translateY: 0,
6108
+ transition: {
6109
+ delay: 0.075
6110
+ }
6111
+ },
6112
+ exit: {
6113
+ opacity: 0,
6114
+ scale: 0.98,
6115
+ translateY: -20,
6116
+ transition: {
6117
+ duration: 0.1
6118
+ },
6119
+ [backdropBlur$1]: "0px",
6120
+ [backdropOpacity$1]: "0%"
6121
+ }
6122
+ } : {
6123
+ initial: {
6124
+ [backdropBlur$1]: "8px",
6125
+ [backdropOpacity$1]: targetBackdropOpacity
6126
+ }
6127
+ },
6128
+ onClick: (e2) => {
6129
+ var _a, _b, _c;
6130
+ if (e2.stopPropagation(), ((_b = (_a = e2.target) == null ? void 0 : _a.nodeName) == null ? void 0 : _b.toUpperCase()) === "DIALOG") {
6131
+ (_c = dialogRef.current) == null || _c.close();
6132
+ return;
6133
+ }
6134
+ },
6135
+ onCancel: (e2) => {
6136
+ e2.preventDefault(), e2.stopPropagation(), close();
6137
+ },
6138
+ onDoubleClick: stopPropagation,
6139
+ onPointerDown: stopPropagation,
6140
+ onClose: (e2) => {
6141
+ e2.stopPropagation(), close();
6142
+ },
6143
+ ...rest,
6144
+ children: /* @__PURE__ */ jsx(ReactRemoveScroll, { forwardProps: !0, children: /* @__PURE__ */ jsx(
6145
+ "div",
6146
+ {
6147
+ className: cx(
6148
+ classes2 == null ? void 0 : classes2.body,
6149
+ styles.body,
6150
+ "overlay-body"
6151
+ ),
6152
+ children: opened && /* @__PURE__ */ jsx(Fragment, { children })
6153
+ }
6154
+ ) })
6155
+ }
6156
+ );
6157
+ });
6158
+ Overlay.displayName = "Overlay";
5499
6159
  const LikeC4ProjectsContext = createContext(null), emptyProjects = [];
5500
6160
  function useLikeC4Projects() {
5501
6161
  const ctx = useContext(LikeC4ProjectsContext);
@@ -5585,7 +6245,13 @@ const scopedKeydownHandler = createScopedKeydownHandler({
5585
6245
  orientation: "vertical"
5586
6246
  });
5587
6247
  function NavigationPanelDropdown() {
5588
- const actor = useNavigationActor(), searchQuery = xstateReact_cjsExports.useSelector(actor.actorRef, (s) => s.context.searchQuery), setSearchQuery = useThrottledCallback((value) => {
6248
+ const actor = useNavigationActor(), searchQuery = xstateReact_cjsExports.useSelector(actor.actorRef, (s) => s.context.searchQuery);
6249
+ useOnDiagramEvent("paneClick", () => {
6250
+ actor.closeDropdown();
6251
+ }), useOnDiagramEvent("nodeClick", () => {
6252
+ actor.closeDropdown();
6253
+ });
6254
+ const setSearchQuery = useThrottledCallback((value) => {
5589
6255
  actor.send({ type: "searchQuery.change", value });
5590
6256
  }, 250), hasSearchQuery = searchQuery.trim().length >= 2;
5591
6257
  return /* @__PURE__ */ jsxs(
@@ -5636,7 +6302,7 @@ function NavigationPanelDropdown() {
5636
6302
  }
5637
6303
  const compare = compareNaturalHierarchically(VIEW_FOLDERS_SEPARATOR);
5638
6304
  function SearchResults({ searchQuery }) {
5639
- const likec4model = useLikeC4Model(), actor = useNavigationActor(), isSearchByPath = searchQuery.includes(VIEW_FOLDERS_SEPARATOR), found = C(
6305
+ const likec4model = useLikeC4Model(), actor = useNavigationActor(), isSearchByPath = searchQuery.includes(VIEW_FOLDERS_SEPARATOR), found = t$1(
5640
6306
  likec4model.views(),
5641
6307
  ifilter((v) => {
5642
6308
  var _a;
@@ -5644,7 +6310,7 @@ function SearchResults({ searchQuery }) {
5644
6310
  }),
5645
6311
  ifirst(20),
5646
6312
  toArray(),
5647
- m$1((a2, b) => compare(a2.folder.path, b.folder.path))
6313
+ t$9((a, b) => compare(a.folder.path, b.folder.path))
5648
6314
  );
5649
6315
  if (found.length === 0) return /* @__PURE__ */ jsx("div", { children: "no results" });
5650
6316
  const highlight = isSearchByPath ? searchQuery.split(VIEW_FOLDERS_SEPARATOR) : searchQuery;
@@ -5759,7 +6425,7 @@ function FoundedView({ view, highlight, ...props }) {
5759
6425
  breadcrumbTitle({ dimmed: !0, truncate: !0 })
5760
6426
  ),
5761
6427
  maw: 170,
5762
- highlight: o(highlight) ? highlight : [],
6428
+ highlight: e$1(highlight) ? highlight : [],
5763
6429
  children: b.title
5764
6430
  },
5765
6431
  b.path
@@ -5855,8 +6521,8 @@ const selectColumns = (context2) => {
5855
6521
  };
5856
6522
  function FolderColumns() {
5857
6523
  const columns = useNavigationActorContext(selectColumns, deepEqual);
5858
- return /* @__PURE__ */ jsx(HStack, { gap: "xs", alignItems: "stretch", children: columns.flatMap((column, i2) => [
5859
- i2 > 0 && /* @__PURE__ */ jsx(Divider$1, { orientation: "vertical" }, "divider" + i2),
6524
+ return /* @__PURE__ */ jsx(HStack, { gap: "xs", alignItems: "stretch", children: columns.flatMap((column, i) => [
6525
+ i > 0 && /* @__PURE__ */ jsx(Divider$1, { orientation: "vertical" }, "divider" + i),
5860
6526
  /* @__PURE__ */ jsx(FolderColumn, { data: column }, column.folderPath)
5861
6527
  ]) });
5862
6528
  }
@@ -5864,13 +6530,13 @@ function FolderColumn({ data }) {
5864
6530
  const actor = useNavigationActorRef(), onItemClicked = (item) => (e2) => {
5865
6531
  e2.stopPropagation(), item.type === "folder" ? actor.send({ type: "select.folder", folderPath: item.folderPath }) : actor.send({ type: "select.view", viewId: item.viewId });
5866
6532
  };
5867
- return /* @__PURE__ */ jsx(Box, { mb: "1", children: /* @__PURE__ */ jsx(ColumnScrollArea, { children: /* @__PURE__ */ jsx(VStack, { gap: "[1px]", children: data.items.map((item, i2) => /* @__PURE__ */ jsx(
6533
+ return /* @__PURE__ */ jsx(Box, { mb: "1", children: /* @__PURE__ */ jsx(ColumnScrollArea, { children: /* @__PURE__ */ jsx(VStack, { gap: "[1px]", children: data.items.map((item, i) => /* @__PURE__ */ jsx(
5868
6534
  FolderColumnItem,
5869
6535
  {
5870
6536
  columnItem: item,
5871
6537
  onClick: onItemClicked(item)
5872
6538
  },
5873
- `${data.folderPath}/${item.type}/${i2}`
6539
+ `${data.folderPath}/${item.type}/${i}`
5874
6540
  )) }) }) });
5875
6541
  }
5876
6542
  function FolderColumnItem({ columnItem, ...props }) {
@@ -5956,7 +6622,7 @@ function SearchInput({ onKeyDown, ...props }) {
5956
6622
  leftSection: /* @__PURE__ */ jsx(IconSearch, { size: 14 }),
5957
6623
  rightSectionPointerEvents: "all",
5958
6624
  rightSectionWidth: "min-content",
5959
- rightSection: !props.value || n$1(props.value) ? null : /* @__PURE__ */ jsx(
6625
+ rightSection: !props.value || e$4(props.value) ? null : /* @__PURE__ */ jsx(
5960
6626
  Button,
5961
6627
  {
5962
6628
  variant: "subtle",
@@ -5972,232 +6638,6 @@ function SearchInput({ onKeyDown, ...props }) {
5972
6638
  }
5973
6639
  );
5974
6640
  }
5975
- const backdropBlur$1 = "--_blur", backdropOpacity$1 = "--_opacity", level = "--_level", offset = "--_offset", inset = "--_inset", borderRadius = "--_border-radius", dialog$2 = css.raw({
5976
- boxSizing: "border-box",
5977
- margin: "0",
5978
- position: "fixed",
5979
- width: "100vw",
5980
- height: "100vh",
5981
- maxWidth: "100vw",
5982
- maxHeight: "100vh",
5983
- background: "mantine.colors.defaultBorder/50",
5984
- shadow: "xl",
5985
- border: "transparent",
5986
- outline: "none",
5987
- borderRadius: `var(${borderRadius})`,
5988
- [backdropBlur$1]: "0px",
5989
- [level]: "0",
5990
- [offset]: "0px",
5991
- [inset]: "calc((1 + var(--_level) * 0.75) * var(--_offset))",
5992
- [backdropOpacity$1]: "0%",
5993
- [borderRadius]: "0px",
5994
- _backdrop: {
5995
- cursor: "zoom-out"
5996
- },
5997
- inset: "0",
5998
- padding: "0"
5999
- }), body$1 = css.raw({
6000
- position: "relative",
6001
- containerName: "likec4-dialog",
6002
- containerType: "size",
6003
- border: "0 solid transparent",
6004
- overflow: "hidden",
6005
- width: "100%",
6006
- height: "100%",
6007
- background: "mantine.colors.body"
6008
- }), overlay = sva({
6009
- slots: ["dialog", "body"],
6010
- base: {
6011
- dialog: dialog$2,
6012
- body: body$1
6013
- },
6014
- variants: {
6015
- fullscreen: {
6016
- false: {
6017
- dialog: {
6018
- sm: {
6019
- inset: "[var(--_inset) var(--_inset) var(--_offset) var(--_inset)]",
6020
- width: "calc(100vw - 2 * var(--_inset))",
6021
- height: "calc(100vh - var(--_offset) - var(--_inset))",
6022
- [borderRadius]: "6px",
6023
- padding: "1.5",
6024
- // 6px
6025
- [offset]: "1rem"
6026
- },
6027
- md: {
6028
- [offset]: "1rem"
6029
- },
6030
- lg: {
6031
- [offset]: "2rem"
6032
- },
6033
- xl: {
6034
- [offset]: "4rem"
6035
- }
6036
- },
6037
- body: {
6038
- sm: {
6039
- borderRadius: `calc(var(${borderRadius}) - 2px)`
6040
- }
6041
- }
6042
- },
6043
- true: {
6044
- dialog: {
6045
- inset: "0",
6046
- padding: "0"
6047
- }
6048
- }
6049
- },
6050
- // transparent: {
6051
- // false: {
6052
- // },
6053
- // true: {
6054
- // dialog: {
6055
- // background: 'transparent',
6056
- // },
6057
- // },
6058
- // },
6059
- withBackdrop: {
6060
- false: {
6061
- dialog: {
6062
- _backdrop: {
6063
- display: "none"
6064
- }
6065
- }
6066
- },
6067
- true: {
6068
- dialog: {
6069
- _backdrop: {
6070
- backdropFilter: `blur(var(${backdropBlur$1}))`,
6071
- backgroundColor: {
6072
- _dark: `[rgb(34 34 34 / var(${backdropOpacity$1}))]`,
6073
- _light: `[rgb(15 15 15/ var(${backdropOpacity$1}))]`
6074
- }
6075
- }
6076
- }
6077
- }
6078
- }
6079
- },
6080
- defaultVariants: {
6081
- fullscreen: !1,
6082
- withBackdrop: !0
6083
- }
6084
- }), Overlay = forwardRef(({
6085
- onClose,
6086
- className,
6087
- classes: classes2,
6088
- overlayLevel = 0,
6089
- children,
6090
- fullscreen = !1,
6091
- withBackdrop = !0,
6092
- backdrop,
6093
- openDelay = 130,
6094
- ...rest
6095
- }, ref) => {
6096
- const [opened, setOpened] = useState(openDelay === 0), focusTrapRef = useFocusTrap(opened), dialogRef = useRef(null), isClosingRef = useRef(!1), motionNotReduced = useReducedMotionConfig() !== !0, onCloseRef = useRef(onClose);
6097
- onCloseRef.current = onClose;
6098
- const close = useDebouncedCallback(
6099
- () => {
6100
- isClosingRef.current || (isClosingRef.current = !0, onCloseRef.current());
6101
- },
6102
- [],
6103
- 50
6104
- );
6105
- useLayoutEffect(() => {
6106
- var _a, _b;
6107
- (_a = dialogRef.current) != null && _a.open || (_b = dialogRef.current) == null || _b.showModal();
6108
- }, []), useTimeoutEffect(() => {
6109
- setOpened(!0);
6110
- }, openDelay > 0 ? openDelay : void 0);
6111
- const styles = overlay({
6112
- fullscreen,
6113
- withBackdrop
6114
- });
6115
- let targetBackdropOpacity = overlayLevel > 0 ? "50%" : "60%";
6116
- return (backdrop == null ? void 0 : backdrop.opacity) !== void 0 && (targetBackdropOpacity = `${backdrop.opacity * 100}%`), /* @__PURE__ */ jsx(
6117
- m.dialog,
6118
- {
6119
- ref: useMergedRef(
6120
- dialogRef,
6121
- focusTrapRef,
6122
- ref
6123
- ),
6124
- className: cx(
6125
- classes2 == null ? void 0 : classes2.dialog,
6126
- className,
6127
- styles.dialog,
6128
- fullscreen && ReactRemoveScroll.classNames.fullWidth
6129
- ),
6130
- layout: !0,
6131
- style: {
6132
- // @ts-ignore
6133
- [level]: overlayLevel
6134
- },
6135
- ...motionNotReduced ? {
6136
- initial: {
6137
- [backdropBlur$1]: "0px",
6138
- [backdropOpacity$1]: "0%",
6139
- scale: 0.95,
6140
- originY: 0,
6141
- translateY: -20,
6142
- opacity: 0
6143
- },
6144
- animate: {
6145
- [backdropBlur$1]: overlayLevel > 0 ? "4px" : "8px",
6146
- [backdropOpacity$1]: targetBackdropOpacity,
6147
- scale: 1,
6148
- opacity: 1,
6149
- translateY: 0,
6150
- transition: {
6151
- delay: 0.075
6152
- }
6153
- },
6154
- exit: {
6155
- opacity: 0,
6156
- scale: 0.98,
6157
- translateY: -20,
6158
- transition: {
6159
- duration: 0.1
6160
- },
6161
- [backdropBlur$1]: "0px",
6162
- [backdropOpacity$1]: "0%"
6163
- }
6164
- } : {
6165
- initial: {
6166
- [backdropBlur$1]: "8px",
6167
- [backdropOpacity$1]: targetBackdropOpacity
6168
- }
6169
- },
6170
- onClick: (e2) => {
6171
- var _a, _b, _c;
6172
- if (e2.stopPropagation(), ((_b = (_a = e2.target) == null ? void 0 : _a.nodeName) == null ? void 0 : _b.toUpperCase()) === "DIALOG") {
6173
- (_c = dialogRef.current) == null || _c.close();
6174
- return;
6175
- }
6176
- },
6177
- onCancel: (e2) => {
6178
- e2.preventDefault(), e2.stopPropagation(), close();
6179
- },
6180
- onDoubleClick: stopPropagation,
6181
- onPointerDown: stopPropagation,
6182
- onClose: (e2) => {
6183
- e2.stopPropagation(), close();
6184
- },
6185
- ...rest,
6186
- children: /* @__PURE__ */ jsx(ReactRemoveScroll, { forwardProps: !0, children: /* @__PURE__ */ jsx(
6187
- "div",
6188
- {
6189
- className: cx(
6190
- classes2 == null ? void 0 : classes2.body,
6191
- styles.body,
6192
- "overlay-body"
6193
- ),
6194
- children: opened && /* @__PURE__ */ jsx(Fragment, { children })
6195
- }
6196
- ) })
6197
- }
6198
- );
6199
- });
6200
- Overlay.displayName = "Overlay";
6201
6641
  const SectionHeader = styled("div", {
6202
6642
  base: {
6203
6643
  fontSize: "xs",
@@ -6209,13 +6649,13 @@ const SectionHeader = styled("div", {
6209
6649
  });
6210
6650
  function selectWalkthroughNotes(s) {
6211
6651
  var _a, _b, _c;
6212
- const isActive = n$2(s.activeWalkthrough), activeStepIndex = isActive ? s.xyedges.findIndex((e2) => {
6652
+ const isActive = e$5(s.activeWalkthrough), activeStepIndex = isActive ? s.xyedges.findIndex((e2) => {
6213
6653
  var _a2;
6214
6654
  return e2.id === ((_a2 = s.activeWalkthrough) == null ? void 0 : _a2.stepId);
6215
6655
  }) : -1;
6216
6656
  return {
6217
6657
  isActive,
6218
- isParallel: isActive && n((_a = s.activeWalkthrough) == null ? void 0 : _a.parallelPrefix),
6658
+ isParallel: isActive && e$2((_a = s.activeWalkthrough) == null ? void 0 : _a.parallelPrefix),
6219
6659
  hasNext: isActive && activeStepIndex < s.xyedges.length - 1,
6220
6660
  hasPrevious: isActive && activeStepIndex > 0,
6221
6661
  notes: isActive ? ((_c = (_b = s.xyedges[activeStepIndex]) == null ? void 0 : _b.data) == null ? void 0 : _c.notes) ?? RichText.EMPTY : null
@@ -6325,9 +6765,8 @@ const NavigationPanelImpl = ({ actor }) => {
6325
6765
  Popover,
6326
6766
  {
6327
6767
  offset: {
6328
- mainAxis: 2
6768
+ mainAxis: 4
6329
6769
  },
6330
- middlewares: { flip: !1 },
6331
6770
  opened,
6332
6771
  position: "bottom-start",
6333
6772
  trapFocus: !0,
@@ -6336,7 +6775,7 @@ const NavigationPanelImpl = ({ actor }) => {
6336
6775
  onDismiss: () => actor.send({ type: "dropdown.dismiss" }),
6337
6776
  children: [
6338
6777
  /* @__PURE__ */ jsx(NavigationPanelPopoverTarget, { actor }),
6339
- /* @__PURE__ */ jsx(NavigationPanelDropdown, {})
6778
+ opened && /* @__PURE__ */ jsx(NavigationPanelDropdown, {})
6340
6779
  ]
6341
6780
  }
6342
6781
  );
@@ -6401,7 +6840,7 @@ const useElementDetailsActorRef = () => {
6401
6840
  if (ctx === null)
6402
6841
  throw new Error("ElementDetailsActorRef is not provided");
6403
6842
  return ctx;
6404
- }, sortByLabel = (a2, b) => compareNatural(a2.label, b.label);
6843
+ }, sortByLabel = (a, b) => compareNatural(a.label, b.label);
6405
6844
  function buildNode(element) {
6406
6845
  return {
6407
6846
  label: element.title,
@@ -7035,7 +7474,7 @@ const ElementDetailsButtonWithHandler$1 = (props) => {
7035
7474
  /* @__PURE__ */ jsx(CompoundPorts$1, { ...props })
7036
7475
  ] }, props.id);
7037
7476
  }, EmptyNode = (props) => /* @__PURE__ */ jsx(EmptyNode$1, { ...props }), ElementPorts$1 = ({ data: { ports, height: h } }) => /* @__PURE__ */ jsxs(Fragment, { children: [
7038
- ports.in.map((id, i2) => /* @__PURE__ */ jsx(
7477
+ ports.in.map((id, i) => /* @__PURE__ */ jsx(
7039
7478
  Handle,
7040
7479
  {
7041
7480
  id,
@@ -7043,12 +7482,12 @@ const ElementDetailsButtonWithHandler$1 = (props) => {
7043
7482
  position: Position.Left,
7044
7483
  style: {
7045
7484
  visibility: "hidden",
7046
- top: `${15 + (i2 + 1) * ((h - 30) / (ports.in.length + 1))}px`
7485
+ top: `${15 + (i + 1) * ((h - 30) / (ports.in.length + 1))}px`
7047
7486
  }
7048
7487
  },
7049
7488
  id
7050
7489
  )),
7051
- ports.out.map((id, i2) => /* @__PURE__ */ jsx(
7490
+ ports.out.map((id, i) => /* @__PURE__ */ jsx(
7052
7491
  Handle,
7053
7492
  {
7054
7493
  id,
@@ -7056,13 +7495,13 @@ const ElementDetailsButtonWithHandler$1 = (props) => {
7056
7495
  position: Position.Right,
7057
7496
  style: {
7058
7497
  visibility: "hidden",
7059
- top: `${15 + (i2 + 1) * ((h - 30) / (ports.out.length + 1))}px`
7498
+ top: `${15 + (i + 1) * ((h - 30) / (ports.out.length + 1))}px`
7060
7499
  }
7061
7500
  },
7062
7501
  id
7063
7502
  ))
7064
7503
  ] }), CompoundPorts$1 = ({ data }) => /* @__PURE__ */ jsxs(Fragment, { children: [
7065
- data.ports.in.map((id, i2) => /* @__PURE__ */ jsx(
7504
+ data.ports.in.map((id, i) => /* @__PURE__ */ jsx(
7066
7505
  Handle,
7067
7506
  {
7068
7507
  id,
@@ -7070,12 +7509,12 @@ const ElementDetailsButtonWithHandler$1 = (props) => {
7070
7509
  position: Position.Left,
7071
7510
  style: {
7072
7511
  visibility: "hidden",
7073
- top: `${20 * (i2 + 1)}px`
7512
+ top: `${20 * (i + 1)}px`
7074
7513
  }
7075
7514
  },
7076
7515
  id
7077
7516
  )),
7078
- data.ports.out.map((id, i2) => /* @__PURE__ */ jsx(
7517
+ data.ports.out.map((id, i) => /* @__PURE__ */ jsx(
7079
7518
  Handle,
7080
7519
  {
7081
7520
  id,
@@ -7083,7 +7522,7 @@ const ElementDetailsButtonWithHandler$1 = (props) => {
7083
7522
  position: Position.Right,
7084
7523
  style: {
7085
7524
  visibility: "hidden",
7086
- top: `${20 * (i2 + 1)}px`
7525
+ top: `${20 * (i + 1)}px`
7087
7526
  }
7088
7527
  },
7089
7528
  id
@@ -7168,11 +7607,11 @@ function applyDagreLayout$1(g) {
7168
7607
  return dagre.layout(g, {
7169
7608
  // disableOptimalOrderHeuristic: true,
7170
7609
  }), (nodeId) => {
7171
- const node2 = g.node(nodeId), { x, y: y2, width, height } = node2;
7610
+ const node2 = g.node(nodeId), { x, y, width, height } = node2;
7172
7611
  return {
7173
7612
  position: {
7174
7613
  x: x - Math.round(width / 2),
7175
- y: y2 - Math.round(height / 2)
7614
+ y: y - Math.round(height / 2)
7176
7615
  },
7177
7616
  width,
7178
7617
  height
@@ -7186,11 +7625,11 @@ var LayoutRelationshipsViewResult;
7186
7625
  function layoutRelationshipsView(data, scope) {
7187
7626
  var _a, _b;
7188
7627
  const g = createGraph$1(), incomers = createNodes$1("incomers", data.incomers, g), subjects = createNodes$1("subjects", data.subjects, g), outgoers = createNodes$1("outgoers", data.outgoers, g), edges = [];
7189
- C(
7190
- a$1(
7191
- C(
7628
+ t$1(
7629
+ t$d(
7630
+ t$1(
7192
7631
  toArray(data.incoming),
7193
- m$2((r2) => ({
7632
+ t$c((r2) => ({
7194
7633
  id: r2.source.id,
7195
7634
  sourceFqn: r2.source.id,
7196
7635
  targetFqn: r2.target.id,
@@ -7199,9 +7638,9 @@ function layoutRelationshipsView(data, scope) {
7199
7638
  relation: r2
7200
7639
  }))
7201
7640
  ),
7202
- C(
7641
+ t$1(
7203
7642
  toArray(data.outgoing),
7204
- m$2((r2) => ({
7643
+ t$c((r2) => ({
7205
7644
  id: r2.target.id,
7206
7645
  sourceFqn: r2.source.id,
7207
7646
  targetFqn: r2.target.id,
@@ -7211,13 +7650,13 @@ function layoutRelationshipsView(data, scope) {
7211
7650
  }))
7212
7651
  )
7213
7652
  ),
7214
- m$2((r2) => ({
7653
+ t$c((r2) => ({
7215
7654
  ...r2,
7216
7655
  expr: `${r2.source.id}->${r2.target.id}`
7217
7656
  })),
7218
7657
  // Group if same source and target
7219
- i$2(p("expr")),
7220
- i$1((grouped) => {
7658
+ t$b(e$6("expr")),
7659
+ t$a((grouped) => {
7221
7660
  const source = grouped[0].source, target = grouped[0].target, name = grouped[0].expr;
7222
7661
  g.node(source.id).outPorts.push(target.id), g.node(target.id).inPorts.push(source.id), g.setEdge(source.portId, target.portId, {
7223
7662
  ...Sizes$1.edgeLabel
@@ -7229,7 +7668,7 @@ function layoutRelationshipsView(data, scope) {
7229
7668
  sourceHandle: source.id + "_out" + (g.node(source.id).outPorts.length - 1),
7230
7669
  target: target.id,
7231
7670
  targetHandle: target.id + "_in" + (g.node(target.id).inPorts.length - 1),
7232
- relations: m$2(grouped, p("relation"))
7671
+ relations: t$c(grouped, e$6("relation"))
7233
7672
  });
7234
7673
  })
7235
7674
  );
@@ -7290,21 +7729,21 @@ function layoutRelationshipsView(data, scope) {
7290
7729
  ...Sizes$1.edgeLabel,
7291
7730
  width: edgeCount > 25 ? 800 : 400
7292
7731
  });
7293
- const dagreBounds = applyDagreLayout$1(g), _calculatedNodeBounds = C(
7732
+ const dagreBounds = applyDagreLayout$1(g), _calculatedNodeBounds = t$1(
7294
7733
  nodeIds,
7295
7734
  // Compound nodes have different portId
7296
- m$3((n2) => n2.id === n2.portId),
7297
- l((n2) => [n2.id, dagreBounds(n2.id)])
7735
+ n$2((n2) => n2.id === n2.portId),
7736
+ t((n2) => [n2.id, dagreBounds(n2.id)])
7298
7737
  );
7299
7738
  function nodeBounds(nodeId) {
7300
- return _calculatedNodeBounds[nodeId] ?? (_calculatedNodeBounds[nodeId] = C(
7739
+ return _calculatedNodeBounds[nodeId] ?? (_calculatedNodeBounds[nodeId] = t$1(
7301
7740
  g.children(nodeId) ?? [],
7302
- m$3((id) => !id.endsWith(PortSuffix$1)),
7303
- m$2((id) => nodeBounds(id)),
7304
- r$1((bounds) => {
7741
+ n$2((id) => !id.endsWith(PortSuffix$1)),
7742
+ t$c((id) => nodeBounds(id)),
7743
+ t$g((bounds) => {
7305
7744
  invariant(bounds.length > 0, `Node ${nodeId} has no nested nodes`);
7306
7745
  }),
7307
- l$1((acc, bounds) => ({
7746
+ t$f((acc, bounds) => ({
7308
7747
  minY: Math.min(acc.minY, bounds.position.y),
7309
7748
  maxY: Math.max(acc.maxY, bounds.position.y + bounds.height)
7310
7749
  }), { minY: 1 / 0, maxY: -1 / 0 }),
@@ -7332,14 +7771,14 @@ function layoutRelationshipsView(data, scope) {
7332
7771
  const children = g.children(nodeId) ?? [];
7333
7772
  return children.length === 0 ? 0 : 1 + Math.max(...children.map(nodeDepth));
7334
7773
  }
7335
- const sortedPorts = (nodeId, type, ports) => C(
7774
+ const sortedPorts = (nodeId, type, ports) => t$1(
7336
7775
  ports,
7337
- m$2((port, index2) => ({
7776
+ t$c((port, index2) => ({
7338
7777
  port: nodeId + "_" + type + index2,
7339
7778
  topY: nodeBounds(port).position.y
7340
7779
  })),
7341
- a$2(p("topY")),
7342
- m$2(p("port"))
7780
+ t$h(e$6("topY")),
7781
+ t$c(e$6("port"))
7343
7782
  );
7344
7783
  let minX = 0, minY = 0;
7345
7784
  const [subject] = [...subjects.root];
@@ -7394,7 +7833,7 @@ function layoutRelationshipsView(data, scope) {
7394
7833
  }
7395
7834
  const parentId = g.parent(id), children = (g.children(id) ?? []).filter((c) => !c.endsWith(PortSuffix$1));
7396
7835
  minX = Math.min(minX, position.x), minY = Math.min(minY, position.y);
7397
- const navigateTo = scope ? ((_a2 = ifind(element.scopedViews(), (v) => v.id !== scope.id)) == null ? void 0 : _a2.id) ?? null : null, inheritFromNode = scope == null ? void 0 : scope.findNodeWithElement(element.id), scopedAncestor = scope && !inheritFromNode ? (_b2 = ifind(element.ancestors(), (a2) => !!scope.findNodeWithElement(a2.id))) == null ? void 0 : _b2.id : null, inheritFromNodeOrAncestor = inheritFromNode ?? (scopedAncestor && (scope == null ? void 0 : scope.findNodeWithElement(scopedAncestor)));
7836
+ const navigateTo = scope ? ((_a2 = ifind(element.scopedViews(), (v) => v.id !== scope.id)) == null ? void 0 : _a2.id) ?? null : null, inheritFromNode = scope == null ? void 0 : scope.findNodeWithElement(element.id), scopedAncestor = scope && !inheritFromNode ? (_b2 = ifind(element.ancestors(), (a) => !!scope.findNodeWithElement(a.id))) == null ? void 0 : _b2.id : null, inheritFromNodeOrAncestor = inheritFromNode ?? (scopedAncestor && (scope == null ? void 0 : scope.findNodeWithElement(scopedAncestor)));
7398
7837
  return {
7399
7838
  id,
7400
7839
  parent: parentId ?? null,
@@ -7457,7 +7896,7 @@ function layoutRelationshipsView(data, scope) {
7457
7896
  relations,
7458
7897
  sourceHandle,
7459
7898
  targetHandle
7460
- } = nonNullable$1(f(edges, (e22) => e22.name === ename)), onlyRelation = t$3(relations), label2 = (onlyRelation == null ? void 0 : onlyRelation.title) ?? "untitled", isMultiple = relations.length > 1, navigateTo = t$3(i$3(relations.flatMap((r2) => {
7899
+ } = nonNullable$1(r(edges, (e22) => e22.name === ename)), onlyRelation = t$e(relations), label2 = (onlyRelation == null ? void 0 : onlyRelation.title) ?? "untitled", isMultiple = relations.length > 1, navigateTo = t$e(n$3(relations.flatMap((r2) => {
7461
7900
  var _a2;
7462
7901
  return (_a2 = r2.navigateTo) != null && _a2.id ? r2.navigateTo.id : [];
7463
7902
  })));
@@ -7472,7 +7911,7 @@ function layoutRelationshipsView(data, scope) {
7472
7911
  label: isMultiple ? `${relations.length} relationships` : label2,
7473
7912
  ...navigateTo && { navigateTo },
7474
7913
  existsInCurrentView: !scope || relations.every((r2) => scope.includesRelation(r2.id)),
7475
- points: edge.points.map((p2) => [p2.x, p2.y]),
7914
+ points: edge.points.map((p) => [p.x, p.y]),
7476
7915
  line: (onlyRelation == null ? void 0 : onlyRelation.$relationship.line) ?? "dashed",
7477
7916
  relations: relations.map((r2) => r2.id),
7478
7917
  parent: null
@@ -7721,7 +8160,7 @@ const selector$5 = (state) => ({
7721
8160
  isActive: state.hasTag("active"),
7722
8161
  nodes: state.context.xynodes,
7723
8162
  edges: state.context.xyedges
7724
- }), selectorEq = (a2, b) => a2.isActive === b.isActive && shallowEqual(a2.nodes, b.nodes) && shallowEqual(a2.edges, b.edges), RelationshipsBrowserXYFlow = memo$1(() => {
8163
+ }), selectorEq = (a, b) => a.isActive === b.isActive && shallowEqual(a.nodes, b.nodes) && shallowEqual(a.edges, b.edges), RelationshipsBrowserXYFlow = memo$1(() => {
7725
8164
  const browser = useRelationshipsBrowser(), {
7726
8165
  isActive,
7727
8166
  nodes,
@@ -7989,7 +8428,7 @@ function TabPanelRelationships({
7989
8428
  node: node2,
7990
8429
  element
7991
8430
  }) {
7992
- const overlaysActor = useOverlaysActorRef(), delailsActor = useElementDetailsActorRef(), relationshipsBrowserActor = xstateReact_cjsExports.useSelector(delailsActor, (s) => s.children[`${delailsActor.id}-relationships`]), [scope, setScope] = useState("view"), incoming = [...element.incoming()].map((r2) => r2.id), outgoing = [...element.outgoing()].map((r2) => r2.id), incomingInView = node2 ? i$3([...node2.incoming()].flatMap((e2) => e2.$edge.relations)) : [], outgoingInView = node2 ? i$3([...node2.outgoing()].flatMap((e2) => e2.$edge.relations)) : [], notIncludedRelations = [
8431
+ const overlaysActor = useOverlaysActorRef(), delailsActor = useElementDetailsActorRef(), relationshipsBrowserActor = xstateReact_cjsExports.useSelector(delailsActor, (s) => s.children[`${delailsActor.id}-relationships`]), [scope, setScope] = useState("view"), incoming = [...element.incoming()].map((r2) => r2.id), outgoing = [...element.outgoing()].map((r2) => r2.id), incomingInView = node2 ? n$3([...node2.incoming()].flatMap((e2) => e2.$edge.relations)) : [], outgoingInView = node2 ? n$3([...node2.outgoing()].flatMap((e2) => e2.$edge.relations)) : [], notIncludedRelations = [
7993
8432
  ...incoming,
7994
8433
  ...outgoing
7995
8434
  ].filter((r2) => !incomingInView.includes(r2) && !outgoingInView.includes(r2)).length;
@@ -8235,33 +8674,33 @@ function ElementDetailsCard({
8235
8674
  const [opened, setOpened] = useState(!1), windowSize = useViewportSize(), windowWidth = windowSize.width || window.innerWidth || 1200, windowHeight = windowSize.height || window.innerHeight || 800, [activeTab, setActiveTab] = useSessionStorage({
8236
8675
  key: "likec4:element-details:active-tab",
8237
8676
  defaultValue: "Properties"
8238
- }), diagram = useDiagram(), viewModel = useLikeC4Model().view(viewId), nodeModel = fromNode ? viewModel.findNode(fromNode) : viewModel.findNodeWithElement(fqn2), elementModel = viewModel.$model.element(fqn2), [viewsOf, otherViews] = C(
8677
+ }), diagram = useDiagram(), viewModel = useLikeC4Model().view(viewId), nodeModel = fromNode ? viewModel.findNode(fromNode) : viewModel.findNodeWithElement(fqn2), elementModel = viewModel.$model.element(fqn2), [viewsOf, otherViews] = t$1(
8239
8678
  [...elementModel.views()],
8240
- m$2((v) => v.$view),
8241
- d$1((v) => v._type === "element" && v.viewOf === fqn2)
8679
+ t$c((v) => v.$view),
8680
+ t$i((v) => v._type === "element" && v.viewOf === fqn2)
8242
8681
  );
8243
8682
  let defaultView = ((_a = nodeModel == null ? void 0 : nodeModel.navigateTo) == null ? void 0 : _a.$view) ?? ((_b = elementModel.defaultView) == null ? void 0 : _b.$view) ?? null;
8244
8683
  (defaultView == null ? void 0 : defaultView.id) === viewId && (defaultView = null);
8245
- const defaultLink = t$3(elementModel.links), controls = useDragControls(), isCompound = (((_c = nodeModel == null ? void 0 : nodeModel.$node.children) == null ? void 0 : _c.length) ?? 0) > 0, _width = Math.min(700, windowWidth - MIN_PADDING * 2), _height = Math.min(650, windowHeight - MIN_PADDING * 2), fromPositon = rectFromNode ? {
8684
+ const defaultLink = t$e(elementModel.links), controls = useDragControls(), isCompound = (((_c = nodeModel == null ? void 0 : nodeModel.$node.children) == null ? void 0 : _c.length) ?? 0) > 0, _width = Math.min(700, windowWidth - MIN_PADDING * 2), _height = Math.min(650, windowHeight - MIN_PADDING * 2), fromPositon = rectFromNode ? {
8246
8685
  x: rectFromNode.x + (isCompound ? rectFromNode.width - _width / 2 : rectFromNode.width / 2),
8247
8686
  y: rectFromNode.y + (isCompound ? 0 : rectFromNode.height / 2)
8248
8687
  } : {
8249
8688
  x: windowWidth / 2,
8250
8689
  y: windowHeight / 2
8251
8690
  }, fromScale = rectFromNode ? Math.min(rectFromNode.width / _width, rectFromNode.height / _height, 0.9) : 1, left = Math.round(
8252
- u$1(fromPositon.x - _width / 2, {
8691
+ t$5(fromPositon.x - _width / 2, {
8253
8692
  min: MIN_PADDING,
8254
8693
  max: windowWidth - _width - MIN_PADDING
8255
8694
  })
8256
8695
  ), top = Math.round(
8257
- u$1(fromPositon.y - (isCompound ? 0 : 60), {
8696
+ t$5(fromPositon.y - (isCompound ? 0 : 60), {
8258
8697
  min: MIN_PADDING,
8259
8698
  max: windowHeight - _height - MIN_PADDING
8260
8699
  })
8261
- ), originX = u$1((fromPositon.x - left) / _width, {
8700
+ ), originX = t$5((fromPositon.x - left) / _width, {
8262
8701
  min: 0.1,
8263
8702
  max: 0.9
8264
- }), originY = u$1((fromPositon.y - top) / _height, {
8703
+ }), originY = t$5((fromPositon.y - top) / _height, {
8265
8704
  min: 0.1,
8266
8705
  max: 0.9
8267
8706
  }), width = useMotionValue(_width), height = useMotionValue(_height);
@@ -8502,7 +8941,7 @@ function ElementDetailsCard({
8502
8941
  elementModel.technology && /* @__PURE__ */ jsx(ElementProperty, { title: "technology", children: elementModel.technology }),
8503
8942
  elementModel.links.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
8504
8943
  /* @__PURE__ */ jsx(PropertyLabel, { children: "links" }),
8505
- /* @__PURE__ */ jsx(HStack, { gap: "xs", flexWrap: "wrap", children: elementModel.links.map((link, i2) => /* @__PURE__ */ jsx(Link, { value: link }, i2)) })
8944
+ /* @__PURE__ */ jsx(HStack, { gap: "xs", flexWrap: "wrap", children: elementModel.links.map((link, i) => /* @__PURE__ */ jsx(Link, { value: link }, i)) })
8506
8945
  ] }),
8507
8946
  elementModel.$element.metadata && /* @__PURE__ */ jsx(ElementMetata, { value: elementModel.$element.metadata })
8508
8947
  ] }) }) }),
@@ -8588,7 +9027,7 @@ function ElementProperty({
8588
9027
  Text,
8589
9028
  {
8590
9029
  component: "div",
8591
- ...n$3(children) && { c: "dimmed" },
9030
+ ...e$7(children) && { c: "dimmed" },
8592
9031
  fz: "md",
8593
9032
  style: {
8594
9033
  whiteSpace: "preserve-breaks",
@@ -8619,7 +9058,7 @@ function ElementMetata({
8619
9058
  justifyItems: "stretch",
8620
9059
  paddingRight: "xxs"
8621
9060
  }),
8622
- children: t$1(metadata).map(([key2, value]) => /* @__PURE__ */ jsxs(
9061
+ children: t$4(metadata).map(([key2, value]) => /* @__PURE__ */ jsxs(
8623
9062
  "div",
8624
9063
  {
8625
9064
  className: cx(
@@ -8729,7 +9168,7 @@ function computeEdgeDetailsViewData(edges, view) {
8729
9168
  };
8730
9169
  for (const edgeId of edges) {
8731
9170
  const edge = view.findEdge(edgeId), _relationships = edge ? [...edge.relationships("model")] : [];
8732
- if (!edge || !i(_relationships, 1) || !edge.source.hasElement() || !edge.target.hasElement())
9171
+ if (!edge || !t$6(_relationships, 1) || !edge.source.hasElement() || !edge.target.hasElement())
8733
9172
  continue;
8734
9173
  const source = edge.source.element, target = edge.target.element;
8735
9174
  addExplicit(source, "source"), addExplicit(target, "target");
@@ -8887,7 +9326,7 @@ const RelationshipEdge = customEdge((props) => {
8887
9326
  /* @__PURE__ */ jsx(CompoundTitle, { ...props }),
8888
9327
  /* @__PURE__ */ jsx(CompoundPorts, { ...props })
8889
9328
  ] })), ElementPorts = ({ data: { ports, height: h } }) => /* @__PURE__ */ jsxs(Fragment, { children: [
8890
- ports.in.map((id, i2) => /* @__PURE__ */ jsx(
9329
+ ports.in.map((id, i) => /* @__PURE__ */ jsx(
8891
9330
  Handle,
8892
9331
  {
8893
9332
  id,
@@ -8895,12 +9334,12 @@ const RelationshipEdge = customEdge((props) => {
8895
9334
  position: Position.Left,
8896
9335
  style: {
8897
9336
  visibility: "hidden",
8898
- top: `${15 + (i2 + 1) * ((h - 30) / (ports.in.length + 1))}px`
9337
+ top: `${15 + (i + 1) * ((h - 30) / (ports.in.length + 1))}px`
8899
9338
  }
8900
9339
  },
8901
9340
  id
8902
9341
  )),
8903
- ports.out.map((id, i2) => /* @__PURE__ */ jsx(
9342
+ ports.out.map((id, i) => /* @__PURE__ */ jsx(
8904
9343
  Handle,
8905
9344
  {
8906
9345
  id,
@@ -8908,13 +9347,13 @@ const RelationshipEdge = customEdge((props) => {
8908
9347
  position: Position.Right,
8909
9348
  style: {
8910
9349
  visibility: "hidden",
8911
- top: `${15 + (i2 + 1) * ((h - 30) / (ports.out.length + 1))}px`
9350
+ top: `${15 + (i + 1) * ((h - 30) / (ports.out.length + 1))}px`
8912
9351
  }
8913
9352
  },
8914
9353
  id
8915
9354
  ))
8916
9355
  ] }), CompoundPorts = ({ data }) => /* @__PURE__ */ jsxs(Fragment, { children: [
8917
- data.ports.in.map((id, i2) => /* @__PURE__ */ jsx(
9356
+ data.ports.in.map((id, i) => /* @__PURE__ */ jsx(
8918
9357
  Handle,
8919
9358
  {
8920
9359
  id,
@@ -8922,12 +9361,12 @@ const RelationshipEdge = customEdge((props) => {
8922
9361
  position: Position.Left,
8923
9362
  style: {
8924
9363
  visibility: "hidden",
8925
- top: `${20 * (i2 + 1)}px`
9364
+ top: `${20 * (i + 1)}px`
8926
9365
  }
8927
9366
  },
8928
9367
  id
8929
9368
  )),
8930
- data.ports.out.map((id, i2) => /* @__PURE__ */ jsx(
9369
+ data.ports.out.map((id, i) => /* @__PURE__ */ jsx(
8931
9370
  Handle,
8932
9371
  {
8933
9372
  id,
@@ -8935,7 +9374,7 @@ const RelationshipEdge = customEdge((props) => {
8935
9374
  position: Position.Right,
8936
9375
  style: {
8937
9376
  visibility: "hidden",
8938
- top: `${20 * (i2 + 1)}px`
9377
+ top: `${20 * (i + 1)}px`
8939
9378
  }
8940
9379
  },
8941
9380
  id
@@ -9047,11 +9486,11 @@ function applyDagreLayout(g) {
9047
9486
  return dagre.layout(g, {
9048
9487
  // disableOptimalOrderHeuristic: true,
9049
9488
  }), (nodeId) => {
9050
- const node2 = g.node(nodeId), { x, y: y2, width, height } = node2;
9489
+ const node2 = g.node(nodeId), { x, y, width, height } = node2;
9051
9490
  return {
9052
9491
  position: {
9053
9492
  x: x - Math.round(width / 2),
9054
- y: y2 - Math.round(height / 2)
9493
+ y: y - Math.round(height / 2)
9055
9494
  },
9056
9495
  width,
9057
9496
  height
@@ -9090,21 +9529,21 @@ function layoutRelationshipDetails(data, scope) {
9090
9529
  ...Sizes.edgeLabel,
9091
9530
  width: edgeCount > 10 ? 800 : 400
9092
9531
  });
9093
- const dagreBounds = applyDagreLayout(g), _calculatedNodeBounds = C(
9532
+ const dagreBounds = applyDagreLayout(g), _calculatedNodeBounds = t$1(
9094
9533
  nodeIds,
9095
9534
  // Compound nodes have different portId
9096
- m$3((n2) => n2.id === n2.portId),
9097
- l((n2) => [n2.id, dagreBounds(n2.id)])
9535
+ n$2((n2) => n2.id === n2.portId),
9536
+ t((n2) => [n2.id, dagreBounds(n2.id)])
9098
9537
  );
9099
9538
  function nodeBounds(nodeId) {
9100
- return _calculatedNodeBounds[nodeId] ?? (_calculatedNodeBounds[nodeId] = C(
9539
+ return _calculatedNodeBounds[nodeId] ?? (_calculatedNodeBounds[nodeId] = t$1(
9101
9540
  g.children(nodeId) ?? [],
9102
- m$3((id) => !id.endsWith(PortSuffix)),
9103
- m$2((id) => nodeBounds(id)),
9104
- r$1((bounds) => {
9541
+ n$2((id) => !id.endsWith(PortSuffix)),
9542
+ t$c((id) => nodeBounds(id)),
9543
+ t$g((bounds) => {
9105
9544
  invariant(bounds.length > 0, `Node ${nodeId} has no nested nodes`);
9106
9545
  }),
9107
- l$1((acc, bounds) => ({
9546
+ t$f((acc, bounds) => ({
9108
9547
  minY: Math.min(acc.minY, bounds.position.y),
9109
9548
  maxY: Math.max(acc.maxY, bounds.position.y + bounds.height)
9110
9549
  }), { minY: 1 / 0, maxY: -1 / 0 }),
@@ -9132,14 +9571,14 @@ function layoutRelationshipDetails(data, scope) {
9132
9571
  const children = g.children(nodeId) ?? [];
9133
9572
  return children.length === 0 ? 0 : 1 + Math.max(...children.map(nodeDepth));
9134
9573
  }
9135
- const sortedPorts = (nodeId, type, ports) => C(
9574
+ const sortedPorts = (nodeId, type, ports) => t$1(
9136
9575
  ports,
9137
- m$2((port, index2) => ({
9576
+ t$c((port, index2) => ({
9138
9577
  port: nodeId + "_" + type + index2,
9139
9578
  topY: nodeBounds(port).position.y
9140
9579
  })),
9141
- a$2(p("topY")),
9142
- m$2(p("port"))
9580
+ t$h(e$6("topY")),
9581
+ t$c(e$6("port"))
9143
9582
  );
9144
9583
  let minX = 0, minY = 0;
9145
9584
  const nodes = nodeIds.map(({ id }) => {
@@ -9148,7 +9587,7 @@ function layoutRelationshipDetails(data, scope) {
9148
9587
  let { position, width, height } = nodeBounds(id);
9149
9588
  const parentId = g.parent(id), children = (g.children(id) ?? []).filter((c) => !c.endsWith(PortSuffix));
9150
9589
  minX = Math.min(minX, position.x), minY = Math.min(minY, position.y);
9151
- const navigateTo = scope ? ((_a2 = ifind(element.scopedViews(), (v) => v.id !== scope.id)) == null ? void 0 : _a2.id) ?? null : null, inheritFromNode = scope == null ? void 0 : scope.findNodeWithElement(element.id), scopedAncestor = scope && !inheritFromNode ? (_b2 = ifind(element.ancestors(), (a2) => !!scope.findNodeWithElement(a2.id))) == null ? void 0 : _b2.id : null, inheritFromNodeOrAncestor = inheritFromNode ?? (scopedAncestor && (scope == null ? void 0 : scope.findNodeWithElement(scopedAncestor)));
9590
+ const navigateTo = scope ? ((_a2 = ifind(element.scopedViews(), (v) => v.id !== scope.id)) == null ? void 0 : _a2.id) ?? null : null, inheritFromNode = scope == null ? void 0 : scope.findNodeWithElement(element.id), scopedAncestor = scope && !inheritFromNode ? (_b2 = ifind(element.ancestors(), (a) => !!scope.findNodeWithElement(a.id))) == null ? void 0 : _b2.id : null, inheritFromNodeOrAncestor = inheritFromNode ?? (scopedAncestor && (scope == null ? void 0 : scope.findNodeWithElement(scopedAncestor)));
9152
9591
  return {
9153
9592
  id,
9154
9593
  parent: parentId ?? null,
@@ -9201,7 +9640,7 @@ function layoutRelationshipDetails(data, scope) {
9201
9640
  const edge = g.edge(e2), ename = e2.name;
9202
9641
  if (!ename)
9203
9642
  return acc;
9204
- const { name, source, target, relationship, sourceHandle, targetHandle } = f(edges, (e22) => e22.name === ename), label2 = relationship.title ?? "untitled", navigateTo = ((_a2 = relationship.navigateTo) == null ? void 0 : _a2.id) ?? null, description2 = relationship.description ?? null, technology = relationship.technology ?? null;
9643
+ const { name, source, target, relationship, sourceHandle, targetHandle } = r(edges, (e22) => e22.name === ename), label2 = relationship.title ?? "untitled", navigateTo = ((_a2 = relationship.navigateTo) == null ? void 0 : _a2.id) ?? null, description2 = relationship.description ?? null, technology = relationship.technology ?? null;
9205
9644
  return acc.push({
9206
9645
  id: name,
9207
9646
  source,
@@ -9213,7 +9652,7 @@ function layoutRelationshipDetails(data, scope) {
9213
9652
  ...navigateTo && { navigateTo },
9214
9653
  ...description2 && { description: description2 },
9215
9654
  ...technology && { technology },
9216
- points: edge.points.map((p2) => [p2.x, p2.y]),
9655
+ points: edge.points.map((p) => [p.x, p.y]),
9217
9656
  line: relationship.line,
9218
9657
  relationId: relationship.id,
9219
9658
  parent: null
@@ -9419,7 +9858,7 @@ const selectSubject = (state) => ({
9419
9858
  }), SyncRelationshipDetailsXYFlow = memo$1(() => {
9420
9859
  const actor = useRelationshipDetailsActor(), subject = xstateReact_cjsExports.useSelector(actor, selectSubject, deepEqual), likec4model = useLikeC4Model(), view = likec4model.findView(subject.viewId) ?? null, data = useMemo(() => {
9421
9860
  let data2;
9422
- if ("edgeId" in subject && n(subject.edgeId)) {
9861
+ if ("edgeId" in subject && e$2(subject.edgeId)) {
9423
9862
  invariant$1(view, `view ${subject.viewId} not found`);
9424
9863
  const edge = nonNullable(view.findEdge(subject.edgeId), `edge ${subject.edgeId} not found in ${subject.viewId}`);
9425
9864
  data2 = computeEdgeDetailsViewData([edge.id], view);
@@ -9521,10 +9960,10 @@ const selectSubject = (state) => ({
9521
9960
  if (!view || !view.isDiagram())
9522
9961
  return null;
9523
9962
  const edges = [...view.edges()];
9524
- let edge = "edgeId" in subject && n(subject.edgeId) ? edges.find((e2) => e2.id === subject.edgeId) : f(edges, (e2) => {
9963
+ let edge = "edgeId" in subject && e$2(subject.edgeId) ? edges.find((e2) => e2.id === subject.edgeId) : r(edges, (e2) => {
9525
9964
  var _a, _b;
9526
9965
  return ((_a = e2.source.element) == null ? void 0 : _a.id) === subject.source && ((_b = e2.target.element) == null ? void 0 : _b.id) === subject.target;
9527
- }) || f(edges, (e2) => {
9966
+ }) || r(edges, (e2) => {
9528
9967
  var _a, _b, _c, _d;
9529
9968
  return (((_a = e2.source.element) == null ? void 0 : _a.id) === subject.source || isAncestor$1(((_b = e2.source.element) == null ? void 0 : _b.id) ?? "__", subject.source ?? "__")) && (((_c = e2.target.element) == null ? void 0 : _c.id) === subject.target || isAncestor$1(((_d = e2.target.element) == null ? void 0 : _d.id) ?? "__", subject.target ?? "__"));
9530
9969
  });
@@ -9608,7 +10047,7 @@ const selectSubject = (state) => ({
9608
10047
  default:
9609
10048
  nonexhaustive(overlay2);
9610
10049
  }
9611
- }).filter(l$2), compareSelectOverlays = (a2, b) => a2.length === b.length && a2.every((overlay2, i2) => overlay2.actorRef === b[i2].actorRef);
10050
+ }).filter(e$8), compareSelectOverlays = (a, b) => a.length === b.length && a.every((overlay2, i) => overlay2.actorRef === b[i].actorRef);
9612
10051
  function Overlays({ overlaysActorRef }) {
9613
10052
  const xyflowDomNode = useXYStore((s) => s.domNode), xyflowRendererDom = useMemo(() => (xyflowDomNode == null ? void 0 : xyflowDomNode.querySelector(".react-flow__renderer")) ?? null, [
9614
10053
  xyflowDomNode
@@ -9902,7 +10341,7 @@ function moveFocusToSearchInput(from) {
9902
10341
  return;
9903
10342
  }
9904
10343
  const root2 = from.getRootNode();
9905
- if (!t(root2.querySelector)) {
10344
+ if (!e(root2.querySelector)) {
9906
10345
  console.error("moveFocusToSearchInput: root.querySelector is not a function");
9907
10346
  return;
9908
10347
  }
@@ -9918,7 +10357,7 @@ function focusToFirstFoundElement(from) {
9918
10357
  return;
9919
10358
  }
9920
10359
  const root2 = from.getRootNode();
9921
- if (!t(root2.querySelector)) {
10360
+ if (!e(root2.querySelector)) {
9922
10361
  console.error("focusToFirstFoundElement: root.querySelector is not a function");
9923
10362
  return;
9924
10363
  }
@@ -9929,7 +10368,7 @@ function queryAllFocusable(from, where, selector3 = `.${focusable}`) {
9929
10368
  if (!from)
9930
10369
  return console.error("queryAllFocusable: from is null or undefined"), [];
9931
10370
  const root2 = from.getRootNode();
9932
- return t(root2.querySelectorAll) ? [...root2.querySelectorAll(`[data-likec4-search-${where}] ${selector3}`)] : (console.error("queryAllFocusable: root.querySelectorAll is not a function"), []);
10371
+ return e(root2.querySelectorAll) ? [...root2.querySelectorAll(`[data-likec4-search-${where}] ${selector3}`)] : (console.error("queryAllFocusable: root.querySelectorAll is not a function"), []);
9933
10372
  }
9934
10373
  const _viewBtn = "likec4-view-btn", viewButton = cx(
9935
10374
  css({
@@ -9968,8 +10407,8 @@ const NothingFound = () => /* @__PURE__ */ jsx(Box, { className: emptyBoX, child
9968
10407
  onKeyDown: (e2) => {
9969
10408
  if (e2.key === "ArrowLeft" || e2.key === "ArrowRight") {
9970
10409
  const maxY = e2.target.getBoundingClientRect().y, elementButtons = queryAllFocusable(ref.current, "elements", ".likec4-element-button");
9971
- let elementButton = elementButtons.length > 1 ? elementButtons.find((el, i2, all) => centerY(el) > maxY || i2 === all.length - 1) : null;
9972
- elementButton ?? (elementButton = d(elementButtons)), elementButton && (e2.stopPropagation(), elementButton.focus());
10410
+ let elementButton = elementButtons.length > 1 ? elementButtons.find((el, i, all) => centerY(el) > maxY || i === all.length - 1) : null;
10411
+ elementButton ?? (elementButton = n$1(elementButtons)), elementButton && (e2.stopPropagation(), elementButton.focus());
9973
10412
  return;
9974
10413
  }
9975
10414
  },
@@ -9985,12 +10424,12 @@ const NothingFound = () => /* @__PURE__ */ jsx(Box, { className: emptyBoX, child
9985
10424
  }
9986
10425
  }
9987
10426
  ) }),
9988
- views.map((view, i2) => /* @__PURE__ */ jsx(MotionDiv, { layoutId: `@view${view.id}`, children: /* @__PURE__ */ jsx(
10427
+ views.map((view, i) => /* @__PURE__ */ jsx(MotionDiv, { layoutId: `@view${view.id}`, children: /* @__PURE__ */ jsx(
9989
10428
  ViewButton,
9990
10429
  {
9991
10430
  view,
9992
10431
  search,
9993
- tabIndex: i2 === 0 ? 0 : -1
10432
+ tabIndex: i === 0 ? 0 : -1
9994
10433
  }
9995
10434
  ) }, view.id))
9996
10435
  ]
@@ -10049,11 +10488,11 @@ const btn$1 = buttonsva(), ElementsColumn = memo$1(() => {
10049
10488
  const model = useLikeC4Model(), search = useNormalizedSearch(), data = useMemo(() => {
10050
10489
  const searchTerms = search.split(".");
10051
10490
  let elements;
10052
- n$1(searchTerms) || searchTerms[0] === "kind:" ? elements = model.elements() : elements = ifilter(model.elements(), (element) => search.startsWith("kind:") ? element.kind.toLocaleLowerCase().startsWith(search.slice(5)) : search.startsWith("#") ? element.tags.some((tag) => tag.toLocaleLowerCase().includes(search.slice(1))) : (element.title + " " + element.id + " " + (element.description ?? "")).toLocaleLowerCase().includes(search));
10053
- const byid = {}, { all, roots } = C(
10491
+ e$4(searchTerms) || searchTerms[0] === "kind:" ? elements = model.elements() : elements = ifilter(model.elements(), (element) => search.startsWith("kind:") ? element.kind.toLocaleLowerCase().startsWith(search.slice(5)) : search.startsWith("#") ? element.tags.some((tag) => tag.toLocaleLowerCase().includes(search.slice(1))) : (element.title + " " + element.id + " " + (element.description ?? "")).toLocaleLowerCase().includes(search));
10492
+ const byid = {}, { all, roots } = t$1(
10054
10493
  [...elements],
10055
10494
  sortParentsFirst,
10056
- l$1((acc, element) => {
10495
+ t$f((acc, element) => {
10057
10496
  const treeItem = {
10058
10497
  label: element.title,
10059
10498
  value: element.id,
@@ -10106,8 +10545,8 @@ function ElementsTree({
10106
10545
  if (node2.children.length > 0 && tree.expandedState[id] === !1)
10107
10546
  return;
10108
10547
  const maxY = (e2.target.querySelector(".mantine-Tree-label") ?? target).getBoundingClientRect().y, viewButtons = queryAllFocusable(target, "views");
10109
- let view = viewButtons.length > 1 ? viewButtons.find((el, i2, all2) => centerY(el) > maxY || i2 === all2.length - 1) : null;
10110
- view ?? (view = d(viewButtons)), view && (stopAndPrevent(e2), view.focus());
10548
+ let view = viewButtons.length > 1 ? viewButtons.find((el, i, all2) => centerY(el) > maxY || i === all2.length - 1) : null;
10549
+ view ?? (view = n$1(viewButtons)), view && (stopAndPrevent(e2), view.focus());
10111
10550
  return;
10112
10551
  }
10113
10552
  if (e2.key === " " || e2.key === "Enter") {
@@ -10217,7 +10656,7 @@ function useHandleElementSelection() {
10217
10656
  const views = [...element.views()];
10218
10657
  if (views.length === 0)
10219
10658
  return;
10220
- const singleView = t$3(views);
10659
+ const singleView = t$e(views);
10221
10660
  if (singleView) {
10222
10661
  searchActorRef.send({ type: "close" }), singleView.id !== diagram.currentView.id && setTimeout(() => {
10223
10662
  diagram.navigateTo(singleView.id);
@@ -10353,14 +10792,14 @@ function PickView({ elementFqn }) {
10353
10792
  /* @__PURE__ */ jsxs(ScrollAreaAutosize, { mah: "calc(100vh - 110px)", type: "never", children: [
10354
10793
  scoped.length > 0 && /* @__PURE__ */ jsxs(Stack, { gap: "sm", px: "sm", className: pickviewGroup, children: [
10355
10794
  /* @__PURE__ */ jsx(Title, { order: 6, c: "dimmed", children: "scoped views of the element" }),
10356
- scoped.map((view, i2) => /* @__PURE__ */ jsx(
10795
+ scoped.map((view, i) => /* @__PURE__ */ jsx(
10357
10796
  ViewButton,
10358
10797
  {
10359
10798
  view,
10360
10799
  search: "",
10361
10800
  loop: !0,
10362
10801
  mod: {
10363
- autofocus: i2 === 0
10802
+ autofocus: i === 0
10364
10803
  }
10365
10804
  },
10366
10805
  view.id
@@ -10368,14 +10807,14 @@ function PickView({ elementFqn }) {
10368
10807
  ] }),
10369
10808
  others.length > 0 && /* @__PURE__ */ jsxs(Stack, { gap: "sm", px: "sm", className: pickviewGroup, children: [
10370
10809
  /* @__PURE__ */ jsx(Title, { order: 6, c: "dimmed", children: "views including this element" }),
10371
- others.map((view, i2) => /* @__PURE__ */ jsx(
10810
+ others.map((view, i) => /* @__PURE__ */ jsx(
10372
10811
  ViewButton,
10373
10812
  {
10374
10813
  view,
10375
10814
  search: "",
10376
10815
  loop: !0,
10377
10816
  mod: {
10378
- autofocus: i2 === 0 && scoped.length === 0
10817
+ autofocus: i === 0 && scoped.length === 0
10379
10818
  }
10380
10819
  },
10381
10820
  view.id
@@ -10529,7 +10968,7 @@ const SEARCH_PREFIXES = ["#", "kind:"], LikeC4SearchInput = memo$1(() => {
10529
10968
  case search.startsWith("kind:"):
10530
10969
  case startingWithKind(search): {
10531
10970
  const term = search.length > 5 ? search.slice(5).toLocaleLowerCase() : "";
10532
- let alloptions = t$2(likec4model.specification.elements);
10971
+ let alloptions = t$8(likec4model.specification.elements);
10533
10972
  term && (alloptions = alloptions.filter((kind) => kind.toLocaleLowerCase().includes(term))), alloptions.length === 0 ? (isExactMatch = !1, options = [
10534
10973
  /* @__PURE__ */ jsx(ComboboxEmpty, { children: "No kinds found" }, "empty-kinds")
10535
10974
  ]) : (isExactMatch = alloptions.some((kind) => kind.toLocaleLowerCase() === term), options = alloptions.map((kind) => /* @__PURE__ */ jsxs(ComboboxOption, { value: `kind:${kind}`, children: [
@@ -10711,7 +11150,7 @@ const scrollArea = css({
10711
11150
  }), SearchOverlay = ({ searchActorRef }) => {
10712
11151
  const ref = useRef(null), pickViewFor = usePickViewFor();
10713
11152
  return useTimeoutEffect(() => {
10714
- n(searchActorRef.getSnapshot().context.openedWithSearch) && focusToFirstFoundElement(ref.current);
11153
+ e$2(searchActorRef.getSnapshot().context.openedWithSearch) && focusToFirstFoundElement(ref.current);
10715
11154
  }, 150), /* @__PURE__ */ jsxs(Box, { ref, display: "contents", children: [
10716
11155
  /* @__PURE__ */ jsx(
10717
11156
  Group,
@@ -10952,7 +11391,7 @@ function selectDiagramContext(c) {
10952
11391
  }
10953
11392
  const RelationshipPopover = memo$1(() => {
10954
11393
  const actorRef = xstateReact_cjsExports.useActorRef(RelationshipPopoverActorLogic), diagram = useDiagram(), { viewId, selected } = useDiagramContext(selectDiagramContext), openedEdgeId = xstateReact_cjsExports.useSelector(actorRef, (s) => s.hasTag("opened") ? s.context.edgeId : null);
10955
- useOnDiagramEvent("viewChange", () => {
11394
+ useOnDiagramEvent("navigateTo", () => {
10956
11395
  actorRef.send({ type: "close" });
10957
11396
  }), useOnDiagramEvent("edgeMouseEnter", ({ edge }) => {
10958
11397
  actorRef.send({ type: "xyedge.mouseEnter", edgeId: edge.data.id });
@@ -11038,8 +11477,8 @@ const RelationshipPopover = memo$1(() => {
11038
11477
  padding: POPOVER_PADDING,
11039
11478
  apply({ availableHeight, availableWidth, elements }) {
11040
11479
  wasCanceled || Object.assign(elements.floating.style, {
11041
- maxWidth: `${u$1(roundDpr(availableWidth), { min: 200, max: 400 })}px`,
11042
- maxHeight: `${u$1(roundDpr(availableHeight), { min: 0, max: 500 })}px`
11480
+ maxWidth: `${t$5(roundDpr(availableWidth), { min: 200, max: 400 })}px`,
11481
+ maxHeight: `${t$5(roundDpr(availableHeight), { min: 0, max: 500 })}px`
11043
11482
  });
11044
11483
  }
11045
11484
  }),
@@ -11047,9 +11486,9 @@ const RelationshipPopover = memo$1(() => {
11047
11486
  padding: POPOVER_PADDING * 2
11048
11487
  })
11049
11488
  ]
11050
- }).then(({ x, y: y2, middlewareData }) => {
11489
+ }).then(({ x, y, middlewareData }) => {
11051
11490
  var _a;
11052
- wasCanceled || (popper.style.transform = `translate(${roundDpr(x)}px, ${roundDpr(y2)}px)`, popper.style.visibility = (_a = middlewareData.hide) != null && _a.referenceHidden ? "hidden" : "visible");
11491
+ wasCanceled || (popper.style.transform = `translate(${roundDpr(x)}px, ${roundDpr(y)}px)`, popper.style.visibility = (_a = middlewareData.hide) != null && _a.referenceHidden ? "hidden" : "visible");
11053
11492
  });
11054
11493
  }, {
11055
11494
  ancestorResize: !1,
@@ -11059,9 +11498,9 @@ const RelationshipPopover = memo$1(() => {
11059
11498
  wasCanceled = !0, cleanup();
11060
11499
  };
11061
11500
  }, [referenceEl]);
11062
- const likec4model = useLikeC4Model(), diagram = useDiagram(), [direct, nested] = C(
11501
+ const likec4model = useLikeC4Model(), diagram = useDiagram(), [direct, nested] = t$1(
11063
11502
  diagramEdge.relations,
11064
- m$2((id) => {
11503
+ t$c((id) => {
11065
11504
  try {
11066
11505
  return likec4model.relationship(id);
11067
11506
  } catch (e2) {
@@ -11071,8 +11510,8 @@ const RelationshipPopover = memo$1(() => {
11071
11510
  ), null;
11072
11511
  }
11073
11512
  }),
11074
- m$3(n),
11075
- d$1((r2) => r2.source.id === sourceNode.id && r2.target.id === targetNode.id)
11513
+ n$2(e$2),
11514
+ t$i((r2) => r2.source.id === sourceNode.id && r2.target.id === targetNode.id)
11076
11515
  );
11077
11516
  if (direct.length === 0 && nested.length === 0)
11078
11517
  return console.error("No relationships found diagram edge", {
@@ -11547,8 +11986,8 @@ const autolayoutButton = css({
11547
11986
  }, _ref) => {
11548
11987
  isVertical || ([nodeSep, rankSep] = [rankSep, nodeSep]);
11549
11988
  const propagateChange = useDebouncedCallback(
11550
- ({ x, y: y2 }) => {
11551
- isVertical || ([x, y2] = [y2, x]), onChange(Math.round(x * MAX_SPACING), Math.round(y2 * MAX_SPACING));
11989
+ ({ x, y }) => {
11990
+ isVertical || ([x, y] = [y, x]), onChange(Math.round(x * MAX_SPACING), Math.round(y * MAX_SPACING));
11552
11991
  },
11553
11992
  [onChange, isVertical],
11554
11993
  250,
@@ -12219,7 +12658,7 @@ const shapeBadge = css({
12219
12658
  style: {
12220
12659
  position: "relative",
12221
12660
  width: 70,
12222
- height: u$2(70 * (h / w), 0)
12661
+ height: n$4(70 * (h / w), 0)
12223
12662
  },
12224
12663
  children: /* @__PURE__ */ jsx(
12225
12664
  ElementShape,
@@ -12246,7 +12685,7 @@ const shapeBadge = css({
12246
12685
  onMouseLeave: () => {
12247
12686
  setOnlyKind(null), diagram.highlightNotation(value);
12248
12687
  },
12249
- opacity: l$2(onlyKind) && onlyKind !== kind ? 0.25 : 1,
12688
+ opacity: e$8(onlyKind) && onlyKind !== kind ? 0.25 : 1,
12250
12689
  children: kind
12251
12690
  },
12252
12691
  kind
@@ -12386,7 +12825,7 @@ const shapeBadge = css({
12386
12825
  maxHeight: `min(40vh, ${Math.max(height - 60, 50)}px)`
12387
12826
  }
12388
12827
  },
12389
- children: /* @__PURE__ */ jsx(Stack, { gap: 0, children: notations.map((n2, i2) => /* @__PURE__ */ jsx(ElementNotation, { value: n2 }, i2)) })
12828
+ children: /* @__PURE__ */ jsx(Stack, { gap: 0, children: notations.map((n2, i) => /* @__PURE__ */ jsx(ElementNotation, { value: n2 }, i)) })
12390
12829
  }
12391
12830
  ) })
12392
12831
  ] })
@@ -12464,8 +12903,8 @@ function DynamicViewWalkthrough() {
12464
12903
  } = useDiagramContext((s) => {
12465
12904
  var _a;
12466
12905
  return {
12467
- isActive: n$2(s.activeWalkthrough),
12468
- isParallel: n((_a = s.activeWalkthrough) == null ? void 0 : _a.parallelPrefix),
12906
+ isActive: e$5(s.activeWalkthrough),
12907
+ isParallel: e$2((_a = s.activeWalkthrough) == null ? void 0 : _a.parallelPrefix),
12469
12908
  hasNext: s.xyedges.findIndex((e2) => {
12470
12909
  var _a2;
12471
12910
  return e2.id === ((_a2 = s.activeWalkthrough) == null ? void 0 : _a2.stepId);
@@ -12612,8 +13051,8 @@ class Rect {
12612
13051
  };
12613
13052
  }
12614
13053
  set positionAbsolute(pos) {
12615
- const x = Math.round(pos.x), y2 = Math.round(pos.y);
12616
- this.maxX += x - this.minX, this.maxY += y2 - this.minY, this.minX = x, this.minY = y2;
13054
+ const x = Math.round(pos.x), y = Math.round(pos.y);
13055
+ this.maxX += x - this.minX, this.maxY += y - this.minY, this.minX = x, this.minY = y;
12617
13056
  }
12618
13057
  get dimensions() {
12619
13058
  return {
@@ -12733,11 +13172,11 @@ function useLayoutConstraints() {
12733
13172
  return {
12734
13173
  onNodeDragStart: (_event, xynode) => {
12735
13174
  wasPending = diagram.cancelSaveManualLayout();
12736
- const { nodeLookup } = xystore.getState(), draggingNodes = C(
13175
+ const { nodeLookup } = xystore.getState(), draggingNodes = t$1(
12737
13176
  Array.from(nodeLookup.values()),
12738
- m$3((n2) => n2.draggable !== !1 && (n2.dragging === !0 || n2.id === xynode.id || n2.selected === !0))
13177
+ n$2((n2) => n2.draggable !== !1 && (n2.dragging === !0 || n2.id === xynode.id || n2.selected === !0))
12739
13178
  );
12740
- i(draggingNodes, 1) && (solverRef.current = createLayoutConstraints(xystore, m$2(draggingNodes, (x) => x.id))), initial.x = _event.clientX, initial.y = _event.clientY, moved = !1;
13179
+ t$6(draggingNodes, 1) && (solverRef.current = createLayoutConstraints(xystore, t$c(draggingNodes, (x) => x.id))), initial.x = _event.clientX, initial.y = _event.clientY, moved = !1;
12741
13180
  },
12742
13181
  onNodeDrag: (_event) => {
12743
13182
  var _a;
@@ -12765,7 +13204,7 @@ const selectXYProps = (ctx) => ({
12765
13204
  zoom: 1
12766
13205
  }
12767
13206
  }
12768
- }), equalsXYProps = (a2, b) => a2.initialized === b.initialized && a2.pannable === b.pannable && a2.zoomable === b.zoomable && a2.enableFitView === b.enableFitView && a2.enableReadOnly === b.enableReadOnly && shallowEqual(a2.fitViewPadding, b.fitViewPadding) && shallowEqual(a2.nodes, b.nodes) && shallowEqual(a2.edges, b.edges) && shallowEqual(a2.viewport ?? null, b.viewport ?? null);
13207
+ }), equalsXYProps = (a, b) => a.initialized === b.initialized && a.pannable === b.pannable && a.zoomable === b.zoomable && a.enableFitView === b.enableFitView && a.enableReadOnly === b.enableReadOnly && shallowEqual(a.fitViewPadding, b.fitViewPadding) && shallowEqual(a.nodes, b.nodes) && shallowEqual(a.edges, b.edges) && shallowEqual(a.viewport ?? null, b.viewport ?? null);
12769
13208
  function LikeC4DiagramXYFlow({
12770
13209
  background = "dots",
12771
13210
  nodesDraggable = !1,
@@ -12791,12 +13230,12 @@ function LikeC4DiagramXYFlow({
12791
13230
  onCanvasDblClick
12792
13231
  } = useDiagramEventHandlers(), notReadOnly = !enableReadOnly, isReducedGraphics = useIsReducedGraphics(), layoutConstraints = useLayoutConstraints(), $isPanning = usePanningAtom(), isPanning = useTimeout(() => {
12793
13232
  $isPanning.set(!0);
12794
- }, isReducedGraphics ? 120 : 200), notPanning = useDebouncedCallback$1(() => {
13233
+ }, isReducedGraphics ? 120 : 400), notPanning = useDebouncedCallback$1(() => {
12795
13234
  isPanning.clear(), $isPanning.get() && $isPanning.set(!1);
12796
13235
  }, isReducedGraphics ? 350 : 200), onMove = useCallbackRef((event) => {
12797
13236
  event && ($isPanning.get() || isPanning.start(), notPanning());
12798
13237
  }), onMoveEnd = useCallbackRef((event, viewport) => {
12799
- event && !isReducedGraphics && notPanning.flush(), diagram.send({ type: "xyflow.viewportMoved", viewport, manually: !!event });
13238
+ isPanning.clear(), diagram.send({ type: "xyflow.viewportMoved", viewport, manually: !!event });
12800
13239
  }), onViewportResize = useCallbackRef(() => {
12801
13240
  diagram.send({ type: "xyflow.resized" });
12802
13241
  }), nodeTypes2 = useCustomCompareMemo(
@@ -12891,7 +13330,7 @@ function LikeC4DiagramXYFlow({
12891
13330
  /* @__PURE__ */ jsx(DiagramUI, {}, "DiagramUI")
12892
13331
  ] });
12893
13332
  }
12894
- const globalsCss = ".likec4-shadow-root dialog{color:var(--mantine-color-text)}.likec4-root{overflow:hidden;position:relative;padding:0;margin:0;width:100%;height:100%;border:0px solid transparent;container-name:likec4-root;container-type:size}.likec4-root .react-flow:is(.not-initialized){opacity:0}.likec4-root .react-flow{contain:paint;--xy-background-color: var(--colors-likec4-background);--xy-background-pattern-color: var(--colors-likec4-background-pattern, var(--colors-likec4-background))}.likec4-root .react-flow:is(.bg-transparent){background:transparent!important;--xy-background-color: transparent !important}.likec4-root .react-flow .react-flow__pane{-webkit-user-select:none;user-select:none;--webkit-user-select: none}.likec4-static-view .react-flow .react-flow__attribution{display:none}:where(.likec4-root .mantine-ActionIcon-icon) .tabler-icon{width:75%;height:75%}.likec4-root .likec4-edge-label-container{top:0;left:0;position:absolute;width:auto;height:auto}.likec4-root :where(.react-flow__node,.react-flow__edge):has([data-likec4-dimmed]){opacity:.25}.likec4-root .likec4-edge-label-container:is([data-likec4-dimmed]){opacity:.25}.likec4-root:not([data-likec4-reduced-graphics]) :where(.react-flow__node,.react-flow__edge):has([data-likec4-dimmed]){filter:grayscale(85%)}.likec4-root:not([data-likec4-reduced-graphics]) .likec4-edge-label-container:is([data-likec4-dimmed]){filter:grayscale(85%)}.likec4-root:not([data-likec4-reduced-graphics]) :where(.react-flow__node,.react-flow__edge):has([data-likec4-dimmed=true]){transition-property:opacity,filter;transition-timing-function:cubic-bezier(.5,0,.2,1);transition-duration:.6s}.likec4-root:not([data-likec4-reduced-graphics]) .likec4-edge-label-container:is([data-likec4-dimmed=true]){transition-property:opacity,filter;transition-timing-function:cubic-bezier(.5,0,.2,1);transition-duration:.6s}.likec4-root .react-flow :where(.react-flow__nodes,.react-flow__edges,.react-flow__edgelabel-renderer){display:contents}.likec4-root .react-flow__node.draggable:has(.likec4-compound-node){cursor:default}[data-mantine-color-scheme=dark] .likec4-root:not([data-likec4-reduced-graphics]) :where(.react-flow__edges,.react-flow__edgelabel-renderer)>:where(svg,.likec4-edge-label-container){mix-blend-mode:plus-lighter}[data-mantine-color-scheme=light] .likec4-root:not([data-likec4-reduced-graphics]) :where(.react-flow__edges,.react-flow__edgelabel-renderer)>:where(svg,.likec4-edge-label-container){mix-blend-mode:screen}.likec4-root :where(.likec4-edge-container,.likec4-edge-label-container){--xy-edge-stroke-width: 3;--xy-edge-stroke: var(--likec4-palette-relation-stroke);--xy-edge-stroke-selected: var(--likec4-palette-relation-stroke-selected);--xy-edge-label-color: var(--likec4-palette-relation-label);--xy-edge-label-background-color: var(--likec4-palette-relation-label-bg)}.likec4-root :where(.likec4-edge-container,.likec4-edge-label-container):is([data-likec4-hovered=true],[data-edge-active=true]){--xy-edge-stroke-width: 4;--xy-edge-stroke: var(--likec4-palette-relation-stroke-selected)}[data-mantine-color-scheme=dark] .likec4-root :where(.likec4-edge-container,.likec4-edge-label-container){--xy-edge-label-background-color: color-mix(in srgb, var(--likec4-palette-relation-label-bg) 50%, transparent)}[data-mantine-color-scheme=light] .likec4-root :where(.likec4-edge-container,.likec4-edge-label-container){--xy-edge-label-color: color-mix(in srgb, var(--likec4-palette-relation-label), rgba(255 255 255 / .85) 40%);--xy-edge-label-background-color: color-mix(in srgb, var(--likec4-palette-relation-label-bg) 60%, transparent)}", scheme = (scheme2) => `[data-mantine-color-scheme="${scheme2}"]`, whenDark = scheme("dark"), whenLight = scheme("light"), MAX_DEPTH = 5, generateCompoundColors = (rootSelector, name, colors2, depth) => {
13333
+ const scheme = (scheme2) => `[data-mantine-color-scheme="${scheme2}"]`, whenDark = scheme("dark"), whenLight = scheme("light"), MAX_DEPTH = 5, generateCompoundColors = (rootSelector, name, colors2, depth) => {
12895
13334
  const compoundDarkColor = (color) => toHex(
12896
13335
  scale(color, {
12897
13336
  l: -22 - 5 * depth,
@@ -12935,28 +13374,28 @@ ${whenDark} ${selector3} {
12935
13374
  }
12936
13375
 
12937
13376
  `.trim(),
12938
- ...a$3(1, MAX_DEPTH + 1).map((depth) => generateCompoundColors(rootSelector, name, colors2, depth))
13377
+ ...t$j(1, MAX_DEPTH + 1).map((depth) => generateCompoundColors(rootSelector, name, colors2, depth))
12939
13378
  ].join(`
12940
13379
  `);
12941
13380
  }
12942
13381
  function generateCustomColorStyles(customColors, rootSelector) {
12943
- return C(
12944
- t$1(customColors),
12945
- m$2(([name, color]) => toStyle(rootSelector, name, color)),
12946
- r(`
13382
+ return t$1(
13383
+ t$4(customColors),
13384
+ t$c(([name, color]) => toStyle(rootSelector, name, color)),
13385
+ t$2(`
12947
13386
  `)
12948
13387
  );
12949
13388
  }
12950
13389
  function generateBuiltInColorStyles(rootSelector) {
12951
- return C(
13390
+ return t$1(
12952
13391
  ThemeColors,
12953
- m$2(
13392
+ t$c(
12954
13393
  (color) => toStyle(rootSelector, color, {
12955
13394
  elements: defaultTheme.elements[color],
12956
13395
  relationships: defaultTheme.relationships[color]
12957
13396
  })
12958
13397
  ),
12959
- r(`
13398
+ t$2(`
12960
13399
  `)
12961
13400
  );
12962
13401
  }
@@ -12974,15 +13413,6 @@ function LikeC4Styles({ id }) {
12974
13413
  );
12975
13414
  }
12976
13415
  const MemoizedStyles = memo$1(({ id, nonce, customColorsStyles, builtInColors }) => /* @__PURE__ */ jsxs(Fragment, { children: [
12977
- /* @__PURE__ */ jsx(
12978
- "style",
12979
- {
12980
- type: "text/css",
12981
- "data-likec4-global": id,
12982
- dangerouslySetInnerHTML: { __html: globalsCss.replaceAll(".likec4-root", `#${id}.likec4-root`) },
12983
- nonce
12984
- }
12985
- ),
12986
13416
  /* @__PURE__ */ jsx(
12987
13417
  "style",
12988
13418
  {
@@ -13017,10 +13447,10 @@ function viewToNodesEdge$1(opts) {
13017
13447
  if (opts.where)
13018
13448
  try {
13019
13449
  const filterablePredicate = whereOperatorAsPredicate(opts.where);
13020
- visiblePredicate = (i2) => filterablePredicate({
13021
- ...i$4(i2, ["tags", "kind"]),
13022
- ..."source" in i2 ? { source: nodeById(i2.source) } : i2,
13023
- ..."target" in i2 ? { target: nodeById(i2.target) } : i2
13450
+ visiblePredicate = (i) => filterablePredicate({
13451
+ ...t$k(i, ["tags", "kind"]),
13452
+ ..."source" in i ? { source: nodeById(i.source) } : i,
13453
+ ..."target" in i ? { target: nodeById(i.target) } : i
13024
13454
  });
13025
13455
  } catch (e2) {
13026
13456
  console.error("Error in where filter:", e2);
@@ -13028,7 +13458,7 @@ function viewToNodesEdge$1(opts) {
13028
13458
  const ns = "", nodeById = (id) => nonNullable(nodeLookup.get(id), `Node not found: ${id}`);
13029
13459
  let next;
13030
13460
  for (; next = queue.dequeue(); ) {
13031
- const { node: node2, parent } = next, isCompound = i(node2.children, 1) || node2.kind == GroupElementKind;
13461
+ const { node: node2, parent } = next, isCompound = t$6(node2.children, 1) || node2.kind == GroupElementKind;
13032
13462
  if (isCompound)
13033
13463
  for (const child of node2.children)
13034
13464
  queue.enqueue({ node: nodeById(child), parent: node2 });
@@ -13161,7 +13591,7 @@ function viewToNodesEdge$1(opts) {
13161
13591
  }
13162
13592
  for (const edge of view.edges) {
13163
13593
  const source = edge.source, target = edge.target, id = ns + edge.id;
13164
- if (!i(edge.points, 2)) {
13594
+ if (!t$6(edge.points, 2)) {
13165
13595
  console.error("edge should have at least 2 points", edge);
13166
13596
  continue;
13167
13597
  }
@@ -13198,26 +13628,26 @@ function viewToNodesEdge$1(opts) {
13198
13628
  xyedges
13199
13629
  };
13200
13630
  }
13201
- const viewToNodesEdgeEqual = (a2, b) => a2.view.id === b.view.id && a2.view._type === b.view._type && a2.nodesSelectable === b.nodesSelectable && shallowEqual(a2.view.nodes, b.view.nodes) && shallowEqual(a2.view.edges, b.view.edges) && deepEqual(a2.where, b.where);
13631
+ const viewToNodesEdgeEqual = (a, b) => a.view.id === b.view.id && a.view._type === b.view._type && a.nodesSelectable === b.nodesSelectable && shallowEqual(a.view.nodes, b.view.nodes) && shallowEqual(a.view.edges, b.view.edges) && deepEqual(a.where, b.where);
13202
13632
  function useViewToNodesEdges(params) {
13203
13633
  return useCustomCompareMemo(
13204
13634
  () => viewToNodesEdge$1(params),
13205
13635
  [params],
13206
- ([a2], [b]) => !!a2 && !!b && viewToNodesEdgeEqual(a2, b)
13636
+ ([a], [b]) => !!a && !!b && viewToNodesEdgeEqual(a, b)
13207
13637
  );
13208
13638
  }
13209
13639
  function _update$1(current, update) {
13210
13640
  return update.map((next) => {
13211
13641
  const existing = current.find((n2) => n2.id === next.id);
13212
13642
  return existing && deepEqual(existing.type, next.type) ? deepEqual(existing.hidden ?? !1, next.hidden ?? !1) && deepEqual(existing.source, next.source) && deepEqual(existing.sourceHandle ?? null, next.sourceHandle ?? null) && deepEqual(existing.target, next.target) && deepEqual(existing.targetHandle ?? null, next.targetHandle ?? null) && deepEqual(existing.zIndex ?? 0, next.zIndex ?? 0) && deepEqual(existing.data, next.data) ? existing : {
13213
- ...y(existing, ["hidden", "zIndex"]),
13643
+ ...n$5(existing, ["hidden", "zIndex"]),
13214
13644
  ...next,
13215
13645
  data: next.data
13216
13646
  } : next;
13217
13647
  });
13218
13648
  }
13219
13649
  function updateEdges(current, update) {
13220
- return n$4(update) ? _update$1(current, update) : (update = current, (current2) => _update$1(current2, update));
13650
+ return e$9(update) ? _update$1(current, update) : (update = current, (current2) => _update$1(current2, update));
13221
13651
  }
13222
13652
  function _update(current, updated) {
13223
13653
  return updated.map((update) => {
@@ -13225,7 +13655,7 @@ function _update(current, updated) {
13225
13655
  if (existing && deepEqual(existing.type, update.type)) {
13226
13656
  const { width: existingWidth, height: existingHeight } = getNodeDimensions(existing);
13227
13657
  return deepEqual(existingWidth, update.initialWidth) && deepEqual(existingHeight, update.initialHeight) && deepEqual(existing.parentId ?? null, update.parentId ?? null) && deepEqual(existing.hidden ?? !1, update.hidden ?? !1) && deepEqual(existing.zIndex ?? 0, update.zIndex ?? 0) && deepEqual(existing.position, update.position) && deepEqual(existing.data, update.data) ? existing : {
13228
- ...y(existing, ["measured", "parentId", "hidden", "zIndex"]),
13658
+ ...n$5(existing, ["measured", "parentId", "hidden", "zIndex"]),
13229
13659
  ...update,
13230
13660
  // Force dimensions from update
13231
13661
  width: update.initialWidth,
@@ -13237,7 +13667,7 @@ function _update(current, updated) {
13237
13667
  });
13238
13668
  }
13239
13669
  function updateNodes(current, update) {
13240
- return n$4(update) ? _update(current, update) : (update = current, (current2) => _update(current2, update));
13670
+ return e$9(update) ? _update(current, update) : (update = current, (current2) => _update(current2, update));
13241
13671
  }
13242
13672
  const ViewPadding = {
13243
13673
  top: "40px",
@@ -13252,7 +13682,7 @@ function viewToNodesEdge(view) {
13252
13682
  )), ns = "", nodeById = (id) => nonNullable(nodeLookup.get(id), `Node not found: ${id}`);
13253
13683
  let next;
13254
13684
  for (; next = queue.dequeue(); ) {
13255
- const { node: node2, parent } = next, isCompound = i(node2.children, 1) || node2.kind == GroupElementKind;
13685
+ const { node: node2, parent } = next, isCompound = t$6(node2.children, 1) || node2.kind == GroupElementKind;
13256
13686
  if (isCompound)
13257
13687
  for (const child of node2.children)
13258
13688
  queue.enqueue({ node: nodeById(child), parent: node2 });
@@ -13341,11 +13771,11 @@ function viewToNodesEdge(view) {
13341
13771
  }
13342
13772
  for (const edge of view.edges) {
13343
13773
  const source = edge.source, target = edge.target, id = ns + edge.id;
13344
- if (!i(edge.points, 2)) {
13774
+ if (!t$6(edge.points, 2)) {
13345
13775
  console.error("edge should have at least 2 points", edge);
13346
13776
  continue;
13347
13777
  }
13348
- if (!i(edge.relations, 1)) {
13778
+ if (!t$6(edge.relations, 1)) {
13349
13779
  console.error("edge should have at least 1 relation", edge);
13350
13780
  continue;
13351
13781
  }
@@ -13378,7 +13808,7 @@ function viewToNodesEdge(view) {
13378
13808
  };
13379
13809
  }
13380
13810
  const findRootSubject = (nodes) => nodes.find(
13381
- (n2) => n2.data.column === "subjects" && n$3(n2.parentId)
13811
+ (n2) => n2.data.column === "subjects" && e$7(n2.parentId)
13382
13812
  ), layouter = xstate_cjsExports.fromPromise(async ({ input: input2, self, signal }) => {
13383
13813
  const {
13384
13814
  subjectId,
@@ -13426,7 +13856,7 @@ const findRootSubject = (nodes) => nodes.find(
13426
13856
  dimmed: n2.data.column === "subjects" ? "immediate" : !0
13427
13857
  }
13428
13858
  } : {
13429
- ...y(n2, ["parentId"]),
13859
+ ...n$5(n2, ["parentId"]),
13430
13860
  position: {
13431
13861
  x: currentSubjectCenter.x - n2.initialWidth / 2,
13432
13862
  y: currentSubjectCenter.y - n2.initialHeight / 2
@@ -13614,7 +14044,7 @@ const findRootSubject = (nodes) => nodes.find(
13614
14044
  fitDiagram: {
13615
14045
  actions: {
13616
14046
  type: "xyflow:fitDiagram",
13617
- params: p("event")
14047
+ params: e$6("event")
13618
14048
  }
13619
14049
  },
13620
14050
  "xyflow.resized": {
@@ -13697,8 +14127,8 @@ const findRootSubject = (nodes) => nodes.find(
13697
14127
  xyedges: event.output.xyedges,
13698
14128
  navigateFromNode: null
13699
14129
  }), enqueue.raise({ type: "fitDiagram", duration: 200 }, { id: "fitDiagram", delay: 50 });
13700
- for (let i2 = 0; i2 < 6; i2++)
13701
- enqueue.raise({ type: "xyflow.updateNodeInternals" }, { delay: 100 + i2 * 100 });
14130
+ for (let i = 0; i < 6; i++)
14131
+ enqueue.raise({ type: "xyflow.updateNodeInternals" }, { delay: 100 + i * 100 });
13702
14132
  })
13703
14133
  }
13704
14134
  },
@@ -13801,7 +14231,7 @@ function layoutResultToXYFlow(layout) {
13801
14231
  )), ns = "", nodeById = (id) => nonNullable(nodeLookup.get(id), `Node not found: ${id}`);
13802
14232
  let next;
13803
14233
  for (; next = queue.dequeue(); ) {
13804
- const { node: node2, parent } = next, isCompound = i(node2.children, 1);
14234
+ const { node: node2, parent } = next, isCompound = t$6(node2.children, 1);
13805
14235
  if (isCompound)
13806
14236
  for (const child of node2.children)
13807
14237
  queue.enqueue({ node: nodeById(child), parent: node2 });
@@ -13915,7 +14345,7 @@ function layoutResultToXYFlow(layout) {
13915
14345
  };
13916
14346
  }
13917
14347
  function inputToSubject(input2) {
13918
- return "edgeId" in input2 ? (invariant$1(t$4(input2.edgeId), "edgeId is required"), {
14348
+ return "edgeId" in input2 ? (invariant$1(e$a(input2.edgeId), "edgeId is required"), {
13919
14349
  edgeId: input2.edgeId
13920
14350
  }) : {
13921
14351
  source: input2.source,
@@ -14136,7 +14566,7 @@ const relationshipDetailsLogic = xstate_cjsExports.setup({
14136
14566
  fitDiagram: {
14137
14567
  actions: {
14138
14568
  type: "xyflow:fitDiagram",
14139
- params: p("event")
14569
+ params: e$6("event")
14140
14570
  }
14141
14571
  },
14142
14572
  "xyflow.resized": {
@@ -14178,25 +14608,25 @@ const relationshipDetailsLogic = xstate_cjsExports.setup({
14178
14608
  var _a;
14179
14609
  if (context2.overlays.length === 0)
14180
14610
  return;
14181
- const lastOverlay = (_a = a(context2.overlays)) == null ? void 0 : _a.id;
14611
+ const lastOverlay = (_a = t$7(context2.overlays)) == null ? void 0 : _a.id;
14182
14612
  lastOverlay && (enqueue.sendTo(lastOverlay, { type: "close" }), enqueue.stopChild(lastOverlay), enqueue.assign({
14183
- overlays: context2.overlays.filter((o2) => o2.id !== lastOverlay)
14613
+ overlays: context2.overlays.filter((o) => o.id !== lastOverlay)
14184
14614
  }));
14185
14615
  }),
14186
14616
  closeSpecificOverlay: xstate_cjsExports.enqueueActions(({ context: context2, enqueue }, params) => {
14187
14617
  var _a;
14188
- const toClose = (_a = context2.overlays.find((o2) => o2.id === params.actorId)) == null ? void 0 : _a.id;
14618
+ const toClose = (_a = context2.overlays.find((o) => o.id === params.actorId)) == null ? void 0 : _a.id;
14189
14619
  toClose && (enqueue.sendTo(toClose, { type: "close" }), enqueue.stopChild(toClose), enqueue.assign({
14190
- overlays: context2.overlays.filter((o2) => o2.id !== toClose)
14620
+ overlays: context2.overlays.filter((o) => o.id !== toClose)
14191
14621
  }));
14192
14622
  }),
14193
14623
  closeAllOverlays: xstate_cjsExports.enqueueActions(({ context: context2, enqueue }) => {
14194
- for (const { id } of t$5(context2.overlays))
14624
+ for (const { id } of t$l(context2.overlays))
14195
14625
  enqueue.sendTo(id, { type: "close" }), enqueue.stopChild(id);
14196
14626
  enqueue.assign({ overlays: [] });
14197
14627
  }),
14198
14628
  openElementDetails: xstate_cjsExports.enqueueActions(({ context: context2, enqueue, event }) => {
14199
- if (xstate_cjsExports.assertEvent(event, "open.elementDetails"), context2.overlays.some((o2) => o2.type === "elementDetails" && o2.subject === event.subject))
14629
+ if (xstate_cjsExports.assertEvent(event, "open.elementDetails"), context2.overlays.some((o) => o.type === "elementDetails" && o.subject === event.subject))
14200
14630
  return;
14201
14631
  const id = `elementDetails-${context2.seq}`;
14202
14632
  enqueue.spawnChild("elementDetails", {
@@ -14216,7 +14646,7 @@ const relationshipDetailsLogic = xstate_cjsExports.setup({
14216
14646
  }),
14217
14647
  openRelationshipDetails: xstate_cjsExports.enqueueActions(({ context: context2, enqueue, event }) => {
14218
14648
  xstate_cjsExports.assertEvent(event, "open.relationshipDetails");
14219
- const currentOverlay = a(context2.overlays);
14649
+ const currentOverlay = t$7(context2.overlays);
14220
14650
  if ((currentOverlay == null ? void 0 : currentOverlay.type) === "relationshipDetails") {
14221
14651
  enqueue.sendTo(currentOverlay.id, {
14222
14652
  ...event,
@@ -14241,7 +14671,7 @@ const relationshipDetailsLogic = xstate_cjsExports.setup({
14241
14671
  }),
14242
14672
  openRelationshipsBrowser: xstate_cjsExports.enqueueActions(({ context: context2, enqueue, event }) => {
14243
14673
  xstate_cjsExports.assertEvent(event, "open.relationshipsBrowser");
14244
- const currentOverlay = a(context2.overlays);
14674
+ const currentOverlay = t$7(context2.overlays);
14245
14675
  if ((currentOverlay == null ? void 0 : currentOverlay.type) === "relationshipsBrowser") {
14246
14676
  enqueue.sendTo(currentOverlay.id, {
14247
14677
  type: "navigate.to",
@@ -14273,13 +14703,13 @@ const relationshipDetailsLogic = xstate_cjsExports.setup({
14273
14703
  },
14274
14704
  guards: {
14275
14705
  "has overlays?": ({ context: context2 }) => context2.overlays.length > 0,
14276
- "close specific overlay?": ({ context: context2, event }) => (xstate_cjsExports.assertEvent(event, "close"), t$4(event.actorId) && context2.overlays.some((o2) => o2.id === event.actorId)),
14706
+ "close specific overlay?": ({ context: context2, event }) => (xstate_cjsExports.assertEvent(event, "close"), e$a(event.actorId) && context2.overlays.some((o) => o.id === event.actorId)),
14277
14707
  "last: is relationshipDetails?": ({ context: context2 }) => {
14278
- const lastOverlay = a(context2.overlays);
14708
+ const lastOverlay = t$7(context2.overlays);
14279
14709
  return (lastOverlay == null ? void 0 : lastOverlay.type) === "relationshipDetails";
14280
14710
  },
14281
14711
  "last: is relationshipsBrowser?": ({ context: context2 }) => {
14282
- const lastOverlay = a(context2.overlays);
14712
+ const lastOverlay = t$7(context2.overlays);
14283
14713
  return (lastOverlay == null ? void 0 : lastOverlay.type) === "relationshipsBrowser";
14284
14714
  }
14285
14715
  }
@@ -14471,19 +14901,19 @@ class GridAligner extends Aligner {
14471
14901
  return ((_a = this.layout) == null ? void 0 : _a.get(node2.id)) ?? {};
14472
14902
  }
14473
14903
  computeLayout(nodes) {
14474
- const sortedNodeRects = C(
14904
+ const sortedNodeRects = t$1(
14475
14905
  nodes,
14476
- a$2((r2) => r2[this.primaryAxisCoord])
14906
+ t$h((r2) => r2[this.primaryAxisCoord])
14477
14907
  ), layoutRect = this.getLayoutRect(sortedNodeRects), layers = this.getLayers(sortedNodeRects);
14478
14908
  this.layout = this.buildLayout(layers, layoutRect, sortedNodeRects);
14479
14909
  }
14480
14910
  getLayoutRect(nodeRects) {
14481
- const x = Math.min(...nodeRects.map((n2) => n2.x)), y2 = Math.min(...nodeRects.map((n2) => n2.y)), right = Math.max(...nodeRects.map((n2) => n2.x + n2.width)), bottom = Math.max(...nodeRects.map((n2) => n2.y + n2.height));
14911
+ const x = Math.min(...nodeRects.map((n2) => n2.x)), y = Math.min(...nodeRects.map((n2) => n2.y)), right = Math.max(...nodeRects.map((n2) => n2.x + n2.width)), bottom = Math.max(...nodeRects.map((n2) => n2.y + n2.height));
14482
14912
  return {
14483
14913
  x,
14484
- y: y2,
14914
+ y,
14485
14915
  width: right - x,
14486
- height: bottom - y2
14916
+ height: bottom - y
14487
14917
  };
14488
14918
  }
14489
14919
  getLayers(sortedNodeRects) {
@@ -14504,14 +14934,14 @@ class GridAligner extends Aligner {
14504
14934
  }, layers.push(layer), layerEnd = node2[this.primaryAxisCoord] + node2[this.primaryAxisDimension];
14505
14935
  continue;
14506
14936
  }
14507
- return layers.forEach((l2) => l2.nodes.sort((a2, b) => a2[this.secondaryAxisCoord] - b[this.secondaryAxisCoord])), layers;
14937
+ return layers.forEach((l) => l.nodes.sort((a, b) => a[this.secondaryAxisCoord] - b[this.secondaryAxisCoord])), layers;
14508
14938
  }
14509
14939
  buildLayout(layers, layoutRect, nodeRects) {
14510
- const nodeMap = new Map(nodeRects.map((n2) => [n2.id, n2])), layout = [], occupiedSpace = layers.reduce((a2, b) => a2 + b.primaryAxisSize, 0), rowMargin = layers.length > 1 ? (layoutRect[this.primaryAxisDimension] - occupiedSpace) / (layers.length - 1) : 0, baseLayerIndex = layers.reduce(
14511
- (widestLayerIndex, layer, i2) => layers[widestLayerIndex].occupiedSpace < layer.occupiedSpace ? i2 : widestLayerIndex,
14940
+ const nodeMap = new Map(nodeRects.map((n2) => [n2.id, n2])), layout = [], occupiedSpace = layers.reduce((a, b) => a + b.primaryAxisSize, 0), rowMargin = layers.length > 1 ? (layoutRect[this.primaryAxisDimension] - occupiedSpace) / (layers.length - 1) : 0, baseLayerIndex = layers.reduce(
14941
+ (widestLayerIndex, layer, i) => layers[widestLayerIndex].occupiedSpace < layer.occupiedSpace ? i : widestLayerIndex,
14512
14942
  0
14513
14943
  ), baseLayer = layers[baseLayerIndex], baseLayerPosition = layers.slice(0, baseLayerIndex).reduce(
14514
- (a2, layer) => a2 + layer.primaryAxisSize + rowMargin,
14944
+ (a, layer) => a + layer.primaryAxisSize + rowMargin,
14515
14945
  layoutRect[this.primaryAxisCoord]
14516
14946
  ), baseLayerLayout = this.buildLayerLayout(
14517
14947
  baseLayer,
@@ -14522,13 +14952,13 @@ class GridAligner extends Aligner {
14522
14952
  );
14523
14953
  baseLayer.layout = baseLayerLayout, layout.push(...baseLayerLayout.nodePositions);
14524
14954
  let placeNextLayerAt = baseLayerPosition + baseLayer.primaryAxisSize + rowMargin, refLayer = baseLayer;
14525
- for (let i2 = baseLayerIndex + 1; i2 < layers.length; i2++) {
14526
- const layer = layers[i2];
14955
+ for (let i = baseLayerIndex + 1; i < layers.length; i++) {
14956
+ const layer = layers[i];
14527
14957
  layer.layout = this.buildLayerLayout(layer, layoutRect, placeNextLayerAt, nodeMap, refLayer), layout.push(...layer.layout.nodePositions), refLayer = layer.layout.refLayer ?? layer, placeNextLayerAt += layer.primaryAxisSize + rowMargin;
14528
14958
  }
14529
14959
  placeNextLayerAt = baseLayerPosition, refLayer = baseLayer;
14530
- for (let i2 = baseLayerIndex - 1; i2 >= 0; i2--) {
14531
- const layer = layers[i2];
14960
+ for (let i = baseLayerIndex - 1; i >= 0; i--) {
14961
+ const layer = layers[i];
14532
14962
  placeNextLayerAt -= layer.primaryAxisSize + rowMargin, layer.layout = this.buildLayerLayout(layer, layoutRect, placeNextLayerAt, nodeMap, refLayer), layout.push(...layer.layout.nodePositions), refLayer = layer.layout.refLayer ?? layer;
14533
14963
  }
14534
14964
  return new Map(layout);
@@ -14576,7 +15006,7 @@ class GridAligner extends Aligner {
14576
15006
  const margin = (layoutRect[this.secondaryAxisDimension] - layer.occupiedSpace) / (layer.nodes.length + 1);
14577
15007
  let placeNextNodeAt = layoutRect[this.secondaryAxisCoord] + margin;
14578
15008
  const result = /* @__PURE__ */ new Map();
14579
- for (let node2 of a$2(layer.nodes, (n2) => n2[this.secondaryAxisCoord]))
15009
+ for (let node2 of t$h(layer.nodes, (n2) => n2[this.secondaryAxisCoord]))
14580
15010
  result.set(node2.id, {
14581
15011
  [this.secondaryAxisCoord]: placeNextNodeAt,
14582
15012
  [this.primaryAxisCoord]: placeNextLayerAt
@@ -14586,10 +15016,10 @@ class GridAligner extends Aligner {
14586
15016
  placeInGaps(layer, placeNextLayerAt, refLayer) {
14587
15017
  const result = /* @__PURE__ */ new Map(), nodes = layer.nodes, placementOptions = this.getGapsPositions(refLayer);
14588
15018
  let optionIndex = 0;
14589
- for (let i2 = 0, node2 = nodes[i2]; i2 < nodes.length; i2++, node2 = nodes[i2]) {
15019
+ for (let i = 0, node2 = nodes[i]; i < nodes.length; i++, node2 = nodes[i]) {
14590
15020
  const nodeCenter = node2[this.secondaryAxisCoord] + node2[this.secondaryAxisDimension] / 2;
14591
15021
  let bestOffset = 1 / 0;
14592
- for (; optionIndex - i2 <= placementOptions.length - nodes.length; ) {
15022
+ for (; optionIndex - i <= placementOptions.length - nodes.length; ) {
14593
15023
  const offset2 = placementOptions[optionIndex] - nodeCenter;
14594
15024
  if (Math.abs(offset2) < Math.abs(bestOffset))
14595
15025
  bestOffset = offset2, optionIndex++;
@@ -14606,10 +15036,10 @@ class GridAligner extends Aligner {
14606
15036
  placeInCells(layer, placeNextLayerAt, refLayer) {
14607
15037
  const result = /* @__PURE__ */ new Map(), nodes = layer.nodes, placementOptions = this.getNodePositions(refLayer);
14608
15038
  let optionIndex = 0;
14609
- for (let i2 = 0, node2 = nodes[i2]; i2 < nodes.length; i2++, node2 = nodes[i2]) {
15039
+ for (let i = 0, node2 = nodes[i]; i < nodes.length; i++, node2 = nodes[i]) {
14610
15040
  const nodeCenter = node2[this.secondaryAxisCoord] + node2[this.secondaryAxisDimension] / 2;
14611
15041
  let bestOffset = 1 / 0;
14612
- for (; optionIndex - i2 <= placementOptions.length - nodes.length; ) {
15042
+ for (; optionIndex - i <= placementOptions.length - nodes.length; ) {
14613
15043
  const offset2 = placementOptions[optionIndex] - nodeCenter;
14614
15044
  if (Math.abs(offset2) < Math.abs(bestOffset))
14615
15045
  bestOffset = offset2, optionIndex++;
@@ -14625,16 +15055,16 @@ class GridAligner extends Aligner {
14625
15055
  }
14626
15056
  scoreLayout(layout, originalRects) {
14627
15057
  return [
14628
- C(
15058
+ t$1(
14629
15059
  Array.from(layout.nodePositions),
14630
- m$2(([id, position]) => {
15060
+ t$c(([id, position]) => {
14631
15061
  const originalRect = originalRects.get(id);
14632
- return invariant$1(originalRect, `Could not find original rect for node ${id}`), [i$4(originalRect, ["x", "y"]), position];
15062
+ return invariant$1(originalRect, `Could not find original rect for node ${id}`), [t$k(originalRect, ["x", "y"]), position];
14633
15063
  }),
14634
- m$2(
15064
+ t$c(
14635
15065
  ([original, suggested]) => Math.abs(original[this.secondaryAxisCoord] - suggested[this.secondaryAxisCoord])
14636
15066
  ),
14637
- l$1((a2, b) => a2 + b, 0)
15067
+ t$f((a, b) => a + b, 0)
14638
15068
  ),
14639
15069
  layout
14640
15070
  ];
@@ -14642,8 +15072,8 @@ class GridAligner extends Aligner {
14642
15072
  getGapsPositions(layer) {
14643
15073
  const result = [], { layout, nodes } = layer;
14644
15074
  invariant$1(layout, "Layout of the layer must be computed before calling getGapsPositions");
14645
- for (let i2 = 1; i2 < nodes.length; i2++) {
14646
- const previousNode = nodes[i2 - 1], currentNode = nodes[i2], previousNodePosition = layout.nodePositions.get(previousNode.id), currentNodePosition = layout.nodePositions.get(currentNode.id);
15075
+ for (let i = 1; i < nodes.length; i++) {
15076
+ const previousNode = nodes[i - 1], currentNode = nodes[i], previousNodePosition = layout.nodePositions.get(previousNode.id), currentNodePosition = layout.nodePositions.get(currentNode.id);
14647
15077
  result.push(
14648
15078
  (currentNodePosition[this.secondaryAxisCoord] + previousNodePosition[this.secondaryAxisCoord] + previousNode[this.secondaryAxisDimension]) / 2
14649
15079
  );
@@ -14653,8 +15083,8 @@ class GridAligner extends Aligner {
14653
15083
  getNodePositions(layer) {
14654
15084
  const result = [], { layout, nodes } = layer;
14655
15085
  invariant$1(layout, "Layout of the layer must be computed before calling getGapsPositions");
14656
- for (let i2 = 0; i2 < nodes.length; i2++) {
14657
- const node2 = nodes[i2], nodePosition = layout.nodePositions.get(node2.id);
15086
+ for (let i = 0; i < nodes.length; i++) {
15087
+ const node2 = nodes[i], nodePosition = layout.nodePositions.get(node2.id);
14658
15088
  result.push(
14659
15089
  nodePosition[this.secondaryAxisCoord] + node2[this.secondaryAxisDimension] / 2
14660
15090
  );
@@ -14746,7 +15176,7 @@ function mergeXYNodesEdges({ context: context2, event }) {
14746
15176
  if (existing) {
14747
15177
  const { width: existingWidth, height: existingHeight } = getNodeDimensions(existing);
14748
15178
  return deepEqual(existing.type, update.type) && deepEqual(existingWidth, update.initialWidth) && deepEqual(existingHeight, update.initialHeight) && deepEqual(existing.hidden ?? !1, update.hidden ?? !1) && deepEqual(existing.position, update.position) && deepEqual(existing.data, update.data) && deepEqual(existing.parentId ?? null, update.parentId ?? null) ? existing : {
14749
- ...y(existing, ["measured", "parentId"]),
15179
+ ...n$5(existing, ["measured", "parentId"]),
14750
15180
  ...update,
14751
15181
  // Force dimensions from update
14752
15182
  width: update.initialWidth,
@@ -14927,7 +15357,7 @@ function updateNodeData({ context: context2, event }) {
14927
15357
  return xstate_cjsExports.assertEvent(event, "update.nodeData"), { xynodes: context2.xynodes.map((node2) => {
14928
15358
  if (node2.id !== event.nodeId)
14929
15359
  return node2;
14930
- const data = D(node2.data, event.data);
15360
+ const data = n$6(node2.data, event.data);
14931
15361
  return deepEqual(data, node2.data) ? node2 : {
14932
15362
  ...node2,
14933
15363
  data
@@ -14938,7 +15368,7 @@ function updateEdgeData({ context: context2, event }) {
14938
15368
  return xstate_cjsExports.assertEvent(event, "update.edgeData"), { xyedges: context2.xyedges.map((edge) => {
14939
15369
  if (edge.id !== event.edgeId)
14940
15370
  return edge;
14941
- const data = D(edge.data, event.data);
15371
+ const data = n$6(edge.data, event.data);
14942
15372
  return deepEqual(data, edge.data) ? edge : {
14943
15373
  ...edge,
14944
15374
  data
@@ -14980,7 +15410,7 @@ function resetEdgeControlPoints({ context: context2 }) {
14980
15410
  return vector(v).mul(scale2).add(nodeCenter);
14981
15411
  }
14982
15412
  return {
14983
- xyedges: context2.xyedges.map((edge) => !edge.data.controlPoints || n$1(edge.data.controlPoints) ? edge : {
15413
+ xyedges: context2.xyedges.map((edge) => !edge.data.controlPoints || e$4(edge.data.controlPoints) ? edge : {
14984
15414
  ...edge,
14985
15415
  data: {
14986
15416
  ...edge.data,
@@ -15037,7 +15467,7 @@ const hotkeyActorLogic = xstate_cjsExports.fromCallback(({ sendBack }) => {
15037
15467
  }
15038
15468
  },
15039
15469
  write(toggledFeatures) {
15040
- return sessionStorage.setItem(key, JSON.stringify(d$2(toggledFeatures, e$1))), toggledFeatures;
15470
+ return sessionStorage.setItem(key, JSON.stringify(t$m(toggledFeatures, e$b))), toggledFeatures;
15041
15471
  }
15042
15472
  }, _syncManualLayoutActorLogic = xstate_cjsExports.setup({
15043
15473
  types: {
@@ -15129,7 +15559,7 @@ const hotkeyActorLogic = xstate_cjsExports.fromCallback(({ sendBack }) => {
15129
15559
  function createViewChange(parentContext) {
15130
15560
  const { view, xystore, xyflow: xyflow2 } = parentContext, { nodeLookup } = xystore.getState(), movedNodes = /* @__PURE__ */ new Set();
15131
15561
  let bounds;
15132
- const nodes = l$1([...nodeLookup.values()], (acc, node2) => {
15562
+ const nodes = t$f([...nodeLookup.values()], (acc, node2) => {
15133
15563
  const dimensions = getNodeDimensions(node2);
15134
15564
  (!isSamePoint(node2.internals.positionAbsolute, node2.data.position) || node2.initialWidth !== dimensions.width || node2.initialHeight !== dimensions.height) && movedNodes.add(node2.id);
15135
15565
  const rect = acc[node2.id] = {
@@ -15140,7 +15570,7 @@ function createViewChange(parentContext) {
15140
15570
  height: Math.ceil(dimensions.height)
15141
15571
  };
15142
15572
  return bounds = bounds ? getBoundsOfRects(bounds, rect) : rect, acc;
15143
- }, {}), edges = l$1((xyflow2 == null ? void 0 : xyflow2.getEdges()) ?? [], (acc, { source, target, data }) => {
15573
+ }, {}), edges = t$f((xyflow2 == null ? void 0 : xyflow2.getEdges()) ?? [], (acc, { source, target, data }) => {
15144
15574
  let controlPoints = data.controlPoints ?? [];
15145
15575
  const sourceOrTargetMoved = movedNodes.has(source) || movedNodes.has(target);
15146
15576
  if (controlPoints.length === 0 && sourceOrTargetMoved && (controlPoints = bezierControlPoints(data)), data.points.length === 0 && controlPoints.length === 0)
@@ -15151,14 +15581,14 @@ function createViewChange(parentContext) {
15151
15581
  data.labelXY && data.labelBBox && (_updated.labelBBox = {
15152
15582
  ...data.labelBBox,
15153
15583
  ...data.labelXY
15154
- }), data.labelBBox && (_updated.labelBBox ?? (_updated.labelBBox = data.labelBBox)), i(controlPoints, 1) && (_updated.controlPoints = controlPoints);
15584
+ }), data.labelBBox && (_updated.labelBBox ?? (_updated.labelBBox = data.labelBBox)), t$6(controlPoints, 1) && (_updated.controlPoints = controlPoints);
15155
15585
  const allX = [
15156
- ...data.points.map((p2) => p2[0]),
15157
- ...controlPoints.map((p2) => p2.x),
15586
+ ...data.points.map((p) => p[0]),
15587
+ ...controlPoints.map((p) => p.x),
15158
15588
  ..._updated.labelBBox ? [_updated.labelBBox.x, _updated.labelBBox.x + _updated.labelBBox.width] : []
15159
15589
  ], allY = [
15160
- ...data.points.map((p2) => p2[1]),
15161
- ...controlPoints.map((p2) => p2.y),
15590
+ ...data.points.map((p) => p[1]),
15591
+ ...controlPoints.map((p) => p.y),
15162
15592
  ..._updated.labelBBox ? [_updated.labelBBox.y, _updated.labelBBox.y + _updated.labelBBox.height] : []
15163
15593
  ], rect = boxToRect({
15164
15594
  x: Math.floor(Math.min(...allX)),
@@ -15223,10 +15653,6 @@ const _diagramMachine = xstate_cjsExports.setup({
15223
15653
  type: "navigateTo",
15224
15654
  viewId: nonNullable(context2.lastOnNavigate, "Invalid state, lastOnNavigate is null").toView
15225
15655
  })),
15226
- "trigger:OnChange": xstate_cjsExports.emit((_, _params) => ({
15227
- type: "viewChange",
15228
- change: _params.change
15229
- })),
15230
15656
  "trigger:OpenSource": xstate_cjsExports.emit((_, _params) => ({
15231
15657
  type: "openSource",
15232
15658
  params: _params
@@ -15234,6 +15660,9 @@ const _diagramMachine = xstate_cjsExports.setup({
15234
15660
  "assign lastClickedNode": xstate_cjsExports.assign(({ context: context2, event }) => (xstate_cjsExports.assertEvent(event, "xyflow.nodeClick"), {
15235
15661
  lastClickedNode: lastClickedNode({ context: context2, event })
15236
15662
  })),
15663
+ "reset lastClickedNode": xstate_cjsExports.assign(() => ({
15664
+ lastClickedNode: null
15665
+ })),
15237
15666
  "open source of focused or last clicked node": xstate_cjsExports.enqueueActions(({ context: context2, enqueue }) => {
15238
15667
  var _a;
15239
15668
  const nodeId = context2.focusedNode ?? ((_a = context2.lastClickedNode) == null ? void 0 : _a.id);
@@ -15267,10 +15696,10 @@ const _diagramMachine = xstate_cjsExports.setup({
15267
15696
  viewport.x = Math.round(viewport.x), viewport.y = Math.round(viewport.y), panZoom == null || panZoom.setViewport(viewport, duration > 0 ? { duration } : void 0);
15268
15697
  },
15269
15698
  "xyflow:setViewportCenter": ({ context: context2 }, params) => {
15270
- const { x, y: y2 } = params;
15699
+ const { x, y } = params;
15271
15700
  invariant$1(context2.xyflow, "xyflow is not initialized");
15272
15701
  const zoom = context2.xyflow.getZoom();
15273
- context2.xyflow.setCenter(Math.round(x), Math.round(y2), { zoom });
15702
+ context2.xyflow.setCenter(Math.round(x), Math.round(y), { zoom });
15274
15703
  },
15275
15704
  "xyflow:setViewport": ({ context: context2 }, params) => {
15276
15705
  var _a;
@@ -15296,7 +15725,7 @@ const _diagramMachine = xstate_cjsExports.setup({
15296
15725
  },
15297
15726
  "layout.align": ({ context: context2 }, params) => {
15298
15727
  const { mode } = params, xystore = nonNullable(context2.xystore, "xystore is not initialized"), { nodeLookup, parentLookup } = xystore.getState(), nodesToAlign = [...new Set(nodeLookup.values().filter((n2) => n2.selected).map((n2) => n2.id)).difference(new Set(parentLookup.keys()))];
15299
- if (!i(nodesToAlign, 2)) {
15728
+ if (!t$6(nodesToAlign, 2)) {
15300
15729
  console.warn("At least 2 nodes must be selected to align");
15301
15730
  return;
15302
15731
  }
@@ -15438,6 +15867,19 @@ const _diagramMachine = xstate_cjsExports.setup({
15438
15867
  "emit: edgeEditingStarted": xstate_cjsExports.emit(({ context: context2, event }) => (xstate_cjsExports.assertEvent(event, "xyflow.edgeEditingStarted"), {
15439
15868
  type: "edgeEditingStarted",
15440
15869
  edge: nonNullable(context2.xyedges.find((x) => x.id === event.edge.id), `Edge ${event.edge.id} not found`)
15870
+ })),
15871
+ "emit: paneClick": xstate_cjsExports.emit(() => ({
15872
+ type: "paneClick"
15873
+ })),
15874
+ "emit: nodeClick": xstate_cjsExports.emit(({ context: context2, event }) => (xstate_cjsExports.assertEvent(event, "xyflow.nodeClick"), {
15875
+ type: "nodeClick",
15876
+ node: nonNullable(findDiagramNode(context2, event.node.id), `Node ${event.node.id} not found in diagram`),
15877
+ xynode: event.node
15878
+ })),
15879
+ "emit: edgeClick": xstate_cjsExports.emit(({ context: context2, event }) => (xstate_cjsExports.assertEvent(event, "xyflow.edgeClick"), {
15880
+ type: "edgeClick",
15881
+ edge: nonNullable(findDiagramEdge(context2, event.edge.id), `Edge ${event.edge.id} not found in diagram`),
15882
+ xyedge: event.edge
15441
15883
  }))
15442
15884
  }
15443
15885
  }).createMachine({
@@ -15615,7 +16057,7 @@ const _diagramMachine = xstate_cjsExports.setup({
15615
16057
  "open.source": {
15616
16058
  actions: {
15617
16059
  type: "trigger:OpenSource",
15618
- params: p("event")
16060
+ params: e$6("event")
15619
16061
  }
15620
16062
  },
15621
16063
  "walkthrough.start": {
@@ -15633,13 +16075,13 @@ const _diagramMachine = xstate_cjsExports.setup({
15633
16075
  "xyflow.nodeMouseEnter": {
15634
16076
  actions: {
15635
16077
  type: "onNodeMouseEnter",
15636
- params: p("event")
16078
+ params: e$6("event")
15637
16079
  }
15638
16080
  },
15639
16081
  "xyflow.nodeMouseLeave": {
15640
16082
  actions: {
15641
16083
  type: "onNodeMouseLeave",
15642
- params: p("event")
16084
+ params: e$6("event")
15643
16085
  }
15644
16086
  },
15645
16087
  "xyflow.edgeMouseEnter": {
@@ -15651,7 +16093,7 @@ const _diagramMachine = xstate_cjsExports.setup({
15651
16093
  "notations.highlight": {
15652
16094
  actions: {
15653
16095
  type: "notations.highlight",
15654
- params: p("event")
16096
+ params: e$6("event")
15655
16097
  }
15656
16098
  },
15657
16099
  "notations.unhighlight": {
@@ -15703,27 +16145,29 @@ const _diagramMachine = xstate_cjsExports.setup({
15703
16145
  xstate_cjsExports.assign({
15704
16146
  lastClickedNode,
15705
16147
  focusedNode: ({ event }) => event.node.id
15706
- })
16148
+ }),
16149
+ "emit: nodeClick"
15707
16150
  ],
15708
16151
  target: "focused"
15709
16152
  },
15710
16153
  {
15711
16154
  actions: [
15712
16155
  "assign lastClickedNode",
15713
- "open source of focused or last clicked node"
16156
+ "open source of focused or last clicked node",
16157
+ "emit: nodeClick"
15714
16158
  ]
15715
16159
  }
15716
16160
  ],
15717
16161
  "xyflow.paneClick": {
15718
16162
  actions: [
15719
- xstate_cjsExports.assign({
15720
- lastClickedNode: null
15721
- })
16163
+ "reset lastClickedNode",
16164
+ "emit: paneClick"
15722
16165
  ]
15723
16166
  },
15724
16167
  "xyflow.paneDblClick": {
15725
16168
  actions: [
15726
- { type: "xyflow:fitDiagram" },
16169
+ "reset lastClickedNode",
16170
+ "xyflow:fitDiagram",
15727
16171
  { type: "trigger:OpenSource", params: ({ context: context2 }) => ({ view: context2.view.id }) }
15728
16172
  ]
15729
16173
  },
@@ -15739,10 +16183,13 @@ const _diagramMachine = xstate_cjsExports.setup({
15739
16183
  "is dynamic view",
15740
16184
  "click: selected edge"
15741
16185
  ]),
15742
- actions: xstate_cjsExports.raise(({ event }) => ({
15743
- type: "walkthrough.start",
15744
- stepId: event.edge.id
15745
- }))
16186
+ actions: [
16187
+ xstate_cjsExports.raise(({ event }) => ({
16188
+ type: "walkthrough.start",
16189
+ stepId: event.edge.id
16190
+ })),
16191
+ "emit: edgeClick"
16192
+ ]
15746
16193
  }
15747
16194
  }
15748
16195
  },
@@ -15766,6 +16213,7 @@ const _diagramMachine = xstate_cjsExports.setup({
15766
16213
  "xyflow.nodeClick": [
15767
16214
  {
15768
16215
  guard: "click: focused node",
16216
+ actions: "emit: nodeClick",
15769
16217
  target: "#idle"
15770
16218
  },
15771
16219
  {
@@ -15776,7 +16224,8 @@ const _diagramMachine = xstate_cjsExports.setup({
15776
16224
  xstate_cjsExports.raise(({ event }) => ({
15777
16225
  type: "focus.node",
15778
16226
  nodeId: event.node.id
15779
- }))
16227
+ })),
16228
+ "emit: nodeClick"
15780
16229
  ]
15781
16230
  }
15782
16231
  ],
@@ -15794,9 +16243,10 @@ const _diagramMachine = xstate_cjsExports.setup({
15794
16243
  target: "idle"
15795
16244
  },
15796
16245
  "xyflow.paneClick": {
15797
- actions: xstate_cjsExports.assign({
15798
- lastClickedNode: null
15799
- }),
16246
+ actions: [
16247
+ "reset lastClickedNode",
16248
+ "emit: paneClick"
16249
+ ],
15800
16250
  target: "idle"
15801
16251
  },
15802
16252
  "notations.unhighlight": {
@@ -15814,7 +16264,7 @@ const _diagramMachine = xstate_cjsExports.setup({
15814
16264
  viewportBeforeFocus: ({ context: context2 }) => context2.viewport,
15815
16265
  activeWalkthrough: ({ context: context2, event }) => {
15816
16266
  xstate_cjsExports.assertEvent(event, "walkthrough.start");
15817
- const stepId = event.stepId ?? d(context2.xyedges).id;
16267
+ const stepId = event.stepId ?? n$1(context2.xyedges).id;
15818
16268
  return {
15819
16269
  stepId,
15820
16270
  parallelPrefix: getParallelStepsPrefix(stepId)
@@ -15838,7 +16288,7 @@ const _diagramMachine = xstate_cjsExports.setup({
15838
16288
  "walkthrough.step": {
15839
16289
  actions: [
15840
16290
  xstate_cjsExports.assign(({ context: context2, event }) => {
15841
- const { stepId } = context2.activeWalkthrough, stepIndex = context2.xyedges.findIndex((e2) => e2.id === stepId), nextStepIndex = u$1(event.direction === "next" ? stepIndex + 1 : stepIndex - 1, {
16291
+ const { stepId } = context2.activeWalkthrough, stepIndex = context2.xyedges.findIndex((e2) => e2.id === stepId), nextStepIndex = t$5(event.direction === "next" ? stepIndex + 1 : stepIndex - 1, {
15842
16292
  min: 0,
15843
16293
  max: context2.xyedges.length - 1
15844
16294
  });
@@ -15870,6 +16320,7 @@ const _diagramMachine = xstate_cjsExports.setup({
15870
16320
  }),
15871
16321
  "update active walkthrough",
15872
16322
  "xyflow:fitFocusedBounds",
16323
+ "emit: edgeClick",
15873
16324
  "emit: walkthroughStep"
15874
16325
  ]
15875
16326
  },
@@ -15937,6 +16388,15 @@ const _diagramMachine = xstate_cjsExports.setup({
15937
16388
  }
15938
16389
  },
15939
16390
  on: {
16391
+ "xyflow.paneClick": {
16392
+ actions: "emit: paneClick"
16393
+ },
16394
+ "xyflow.nodeClick": {
16395
+ actions: "emit: nodeClick"
16396
+ },
16397
+ "xyflow.edgeClick": {
16398
+ actions: "emit: edgeClick"
16399
+ },
15940
16400
  "xyflow.applyNodeChanges": {
15941
16401
  actions: xstate_cjsExports.assign({
15942
16402
  xynodes: ({ context: context2, event }) => applyNodeChanges(event.changes, context2.xynodes)
@@ -15960,7 +16420,7 @@ const _diagramMachine = xstate_cjsExports.setup({
15960
16420
  guard: "enabled: FitView",
15961
16421
  actions: {
15962
16422
  type: "xyflow:fitDiagram",
15963
- params: p("event")
16423
+ params: e$6("event")
15964
16424
  }
15965
16425
  },
15966
16426
  "update.nodeData": {
@@ -16079,9 +16539,7 @@ function DiagramActorProvider({
16079
16539
  nodesSelectable
16080
16540
  }
16081
16541
  }
16082
- );
16083
- useActorEventHandlers(actorRef);
16084
- const features = useEnabledFeatures();
16542
+ ), features = useEnabledFeatures();
16085
16543
  useCustomCompareEffect(
16086
16544
  () => {
16087
16545
  actorRef.send({ type: "update.features", features });
@@ -16104,26 +16562,21 @@ function DiagramActorProvider({
16104
16562
  actorRef.send({ type: "update.view", view, xyedges, xynodes });
16105
16563
  }, [view, xyedges, xynodes]);
16106
16564
  const toggledFeatures = xstateReact_cjsExports.useSelector(actorRef, selectToggledFeatures, shallowEqual);
16107
- return /* @__PURE__ */ jsx(DiagramActorContextProvider, { value: actorRef, children: /* @__PURE__ */ jsx(DiagramFeatures, { overrides: toggledFeatures, children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(CurrentViewModelProvider, { viewId: view.id, children }) }) }) });
16565
+ return /* @__PURE__ */ jsxs(DiagramActorContextProvider, { value: actorRef, children: [
16566
+ /* @__PURE__ */ jsx(DiagramFeatures, { overrides: toggledFeatures, children: /* @__PURE__ */ jsx(ErrorBoundary, { children: /* @__PURE__ */ jsx(CurrentViewModelProvider, { children }) }) }),
16567
+ /* @__PURE__ */ jsx(DiagramActorEventListener, { actorRef })
16568
+ ] });
16108
16569
  }
16109
- function CurrentViewModelProvider({
16110
- children,
16111
- viewId
16112
- }) {
16113
- const viewmodel = useLikeC4Model().findView(viewId);
16570
+ function CurrentViewModelProvider({ children }) {
16571
+ const viewId = useCurrentViewId(), viewmodel = useLikeC4Model().findView(viewId);
16114
16572
  return /* @__PURE__ */ jsx(CurrentViewModelContext.Provider, { value: viewmodel, children });
16115
16573
  }
16116
- function useActorEventHandlers(actorRef) {
16574
+ function DiagramActorEventListener({ actorRef }) {
16117
16575
  const {
16118
- onChange,
16119
16576
  onNavigateTo,
16120
16577
  onOpenSource
16121
16578
  } = useDiagramEventHandlers();
16122
- useEffect(() => {
16123
- if (!onChange) return;
16124
- const subscription = actorRef.on("viewChange", ({ change }) => onChange({ change }));
16125
- return () => subscription.unsubscribe();
16126
- }, [actorRef, onChange]), useEffect(() => {
16579
+ return useOnDiagramEvent("openSource", ({ params }) => onOpenSource == null ? void 0 : onOpenSource(params)), useEffect(() => {
16127
16580
  if (!onNavigateTo) return;
16128
16581
  let frame;
16129
16582
  const subscription = actorRef.on("navigateTo", ({ viewId }) => {
@@ -16134,11 +16587,7 @@ function useActorEventHandlers(actorRef) {
16134
16587
  return () => {
16135
16588
  cancelAnimationFrame(frame), subscription.unsubscribe();
16136
16589
  };
16137
- }, [actorRef, onNavigateTo]), useEffect(() => {
16138
- if (!onOpenSource) return;
16139
- const subscription = actorRef.on("openSource", ({ params }) => onOpenSource(params));
16140
- return () => subscription.unsubscribe();
16141
- }, [actorRef, onOpenSource]);
16590
+ }, [actorRef, onNavigateTo]), null;
16142
16591
  }
16143
16592
  function LikeC4Diagram({
16144
16593
  onCanvasClick,
@@ -16185,7 +16634,7 @@ function LikeC4Diagram({
16185
16634
  children
16186
16635
  }) {
16187
16636
  var _a, _b;
16188
- const id = useId().replace("mantine-", "likec4-"), initialRef = useRef(null);
16637
+ const id = useId(), initialRef = useRef(null);
16189
16638
  initialRef.current == null && (initialRef.current = {
16190
16639
  defaultEdges: [],
16191
16640
  defaultNodes: [],
@@ -16337,6 +16786,21 @@ export {
16337
16786
  useLikeC4Model as b,
16338
16787
  css as c,
16339
16788
  useUpdateEffect as d,
16340
- LikeC4Diagram as e,
16789
+ IconStarFilled as e,
16790
+ IconStack2 as f,
16791
+ IconLayoutDashboard as g,
16792
+ IconFileCode as h,
16793
+ IconFolderOpen as i,
16794
+ IconFolderFilled as j,
16795
+ IconArrowLeft as k,
16796
+ IconMoonStars as l,
16797
+ IconSun as m,
16798
+ IconChevronDown as n,
16799
+ IconAlertTriangle as o,
16800
+ IconCheck as p,
16801
+ IconCopy as q,
16802
+ IconExternalLink as r,
16803
+ IconShare as s,
16804
+ LikeC4Diagram as t,
16341
16805
  useLikeC4Projects as u
16342
16806
  };