@almadar/ui 5.87.0 → 5.89.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/avl/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import * as React104 from 'react';
3
- import React104__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
2
+ import * as React105 from 'react';
3
+ import React105__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
4
4
  import { getAllPages, OrbitalProvider, EventBusContext, useTraitScope, ServerBridgeProvider, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, useEntitySchema, useEntitySchemaOptional, TraitScopeProvider, useCurrentPagePath } from '@almadar/ui/providers';
5
5
  import { createLogger, isLogLevelEnabled } from '@almadar/logger';
6
6
  import ELK from 'elkjs/lib/elk.bundled.js';
@@ -3174,7 +3174,7 @@ var init_Typography = __esm({
3174
3174
  }) => {
3175
3175
  const variant = variantProp ?? (level ? `h${level}` : "body1");
3176
3176
  const Component = as || defaultElements[variant];
3177
- return React104__default.createElement(
3177
+ return React105__default.createElement(
3178
3178
  Component,
3179
3179
  {
3180
3180
  id,
@@ -3511,7 +3511,7 @@ var init_Box = __esm({
3511
3511
  fixed: "fixed",
3512
3512
  sticky: "sticky"
3513
3513
  };
3514
- Box = React104__default.forwardRef(
3514
+ Box = React105__default.forwardRef(
3515
3515
  ({
3516
3516
  padding,
3517
3517
  paddingX,
@@ -3576,7 +3576,7 @@ var init_Box = __esm({
3576
3576
  onPointerDown?.(e);
3577
3577
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
3578
3578
  const isClickable = action || onClick;
3579
- return React104__default.createElement(
3579
+ return React105__default.createElement(
3580
3580
  Component,
3581
3581
  {
3582
3582
  ref,
@@ -3672,7 +3672,7 @@ var init_Stack = __esm({
3672
3672
  };
3673
3673
  const isHorizontal = direction === "horizontal";
3674
3674
  const directionClass = responsive && isHorizontal ? reverse ? "flex-col-reverse md:flex-row-reverse" : "flex-col md:flex-row" : isHorizontal ? reverse ? "flex-row-reverse" : "flex-row" : reverse ? "flex-col-reverse" : "flex-col";
3675
- return React104__default.createElement(
3675
+ return React105__default.createElement(
3676
3676
  Component,
3677
3677
  {
3678
3678
  className: cn(
@@ -4164,7 +4164,7 @@ var init_MiniStateMachine = __esm({
4164
4164
  const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
4165
4165
  const tc = transitionCounts[s.name] ?? 0;
4166
4166
  const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
4167
- return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
4167
+ return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
4168
4168
  /* @__PURE__ */ jsx(
4169
4169
  AvlState,
4170
4170
  {
@@ -4494,7 +4494,7 @@ function loadLib(key, importer) {
4494
4494
  return p;
4495
4495
  }
4496
4496
  function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
4497
- const Lazy = React104__default.lazy(async () => {
4497
+ const Lazy = React105__default.lazy(async () => {
4498
4498
  const lib = await loadLib(libKey, importer);
4499
4499
  const Comp = pick(lib);
4500
4500
  if (!Comp) {
@@ -4504,7 +4504,7 @@ function lazyFamilyIcon(libKey, importer, pick, fallbackName, family) {
4504
4504
  return { default: Comp };
4505
4505
  });
4506
4506
  const Wrapped = (props) => /* @__PURE__ */ jsx(
4507
- React104__default.Suspense,
4507
+ React105__default.Suspense,
4508
4508
  {
4509
4509
  fallback: /* @__PURE__ */ jsx(
4510
4510
  "span",
@@ -5235,7 +5235,7 @@ var init_Icon = __esm({
5235
5235
  const directIcon = typeof icon === "string" ? void 0 : icon;
5236
5236
  const effectiveName = typeof icon === "string" ? icon : name;
5237
5237
  const family = useIconFamily();
5238
- const RenderedComponent = React104__default.useMemo(() => {
5238
+ const RenderedComponent = React105__default.useMemo(() => {
5239
5239
  if (directIcon) return null;
5240
5240
  return effectiveName ? resolveIconForFamily(effectiveName, family) : null;
5241
5241
  }, [directIcon, effectiveName, family]);
@@ -5297,7 +5297,7 @@ function resolveIconProp(value, sizeClass) {
5297
5297
  const IconComp = value;
5298
5298
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
5299
5299
  }
5300
- if (React104__default.isValidElement(value)) {
5300
+ if (React105__default.isValidElement(value)) {
5301
5301
  return value;
5302
5302
  }
5303
5303
  if (typeof value === "object" && value !== null && isIconLike(value)) {
@@ -5373,7 +5373,7 @@ var init_Button = __esm({
5373
5373
  md: "h-icon-default w-icon-default",
5374
5374
  lg: "h-icon-default w-icon-default"
5375
5375
  };
5376
- Button = React104__default.forwardRef(
5376
+ Button = React105__default.forwardRef(
5377
5377
  ({
5378
5378
  className,
5379
5379
  variant = "primary",
@@ -5441,7 +5441,7 @@ var Dialog;
5441
5441
  var init_Dialog = __esm({
5442
5442
  "components/core/atoms/Dialog.tsx"() {
5443
5443
  init_cn();
5444
- Dialog = React104__default.forwardRef(
5444
+ Dialog = React105__default.forwardRef(
5445
5445
  ({
5446
5446
  role = "dialog",
5447
5447
  "aria-modal": ariaModal = true,
@@ -5936,7 +5936,7 @@ var init_Badge = __esm({
5936
5936
  md: "px-2.5 py-1 text-sm",
5937
5937
  lg: "px-3 py-1.5 text-base"
5938
5938
  };
5939
- Badge = React104__default.forwardRef(
5939
+ Badge = React105__default.forwardRef(
5940
5940
  ({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
5941
5941
  const iconSizes3 = {
5942
5942
  sm: "h-icon-default w-icon-default",
@@ -6273,7 +6273,7 @@ var init_SvgFlow = __esm({
6273
6273
  width = 100,
6274
6274
  height = 100
6275
6275
  }) => {
6276
- const markerId = React104__default.useMemo(() => {
6276
+ const markerId = React105__default.useMemo(() => {
6277
6277
  flowIdCounter += 1;
6278
6278
  return `almadar-flow-arrow-${flowIdCounter}`;
6279
6279
  }, []);
@@ -6866,7 +6866,7 @@ var init_SvgRing = __esm({
6866
6866
  width = 100,
6867
6867
  height = 100
6868
6868
  }) => {
6869
- const gradientId = React104__default.useMemo(() => {
6869
+ const gradientId = React105__default.useMemo(() => {
6870
6870
  ringIdCounter += 1;
6871
6871
  return `almadar-ring-glow-${ringIdCounter}`;
6872
6872
  }, []);
@@ -7047,7 +7047,7 @@ var init_Input = __esm({
7047
7047
  init_cn();
7048
7048
  init_Icon();
7049
7049
  init_useEventBus();
7050
- Input = React104__default.forwardRef(
7050
+ Input = React105__default.forwardRef(
7051
7051
  ({
7052
7052
  className,
7053
7053
  inputType,
@@ -7207,7 +7207,7 @@ var Label;
7207
7207
  var init_Label = __esm({
7208
7208
  "components/core/atoms/Label.tsx"() {
7209
7209
  init_cn();
7210
- Label = React104__default.forwardRef(
7210
+ Label = React105__default.forwardRef(
7211
7211
  ({ className, required, children, ...props }, ref) => {
7212
7212
  return /* @__PURE__ */ jsxs(
7213
7213
  "label",
@@ -7234,7 +7234,7 @@ var init_Textarea = __esm({
7234
7234
  "components/core/atoms/Textarea.tsx"() {
7235
7235
  init_cn();
7236
7236
  init_useEventBus();
7237
- Textarea = React104__default.forwardRef(
7237
+ Textarea = React105__default.forwardRef(
7238
7238
  ({ className, error, onChange, ...props }, ref) => {
7239
7239
  const eventBus = useEventBus();
7240
7240
  const handleChange = (e) => {
@@ -7473,7 +7473,7 @@ var init_Select = __esm({
7473
7473
  init_cn();
7474
7474
  init_Icon();
7475
7475
  init_useEventBus();
7476
- Select = React104__default.forwardRef(
7476
+ Select = React105__default.forwardRef(
7477
7477
  (props, _ref) => {
7478
7478
  const { multiple, searchable, clearable } = props;
7479
7479
  if (multiple || searchable || clearable) {
@@ -7490,7 +7490,7 @@ var init_Checkbox = __esm({
7490
7490
  "components/core/atoms/Checkbox.tsx"() {
7491
7491
  init_cn();
7492
7492
  init_useEventBus();
7493
- Checkbox = React104__default.forwardRef(
7493
+ Checkbox = React105__default.forwardRef(
7494
7494
  ({ className, label, id, onChange, ...props }, ref) => {
7495
7495
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
7496
7496
  const eventBus = useEventBus();
@@ -7544,7 +7544,7 @@ var init_Spinner = __esm({
7544
7544
  md: "h-6 w-6",
7545
7545
  lg: "h-8 w-8"
7546
7546
  };
7547
- Spinner = React104__default.forwardRef(
7547
+ Spinner = React105__default.forwardRef(
7548
7548
  ({ className, size = "md", overlay, ...props }, ref) => {
7549
7549
  if (overlay) {
7550
7550
  return /* @__PURE__ */ jsx(
@@ -7634,7 +7634,7 @@ var init_Card = __esm({
7634
7634
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
7635
7635
  "tile-image-first": "p-0 overflow-hidden"
7636
7636
  };
7637
- Card = React104__default.forwardRef(
7637
+ Card = React105__default.forwardRef(
7638
7638
  ({
7639
7639
  className,
7640
7640
  variant = "bordered",
@@ -7682,9 +7682,9 @@ var init_Card = __esm({
7682
7682
  }
7683
7683
  );
7684
7684
  Card.displayName = "Card";
7685
- CardHeader = React104__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
7685
+ CardHeader = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
7686
7686
  CardHeader.displayName = "CardHeader";
7687
- CardTitle = React104__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7687
+ CardTitle = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7688
7688
  "h3",
7689
7689
  {
7690
7690
  ref,
@@ -7697,11 +7697,11 @@ var init_Card = __esm({
7697
7697
  }
7698
7698
  ));
7699
7699
  CardTitle.displayName = "CardTitle";
7700
- CardContent = React104__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
7700
+ CardContent = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
7701
7701
  CardContent.displayName = "CardContent";
7702
7702
  CardBody = CardContent;
7703
7703
  CardBody.displayName = "CardBody";
7704
- CardFooter = React104__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7704
+ CardFooter = React105__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7705
7705
  "div",
7706
7706
  {
7707
7707
  ref,
@@ -7756,7 +7756,7 @@ var init_FilterPill = __esm({
7756
7756
  md: "w-3.5 h-3.5",
7757
7757
  lg: "w-4 h-4"
7758
7758
  };
7759
- FilterPill = React104__default.forwardRef(
7759
+ FilterPill = React105__default.forwardRef(
7760
7760
  ({
7761
7761
  className,
7762
7762
  variant = "default",
@@ -7885,8 +7885,8 @@ var init_Avatar = __esm({
7885
7885
  actionPayload
7886
7886
  }) => {
7887
7887
  const eventBus = useEventBus();
7888
- const [imgFailed, setImgFailed] = React104__default.useState(false);
7889
- React104__default.useEffect(() => {
7888
+ const [imgFailed, setImgFailed] = React105__default.useState(false);
7889
+ React105__default.useEffect(() => {
7890
7890
  setImgFailed(false);
7891
7891
  }, [src]);
7892
7892
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -7999,7 +7999,7 @@ var init_Center = __esm({
7999
7999
  as: Component = "div"
8000
8000
  }) => {
8001
8001
  const mergedStyle = minHeight ? { minHeight, ...style } : style;
8002
- return React104__default.createElement(Component, {
8002
+ return React105__default.createElement(Component, {
8003
8003
  className: cn(
8004
8004
  inline ? "inline-flex" : "flex",
8005
8005
  horizontal && "justify-center",
@@ -8267,7 +8267,7 @@ var init_Radio = __esm({
8267
8267
  md: "w-2.5 h-2.5",
8268
8268
  lg: "w-3 h-3"
8269
8269
  };
8270
- Radio = React104__default.forwardRef(
8270
+ Radio = React105__default.forwardRef(
8271
8271
  ({
8272
8272
  label,
8273
8273
  helperText,
@@ -8284,12 +8284,12 @@ var init_Radio = __esm({
8284
8284
  onChange,
8285
8285
  ...props
8286
8286
  }, ref) => {
8287
- const reactId = React104__default.useId();
8287
+ const reactId = React105__default.useId();
8288
8288
  const baseId = id || `radio-${reactId}`;
8289
8289
  const hasError = !!error;
8290
8290
  const eventBus = useEventBus();
8291
- const [selected, setSelected] = React104__default.useState(value);
8292
- React104__default.useEffect(() => {
8291
+ const [selected, setSelected] = React105__default.useState(value);
8292
+ React105__default.useEffect(() => {
8293
8293
  if (value !== void 0) setSelected(value);
8294
8294
  }, [value]);
8295
8295
  const pick = (next, e) => {
@@ -8471,7 +8471,7 @@ var init_Switch = __esm({
8471
8471
  "components/core/atoms/Switch.tsx"() {
8472
8472
  "use client";
8473
8473
  init_cn();
8474
- Switch = React104.forwardRef(
8474
+ Switch = React105.forwardRef(
8475
8475
  ({
8476
8476
  checked,
8477
8477
  defaultChecked = false,
@@ -8482,10 +8482,10 @@ var init_Switch = __esm({
8482
8482
  name,
8483
8483
  className
8484
8484
  }, ref) => {
8485
- const [isChecked, setIsChecked] = React104.useState(
8485
+ const [isChecked, setIsChecked] = React105.useState(
8486
8486
  checked !== void 0 ? checked : defaultChecked
8487
8487
  );
8488
- React104.useEffect(() => {
8488
+ React105.useEffect(() => {
8489
8489
  if (checked !== void 0) {
8490
8490
  setIsChecked(checked);
8491
8491
  }
@@ -8763,7 +8763,7 @@ var Aside;
8763
8763
  var init_Aside = __esm({
8764
8764
  "components/core/atoms/Aside.tsx"() {
8765
8765
  init_cn();
8766
- Aside = React104__default.forwardRef(
8766
+ Aside = React105__default.forwardRef(
8767
8767
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
8768
8768
  );
8769
8769
  Aside.displayName = "Aside";
@@ -8842,9 +8842,9 @@ var init_LawReferenceTooltip = __esm({
8842
8842
  className
8843
8843
  }) => {
8844
8844
  const { t } = useTranslate();
8845
- const [isVisible, setIsVisible] = React104__default.useState(false);
8846
- const timeoutRef = React104__default.useRef(null);
8847
- const triggerRef = React104__default.useRef(null);
8845
+ const [isVisible, setIsVisible] = React105__default.useState(false);
8846
+ const timeoutRef = React105__default.useRef(null);
8847
+ const triggerRef = React105__default.useRef(null);
8848
8848
  const handleMouseEnter = () => {
8849
8849
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8850
8850
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -8855,7 +8855,7 @@ var init_LawReferenceTooltip = __esm({
8855
8855
  };
8856
8856
  const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
8857
8857
  const open = isVisible || revealed;
8858
- React104__default.useEffect(() => {
8858
+ React105__default.useEffect(() => {
8859
8859
  return () => {
8860
8860
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8861
8861
  };
@@ -9065,7 +9065,7 @@ var init_StatusDot = __esm({
9065
9065
  md: "w-2.5 h-2.5",
9066
9066
  lg: "w-3 h-3"
9067
9067
  };
9068
- StatusDot = React104__default.forwardRef(
9068
+ StatusDot = React105__default.forwardRef(
9069
9069
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
9070
9070
  return /* @__PURE__ */ jsx(
9071
9071
  "span",
@@ -9119,7 +9119,7 @@ var init_TrendIndicator = __esm({
9119
9119
  down: "trending-down",
9120
9120
  flat: "arrow-right"
9121
9121
  };
9122
- TrendIndicator = React104__default.forwardRef(
9122
+ TrendIndicator = React105__default.forwardRef(
9123
9123
  ({
9124
9124
  className,
9125
9125
  value,
@@ -9186,7 +9186,7 @@ var init_RangeSlider = __esm({
9186
9186
  md: "w-4 h-4",
9187
9187
  lg: "w-5 h-5"
9188
9188
  };
9189
- RangeSlider = React104__default.forwardRef(
9189
+ RangeSlider = React105__default.forwardRef(
9190
9190
  ({
9191
9191
  className,
9192
9192
  min = 0,
@@ -9780,7 +9780,7 @@ var init_ContentSection = __esm({
9780
9780
  md: "py-16",
9781
9781
  lg: "py-24"
9782
9782
  };
9783
- ContentSection = React104__default.forwardRef(
9783
+ ContentSection = React105__default.forwardRef(
9784
9784
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
9785
9785
  return /* @__PURE__ */ jsx(
9786
9786
  Box,
@@ -10314,7 +10314,7 @@ var init_AnimatedReveal = __esm({
10314
10314
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
10315
10315
  "none": {}
10316
10316
  };
10317
- AnimatedReveal = React104__default.forwardRef(
10317
+ AnimatedReveal = React105__default.forwardRef(
10318
10318
  ({
10319
10319
  trigger = "scroll",
10320
10320
  animation = "fade-up",
@@ -10474,7 +10474,7 @@ var init_AnimatedGraphic = __esm({
10474
10474
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
10475
10475
  "use client";
10476
10476
  init_cn();
10477
- AnimatedGraphic = React104__default.forwardRef(
10477
+ AnimatedGraphic = React105__default.forwardRef(
10478
10478
  ({
10479
10479
  src,
10480
10480
  svgContent,
@@ -10497,7 +10497,7 @@ var init_AnimatedGraphic = __esm({
10497
10497
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
10498
10498
  const resolvedSvg = svgContent ?? fetchedSvg;
10499
10499
  const prevAnimateRef = useRef(animate);
10500
- const setRef = React104__default.useCallback(
10500
+ const setRef = React105__default.useCallback(
10501
10501
  (node) => {
10502
10502
  containerRef.current = node;
10503
10503
  if (typeof ref === "function") ref(node);
@@ -11104,7 +11104,7 @@ function GameCard({
11104
11104
  className
11105
11105
  }) {
11106
11106
  const eventBus = useEventBus();
11107
- const handleClick = React104.useCallback(() => {
11107
+ const handleClick = React105.useCallback(() => {
11108
11108
  if (disabled) return;
11109
11109
  onClick?.(id);
11110
11110
  if (clickEvent) eventBus.emit(`UI:${clickEvent}`, { cardId: id });
@@ -11386,9 +11386,9 @@ function ControlButton({
11386
11386
  className
11387
11387
  }) {
11388
11388
  const eventBus = useEventBus();
11389
- const [isPressed, setIsPressed] = React104.useState(false);
11389
+ const [isPressed, setIsPressed] = React105.useState(false);
11390
11390
  const actualPressed = pressed ?? isPressed;
11391
- const handlePointerDown = React104.useCallback(
11391
+ const handlePointerDown = React105.useCallback(
11392
11392
  (e) => {
11393
11393
  e.preventDefault();
11394
11394
  if (disabled) return;
@@ -11398,7 +11398,7 @@ function ControlButton({
11398
11398
  },
11399
11399
  [disabled, pressEvent, eventBus, onPress]
11400
11400
  );
11401
- const handlePointerUp = React104.useCallback(
11401
+ const handlePointerUp = React105.useCallback(
11402
11402
  (e) => {
11403
11403
  e.preventDefault();
11404
11404
  if (disabled) return;
@@ -11408,7 +11408,7 @@ function ControlButton({
11408
11408
  },
11409
11409
  [disabled, releaseEvent, eventBus, onRelease]
11410
11410
  );
11411
- const handlePointerLeave = React104.useCallback(
11411
+ const handlePointerLeave = React105.useCallback(
11412
11412
  (e) => {
11413
11413
  if (isPressed) {
11414
11414
  setIsPressed(false);
@@ -12427,8 +12427,8 @@ function MiniMap({
12427
12427
  tileAssets,
12428
12428
  unitAssets
12429
12429
  }) {
12430
- const canvasRef = React104.useRef(null);
12431
- const imgCacheRef = React104.useRef(/* @__PURE__ */ new Map());
12430
+ const canvasRef = React105.useRef(null);
12431
+ const imgCacheRef = React105.useRef(/* @__PURE__ */ new Map());
12432
12432
  function loadImg(url) {
12433
12433
  const cached = imgCacheRef.current.get(url);
12434
12434
  if (cached) return cached.complete ? cached : null;
@@ -12443,7 +12443,7 @@ function MiniMap({
12443
12443
  imgCacheRef.current.set(url, img);
12444
12444
  return null;
12445
12445
  }
12446
- React104.useEffect(() => {
12446
+ React105.useEffect(() => {
12447
12447
  const canvas = canvasRef.current;
12448
12448
  if (!canvas) return;
12449
12449
  const ctx = canvas.getContext("2d");
@@ -12578,8 +12578,8 @@ function ControlGrid({
12578
12578
  className
12579
12579
  }) {
12580
12580
  const eventBus = useEventBus();
12581
- const [active, setActive] = React104.useState(/* @__PURE__ */ new Set());
12582
- const handlePress = React104.useCallback(
12581
+ const [active, setActive] = React105.useState(/* @__PURE__ */ new Set());
12582
+ const handlePress = React105.useCallback(
12583
12583
  (id) => {
12584
12584
  setActive((prev) => new Set(prev).add(id));
12585
12585
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -12593,7 +12593,7 @@ function ControlGrid({
12593
12593
  },
12594
12594
  [kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
12595
12595
  );
12596
- const handleRelease = React104.useCallback(
12596
+ const handleRelease = React105.useCallback(
12597
12597
  (id) => {
12598
12598
  setActive((prev) => {
12599
12599
  const next = new Set(prev);
@@ -12851,7 +12851,7 @@ function InventoryGrid({
12851
12851
  const eventBus = useEventBus();
12852
12852
  const slotCount = totalSlots ?? items.length;
12853
12853
  const emptySlotCount = Math.max(0, slotCount - items.length);
12854
- const handleSelect = React104.useCallback(
12854
+ const handleSelect = React105.useCallback(
12855
12855
  (id) => {
12856
12856
  onSelect?.(id);
12857
12857
  if (selectEvent) {
@@ -13068,7 +13068,7 @@ function GameMenu({
13068
13068
  }) {
13069
13069
  const resolvedOptions = options ?? menuItems ?? DEFAULT_MENU_OPTIONS;
13070
13070
  const eventBus = useEventBus();
13071
- const handleOptionClick = React104.useCallback(
13071
+ const handleOptionClick = React105.useCallback(
13072
13072
  (option) => {
13073
13073
  if (option.event) {
13074
13074
  eventBus.emit(`UI:${option.event}`, { option });
@@ -13145,6 +13145,214 @@ var init_GameMenu = __esm({
13145
13145
  GameMenu.displayName = "GameMenu";
13146
13146
  }
13147
13147
  });
13148
+ function StateNode({
13149
+ name,
13150
+ isCurrent = false,
13151
+ isSelected = false,
13152
+ isInitial = false,
13153
+ position,
13154
+ onClick,
13155
+ className
13156
+ }) {
13157
+ return /* @__PURE__ */ jsx(
13158
+ Box,
13159
+ {
13160
+ position: "absolute",
13161
+ display: "flex",
13162
+ className: cn(
13163
+ "items-center justify-center rounded-pill border-3 transition-all cursor-pointer select-none",
13164
+ "min-w-[80px] h-[80px] px-3",
13165
+ isCurrent && "bg-primary/20 border-primary shadow-lg shadow-primary/30 scale-110",
13166
+ isSelected && !isCurrent && "bg-accent/20 border-accent ring-2 ring-accent/50",
13167
+ !isCurrent && !isSelected && "bg-card border-border hover:border-muted-foreground hover:scale-105",
13168
+ className
13169
+ ),
13170
+ style: {
13171
+ left: position.x,
13172
+ top: position.y,
13173
+ transform: "translate(-50%, -50%)"
13174
+ },
13175
+ onClick,
13176
+ children: /* @__PURE__ */ jsxs(Box, { className: "text-center", children: [
13177
+ isInitial && /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground text-xs block", children: "\u25B6 start" }),
13178
+ /* @__PURE__ */ jsx(
13179
+ Typography,
13180
+ {
13181
+ variant: "body2",
13182
+ className: cn(
13183
+ "font-bold whitespace-nowrap",
13184
+ isCurrent ? "text-primary" : "text-foreground"
13185
+ ),
13186
+ children: name
13187
+ }
13188
+ )
13189
+ ] })
13190
+ }
13191
+ );
13192
+ }
13193
+ var init_StateNode = __esm({
13194
+ "components/game/2d/organisms/StateNode.tsx"() {
13195
+ init_atoms();
13196
+ init_cn();
13197
+ StateNode.displayName = "StateNode";
13198
+ }
13199
+ });
13200
+ function TransitionArrow({
13201
+ from,
13202
+ to,
13203
+ eventLabel,
13204
+ guardHint,
13205
+ isActive = false,
13206
+ onClick,
13207
+ className
13208
+ }) {
13209
+ const dx = to.x - from.x;
13210
+ const dy = to.y - from.y;
13211
+ const dist = Math.sqrt(dx * dx + dy * dy);
13212
+ if (dist === 0) return /* @__PURE__ */ jsx(Fragment, {});
13213
+ const nx = dx / dist;
13214
+ const ny = dy / dist;
13215
+ const startX = from.x + nx * NODE_RADIUS;
13216
+ const startY = from.y + ny * NODE_RADIUS;
13217
+ const endX = to.x - nx * NODE_RADIUS;
13218
+ const endY = to.y - ny * NODE_RADIUS;
13219
+ const midX = (startX + endX) / 2;
13220
+ const midY = (startY + endY) / 2;
13221
+ const perpX = -ny * 20;
13222
+ const perpY = nx * 20;
13223
+ const ctrlX = midX + perpX;
13224
+ const ctrlY = midY + perpY;
13225
+ const path = `M ${startX} ${startY} Q ${ctrlX} ${ctrlY} ${endX} ${endY}`;
13226
+ return /* @__PURE__ */ jsxs("g", { className: cn("cursor-pointer", className), onClick, children: [
13227
+ /* @__PURE__ */ jsx(
13228
+ "path",
13229
+ {
13230
+ d: path,
13231
+ fill: "none",
13232
+ stroke: isActive ? "var(--color-primary)" : "var(--color-border)",
13233
+ strokeWidth: isActive ? 3 : 2,
13234
+ markerEnd: isActive ? "url(#arrowhead-active)" : "url(#arrowhead)"
13235
+ }
13236
+ ),
13237
+ /* @__PURE__ */ jsx(
13238
+ "text",
13239
+ {
13240
+ x: ctrlX,
13241
+ y: ctrlY - 8,
13242
+ textAnchor: "middle",
13243
+ fill: isActive ? "var(--color-primary)" : "var(--color-foreground)",
13244
+ fontSize: 12,
13245
+ fontWeight: isActive ? "bold" : "normal",
13246
+ className: "select-none",
13247
+ children: eventLabel
13248
+ }
13249
+ ),
13250
+ guardHint && /* @__PURE__ */ jsx(
13251
+ "text",
13252
+ {
13253
+ x: ctrlX,
13254
+ y: ctrlY + 6,
13255
+ textAnchor: "middle",
13256
+ fill: "var(--color-warning)",
13257
+ fontSize: 10,
13258
+ className: "select-none",
13259
+ children: "\u26A0 " + guardHint
13260
+ }
13261
+ )
13262
+ ] });
13263
+ }
13264
+ var NODE_RADIUS;
13265
+ var init_TransitionArrow = __esm({
13266
+ "components/game/2d/organisms/TransitionArrow.tsx"() {
13267
+ init_cn();
13268
+ NODE_RADIUS = 40;
13269
+ TransitionArrow.displayName = "TransitionArrow";
13270
+ }
13271
+ });
13272
+ function layoutStates(states, width, height) {
13273
+ const cx = width / 2;
13274
+ const cy = height / 2;
13275
+ const radius = Math.min(cx, cy) - 60;
13276
+ const positions = {};
13277
+ states.forEach((state, i) => {
13278
+ const angle = 2 * Math.PI * i / Math.max(states.length, 1) - Math.PI / 2;
13279
+ positions[state] = { x: cx + radius * Math.cos(angle), y: cy + radius * Math.sin(angle) };
13280
+ });
13281
+ return positions;
13282
+ }
13283
+ function StateGraph({
13284
+ states,
13285
+ transitions = [],
13286
+ currentState,
13287
+ selectedState,
13288
+ addingFrom,
13289
+ initialState,
13290
+ width = 500,
13291
+ height = 400,
13292
+ nodeClickEvent,
13293
+ className
13294
+ }) {
13295
+ const eventBus = useEventBus();
13296
+ const nodes = states ?? [];
13297
+ const positions = React105.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
13298
+ return /* @__PURE__ */ jsxs(
13299
+ Box,
13300
+ {
13301
+ position: "relative",
13302
+ className: cn("rounded-container border border-border bg-background overflow-hidden", className),
13303
+ style: { width, height },
13304
+ children: [
13305
+ /* @__PURE__ */ jsxs("svg", { width, height, className: "absolute inset-0", style: { pointerEvents: "none" }, children: [
13306
+ /* @__PURE__ */ jsxs("defs", { children: [
13307
+ /* @__PURE__ */ jsx("marker", { id: "arrowhead", markerWidth: "10", markerHeight: "7", refX: "10", refY: "3.5", orient: "auto", children: /* @__PURE__ */ jsx("polygon", { points: "0 0, 10 3.5, 0 7", fill: "var(--color-border)" }) }),
13308
+ /* @__PURE__ */ jsx("marker", { id: "arrowhead-active", markerWidth: "10", markerHeight: "7", refX: "10", refY: "3.5", orient: "auto", children: /* @__PURE__ */ jsx("polygon", { points: "0 0, 10 3.5, 0 7", fill: "var(--color-primary)" }) })
13309
+ ] }),
13310
+ transitions.map((tr, i) => {
13311
+ const fromPos = positions[tr.from];
13312
+ const toPos = positions[tr.to];
13313
+ if (!fromPos || !toPos) return null;
13314
+ return /* @__PURE__ */ jsx(
13315
+ TransitionArrow,
13316
+ {
13317
+ from: fromPos,
13318
+ to: toPos,
13319
+ eventLabel: tr.event,
13320
+ guardHint: tr.guardHint,
13321
+ isActive: tr.from === currentState
13322
+ },
13323
+ `${tr.from}-${tr.event}-${tr.to}-${i}`
13324
+ );
13325
+ })
13326
+ ] }),
13327
+ nodes.map((state) => {
13328
+ const pos = positions[state];
13329
+ if (!pos) return null;
13330
+ return /* @__PURE__ */ jsx(
13331
+ StateNode,
13332
+ {
13333
+ name: state,
13334
+ position: pos,
13335
+ isCurrent: state === currentState,
13336
+ isSelected: state === selectedState || state === addingFrom,
13337
+ isInitial: state === initialState,
13338
+ onClick: nodeClickEvent ? () => eventBus.emit(`UI:${nodeClickEvent}`, { stateId: state }) : void 0
13339
+ },
13340
+ state
13341
+ );
13342
+ })
13343
+ ]
13344
+ }
13345
+ );
13346
+ }
13347
+ var init_StateGraph = __esm({
13348
+ "components/game/2d/molecules/StateGraph.tsx"() {
13349
+ init_atoms();
13350
+ init_cn();
13351
+ init_useEventBus();
13352
+ init_StateNode();
13353
+ init_TransitionArrow();
13354
+ }
13355
+ });
13148
13356
  function useCamera() {
13149
13357
  const cameraRef = useRef({ x: 0, y: 0, zoom: 1 });
13150
13358
  const targetCameraRef = useRef(null);
@@ -14742,7 +14950,7 @@ function LinearView({
14742
14950
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
14743
14951
  const isDone = i < currentIdx;
14744
14952
  const isCurrent = i === currentIdx;
14745
- return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
14953
+ return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
14746
14954
  i > 0 && /* @__PURE__ */ jsx(
14747
14955
  Typography,
14748
14956
  {
@@ -15270,7 +15478,7 @@ function SequenceBar({
15270
15478
  onSlotRemove(index);
15271
15479
  }, [onSlotRemove, playing]);
15272
15480
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
15273
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
15481
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
15274
15482
  i > 0 && /* @__PURE__ */ jsx(
15275
15483
  Typography,
15276
15484
  {
@@ -16011,130 +16219,6 @@ var init_EventHandlerBoard = __esm({
16011
16219
  EventHandlerBoard.displayName = "EventHandlerBoard";
16012
16220
  }
16013
16221
  });
16014
- function StateNode({
16015
- name,
16016
- isCurrent = false,
16017
- isSelected = false,
16018
- isInitial = false,
16019
- position,
16020
- onClick,
16021
- className
16022
- }) {
16023
- return /* @__PURE__ */ jsx(
16024
- Box,
16025
- {
16026
- position: "absolute",
16027
- display: "flex",
16028
- className: cn(
16029
- "items-center justify-center rounded-pill border-3 transition-all cursor-pointer select-none",
16030
- "min-w-[80px] h-[80px] px-3",
16031
- isCurrent && "bg-primary/20 border-primary shadow-lg shadow-primary/30 scale-110",
16032
- isSelected && !isCurrent && "bg-accent/20 border-accent ring-2 ring-accent/50",
16033
- !isCurrent && !isSelected && "bg-card border-border hover:border-muted-foreground hover:scale-105",
16034
- className
16035
- ),
16036
- style: {
16037
- left: position.x,
16038
- top: position.y,
16039
- transform: "translate(-50%, -50%)"
16040
- },
16041
- onClick,
16042
- children: /* @__PURE__ */ jsxs(Box, { className: "text-center", children: [
16043
- isInitial && /* @__PURE__ */ jsx(Typography, { variant: "caption", className: "text-muted-foreground text-xs block", children: "\u25B6 start" }),
16044
- /* @__PURE__ */ jsx(
16045
- Typography,
16046
- {
16047
- variant: "body2",
16048
- className: cn(
16049
- "font-bold whitespace-nowrap",
16050
- isCurrent ? "text-primary" : "text-foreground"
16051
- ),
16052
- children: name
16053
- }
16054
- )
16055
- ] })
16056
- }
16057
- );
16058
- }
16059
- var init_StateNode = __esm({
16060
- "components/game/2d/organisms/StateNode.tsx"() {
16061
- init_atoms();
16062
- init_cn();
16063
- StateNode.displayName = "StateNode";
16064
- }
16065
- });
16066
- function TransitionArrow({
16067
- from,
16068
- to,
16069
- eventLabel,
16070
- guardHint,
16071
- isActive = false,
16072
- onClick,
16073
- className
16074
- }) {
16075
- const dx = to.x - from.x;
16076
- const dy = to.y - from.y;
16077
- const dist = Math.sqrt(dx * dx + dy * dy);
16078
- if (dist === 0) return /* @__PURE__ */ jsx(Fragment, {});
16079
- const nx = dx / dist;
16080
- const ny = dy / dist;
16081
- const startX = from.x + nx * NODE_RADIUS;
16082
- const startY = from.y + ny * NODE_RADIUS;
16083
- const endX = to.x - nx * NODE_RADIUS;
16084
- const endY = to.y - ny * NODE_RADIUS;
16085
- const midX = (startX + endX) / 2;
16086
- const midY = (startY + endY) / 2;
16087
- const perpX = -ny * 20;
16088
- const perpY = nx * 20;
16089
- const ctrlX = midX + perpX;
16090
- const ctrlY = midY + perpY;
16091
- const path = `M ${startX} ${startY} Q ${ctrlX} ${ctrlY} ${endX} ${endY}`;
16092
- return /* @__PURE__ */ jsxs("g", { className: cn("cursor-pointer", className), onClick, children: [
16093
- /* @__PURE__ */ jsx(
16094
- "path",
16095
- {
16096
- d: path,
16097
- fill: "none",
16098
- stroke: isActive ? "var(--color-primary)" : "var(--color-border)",
16099
- strokeWidth: isActive ? 3 : 2,
16100
- markerEnd: isActive ? "url(#arrowhead-active)" : "url(#arrowhead)"
16101
- }
16102
- ),
16103
- /* @__PURE__ */ jsx(
16104
- "text",
16105
- {
16106
- x: ctrlX,
16107
- y: ctrlY - 8,
16108
- textAnchor: "middle",
16109
- fill: isActive ? "var(--color-primary)" : "var(--color-foreground)",
16110
- fontSize: 12,
16111
- fontWeight: isActive ? "bold" : "normal",
16112
- className: "select-none",
16113
- children: eventLabel
16114
- }
16115
- ),
16116
- guardHint && /* @__PURE__ */ jsx(
16117
- "text",
16118
- {
16119
- x: ctrlX,
16120
- y: ctrlY + 6,
16121
- textAnchor: "middle",
16122
- fill: "var(--color-warning)",
16123
- fontSize: 10,
16124
- className: "select-none",
16125
- children: "\u26A0 " + guardHint
16126
- }
16127
- )
16128
- ] });
16129
- }
16130
- var NODE_RADIUS;
16131
- var init_TransitionArrow = __esm({
16132
- "components/game/2d/organisms/TransitionArrow.tsx"() {
16133
- init_cn();
16134
- NODE_RADIUS = 40;
16135
- TransitionArrow.displayName = "TransitionArrow";
16136
- }
16137
- });
16138
16222
  function VariablePanel({
16139
16223
  entityName,
16140
16224
  variables,
@@ -16220,7 +16304,7 @@ var init_StateJsonView = __esm({
16220
16304
  StateJsonView.displayName = "StateJsonView";
16221
16305
  }
16222
16306
  });
16223
- function layoutStates(states, width, height) {
16307
+ function layoutStates2(states, width, height) {
16224
16308
  const cx = width / 2;
16225
16309
  const cy = height / 2;
16226
16310
  const radius = Math.min(cx, cy) - 60;
@@ -16288,7 +16372,7 @@ function StateArchitectBoard({
16288
16372
  }, []);
16289
16373
  const GRAPH_W = 500;
16290
16374
  const GRAPH_H = 400;
16291
- const positions = useMemo(() => layoutStates(entityStates, GRAPH_W, GRAPH_H), [entityStates]);
16375
+ const positions = useMemo(() => layoutStates2(entityStates, GRAPH_W, GRAPH_H), [entityStates]);
16292
16376
  const handleStateClick = useCallback((state) => {
16293
16377
  if (isTesting) return;
16294
16378
  if (addingFrom) {
@@ -18270,7 +18354,7 @@ var init_ErrorBoundary = __esm({
18270
18354
  }
18271
18355
  );
18272
18356
  };
18273
- ErrorBoundary = class extends React104__default.Component {
18357
+ ErrorBoundary = class extends React105__default.Component {
18274
18358
  constructor(props) {
18275
18359
  super(props);
18276
18360
  __publicField(this, "reset", () => {
@@ -18552,7 +18636,7 @@ var init_Container = __esm({
18552
18636
  as: Component = "div"
18553
18637
  }) => {
18554
18638
  const resolvedSize = maxWidth ?? size ?? "lg";
18555
- return React104__default.createElement(
18639
+ return React105__default.createElement(
18556
18640
  Component,
18557
18641
  {
18558
18642
  className: cn(
@@ -20393,7 +20477,7 @@ var init_CodeBlock = __esm({
20393
20477
  DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
20394
20478
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
20395
20479
  HIDDEN_LINE_NUMBERS = { display: "none" };
20396
- CodeBlock = React104__default.memo(
20480
+ CodeBlock = React105__default.memo(
20397
20481
  ({
20398
20482
  code: rawCode,
20399
20483
  language = "text",
@@ -20980,7 +21064,7 @@ var init_MarkdownContent = __esm({
20980
21064
  init_Box();
20981
21065
  init_CodeBlock();
20982
21066
  init_cn();
20983
- MarkdownContent = React104__default.memo(
21067
+ MarkdownContent = React105__default.memo(
20984
21068
  ({ content, direction = "ltr", className }) => {
20985
21069
  const { t: _t } = useTranslate();
20986
21070
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -22307,7 +22391,7 @@ var init_StateMachineView = __esm({
22307
22391
  style: { top: title ? 30 : 0 },
22308
22392
  children: [
22309
22393
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
22310
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React104__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
22394
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React105__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
22311
22395
  StateNode2,
22312
22396
  {
22313
22397
  state,
@@ -27945,8 +28029,8 @@ var init_Menu = __esm({
27945
28029
  "bottom-end": "bottom-start"
27946
28030
  };
27947
28031
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
27948
- const triggerChild = React104__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
27949
- const triggerElement = React104__default.cloneElement(
28032
+ const triggerChild = React105__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
28033
+ const triggerElement = React105__default.cloneElement(
27950
28034
  triggerChild,
27951
28035
  {
27952
28036
  ref: triggerRef,
@@ -28041,14 +28125,14 @@ function useDataDnd(args) {
28041
28125
  const isZone = Boolean(dragGroup || accepts || sortable);
28042
28126
  const enabled = isZone || Boolean(dndRoot);
28043
28127
  const eventBus = useEventBus();
28044
- const parentRoot = React104__default.useContext(RootCtx);
28128
+ const parentRoot = React105__default.useContext(RootCtx);
28045
28129
  const isRoot = enabled && parentRoot === null;
28046
- const zoneId = React104__default.useId();
28130
+ const zoneId = React105__default.useId();
28047
28131
  const ownGroup = dragGroup ?? accepts ?? zoneId;
28048
- const [optimisticOrders, setOptimisticOrders] = React104__default.useState(() => /* @__PURE__ */ new Map());
28049
- const optimisticOrdersRef = React104__default.useRef(optimisticOrders);
28132
+ const [optimisticOrders, setOptimisticOrders] = React105__default.useState(() => /* @__PURE__ */ new Map());
28133
+ const optimisticOrdersRef = React105__default.useRef(optimisticOrders);
28050
28134
  optimisticOrdersRef.current = optimisticOrders;
28051
- const clearOptimisticOrder = React104__default.useCallback((group) => {
28135
+ const clearOptimisticOrder = React105__default.useCallback((group) => {
28052
28136
  setOptimisticOrders((prev) => {
28053
28137
  if (!prev.has(group)) return prev;
28054
28138
  const next = new Map(prev);
@@ -28073,7 +28157,7 @@ function useDataDnd(args) {
28073
28157
  const raw = it[dndItemIdField];
28074
28158
  return raw != null ? String(raw) : `__idx_${idx}`;
28075
28159
  }).join("|");
28076
- const itemIds = React104__default.useMemo(
28160
+ const itemIds = React105__default.useMemo(
28077
28161
  () => orderedItems.map((it, idx) => {
28078
28162
  const raw = it[dndItemIdField];
28079
28163
  return raw != null ? String(raw) : `__idx_${idx}`;
@@ -28084,7 +28168,7 @@ function useDataDnd(args) {
28084
28168
  const raw = it[dndItemIdField];
28085
28169
  return raw != null ? String(raw) : `__${idx}`;
28086
28170
  }).join("|");
28087
- React104__default.useEffect(() => {
28171
+ React105__default.useEffect(() => {
28088
28172
  const root = isRoot ? null : parentRoot;
28089
28173
  if (root) {
28090
28174
  root.clearOptimisticOrder(ownGroup);
@@ -28092,20 +28176,20 @@ function useDataDnd(args) {
28092
28176
  clearOptimisticOrder(ownGroup);
28093
28177
  }
28094
28178
  }, [itemsContentSig, ownGroup]);
28095
- const zonesRef = React104__default.useRef(/* @__PURE__ */ new Map());
28096
- const registerZone = React104__default.useCallback((zoneId2, meta2) => {
28179
+ const zonesRef = React105__default.useRef(/* @__PURE__ */ new Map());
28180
+ const registerZone = React105__default.useCallback((zoneId2, meta2) => {
28097
28181
  zonesRef.current.set(zoneId2, meta2);
28098
28182
  }, []);
28099
- const unregisterZone = React104__default.useCallback((zoneId2) => {
28183
+ const unregisterZone = React105__default.useCallback((zoneId2) => {
28100
28184
  zonesRef.current.delete(zoneId2);
28101
28185
  }, []);
28102
- const [activeDrag, setActiveDrag] = React104__default.useState(null);
28103
- const [overZoneGroup, setOverZoneGroup] = React104__default.useState(null);
28104
- const meta = React104__default.useMemo(
28186
+ const [activeDrag, setActiveDrag] = React105__default.useState(null);
28187
+ const [overZoneGroup, setOverZoneGroup] = React105__default.useState(null);
28188
+ const meta = React105__default.useMemo(
28105
28189
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
28106
28190
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
28107
28191
  );
28108
- React104__default.useEffect(() => {
28192
+ React105__default.useEffect(() => {
28109
28193
  const target = isRoot ? null : parentRoot;
28110
28194
  if (!target) {
28111
28195
  zonesRef.current.set(zoneId, meta);
@@ -28124,7 +28208,7 @@ function useDataDnd(args) {
28124
28208
  }, [parentRoot, isRoot, zoneId, meta]);
28125
28209
  const sensors = useAlmadarDndSensors(true);
28126
28210
  const collisionDetection = almadarDndCollisionDetection;
28127
- const findZoneByItem = React104__default.useCallback(
28211
+ const findZoneByItem = React105__default.useCallback(
28128
28212
  (id) => {
28129
28213
  for (const z of zonesRef.current.values()) {
28130
28214
  if (z.itemIds.includes(id)) return z;
@@ -28133,7 +28217,7 @@ function useDataDnd(args) {
28133
28217
  },
28134
28218
  []
28135
28219
  );
28136
- React104__default.useCallback(
28220
+ React105__default.useCallback(
28137
28221
  (group) => {
28138
28222
  for (const z of zonesRef.current.values()) {
28139
28223
  if (z.group === group) return z;
@@ -28142,7 +28226,7 @@ function useDataDnd(args) {
28142
28226
  },
28143
28227
  []
28144
28228
  );
28145
- const handleDragEnd = React104__default.useCallback(
28229
+ const handleDragEnd = React105__default.useCallback(
28146
28230
  (event) => {
28147
28231
  const { active, over } = event;
28148
28232
  const activeIdStr = String(active.id);
@@ -28233,8 +28317,8 @@ function useDataDnd(args) {
28233
28317
  },
28234
28318
  [eventBus]
28235
28319
  );
28236
- const sortableData = React104__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
28237
- const SortableItem = React104__default.useCallback(
28320
+ const sortableData = React105__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
28321
+ const SortableItem = React105__default.useCallback(
28238
28322
  ({ id, children }) => {
28239
28323
  const {
28240
28324
  attributes,
@@ -28274,7 +28358,7 @@ function useDataDnd(args) {
28274
28358
  id: droppableId,
28275
28359
  data: sortableData
28276
28360
  });
28277
- const ctx = React104__default.useContext(RootCtx);
28361
+ const ctx = React105__default.useContext(RootCtx);
28278
28362
  const activeDrag2 = ctx?.activeDrag ?? null;
28279
28363
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
28280
28364
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -28289,7 +28373,7 @@ function useDataDnd(args) {
28289
28373
  showForeignPlaceholder,
28290
28374
  ctxAvailable: ctx != null
28291
28375
  });
28292
- React104__default.useEffect(() => {
28376
+ React105__default.useEffect(() => {
28293
28377
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
28294
28378
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
28295
28379
  return /* @__PURE__ */ jsx(
@@ -28303,11 +28387,11 @@ function useDataDnd(args) {
28303
28387
  }
28304
28388
  );
28305
28389
  };
28306
- const rootContextValue = React104__default.useMemo(
28390
+ const rootContextValue = React105__default.useMemo(
28307
28391
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
28308
28392
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
28309
28393
  );
28310
- const handleDragStart = React104__default.useCallback((event) => {
28394
+ const handleDragStart = React105__default.useCallback((event) => {
28311
28395
  const sourceZone = findZoneByItem(event.active.id);
28312
28396
  const rect = event.active.rect.current.initial;
28313
28397
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -28326,7 +28410,7 @@ function useDataDnd(args) {
28326
28410
  isRoot
28327
28411
  });
28328
28412
  }, [findZoneByItem, isRoot, zoneId]);
28329
- const handleDragOver = React104__default.useCallback((event) => {
28413
+ const handleDragOver = React105__default.useCallback((event) => {
28330
28414
  const { active, over } = event;
28331
28415
  const overData = over?.data?.current;
28332
28416
  const overGroup = overData?.dndGroup ?? null;
@@ -28396,7 +28480,7 @@ function useDataDnd(args) {
28396
28480
  return next;
28397
28481
  });
28398
28482
  }, []);
28399
- const handleDragCancel = React104__default.useCallback((event) => {
28483
+ const handleDragCancel = React105__default.useCallback((event) => {
28400
28484
  setActiveDrag(null);
28401
28485
  setOverZoneGroup(null);
28402
28486
  dndLog.warn("dragCancel", {
@@ -28404,12 +28488,12 @@ function useDataDnd(args) {
28404
28488
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
28405
28489
  });
28406
28490
  }, []);
28407
- const handleDragEndWithCleanup = React104__default.useCallback((event) => {
28491
+ const handleDragEndWithCleanup = React105__default.useCallback((event) => {
28408
28492
  handleDragEnd(event);
28409
28493
  setActiveDrag(null);
28410
28494
  setOverZoneGroup(null);
28411
28495
  }, [handleDragEnd]);
28412
- const wrapContainer = React104__default.useCallback(
28496
+ const wrapContainer = React105__default.useCallback(
28413
28497
  (children) => {
28414
28498
  if (!enabled) return children;
28415
28499
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -28463,7 +28547,7 @@ var init_useDataDnd = __esm({
28463
28547
  init_useAlmadarDndCollision();
28464
28548
  init_Box();
28465
28549
  dndLog = createLogger("almadar:ui:dnd");
28466
- RootCtx = React104__default.createContext(null);
28550
+ RootCtx = React105__default.createContext(null);
28467
28551
  }
28468
28552
  });
28469
28553
  function renderIconInput(icon, props) {
@@ -28989,7 +29073,7 @@ function DataList({
28989
29073
  }) {
28990
29074
  const eventBus = useEventBus();
28991
29075
  const { t } = useTranslate();
28992
- const [visibleCount, setVisibleCount] = React104__default.useState(pageSize || Infinity);
29076
+ const [visibleCount, setVisibleCount] = React105__default.useState(pageSize || Infinity);
28993
29077
  const fieldDefs = fields ?? columns ?? [];
28994
29078
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
28995
29079
  const dnd = useDataDnd({
@@ -29008,7 +29092,7 @@ function DataList({
29008
29092
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
29009
29093
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
29010
29094
  const hasRenderProp = typeof children === "function";
29011
- React104__default.useEffect(() => {
29095
+ React105__default.useEffect(() => {
29012
29096
  const renderItemTypeOf = typeof schemaRenderItem;
29013
29097
  const childrenTypeOf = typeof children;
29014
29098
  if (data.length > 0 && !hasRenderProp) {
@@ -29112,7 +29196,7 @@ function DataList({
29112
29196
  const items2 = [...data];
29113
29197
  const groups2 = groupBy ? groupData(items2, groupBy) : [{ label: "", items: items2 }];
29114
29198
  const contentField = titleField?.name ?? fieldDefs[0]?.name ?? "";
29115
- return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
29199
+ return /* @__PURE__ */ jsx(VStack, { gap: "sm", className: cn("py-2", className), children: groups2.map((group, gi) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
29116
29200
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
29117
29201
  group.items.map((itemData, index) => {
29118
29202
  const id = itemData.id || `${gi}-${index}`;
@@ -29253,7 +29337,7 @@ function DataList({
29253
29337
  className
29254
29338
  ),
29255
29339
  children: [
29256
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
29340
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
29257
29341
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
29258
29342
  group.items.map(
29259
29343
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -29338,7 +29422,7 @@ var init_FormSection = __esm({
29338
29422
  columns = 1,
29339
29423
  className
29340
29424
  }) => {
29341
- const [collapsed, setCollapsed] = React104__default.useState(defaultCollapsed);
29425
+ const [collapsed, setCollapsed] = React105__default.useState(defaultCollapsed);
29342
29426
  const { t } = useTranslate();
29343
29427
  const eventBus = useEventBus();
29344
29428
  const gridClass = {
@@ -29346,7 +29430,7 @@ var init_FormSection = __esm({
29346
29430
  2: "grid-cols-1 md:grid-cols-2",
29347
29431
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
29348
29432
  }[columns];
29349
- React104__default.useCallback(() => {
29433
+ React105__default.useCallback(() => {
29350
29434
  if (collapsible) {
29351
29435
  setCollapsed((prev) => !prev);
29352
29436
  eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
@@ -30296,7 +30380,7 @@ var init_Flex = __esm({
30296
30380
  flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
30297
30381
  }
30298
30382
  }
30299
- return React104__default.createElement(Component, {
30383
+ return React105__default.createElement(Component, {
30300
30384
  className: cn(
30301
30385
  inline ? "inline-flex" : "flex",
30302
30386
  directionStyles[direction],
@@ -30415,7 +30499,7 @@ var init_Grid = __esm({
30415
30499
  as: Component = "div"
30416
30500
  }) => {
30417
30501
  const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
30418
- return React104__default.createElement(
30502
+ return React105__default.createElement(
30419
30503
  Component,
30420
30504
  {
30421
30505
  className: cn(
@@ -30611,9 +30695,9 @@ var init_Popover = __esm({
30611
30695
  onMouseLeave: handleClose,
30612
30696
  onPointerDown: tapTriggerProps.onPointerDown
30613
30697
  };
30614
- const childElement = React104__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
30698
+ const childElement = React105__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
30615
30699
  const childPointerDown = childElement.props.onPointerDown;
30616
- const triggerElement = React104__default.cloneElement(
30700
+ const triggerElement = React105__default.cloneElement(
30617
30701
  childElement,
30618
30702
  {
30619
30703
  ref: triggerRef,
@@ -31215,9 +31299,9 @@ var init_Tooltip = __esm({
31215
31299
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
31216
31300
  };
31217
31301
  }, []);
31218
- const triggerElement = React104__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
31302
+ const triggerElement = React105__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
31219
31303
  const childPointerDown = triggerElement.props.onPointerDown;
31220
- const trigger = React104__default.cloneElement(triggerElement, {
31304
+ const trigger = React105__default.cloneElement(triggerElement, {
31221
31305
  ref: triggerRef,
31222
31306
  onMouseEnter: handleMouseEnter,
31223
31307
  onMouseLeave: handleMouseLeave,
@@ -31307,7 +31391,7 @@ var init_WizardProgress = __esm({
31307
31391
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
31308
31392
  const isActive = index === currentStep;
31309
31393
  const isCompleted = index < currentStep;
31310
- return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
31394
+ return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
31311
31395
  /* @__PURE__ */ jsx(
31312
31396
  "button",
31313
31397
  {
@@ -32867,7 +32951,7 @@ var init_MapView = __esm({
32867
32951
  shadowSize: [41, 41]
32868
32952
  });
32869
32953
  L.Marker.prototype.options.icon = defaultIcon;
32870
- const { useEffect: useEffect71, useRef: useRef67, useCallback: useCallback105, useState: useState105 } = React104__default;
32954
+ const { useEffect: useEffect71, useRef: useRef67, useCallback: useCallback105, useState: useState105 } = React105__default;
32871
32955
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
32872
32956
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
32873
32957
  function MapUpdater({ centerLat, centerLng, zoom }) {
@@ -33782,8 +33866,8 @@ function TableView({
33782
33866
  }) {
33783
33867
  const eventBus = useEventBus();
33784
33868
  const { t } = useTranslate();
33785
- const [visibleCount, setVisibleCount] = React104__default.useState(pageSize > 0 ? pageSize : Infinity);
33786
- const [localSelected, setLocalSelected] = React104__default.useState(/* @__PURE__ */ new Set());
33869
+ const [visibleCount, setVisibleCount] = React105__default.useState(pageSize > 0 ? pageSize : Infinity);
33870
+ const [localSelected, setLocalSelected] = React105__default.useState(/* @__PURE__ */ new Set());
33787
33871
  const colDefs = columns ?? fields ?? [];
33788
33872
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
33789
33873
  const dnd = useDataDnd({
@@ -33978,12 +34062,12 @@ function TableView({
33978
34062
  ]
33979
34063
  }
33980
34064
  );
33981
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React104__default.Fragment, { children: rowInner }, id);
34065
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React105__default.Fragment, { children: rowInner }, id);
33982
34066
  };
33983
34067
  const items = Array.from(data);
33984
34068
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
33985
34069
  let runningIndex = 0;
33986
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
34070
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
33987
34071
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
33988
34072
  group.items.map((row) => renderRow(row, runningIndex++))
33989
34073
  ] }, gi)) });
@@ -35340,7 +35424,7 @@ var init_StepFlow = __esm({
35340
35424
  className
35341
35425
  }) => {
35342
35426
  if (orientation === "vertical") {
35343
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React104__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
35427
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React105__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
35344
35428
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
35345
35429
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
35346
35430
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -35351,7 +35435,7 @@ var init_StepFlow = __esm({
35351
35435
  ] })
35352
35436
  ] }) }, index)) });
35353
35437
  }
35354
- return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
35438
+ return /* @__PURE__ */ jsx(Box, { className: cn("w-full flex flex-col md:flex-row items-start gap-0", className), children: steps.map((step, index) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
35355
35439
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
35356
35440
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
35357
35441
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -36336,7 +36420,7 @@ var init_LikertScale = __esm({
36336
36420
  md: "text-base",
36337
36421
  lg: "text-lg"
36338
36422
  };
36339
- LikertScale = React104__default.forwardRef(
36423
+ LikertScale = React105__default.forwardRef(
36340
36424
  ({
36341
36425
  question,
36342
36426
  options = DEFAULT_LIKERT_OPTIONS,
@@ -36348,7 +36432,7 @@ var init_LikertScale = __esm({
36348
36432
  variant = "radios",
36349
36433
  className
36350
36434
  }, ref) => {
36351
- const groupId = React104__default.useId();
36435
+ const groupId = React105__default.useId();
36352
36436
  const eventBus = useEventBus();
36353
36437
  const handleSelect = useCallback(
36354
36438
  (next) => {
@@ -38630,7 +38714,7 @@ var init_DocBreadcrumb = __esm({
38630
38714
  "aria-label": t("aria.breadcrumb"),
38631
38715
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
38632
38716
  const isLast = idx === items.length - 1;
38633
- return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
38717
+ return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
38634
38718
  idx > 0 && /* @__PURE__ */ jsx(
38635
38719
  Icon,
38636
38720
  {
@@ -39294,7 +39378,7 @@ var init_PageHeader = __esm({
39294
39378
  info: "bg-info/10 text-info"
39295
39379
  };
39296
39380
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
39297
- breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
39381
+ breadcrumbs && breadcrumbs.length > 0 && /* @__PURE__ */ jsx(Box, { as: "nav", className: "mb-4", children: /* @__PURE__ */ jsx(Box, { as: "ol", className: "flex items-center gap-2 text-sm", children: breadcrumbs.map((crumb, idx) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
39298
39382
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
39299
39383
  crumb.href ? /* @__PURE__ */ jsx(
39300
39384
  "a",
@@ -39652,7 +39736,7 @@ var init_Section = __esm({
39652
39736
  as: Component = "section"
39653
39737
  }) => {
39654
39738
  const hasHeader = title || description || action;
39655
- return React104__default.createElement(
39739
+ return React105__default.createElement(
39656
39740
  Component,
39657
39741
  {
39658
39742
  className: cn(
@@ -40026,7 +40110,7 @@ var init_WizardContainer = __esm({
40026
40110
  const isCompleted = index < currentStep;
40027
40111
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
40028
40112
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
40029
- return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
40113
+ return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
40030
40114
  /* @__PURE__ */ jsx(
40031
40115
  Button,
40032
40116
  {
@@ -42459,7 +42543,7 @@ var init_DetailPanel = __esm({
42459
42543
  }
42460
42544
  });
42461
42545
  function extractTitle(children) {
42462
- if (!React104__default.isValidElement(children)) return void 0;
42546
+ if (!React105__default.isValidElement(children)) return void 0;
42463
42547
  const props = children.props;
42464
42548
  if (typeof props.title === "string") {
42465
42549
  return props.title;
@@ -42809,12 +42893,12 @@ var init_Form = __esm({
42809
42893
  const isSchemaEntity = isOrbitalEntitySchema(entity);
42810
42894
  const resolvedEntity = isSchemaEntity ? entity : void 0;
42811
42895
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
42812
- const normalizedInitialData = React104__default.useMemo(() => {
42896
+ const normalizedInitialData = React105__default.useMemo(() => {
42813
42897
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
42814
42898
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
42815
42899
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
42816
42900
  }, [entity, initialData]);
42817
- const entityDerivedFields = React104__default.useMemo(() => {
42901
+ const entityDerivedFields = React105__default.useMemo(() => {
42818
42902
  if (fields && fields.length > 0) return void 0;
42819
42903
  if (!resolvedEntity) return void 0;
42820
42904
  return resolvedEntity.fields.map(
@@ -42835,16 +42919,16 @@ var init_Form = __esm({
42835
42919
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
42836
42920
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
42837
42921
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
42838
- const [formData, setFormData] = React104__default.useState(
42922
+ const [formData, setFormData] = React105__default.useState(
42839
42923
  normalizedInitialData
42840
42924
  );
42841
- const [collapsedSections, setCollapsedSections] = React104__default.useState(
42925
+ const [collapsedSections, setCollapsedSections] = React105__default.useState(
42842
42926
  /* @__PURE__ */ new Set()
42843
42927
  );
42844
- const [submitError, setSubmitError] = React104__default.useState(null);
42845
- const formRef = React104__default.useRef(null);
42928
+ const [submitError, setSubmitError] = React105__default.useState(null);
42929
+ const formRef = React105__default.useRef(null);
42846
42930
  const formMode = props.mode;
42847
- const mountedRef = React104__default.useRef(false);
42931
+ const mountedRef = React105__default.useRef(false);
42848
42932
  if (!mountedRef.current) {
42849
42933
  mountedRef.current = true;
42850
42934
  debug("forms", "mount", {
@@ -42857,7 +42941,7 @@ var init_Form = __esm({
42857
42941
  });
42858
42942
  }
42859
42943
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
42860
- const evalContext = React104__default.useMemo(
42944
+ const evalContext = React105__default.useMemo(
42861
42945
  () => ({
42862
42946
  formValues: formData,
42863
42947
  globalVariables: externalContext?.globalVariables ?? {},
@@ -42866,7 +42950,7 @@ var init_Form = __esm({
42866
42950
  }),
42867
42951
  [formData, externalContext]
42868
42952
  );
42869
- React104__default.useEffect(() => {
42953
+ React105__default.useEffect(() => {
42870
42954
  debug("forms", "initialData-sync", {
42871
42955
  mode: formMode,
42872
42956
  normalizedInitialData,
@@ -42877,7 +42961,7 @@ var init_Form = __esm({
42877
42961
  setFormData(normalizedInitialData);
42878
42962
  }
42879
42963
  }, [normalizedInitialData]);
42880
- const processCalculations = React104__default.useCallback(
42964
+ const processCalculations = React105__default.useCallback(
42881
42965
  (changedFieldId, newFormData) => {
42882
42966
  if (!hiddenCalculations.length) return;
42883
42967
  const context = {
@@ -42902,7 +42986,7 @@ var init_Form = __esm({
42902
42986
  },
42903
42987
  [hiddenCalculations, externalContext, eventBus]
42904
42988
  );
42905
- const checkViolations = React104__default.useCallback(
42989
+ const checkViolations = React105__default.useCallback(
42906
42990
  (changedFieldId, newFormData) => {
42907
42991
  if (!violationTriggers.length) return;
42908
42992
  const context = {
@@ -42940,7 +43024,7 @@ var init_Form = __esm({
42940
43024
  processCalculations(name, newFormData);
42941
43025
  checkViolations(name, newFormData);
42942
43026
  };
42943
- const isFieldVisible = React104__default.useCallback(
43027
+ const isFieldVisible = React105__default.useCallback(
42944
43028
  (fieldName) => {
42945
43029
  const condition = conditionalFields[fieldName];
42946
43030
  if (!condition) return true;
@@ -42948,7 +43032,7 @@ var init_Form = __esm({
42948
43032
  },
42949
43033
  [conditionalFields, evalContext]
42950
43034
  );
42951
- const isSectionVisible = React104__default.useCallback(
43035
+ const isSectionVisible = React105__default.useCallback(
42952
43036
  (section) => {
42953
43037
  if (!section.condition) return true;
42954
43038
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -43024,7 +43108,7 @@ var init_Form = __esm({
43024
43108
  eventBus.emit(`UI:${onCancel}`);
43025
43109
  }
43026
43110
  };
43027
- const renderField = React104__default.useCallback(
43111
+ const renderField = React105__default.useCallback(
43028
43112
  (field) => {
43029
43113
  const fieldName = field.name || field.field;
43030
43114
  if (!fieldName) return null;
@@ -43045,7 +43129,7 @@ var init_Form = __esm({
43045
43129
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
43046
43130
  );
43047
43131
  const effectiveFields = entityDerivedFields ?? fields;
43048
- const normalizedFields = React104__default.useMemo(() => {
43132
+ const normalizedFields = React105__default.useMemo(() => {
43049
43133
  if (!effectiveFields || effectiveFields.length === 0) return [];
43050
43134
  return effectiveFields.map((field) => {
43051
43135
  if (typeof field === "string") {
@@ -43069,7 +43153,7 @@ var init_Form = __esm({
43069
43153
  return field;
43070
43154
  });
43071
43155
  }, [effectiveFields, resolvedEntity]);
43072
- const schemaFields = React104__default.useMemo(() => {
43156
+ const schemaFields = React105__default.useMemo(() => {
43073
43157
  if (normalizedFields.length === 0) return null;
43074
43158
  if (isDebugEnabled()) {
43075
43159
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -43079,7 +43163,7 @@ var init_Form = __esm({
43079
43163
  }
43080
43164
  return normalizedFields.map(renderField).filter(Boolean);
43081
43165
  }, [normalizedFields, renderField, entityName, conditionalFields]);
43082
- const sectionElements = React104__default.useMemo(() => {
43166
+ const sectionElements = React105__default.useMemo(() => {
43083
43167
  if (!sections || sections.length === 0) return null;
43084
43168
  return sections.map((section) => {
43085
43169
  if (!isSectionVisible(section)) {
@@ -43804,7 +43888,7 @@ var init_List = __esm({
43804
43888
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
43805
43889
  return [];
43806
43890
  }, [entity]);
43807
- const getItemActions = React104__default.useCallback(
43891
+ const getItemActions = React105__default.useCallback(
43808
43892
  (item) => {
43809
43893
  if (!itemActions) return [];
43810
43894
  if (typeof itemActions === "function") {
@@ -44279,7 +44363,7 @@ var init_MediaGallery = __esm({
44279
44363
  [selectable, selectedItems, selectionEvent, eventBus]
44280
44364
  );
44281
44365
  const entityData = Array.isArray(entity) ? entity : [];
44282
- const items = React104__default.useMemo(() => {
44366
+ const items = React105__default.useMemo(() => {
44283
44367
  if (propItems) return propItems;
44284
44368
  if (entityData.length === 0) return [];
44285
44369
  return entityData.map((record, idx) => {
@@ -44442,7 +44526,7 @@ var init_MediaGallery = __esm({
44442
44526
  }
44443
44527
  });
44444
44528
  function extractTitle2(children) {
44445
- if (!React104__default.isValidElement(children)) return void 0;
44529
+ if (!React105__default.isValidElement(children)) return void 0;
44446
44530
  const props = children.props;
44447
44531
  if (typeof props.title === "string") {
44448
44532
  return props.title;
@@ -44716,7 +44800,7 @@ var init_debugRegistry = __esm({
44716
44800
  }
44717
44801
  });
44718
44802
  function useDebugData() {
44719
- const [data, setData] = React104.useState(() => ({
44803
+ const [data, setData] = React105.useState(() => ({
44720
44804
  traits: [],
44721
44805
  ticks: [],
44722
44806
  guards: [],
@@ -44730,7 +44814,7 @@ function useDebugData() {
44730
44814
  },
44731
44815
  lastUpdate: Date.now()
44732
44816
  }));
44733
- React104.useEffect(() => {
44817
+ React105.useEffect(() => {
44734
44818
  const updateData = () => {
44735
44819
  setData({
44736
44820
  traits: getAllTraits(),
@@ -44839,12 +44923,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
44839
44923
  return positions;
44840
44924
  }
44841
44925
  function WalkMinimap() {
44842
- const [walkStep, setWalkStep] = React104.useState(null);
44843
- const [traits2, setTraits] = React104.useState([]);
44844
- const [coveredEdges, setCoveredEdges] = React104.useState([]);
44845
- const [completedTraits, setCompletedTraits] = React104.useState(/* @__PURE__ */ new Set());
44846
- const prevTraitRef = React104.useRef(null);
44847
- React104.useEffect(() => {
44926
+ const [walkStep, setWalkStep] = React105.useState(null);
44927
+ const [traits2, setTraits] = React105.useState([]);
44928
+ const [coveredEdges, setCoveredEdges] = React105.useState([]);
44929
+ const [completedTraits, setCompletedTraits] = React105.useState(/* @__PURE__ */ new Set());
44930
+ const prevTraitRef = React105.useRef(null);
44931
+ React105.useEffect(() => {
44848
44932
  const interval = setInterval(() => {
44849
44933
  const w = window;
44850
44934
  const step = w.__orbitalWalkStep;
@@ -45280,15 +45364,15 @@ var init_EntitiesTab = __esm({
45280
45364
  });
45281
45365
  function EventFlowTab({ events: events2 }) {
45282
45366
  const { t } = useTranslate();
45283
- const [filter, setFilter] = React104.useState("all");
45284
- const containerRef = React104.useRef(null);
45285
- const [autoScroll, setAutoScroll] = React104.useState(true);
45286
- React104.useEffect(() => {
45367
+ const [filter, setFilter] = React105.useState("all");
45368
+ const containerRef = React105.useRef(null);
45369
+ const [autoScroll, setAutoScroll] = React105.useState(true);
45370
+ React105.useEffect(() => {
45287
45371
  if (autoScroll && containerRef.current) {
45288
45372
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
45289
45373
  }
45290
45374
  }, [events2.length, autoScroll]);
45291
- const filteredEvents = React104.useMemo(() => {
45375
+ const filteredEvents = React105.useMemo(() => {
45292
45376
  if (filter === "all") return events2;
45293
45377
  return events2.filter((e) => e.type === filter);
45294
45378
  }, [events2, filter]);
@@ -45404,7 +45488,7 @@ var init_EventFlowTab = __esm({
45404
45488
  });
45405
45489
  function GuardsPanel({ guards }) {
45406
45490
  const { t } = useTranslate();
45407
- const [filter, setFilter] = React104.useState("all");
45491
+ const [filter, setFilter] = React105.useState("all");
45408
45492
  if (guards.length === 0) {
45409
45493
  return /* @__PURE__ */ jsx(
45410
45494
  EmptyState,
@@ -45417,7 +45501,7 @@ function GuardsPanel({ guards }) {
45417
45501
  }
45418
45502
  const passedCount = guards.filter((g) => g.result).length;
45419
45503
  const failedCount = guards.length - passedCount;
45420
- const filteredGuards = React104.useMemo(() => {
45504
+ const filteredGuards = React105.useMemo(() => {
45421
45505
  if (filter === "all") return guards;
45422
45506
  if (filter === "passed") return guards.filter((g) => g.result);
45423
45507
  return guards.filter((g) => !g.result);
@@ -45580,10 +45664,10 @@ function EffectBadge({ effect }) {
45580
45664
  }
45581
45665
  function TransitionTimeline({ transitions }) {
45582
45666
  const { t } = useTranslate();
45583
- const containerRef = React104.useRef(null);
45584
- const [autoScroll, setAutoScroll] = React104.useState(true);
45585
- const [expandedId, setExpandedId] = React104.useState(null);
45586
- React104.useEffect(() => {
45667
+ const containerRef = React105.useRef(null);
45668
+ const [autoScroll, setAutoScroll] = React105.useState(true);
45669
+ const [expandedId, setExpandedId] = React105.useState(null);
45670
+ React105.useEffect(() => {
45587
45671
  if (autoScroll && containerRef.current) {
45588
45672
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
45589
45673
  }
@@ -45863,9 +45947,9 @@ function getAllEvents(traits2) {
45863
45947
  function EventDispatcherTab({ traits: traits2, schema }) {
45864
45948
  const eventBus = useEventBus();
45865
45949
  const { t } = useTranslate();
45866
- const [log11, setLog] = React104.useState([]);
45867
- const prevStatesRef = React104.useRef(/* @__PURE__ */ new Map());
45868
- React104.useEffect(() => {
45950
+ const [log11, setLog] = React105.useState([]);
45951
+ const prevStatesRef = React105.useRef(/* @__PURE__ */ new Map());
45952
+ React105.useEffect(() => {
45869
45953
  for (const trait of traits2) {
45870
45954
  const prev = prevStatesRef.current.get(trait.id);
45871
45955
  if (prev && prev !== trait.currentState) {
@@ -46034,10 +46118,10 @@ function VerifyModePanel({
46034
46118
  localCount
46035
46119
  }) {
46036
46120
  const { t } = useTranslate();
46037
- const [expanded, setExpanded] = React104.useState(true);
46038
- const scrollRef = React104.useRef(null);
46039
- const prevCountRef = React104.useRef(0);
46040
- React104.useEffect(() => {
46121
+ const [expanded, setExpanded] = React105.useState(true);
46122
+ const scrollRef = React105.useRef(null);
46123
+ const prevCountRef = React105.useRef(0);
46124
+ React105.useEffect(() => {
46041
46125
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
46042
46126
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
46043
46127
  }
@@ -46094,10 +46178,10 @@ function RuntimeDebugger({
46094
46178
  schema
46095
46179
  }) {
46096
46180
  const { t } = useTranslate();
46097
- const [isCollapsed, setIsCollapsed] = React104.useState(mode === "verify" ? true : defaultCollapsed);
46098
- const [isVisible, setIsVisible] = React104.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
46181
+ const [isCollapsed, setIsCollapsed] = React105.useState(mode === "verify" ? true : defaultCollapsed);
46182
+ const [isVisible, setIsVisible] = React105.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
46099
46183
  const debugData = useDebugData();
46100
- React104.useEffect(() => {
46184
+ React105.useEffect(() => {
46101
46185
  if (mode === "inline") return;
46102
46186
  return onDebugToggle((enabled) => {
46103
46187
  setIsVisible(enabled);
@@ -46106,7 +46190,7 @@ function RuntimeDebugger({
46106
46190
  }
46107
46191
  });
46108
46192
  }, [mode]);
46109
- React104.useEffect(() => {
46193
+ React105.useEffect(() => {
46110
46194
  if (mode === "inline") return;
46111
46195
  const handleKeyDown = (e) => {
46112
46196
  if (e.key === "`" && isVisible) {
@@ -46626,7 +46710,7 @@ var init_StatCard = __esm({
46626
46710
  const labelToUse = propLabel ?? propTitle;
46627
46711
  const eventBus = useEventBus();
46628
46712
  const { t } = useTranslate();
46629
- const handleActionClick = React104__default.useCallback(() => {
46713
+ const handleActionClick = React105__default.useCallback(() => {
46630
46714
  if (action?.event) {
46631
46715
  eventBus.emit(`UI:${action.event}`, {});
46632
46716
  }
@@ -46637,7 +46721,7 @@ var init_StatCard = __esm({
46637
46721
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
46638
46722
  const isLoading = externalLoading ?? false;
46639
46723
  const error = externalError;
46640
- const computeMetricValue = React104__default.useCallback(
46724
+ const computeMetricValue = React105__default.useCallback(
46641
46725
  (metric, items) => {
46642
46726
  if (metric.value !== void 0) {
46643
46727
  return metric.value;
@@ -46676,7 +46760,7 @@ var init_StatCard = __esm({
46676
46760
  },
46677
46761
  []
46678
46762
  );
46679
- const schemaStats = React104__default.useMemo(() => {
46763
+ const schemaStats = React105__default.useMemo(() => {
46680
46764
  if (!metrics || metrics.length === 0) return null;
46681
46765
  return metrics.map((metric) => ({
46682
46766
  label: metric.label,
@@ -46684,7 +46768,7 @@ var init_StatCard = __esm({
46684
46768
  format: metric.format
46685
46769
  }));
46686
46770
  }, [metrics, data, computeMetricValue]);
46687
- const calculatedTrend = React104__default.useMemo(() => {
46771
+ const calculatedTrend = React105__default.useMemo(() => {
46688
46772
  if (manualTrend !== void 0) return manualTrend;
46689
46773
  if (previousValue === void 0 || currentValue === void 0)
46690
46774
  return void 0;
@@ -47324,8 +47408,8 @@ var init_SubagentTracePanel = __esm({
47324
47408
  ] });
47325
47409
  };
47326
47410
  InlineActivityStream = ({ activities, autoScroll = true, className }) => {
47327
- const endRef = React104__default.useRef(null);
47328
- React104__default.useEffect(() => {
47411
+ const endRef = React105__default.useRef(null);
47412
+ React105__default.useEffect(() => {
47329
47413
  if (!autoScroll) return;
47330
47414
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
47331
47415
  }, [activities.length, autoScroll]);
@@ -47419,7 +47503,7 @@ var init_SubagentTracePanel = __esm({
47419
47503
  };
47420
47504
  SubagentRichCard = ({ subagent }) => {
47421
47505
  const { t } = useTranslate();
47422
- const activities = React104__default.useMemo(
47506
+ const activities = React105__default.useMemo(
47423
47507
  () => subagentMessagesToActivities(subagent.messages),
47424
47508
  [subagent.messages]
47425
47509
  );
@@ -47496,8 +47580,8 @@ var init_SubagentTracePanel = __esm({
47496
47580
  ] });
47497
47581
  };
47498
47582
  CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
47499
- const endRef = React104__default.useRef(null);
47500
- React104__default.useEffect(() => {
47583
+ const endRef = React105__default.useRef(null);
47584
+ React105__default.useEffect(() => {
47501
47585
  if (!autoScroll) return;
47502
47586
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
47503
47587
  }, [messages.length, autoScroll]);
@@ -47927,7 +48011,7 @@ var init_Timeline = __esm({
47927
48011
  }) => {
47928
48012
  const { t } = useTranslate();
47929
48013
  const entityData = entity ?? [];
47930
- const items = React104__default.useMemo(() => {
48014
+ const items = React105__default.useMemo(() => {
47931
48015
  if (propItems) return propItems;
47932
48016
  if (entityData.length === 0) return [];
47933
48017
  return entityData.map((record, idx) => {
@@ -48029,7 +48113,7 @@ var init_Timeline = __esm({
48029
48113
  }
48030
48114
  });
48031
48115
  function extractToastProps(children) {
48032
- if (!React104__default.isValidElement(children)) {
48116
+ if (!React105__default.isValidElement(children)) {
48033
48117
  if (typeof children === "string") {
48034
48118
  return { message: children };
48035
48119
  }
@@ -48071,7 +48155,7 @@ var init_ToastSlot = __esm({
48071
48155
  eventBus.emit(`${prefix}CLOSE`);
48072
48156
  };
48073
48157
  if (!isVisible) return null;
48074
- const isCustomContent = React104__default.isValidElement(children) && !message;
48158
+ const isCustomContent = React105__default.isValidElement(children) && !message;
48075
48159
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
48076
48160
  Toast,
48077
48161
  {
@@ -48088,7 +48172,7 @@ var init_ToastSlot = __esm({
48088
48172
  }
48089
48173
  });
48090
48174
  function lazyThree(name, loader) {
48091
- const Lazy = React104__default.lazy(
48175
+ const Lazy = React105__default.lazy(
48092
48176
  () => loader().then((m) => {
48093
48177
  const Resolved = m[name];
48094
48178
  if (!Resolved) {
@@ -48100,13 +48184,13 @@ function lazyThree(name, loader) {
48100
48184
  })
48101
48185
  );
48102
48186
  function ThreeWrapper(props) {
48103
- return React104__default.createElement(
48187
+ return React105__default.createElement(
48104
48188
  ThreeBoundary,
48105
48189
  { name },
48106
- React104__default.createElement(
48107
- React104__default.Suspense,
48190
+ React105__default.createElement(
48191
+ React105__default.Suspense,
48108
48192
  { fallback: null },
48109
- React104__default.createElement(Lazy, props)
48193
+ React105__default.createElement(Lazy, props)
48110
48194
  )
48111
48195
  );
48112
48196
  }
@@ -48328,6 +48412,7 @@ var init_component_registry_generated = __esm({
48328
48412
  init_StatCard();
48329
48413
  init_StatDisplay();
48330
48414
  init_StateArchitectBoard();
48415
+ init_StateGraph();
48331
48416
  init_StateIndicator();
48332
48417
  init_StateMachineView();
48333
48418
  init_StatsGrid();
@@ -48382,7 +48467,7 @@ var init_component_registry_generated = __esm({
48382
48467
  init_WizardContainer();
48383
48468
  init_WizardNavigation();
48384
48469
  init_WizardProgress();
48385
- ThreeBoundary = class extends React104__default.Component {
48470
+ ThreeBoundary = class extends React105__default.Component {
48386
48471
  constructor() {
48387
48472
  super(...arguments);
48388
48473
  __publicField(this, "state", { failed: false });
@@ -48392,7 +48477,7 @@ var init_component_registry_generated = __esm({
48392
48477
  }
48393
48478
  render() {
48394
48479
  if (this.state.failed) {
48395
- return React104__default.createElement(
48480
+ return React105__default.createElement(
48396
48481
  "div",
48397
48482
  {
48398
48483
  "data-testid": "three-unavailable",
@@ -48639,6 +48724,7 @@ var init_component_registry_generated = __esm({
48639
48724
  "StatCard": StatCard,
48640
48725
  "StatDisplay": StatDisplay,
48641
48726
  "StateArchitectBoard": StateArchitectBoard,
48727
+ "StateGraph": StateGraph,
48642
48728
  "StateIndicator": StateIndicator,
48643
48729
  "StateMachineView": StateMachineView,
48644
48730
  "StatsGrid": StatsGrid,
@@ -48712,7 +48798,7 @@ function SuspenseConfigProvider({
48712
48798
  config,
48713
48799
  children
48714
48800
  }) {
48715
- return React104__default.createElement(
48801
+ return React105__default.createElement(
48716
48802
  SuspenseConfigContext.Provider,
48717
48803
  { value: config },
48718
48804
  children
@@ -48754,7 +48840,7 @@ function enrichFormFields(fields, entityDef) {
48754
48840
  }
48755
48841
  return { name: field, label: field.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (c) => c.toUpperCase()) };
48756
48842
  }
48757
- if (field && typeof field === "object" && !Array.isArray(field) && !React104__default.isValidElement(field) && !(field instanceof Date)) {
48843
+ if (field && typeof field === "object" && !Array.isArray(field) && !React105__default.isValidElement(field) && !(field instanceof Date)) {
48758
48844
  const obj = field;
48759
48845
  const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
48760
48846
  if (!fieldName) return field;
@@ -49207,7 +49293,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
49207
49293
  const key = `${parentId}-${index}-trait:${traitName}`;
49208
49294
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
49209
49295
  }
49210
- return /* @__PURE__ */ jsx(React104__default.Fragment, { children: child }, `${parentId}-${index}`);
49296
+ return /* @__PURE__ */ jsx(React105__default.Fragment, { children: child }, `${parentId}-${index}`);
49211
49297
  }
49212
49298
  if (!child || typeof child !== "object") return null;
49213
49299
  const childId = `${parentId}-${index}`;
@@ -49247,14 +49333,14 @@ function isPatternConfig(value) {
49247
49333
  if (value === null || value === void 0) return false;
49248
49334
  if (typeof value !== "object") return false;
49249
49335
  if (Array.isArray(value)) return false;
49250
- if (React104__default.isValidElement(value)) return false;
49336
+ if (React105__default.isValidElement(value)) return false;
49251
49337
  if (value instanceof Date) return false;
49252
49338
  if (typeof value === "function") return false;
49253
49339
  const record = value;
49254
49340
  return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
49255
49341
  }
49256
49342
  function isPlainConfigObject(value) {
49257
- if (React104__default.isValidElement(value)) return false;
49343
+ if (React105__default.isValidElement(value)) return false;
49258
49344
  if (value instanceof Date) return false;
49259
49345
  const proto = Object.getPrototypeOf(value);
49260
49346
  return proto === Object.prototype || proto === null;
@@ -49380,7 +49466,7 @@ function SlotContentRenderer({
49380
49466
  for (const slotKey of CONTENT_NODE_SLOTS) {
49381
49467
  const slotVal = restProps[slotKey];
49382
49468
  if (slotVal === void 0 || slotVal === null) continue;
49383
- if (React104__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
49469
+ if (React105__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
49384
49470
  if (Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
49385
49471
  nodeSlotOverrides[slotKey] = renderPatternChildren(
49386
49472
  slotVal,
@@ -49429,7 +49515,7 @@ function SlotContentRenderer({
49429
49515
  const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
49430
49516
  if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
49431
49517
  const sample = resolvedItems[0];
49432
- if (sample && typeof sample === "object" && !Array.isArray(sample) && !React104__default.isValidElement(sample) && !(sample instanceof Date)) {
49518
+ if (sample && typeof sample === "object" && !Array.isArray(sample) && !React105__default.isValidElement(sample) && !(sample instanceof Date)) {
49433
49519
  const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
49434
49520
  finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
49435
49521
  }
@@ -49792,7 +49878,7 @@ var AvlTransition = ({
49792
49878
  opacity = 1,
49793
49879
  className
49794
49880
  }) => {
49795
- const ids = React104__default.useMemo(() => {
49881
+ const ids = React105__default.useMemo(() => {
49796
49882
  avlTransitionId += 1;
49797
49883
  return { arrow: `avl-tr-${avlTransitionId}-arrow` };
49798
49884
  }, []);
@@ -50353,7 +50439,7 @@ var AvlStateMachine = ({
50353
50439
  color = "var(--color-primary)",
50354
50440
  animated = false
50355
50441
  }) => {
50356
- const ids = React104__default.useMemo(() => {
50442
+ const ids = React105__default.useMemo(() => {
50357
50443
  avlSmId += 1;
50358
50444
  const base = `avl-sm-${avlSmId}`;
50359
50445
  return { glow: `${base}-glow`, grad: `${base}-grad` };
@@ -50552,7 +50638,7 @@ var AvlOrbitalUnit = ({
50552
50638
  color = "var(--color-primary)",
50553
50639
  animated = false
50554
50640
  }) => {
50555
- const ids = React104__default.useMemo(() => {
50641
+ const ids = React105__default.useMemo(() => {
50556
50642
  avlOuId += 1;
50557
50643
  const base = `avl-ou-${avlOuId}`;
50558
50644
  return { glow: `${base}-glow`, grad: `${base}-grad` };
@@ -50648,7 +50734,7 @@ var AvlClosedCircuit = ({
50648
50734
  color = "var(--color-primary)",
50649
50735
  animated = false
50650
50736
  }) => {
50651
- const ids = React104__default.useMemo(() => {
50737
+ const ids = React105__default.useMemo(() => {
50652
50738
  avlCcId += 1;
50653
50739
  const base = `avl-cc-${avlCcId}`;
50654
50740
  return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
@@ -50803,7 +50889,7 @@ var AvlEmitListen = ({
50803
50889
  color = "var(--color-primary)",
50804
50890
  animated = false
50805
50891
  }) => {
50806
- const ids = React104__default.useMemo(() => {
50892
+ const ids = React105__default.useMemo(() => {
50807
50893
  avlElId += 1;
50808
50894
  const base = `avl-el-${avlElId}`;
50809
50895
  return { arrow: `${base}-arrow`, grad: `${base}-grad` };
@@ -51077,7 +51163,7 @@ function renderNode(node, color, glowId) {
51077
51163
  const baseR = node.type === "operator" ? 20 : 16;
51078
51164
  const r2 = Math.max(baseR, labelLen * 3.5 + 6);
51079
51165
  const nc = nodeColor(node.type, color);
51080
- return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
51166
+ return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
51081
51167
  node.children.map((child, i) => {
51082
51168
  const childR = Math.max(
51083
51169
  child.type === "operator" ? 20 : 16,
@@ -51134,7 +51220,7 @@ var AvlExprTree = ({
51134
51220
  className,
51135
51221
  color = "var(--color-primary)"
51136
51222
  }) => {
51137
- const ids = React104__default.useMemo(() => {
51223
+ const ids = React105__default.useMemo(() => {
51138
51224
  avlEtId += 1;
51139
51225
  return { glow: `avl-et-${avlEtId}-glow` };
51140
51226
  }, []);
@@ -51969,7 +52055,7 @@ var SystemNode = ({ data }) => {
51969
52055
  stateChain.length > 0 && /* @__PURE__ */ jsx("svg", { width: stateChain.length * 14 + 2, height: 10, viewBox: `0 0 ${stateChain.length * 14 + 2} 10`, children: stateChain.map((s, i) => {
51970
52056
  const tc = transitionCounts[s.name] ?? 0;
51971
52057
  const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
51972
- return /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
52058
+ return /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
51973
52059
  /* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial ?? void 0, isTerminal: s.isTerminal ?? void 0 }),
51974
52060
  i < stateChain.length - 1 && /* @__PURE__ */ jsx("line", { x1: i * 14 + 12, y1: 5, x2: i * 14 + 15, y2: 5, stroke: "var(--color-border)", strokeWidth: 0.5 })
51975
52061
  ] }, s.name);
@@ -53114,7 +53200,7 @@ function resolveLambdaBindings(body, params, item, index) {
53114
53200
  if (Array.isArray(body)) {
53115
53201
  return body.map((b) => recur(b));
53116
53202
  }
53117
- if (body !== null && typeof body === "object" && !React104__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
53203
+ if (body !== null && typeof body === "object" && !React105__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
53118
53204
  const out = {};
53119
53205
  for (const [k, v] of Object.entries(body)) {
53120
53206
  out[k] = recur(v);
@@ -53133,7 +53219,7 @@ function getSlotContentRenderer2() {
53133
53219
  function makeLambdaFn(params, lambdaBody, callerKey) {
53134
53220
  return (item, index) => {
53135
53221
  const resolvedBody = resolveLambdaBindings(lambdaBody, params, item, index);
53136
- if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React104__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
53222
+ if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React105__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
53137
53223
  return null;
53138
53224
  }
53139
53225
  const record = resolvedBody;
@@ -53152,7 +53238,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
53152
53238
  props: childProps,
53153
53239
  priority: 0
53154
53240
  };
53155
- return React104__default.createElement(SlotContentRenderer2, { content: childContent });
53241
+ return React105__default.createElement(SlotContentRenderer2, { content: childContent });
53156
53242
  };
53157
53243
  }
53158
53244
  function convertNode(node, callerKey) {
@@ -53171,7 +53257,7 @@ function convertNode(node, callerKey) {
53171
53257
  });
53172
53258
  return anyChanged ? mapped : node;
53173
53259
  }
53174
- if (typeof node === "object" && !React104__default.isValidElement(node) && !(node instanceof Date)) {
53260
+ if (typeof node === "object" && !React105__default.isValidElement(node) && !(node instanceof Date)) {
53175
53261
  return convertObjectProps(node);
53176
53262
  }
53177
53263
  return node;
@@ -54834,8 +54920,8 @@ function CanvasDndProvider({
54834
54920
  }) {
54835
54921
  const eventBus = useEventBus();
54836
54922
  const sensors = useAlmadarDndSensors(false);
54837
- const [activePayload, setActivePayload] = React104__default.useState(null);
54838
- const handleDragStart = React104__default.useCallback((e) => {
54923
+ const [activePayload, setActivePayload] = React105__default.useState(null);
54924
+ const handleDragStart = React105__default.useCallback((e) => {
54839
54925
  const data = e.active.data.current;
54840
54926
  const payload = data?.payload;
54841
54927
  if (payload) {
@@ -54846,7 +54932,7 @@ function CanvasDndProvider({
54846
54932
  log9.warn("dragStart:missing-payload", { id: e.active.id });
54847
54933
  }
54848
54934
  }, [eventBus]);
54849
- const handleDragEnd = React104__default.useCallback((e) => {
54935
+ const handleDragEnd = React105__default.useCallback((e) => {
54850
54936
  setActivePayload(null);
54851
54937
  const activeData = e.active.data.current;
54852
54938
  const payload = activeData?.payload;
@@ -54875,7 +54961,7 @@ function CanvasDndProvider({
54875
54961
  const suppressed = onDrop ? onDrop(drop) === true : false;
54876
54962
  if (!suppressed) defaultEmit(eventBus, drop);
54877
54963
  }, [eventBus, onDrop]);
54878
- const handleDragCancel = React104__default.useCallback(() => {
54964
+ const handleDragCancel = React105__default.useCallback(() => {
54879
54965
  setActivePayload(null);
54880
54966
  log9.info("dragCancel");
54881
54967
  }, []);
@@ -55633,7 +55719,7 @@ var OrbPreviewNodeInner = (props) => {
55633
55719
  }
55634
55720
  );
55635
55721
  };
55636
- var OrbPreviewNode = React104__default.memo(OrbPreviewNodeInner);
55722
+ var OrbPreviewNode = React105__default.memo(OrbPreviewNodeInner);
55637
55723
  OrbPreviewNode.displayName = "OrbPreviewNode";
55638
55724
  orbPreviewLog.debug("export-resolved", () => ({
55639
55725
  type: typeof OrbPreviewNode,
@@ -55738,7 +55824,7 @@ var EventFlowEdgeInner = (props) => {
55738
55824
  ) })
55739
55825
  ] });
55740
55826
  };
55741
- var EventFlowEdge = React104__default.memo(EventFlowEdgeInner);
55827
+ var EventFlowEdge = React105__default.memo(EventFlowEdgeInner);
55742
55828
  EventFlowEdge.displayName = "EventFlowEdge";
55743
55829
 
55744
55830
  // components/avl/molecules/BehaviorComposeNode.tsx
@@ -55885,7 +55971,7 @@ var BehaviorComposeNodeInner = (props) => {
55885
55971
  }
55886
55972
  );
55887
55973
  };
55888
- var BehaviorComposeNode = React104__default.memo(BehaviorComposeNodeInner);
55974
+ var BehaviorComposeNode = React105__default.memo(BehaviorComposeNodeInner);
55889
55975
  BehaviorComposeNode.displayName = "BehaviorComposeNode";
55890
55976
 
55891
55977
  // components/avl/lib/avl-behavior-compose-converter.ts
@@ -56911,7 +56997,7 @@ var TraitCardNodeInner = (props) => {
56911
56997
  }
56912
56998
  );
56913
56999
  };
56914
- var TraitCardNode = React104__default.memo(TraitCardNodeInner);
57000
+ var TraitCardNode = React105__default.memo(TraitCardNodeInner);
56915
57001
  TraitCardNode.displayName = "TraitCardNode";
56916
57002
 
56917
57003
  // components/avl/organisms/FlowCanvas.tsx
@@ -56984,7 +57070,7 @@ function FlowCanvasInner({
56984
57070
  initialOrbital
56985
57071
  );
56986
57072
  const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
56987
- const screenSizeUserOverrideRef = React104__default.useRef(false);
57073
+ const screenSizeUserOverrideRef = React105__default.useRef(false);
56988
57074
  const [screenSize, setScreenSize] = useState(
56989
57075
  () => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
56990
57076
  );
@@ -57368,7 +57454,7 @@ var ZoomBreadcrumb = ({
57368
57454
  if (eventName && band === "detail") {
57369
57455
  segments.push({ icon: "\u26A1", label: eventName });
57370
57456
  }
57371
- return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
57457
+ return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
57372
57458
  i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
57373
57459
  /* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
57374
57460
  /* @__PURE__ */ jsx("span", { children: seg.label })
@@ -57709,7 +57795,7 @@ var EventWireOverlay = ({
57709
57795
  containerW,
57710
57796
  containerH
57711
57797
  }) => {
57712
- const ids = React104__default.useMemo(() => {
57798
+ const ids = React105__default.useMemo(() => {
57713
57799
  avlOczWireId += 1;
57714
57800
  return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
57715
57801
  }, []);
@@ -58076,7 +58162,7 @@ var AvlOrbitalsCosmicZoom = ({
58076
58162
  borderRadius: 6,
58077
58163
  border: `1px solid ${color}`
58078
58164
  },
58079
- children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React104__default.Fragment, { children: [
58165
+ children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React105__default.Fragment, { children: [
58080
58166
  i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
58081
58167
  i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
58082
58168
  Box,