@almadar/ui 5.137.0 → 5.139.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.
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import * as React75 from 'react';
3
- import React75__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, useState, useLayoutEffect, Suspense, useSyncExternalStore, lazy, useId } from 'react';
2
+ import * as React76 from 'react';
3
+ import React76__default, { createContext, useContext, useMemo, useRef, useEffect, useCallback, useState, useLayoutEffect, Suspense, useSyncExternalStore, lazy, useId } from 'react';
4
4
  import { clsx } from 'clsx';
5
5
  import { twMerge } from 'tailwind-merge';
6
6
  import { EventBusContext, useTraitScopeChain, useCurrentPagePath, useGameAudioContextOptional, useEntitySchemaOptional, useEntityBindingSnapshot, useTraitScope, TraitScopeProvider } from '@almadar/ui/providers';
@@ -262,7 +262,7 @@ var init_SvgFlow = __esm({
262
262
  width = 100,
263
263
  height = 100
264
264
  }) => {
265
- const markerId = React75__default.useMemo(() => {
265
+ const markerId = React76__default.useMemo(() => {
266
266
  flowIdCounter += 1;
267
267
  return `almadar-flow-arrow-${flowIdCounter}`;
268
268
  }, []);
@@ -855,7 +855,7 @@ var init_SvgRing = __esm({
855
855
  width = 100,
856
856
  height = 100
857
857
  }) => {
858
- const gradientId = React75__default.useMemo(() => {
858
+ const gradientId = React76__default.useMemo(() => {
859
859
  ringIdCounter += 1;
860
860
  return `almadar-ring-glow-${ringIdCounter}`;
861
861
  }, []);
@@ -1397,7 +1397,7 @@ var init_Icon = __esm({
1397
1397
  const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
1398
1398
  const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
1399
1399
  const family = useIconFamily();
1400
- const RenderedComponent = React75__default.useMemo(() => {
1400
+ const RenderedComponent = React76__default.useMemo(() => {
1401
1401
  if (directIcon) return null;
1402
1402
  return effectiveName ? resolveIconForFamily(effectiveName) : null;
1403
1403
  }, [directIcon, effectiveName, family]);
@@ -1521,7 +1521,7 @@ var init_atlasSlice = __esm({
1521
1521
  }
1522
1522
  });
1523
1523
  function useAtlasSliceDataUrl(asset) {
1524
- const [, bump] = React75.useReducer((x) => x + 1, 0);
1524
+ const [, bump] = React76.useReducer((x) => x + 1, 0);
1525
1525
  if (!isAtlasAsset(asset)) return void 0;
1526
1526
  const key = `${asset.atlas}#${asset.sprite}`;
1527
1527
  const cached = sliceDataUrlCache.get(key);
@@ -1584,13 +1584,13 @@ function AtlasImage({
1584
1584
  style,
1585
1585
  "aria-hidden": ariaHidden
1586
1586
  }) {
1587
- const [, bump] = React75.useReducer((x) => x + 1, 0);
1588
- const canvasRef = React75.useRef(null);
1587
+ const [, bump] = React76.useReducer((x) => x + 1, 0);
1588
+ const canvasRef = React76.useRef(null);
1589
1589
  const sliced = isAtlasAsset(asset);
1590
1590
  const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
1591
1591
  const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
1592
1592
  const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
1593
- React75.useEffect(() => {
1593
+ React76.useEffect(() => {
1594
1594
  const canvas = canvasRef.current;
1595
1595
  if (!canvas || !img || !rect) return;
1596
1596
  canvas.width = rect.sw;
@@ -1666,7 +1666,7 @@ function resolveIconProp(value, sizeClass) {
1666
1666
  const IconComp = value;
1667
1667
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
1668
1668
  }
1669
- if (React75__default.isValidElement(value)) {
1669
+ if (React76__default.isValidElement(value)) {
1670
1670
  return value;
1671
1671
  }
1672
1672
  if (typeof value === "object" && value !== null && isIconLike(value)) {
@@ -1743,7 +1743,7 @@ var init_Button = __esm({
1743
1743
  md: "h-icon-default w-icon-default",
1744
1744
  lg: "h-icon-default w-icon-default"
1745
1745
  };
1746
- Button = React75__default.forwardRef(
1746
+ Button = React76__default.forwardRef(
1747
1747
  ({
1748
1748
  className,
1749
1749
  variant = "primary",
@@ -1815,7 +1815,7 @@ var init_Input = __esm({
1815
1815
  init_cn();
1816
1816
  init_Icon();
1817
1817
  init_useEventBus();
1818
- Input = React75__default.forwardRef(
1818
+ Input = React76__default.forwardRef(
1819
1819
  ({
1820
1820
  className,
1821
1821
  inputType,
@@ -1839,9 +1839,9 @@ var init_Input = __esm({
1839
1839
  const eventBus = useEventBus();
1840
1840
  const type = inputType || htmlType || "text";
1841
1841
  const isDeclarative = typeof onChange === "string";
1842
- const [localValue, setLocalValue] = React75__default.useState(value);
1843
- const pendingEchoRef = React75__default.useRef(/* @__PURE__ */ new Set());
1844
- React75__default.useEffect(() => {
1842
+ const [localValue, setLocalValue] = React76__default.useState(value);
1843
+ const pendingEchoRef = React76__default.useRef(/* @__PURE__ */ new Set());
1844
+ React76__default.useEffect(() => {
1845
1845
  if (!isDeclarative) return;
1846
1846
  const incoming = value == null ? "" : String(value);
1847
1847
  if (pendingEchoRef.current.has(incoming)) {
@@ -2001,7 +2001,7 @@ var Label;
2001
2001
  var init_Label = __esm({
2002
2002
  "components/core/atoms/Label.tsx"() {
2003
2003
  init_cn();
2004
- Label = React75__default.forwardRef(
2004
+ Label = React76__default.forwardRef(
2005
2005
  ({ className, required, children, ...props }, ref) => {
2006
2006
  return /* @__PURE__ */ jsxs(
2007
2007
  "label",
@@ -2028,7 +2028,7 @@ var init_Textarea = __esm({
2028
2028
  "components/core/atoms/Textarea.tsx"() {
2029
2029
  init_cn();
2030
2030
  init_useEventBus();
2031
- Textarea = React75__default.forwardRef(
2031
+ Textarea = React76__default.forwardRef(
2032
2032
  ({ className, error, onChange, ...props }, ref) => {
2033
2033
  const eventBus = useEventBus();
2034
2034
  const handleChange = (e) => {
@@ -2267,7 +2267,7 @@ var init_Select = __esm({
2267
2267
  init_cn();
2268
2268
  init_Icon();
2269
2269
  init_useEventBus();
2270
- Select = React75__default.forwardRef(
2270
+ Select = React76__default.forwardRef(
2271
2271
  (props, _ref) => {
2272
2272
  const { multiple, searchable, clearable } = props;
2273
2273
  if (multiple || searchable || clearable) {
@@ -2284,7 +2284,7 @@ var init_Checkbox = __esm({
2284
2284
  "components/core/atoms/Checkbox.tsx"() {
2285
2285
  init_cn();
2286
2286
  init_useEventBus();
2287
- Checkbox = React75__default.forwardRef(
2287
+ Checkbox = React76__default.forwardRef(
2288
2288
  ({ className, label, id, onChange, ...props }, ref) => {
2289
2289
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
2290
2290
  const eventBus = useEventBus();
@@ -2338,7 +2338,7 @@ var init_Spinner = __esm({
2338
2338
  md: "h-6 w-6",
2339
2339
  lg: "h-8 w-8"
2340
2340
  };
2341
- Spinner = React75__default.forwardRef(
2341
+ Spinner = React76__default.forwardRef(
2342
2342
  ({ className, size = "md", overlay, ...props }, ref) => {
2343
2343
  if (overlay) {
2344
2344
  return /* @__PURE__ */ jsx(
@@ -2428,7 +2428,7 @@ var init_Card = __esm({
2428
2428
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
2429
2429
  "tile-image-first": "p-0 overflow-hidden"
2430
2430
  };
2431
- Card = React75__default.forwardRef(
2431
+ Card = React76__default.forwardRef(
2432
2432
  ({
2433
2433
  className,
2434
2434
  variant = "bordered",
@@ -2477,9 +2477,9 @@ var init_Card = __esm({
2477
2477
  }
2478
2478
  );
2479
2479
  Card.displayName = "Card";
2480
- CardHeader = React75__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
2480
+ CardHeader = React76__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
2481
2481
  CardHeader.displayName = "CardHeader";
2482
- CardTitle = React75__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2482
+ CardTitle = React76__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2483
2483
  "h3",
2484
2484
  {
2485
2485
  ref,
@@ -2492,11 +2492,11 @@ var init_Card = __esm({
2492
2492
  }
2493
2493
  ));
2494
2494
  CardTitle.displayName = "CardTitle";
2495
- CardContent = React75__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
2495
+ CardContent = React76__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
2496
2496
  CardContent.displayName = "CardContent";
2497
2497
  CardBody = CardContent;
2498
2498
  CardBody.displayName = "CardBody";
2499
- CardFooter = React75__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2499
+ CardFooter = React76__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
2500
2500
  "div",
2501
2501
  {
2502
2502
  ref,
@@ -2550,7 +2550,7 @@ var init_Badge = __esm({
2550
2550
  md: "px-2.5 py-1 text-sm",
2551
2551
  lg: "px-3 py-1.5 text-base"
2552
2552
  };
2553
- Badge = React75__default.forwardRef(
2553
+ Badge = React76__default.forwardRef(
2554
2554
  ({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
2555
2555
  const iconSizes3 = {
2556
2556
  sm: "h-icon-default w-icon-default",
@@ -2678,7 +2678,7 @@ var init_FilterPill = __esm({
2678
2678
  md: "w-3.5 h-3.5",
2679
2679
  lg: "w-4 h-4"
2680
2680
  };
2681
- FilterPill = React75__default.forwardRef(
2681
+ FilterPill = React76__default.forwardRef(
2682
2682
  ({
2683
2683
  className,
2684
2684
  variant = "default",
@@ -2807,8 +2807,8 @@ var init_Avatar = __esm({
2807
2807
  actionPayload
2808
2808
  }) => {
2809
2809
  const eventBus = useEventBus();
2810
- const [imgFailed, setImgFailed] = React75__default.useState(false);
2811
- React75__default.useEffect(() => {
2810
+ const [imgFailed, setImgFailed] = React76__default.useState(false);
2811
+ React76__default.useEffect(() => {
2812
2812
  setImgFailed(false);
2813
2813
  }, [src]);
2814
2814
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -3060,7 +3060,7 @@ var init_Box = __esm({
3060
3060
  fixed: "fixed",
3061
3061
  sticky: "sticky"
3062
3062
  };
3063
- Box = React75__default.forwardRef(
3063
+ Box = React76__default.forwardRef(
3064
3064
  ({
3065
3065
  padding,
3066
3066
  paddingX,
@@ -3125,7 +3125,7 @@ var init_Box = __esm({
3125
3125
  onPointerDown?.(e);
3126
3126
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
3127
3127
  const isClickable = action || onClick;
3128
- return React75__default.createElement(
3128
+ return React76__default.createElement(
3129
3129
  Component,
3130
3130
  {
3131
3131
  ref,
@@ -3179,7 +3179,7 @@ var init_Center = __esm({
3179
3179
  as: Component = "div"
3180
3180
  }) => {
3181
3181
  const mergedStyle = minHeight ? { minHeight, ...style } : style;
3182
- return React75__default.createElement(Component, {
3182
+ return React76__default.createElement(Component, {
3183
3183
  className: cn(
3184
3184
  inline ? "inline-flex" : "flex",
3185
3185
  horizontal && "justify-center",
@@ -3447,7 +3447,7 @@ var init_Radio = __esm({
3447
3447
  md: "w-2.5 h-2.5",
3448
3448
  lg: "w-3 h-3"
3449
3449
  };
3450
- Radio = React75__default.forwardRef(
3450
+ Radio = React76__default.forwardRef(
3451
3451
  ({
3452
3452
  label,
3453
3453
  helperText,
@@ -3464,12 +3464,12 @@ var init_Radio = __esm({
3464
3464
  onChange,
3465
3465
  ...props
3466
3466
  }, ref) => {
3467
- const reactId = React75__default.useId();
3467
+ const reactId = React76__default.useId();
3468
3468
  const baseId = id || `radio-${reactId}`;
3469
3469
  const hasError = !!error;
3470
3470
  const eventBus = useEventBus();
3471
- const [selected, setSelected] = React75__default.useState(value);
3472
- React75__default.useEffect(() => {
3471
+ const [selected, setSelected] = React76__default.useState(value);
3472
+ React76__default.useEffect(() => {
3473
3473
  if (value !== void 0) setSelected(value);
3474
3474
  }, [value]);
3475
3475
  const pick = (next, e) => {
@@ -3651,7 +3651,7 @@ var init_Switch = __esm({
3651
3651
  "components/core/atoms/Switch.tsx"() {
3652
3652
  "use client";
3653
3653
  init_cn();
3654
- Switch = React75.forwardRef(
3654
+ Switch = React76.forwardRef(
3655
3655
  ({
3656
3656
  checked,
3657
3657
  defaultChecked = false,
@@ -3662,10 +3662,10 @@ var init_Switch = __esm({
3662
3662
  name,
3663
3663
  className
3664
3664
  }, ref) => {
3665
- const [isChecked, setIsChecked] = React75.useState(
3665
+ const [isChecked, setIsChecked] = React76.useState(
3666
3666
  checked !== void 0 ? checked : defaultChecked
3667
3667
  );
3668
- React75.useEffect(() => {
3668
+ React76.useEffect(() => {
3669
3669
  if (checked !== void 0) {
3670
3670
  setIsChecked(checked);
3671
3671
  }
@@ -3828,7 +3828,7 @@ var init_Stack = __esm({
3828
3828
  };
3829
3829
  const isHorizontal = direction === "horizontal";
3830
3830
  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";
3831
- return React75__default.createElement(
3831
+ return React76__default.createElement(
3832
3832
  Component,
3833
3833
  {
3834
3834
  className: cn(
@@ -4117,7 +4117,7 @@ var init_Typography = __esm({
4117
4117
  if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
4118
4118
  body = formatValue(body, format);
4119
4119
  }
4120
- return React75__default.createElement(
4120
+ return React76__default.createElement(
4121
4121
  Component,
4122
4122
  {
4123
4123
  id,
@@ -4351,7 +4351,7 @@ var Dialog;
4351
4351
  var init_Dialog = __esm({
4352
4352
  "components/core/atoms/Dialog.tsx"() {
4353
4353
  init_cn();
4354
- Dialog = React75__default.forwardRef(
4354
+ Dialog = React76__default.forwardRef(
4355
4355
  ({
4356
4356
  role = "dialog",
4357
4357
  "aria-modal": ariaModal = true,
@@ -4377,7 +4377,7 @@ var Aside;
4377
4377
  var init_Aside = __esm({
4378
4378
  "components/core/atoms/Aside.tsx"() {
4379
4379
  init_cn();
4380
- Aside = React75__default.forwardRef(
4380
+ Aside = React76__default.forwardRef(
4381
4381
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
4382
4382
  );
4383
4383
  Aside.displayName = "Aside";
@@ -4456,9 +4456,9 @@ var init_LawReferenceTooltip = __esm({
4456
4456
  className
4457
4457
  }) => {
4458
4458
  const { t } = useTranslate();
4459
- const [isVisible, setIsVisible] = React75__default.useState(false);
4460
- const timeoutRef = React75__default.useRef(null);
4461
- const triggerRef = React75__default.useRef(null);
4459
+ const [isVisible, setIsVisible] = React76__default.useState(false);
4460
+ const timeoutRef = React76__default.useRef(null);
4461
+ const triggerRef = React76__default.useRef(null);
4462
4462
  const handleMouseEnter = () => {
4463
4463
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4464
4464
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -4469,7 +4469,7 @@ var init_LawReferenceTooltip = __esm({
4469
4469
  };
4470
4470
  const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
4471
4471
  const open = isVisible || revealed;
4472
- React75__default.useEffect(() => {
4472
+ React76__default.useEffect(() => {
4473
4473
  return () => {
4474
4474
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
4475
4475
  };
@@ -4679,7 +4679,7 @@ var init_StatusDot = __esm({
4679
4679
  md: "w-2.5 h-2.5",
4680
4680
  lg: "w-3 h-3"
4681
4681
  };
4682
- StatusDot = React75__default.forwardRef(
4682
+ StatusDot = React76__default.forwardRef(
4683
4683
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
4684
4684
  return /* @__PURE__ */ jsx(
4685
4685
  "span",
@@ -4733,7 +4733,7 @@ var init_TrendIndicator = __esm({
4733
4733
  down: "trending-down",
4734
4734
  flat: "arrow-right"
4735
4735
  };
4736
- TrendIndicator = React75__default.forwardRef(
4736
+ TrendIndicator = React76__default.forwardRef(
4737
4737
  ({
4738
4738
  className,
4739
4739
  value,
@@ -4802,7 +4802,7 @@ var init_RangeSlider = __esm({
4802
4802
  md: "w-4 h-4",
4803
4803
  lg: "w-5 h-5"
4804
4804
  };
4805
- RangeSlider = React75__default.forwardRef(
4805
+ RangeSlider = React76__default.forwardRef(
4806
4806
  ({
4807
4807
  className,
4808
4808
  min = 0,
@@ -5413,7 +5413,7 @@ var init_ContentSection = __esm({
5413
5413
  md: "py-16",
5414
5414
  lg: "py-24"
5415
5415
  };
5416
- ContentSection = React75__default.forwardRef(
5416
+ ContentSection = React76__default.forwardRef(
5417
5417
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
5418
5418
  return /* @__PURE__ */ jsx(
5419
5419
  Box,
@@ -5947,7 +5947,7 @@ var init_AnimatedReveal = __esm({
5947
5947
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
5948
5948
  "none": {}
5949
5949
  };
5950
- AnimatedReveal = React75__default.forwardRef(
5950
+ AnimatedReveal = React76__default.forwardRef(
5951
5951
  ({
5952
5952
  trigger = "scroll",
5953
5953
  animation = "fade-up",
@@ -6107,7 +6107,7 @@ var init_AnimatedGraphic = __esm({
6107
6107
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
6108
6108
  "use client";
6109
6109
  init_cn();
6110
- AnimatedGraphic = React75__default.forwardRef(
6110
+ AnimatedGraphic = React76__default.forwardRef(
6111
6111
  ({
6112
6112
  src,
6113
6113
  svgContent,
@@ -6130,7 +6130,7 @@ var init_AnimatedGraphic = __esm({
6130
6130
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
6131
6131
  const resolvedSvg = svgContent ?? fetchedSvg;
6132
6132
  const prevAnimateRef = useRef(animate);
6133
- const setRef = React75__default.useCallback(
6133
+ const setRef = React76__default.useCallback(
6134
6134
  (node) => {
6135
6135
  containerRef.current = node;
6136
6136
  if (typeof ref === "function") ref(node);
@@ -6231,7 +6231,7 @@ function resolveMarkerExpression(expression, entity, config, state) {
6231
6231
  function isPlainObject(value) {
6232
6232
  if (value === null || value === void 0 || typeof value !== "object") return false;
6233
6233
  if (Array.isArray(value)) return false;
6234
- if (React75__default.isValidElement(value)) return false;
6234
+ if (React76__default.isValidElement(value)) return false;
6235
6235
  if (value instanceof Date) return false;
6236
6236
  if (typeof value === "function") return false;
6237
6237
  return true;
@@ -6875,7 +6875,7 @@ var init_ErrorBoundary = __esm({
6875
6875
  }
6876
6876
  );
6877
6877
  };
6878
- ErrorBoundary = class extends React75__default.Component {
6878
+ ErrorBoundary = class extends React76__default.Component {
6879
6879
  constructor(props) {
6880
6880
  super(props);
6881
6881
  __publicField(this, "reset", () => {
@@ -7158,7 +7158,7 @@ var init_Container = __esm({
7158
7158
  as: Component = "div"
7159
7159
  }) => {
7160
7160
  const resolvedSize = maxWidth ?? size ?? "lg";
7161
- return React75__default.createElement(
7161
+ return React76__default.createElement(
7162
7162
  Component,
7163
7163
  {
7164
7164
  className: cn(
@@ -10522,7 +10522,7 @@ var init_CodeBlock = __esm({
10522
10522
  DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
10523
10523
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
10524
10524
  HIDDEN_LINE_NUMBERS = { display: "none" };
10525
- CodeBlock = React75__default.memo(
10525
+ CodeBlock = React76__default.memo(
10526
10526
  ({
10527
10527
  code: rawCode,
10528
10528
  language = "text",
@@ -11110,7 +11110,7 @@ var init_MarkdownContent = __esm({
11110
11110
  init_Box();
11111
11111
  init_CodeBlock();
11112
11112
  init_cn();
11113
- MarkdownContent = React75__default.memo(
11113
+ MarkdownContent = React76__default.memo(
11114
11114
  ({ content, direction = "ltr", className }) => {
11115
11115
  const { t: _t } = useTranslate();
11116
11116
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -12437,7 +12437,7 @@ var init_StateMachineView = __esm({
12437
12437
  style: { top: title ? 30 : 0 },
12438
12438
  children: [
12439
12439
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
12440
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React75__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
12440
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React76__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
12441
12441
  StateNode,
12442
12442
  {
12443
12443
  state,
@@ -15014,8 +15014,8 @@ function MiniMap({
15014
15014
  tileAssets,
15015
15015
  unitAssets
15016
15016
  }) {
15017
- const canvasRef = React75.useRef(null);
15018
- const imgCacheRef = React75.useRef(/* @__PURE__ */ new Map());
15017
+ const canvasRef = React76.useRef(null);
15018
+ const imgCacheRef = React76.useRef(/* @__PURE__ */ new Map());
15019
15019
  function loadImg(url) {
15020
15020
  const cached = imgCacheRef.current.get(url);
15021
15021
  if (cached) return cached.complete ? cached : null;
@@ -15031,7 +15031,7 @@ function MiniMap({
15031
15031
  imgCacheRef.current.set(url, img);
15032
15032
  return null;
15033
15033
  }
15034
- React75.useEffect(() => {
15034
+ React76.useEffect(() => {
15035
15035
  const canvas = canvasRef.current;
15036
15036
  if (!canvas) return;
15037
15037
  const ctx = canvas.getContext("2d");
@@ -15571,19 +15571,12 @@ var init_useCanvasGestures = __esm({
15571
15571
  });
15572
15572
 
15573
15573
  // lib/imageCache.ts
15574
- function getOrLoadImage(url, onReady) {
15575
- if (!url || typeof window === "undefined") return null;
15576
- const existing = cache.get(url);
15577
- if (existing) {
15578
- if (existing.status === "loaded") return existing.img;
15579
- if (existing.status === "pending" && onReady) existing.onReady = onReady;
15580
- return null;
15581
- }
15574
+ function startLoad(url, onReady, existing) {
15582
15575
  const img = new Image();
15583
15576
  img.crossOrigin = "anonymous";
15584
- const entry = { img, status: "pending", onReady };
15585
- cache.set(url, entry);
15586
- updateAssetStatus(url, "pending");
15577
+ const entry = existing ?? { img, status: "pending" };
15578
+ entry.img = img;
15579
+ if (onReady) entry.onReady = onReady;
15587
15580
  img.onload = () => {
15588
15581
  entry.status = "loaded";
15589
15582
  updateAssetStatus(url, "loaded");
@@ -15591,20 +15584,39 @@ function getOrLoadImage(url, onReady) {
15591
15584
  };
15592
15585
  img.onerror = () => {
15593
15586
  entry.status = "failed";
15587
+ entry.failedAt = Date.now();
15594
15588
  updateAssetStatus(url, "failed");
15595
15589
  entry.onReady?.();
15596
15590
  };
15597
15591
  img.src = url;
15592
+ return entry;
15593
+ }
15594
+ function getOrLoadImage(url, onReady) {
15595
+ if (!url || typeof window === "undefined") return null;
15596
+ const existing = cache.get(url);
15597
+ if (existing) {
15598
+ if (existing.status === "loaded") return existing.img;
15599
+ if (existing.status === "pending" && onReady) existing.onReady = onReady;
15600
+ if (existing.status === "failed" && Date.now() - (existing.failedAt ?? 0) >= RETRY_AFTER_MS) {
15601
+ existing.failedAt = Date.now();
15602
+ startLoad(url, onReady, existing);
15603
+ }
15604
+ return null;
15605
+ }
15606
+ const entry = startLoad(url, onReady);
15607
+ cache.set(url, entry);
15608
+ updateAssetStatus(url, "pending");
15598
15609
  return null;
15599
15610
  }
15600
15611
  function getImageStatus(url) {
15601
15612
  return cache.get(url)?.status;
15602
15613
  }
15603
- var cache;
15614
+ var RETRY_AFTER_MS, cache;
15604
15615
  var init_imageCache = __esm({
15605
15616
  "lib/imageCache.ts"() {
15606
15617
  "use client";
15607
15618
  init_verificationRegistry();
15619
+ RETRY_AFTER_MS = 5e3;
15608
15620
  cache = /* @__PURE__ */ new Map();
15609
15621
  }
15610
15622
  });
@@ -15849,6 +15861,21 @@ var init_projector = __esm({
15849
15861
  function isValidScenePos(pos) {
15850
15862
  return Number.isFinite(pos?.x) && Number.isFinite(pos?.y);
15851
15863
  }
15864
+ function spriteRect(projector, node, natural) {
15865
+ const tw = projector.tileWidth;
15866
+ const fallbackW = projector.worldPixelDirect ? natural?.w ?? 0 : tw;
15867
+ const fallbackH = projector.worldPixelDirect ? natural?.h ?? 0 : tw;
15868
+ const w = node.width !== void 0 ? node.width * tw : fallbackW;
15869
+ const h = node.height !== void 0 ? node.height * tw : fallbackH;
15870
+ const anchor = node.anchor ?? "top-left";
15871
+ const p = projector.anchorPoint(node.position, anchor);
15872
+ return {
15873
+ x: anchor === "top-left" ? p.x : p.x - w / 2,
15874
+ y: anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y,
15875
+ w,
15876
+ h
15877
+ };
15878
+ }
15852
15879
  var init_contract = __esm({
15853
15880
  "lib/drawable/contract.ts"() {
15854
15881
  }
@@ -15863,16 +15890,11 @@ function paintFallbackSquare(painter, node, dctx, reason) {
15863
15890
  warnMissingOnce(reason, node);
15864
15891
  const tw = dctx.projector.tileWidth;
15865
15892
  const natural = dctx.projector.worldPixelDirect ? FALLBACK_WORLD_PX : tw;
15866
- const w = node.width !== void 0 ? node.width * tw : natural;
15867
- const h = node.height !== void 0 ? node.height * tw : natural;
15868
- const anchor = node.anchor ?? "top-left";
15869
- const p = dctx.projector.anchorPoint(node.position, anchor);
15870
- const dx = anchor === "top-left" ? p.x : p.x - w / 2;
15871
- const dy = anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y;
15893
+ const rect = spriteRect(dctx.projector, node, { w: natural, h: natural });
15872
15894
  painter.save();
15873
15895
  if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
15874
- painter.fillRect(dx, dy, w, h, "#9b8f7f");
15875
- painter.strokeRect(dx, dy, w, h, "#5e564b", Math.max(1, tw / 32));
15896
+ painter.fillRect(rect.x, rect.y, rect.w, rect.h, "#9b8f7f");
15897
+ painter.strokeRect(rect.x, rect.y, rect.w, rect.h, "#5e564b", Math.max(1, tw / 32));
15876
15898
  painter.restore();
15877
15899
  }
15878
15900
  function DrawSprite(_props) {
@@ -15909,15 +15931,10 @@ var init_DrawSprite = __esm({
15909
15931
  }
15910
15932
  src = { x: r.sx, y: r.sy, w: r.sw, h: r.sh };
15911
15933
  }
15912
- const tw = dctx.projector.tileWidth;
15913
- const fallbackW = dctx.projector.worldPixelDirect ? src ? src.w : tex.width : tw;
15914
- const fallbackH = dctx.projector.worldPixelDirect ? src ? src.h : tex.height : tw;
15915
- const w = node.width !== void 0 ? node.width * tw : fallbackW;
15916
- const h = node.height !== void 0 ? node.height * tw : fallbackH;
15917
- const anchor = node.anchor ?? "top-left";
15918
- const p = dctx.projector.anchorPoint(node.position, anchor);
15919
- const dx = anchor === "top-left" ? p.x : p.x - w / 2;
15920
- const dy = anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y;
15934
+ const rect = spriteRect(dctx.projector, node, src ? { w: src.w, h: src.h } : { w: tex.width, h: tex.height });
15935
+ const { w, h } = rect;
15936
+ const dx = rect.x;
15937
+ const dy = rect.y;
15921
15938
  painter.save();
15922
15939
  if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
15923
15940
  if (node.shadow) painter.setShadow(node.shadow);
@@ -15939,9 +15956,24 @@ var init_DrawSprite = __esm({
15939
15956
  };
15940
15957
  }
15941
15958
  });
15942
-
15943
- // components/game/atoms/DrawShape.tsx
15944
- function DrawShape(_props) {
15959
+ var DrawableRegistryContext;
15960
+ var init_registry = __esm({
15961
+ "lib/drawable/registry.ts"() {
15962
+ DrawableRegistryContext = createContext(null);
15963
+ }
15964
+ });
15965
+ function DrawShape(props) {
15966
+ const register = useContext(DrawableRegistryContext);
15967
+ if (register) {
15968
+ const { opacity, ...rest } = props;
15969
+ const node = {
15970
+ ...rest,
15971
+ type: "draw-shape",
15972
+ ...opacity !== void 0 && opacity > 0 ? { opacity } : {}
15973
+ };
15974
+ register(node);
15975
+ return /* @__PURE__ */ jsx("div", { "data-draw-shape-debug": "", style: { position: "absolute", width: 4, height: 4, background: "red", zIndex: 9999 } });
15976
+ }
15945
15977
  return null;
15946
15978
  }
15947
15979
  var paintShape;
@@ -15949,6 +15981,7 @@ var init_DrawShape = __esm({
15949
15981
  "components/game/atoms/DrawShape.tsx"() {
15950
15982
  "use client";
15951
15983
  init_contract();
15984
+ init_registry();
15952
15985
  paintShape = (painter, node, dctx) => {
15953
15986
  if (!isValidScenePos(node.position)) return;
15954
15987
  painter.save();
@@ -16133,12 +16166,18 @@ function collectDrawnItems(nodes) {
16133
16166
  for (const n of nodes) {
16134
16167
  switch (n.type) {
16135
16168
  case "draw-sprite":
16169
+ if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id, anchor: n.anchor, width: n.width, height: n.height });
16170
+ break;
16136
16171
  case "draw-shape":
16137
16172
  case "draw-text":
16138
16173
  case "draw-group":
16139
16174
  if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id });
16140
16175
  break;
16141
16176
  case "draw-sprite-layer":
16177
+ for (const it of n.items) {
16178
+ if (isValidScenePos(it.position)) out.push({ pos: it.position, id: it.id, anchor: it.anchor, width: it.width, height: it.height });
16179
+ }
16180
+ break;
16142
16181
  case "draw-shape-layer":
16143
16182
  case "draw-text-layer":
16144
16183
  for (const it of n.items) {
@@ -16156,6 +16195,15 @@ function buildHitIndex(items) {
16156
16195
  }
16157
16196
  return m;
16158
16197
  }
16198
+ function hitTestSprites(items, projector, point) {
16199
+ for (let i = items.length - 1; i >= 0; i--) {
16200
+ const it = items[i];
16201
+ if (it.id === void 0) continue;
16202
+ const r = spriteRect(projector, { position: it.pos, anchor: it.anchor, width: it.width, height: it.height });
16203
+ if (point.x >= r.x && point.x <= r.x + r.w && point.y >= r.y && point.y <= r.y + r.h) return it.id;
16204
+ }
16205
+ return void 0;
16206
+ }
16159
16207
  var init_hitTest = __esm({
16160
16208
  "lib/drawable/hitTest.ts"() {
16161
16209
  init_contract();
@@ -16184,9 +16232,17 @@ function Canvas2D({
16184
16232
  showMinimap = true,
16185
16233
  followTarget,
16186
16234
  cameraPos,
16187
- bgColor
16235
+ bgColor,
16236
+ children
16188
16237
  }) {
16189
16238
  const instanceId = useMemo(() => Math.random().toString(36).slice(2, 8), []);
16239
+ const childDrawablesRef = useRef([]);
16240
+ childDrawablesRef.current = [];
16241
+ const registerChildDrawable = useCallback((node) => {
16242
+ childDrawablesRef.current.push(node);
16243
+ }, []);
16244
+ const hasJsxChildren = React76.Children.count(children) > 0;
16245
+ drawables && drawables.length > 0 ? drawables : childDrawablesRef.current;
16190
16246
  function isDrawableLayer(node) {
16191
16247
  return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
16192
16248
  }
@@ -16369,7 +16425,19 @@ function Canvas2D({
16369
16425
  ctx.fillStyle = bgColor ?? BACKGROUND_FALLBACK_COLOR;
16370
16426
  ctx.fillRect(0, 0, viewportSize.width, viewportSize.height);
16371
16427
  }
16372
- if (!drawables || drawables.length === 0) return;
16428
+ if (!drawables || drawables.length === 0) {
16429
+ const childDrawables = childDrawablesRef.current;
16430
+ if (childDrawables.length === 0) return;
16431
+ const painter0 = createWebPainter(ctx, bumpAtlas);
16432
+ painter0.save();
16433
+ painter0.translate(viewportSize.width / 2, viewportSize.height / 2);
16434
+ painter0.scale(cameraRef.current.zoom, cameraRef.current.zoom);
16435
+ painter0.translate(-viewportSize.width / 2, -viewportSize.height / 2);
16436
+ const dctx0 = { projector, time: 0, invalidate: bumpAtlas };
16437
+ for (const node of childDrawables) paintDrawable(painter0, node, dctx0);
16438
+ painter0.restore();
16439
+ return;
16440
+ }
16373
16441
  const cam = cameraRef.current;
16374
16442
  if (camera !== "follow" && dragDistance() === 0) {
16375
16443
  const focus = cameraPos ?? defaultGridFocus;
@@ -16453,6 +16521,11 @@ function Canvas2D({
16453
16521
  if (dragDistance() > 5) return;
16454
16522
  if (!canvasRef.current || !tileClickEvent && !unitClickEvent) return;
16455
16523
  const world = screenToWorld(e.clientX, e.clientY, canvasRef.current, viewportSize);
16524
+ const spriteHit = unitClickEvent ? hitTestSprites(drawnItems, projector, world) : void 0;
16525
+ if (spriteHit !== void 0 && unitClickEvent) {
16526
+ eventBus.emit(`UI:${unitClickEvent}`, { unitId: spriteHit });
16527
+ return;
16528
+ }
16456
16529
  const adjustedX = world.x - scaledTileWidth / 2;
16457
16530
  const adjustedY = squareGrid ? world.y - scaledTileWidth / 2 : world.y - scaledDiamondTopY - scaledFloorHeight / 2;
16458
16531
  const isoPos = unproject(adjustedX, adjustedY);
@@ -16462,7 +16535,7 @@ function Canvas2D({
16462
16535
  } else if (tileClickEvent) {
16463
16536
  eventBus.emit(`UI:${tileClickEvent}`, { x: isoPos.x, y: isoPos.y });
16464
16537
  }
16465
- }, [enableCamera, handlePointerUp, dragDistance, screenToWorld, viewportSize, scaledTileWidth, squareGrid, scaledDiamondTopY, scaledFloorHeight, unproject, hitIndex, tileClickEvent, unitClickEvent, eventBus]);
16538
+ }, [enableCamera, handlePointerUp, dragDistance, screenToWorld, viewportSize, scaledTileWidth, squareGrid, scaledDiamondTopY, scaledFloorHeight, unproject, hitIndex, drawnItems, projector, tileClickEvent, unitClickEvent, eventBus]);
16466
16539
  const handleCanvasPointerLeave = useCallback(() => {
16467
16540
  handleMouseLeave();
16468
16541
  if (tileLeaveEvent) eventBus.emit(`UI:${tileLeaveEvent}`, {});
@@ -16532,7 +16605,7 @@ function Canvas2D({
16532
16605
  /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-muted-foreground", children: t("canvas.loadingMessage") || "Loading\u2026" })
16533
16606
  ] }) });
16534
16607
  }
16535
- if (!drawables || drawables.length === 0) {
16608
+ if ((!drawables || drawables.length === 0) && !hasJsxChildren) {
16536
16609
  return /* @__PURE__ */ jsx(
16537
16610
  Box,
16538
16611
  {
@@ -16546,7 +16619,7 @@ function Canvas2D({
16546
16619
  }
16547
16620
  );
16548
16621
  }
16549
- return /* @__PURE__ */ jsxs(
16622
+ return /* @__PURE__ */ jsx(DrawableRegistryContext.Provider, { value: registerChildDrawable, children: /* @__PURE__ */ jsxs(
16550
16623
  Box,
16551
16624
  {
16552
16625
  ref: containerRef,
@@ -16607,10 +16680,19 @@ function Canvas2D({
16607
16680
  mapWidth: miniMapWidth,
16608
16681
  mapHeight: miniMapHeight
16609
16682
  }
16610
- ) })
16683
+ ) }),
16684
+ hasJsxChildren && /* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: { position: "absolute", width: 0, height: 0, overflow: "hidden" }, children }),
16685
+ /* @__PURE__ */ jsxs("div", { "data-debug": "", style: { position: "absolute", top: 0, left: 0, background: "yellow", color: "black", zIndex: 9999, fontSize: 24, padding: 8 }, children: [
16686
+ "C=",
16687
+ React76.Children.count(children),
16688
+ " J=",
16689
+ String(hasJsxChildren),
16690
+ " D=",
16691
+ drawables?.length ?? -1
16692
+ ] })
16611
16693
  ]
16612
16694
  }
16613
- );
16695
+ ) });
16614
16696
  }
16615
16697
  var canvas2DLog;
16616
16698
  var init_Canvas2D = __esm({
@@ -16632,6 +16714,7 @@ var init_Canvas2D = __esm({
16632
16714
  init_webPainter2d();
16633
16715
  init_projector();
16634
16716
  init_paintDispatch();
16717
+ init_registry();
16635
16718
  init_hitTest();
16636
16719
  init_isometric();
16637
16720
  canvas2DLog = createLogger("almadar:ui:game-canvas");
@@ -16673,7 +16756,8 @@ function Canvas({
16673
16756
  tileLeaveEvent,
16674
16757
  featureClickEvent,
16675
16758
  keyMap,
16676
- keyUpMap
16759
+ keyUpMap,
16760
+ children
16677
16761
  }) {
16678
16762
  canvasLog.debug("Canvas render", { mode, drawablesCount: drawables?.length, projection, camera: camera ? JSON.stringify(camera) : void 0 });
16679
16763
  const zoom = camera?.zoom;
@@ -16726,7 +16810,8 @@ function Canvas({
16726
16810
  tileHoverEvent,
16727
16811
  tileLeaveEvent,
16728
16812
  keyMap,
16729
- keyUpMap
16813
+ keyUpMap,
16814
+ ...children !== void 0 ? { children } : {}
16730
16815
  }
16731
16816
  );
16732
16817
  }
@@ -19009,9 +19094,9 @@ function ControlButton({
19009
19094
  className
19010
19095
  }) {
19011
19096
  const eventBus = useEventBus();
19012
- const [isPressed, setIsPressed] = React75.useState(false);
19097
+ const [isPressed, setIsPressed] = React76.useState(false);
19013
19098
  const actualPressed = pressed ?? isPressed;
19014
- const handlePointerDown = React75.useCallback(
19099
+ const handlePointerDown = React76.useCallback(
19015
19100
  (e) => {
19016
19101
  e.preventDefault();
19017
19102
  if (disabled) return;
@@ -19021,7 +19106,7 @@ function ControlButton({
19021
19106
  },
19022
19107
  [disabled, pressEvent, eventBus, onPress]
19023
19108
  );
19024
- const handlePointerUp = React75.useCallback(
19109
+ const handlePointerUp = React76.useCallback(
19025
19110
  (e) => {
19026
19111
  e.preventDefault();
19027
19112
  if (disabled) return;
@@ -19031,7 +19116,7 @@ function ControlButton({
19031
19116
  },
19032
19117
  [disabled, releaseEvent, eventBus, onRelease]
19033
19118
  );
19034
- const handlePointerLeave = React75.useCallback(
19119
+ const handlePointerLeave = React76.useCallback(
19035
19120
  (e) => {
19036
19121
  if (isPressed) {
19037
19122
  setIsPressed(false);
@@ -19119,8 +19204,8 @@ function ControlGrid({
19119
19204
  className
19120
19205
  }) {
19121
19206
  const eventBus = useEventBus();
19122
- const [active, setActive] = React75.useState(/* @__PURE__ */ new Set());
19123
- const handlePress = React75.useCallback(
19207
+ const [active, setActive] = React76.useState(/* @__PURE__ */ new Set());
19208
+ const handlePress = React76.useCallback(
19124
19209
  (id) => {
19125
19210
  setActive((prev) => new Set(prev).add(id));
19126
19211
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -19134,7 +19219,7 @@ function ControlGrid({
19134
19219
  },
19135
19220
  [kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
19136
19221
  );
19137
- const handleRelease = React75.useCallback(
19222
+ const handleRelease = React76.useCallback(
19138
19223
  (id) => {
19139
19224
  setActive((prev) => {
19140
19225
  const next = new Set(prev);
@@ -20372,8 +20457,8 @@ var init_Menu = __esm({
20372
20457
  "bottom-end": "bottom-start"
20373
20458
  };
20374
20459
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
20375
- const triggerChild = React75__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
20376
- const triggerElement = React75__default.cloneElement(
20460
+ const triggerChild = React76__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
20461
+ const triggerElement = React76__default.cloneElement(
20377
20462
  triggerChild,
20378
20463
  {
20379
20464
  ref: triggerRef,
@@ -20468,14 +20553,14 @@ function useDataDnd(args) {
20468
20553
  const isZone = Boolean(dragGroup || accepts || sortable);
20469
20554
  const enabled = isZone || Boolean(dndRoot);
20470
20555
  const eventBus = useEventBus();
20471
- const parentRoot = React75__default.useContext(RootCtx);
20556
+ const parentRoot = React76__default.useContext(RootCtx);
20472
20557
  const isRoot = enabled && parentRoot === null;
20473
- const zoneId = React75__default.useId();
20558
+ const zoneId = React76__default.useId();
20474
20559
  const ownGroup = dragGroup ?? accepts ?? zoneId;
20475
- const [optimisticOrders, setOptimisticOrders] = React75__default.useState(() => /* @__PURE__ */ new Map());
20476
- const optimisticOrdersRef = React75__default.useRef(optimisticOrders);
20560
+ const [optimisticOrders, setOptimisticOrders] = React76__default.useState(() => /* @__PURE__ */ new Map());
20561
+ const optimisticOrdersRef = React76__default.useRef(optimisticOrders);
20477
20562
  optimisticOrdersRef.current = optimisticOrders;
20478
- const clearOptimisticOrder = React75__default.useCallback((group) => {
20563
+ const clearOptimisticOrder = React76__default.useCallback((group) => {
20479
20564
  setOptimisticOrders((prev) => {
20480
20565
  if (!prev.has(group)) return prev;
20481
20566
  const next = new Map(prev);
@@ -20500,7 +20585,7 @@ function useDataDnd(args) {
20500
20585
  const raw = it[dndItemIdField];
20501
20586
  return raw != null ? String(raw) : `__idx_${idx}`;
20502
20587
  }).join("|");
20503
- const itemIds = React75__default.useMemo(
20588
+ const itemIds = React76__default.useMemo(
20504
20589
  () => orderedItems.map((it, idx) => {
20505
20590
  const raw = it[dndItemIdField];
20506
20591
  return raw != null ? String(raw) : `__idx_${idx}`;
@@ -20511,7 +20596,7 @@ function useDataDnd(args) {
20511
20596
  const raw = it[dndItemIdField];
20512
20597
  return raw != null ? String(raw) : `__${idx}`;
20513
20598
  }).join("|");
20514
- React75__default.useEffect(() => {
20599
+ React76__default.useEffect(() => {
20515
20600
  const root = isRoot ? null : parentRoot;
20516
20601
  if (root) {
20517
20602
  root.clearOptimisticOrder(ownGroup);
@@ -20519,20 +20604,20 @@ function useDataDnd(args) {
20519
20604
  clearOptimisticOrder(ownGroup);
20520
20605
  }
20521
20606
  }, [itemsContentSig, ownGroup]);
20522
- const zonesRef = React75__default.useRef(/* @__PURE__ */ new Map());
20523
- const registerZone = React75__default.useCallback((zoneId2, meta2) => {
20607
+ const zonesRef = React76__default.useRef(/* @__PURE__ */ new Map());
20608
+ const registerZone = React76__default.useCallback((zoneId2, meta2) => {
20524
20609
  zonesRef.current.set(zoneId2, meta2);
20525
20610
  }, []);
20526
- const unregisterZone = React75__default.useCallback((zoneId2) => {
20611
+ const unregisterZone = React76__default.useCallback((zoneId2) => {
20527
20612
  zonesRef.current.delete(zoneId2);
20528
20613
  }, []);
20529
- const [activeDrag, setActiveDrag] = React75__default.useState(null);
20530
- const [overZoneGroup, setOverZoneGroup] = React75__default.useState(null);
20531
- const meta = React75__default.useMemo(
20614
+ const [activeDrag, setActiveDrag] = React76__default.useState(null);
20615
+ const [overZoneGroup, setOverZoneGroup] = React76__default.useState(null);
20616
+ const meta = React76__default.useMemo(
20532
20617
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
20533
20618
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
20534
20619
  );
20535
- React75__default.useEffect(() => {
20620
+ React76__default.useEffect(() => {
20536
20621
  const target = isRoot ? null : parentRoot;
20537
20622
  if (!target) {
20538
20623
  zonesRef.current.set(zoneId, meta);
@@ -20551,7 +20636,7 @@ function useDataDnd(args) {
20551
20636
  }, [parentRoot, isRoot, zoneId, meta]);
20552
20637
  const sensors = useAlmadarDndSensors(true);
20553
20638
  const collisionDetection = almadarDndCollisionDetection;
20554
- const findZoneByItem = React75__default.useCallback(
20639
+ const findZoneByItem = React76__default.useCallback(
20555
20640
  (id) => {
20556
20641
  for (const z of zonesRef.current.values()) {
20557
20642
  if (z.itemIds.includes(id)) return z;
@@ -20560,7 +20645,7 @@ function useDataDnd(args) {
20560
20645
  },
20561
20646
  []
20562
20647
  );
20563
- React75__default.useCallback(
20648
+ React76__default.useCallback(
20564
20649
  (group) => {
20565
20650
  for (const z of zonesRef.current.values()) {
20566
20651
  if (z.group === group) return z;
@@ -20569,7 +20654,7 @@ function useDataDnd(args) {
20569
20654
  },
20570
20655
  []
20571
20656
  );
20572
- const handleDragEnd = React75__default.useCallback(
20657
+ const handleDragEnd = React76__default.useCallback(
20573
20658
  (event) => {
20574
20659
  const { active, over } = event;
20575
20660
  const activeIdStr = String(active.id);
@@ -20660,8 +20745,8 @@ function useDataDnd(args) {
20660
20745
  },
20661
20746
  [eventBus]
20662
20747
  );
20663
- const sortableData = React75__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
20664
- const SortableItem = React75__default.useCallback(
20748
+ const sortableData = React76__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
20749
+ const SortableItem = React76__default.useCallback(
20665
20750
  ({ id, children }) => {
20666
20751
  const {
20667
20752
  attributes,
@@ -20701,7 +20786,7 @@ function useDataDnd(args) {
20701
20786
  id: droppableId,
20702
20787
  data: sortableData
20703
20788
  });
20704
- const ctx = React75__default.useContext(RootCtx);
20789
+ const ctx = React76__default.useContext(RootCtx);
20705
20790
  const activeDrag2 = ctx?.activeDrag ?? null;
20706
20791
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
20707
20792
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -20716,7 +20801,7 @@ function useDataDnd(args) {
20716
20801
  showForeignPlaceholder,
20717
20802
  ctxAvailable: ctx != null
20718
20803
  });
20719
- React75__default.useEffect(() => {
20804
+ React76__default.useEffect(() => {
20720
20805
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
20721
20806
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
20722
20807
  return /* @__PURE__ */ jsx(
@@ -20730,11 +20815,11 @@ function useDataDnd(args) {
20730
20815
  }
20731
20816
  );
20732
20817
  };
20733
- const rootContextValue = React75__default.useMemo(
20818
+ const rootContextValue = React76__default.useMemo(
20734
20819
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
20735
20820
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
20736
20821
  );
20737
- const handleDragStart = React75__default.useCallback((event) => {
20822
+ const handleDragStart = React76__default.useCallback((event) => {
20738
20823
  const sourceZone = findZoneByItem(event.active.id);
20739
20824
  const rect = event.active.rect.current.initial;
20740
20825
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -20753,7 +20838,7 @@ function useDataDnd(args) {
20753
20838
  isRoot
20754
20839
  });
20755
20840
  }, [findZoneByItem, isRoot, zoneId]);
20756
- const handleDragOver = React75__default.useCallback((event) => {
20841
+ const handleDragOver = React76__default.useCallback((event) => {
20757
20842
  const { active, over } = event;
20758
20843
  const overData = over?.data?.current;
20759
20844
  const overGroup = overData?.dndGroup ?? null;
@@ -20823,7 +20908,7 @@ function useDataDnd(args) {
20823
20908
  return next;
20824
20909
  });
20825
20910
  }, []);
20826
- const handleDragCancel = React75__default.useCallback((event) => {
20911
+ const handleDragCancel = React76__default.useCallback((event) => {
20827
20912
  setActiveDrag(null);
20828
20913
  setOverZoneGroup(null);
20829
20914
  dndLog.warn("dragCancel", {
@@ -20831,12 +20916,12 @@ function useDataDnd(args) {
20831
20916
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
20832
20917
  });
20833
20918
  }, []);
20834
- const handleDragEndWithCleanup = React75__default.useCallback((event) => {
20919
+ const handleDragEndWithCleanup = React76__default.useCallback((event) => {
20835
20920
  handleDragEnd(event);
20836
20921
  setActiveDrag(null);
20837
20922
  setOverZoneGroup(null);
20838
20923
  }, [handleDragEnd]);
20839
- const wrapContainer = React75__default.useCallback(
20924
+ const wrapContainer = React76__default.useCallback(
20840
20925
  (children) => {
20841
20926
  if (!enabled) return children;
20842
20927
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -20890,7 +20975,7 @@ var init_useDataDnd = __esm({
20890
20975
  init_useAlmadarDndCollision();
20891
20976
  init_Box();
20892
20977
  dndLog = createLogger("almadar:ui:dnd");
20893
- RootCtx = React75__default.createContext(null);
20978
+ RootCtx = React76__default.createContext(null);
20894
20979
  }
20895
20980
  });
20896
20981
  function renderIconInput(icon, props) {
@@ -21432,7 +21517,7 @@ function DataList({
21432
21517
  }) {
21433
21518
  const eventBus = useEventBus();
21434
21519
  const { t } = useTranslate();
21435
- const [visibleCount, setVisibleCount] = React75__default.useState(pageSize || Infinity);
21520
+ const [visibleCount, setVisibleCount] = React76__default.useState(pageSize || Infinity);
21436
21521
  const fieldDefs = fields ?? columns ?? [];
21437
21522
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
21438
21523
  const dnd = useDataDnd({
@@ -21448,14 +21533,14 @@ function DataList({
21448
21533
  dndRoot
21449
21534
  });
21450
21535
  const orderedData = dnd.orderedItems;
21451
- const allData = React75__default.useMemo(
21536
+ const allData = React76__default.useMemo(
21452
21537
  () => sortRows(orderedData, sortBy, sortDirection),
21453
21538
  [orderedData, sortBy, sortDirection]
21454
21539
  );
21455
21540
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
21456
21541
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
21457
21542
  const hasRenderProp = typeof children === "function";
21458
- React75__default.useEffect(() => {
21543
+ React76__default.useEffect(() => {
21459
21544
  const renderItemTypeOf = typeof schemaRenderItem;
21460
21545
  const childrenTypeOf = typeof children;
21461
21546
  if (data.length > 0 && !hasRenderProp) {
@@ -21570,7 +21655,7 @@ function DataList({
21570
21655
  return v === void 0 || v === null || v === "" ? raw : String(v);
21571
21656
  };
21572
21657
  return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
21573
- groups2.map((group, gi) => /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
21658
+ groups2.map((group, gi) => /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
21574
21659
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
21575
21660
  group.items.map((itemData, index) => {
21576
21661
  const id = itemData.id || `${gi}-${index}`;
@@ -21769,7 +21854,7 @@ function DataList({
21769
21854
  className
21770
21855
  ),
21771
21856
  children: [
21772
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
21857
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
21773
21858
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
21774
21859
  group.items.map(
21775
21860
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -21878,8 +21963,8 @@ function ScalarControl({
21878
21963
  }
21879
21964
  const numeric = typeof value === "number";
21880
21965
  const initial = value === null ? "" : String(value);
21881
- const [draft, setDraft] = React75__default.useState(initial);
21882
- React75__default.useEffect(() => setDraft(initial), [initial]);
21966
+ const [draft, setDraft] = React76__default.useState(initial);
21967
+ React76__default.useEffect(() => setDraft(initial), [initial]);
21883
21968
  const commit = () => {
21884
21969
  if (numeric) {
21885
21970
  const n = draft.trim() === "" ? 0 : Number(draft);
@@ -21947,8 +22032,8 @@ function Row({
21947
22032
  onRemove,
21948
22033
  readonly
21949
22034
  }) {
21950
- const [keyDraft, setKeyDraft] = React75__default.useState(rowKey);
21951
- React75__default.useEffect(() => setKeyDraft(rowKey), [rowKey]);
22035
+ const [keyDraft, setKeyDraft] = React76__default.useState(rowKey);
22036
+ React76__default.useEffect(() => setKeyDraft(rowKey), [rowKey]);
21952
22037
  const container = isObj(value) || isArr(value);
21953
22038
  return /* @__PURE__ */ jsxs(VStack, { gap: "none", className: "group w-max min-w-full", children: [
21954
22039
  /* @__PURE__ */ jsxs(HStack, { gap: "xs", align: "center", className: "py-0.5 w-max", children: [
@@ -21991,7 +22076,7 @@ function ContainerNode({
21991
22076
  depth,
21992
22077
  readonly
21993
22078
  }) {
21994
- const [open, setOpen] = React75__default.useState(depth < 2);
22079
+ const [open, setOpen] = React76__default.useState(depth < 2);
21995
22080
  const array = isArr(value);
21996
22081
  const entries = array ? value.map((v, i) => [String(i), v]) : Object.entries(value);
21997
22082
  const setObjValue = (key, next) => {
@@ -22133,7 +22218,7 @@ var init_FormSection = __esm({
22133
22218
  columns = 1,
22134
22219
  className
22135
22220
  }) => {
22136
- const [collapsed, setCollapsed] = React75__default.useState(defaultCollapsed);
22221
+ const [collapsed, setCollapsed] = React76__default.useState(defaultCollapsed);
22137
22222
  const { t } = useTranslate();
22138
22223
  const eventBus = useEventBus();
22139
22224
  const gridClass = {
@@ -22141,7 +22226,7 @@ var init_FormSection = __esm({
22141
22226
  2: "grid-cols-1 md:grid-cols-2",
22142
22227
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
22143
22228
  }[columns];
22144
- React75__default.useCallback(() => {
22229
+ React76__default.useCallback(() => {
22145
22230
  if (collapsible) {
22146
22231
  setCollapsed((prev) => !prev);
22147
22232
  eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
@@ -22549,8 +22634,8 @@ function TextLikeControl({
22549
22634
  onCommit
22550
22635
  }) {
22551
22636
  const initial = value === void 0 || value === null ? "" : String(value);
22552
- const [draft, setDraft] = React75__default.useState(initial);
22553
- React75__default.useEffect(() => setDraft(initial), [initial]);
22637
+ const [draft, setDraft] = React76__default.useState(initial);
22638
+ React76__default.useEffect(() => setDraft(initial), [initial]);
22554
22639
  const commit = () => {
22555
22640
  if (numeric) {
22556
22641
  const n = draft.trim() === "" ? 0 : Number(draft);
@@ -22735,14 +22820,14 @@ var init_NodeSlotEditor = __esm({
22735
22820
  isObj2 = (v) => v !== null && v !== void 0 && typeof v === "object" && !Array.isArray(v);
22736
22821
  NodeSlotEditor = ({ value, onChange, className }) => {
22737
22822
  const { type, props, wasArray } = normalize(value);
22738
- const patterns = React75__default.useMemo(() => {
22823
+ const patterns = React76__default.useMemo(() => {
22739
22824
  try {
22740
22825
  return [...getKnownPatterns()].sort();
22741
22826
  } catch {
22742
22827
  return [];
22743
22828
  }
22744
22829
  }, []);
22745
- const options = React75__default.useMemo(
22830
+ const options = React76__default.useMemo(
22746
22831
  () => [{ value: "", label: "\u2014 none \u2014" }, ...patterns.map((p) => ({ value: p, label: p }))],
22747
22832
  [patterns]
22748
22833
  );
@@ -22754,7 +22839,7 @@ var init_NodeSlotEditor = __esm({
22754
22839
  const pattern = { type: nextType, ...nextProps };
22755
22840
  onChange(wasArray || value === void 0 ? [pattern] : pattern);
22756
22841
  };
22757
- const schemaEntries = React75__default.useMemo(() => {
22842
+ const schemaEntries = React76__default.useMemo(() => {
22758
22843
  if (!type) return [];
22759
22844
  const def = getPatternDefinition(type);
22760
22845
  if (!def?.propsSchema) return [];
@@ -23575,7 +23660,7 @@ var init_Flex = __esm({
23575
23660
  flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
23576
23661
  }
23577
23662
  }
23578
- return React75__default.createElement(Component, {
23663
+ return React76__default.createElement(Component, {
23579
23664
  className: cn(
23580
23665
  inline ? "inline-flex" : "flex",
23581
23666
  directionStyles[direction],
@@ -23694,7 +23779,7 @@ var init_Grid = __esm({
23694
23779
  as: Component = "div"
23695
23780
  }) => {
23696
23781
  const mergedStyle = rows2 ? { gridTemplateRows: `repeat(${rows2}, minmax(0, 1fr))`, ...style } : style;
23697
- return React75__default.createElement(
23782
+ return React76__default.createElement(
23698
23783
  Component,
23699
23784
  {
23700
23785
  className: cn(
@@ -23926,9 +24011,9 @@ var init_Popover = __esm({
23926
24011
  onMouseLeave: handleClose,
23927
24012
  onPointerDown: tapTriggerProps.onPointerDown
23928
24013
  };
23929
- const childElement = React75__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
24014
+ const childElement = React76__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
23930
24015
  const childPointerDown = childElement.props.onPointerDown;
23931
- const triggerElement = React75__default.cloneElement(
24016
+ const triggerElement = React76__default.cloneElement(
23932
24017
  childElement,
23933
24018
  {
23934
24019
  ref: triggerRef,
@@ -24787,9 +24872,9 @@ var init_Tooltip = __esm({
24787
24872
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
24788
24873
  };
24789
24874
  }, []);
24790
- const triggerElement = React75__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
24875
+ const triggerElement = React76__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
24791
24876
  const childPointerDown = triggerElement.props.onPointerDown;
24792
- const trigger = React75__default.cloneElement(triggerElement, {
24877
+ const trigger = React76__default.cloneElement(triggerElement, {
24793
24878
  ref: triggerRef,
24794
24879
  onMouseEnter: handleMouseEnter,
24795
24880
  onMouseLeave: handleMouseLeave,
@@ -24879,7 +24964,7 @@ var init_WizardProgress = __esm({
24879
24964
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
24880
24965
  const isActive = index === currentStep;
24881
24966
  const isCompleted = index < currentStep;
24882
- return /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
24967
+ return /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
24883
24968
  /* @__PURE__ */ jsx(
24884
24969
  "button",
24885
24970
  {
@@ -26690,7 +26775,7 @@ function GameMenu({
26690
26775
  }) {
26691
26776
  const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
26692
26777
  const eventBus = useEventBus();
26693
- const handleOptionClick = React75.useCallback(
26778
+ const handleOptionClick = React76.useCallback(
26694
26779
  (option) => {
26695
26780
  if (option.event) {
26696
26781
  eventBus.emit(`UI:${option.event}`, { option });
@@ -26926,7 +27011,7 @@ function StateGraph({
26926
27011
  }) {
26927
27012
  const eventBus = useEventBus();
26928
27013
  const nodes = states ?? [];
26929
- const positions = React75.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
27014
+ const positions = React76.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
26930
27015
  return /* @__PURE__ */ jsxs(
26931
27016
  Box,
26932
27017
  {
@@ -27463,7 +27548,7 @@ function LinearView({
27463
27548
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
27464
27549
  const isDone = i < currentIdx;
27465
27550
  const isCurrent = i === currentIdx;
27466
- return /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
27551
+ return /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
27467
27552
  i > 0 && /* @__PURE__ */ jsx(
27468
27553
  Typography,
27469
27554
  {
@@ -28096,7 +28181,7 @@ function SequenceBar({
28096
28181
  else onSlotRemove?.(index);
28097
28182
  }, [emit, slotRemoveEvent, onSlotRemove, playing]);
28098
28183
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
28099
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
28184
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
28100
28185
  i > 0 && /* @__PURE__ */ jsx(
28101
28186
  Typography,
28102
28187
  {
@@ -29076,7 +29161,7 @@ var init_MapView = __esm({
29076
29161
  shadowSize: [41, 41]
29077
29162
  });
29078
29163
  L.Marker.prototype.options.icon = defaultIcon;
29079
- const { useEffect: useEffect65, useRef: useRef63, useCallback: useCallback106, useState: useState103 } = React75__default;
29164
+ const { useEffect: useEffect65, useRef: useRef63, useCallback: useCallback106, useState: useState103 } = React76__default;
29080
29165
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
29081
29166
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
29082
29167
  function MapUpdater({ centerLat, centerLng, zoom }) {
@@ -29994,8 +30079,8 @@ function TableView({
29994
30079
  }) {
29995
30080
  const eventBus = useEventBus();
29996
30081
  const { t } = useTranslate();
29997
- const [visibleCount, setVisibleCount] = React75__default.useState(pageSize > 0 ? pageSize : Infinity);
29998
- const [localSelected, setLocalSelected] = React75__default.useState(/* @__PURE__ */ new Set());
30082
+ const [visibleCount, setVisibleCount] = React76__default.useState(pageSize > 0 ? pageSize : Infinity);
30083
+ const [localSelected, setLocalSelected] = React76__default.useState(/* @__PURE__ */ new Set());
29999
30084
  const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
30000
30085
  const actionDefs = Array.isArray(itemActions) ? itemActions : [];
30001
30086
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
@@ -30017,7 +30102,7 @@ function TableView({
30017
30102
  const hasRenderProp = typeof children === "function";
30018
30103
  const idField = dndItemIdField ?? "id";
30019
30104
  const isCoarsePointer = useMediaQuery("(pointer: coarse)");
30020
- React75__default.useEffect(() => {
30105
+ React76__default.useEffect(() => {
30021
30106
  tableViewLog.debug("render", {
30022
30107
  rowCount: data.length,
30023
30108
  colCount: colDefs.length,
@@ -30074,7 +30159,7 @@ function TableView({
30074
30159
  };
30075
30160
  eventBus.emit(`UI:${itemClickEvent}`, payload);
30076
30161
  };
30077
- const colFloors = React75__default.useMemo(
30162
+ const colFloors = React76__default.useMemo(
30078
30163
  () => colDefs.map((col) => {
30079
30164
  const longest = data.reduce((widest, row) => {
30080
30165
  const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
@@ -30236,12 +30321,12 @@ function TableView({
30236
30321
  ]
30237
30322
  }
30238
30323
  );
30239
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React75__default.Fragment, { children: rowInner }, id);
30324
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React76__default.Fragment, { children: rowInner }, id);
30240
30325
  };
30241
30326
  const items = Array.from(data);
30242
30327
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
30243
30328
  let runningIndex = 0;
30244
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
30329
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
30245
30330
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
30246
30331
  group.items.map((row) => renderRow(row, runningIndex++))
30247
30332
  ] }, gi)) });
@@ -31604,7 +31689,7 @@ var init_StepFlow = __esm({
31604
31689
  className
31605
31690
  }) => {
31606
31691
  if (orientation === "vertical") {
31607
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React75__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
31692
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React76__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
31608
31693
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
31609
31694
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
31610
31695
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -31615,7 +31700,7 @@ var init_StepFlow = __esm({
31615
31700
  ] })
31616
31701
  ] }) }, index)) });
31617
31702
  }
31618
- 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(React75__default.Fragment, { children: [
31703
+ 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(React76__default.Fragment, { children: [
31619
31704
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
31620
31705
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
31621
31706
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -32605,7 +32690,7 @@ var init_LikertScale = __esm({
32605
32690
  md: "text-base",
32606
32691
  lg: "text-lg"
32607
32692
  };
32608
- LikertScale = React75__default.forwardRef(
32693
+ LikertScale = React76__default.forwardRef(
32609
32694
  ({
32610
32695
  question,
32611
32696
  options = DEFAULT_LIKERT_OPTIONS,
@@ -32617,7 +32702,7 @@ var init_LikertScale = __esm({
32617
32702
  variant = "radios",
32618
32703
  className
32619
32704
  }, ref) => {
32620
- const groupId = React75__default.useId();
32705
+ const groupId = React76__default.useId();
32621
32706
  const eventBus = useEventBus();
32622
32707
  const handleSelect = useCallback(
32623
32708
  (next) => {
@@ -34906,7 +34991,7 @@ var init_DocBreadcrumb = __esm({
34906
34991
  "aria-label": t("aria.breadcrumb"),
34907
34992
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
34908
34993
  const isLast = idx === items.length - 1;
34909
- return /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
34994
+ return /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
34910
34995
  idx > 0 && /* @__PURE__ */ jsx(
34911
34996
  Icon,
34912
34997
  {
@@ -35775,7 +35860,7 @@ var init_MiniStateMachine = __esm({
35775
35860
  const x = 2 + i * (NODE_W + GAP2 + ARROW_W + GAP2);
35776
35861
  const tc = transitionCounts[s.name] ?? 0;
35777
35862
  const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
35778
- return /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
35863
+ return /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
35779
35864
  /* @__PURE__ */ jsx(
35780
35865
  AvlState,
35781
35866
  {
@@ -35979,7 +36064,7 @@ var init_PageHeader = __esm({
35979
36064
  info: "bg-info/10 text-info"
35980
36065
  };
35981
36066
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
35982
- 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(React75__default.Fragment, { children: [
36067
+ 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(React76__default.Fragment, { children: [
35983
36068
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
35984
36069
  crumb.href ? /* @__PURE__ */ jsx(
35985
36070
  "a",
@@ -36337,7 +36422,7 @@ var init_Section = __esm({
36337
36422
  as: Component = "section"
36338
36423
  }) => {
36339
36424
  const hasHeader = title || description || action;
36340
- return React75__default.createElement(
36425
+ return React76__default.createElement(
36341
36426
  Component,
36342
36427
  {
36343
36428
  className: cn(
@@ -36711,7 +36796,7 @@ var init_WizardContainer = __esm({
36711
36796
  const isCompleted = index < currentStep;
36712
36797
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
36713
36798
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
36714
- return /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
36799
+ return /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
36715
36800
  /* @__PURE__ */ jsx(
36716
36801
  Button,
36717
36802
  {
@@ -38498,7 +38583,7 @@ var init_ImportPreviewTree = __esm({
38498
38583
  const renderUnit = (unit, childrenByParent, depth) => {
38499
38584
  const summary = fieldSummary(unit);
38500
38585
  const children = childrenByParent.get(unit.ref) ?? [];
38501
- return /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
38586
+ return /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
38502
38587
  /* @__PURE__ */ jsxs(
38503
38588
  Box,
38504
38589
  {
@@ -38595,7 +38680,7 @@ var init_ImportProgress = __esm({
38595
38680
  PIPELINE.map((key, index) => {
38596
38681
  const isComplete = index < currentIndex;
38597
38682
  const isActive = index === currentIndex;
38598
- return /* @__PURE__ */ jsxs(React75__default.Fragment, { children: [
38683
+ return /* @__PURE__ */ jsxs(React76__default.Fragment, { children: [
38599
38684
  index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
38600
38685
  /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
38601
38686
  /* @__PURE__ */ jsx(
@@ -39930,7 +40015,7 @@ var init_DrawGroup = __esm({
39930
40015
  }
39931
40016
  });
39932
40017
  function extractTitle(children) {
39933
- if (!React75__default.isValidElement(children)) return void 0;
40018
+ if (!React76__default.isValidElement(children)) return void 0;
39934
40019
  const props = children.props;
39935
40020
  if (typeof props.title === "string") {
39936
40021
  return props.title;
@@ -40280,12 +40365,12 @@ var init_Form = __esm({
40280
40365
  const isSchemaEntity = isOrbitalEntitySchema(entity);
40281
40366
  const resolvedEntity = isSchemaEntity ? entity : void 0;
40282
40367
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
40283
- const normalizedInitialData = React75__default.useMemo(() => {
40368
+ const normalizedInitialData = React76__default.useMemo(() => {
40284
40369
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
40285
40370
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
40286
40371
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
40287
40372
  }, [entity, initialData]);
40288
- const entityDerivedFields = React75__default.useMemo(() => {
40373
+ const entityDerivedFields = React76__default.useMemo(() => {
40289
40374
  if (fields && fields.length > 0) return void 0;
40290
40375
  if (!resolvedEntity) return void 0;
40291
40376
  return resolvedEntity.fields.map(
@@ -40306,16 +40391,16 @@ var init_Form = __esm({
40306
40391
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
40307
40392
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
40308
40393
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
40309
- const [formData, setFormData] = React75__default.useState(
40394
+ const [formData, setFormData] = React76__default.useState(
40310
40395
  normalizedInitialData
40311
40396
  );
40312
- const [collapsedSections, setCollapsedSections] = React75__default.useState(
40397
+ const [collapsedSections, setCollapsedSections] = React76__default.useState(
40313
40398
  /* @__PURE__ */ new Set()
40314
40399
  );
40315
- const [submitError, setSubmitError] = React75__default.useState(null);
40316
- const formRef = React75__default.useRef(null);
40400
+ const [submitError, setSubmitError] = React76__default.useState(null);
40401
+ const formRef = React76__default.useRef(null);
40317
40402
  const formMode = props.mode;
40318
- const mountedRef = React75__default.useRef(false);
40403
+ const mountedRef = React76__default.useRef(false);
40319
40404
  if (!mountedRef.current) {
40320
40405
  mountedRef.current = true;
40321
40406
  debug("forms", "mount", {
@@ -40328,7 +40413,7 @@ var init_Form = __esm({
40328
40413
  });
40329
40414
  }
40330
40415
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
40331
- const evalContext = React75__default.useMemo(
40416
+ const evalContext = React76__default.useMemo(
40332
40417
  () => ({
40333
40418
  formValues: formData,
40334
40419
  globalVariables: externalContext?.globalVariables ?? {},
@@ -40337,7 +40422,7 @@ var init_Form = __esm({
40337
40422
  }),
40338
40423
  [formData, externalContext]
40339
40424
  );
40340
- React75__default.useEffect(() => {
40425
+ React76__default.useEffect(() => {
40341
40426
  debug("forms", "initialData-sync", {
40342
40427
  mode: formMode,
40343
40428
  normalizedInitialData,
@@ -40348,7 +40433,7 @@ var init_Form = __esm({
40348
40433
  setFormData(normalizedInitialData);
40349
40434
  }
40350
40435
  }, [normalizedInitialData]);
40351
- const processCalculations = React75__default.useCallback(
40436
+ const processCalculations = React76__default.useCallback(
40352
40437
  (changedFieldId, newFormData) => {
40353
40438
  if (!hiddenCalculations.length) return;
40354
40439
  const context = {
@@ -40373,7 +40458,7 @@ var init_Form = __esm({
40373
40458
  },
40374
40459
  [hiddenCalculations, externalContext, eventBus]
40375
40460
  );
40376
- const checkViolations = React75__default.useCallback(
40461
+ const checkViolations = React76__default.useCallback(
40377
40462
  (changedFieldId, newFormData) => {
40378
40463
  if (!violationTriggers.length) return;
40379
40464
  const context = {
@@ -40411,7 +40496,7 @@ var init_Form = __esm({
40411
40496
  processCalculations(name, newFormData);
40412
40497
  checkViolations(name, newFormData);
40413
40498
  };
40414
- const isFieldVisible = React75__default.useCallback(
40499
+ const isFieldVisible = React76__default.useCallback(
40415
40500
  (fieldName) => {
40416
40501
  const condition = conditionalFields[fieldName];
40417
40502
  if (!condition) return true;
@@ -40419,7 +40504,7 @@ var init_Form = __esm({
40419
40504
  },
40420
40505
  [conditionalFields, evalContext]
40421
40506
  );
40422
- const isSectionVisible = React75__default.useCallback(
40507
+ const isSectionVisible = React76__default.useCallback(
40423
40508
  (section) => {
40424
40509
  if (!section.condition) return true;
40425
40510
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -40495,7 +40580,7 @@ var init_Form = __esm({
40495
40580
  eventBus.emit(`UI:${onCancel}`);
40496
40581
  }
40497
40582
  };
40498
- const renderField = React75__default.useCallback(
40583
+ const renderField = React76__default.useCallback(
40499
40584
  (field) => {
40500
40585
  const fieldName = field.name || field.field;
40501
40586
  if (!fieldName) return null;
@@ -40516,7 +40601,7 @@ var init_Form = __esm({
40516
40601
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
40517
40602
  );
40518
40603
  const effectiveFields = entityDerivedFields ?? fields;
40519
- const normalizedFields = React75__default.useMemo(() => {
40604
+ const normalizedFields = React76__default.useMemo(() => {
40520
40605
  if (!effectiveFields || effectiveFields.length === 0) return [];
40521
40606
  return effectiveFields.map((field) => {
40522
40607
  if (typeof field === "string") {
@@ -40540,7 +40625,7 @@ var init_Form = __esm({
40540
40625
  return field;
40541
40626
  });
40542
40627
  }, [effectiveFields, resolvedEntity]);
40543
- const schemaFields = React75__default.useMemo(() => {
40628
+ const schemaFields = React76__default.useMemo(() => {
40544
40629
  if (normalizedFields.length === 0) return null;
40545
40630
  if (isDebugEnabled()) {
40546
40631
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -40550,7 +40635,7 @@ var init_Form = __esm({
40550
40635
  }
40551
40636
  return normalizedFields.map(renderField).filter(Boolean);
40552
40637
  }, [normalizedFields, renderField, entityName, conditionalFields]);
40553
- const sectionElements = React75__default.useMemo(() => {
40638
+ const sectionElements = React76__default.useMemo(() => {
40554
40639
  if (!sections || sections.length === 0) return null;
40555
40640
  return sections.map((section) => {
40556
40641
  if (!isSectionVisible(section)) {
@@ -41276,7 +41361,7 @@ var init_List = __esm({
41276
41361
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
41277
41362
  return [];
41278
41363
  }, [entity]);
41279
- const getItemActions = React75__default.useCallback(
41364
+ const getItemActions = React76__default.useCallback(
41280
41365
  (item) => {
41281
41366
  if (!itemActions) return [];
41282
41367
  if (typeof itemActions === "function") {
@@ -41757,7 +41842,7 @@ var init_MediaGallery = __esm({
41757
41842
  [selectable, selectedItems, selectionEvent, eventBus]
41758
41843
  );
41759
41844
  const entityData = Array.isArray(entity) ? entity : [];
41760
- const items = React75__default.useMemo(() => {
41845
+ const items = React76__default.useMemo(() => {
41761
41846
  if (propItems && propItems.length > 0) return propItems;
41762
41847
  if (entityData.length === 0) return [];
41763
41848
  return entityData.map((record, idx) => {
@@ -41922,7 +42007,7 @@ var init_MediaGallery = __esm({
41922
42007
  }
41923
42008
  });
41924
42009
  function extractTitle2(children) {
41925
- if (!React75__default.isValidElement(children)) return void 0;
42010
+ if (!React76__default.isValidElement(children)) return void 0;
41926
42011
  const props = children.props;
41927
42012
  if (typeof props.title === "string") {
41928
42013
  return props.title;
@@ -42177,7 +42262,7 @@ var init_debugRegistry = __esm({
42177
42262
  }
42178
42263
  });
42179
42264
  function useDebugData() {
42180
- const [data, setData] = React75.useState(() => ({
42265
+ const [data, setData] = React76.useState(() => ({
42181
42266
  traits: [],
42182
42267
  ticks: [],
42183
42268
  guards: [],
@@ -42191,7 +42276,7 @@ function useDebugData() {
42191
42276
  },
42192
42277
  lastUpdate: Date.now()
42193
42278
  }));
42194
- React75.useEffect(() => {
42279
+ React76.useEffect(() => {
42195
42280
  const updateData = () => {
42196
42281
  setData({
42197
42282
  traits: getAllTraits(),
@@ -42300,12 +42385,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
42300
42385
  return positions;
42301
42386
  }
42302
42387
  function WalkMinimap() {
42303
- const [walkStep, setWalkStep] = React75.useState(null);
42304
- const [traits2, setTraits] = React75.useState([]);
42305
- const [coveredEdges, setCoveredEdges] = React75.useState([]);
42306
- const [completedTraits, setCompletedTraits] = React75.useState(/* @__PURE__ */ new Set());
42307
- const prevTraitRef = React75.useRef(null);
42308
- React75.useEffect(() => {
42388
+ const [walkStep, setWalkStep] = React76.useState(null);
42389
+ const [traits2, setTraits] = React76.useState([]);
42390
+ const [coveredEdges, setCoveredEdges] = React76.useState([]);
42391
+ const [completedTraits, setCompletedTraits] = React76.useState(/* @__PURE__ */ new Set());
42392
+ const prevTraitRef = React76.useRef(null);
42393
+ React76.useEffect(() => {
42309
42394
  const interval = setInterval(() => {
42310
42395
  const w = window;
42311
42396
  const step = w.__orbitalWalkStep;
@@ -42741,15 +42826,15 @@ var init_EntitiesTab = __esm({
42741
42826
  });
42742
42827
  function EventFlowTab({ events: events2 }) {
42743
42828
  const { t } = useTranslate();
42744
- const [filter, setFilter] = React75.useState("all");
42745
- const containerRef = React75.useRef(null);
42746
- const [autoScroll, setAutoScroll] = React75.useState(true);
42747
- React75.useEffect(() => {
42829
+ const [filter, setFilter] = React76.useState("all");
42830
+ const containerRef = React76.useRef(null);
42831
+ const [autoScroll, setAutoScroll] = React76.useState(true);
42832
+ React76.useEffect(() => {
42748
42833
  if (autoScroll && containerRef.current) {
42749
42834
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
42750
42835
  }
42751
42836
  }, [events2.length, autoScroll]);
42752
- const filteredEvents = React75.useMemo(() => {
42837
+ const filteredEvents = React76.useMemo(() => {
42753
42838
  if (filter === "all") return events2;
42754
42839
  return events2.filter((e) => e.type === filter);
42755
42840
  }, [events2, filter]);
@@ -42865,7 +42950,7 @@ var init_EventFlowTab = __esm({
42865
42950
  });
42866
42951
  function GuardsPanel({ guards }) {
42867
42952
  const { t } = useTranslate();
42868
- const [filter, setFilter] = React75.useState("all");
42953
+ const [filter, setFilter] = React76.useState("all");
42869
42954
  if (guards.length === 0) {
42870
42955
  return /* @__PURE__ */ jsx(
42871
42956
  EmptyState,
@@ -42878,7 +42963,7 @@ function GuardsPanel({ guards }) {
42878
42963
  }
42879
42964
  const passedCount = guards.filter((g) => g.result).length;
42880
42965
  const failedCount = guards.length - passedCount;
42881
- const filteredGuards = React75.useMemo(() => {
42966
+ const filteredGuards = React76.useMemo(() => {
42882
42967
  if (filter === "all") return guards;
42883
42968
  if (filter === "passed") return guards.filter((g) => g.result);
42884
42969
  return guards.filter((g) => !g.result);
@@ -43041,10 +43126,10 @@ function EffectBadge({ effect }) {
43041
43126
  }
43042
43127
  function TransitionTimeline({ transitions }) {
43043
43128
  const { t } = useTranslate();
43044
- const containerRef = React75.useRef(null);
43045
- const [autoScroll, setAutoScroll] = React75.useState(true);
43046
- const [expandedId, setExpandedId] = React75.useState(null);
43047
- React75.useEffect(() => {
43129
+ const containerRef = React76.useRef(null);
43130
+ const [autoScroll, setAutoScroll] = React76.useState(true);
43131
+ const [expandedId, setExpandedId] = React76.useState(null);
43132
+ React76.useEffect(() => {
43048
43133
  if (autoScroll && containerRef.current) {
43049
43134
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
43050
43135
  }
@@ -43324,9 +43409,9 @@ function getAllEvents(traits2) {
43324
43409
  function EventDispatcherTab({ traits: traits2, schema }) {
43325
43410
  const eventBus = useEventBus();
43326
43411
  const { t } = useTranslate();
43327
- const [log19, setLog] = React75.useState([]);
43328
- const prevStatesRef = React75.useRef(/* @__PURE__ */ new Map());
43329
- React75.useEffect(() => {
43412
+ const [log19, setLog] = React76.useState([]);
43413
+ const prevStatesRef = React76.useRef(/* @__PURE__ */ new Map());
43414
+ React76.useEffect(() => {
43330
43415
  for (const trait of traits2) {
43331
43416
  const prev = prevStatesRef.current.get(trait.id);
43332
43417
  if (prev && prev !== trait.currentState) {
@@ -43495,10 +43580,10 @@ function VerifyModePanel({
43495
43580
  localCount
43496
43581
  }) {
43497
43582
  const { t } = useTranslate();
43498
- const [expanded, setExpanded] = React75.useState(true);
43499
- const scrollRef = React75.useRef(null);
43500
- const prevCountRef = React75.useRef(0);
43501
- React75.useEffect(() => {
43583
+ const [expanded, setExpanded] = React76.useState(true);
43584
+ const scrollRef = React76.useRef(null);
43585
+ const prevCountRef = React76.useRef(0);
43586
+ React76.useEffect(() => {
43502
43587
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
43503
43588
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
43504
43589
  }
@@ -43555,10 +43640,10 @@ function RuntimeDebugger({
43555
43640
  schema
43556
43641
  }) {
43557
43642
  const { t } = useTranslate();
43558
- const [isCollapsed, setIsCollapsed] = React75.useState(mode === "verify" ? true : defaultCollapsed);
43559
- const [isVisible, setIsVisible] = React75.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
43643
+ const [isCollapsed, setIsCollapsed] = React76.useState(mode === "verify" ? true : defaultCollapsed);
43644
+ const [isVisible, setIsVisible] = React76.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
43560
43645
  const debugData = useDebugData();
43561
- React75.useEffect(() => {
43646
+ React76.useEffect(() => {
43562
43647
  if (mode === "inline") return;
43563
43648
  return onDebugToggle((enabled) => {
43564
43649
  setIsVisible(enabled);
@@ -43567,7 +43652,7 @@ function RuntimeDebugger({
43567
43652
  }
43568
43653
  });
43569
43654
  }, [mode]);
43570
- React75.useEffect(() => {
43655
+ React76.useEffect(() => {
43571
43656
  if (mode === "inline") return;
43572
43657
  const handleKeyDown = (e) => {
43573
43658
  if (e.key === "`" && isVisible) {
@@ -44087,7 +44172,7 @@ var init_StatCard = __esm({
44087
44172
  const labelToUse = propLabel ?? propTitle;
44088
44173
  const eventBus = useEventBus();
44089
44174
  const { t } = useTranslate();
44090
- const handleActionClick = React75__default.useCallback(() => {
44175
+ const handleActionClick = React76__default.useCallback(() => {
44091
44176
  if (action?.event) {
44092
44177
  eventBus.emit(`UI:${action.event}`, {});
44093
44178
  }
@@ -44098,7 +44183,7 @@ var init_StatCard = __esm({
44098
44183
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
44099
44184
  const isLoading = externalLoading ?? false;
44100
44185
  const error = externalError;
44101
- const computeMetricValue = React75__default.useCallback(
44186
+ const computeMetricValue = React76__default.useCallback(
44102
44187
  (metric, items) => {
44103
44188
  if (metric.value !== void 0) {
44104
44189
  return metric.value;
@@ -44137,7 +44222,7 @@ var init_StatCard = __esm({
44137
44222
  },
44138
44223
  []
44139
44224
  );
44140
- const schemaStats = React75__default.useMemo(() => {
44225
+ const schemaStats = React76__default.useMemo(() => {
44141
44226
  if (!metrics || metrics.length === 0) return null;
44142
44227
  return metrics.map((metric) => ({
44143
44228
  label: metric.label,
@@ -44145,7 +44230,7 @@ var init_StatCard = __esm({
44145
44230
  format: metric.format
44146
44231
  }));
44147
44232
  }, [metrics, data, computeMetricValue]);
44148
- const calculatedTrend = React75__default.useMemo(() => {
44233
+ const calculatedTrend = React76__default.useMemo(() => {
44149
44234
  if (manualTrend !== void 0) return manualTrend;
44150
44235
  if (previousValue === void 0 || currentValue2 === void 0)
44151
44236
  return void 0;
@@ -44785,8 +44870,8 @@ var init_SubagentTracePanel = __esm({
44785
44870
  ] });
44786
44871
  };
44787
44872
  InlineActivityStream = ({ activities, autoScroll = true, className }) => {
44788
- const endRef = React75__default.useRef(null);
44789
- React75__default.useEffect(() => {
44873
+ const endRef = React76__default.useRef(null);
44874
+ React76__default.useEffect(() => {
44790
44875
  if (!autoScroll) return;
44791
44876
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
44792
44877
  }, [activities.length, autoScroll]);
@@ -44880,7 +44965,7 @@ var init_SubagentTracePanel = __esm({
44880
44965
  };
44881
44966
  SubagentRichCard = ({ subagent }) => {
44882
44967
  const { t } = useTranslate();
44883
- const activities = React75__default.useMemo(
44968
+ const activities = React76__default.useMemo(
44884
44969
  () => subagentMessagesToActivities(subagent.messages),
44885
44970
  [subagent.messages]
44886
44971
  );
@@ -44957,8 +45042,8 @@ var init_SubagentTracePanel = __esm({
44957
45042
  ] });
44958
45043
  };
44959
45044
  CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
44960
- const endRef = React75__default.useRef(null);
44961
- React75__default.useEffect(() => {
45045
+ const endRef = React76__default.useRef(null);
45046
+ React76__default.useEffect(() => {
44962
45047
  if (!autoScroll) return;
44963
45048
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
44964
45049
  }, [messages.length, autoScroll]);
@@ -45393,7 +45478,7 @@ var init_Timeline = __esm({
45393
45478
  }) => {
45394
45479
  const { t } = useTranslate();
45395
45480
  const entityData = entity ?? [];
45396
- const items = React75__default.useMemo(() => {
45481
+ const items = React76__default.useMemo(() => {
45397
45482
  if (propItems) return propItems;
45398
45483
  if (entityData.length === 0) return [];
45399
45484
  return entityData.map((record, idx) => {
@@ -45495,7 +45580,7 @@ var init_Timeline = __esm({
45495
45580
  }
45496
45581
  });
45497
45582
  function extractToastProps(children) {
45498
- if (!React75__default.isValidElement(children)) {
45583
+ if (!React76__default.isValidElement(children)) {
45499
45584
  if (typeof children === "string") {
45500
45585
  return { message: children };
45501
45586
  }
@@ -45537,7 +45622,7 @@ var init_ToastSlot = __esm({
45537
45622
  eventBus.emit(`${prefix}CLOSE`);
45538
45623
  };
45539
45624
  if (!isVisible) return null;
45540
- const isCustomContent = React75__default.isValidElement(children) && !message;
45625
+ const isCustomContent = React76__default.isValidElement(children) && !message;
45541
45626
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
45542
45627
  Toast,
45543
45628
  {
@@ -46110,7 +46195,7 @@ function SuspenseConfigProvider({
46110
46195
  config,
46111
46196
  children
46112
46197
  }) {
46113
- return React75__default.createElement(
46198
+ return React76__default.createElement(
46114
46199
  SuspenseConfigContext.Provider,
46115
46200
  { value: config },
46116
46201
  children
@@ -46152,7 +46237,7 @@ function enrichFormFields(fields, entityDef) {
46152
46237
  }
46153
46238
  return { name: field, label: humanizeFieldName(field) };
46154
46239
  }
46155
- if (field && typeof field === "object" && !Array.isArray(field) && !React75__default.isValidElement(field) && !(field instanceof Date)) {
46240
+ if (field && typeof field === "object" && !Array.isArray(field) && !React76__default.isValidElement(field) && !(field instanceof Date)) {
46156
46241
  const obj = field;
46157
46242
  const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
46158
46243
  if (!fieldName) return field;
@@ -46624,7 +46709,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
46624
46709
  const key = `${parentId}-${index}-trait:${traitName}`;
46625
46710
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
46626
46711
  }
46627
- return /* @__PURE__ */ jsx(React75__default.Fragment, { children: child }, `${parentId}-${index}`);
46712
+ return /* @__PURE__ */ jsx(React76__default.Fragment, { children: child }, `${parentId}-${index}`);
46628
46713
  }
46629
46714
  if (!child || typeof child !== "object") return null;
46630
46715
  const childId = `${parentId}-${index}`;
@@ -46681,14 +46766,14 @@ function isPatternConfig(value) {
46681
46766
  if (value === null || value === void 0) return false;
46682
46767
  if (typeof value !== "object") return false;
46683
46768
  if (Array.isArray(value)) return false;
46684
- if (React75__default.isValidElement(value)) return false;
46769
+ if (React76__default.isValidElement(value)) return false;
46685
46770
  if (value instanceof Date) return false;
46686
46771
  if (typeof value === "function") return false;
46687
46772
  const record = value;
46688
46773
  return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
46689
46774
  }
46690
46775
  function isPlainConfigObject(value) {
46691
- if (React75__default.isValidElement(value)) return false;
46776
+ if (React76__default.isValidElement(value)) return false;
46692
46777
  if (value instanceof Date) return false;
46693
46778
  const proto = Object.getPrototypeOf(value);
46694
46779
  return proto === Object.prototype || proto === null;
@@ -46824,7 +46909,7 @@ function SlotContentRenderer({
46824
46909
  for (const slotKey of CONTENT_NODE_SLOTS) {
46825
46910
  const slotVal = restProps[slotKey];
46826
46911
  if (slotVal === void 0 || slotVal === null) continue;
46827
- if (React75__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
46912
+ if (React76__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
46828
46913
  const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
46829
46914
  if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
46830
46915
  nodeSlotOverrides[slotKey] = renderPatternChildren(
@@ -46878,7 +46963,7 @@ function SlotContentRenderer({
46878
46963
  const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
46879
46964
  if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
46880
46965
  const sample = resolvedItems[0];
46881
- if (sample && typeof sample === "object" && !Array.isArray(sample) && !React75__default.isValidElement(sample) && !(sample instanceof Date)) {
46966
+ if (sample && typeof sample === "object" && !Array.isArray(sample) && !React76__default.isValidElement(sample) && !(sample instanceof Date)) {
46882
46967
  const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
46883
46968
  finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
46884
46969
  }