@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.
package/dist/avl/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import * as React92 from 'react';
3
- import React92__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
2
+ import * as React93 from 'react';
3
+ import React93__default, { createContext, useState, useMemo, useRef, useEffect, useContext, useCallback, Suspense, useLayoutEffect, Profiler, useReducer, useSyncExternalStore, lazy, useId } from 'react';
4
4
  import { getAllPages, matchPathAmong, OrbitalProvider, EventBusContext, useTraitScopeChain, ServerBridgeProvider, VerificationProvider, EntitySchemaProvider, OrbitalThemeProvider, useServerBridge, EntityBindingContext, useEntitySchema, useEntitySchemaOptional, useEntityBindingSnapshot, TraitScopeProvider, useTraitScope, useCurrentPagePath, useGameAudioContextOptional } from '@almadar/ui/providers';
5
5
  import { createLogger, setNamespaceLevel, isLogLevelEnabled } from '@almadar/logger';
6
6
  import ELK from 'elkjs/lib/elk.bundled.js';
@@ -3301,7 +3301,7 @@ var init_Typography = __esm({
3301
3301
  if (format !== void 0 && format !== "none" && (typeof body === "string" || typeof body === "number" || body instanceof Date)) {
3302
3302
  body = formatValue(body, format);
3303
3303
  }
3304
- return React92__default.createElement(
3304
+ return React93__default.createElement(
3305
3305
  Component,
3306
3306
  {
3307
3307
  id,
@@ -3647,7 +3647,7 @@ var init_Box = __esm({
3647
3647
  fixed: "fixed",
3648
3648
  sticky: "sticky"
3649
3649
  };
3650
- Box = React92__default.forwardRef(
3650
+ Box = React93__default.forwardRef(
3651
3651
  ({
3652
3652
  padding,
3653
3653
  paddingX,
@@ -3712,7 +3712,7 @@ var init_Box = __esm({
3712
3712
  onPointerDown?.(e);
3713
3713
  }, [hoverEvent, tapReveal, triggerProps, onPointerDown]);
3714
3714
  const isClickable = action || onClick;
3715
- return React92__default.createElement(
3715
+ return React93__default.createElement(
3716
3716
  Component,
3717
3717
  {
3718
3718
  ref,
@@ -3808,7 +3808,7 @@ var init_Stack = __esm({
3808
3808
  };
3809
3809
  const isHorizontal = direction === "horizontal";
3810
3810
  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";
3811
- return React92__default.createElement(
3811
+ return React93__default.createElement(
3812
3812
  Component,
3813
3813
  {
3814
3814
  className: cn(
@@ -4300,7 +4300,7 @@ var init_MiniStateMachine = __esm({
4300
4300
  const x = 2 + i * (NODE_W + GAP + ARROW_W + GAP);
4301
4301
  const tc = transitionCounts[s.name] ?? 0;
4302
4302
  const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
4303
- return /* @__PURE__ */ jsxs(React92__default.Fragment, { children: [
4303
+ return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
4304
4304
  /* @__PURE__ */ jsx(
4305
4305
  AvlState,
4306
4306
  {
@@ -4583,7 +4583,7 @@ function resolveMarkerExpression(expression, entity, config, state) {
4583
4583
  function isPlainObject(value) {
4584
4584
  if (value === null || value === void 0 || typeof value !== "object") return false;
4585
4585
  if (Array.isArray(value)) return false;
4586
- if (React92__default.isValidElement(value)) return false;
4586
+ if (React93__default.isValidElement(value)) return false;
4587
4587
  if (value instanceof Date) return false;
4588
4588
  if (typeof value === "function") return false;
4589
4589
  return true;
@@ -4820,7 +4820,7 @@ var init_Icon = __esm({
4820
4820
  const effectiveName = typeof icon === "string" && icon !== "" ? icon : name;
4821
4821
  const effectiveStrokeWidth = strokeWidth != null && strokeWidth > 0 ? strokeWidth : void 0;
4822
4822
  const family = useIconFamily();
4823
- const RenderedComponent = React92__default.useMemo(() => {
4823
+ const RenderedComponent = React93__default.useMemo(() => {
4824
4824
  if (directIcon) return null;
4825
4825
  return effectiveName ? resolveIconForFamily(effectiveName) : null;
4826
4826
  }, [directIcon, effectiveName, family]);
@@ -4944,7 +4944,7 @@ var init_atlasSlice = __esm({
4944
4944
  }
4945
4945
  });
4946
4946
  function useAtlasSliceDataUrl(asset) {
4947
- const [, bump] = React92.useReducer((x) => x + 1, 0);
4947
+ const [, bump] = React93.useReducer((x) => x + 1, 0);
4948
4948
  if (!isAtlasAsset(asset)) return void 0;
4949
4949
  const key = `${asset.atlas}#${asset.sprite}`;
4950
4950
  const cached = sliceDataUrlCache.get(key);
@@ -5007,13 +5007,13 @@ function AtlasImage({
5007
5007
  style,
5008
5008
  "aria-hidden": ariaHidden
5009
5009
  }) {
5010
- const [, bump] = React92.useReducer((x) => x + 1, 0);
5011
- const canvasRef = React92.useRef(null);
5010
+ const [, bump] = React93.useReducer((x) => x + 1, 0);
5011
+ const canvasRef = React93.useRef(null);
5012
5012
  const sliced = isAtlasAsset(asset);
5013
5013
  const atlas = sliced ? getAtlas(asset.atlas, bump) : void 0;
5014
5014
  const img = sliced && asset?.url ? getSheetImage(asset.url, bump) : null;
5015
5015
  const rect = sliced && atlas ? subRectFor(atlas, asset.sprite) : null;
5016
- React92.useEffect(() => {
5016
+ React93.useEffect(() => {
5017
5017
  const canvas = canvasRef.current;
5018
5018
  if (!canvas || !img || !rect) return;
5019
5019
  canvas.width = rect.sw;
@@ -5089,7 +5089,7 @@ function resolveIconProp(value, sizeClass) {
5089
5089
  const IconComp = value;
5090
5090
  return /* @__PURE__ */ jsx(IconComp, { className: sizeClass });
5091
5091
  }
5092
- if (React92__default.isValidElement(value)) {
5092
+ if (React93__default.isValidElement(value)) {
5093
5093
  return value;
5094
5094
  }
5095
5095
  if (typeof value === "object" && value !== null && isIconLike(value)) {
@@ -5166,7 +5166,7 @@ var init_Button = __esm({
5166
5166
  md: "h-icon-default w-icon-default",
5167
5167
  lg: "h-icon-default w-icon-default"
5168
5168
  };
5169
- Button = React92__default.forwardRef(
5169
+ Button = React93__default.forwardRef(
5170
5170
  ({
5171
5171
  className,
5172
5172
  variant = "primary",
@@ -5236,7 +5236,7 @@ var Dialog;
5236
5236
  var init_Dialog = __esm({
5237
5237
  "components/core/atoms/Dialog.tsx"() {
5238
5238
  init_cn();
5239
- Dialog = React92__default.forwardRef(
5239
+ Dialog = React93__default.forwardRef(
5240
5240
  ({
5241
5241
  role = "dialog",
5242
5242
  "aria-modal": ariaModal = true,
@@ -5799,7 +5799,7 @@ var init_Badge = __esm({
5799
5799
  md: "px-2.5 py-1 text-sm",
5800
5800
  lg: "px-3 py-1.5 text-base"
5801
5801
  };
5802
- Badge = React92__default.forwardRef(
5802
+ Badge = React93__default.forwardRef(
5803
5803
  ({ className, variant = "default", size = "sm", amount, label, icon, iconAsset, children, onRemove, removeLabel, ...props }, ref) => {
5804
5804
  const iconSizes3 = {
5805
5805
  sm: "h-icon-default w-icon-default",
@@ -6149,7 +6149,7 @@ var init_SvgFlow = __esm({
6149
6149
  width = 100,
6150
6150
  height = 100
6151
6151
  }) => {
6152
- const markerId = React92__default.useMemo(() => {
6152
+ const markerId = React93__default.useMemo(() => {
6153
6153
  flowIdCounter += 1;
6154
6154
  return `almadar-flow-arrow-${flowIdCounter}`;
6155
6155
  }, []);
@@ -6742,7 +6742,7 @@ var init_SvgRing = __esm({
6742
6742
  width = 100,
6743
6743
  height = 100
6744
6744
  }) => {
6745
- const gradientId = React92__default.useMemo(() => {
6745
+ const gradientId = React93__default.useMemo(() => {
6746
6746
  ringIdCounter += 1;
6747
6747
  return `almadar-ring-glow-${ringIdCounter}`;
6748
6748
  }, []);
@@ -6923,7 +6923,7 @@ var init_Input = __esm({
6923
6923
  init_cn();
6924
6924
  init_Icon();
6925
6925
  init_useEventBus();
6926
- Input = React92__default.forwardRef(
6926
+ Input = React93__default.forwardRef(
6927
6927
  ({
6928
6928
  className,
6929
6929
  inputType,
@@ -6947,9 +6947,9 @@ var init_Input = __esm({
6947
6947
  const eventBus = useEventBus();
6948
6948
  const type = inputType || htmlType || "text";
6949
6949
  const isDeclarative = typeof onChange === "string";
6950
- const [localValue, setLocalValue] = React92__default.useState(value);
6951
- const pendingEchoRef = React92__default.useRef(/* @__PURE__ */ new Set());
6952
- React92__default.useEffect(() => {
6950
+ const [localValue, setLocalValue] = React93__default.useState(value);
6951
+ const pendingEchoRef = React93__default.useRef(/* @__PURE__ */ new Set());
6952
+ React93__default.useEffect(() => {
6953
6953
  if (!isDeclarative) return;
6954
6954
  const incoming = value == null ? "" : String(value);
6955
6955
  if (pendingEchoRef.current.has(incoming)) {
@@ -7109,7 +7109,7 @@ var Label;
7109
7109
  var init_Label = __esm({
7110
7110
  "components/core/atoms/Label.tsx"() {
7111
7111
  init_cn();
7112
- Label = React92__default.forwardRef(
7112
+ Label = React93__default.forwardRef(
7113
7113
  ({ className, required, children, ...props }, ref) => {
7114
7114
  return /* @__PURE__ */ jsxs(
7115
7115
  "label",
@@ -7136,7 +7136,7 @@ var init_Textarea = __esm({
7136
7136
  "components/core/atoms/Textarea.tsx"() {
7137
7137
  init_cn();
7138
7138
  init_useEventBus();
7139
- Textarea = React92__default.forwardRef(
7139
+ Textarea = React93__default.forwardRef(
7140
7140
  ({ className, error, onChange, ...props }, ref) => {
7141
7141
  const eventBus = useEventBus();
7142
7142
  const handleChange = (e) => {
@@ -7375,7 +7375,7 @@ var init_Select = __esm({
7375
7375
  init_cn();
7376
7376
  init_Icon();
7377
7377
  init_useEventBus();
7378
- Select = React92__default.forwardRef(
7378
+ Select = React93__default.forwardRef(
7379
7379
  (props, _ref) => {
7380
7380
  const { multiple, searchable, clearable } = props;
7381
7381
  if (multiple || searchable || clearable) {
@@ -7392,7 +7392,7 @@ var init_Checkbox = __esm({
7392
7392
  "components/core/atoms/Checkbox.tsx"() {
7393
7393
  init_cn();
7394
7394
  init_useEventBus();
7395
- Checkbox = React92__default.forwardRef(
7395
+ Checkbox = React93__default.forwardRef(
7396
7396
  ({ className, label, id, onChange, ...props }, ref) => {
7397
7397
  const inputId = id || `checkbox-${Math.random().toString(36).substr(2, 9)}`;
7398
7398
  const eventBus = useEventBus();
@@ -7446,7 +7446,7 @@ var init_Spinner = __esm({
7446
7446
  md: "h-6 w-6",
7447
7447
  lg: "h-8 w-8"
7448
7448
  };
7449
- Spinner = React92__default.forwardRef(
7449
+ Spinner = React93__default.forwardRef(
7450
7450
  ({ className, size = "md", overlay, ...props }, ref) => {
7451
7451
  if (overlay) {
7452
7452
  return /* @__PURE__ */ jsx(
@@ -7536,7 +7536,7 @@ var init_Card = __esm({
7536
7536
  chip: "shadow-none rounded-pill border-[length:var(--border-width)] border-border",
7537
7537
  "tile-image-first": "p-0 overflow-hidden"
7538
7538
  };
7539
- Card = React92__default.forwardRef(
7539
+ Card = React93__default.forwardRef(
7540
7540
  ({
7541
7541
  className,
7542
7542
  variant = "bordered",
@@ -7585,9 +7585,9 @@ var init_Card = __esm({
7585
7585
  }
7586
7586
  );
7587
7587
  Card.displayName = "Card";
7588
- CardHeader = React92__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
7588
+ CardHeader = React93__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("mb-4", className), ...props }));
7589
7589
  CardHeader.displayName = "CardHeader";
7590
- CardTitle = React92__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7590
+ CardTitle = React93__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7591
7591
  "h3",
7592
7592
  {
7593
7593
  ref,
@@ -7600,11 +7600,11 @@ var init_Card = __esm({
7600
7600
  }
7601
7601
  ));
7602
7602
  CardTitle.displayName = "CardTitle";
7603
- CardContent = React92__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
7603
+ CardContent = React93__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props }));
7604
7604
  CardContent.displayName = "CardContent";
7605
7605
  CardBody = CardContent;
7606
7606
  CardBody.displayName = "CardBody";
7607
- CardFooter = React92__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7607
+ CardFooter = React93__default.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
7608
7608
  "div",
7609
7609
  {
7610
7610
  ref,
@@ -7691,7 +7691,7 @@ var init_FilterPill = __esm({
7691
7691
  md: "w-3.5 h-3.5",
7692
7692
  lg: "w-4 h-4"
7693
7693
  };
7694
- FilterPill = React92__default.forwardRef(
7694
+ FilterPill = React93__default.forwardRef(
7695
7695
  ({
7696
7696
  className,
7697
7697
  variant = "default",
@@ -7820,8 +7820,8 @@ var init_Avatar = __esm({
7820
7820
  actionPayload
7821
7821
  }) => {
7822
7822
  const eventBus = useEventBus();
7823
- const [imgFailed, setImgFailed] = React92__default.useState(false);
7824
- React92__default.useEffect(() => {
7823
+ const [imgFailed, setImgFailed] = React93__default.useState(false);
7824
+ React93__default.useEffect(() => {
7825
7825
  setImgFailed(false);
7826
7826
  }, [src]);
7827
7827
  const initials = providedInitials ?? (name ? generateInitials(name) : void 0);
@@ -7934,7 +7934,7 @@ var init_Center = __esm({
7934
7934
  as: Component = "div"
7935
7935
  }) => {
7936
7936
  const mergedStyle = minHeight ? { minHeight, ...style } : style;
7937
- return React92__default.createElement(Component, {
7937
+ return React93__default.createElement(Component, {
7938
7938
  className: cn(
7939
7939
  inline ? "inline-flex" : "flex",
7940
7940
  horizontal && "justify-center",
@@ -8202,7 +8202,7 @@ var init_Radio = __esm({
8202
8202
  md: "w-2.5 h-2.5",
8203
8203
  lg: "w-3 h-3"
8204
8204
  };
8205
- Radio = React92__default.forwardRef(
8205
+ Radio = React93__default.forwardRef(
8206
8206
  ({
8207
8207
  label,
8208
8208
  helperText,
@@ -8219,12 +8219,12 @@ var init_Radio = __esm({
8219
8219
  onChange,
8220
8220
  ...props
8221
8221
  }, ref) => {
8222
- const reactId = React92__default.useId();
8222
+ const reactId = React93__default.useId();
8223
8223
  const baseId = id || `radio-${reactId}`;
8224
8224
  const hasError = !!error;
8225
8225
  const eventBus = useEventBus();
8226
- const [selected, setSelected] = React92__default.useState(value);
8227
- React92__default.useEffect(() => {
8226
+ const [selected, setSelected] = React93__default.useState(value);
8227
+ React93__default.useEffect(() => {
8228
8228
  if (value !== void 0) setSelected(value);
8229
8229
  }, [value]);
8230
8230
  const pick = (next, e) => {
@@ -8406,7 +8406,7 @@ var init_Switch = __esm({
8406
8406
  "components/core/atoms/Switch.tsx"() {
8407
8407
  "use client";
8408
8408
  init_cn();
8409
- Switch = React92.forwardRef(
8409
+ Switch = React93.forwardRef(
8410
8410
  ({
8411
8411
  checked,
8412
8412
  defaultChecked = false,
@@ -8417,10 +8417,10 @@ var init_Switch = __esm({
8417
8417
  name,
8418
8418
  className
8419
8419
  }, ref) => {
8420
- const [isChecked, setIsChecked] = React92.useState(
8420
+ const [isChecked, setIsChecked] = React93.useState(
8421
8421
  checked !== void 0 ? checked : defaultChecked
8422
8422
  );
8423
- React92.useEffect(() => {
8423
+ React93.useEffect(() => {
8424
8424
  if (checked !== void 0) {
8425
8425
  setIsChecked(checked);
8426
8426
  }
@@ -8698,7 +8698,7 @@ var Aside;
8698
8698
  var init_Aside = __esm({
8699
8699
  "components/core/atoms/Aside.tsx"() {
8700
8700
  init_cn();
8701
- Aside = React92__default.forwardRef(
8701
+ Aside = React93__default.forwardRef(
8702
8702
  ({ className, children, ...rest }, ref) => /* @__PURE__ */ jsx("aside", { ref, className: cn(className), ...rest, children })
8703
8703
  );
8704
8704
  Aside.displayName = "Aside";
@@ -8777,9 +8777,9 @@ var init_LawReferenceTooltip = __esm({
8777
8777
  className
8778
8778
  }) => {
8779
8779
  const { t } = useTranslate();
8780
- const [isVisible, setIsVisible] = React92__default.useState(false);
8781
- const timeoutRef = React92__default.useRef(null);
8782
- const triggerRef = React92__default.useRef(null);
8780
+ const [isVisible, setIsVisible] = React93__default.useState(false);
8781
+ const timeoutRef = React93__default.useRef(null);
8782
+ const triggerRef = React93__default.useRef(null);
8783
8783
  const handleMouseEnter = () => {
8784
8784
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8785
8785
  timeoutRef.current = setTimeout(() => setIsVisible(true), 200);
@@ -8790,7 +8790,7 @@ var init_LawReferenceTooltip = __esm({
8790
8790
  };
8791
8791
  const { revealed, triggerProps } = useTapReveal({ refs: [triggerRef] });
8792
8792
  const open = isVisible || revealed;
8793
- React92__default.useEffect(() => {
8793
+ React93__default.useEffect(() => {
8794
8794
  return () => {
8795
8795
  if (timeoutRef.current) clearTimeout(timeoutRef.current);
8796
8796
  };
@@ -9000,7 +9000,7 @@ var init_StatusDot = __esm({
9000
9000
  md: "w-2.5 h-2.5",
9001
9001
  lg: "w-3 h-3"
9002
9002
  };
9003
- StatusDot = React92__default.forwardRef(
9003
+ StatusDot = React93__default.forwardRef(
9004
9004
  ({ className, status = "offline", pulse = false, size = "md", label, ...props }, ref) => {
9005
9005
  return /* @__PURE__ */ jsx(
9006
9006
  "span",
@@ -9054,7 +9054,7 @@ var init_TrendIndicator = __esm({
9054
9054
  down: "trending-down",
9055
9055
  flat: "arrow-right"
9056
9056
  };
9057
- TrendIndicator = React92__default.forwardRef(
9057
+ TrendIndicator = React93__default.forwardRef(
9058
9058
  ({
9059
9059
  className,
9060
9060
  value,
@@ -9123,7 +9123,7 @@ var init_RangeSlider = __esm({
9123
9123
  md: "w-4 h-4",
9124
9124
  lg: "w-5 h-5"
9125
9125
  };
9126
- RangeSlider = React92__default.forwardRef(
9126
+ RangeSlider = React93__default.forwardRef(
9127
9127
  ({
9128
9128
  className,
9129
9129
  min = 0,
@@ -9734,7 +9734,7 @@ var init_ContentSection = __esm({
9734
9734
  md: "py-16",
9735
9735
  lg: "py-24"
9736
9736
  };
9737
- ContentSection = React92__default.forwardRef(
9737
+ ContentSection = React93__default.forwardRef(
9738
9738
  ({ children, background = "default", padding = "lg", id, className }, ref) => {
9739
9739
  return /* @__PURE__ */ jsx(
9740
9740
  Box,
@@ -10268,7 +10268,7 @@ var init_AnimatedReveal = __esm({
10268
10268
  "scale-up": { opacity: 1, transform: "scale(1) translateY(0)" },
10269
10269
  "none": {}
10270
10270
  };
10271
- AnimatedReveal = React92__default.forwardRef(
10271
+ AnimatedReveal = React93__default.forwardRef(
10272
10272
  ({
10273
10273
  trigger = "scroll",
10274
10274
  animation = "fade-up",
@@ -10428,7 +10428,7 @@ var init_AnimatedGraphic = __esm({
10428
10428
  "components/marketing/atoms/AnimatedGraphic.tsx"() {
10429
10429
  "use client";
10430
10430
  init_cn();
10431
- AnimatedGraphic = React92__default.forwardRef(
10431
+ AnimatedGraphic = React93__default.forwardRef(
10432
10432
  ({
10433
10433
  src,
10434
10434
  svgContent,
@@ -10451,7 +10451,7 @@ var init_AnimatedGraphic = __esm({
10451
10451
  const fetchedSvg = useFetchedSvg(svgContent ? void 0 : src);
10452
10452
  const resolvedSvg = svgContent ?? fetchedSvg;
10453
10453
  const prevAnimateRef = useRef(animate);
10454
- const setRef = React92__default.useCallback(
10454
+ const setRef = React93__default.useCallback(
10455
10455
  (node) => {
10456
10456
  containerRef.current = node;
10457
10457
  if (typeof ref === "function") ref(node);
@@ -11178,9 +11178,9 @@ function ControlButton({
11178
11178
  className
11179
11179
  }) {
11180
11180
  const eventBus = useEventBus();
11181
- const [isPressed, setIsPressed] = React92.useState(false);
11181
+ const [isPressed, setIsPressed] = React93.useState(false);
11182
11182
  const actualPressed = pressed ?? isPressed;
11183
- const handlePointerDown = React92.useCallback(
11183
+ const handlePointerDown = React93.useCallback(
11184
11184
  (e) => {
11185
11185
  e.preventDefault();
11186
11186
  if (disabled) return;
@@ -11190,7 +11190,7 @@ function ControlButton({
11190
11190
  },
11191
11191
  [disabled, pressEvent, eventBus, onPress]
11192
11192
  );
11193
- const handlePointerUp = React92.useCallback(
11193
+ const handlePointerUp = React93.useCallback(
11194
11194
  (e) => {
11195
11195
  e.preventDefault();
11196
11196
  if (disabled) return;
@@ -11200,7 +11200,7 @@ function ControlButton({
11200
11200
  },
11201
11201
  [disabled, releaseEvent, eventBus, onRelease]
11202
11202
  );
11203
- const handlePointerLeave = React92.useCallback(
11203
+ const handlePointerLeave = React93.useCallback(
11204
11204
  (e) => {
11205
11205
  if (isPressed) {
11206
11206
  setIsPressed(false);
@@ -11458,8 +11458,8 @@ function ControlGrid({
11458
11458
  className
11459
11459
  }) {
11460
11460
  const eventBus = useEventBus();
11461
- const [active, setActive] = React92.useState(/* @__PURE__ */ new Set());
11462
- const handlePress = React92.useCallback(
11461
+ const [active, setActive] = React93.useState(/* @__PURE__ */ new Set());
11462
+ const handlePress = React93.useCallback(
11463
11463
  (id) => {
11464
11464
  setActive((prev) => new Set(prev).add(id));
11465
11465
  if (actionEvent) eventBus.emit(`UI:${actionEvent}`, { id, pressed: true });
@@ -11473,7 +11473,7 @@ function ControlGrid({
11473
11473
  },
11474
11474
  [kind, actionEvent, directionEvent, directionEvents, eventBus, onAction, onDirection]
11475
11475
  );
11476
- const handleRelease = React92.useCallback(
11476
+ const handleRelease = React93.useCallback(
11477
11477
  (id) => {
11478
11478
  setActive((prev) => {
11479
11479
  const next = new Set(prev);
@@ -11831,7 +11831,7 @@ function GameMenu({
11831
11831
  }) {
11832
11832
  const resolvedOptions = (options?.length ? options : void 0) ?? (menuItems?.length ? menuItems : void 0) ?? DEFAULT_MENU_OPTIONS;
11833
11833
  const eventBus = useEventBus();
11834
- const handleOptionClick = React92.useCallback(
11834
+ const handleOptionClick = React93.useCallback(
11835
11835
  (option) => {
11836
11836
  if (option.event) {
11837
11837
  eventBus.emit(`UI:${option.event}`, { option });
@@ -12067,7 +12067,7 @@ function StateGraph({
12067
12067
  }) {
12068
12068
  const eventBus = useEventBus();
12069
12069
  const nodes = states ?? [];
12070
- const positions = React92.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
12070
+ const positions = React93.useMemo(() => layoutStates(nodes, width, height), [nodes, width, height]);
12071
12071
  return /* @__PURE__ */ jsxs(
12072
12072
  Box,
12073
12073
  {
@@ -12138,8 +12138,8 @@ function MiniMap({
12138
12138
  tileAssets,
12139
12139
  unitAssets
12140
12140
  }) {
12141
- const canvasRef = React92.useRef(null);
12142
- const imgCacheRef = React92.useRef(/* @__PURE__ */ new Map());
12141
+ const canvasRef = React93.useRef(null);
12142
+ const imgCacheRef = React93.useRef(/* @__PURE__ */ new Map());
12143
12143
  function loadImg(url) {
12144
12144
  const cached = imgCacheRef.current.get(url);
12145
12145
  if (cached) return cached.complete ? cached : null;
@@ -12155,7 +12155,7 @@ function MiniMap({
12155
12155
  imgCacheRef.current.set(url, img);
12156
12156
  return null;
12157
12157
  }
12158
- React92.useEffect(() => {
12158
+ React93.useEffect(() => {
12159
12159
  const canvas = canvasRef.current;
12160
12160
  if (!canvas) return;
12161
12161
  const ctx = canvas.getContext("2d");
@@ -12502,19 +12502,12 @@ var init_useCanvasGestures = __esm({
12502
12502
  });
12503
12503
 
12504
12504
  // lib/imageCache.ts
12505
- function getOrLoadImage(url, onReady) {
12506
- if (!url || typeof window === "undefined") return null;
12507
- const existing = cache.get(url);
12508
- if (existing) {
12509
- if (existing.status === "loaded") return existing.img;
12510
- if (existing.status === "pending" && onReady) existing.onReady = onReady;
12511
- return null;
12512
- }
12505
+ function startLoad(url, onReady, existing) {
12513
12506
  const img = new Image();
12514
12507
  img.crossOrigin = "anonymous";
12515
- const entry = { img, status: "pending", onReady };
12516
- cache.set(url, entry);
12517
- updateAssetStatus(url, "pending");
12508
+ const entry = existing ?? { img, status: "pending" };
12509
+ entry.img = img;
12510
+ if (onReady) entry.onReady = onReady;
12518
12511
  img.onload = () => {
12519
12512
  entry.status = "loaded";
12520
12513
  updateAssetStatus(url, "loaded");
@@ -12522,20 +12515,39 @@ function getOrLoadImage(url, onReady) {
12522
12515
  };
12523
12516
  img.onerror = () => {
12524
12517
  entry.status = "failed";
12518
+ entry.failedAt = Date.now();
12525
12519
  updateAssetStatus(url, "failed");
12526
12520
  entry.onReady?.();
12527
12521
  };
12528
12522
  img.src = url;
12523
+ return entry;
12524
+ }
12525
+ function getOrLoadImage(url, onReady) {
12526
+ if (!url || typeof window === "undefined") return null;
12527
+ const existing = cache.get(url);
12528
+ if (existing) {
12529
+ if (existing.status === "loaded") return existing.img;
12530
+ if (existing.status === "pending" && onReady) existing.onReady = onReady;
12531
+ if (existing.status === "failed" && Date.now() - (existing.failedAt ?? 0) >= RETRY_AFTER_MS) {
12532
+ existing.failedAt = Date.now();
12533
+ startLoad(url, onReady, existing);
12534
+ }
12535
+ return null;
12536
+ }
12537
+ const entry = startLoad(url, onReady);
12538
+ cache.set(url, entry);
12539
+ updateAssetStatus(url, "pending");
12529
12540
  return null;
12530
12541
  }
12531
12542
  function getImageStatus(url) {
12532
12543
  return cache.get(url)?.status;
12533
12544
  }
12534
- var cache;
12545
+ var RETRY_AFTER_MS, cache;
12535
12546
  var init_imageCache = __esm({
12536
12547
  "lib/imageCache.ts"() {
12537
12548
  "use client";
12538
12549
  init_verificationRegistry();
12550
+ RETRY_AFTER_MS = 5e3;
12539
12551
  cache = /* @__PURE__ */ new Map();
12540
12552
  }
12541
12553
  });
@@ -12718,6 +12730,21 @@ var init_projector = __esm({
12718
12730
  function isValidScenePos(pos) {
12719
12731
  return Number.isFinite(pos?.x) && Number.isFinite(pos?.y);
12720
12732
  }
12733
+ function spriteRect(projector, node, natural) {
12734
+ const tw = projector.tileWidth;
12735
+ const fallbackW = projector.worldPixelDirect ? natural?.w ?? 0 : tw;
12736
+ const fallbackH = projector.worldPixelDirect ? natural?.h ?? 0 : tw;
12737
+ const w = node.width !== void 0 ? node.width * tw : fallbackW;
12738
+ const h = node.height !== void 0 ? node.height * tw : fallbackH;
12739
+ const anchor = node.anchor ?? "top-left";
12740
+ const p = projector.anchorPoint(node.position, anchor);
12741
+ return {
12742
+ x: anchor === "top-left" ? p.x : p.x - w / 2,
12743
+ y: anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y,
12744
+ w,
12745
+ h
12746
+ };
12747
+ }
12721
12748
  var init_contract = __esm({
12722
12749
  "lib/drawable/contract.ts"() {
12723
12750
  }
@@ -12732,16 +12759,11 @@ function paintFallbackSquare(painter, node, dctx, reason) {
12732
12759
  warnMissingOnce(reason, node);
12733
12760
  const tw = dctx.projector.tileWidth;
12734
12761
  const natural = dctx.projector.worldPixelDirect ? FALLBACK_WORLD_PX : tw;
12735
- const w = node.width !== void 0 ? node.width * tw : natural;
12736
- const h = node.height !== void 0 ? node.height * tw : natural;
12737
- const anchor = node.anchor ?? "top-left";
12738
- const p = dctx.projector.anchorPoint(node.position, anchor);
12739
- const dx = anchor === "top-left" ? p.x : p.x - w / 2;
12740
- const dy = anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y;
12762
+ const rect = spriteRect(dctx.projector, node, { w: natural, h: natural });
12741
12763
  painter.save();
12742
12764
  if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
12743
- painter.fillRect(dx, dy, w, h, "#9b8f7f");
12744
- painter.strokeRect(dx, dy, w, h, "#5e564b", Math.max(1, tw / 32));
12765
+ painter.fillRect(rect.x, rect.y, rect.w, rect.h, "#9b8f7f");
12766
+ painter.strokeRect(rect.x, rect.y, rect.w, rect.h, "#5e564b", Math.max(1, tw / 32));
12745
12767
  painter.restore();
12746
12768
  }
12747
12769
  function DrawSprite(_props) {
@@ -12778,15 +12800,10 @@ var init_DrawSprite = __esm({
12778
12800
  }
12779
12801
  src = { x: r2.sx, y: r2.sy, w: r2.sw, h: r2.sh };
12780
12802
  }
12781
- const tw = dctx.projector.tileWidth;
12782
- const fallbackW = dctx.projector.worldPixelDirect ? src ? src.w : tex.width : tw;
12783
- const fallbackH = dctx.projector.worldPixelDirect ? src ? src.h : tex.height : tw;
12784
- const w = node.width !== void 0 ? node.width * tw : fallbackW;
12785
- const h = node.height !== void 0 ? node.height * tw : fallbackH;
12786
- const anchor = node.anchor ?? "top-left";
12787
- const p = dctx.projector.anchorPoint(node.position, anchor);
12788
- const dx = anchor === "top-left" ? p.x : p.x - w / 2;
12789
- const dy = anchor === "ground" ? p.y - h : anchor === "center" ? p.y - h / 2 : p.y;
12803
+ const rect = spriteRect(dctx.projector, node, src ? { w: src.w, h: src.h } : { w: tex.width, h: tex.height });
12804
+ const { w, h } = rect;
12805
+ const dx = rect.x;
12806
+ const dy = rect.y;
12790
12807
  painter.save();
12791
12808
  if (node.opacity !== void 0 && node.opacity !== 1) painter.setAlpha(node.opacity);
12792
12809
  if (node.shadow) painter.setShadow(node.shadow);
@@ -12808,9 +12825,24 @@ var init_DrawSprite = __esm({
12808
12825
  };
12809
12826
  }
12810
12827
  });
12811
-
12812
- // components/game/atoms/DrawShape.tsx
12813
- function DrawShape(_props) {
12828
+ var DrawableRegistryContext;
12829
+ var init_registry = __esm({
12830
+ "lib/drawable/registry.ts"() {
12831
+ DrawableRegistryContext = createContext(null);
12832
+ }
12833
+ });
12834
+ function DrawShape(props) {
12835
+ const register = useContext(DrawableRegistryContext);
12836
+ if (register) {
12837
+ const { opacity, ...rest } = props;
12838
+ const node = {
12839
+ ...rest,
12840
+ type: "draw-shape",
12841
+ ...opacity !== void 0 && opacity > 0 ? { opacity } : {}
12842
+ };
12843
+ register(node);
12844
+ return /* @__PURE__ */ jsx("div", { "data-draw-shape-debug": "", style: { position: "absolute", width: 4, height: 4, background: "red", zIndex: 9999 } });
12845
+ }
12814
12846
  return null;
12815
12847
  }
12816
12848
  var paintShape;
@@ -12818,6 +12850,7 @@ var init_DrawShape = __esm({
12818
12850
  "components/game/atoms/DrawShape.tsx"() {
12819
12851
  "use client";
12820
12852
  init_contract();
12853
+ init_registry();
12821
12854
  paintShape = (painter, node, dctx) => {
12822
12855
  if (!isValidScenePos(node.position)) return;
12823
12856
  painter.save();
@@ -13002,12 +13035,18 @@ function collectDrawnItems(nodes) {
13002
13035
  for (const n of nodes) {
13003
13036
  switch (n.type) {
13004
13037
  case "draw-sprite":
13038
+ if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id, anchor: n.anchor, width: n.width, height: n.height });
13039
+ break;
13005
13040
  case "draw-shape":
13006
13041
  case "draw-text":
13007
13042
  case "draw-group":
13008
13043
  if (isValidScenePos(n.position)) out.push({ pos: n.position, id: n.id });
13009
13044
  break;
13010
13045
  case "draw-sprite-layer":
13046
+ for (const it of n.items) {
13047
+ if (isValidScenePos(it.position)) out.push({ pos: it.position, id: it.id, anchor: it.anchor, width: it.width, height: it.height });
13048
+ }
13049
+ break;
13011
13050
  case "draw-shape-layer":
13012
13051
  case "draw-text-layer":
13013
13052
  for (const it of n.items) {
@@ -13025,6 +13064,15 @@ function buildHitIndex(items) {
13025
13064
  }
13026
13065
  return m;
13027
13066
  }
13067
+ function hitTestSprites(items, projector, point) {
13068
+ for (let i = items.length - 1; i >= 0; i--) {
13069
+ const it = items[i];
13070
+ if (it.id === void 0) continue;
13071
+ const r2 = spriteRect(projector, { position: it.pos, anchor: it.anchor, width: it.width, height: it.height });
13072
+ if (point.x >= r2.x && point.x <= r2.x + r2.w && point.y >= r2.y && point.y <= r2.y + r2.h) return it.id;
13073
+ }
13074
+ return void 0;
13075
+ }
13028
13076
  var init_hitTest = __esm({
13029
13077
  "lib/drawable/hitTest.ts"() {
13030
13078
  init_contract();
@@ -13053,9 +13101,17 @@ function Canvas2D({
13053
13101
  showMinimap = true,
13054
13102
  followTarget,
13055
13103
  cameraPos,
13056
- bgColor
13104
+ bgColor,
13105
+ children
13057
13106
  }) {
13058
13107
  const instanceId = useMemo(() => Math.random().toString(36).slice(2, 8), []);
13108
+ const childDrawablesRef = useRef([]);
13109
+ childDrawablesRef.current = [];
13110
+ const registerChildDrawable = useCallback((node) => {
13111
+ childDrawablesRef.current.push(node);
13112
+ }, []);
13113
+ const hasJsxChildren = React93.Children.count(children) > 0;
13114
+ drawables && drawables.length > 0 ? drawables : childDrawablesRef.current;
13059
13115
  function isDrawableLayer(node) {
13060
13116
  return node.type === "draw-sprite-layer" || node.type === "draw-shape-layer" || node.type === "draw-text-layer";
13061
13117
  }
@@ -13238,7 +13294,19 @@ function Canvas2D({
13238
13294
  ctx.fillStyle = bgColor ?? BACKGROUND_FALLBACK_COLOR;
13239
13295
  ctx.fillRect(0, 0, viewportSize.width, viewportSize.height);
13240
13296
  }
13241
- if (!drawables || drawables.length === 0) return;
13297
+ if (!drawables || drawables.length === 0) {
13298
+ const childDrawables = childDrawablesRef.current;
13299
+ if (childDrawables.length === 0) return;
13300
+ const painter0 = createWebPainter(ctx, bumpAtlas);
13301
+ painter0.save();
13302
+ painter0.translate(viewportSize.width / 2, viewportSize.height / 2);
13303
+ painter0.scale(cameraRef.current.zoom, cameraRef.current.zoom);
13304
+ painter0.translate(-viewportSize.width / 2, -viewportSize.height / 2);
13305
+ const dctx0 = { projector, time: 0, invalidate: bumpAtlas };
13306
+ for (const node of childDrawables) paintDrawable(painter0, node, dctx0);
13307
+ painter0.restore();
13308
+ return;
13309
+ }
13242
13310
  const cam = cameraRef.current;
13243
13311
  if (camera !== "follow" && dragDistance() === 0) {
13244
13312
  const focus = cameraPos ?? defaultGridFocus;
@@ -13322,6 +13390,11 @@ function Canvas2D({
13322
13390
  if (dragDistance() > 5) return;
13323
13391
  if (!canvasRef.current || !tileClickEvent && !unitClickEvent) return;
13324
13392
  const world = screenToWorld(e.clientX, e.clientY, canvasRef.current, viewportSize);
13393
+ const spriteHit = unitClickEvent ? hitTestSprites(drawnItems, projector, world) : void 0;
13394
+ if (spriteHit !== void 0 && unitClickEvent) {
13395
+ eventBus.emit(`UI:${unitClickEvent}`, { unitId: spriteHit });
13396
+ return;
13397
+ }
13325
13398
  const adjustedX = world.x - scaledTileWidth / 2;
13326
13399
  const adjustedY = squareGrid ? world.y - scaledTileWidth / 2 : world.y - scaledDiamondTopY - scaledFloorHeight / 2;
13327
13400
  const isoPos = unproject(adjustedX, adjustedY);
@@ -13331,7 +13404,7 @@ function Canvas2D({
13331
13404
  } else if (tileClickEvent) {
13332
13405
  eventBus.emit(`UI:${tileClickEvent}`, { x: isoPos.x, y: isoPos.y });
13333
13406
  }
13334
- }, [enableCamera, handlePointerUp, dragDistance, screenToWorld, viewportSize, scaledTileWidth, squareGrid, scaledDiamondTopY, scaledFloorHeight, unproject, hitIndex, tileClickEvent, unitClickEvent, eventBus]);
13407
+ }, [enableCamera, handlePointerUp, dragDistance, screenToWorld, viewportSize, scaledTileWidth, squareGrid, scaledDiamondTopY, scaledFloorHeight, unproject, hitIndex, drawnItems, projector, tileClickEvent, unitClickEvent, eventBus]);
13335
13408
  const handleCanvasPointerLeave = useCallback(() => {
13336
13409
  handleMouseLeave();
13337
13410
  if (tileLeaveEvent) eventBus.emit(`UI:${tileLeaveEvent}`, {});
@@ -13401,7 +13474,7 @@ function Canvas2D({
13401
13474
  /* @__PURE__ */ jsx(Typography, { variant: "body", className: "text-muted-foreground", children: t("canvas.loadingMessage") || "Loading\u2026" })
13402
13475
  ] }) });
13403
13476
  }
13404
- if (!drawables || drawables.length === 0) {
13477
+ if ((!drawables || drawables.length === 0) && !hasJsxChildren) {
13405
13478
  return /* @__PURE__ */ jsx(
13406
13479
  Box,
13407
13480
  {
@@ -13415,7 +13488,7 @@ function Canvas2D({
13415
13488
  }
13416
13489
  );
13417
13490
  }
13418
- return /* @__PURE__ */ jsxs(
13491
+ return /* @__PURE__ */ jsx(DrawableRegistryContext.Provider, { value: registerChildDrawable, children: /* @__PURE__ */ jsxs(
13419
13492
  Box,
13420
13493
  {
13421
13494
  ref: containerRef,
@@ -13476,10 +13549,19 @@ function Canvas2D({
13476
13549
  mapWidth: miniMapWidth,
13477
13550
  mapHeight: miniMapHeight
13478
13551
  }
13479
- ) })
13552
+ ) }),
13553
+ hasJsxChildren && /* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: { position: "absolute", width: 0, height: 0, overflow: "hidden" }, children }),
13554
+ /* @__PURE__ */ jsxs("div", { "data-debug": "", style: { position: "absolute", top: 0, left: 0, background: "yellow", color: "black", zIndex: 9999, fontSize: 24, padding: 8 }, children: [
13555
+ "C=",
13556
+ React93.Children.count(children),
13557
+ " J=",
13558
+ String(hasJsxChildren),
13559
+ " D=",
13560
+ drawables?.length ?? -1
13561
+ ] })
13480
13562
  ]
13481
13563
  }
13482
- );
13564
+ ) });
13483
13565
  }
13484
13566
  var canvas2DLog;
13485
13567
  var init_Canvas2D = __esm({
@@ -13501,6 +13583,7 @@ var init_Canvas2D = __esm({
13501
13583
  init_webPainter2d();
13502
13584
  init_projector();
13503
13585
  init_paintDispatch();
13586
+ init_registry();
13504
13587
  init_hitTest();
13505
13588
  init_isometric();
13506
13589
  canvas2DLog = createLogger("almadar:ui:game-canvas");
@@ -13542,7 +13625,8 @@ function Canvas({
13542
13625
  tileLeaveEvent,
13543
13626
  featureClickEvent,
13544
13627
  keyMap,
13545
- keyUpMap
13628
+ keyUpMap,
13629
+ children
13546
13630
  }) {
13547
13631
  canvasLog.debug("Canvas render", { mode, drawablesCount: drawables?.length, projection, camera: camera ? JSON.stringify(camera) : void 0 });
13548
13632
  const zoom = camera?.zoom;
@@ -13595,7 +13679,8 @@ function Canvas({
13595
13679
  tileHoverEvent,
13596
13680
  tileLeaveEvent,
13597
13681
  keyMap,
13598
- keyUpMap
13682
+ keyUpMap,
13683
+ ...children !== void 0 ? { children } : {}
13599
13684
  }
13600
13685
  );
13601
13686
  }
@@ -13727,7 +13812,7 @@ function LinearView({
13727
13812
  /* @__PURE__ */ jsx(HStack, { className: "flex-wrap items-center", gap: "xs", children: trait.states.map((state, i) => {
13728
13813
  const isDone = i < currentIdx;
13729
13814
  const isCurrent = i === currentIdx;
13730
- return /* @__PURE__ */ jsxs(React92__default.Fragment, { children: [
13815
+ return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
13731
13816
  i > 0 && /* @__PURE__ */ jsx(
13732
13817
  Typography,
13733
13818
  {
@@ -14262,7 +14347,7 @@ function SequenceBar({
14262
14347
  else onSlotRemove?.(index);
14263
14348
  }, [emit, slotRemoveEvent, onSlotRemove, playing]);
14264
14349
  const paddedSlots = Array.from({ length: maxSlots }, (_, i) => slots[i]);
14265
- return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React92__default.Fragment, { children: [
14350
+ return /* @__PURE__ */ jsx(HStack, { className: cn("items-center", className), gap: "sm", children: paddedSlots.map((slot, i) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
14266
14351
  i > 0 && /* @__PURE__ */ jsx(
14267
14352
  Typography,
14268
14353
  {
@@ -14911,7 +14996,7 @@ var init_ErrorBoundary = __esm({
14911
14996
  }
14912
14997
  );
14913
14998
  };
14914
- ErrorBoundary = class extends React92__default.Component {
14999
+ ErrorBoundary = class extends React93__default.Component {
14915
15000
  constructor(props) {
14916
15001
  super(props);
14917
15002
  __publicField(this, "reset", () => {
@@ -15180,7 +15265,7 @@ var init_Container = __esm({
15180
15265
  as: Component = "div"
15181
15266
  }) => {
15182
15267
  const resolvedSize = maxWidth ?? size ?? "lg";
15183
- return React92__default.createElement(
15268
+ return React93__default.createElement(
15184
15269
  Component,
15185
15270
  {
15186
15271
  className: cn(
@@ -17318,7 +17403,7 @@ var init_CodeBlock = __esm({
17318
17403
  DIFF_STYLE_FALLBACK = { bg: "", prefix: " ", text: "text-foreground" };
17319
17404
  LINE_PROPS_FN = (n) => ({ "data-line": String(n - 1) });
17320
17405
  HIDDEN_LINE_NUMBERS = { display: "none" };
17321
- CodeBlock = React92__default.memo(
17406
+ CodeBlock = React93__default.memo(
17322
17407
  ({
17323
17408
  code: rawCode,
17324
17409
  language = "text",
@@ -17906,7 +17991,7 @@ var init_MarkdownContent = __esm({
17906
17991
  init_Box();
17907
17992
  init_CodeBlock();
17908
17993
  init_cn();
17909
- MarkdownContent = React92__default.memo(
17994
+ MarkdownContent = React93__default.memo(
17910
17995
  ({ content, direction = "ltr", className }) => {
17911
17996
  const { t: _t } = useTranslate();
17912
17997
  const safeContent = typeof content === "string" ? content : String(content ?? "");
@@ -19233,7 +19318,7 @@ var init_StateMachineView = __esm({
19233
19318
  style: { top: title ? 30 : 0 },
19234
19319
  children: [
19235
19320
  entity && /* @__PURE__ */ jsx(EntityBox, { entity, config }),
19236
- states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React92__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
19321
+ states.map((state) => renderStateNode ? /* @__PURE__ */ jsx(React93__default.Fragment, { children: renderStateNode(state, config) }, state.id) : /* @__PURE__ */ jsx(
19237
19322
  StateNode2,
19238
19323
  {
19239
19324
  state,
@@ -25055,8 +25140,8 @@ var init_Menu = __esm({
25055
25140
  "bottom-end": "bottom-start"
25056
25141
  };
25057
25142
  const effectivePosition = direction === "rtl" ? rtlMirror[position] ?? position : position;
25058
- const triggerChild = React92__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
25059
- const triggerElement = React92__default.cloneElement(
25143
+ const triggerChild = React93__default.isValidElement(trigger) ? trigger : /* @__PURE__ */ jsx(Typography, { variant: "small", as: "span", children: trigger });
25144
+ const triggerElement = React93__default.cloneElement(
25060
25145
  triggerChild,
25061
25146
  {
25062
25147
  ref: triggerRef,
@@ -25151,14 +25236,14 @@ function useDataDnd(args) {
25151
25236
  const isZone = Boolean(dragGroup || accepts || sortable);
25152
25237
  const enabled = isZone || Boolean(dndRoot);
25153
25238
  const eventBus = useEventBus();
25154
- const parentRoot = React92__default.useContext(RootCtx);
25239
+ const parentRoot = React93__default.useContext(RootCtx);
25155
25240
  const isRoot = enabled && parentRoot === null;
25156
- const zoneId = React92__default.useId();
25241
+ const zoneId = React93__default.useId();
25157
25242
  const ownGroup = dragGroup ?? accepts ?? zoneId;
25158
- const [optimisticOrders, setOptimisticOrders] = React92__default.useState(() => /* @__PURE__ */ new Map());
25159
- const optimisticOrdersRef = React92__default.useRef(optimisticOrders);
25243
+ const [optimisticOrders, setOptimisticOrders] = React93__default.useState(() => /* @__PURE__ */ new Map());
25244
+ const optimisticOrdersRef = React93__default.useRef(optimisticOrders);
25160
25245
  optimisticOrdersRef.current = optimisticOrders;
25161
- const clearOptimisticOrder = React92__default.useCallback((group) => {
25246
+ const clearOptimisticOrder = React93__default.useCallback((group) => {
25162
25247
  setOptimisticOrders((prev) => {
25163
25248
  if (!prev.has(group)) return prev;
25164
25249
  const next = new Map(prev);
@@ -25183,7 +25268,7 @@ function useDataDnd(args) {
25183
25268
  const raw = it[dndItemIdField];
25184
25269
  return raw != null ? String(raw) : `__idx_${idx}`;
25185
25270
  }).join("|");
25186
- const itemIds = React92__default.useMemo(
25271
+ const itemIds = React93__default.useMemo(
25187
25272
  () => orderedItems.map((it, idx) => {
25188
25273
  const raw = it[dndItemIdField];
25189
25274
  return raw != null ? String(raw) : `__idx_${idx}`;
@@ -25194,7 +25279,7 @@ function useDataDnd(args) {
25194
25279
  const raw = it[dndItemIdField];
25195
25280
  return raw != null ? String(raw) : `__${idx}`;
25196
25281
  }).join("|");
25197
- React92__default.useEffect(() => {
25282
+ React93__default.useEffect(() => {
25198
25283
  const root = isRoot ? null : parentRoot;
25199
25284
  if (root) {
25200
25285
  root.clearOptimisticOrder(ownGroup);
@@ -25202,20 +25287,20 @@ function useDataDnd(args) {
25202
25287
  clearOptimisticOrder(ownGroup);
25203
25288
  }
25204
25289
  }, [itemsContentSig, ownGroup]);
25205
- const zonesRef = React92__default.useRef(/* @__PURE__ */ new Map());
25206
- const registerZone = React92__default.useCallback((zoneId2, meta2) => {
25290
+ const zonesRef = React93__default.useRef(/* @__PURE__ */ new Map());
25291
+ const registerZone = React93__default.useCallback((zoneId2, meta2) => {
25207
25292
  zonesRef.current.set(zoneId2, meta2);
25208
25293
  }, []);
25209
- const unregisterZone = React92__default.useCallback((zoneId2) => {
25294
+ const unregisterZone = React93__default.useCallback((zoneId2) => {
25210
25295
  zonesRef.current.delete(zoneId2);
25211
25296
  }, []);
25212
- const [activeDrag, setActiveDrag] = React92__default.useState(null);
25213
- const [overZoneGroup, setOverZoneGroup] = React92__default.useState(null);
25214
- const meta = React92__default.useMemo(
25297
+ const [activeDrag, setActiveDrag] = React93__default.useState(null);
25298
+ const [overZoneGroup, setOverZoneGroup] = React93__default.useState(null);
25299
+ const meta = React93__default.useMemo(
25215
25300
  () => ({ group: ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, rawItems: items, idField: dndItemIdField }),
25216
25301
  [ownGroup, dropEvent, reorderEvent, positionEvent, itemIds, items, dndItemIdField]
25217
25302
  );
25218
- React92__default.useEffect(() => {
25303
+ React93__default.useEffect(() => {
25219
25304
  const target = isRoot ? null : parentRoot;
25220
25305
  if (!target) {
25221
25306
  zonesRef.current.set(zoneId, meta);
@@ -25234,7 +25319,7 @@ function useDataDnd(args) {
25234
25319
  }, [parentRoot, isRoot, zoneId, meta]);
25235
25320
  const sensors = useAlmadarDndSensors(true);
25236
25321
  const collisionDetection = almadarDndCollisionDetection;
25237
- const findZoneByItem = React92__default.useCallback(
25322
+ const findZoneByItem = React93__default.useCallback(
25238
25323
  (id) => {
25239
25324
  for (const z of zonesRef.current.values()) {
25240
25325
  if (z.itemIds.includes(id)) return z;
@@ -25243,7 +25328,7 @@ function useDataDnd(args) {
25243
25328
  },
25244
25329
  []
25245
25330
  );
25246
- React92__default.useCallback(
25331
+ React93__default.useCallback(
25247
25332
  (group) => {
25248
25333
  for (const z of zonesRef.current.values()) {
25249
25334
  if (z.group === group) return z;
@@ -25252,7 +25337,7 @@ function useDataDnd(args) {
25252
25337
  },
25253
25338
  []
25254
25339
  );
25255
- const handleDragEnd = React92__default.useCallback(
25340
+ const handleDragEnd = React93__default.useCallback(
25256
25341
  (event) => {
25257
25342
  const { active, over } = event;
25258
25343
  const activeIdStr = String(active.id);
@@ -25343,8 +25428,8 @@ function useDataDnd(args) {
25343
25428
  },
25344
25429
  [eventBus]
25345
25430
  );
25346
- const sortableData = React92__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
25347
- const SortableItem = React92__default.useCallback(
25431
+ const sortableData = React93__default.useMemo(() => ({ dndGroup: ownGroup }), [ownGroup]);
25432
+ const SortableItem = React93__default.useCallback(
25348
25433
  ({ id, children }) => {
25349
25434
  const {
25350
25435
  attributes,
@@ -25384,7 +25469,7 @@ function useDataDnd(args) {
25384
25469
  id: droppableId,
25385
25470
  data: sortableData
25386
25471
  });
25387
- const ctx = React92__default.useContext(RootCtx);
25472
+ const ctx = React93__default.useContext(RootCtx);
25388
25473
  const activeDrag2 = ctx?.activeDrag ?? null;
25389
25474
  const overZoneGroup2 = ctx?.overZoneGroup ?? null;
25390
25475
  const isThisZoneOver = overZoneGroup2 === ownGroup;
@@ -25399,7 +25484,7 @@ function useDataDnd(args) {
25399
25484
  showForeignPlaceholder,
25400
25485
  ctxAvailable: ctx != null
25401
25486
  });
25402
- React92__default.useEffect(() => {
25487
+ React93__default.useEffect(() => {
25403
25488
  dndLog.info("dropzone:isOver:change", { droppableId, group: ownGroup, isOver, isThisZoneOver, showForeignPlaceholder, activeDragSourceGroup: activeDrag2?.sourceGroup ?? null });
25404
25489
  }, [droppableId, isOver, isThisZoneOver, showForeignPlaceholder]);
25405
25490
  return /* @__PURE__ */ jsx(
@@ -25413,11 +25498,11 @@ function useDataDnd(args) {
25413
25498
  }
25414
25499
  );
25415
25500
  };
25416
- const rootContextValue = React92__default.useMemo(
25501
+ const rootContextValue = React93__default.useMemo(
25417
25502
  () => ({ registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder }),
25418
25503
  [registerZone, unregisterZone, activeDrag, overZoneGroup, optimisticOrders, clearOptimisticOrder]
25419
25504
  );
25420
- const handleDragStart = React92__default.useCallback((event) => {
25505
+ const handleDragStart = React93__default.useCallback((event) => {
25421
25506
  const sourceZone = findZoneByItem(event.active.id);
25422
25507
  const rect = event.active.rect.current.initial;
25423
25508
  const height = rect?.height && rect.height > 0 ? rect.height : 64;
@@ -25436,7 +25521,7 @@ function useDataDnd(args) {
25436
25521
  isRoot
25437
25522
  });
25438
25523
  }, [findZoneByItem, isRoot, zoneId]);
25439
- const handleDragOver = React92__default.useCallback((event) => {
25524
+ const handleDragOver = React93__default.useCallback((event) => {
25440
25525
  const { active, over } = event;
25441
25526
  const overData = over?.data?.current;
25442
25527
  const overGroup = overData?.dndGroup ?? null;
@@ -25506,7 +25591,7 @@ function useDataDnd(args) {
25506
25591
  return next;
25507
25592
  });
25508
25593
  }, []);
25509
- const handleDragCancel = React92__default.useCallback((event) => {
25594
+ const handleDragCancel = React93__default.useCallback((event) => {
25510
25595
  setActiveDrag(null);
25511
25596
  setOverZoneGroup(null);
25512
25597
  dndLog.warn("dragCancel", {
@@ -25514,12 +25599,12 @@ function useDataDnd(args) {
25514
25599
  reason: "dnd-kit cancelled the drag (escape key, pointer interrupted, or external)"
25515
25600
  });
25516
25601
  }, []);
25517
- const handleDragEndWithCleanup = React92__default.useCallback((event) => {
25602
+ const handleDragEndWithCleanup = React93__default.useCallback((event) => {
25518
25603
  handleDragEnd(event);
25519
25604
  setActiveDrag(null);
25520
25605
  setOverZoneGroup(null);
25521
25606
  }, [handleDragEnd]);
25522
- const wrapContainer = React92__default.useCallback(
25607
+ const wrapContainer = React93__default.useCallback(
25523
25608
  (children) => {
25524
25609
  if (!enabled) return children;
25525
25610
  const strategy = layout === "grid" ? rectSortingStrategy : verticalListSortingStrategy;
@@ -25573,7 +25658,7 @@ var init_useDataDnd = __esm({
25573
25658
  init_useAlmadarDndCollision();
25574
25659
  init_Box();
25575
25660
  dndLog = createLogger("almadar:ui:dnd");
25576
- RootCtx = React92__default.createContext(null);
25661
+ RootCtx = React93__default.createContext(null);
25577
25662
  }
25578
25663
  });
25579
25664
  function renderIconInput(icon, props) {
@@ -26115,7 +26200,7 @@ function DataList({
26115
26200
  }) {
26116
26201
  const eventBus = useEventBus();
26117
26202
  const { t } = useTranslate();
26118
- const [visibleCount, setVisibleCount] = React92__default.useState(pageSize || Infinity);
26203
+ const [visibleCount, setVisibleCount] = React93__default.useState(pageSize || Infinity);
26119
26204
  const fieldDefs = fields ?? columns ?? [];
26120
26205
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
26121
26206
  const dnd = useDataDnd({
@@ -26131,14 +26216,14 @@ function DataList({
26131
26216
  dndRoot
26132
26217
  });
26133
26218
  const orderedData = dnd.orderedItems;
26134
- const allData = React92__default.useMemo(
26219
+ const allData = React93__default.useMemo(
26135
26220
  () => sortRows(orderedData, sortBy, sortDirection),
26136
26221
  [orderedData, sortBy, sortDirection]
26137
26222
  );
26138
26223
  const data = pageSize > 0 ? allData.slice(0, visibleCount) : allData;
26139
26224
  const hasMoreLocal = pageSize > 0 && visibleCount < allData.length;
26140
26225
  const hasRenderProp = typeof children === "function";
26141
- React92__default.useEffect(() => {
26226
+ React93__default.useEffect(() => {
26142
26227
  const renderItemTypeOf = typeof schemaRenderItem;
26143
26228
  const childrenTypeOf = typeof children;
26144
26229
  if (data.length > 0 && !hasRenderProp) {
@@ -26253,7 +26338,7 @@ function DataList({
26253
26338
  return v === void 0 || v === null || v === "" ? raw : String(v);
26254
26339
  };
26255
26340
  return /* @__PURE__ */ jsxs(VStack, { gap: "sm", className: cn("py-2", className), children: [
26256
- groups2.map((group, gi) => /* @__PURE__ */ jsxs(React92__default.Fragment, { children: [
26341
+ groups2.map((group, gi) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
26257
26342
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: "my-2" }),
26258
26343
  group.items.map((itemData, index) => {
26259
26344
  const id = itemData.id || `${gi}-${index}`;
@@ -26452,7 +26537,7 @@ function DataList({
26452
26537
  className
26453
26538
  ),
26454
26539
  children: [
26455
- groups.map((group, gi) => /* @__PURE__ */ jsxs(React92__default.Fragment, { children: [
26540
+ groups.map((group, gi) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
26456
26541
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-4" : "mt-0" }),
26457
26542
  group.items.map(
26458
26543
  (itemData, index) => renderItem(itemData, index, gi === groups.length - 1 && index === group.items.length - 1)
@@ -26539,7 +26624,7 @@ var init_FormSection = __esm({
26539
26624
  columns = 1,
26540
26625
  className
26541
26626
  }) => {
26542
- const [collapsed, setCollapsed] = React92__default.useState(defaultCollapsed);
26627
+ const [collapsed, setCollapsed] = React93__default.useState(defaultCollapsed);
26543
26628
  const { t } = useTranslate();
26544
26629
  const eventBus = useEventBus();
26545
26630
  const gridClass = {
@@ -26547,7 +26632,7 @@ var init_FormSection = __esm({
26547
26632
  2: "grid-cols-1 md:grid-cols-2",
26548
26633
  3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3"
26549
26634
  }[columns];
26550
- React92__default.useCallback(() => {
26635
+ React93__default.useCallback(() => {
26551
26636
  if (collapsible) {
26552
26637
  setCollapsed((prev) => !prev);
26553
26638
  eventBus.emit("UI:TOGGLE_COLLAPSE", { collapsed: !collapsed });
@@ -27592,7 +27677,7 @@ var init_Flex = __esm({
27592
27677
  flexStyle.flexBasis = typeof basis === "number" ? `${basis}px` : basis;
27593
27678
  }
27594
27679
  }
27595
- return React92__default.createElement(Component, {
27680
+ return React93__default.createElement(Component, {
27596
27681
  className: cn(
27597
27682
  inline ? "inline-flex" : "flex",
27598
27683
  directionStyles[direction],
@@ -27711,7 +27796,7 @@ var init_Grid = __esm({
27711
27796
  as: Component = "div"
27712
27797
  }) => {
27713
27798
  const mergedStyle = rows ? { gridTemplateRows: `repeat(${rows}, minmax(0, 1fr))`, ...style } : style;
27714
- return React92__default.createElement(
27799
+ return React93__default.createElement(
27715
27800
  Component,
27716
27801
  {
27717
27802
  className: cn(
@@ -27943,9 +28028,9 @@ var init_Popover = __esm({
27943
28028
  onMouseLeave: handleClose,
27944
28029
  onPointerDown: tapTriggerProps.onPointerDown
27945
28030
  };
27946
- const childElement = React92__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
28031
+ const childElement = React93__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
27947
28032
  const childPointerDown = childElement.props.onPointerDown;
27948
- const triggerElement = React92__default.cloneElement(
28033
+ const triggerElement = React93__default.cloneElement(
27949
28034
  childElement,
27950
28035
  {
27951
28036
  ref: triggerRef,
@@ -28554,9 +28639,9 @@ var init_Tooltip = __esm({
28554
28639
  if (hideTimeoutRef.current) clearTimeout(hideTimeoutRef.current);
28555
28640
  };
28556
28641
  }, []);
28557
- const triggerElement = React92__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
28642
+ const triggerElement = React93__default.isValidElement(children) ? children : /* @__PURE__ */ jsx("span", { children });
28558
28643
  const childPointerDown = triggerElement.props.onPointerDown;
28559
- const trigger = React92__default.cloneElement(triggerElement, {
28644
+ const trigger = React93__default.cloneElement(triggerElement, {
28560
28645
  ref: triggerRef,
28561
28646
  onMouseEnter: handleMouseEnter,
28562
28647
  onMouseLeave: handleMouseLeave,
@@ -28646,7 +28731,7 @@ var init_WizardProgress = __esm({
28646
28731
  children: /* @__PURE__ */ jsx("div", { className: "flex items-center gap-2", children: normalizedSteps.map((step, index) => {
28647
28732
  const isActive = index === currentStep;
28648
28733
  const isCompleted = index < currentStep;
28649
- return /* @__PURE__ */ jsxs(React92__default.Fragment, { children: [
28734
+ return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
28650
28735
  /* @__PURE__ */ jsx(
28651
28736
  "button",
28652
28737
  {
@@ -30281,7 +30366,7 @@ var init_MapView = __esm({
30281
30366
  shadowSize: [41, 41]
30282
30367
  });
30283
30368
  L.Marker.prototype.options.icon = defaultIcon;
30284
- const { useEffect: useEffect63, useRef: useRef63, useCallback: useCallback95, useState: useState99 } = React92__default;
30369
+ const { useEffect: useEffect63, useRef: useRef63, useCallback: useCallback95, useState: useState99 } = React93__default;
30285
30370
  const { Typography: Typography2 } = await Promise.resolve().then(() => (init_Typography(), Typography_exports));
30286
30371
  const { useEventBus: useEventBus2 } = await Promise.resolve().then(() => (init_useEventBus(), useEventBus_exports));
30287
30372
  function MapUpdater({ centerLat, centerLng, zoom }) {
@@ -31199,8 +31284,8 @@ function TableView({
31199
31284
  }) {
31200
31285
  const eventBus = useEventBus();
31201
31286
  const { t } = useTranslate();
31202
- const [visibleCount, setVisibleCount] = React92__default.useState(pageSize > 0 ? pageSize : Infinity);
31203
- const [localSelected, setLocalSelected] = React92__default.useState(/* @__PURE__ */ new Set());
31287
+ const [visibleCount, setVisibleCount] = React93__default.useState(pageSize > 0 ? pageSize : Infinity);
31288
+ const [localSelected, setLocalSelected] = React93__default.useState(/* @__PURE__ */ new Set());
31204
31289
  const colDefs = (Array.isArray(columns) ? columns : void 0) ?? (Array.isArray(fields) ? fields : void 0) ?? [];
31205
31290
  const actionDefs = Array.isArray(itemActions) ? itemActions : [];
31206
31291
  const allDataRaw = Array.isArray(entity) ? entity : entity ? [entity] : [];
@@ -31222,7 +31307,7 @@ function TableView({
31222
31307
  const hasRenderProp = typeof children === "function";
31223
31308
  const idField = dndItemIdField ?? "id";
31224
31309
  const isCoarsePointer = useMediaQuery("(pointer: coarse)");
31225
- React92__default.useEffect(() => {
31310
+ React93__default.useEffect(() => {
31226
31311
  tableViewLog.debug("render", {
31227
31312
  rowCount: data.length,
31228
31313
  colCount: colDefs.length,
@@ -31279,7 +31364,7 @@ function TableView({
31279
31364
  };
31280
31365
  eventBus.emit(`UI:${itemClickEvent}`, payload);
31281
31366
  };
31282
- const colFloors = React92__default.useMemo(
31367
+ const colFloors = React93__default.useMemo(
31283
31368
  () => colDefs.map((col) => {
31284
31369
  const longest = data.reduce((widest, row) => {
31285
31370
  const cell = formatCell(asFieldValue(getNestedValue(row, col.field ?? col.key)), col.format);
@@ -31441,12 +31526,12 @@ function TableView({
31441
31526
  ]
31442
31527
  }
31443
31528
  );
31444
- return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React92__default.Fragment, { children: rowInner }, id);
31529
+ return dnd.isZone ? /* @__PURE__ */ jsx(dnd.SortableItem, { id: row[idField] ?? id, children: rowInner }, id) : /* @__PURE__ */ jsx(React93__default.Fragment, { children: rowInner }, id);
31445
31530
  };
31446
31531
  const items = Array.from(data);
31447
31532
  const groups = groupBy ? groupData2(items, groupBy) : [{ label: "", items }];
31448
31533
  let runningIndex = 0;
31449
- const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React92__default.Fragment, { children: [
31534
+ const body = /* @__PURE__ */ jsx(Box, { role: "rowgroup", children: groups.map((group, gi) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
31450
31535
  group.label && /* @__PURE__ */ jsx(Divider, { label: group.label, className: gi > 0 ? "mt-3" : "mt-0" }),
31451
31536
  group.items.map((row) => renderRow(row, runningIndex++))
31452
31537
  ] }, gi)) });
@@ -32809,7 +32894,7 @@ var init_StepFlow = __esm({
32809
32894
  className
32810
32895
  }) => {
32811
32896
  if (orientation === "vertical") {
32812
- return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React92__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
32897
+ return /* @__PURE__ */ jsx(VStack, { gap: "none", className: cn("w-full", className), children: steps.map((step, index) => /* @__PURE__ */ jsx(React93__default.Fragment, { children: /* @__PURE__ */ jsxs(HStack, { gap: "md", align: "start", className: "w-full", children: [
32813
32898
  /* @__PURE__ */ jsxs(VStack, { gap: "none", align: "center", children: [
32814
32899
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
32815
32900
  showConnectors && index < steps.length - 1 && /* @__PURE__ */ jsx(Box, { className: "w-px h-8 bg-border" })
@@ -32820,7 +32905,7 @@ var init_StepFlow = __esm({
32820
32905
  ] })
32821
32906
  ] }) }, index)) });
32822
32907
  }
32823
- 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(React92__default.Fragment, { children: [
32908
+ 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(React93__default.Fragment, { children: [
32824
32909
  /* @__PURE__ */ jsxs(VStack, { gap: "sm", align: "center", className: "flex-1 w-full md:w-auto", children: [
32825
32910
  /* @__PURE__ */ jsx(StepCircle, { step, index }),
32826
32911
  /* @__PURE__ */ jsx(Typography, { variant: "h4", className: "text-center", children: step.title }),
@@ -33810,7 +33895,7 @@ var init_LikertScale = __esm({
33810
33895
  md: "text-base",
33811
33896
  lg: "text-lg"
33812
33897
  };
33813
- LikertScale = React92__default.forwardRef(
33898
+ LikertScale = React93__default.forwardRef(
33814
33899
  ({
33815
33900
  question,
33816
33901
  options = DEFAULT_LIKERT_OPTIONS,
@@ -33822,7 +33907,7 @@ var init_LikertScale = __esm({
33822
33907
  variant = "radios",
33823
33908
  className
33824
33909
  }, ref) => {
33825
- const groupId = React92__default.useId();
33910
+ const groupId = React93__default.useId();
33826
33911
  const eventBus = useEventBus();
33827
33912
  const handleSelect = useCallback(
33828
33913
  (next) => {
@@ -36111,7 +36196,7 @@ var init_DocBreadcrumb = __esm({
36111
36196
  "aria-label": t("aria.breadcrumb"),
36112
36197
  children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", wrap: true, children: items.map((item, idx) => {
36113
36198
  const isLast = idx === items.length - 1;
36114
- return /* @__PURE__ */ jsxs(React92__default.Fragment, { children: [
36199
+ return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
36115
36200
  idx > 0 && /* @__PURE__ */ jsx(
36116
36201
  Icon,
36117
36202
  {
@@ -36775,7 +36860,7 @@ var init_PageHeader = __esm({
36775
36860
  info: "bg-info/10 text-info"
36776
36861
  };
36777
36862
  return /* @__PURE__ */ jsxs(Box, { className: cn("mb-6", className), children: [
36778
- 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(React92__default.Fragment, { children: [
36863
+ 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(React93__default.Fragment, { children: [
36779
36864
  idx > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", color: "muted", children: "/" }),
36780
36865
  crumb.href ? /* @__PURE__ */ jsx(
36781
36866
  "a",
@@ -37133,7 +37218,7 @@ var init_Section = __esm({
37133
37218
  as: Component = "section"
37134
37219
  }) => {
37135
37220
  const hasHeader = title || description || action;
37136
- return React92__default.createElement(
37221
+ return React93__default.createElement(
37137
37222
  Component,
37138
37223
  {
37139
37224
  className: cn(
@@ -37507,7 +37592,7 @@ var init_WizardContainer = __esm({
37507
37592
  const isCompleted = index < currentStep;
37508
37593
  const stepKey = step.id ?? step.tabId ?? `step-${index}`;
37509
37594
  const stepTitle = step.title ?? step.name ?? `Step ${index + 1}`;
37510
- return /* @__PURE__ */ jsxs(React92__default.Fragment, { children: [
37595
+ return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
37511
37596
  /* @__PURE__ */ jsx(
37512
37597
  Button,
37513
37598
  {
@@ -39294,7 +39379,7 @@ var init_ImportPreviewTree = __esm({
39294
39379
  const renderUnit = (unit, childrenByParent, depth) => {
39295
39380
  const summary = fieldSummary(unit);
39296
39381
  const children = childrenByParent.get(unit.ref) ?? [];
39297
- return /* @__PURE__ */ jsxs(React92__default.Fragment, { children: [
39382
+ return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
39298
39383
  /* @__PURE__ */ jsxs(
39299
39384
  Box,
39300
39385
  {
@@ -39391,7 +39476,7 @@ var init_ImportProgress = __esm({
39391
39476
  PIPELINE.map((key, index) => {
39392
39477
  const isComplete = index < currentIndex;
39393
39478
  const isActive = index === currentIndex;
39394
- return /* @__PURE__ */ jsxs(React92__default.Fragment, { children: [
39479
+ return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
39395
39480
  index > 0 ? /* @__PURE__ */ jsx(Box, { className: "h-px w-4 bg-border" }) : null,
39396
39481
  /* @__PURE__ */ jsxs(Box, { className: "flex items-center gap-1", "data-testid": `import-progress-step-${key}`, children: [
39397
39482
  /* @__PURE__ */ jsx(
@@ -40504,7 +40589,7 @@ var init_DrawGroup = __esm({
40504
40589
  }
40505
40590
  });
40506
40591
  function extractTitle(children) {
40507
- if (!React92__default.isValidElement(children)) return void 0;
40592
+ if (!React93__default.isValidElement(children)) return void 0;
40508
40593
  const props = children.props;
40509
40594
  if (typeof props.title === "string") {
40510
40595
  return props.title;
@@ -40854,12 +40939,12 @@ var init_Form = __esm({
40854
40939
  const isSchemaEntity = isOrbitalEntitySchema(entity);
40855
40940
  const resolvedEntity = isSchemaEntity ? entity : void 0;
40856
40941
  const entityName = typeof entity === "string" ? entity : resolvedEntity?.name;
40857
- const normalizedInitialData = React92__default.useMemo(() => {
40942
+ const normalizedInitialData = React93__default.useMemo(() => {
40858
40943
  const entityRowAsInitial = isPlainEntityRow(entity) ? entity : void 0;
40859
40944
  const callerInitial = initialData !== null && typeof initialData === "object" && !Array.isArray(initialData) ? initialData : {};
40860
40945
  return entityRowAsInitial !== void 0 ? { ...entityRowAsInitial, ...callerInitial } : callerInitial;
40861
40946
  }, [entity, initialData]);
40862
- const entityDerivedFields = React92__default.useMemo(() => {
40947
+ const entityDerivedFields = React93__default.useMemo(() => {
40863
40948
  if (fields && fields.length > 0) return void 0;
40864
40949
  if (!resolvedEntity) return void 0;
40865
40950
  return resolvedEntity.fields.map(
@@ -40880,16 +40965,16 @@ var init_Form = __esm({
40880
40965
  const conditionalFields = typeof conditionalFieldsRaw === "boolean" ? {} : conditionalFieldsRaw;
40881
40966
  const hiddenCalculations = typeof hiddenCalculationsRaw === "boolean" ? [] : hiddenCalculationsRaw;
40882
40967
  const violationTriggers = typeof violationTriggersRaw === "boolean" ? [] : violationTriggersRaw;
40883
- const [formData, setFormData] = React92__default.useState(
40968
+ const [formData, setFormData] = React93__default.useState(
40884
40969
  normalizedInitialData
40885
40970
  );
40886
- const [collapsedSections, setCollapsedSections] = React92__default.useState(
40971
+ const [collapsedSections, setCollapsedSections] = React93__default.useState(
40887
40972
  /* @__PURE__ */ new Set()
40888
40973
  );
40889
- const [submitError, setSubmitError] = React92__default.useState(null);
40890
- const formRef = React92__default.useRef(null);
40974
+ const [submitError, setSubmitError] = React93__default.useState(null);
40975
+ const formRef = React93__default.useRef(null);
40891
40976
  const formMode = props.mode;
40892
- const mountedRef = React92__default.useRef(false);
40977
+ const mountedRef = React93__default.useRef(false);
40893
40978
  if (!mountedRef.current) {
40894
40979
  mountedRef.current = true;
40895
40980
  debug("forms", "mount", {
@@ -40902,7 +40987,7 @@ var init_Form = __esm({
40902
40987
  });
40903
40988
  }
40904
40989
  const shouldShowCancel = showCancel ?? (fields && fields.length > 0);
40905
- const evalContext = React92__default.useMemo(
40990
+ const evalContext = React93__default.useMemo(
40906
40991
  () => ({
40907
40992
  formValues: formData,
40908
40993
  globalVariables: externalContext?.globalVariables ?? {},
@@ -40911,7 +40996,7 @@ var init_Form = __esm({
40911
40996
  }),
40912
40997
  [formData, externalContext]
40913
40998
  );
40914
- React92__default.useEffect(() => {
40999
+ React93__default.useEffect(() => {
40915
41000
  debug("forms", "initialData-sync", {
40916
41001
  mode: formMode,
40917
41002
  normalizedInitialData,
@@ -40922,7 +41007,7 @@ var init_Form = __esm({
40922
41007
  setFormData(normalizedInitialData);
40923
41008
  }
40924
41009
  }, [normalizedInitialData]);
40925
- const processCalculations = React92__default.useCallback(
41010
+ const processCalculations = React93__default.useCallback(
40926
41011
  (changedFieldId, newFormData) => {
40927
41012
  if (!hiddenCalculations.length) return;
40928
41013
  const context = {
@@ -40947,7 +41032,7 @@ var init_Form = __esm({
40947
41032
  },
40948
41033
  [hiddenCalculations, externalContext, eventBus]
40949
41034
  );
40950
- const checkViolations = React92__default.useCallback(
41035
+ const checkViolations = React93__default.useCallback(
40951
41036
  (changedFieldId, newFormData) => {
40952
41037
  if (!violationTriggers.length) return;
40953
41038
  const context = {
@@ -40985,7 +41070,7 @@ var init_Form = __esm({
40985
41070
  processCalculations(name, newFormData);
40986
41071
  checkViolations(name, newFormData);
40987
41072
  };
40988
- const isFieldVisible = React92__default.useCallback(
41073
+ const isFieldVisible = React93__default.useCallback(
40989
41074
  (fieldName) => {
40990
41075
  const condition = conditionalFields[fieldName];
40991
41076
  if (!condition) return true;
@@ -40993,7 +41078,7 @@ var init_Form = __esm({
40993
41078
  },
40994
41079
  [conditionalFields, evalContext]
40995
41080
  );
40996
- const isSectionVisible = React92__default.useCallback(
41081
+ const isSectionVisible = React93__default.useCallback(
40997
41082
  (section) => {
40998
41083
  if (!section.condition) return true;
40999
41084
  return Boolean(evaluateFormExpression(section.condition, evalContext));
@@ -41069,7 +41154,7 @@ var init_Form = __esm({
41069
41154
  eventBus.emit(`UI:${onCancel}`);
41070
41155
  }
41071
41156
  };
41072
- const renderField = React92__default.useCallback(
41157
+ const renderField = React93__default.useCallback(
41073
41158
  (field) => {
41074
41159
  const fieldName = field.name || field.field;
41075
41160
  if (!fieldName) return null;
@@ -41090,7 +41175,7 @@ var init_Form = __esm({
41090
41175
  [formData, isFieldVisible, relationsData, relationsLoading, isLoading]
41091
41176
  );
41092
41177
  const effectiveFields = entityDerivedFields ?? fields;
41093
- const normalizedFields = React92__default.useMemo(() => {
41178
+ const normalizedFields = React93__default.useMemo(() => {
41094
41179
  if (!effectiveFields || effectiveFields.length === 0) return [];
41095
41180
  return effectiveFields.map((field) => {
41096
41181
  if (typeof field === "string") {
@@ -41114,7 +41199,7 @@ var init_Form = __esm({
41114
41199
  return field;
41115
41200
  });
41116
41201
  }, [effectiveFields, resolvedEntity]);
41117
- const schemaFields = React92__default.useMemo(() => {
41202
+ const schemaFields = React93__default.useMemo(() => {
41118
41203
  if (normalizedFields.length === 0) return null;
41119
41204
  if (isDebugEnabled()) {
41120
41205
  debugGroup(`Form: ${entityName || "unknown"}`);
@@ -41124,7 +41209,7 @@ var init_Form = __esm({
41124
41209
  }
41125
41210
  return normalizedFields.map(renderField).filter(Boolean);
41126
41211
  }, [normalizedFields, renderField, entityName, conditionalFields]);
41127
- const sectionElements = React92__default.useMemo(() => {
41212
+ const sectionElements = React93__default.useMemo(() => {
41128
41213
  if (!sections || sections.length === 0) return null;
41129
41214
  return sections.map((section) => {
41130
41215
  if (!isSectionVisible(section)) {
@@ -41850,7 +41935,7 @@ var init_List = __esm({
41850
41935
  if (entity && typeof entity === "object" && "id" in entity) return [entity];
41851
41936
  return [];
41852
41937
  }, [entity]);
41853
- const getItemActions = React92__default.useCallback(
41938
+ const getItemActions = React93__default.useCallback(
41854
41939
  (item) => {
41855
41940
  if (!itemActions) return [];
41856
41941
  if (typeof itemActions === "function") {
@@ -42331,7 +42416,7 @@ var init_MediaGallery = __esm({
42331
42416
  [selectable, selectedItems, selectionEvent, eventBus]
42332
42417
  );
42333
42418
  const entityData = Array.isArray(entity) ? entity : [];
42334
- const items = React92__default.useMemo(() => {
42419
+ const items = React93__default.useMemo(() => {
42335
42420
  if (propItems && propItems.length > 0) return propItems;
42336
42421
  if (entityData.length === 0) return [];
42337
42422
  return entityData.map((record, idx) => {
@@ -42496,7 +42581,7 @@ var init_MediaGallery = __esm({
42496
42581
  }
42497
42582
  });
42498
42583
  function extractTitle2(children) {
42499
- if (!React92__default.isValidElement(children)) return void 0;
42584
+ if (!React93__default.isValidElement(children)) return void 0;
42500
42585
  const props = children.props;
42501
42586
  if (typeof props.title === "string") {
42502
42587
  return props.title;
@@ -42770,7 +42855,7 @@ var init_debugRegistry = __esm({
42770
42855
  }
42771
42856
  });
42772
42857
  function useDebugData() {
42773
- const [data, setData] = React92.useState(() => ({
42858
+ const [data, setData] = React93.useState(() => ({
42774
42859
  traits: [],
42775
42860
  ticks: [],
42776
42861
  guards: [],
@@ -42784,7 +42869,7 @@ function useDebugData() {
42784
42869
  },
42785
42870
  lastUpdate: Date.now()
42786
42871
  }));
42787
- React92.useEffect(() => {
42872
+ React93.useEffect(() => {
42788
42873
  const updateData = () => {
42789
42874
  setData({
42790
42875
  traits: getAllTraits(),
@@ -42893,12 +42978,12 @@ function layoutGraph(states, transitions, initialState, width, height) {
42893
42978
  return positions;
42894
42979
  }
42895
42980
  function WalkMinimap() {
42896
- const [walkStep, setWalkStep] = React92.useState(null);
42897
- const [traits2, setTraits] = React92.useState([]);
42898
- const [coveredEdges, setCoveredEdges] = React92.useState([]);
42899
- const [completedTraits, setCompletedTraits] = React92.useState(/* @__PURE__ */ new Set());
42900
- const prevTraitRef = React92.useRef(null);
42901
- React92.useEffect(() => {
42981
+ const [walkStep, setWalkStep] = React93.useState(null);
42982
+ const [traits2, setTraits] = React93.useState([]);
42983
+ const [coveredEdges, setCoveredEdges] = React93.useState([]);
42984
+ const [completedTraits, setCompletedTraits] = React93.useState(/* @__PURE__ */ new Set());
42985
+ const prevTraitRef = React93.useRef(null);
42986
+ React93.useEffect(() => {
42902
42987
  const interval = setInterval(() => {
42903
42988
  const w = window;
42904
42989
  const step = w.__orbitalWalkStep;
@@ -43334,15 +43419,15 @@ var init_EntitiesTab = __esm({
43334
43419
  });
43335
43420
  function EventFlowTab({ events: events2 }) {
43336
43421
  const { t } = useTranslate();
43337
- const [filter, setFilter] = React92.useState("all");
43338
- const containerRef = React92.useRef(null);
43339
- const [autoScroll, setAutoScroll] = React92.useState(true);
43340
- React92.useEffect(() => {
43422
+ const [filter, setFilter] = React93.useState("all");
43423
+ const containerRef = React93.useRef(null);
43424
+ const [autoScroll, setAutoScroll] = React93.useState(true);
43425
+ React93.useEffect(() => {
43341
43426
  if (autoScroll && containerRef.current) {
43342
43427
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
43343
43428
  }
43344
43429
  }, [events2.length, autoScroll]);
43345
- const filteredEvents = React92.useMemo(() => {
43430
+ const filteredEvents = React93.useMemo(() => {
43346
43431
  if (filter === "all") return events2;
43347
43432
  return events2.filter((e) => e.type === filter);
43348
43433
  }, [events2, filter]);
@@ -43458,7 +43543,7 @@ var init_EventFlowTab = __esm({
43458
43543
  });
43459
43544
  function GuardsPanel({ guards }) {
43460
43545
  const { t } = useTranslate();
43461
- const [filter, setFilter] = React92.useState("all");
43546
+ const [filter, setFilter] = React93.useState("all");
43462
43547
  if (guards.length === 0) {
43463
43548
  return /* @__PURE__ */ jsx(
43464
43549
  EmptyState,
@@ -43471,7 +43556,7 @@ function GuardsPanel({ guards }) {
43471
43556
  }
43472
43557
  const passedCount = guards.filter((g) => g.result).length;
43473
43558
  const failedCount = guards.length - passedCount;
43474
- const filteredGuards = React92.useMemo(() => {
43559
+ const filteredGuards = React93.useMemo(() => {
43475
43560
  if (filter === "all") return guards;
43476
43561
  if (filter === "passed") return guards.filter((g) => g.result);
43477
43562
  return guards.filter((g) => !g.result);
@@ -43634,10 +43719,10 @@ function EffectBadge({ effect }) {
43634
43719
  }
43635
43720
  function TransitionTimeline({ transitions }) {
43636
43721
  const { t } = useTranslate();
43637
- const containerRef = React92.useRef(null);
43638
- const [autoScroll, setAutoScroll] = React92.useState(true);
43639
- const [expandedId, setExpandedId] = React92.useState(null);
43640
- React92.useEffect(() => {
43722
+ const containerRef = React93.useRef(null);
43723
+ const [autoScroll, setAutoScroll] = React93.useState(true);
43724
+ const [expandedId, setExpandedId] = React93.useState(null);
43725
+ React93.useEffect(() => {
43641
43726
  if (autoScroll && containerRef.current) {
43642
43727
  containerRef.current.scrollTop = containerRef.current.scrollHeight;
43643
43728
  }
@@ -43917,9 +44002,9 @@ function getAllEvents(traits2) {
43917
44002
  function EventDispatcherTab({ traits: traits2, schema }) {
43918
44003
  const eventBus = useEventBus();
43919
44004
  const { t } = useTranslate();
43920
- const [log11, setLog] = React92.useState([]);
43921
- const prevStatesRef = React92.useRef(/* @__PURE__ */ new Map());
43922
- React92.useEffect(() => {
44005
+ const [log11, setLog] = React93.useState([]);
44006
+ const prevStatesRef = React93.useRef(/* @__PURE__ */ new Map());
44007
+ React93.useEffect(() => {
43923
44008
  for (const trait of traits2) {
43924
44009
  const prev = prevStatesRef.current.get(trait.id);
43925
44010
  if (prev && prev !== trait.currentState) {
@@ -44088,10 +44173,10 @@ function VerifyModePanel({
44088
44173
  localCount
44089
44174
  }) {
44090
44175
  const { t } = useTranslate();
44091
- const [expanded, setExpanded] = React92.useState(true);
44092
- const scrollRef = React92.useRef(null);
44093
- const prevCountRef = React92.useRef(0);
44094
- React92.useEffect(() => {
44176
+ const [expanded, setExpanded] = React93.useState(true);
44177
+ const scrollRef = React93.useRef(null);
44178
+ const prevCountRef = React93.useRef(0);
44179
+ React93.useEffect(() => {
44095
44180
  if (expanded && transitions.length > prevCountRef.current && scrollRef.current) {
44096
44181
  scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
44097
44182
  }
@@ -44148,10 +44233,10 @@ function RuntimeDebugger({
44148
44233
  schema
44149
44234
  }) {
44150
44235
  const { t } = useTranslate();
44151
- const [isCollapsed, setIsCollapsed] = React92.useState(mode === "verify" ? true : defaultCollapsed);
44152
- const [isVisible, setIsVisible] = React92.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
44236
+ const [isCollapsed, setIsCollapsed] = React93.useState(mode === "verify" ? true : defaultCollapsed);
44237
+ const [isVisible, setIsVisible] = React93.useState(mode === "inline" || mode === "verify" || isDebugEnabled2());
44153
44238
  const debugData = useDebugData();
44154
- React92.useEffect(() => {
44239
+ React93.useEffect(() => {
44155
44240
  if (mode === "inline") return;
44156
44241
  return onDebugToggle((enabled) => {
44157
44242
  setIsVisible(enabled);
@@ -44160,7 +44245,7 @@ function RuntimeDebugger({
44160
44245
  }
44161
44246
  });
44162
44247
  }, [mode]);
44163
- React92.useEffect(() => {
44248
+ React93.useEffect(() => {
44164
44249
  if (mode === "inline") return;
44165
44250
  const handleKeyDown = (e) => {
44166
44251
  if (e.key === "`" && isVisible) {
@@ -44680,7 +44765,7 @@ var init_StatCard = __esm({
44680
44765
  const labelToUse = propLabel ?? propTitle;
44681
44766
  const eventBus = useEventBus();
44682
44767
  const { t } = useTranslate();
44683
- const handleActionClick = React92__default.useCallback(() => {
44768
+ const handleActionClick = React93__default.useCallback(() => {
44684
44769
  if (action?.event) {
44685
44770
  eventBus.emit(`UI:${action.event}`, {});
44686
44771
  }
@@ -44691,7 +44776,7 @@ var init_StatCard = __esm({
44691
44776
  const data = Array.isArray(entity) ? entity : entity ? [entity] : [];
44692
44777
  const isLoading = externalLoading ?? false;
44693
44778
  const error = externalError;
44694
- const computeMetricValue = React92__default.useCallback(
44779
+ const computeMetricValue = React93__default.useCallback(
44695
44780
  (metric, items) => {
44696
44781
  if (metric.value !== void 0) {
44697
44782
  return metric.value;
@@ -44730,7 +44815,7 @@ var init_StatCard = __esm({
44730
44815
  },
44731
44816
  []
44732
44817
  );
44733
- const schemaStats = React92__default.useMemo(() => {
44818
+ const schemaStats = React93__default.useMemo(() => {
44734
44819
  if (!metrics || metrics.length === 0) return null;
44735
44820
  return metrics.map((metric) => ({
44736
44821
  label: metric.label,
@@ -44738,7 +44823,7 @@ var init_StatCard = __esm({
44738
44823
  format: metric.format
44739
44824
  }));
44740
44825
  }, [metrics, data, computeMetricValue]);
44741
- const calculatedTrend = React92__default.useMemo(() => {
44826
+ const calculatedTrend = React93__default.useMemo(() => {
44742
44827
  if (manualTrend !== void 0) return manualTrend;
44743
44828
  if (previousValue === void 0 || currentValue === void 0)
44744
44829
  return void 0;
@@ -45378,8 +45463,8 @@ var init_SubagentTracePanel = __esm({
45378
45463
  ] });
45379
45464
  };
45380
45465
  InlineActivityStream = ({ activities, autoScroll = true, className }) => {
45381
- const endRef = React92__default.useRef(null);
45382
- React92__default.useEffect(() => {
45466
+ const endRef = React93__default.useRef(null);
45467
+ React93__default.useEffect(() => {
45383
45468
  if (!autoScroll) return;
45384
45469
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
45385
45470
  }, [activities.length, autoScroll]);
@@ -45473,7 +45558,7 @@ var init_SubagentTracePanel = __esm({
45473
45558
  };
45474
45559
  SubagentRichCard = ({ subagent }) => {
45475
45560
  const { t } = useTranslate();
45476
- const activities = React92__default.useMemo(
45561
+ const activities = React93__default.useMemo(
45477
45562
  () => subagentMessagesToActivities(subagent.messages),
45478
45563
  [subagent.messages]
45479
45564
  );
@@ -45550,8 +45635,8 @@ var init_SubagentTracePanel = __esm({
45550
45635
  ] });
45551
45636
  };
45552
45637
  CoordinatorConversation = ({ messages, autoScroll = true, className }) => {
45553
- const endRef = React92__default.useRef(null);
45554
- React92__default.useEffect(() => {
45638
+ const endRef = React93__default.useRef(null);
45639
+ React93__default.useEffect(() => {
45555
45640
  if (!autoScroll) return;
45556
45641
  endRef.current?.scrollIntoView({ behavior: "smooth", block: "end" });
45557
45642
  }, [messages.length, autoScroll]);
@@ -45986,7 +46071,7 @@ var init_Timeline = __esm({
45986
46071
  }) => {
45987
46072
  const { t } = useTranslate();
45988
46073
  const entityData = entity ?? [];
45989
- const items = React92__default.useMemo(() => {
46074
+ const items = React93__default.useMemo(() => {
45990
46075
  if (propItems) return propItems;
45991
46076
  if (entityData.length === 0) return [];
45992
46077
  return entityData.map((record, idx) => {
@@ -46088,7 +46173,7 @@ var init_Timeline = __esm({
46088
46173
  }
46089
46174
  });
46090
46175
  function extractToastProps(children) {
46091
- if (!React92__default.isValidElement(children)) {
46176
+ if (!React93__default.isValidElement(children)) {
46092
46177
  if (typeof children === "string") {
46093
46178
  return { message: children };
46094
46179
  }
@@ -46130,7 +46215,7 @@ var init_ToastSlot = __esm({
46130
46215
  eventBus.emit(`${prefix}CLOSE`);
46131
46216
  };
46132
46217
  if (!isVisible) return null;
46133
- const isCustomContent = React92__default.isValidElement(children) && !message;
46218
+ const isCustomContent = React93__default.isValidElement(children) && !message;
46134
46219
  return /* @__PURE__ */ jsx(Box, { className: "fixed bottom-4 right-4 z-50", children: isCustomContent ? children : /* @__PURE__ */ jsx(
46135
46220
  Toast,
46136
46221
  {
@@ -46703,7 +46788,7 @@ function SuspenseConfigProvider({
46703
46788
  config,
46704
46789
  children
46705
46790
  }) {
46706
- return React92__default.createElement(
46791
+ return React93__default.createElement(
46707
46792
  SuspenseConfigContext.Provider,
46708
46793
  { value: config },
46709
46794
  children
@@ -46745,7 +46830,7 @@ function enrichFormFields(fields, entityDef) {
46745
46830
  }
46746
46831
  return { name: field, label: humanizeFieldName(field) };
46747
46832
  }
46748
- if (field && typeof field === "object" && !Array.isArray(field) && !React92__default.isValidElement(field) && !(field instanceof Date)) {
46833
+ if (field && typeof field === "object" && !Array.isArray(field) && !React93__default.isValidElement(field) && !(field instanceof Date)) {
46749
46834
  const obj = field;
46750
46835
  const fieldName = typeof obj.name === "string" ? obj.name : typeof obj.field === "string" ? obj.field : void 0;
46751
46836
  if (!fieldName) return field;
@@ -47217,7 +47302,7 @@ function renderPatternChildren(children, onDismiss, parentId = "root", parentPat
47217
47302
  const key = `${parentId}-${index}-trait:${traitName}`;
47218
47303
  return /* @__PURE__ */ jsx(TraitFrame, { traitName }, key);
47219
47304
  }
47220
- return /* @__PURE__ */ jsx(React92__default.Fragment, { children: child }, `${parentId}-${index}`);
47305
+ return /* @__PURE__ */ jsx(React93__default.Fragment, { children: child }, `${parentId}-${index}`);
47221
47306
  }
47222
47307
  if (!child || typeof child !== "object") return null;
47223
47308
  const childId = `${parentId}-${index}`;
@@ -47274,14 +47359,14 @@ function isPatternConfig(value) {
47274
47359
  if (value === null || value === void 0) return false;
47275
47360
  if (typeof value !== "object") return false;
47276
47361
  if (Array.isArray(value)) return false;
47277
- if (React92__default.isValidElement(value)) return false;
47362
+ if (React93__default.isValidElement(value)) return false;
47278
47363
  if (value instanceof Date) return false;
47279
47364
  if (typeof value === "function") return false;
47280
47365
  const record = value;
47281
47366
  return "type" in record && typeof record.type === "string" && getComponentForPattern$1(record.type) !== null;
47282
47367
  }
47283
47368
  function isPlainConfigObject(value) {
47284
- if (React92__default.isValidElement(value)) return false;
47369
+ if (React93__default.isValidElement(value)) return false;
47285
47370
  if (value instanceof Date) return false;
47286
47371
  const proto = Object.getPrototypeOf(value);
47287
47372
  return proto === Object.prototype || proto === null;
@@ -47417,7 +47502,7 @@ function SlotContentRenderer({
47417
47502
  for (const slotKey of CONTENT_NODE_SLOTS) {
47418
47503
  const slotVal = restProps[slotKey];
47419
47504
  if (slotVal === void 0 || slotVal === null) continue;
47420
- if (React92__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
47505
+ if (React93__default.isValidElement(slotVal) || typeof slotVal === "string" || typeof slotVal === "number" || typeof slotVal === "boolean") continue;
47421
47506
  const typelessChildren = !Array.isArray(slotVal) && typeof slotVal === "object" && !("type" in slotVal) && Array.isArray(slotVal.children) ? slotVal.children : void 0;
47422
47507
  if (typelessChildren !== void 0 || Array.isArray(slotVal) || typeof slotVal === "object" && "type" in slotVal) {
47423
47508
  nodeSlotOverrides[slotKey] = renderPatternChildren(
@@ -47471,7 +47556,7 @@ function SlotContentRenderer({
47471
47556
  const resolvedItems = Array.isArray(entityVal) && entityVal[0] !== "fn" ? entityVal : null;
47472
47557
  if (resolvedItems && resolvedItems.length > 0 && !finalProps.fields && !finalProps.columns) {
47473
47558
  const sample = resolvedItems[0];
47474
- if (sample && typeof sample === "object" && !Array.isArray(sample) && !React92__default.isValidElement(sample) && !(sample instanceof Date)) {
47559
+ if (sample && typeof sample === "object" && !Array.isArray(sample) && !React93__default.isValidElement(sample) && !(sample instanceof Date)) {
47475
47560
  const keys = Object.keys(sample).filter((k) => k !== "id" && k !== "_id");
47476
47561
  finalProps.fields = keys.map((k, i) => ({ name: k, variant: i === 0 ? "h4" : "body" }));
47477
47562
  }
@@ -47838,7 +47923,7 @@ var AvlTransition = ({
47838
47923
  opacity = 1,
47839
47924
  className
47840
47925
  }) => {
47841
- const ids = React92__default.useMemo(() => {
47926
+ const ids = React93__default.useMemo(() => {
47842
47927
  avlTransitionId += 1;
47843
47928
  return { arrow: `avl-tr-${avlTransitionId}-arrow` };
47844
47929
  }, []);
@@ -48399,7 +48484,7 @@ var AvlStateMachine = ({
48399
48484
  color = "var(--color-primary)",
48400
48485
  animated = false
48401
48486
  }) => {
48402
- const ids = React92__default.useMemo(() => {
48487
+ const ids = React93__default.useMemo(() => {
48403
48488
  avlSmId += 1;
48404
48489
  const base = `avl-sm-${avlSmId}`;
48405
48490
  return { glow: `${base}-glow`, grad: `${base}-grad` };
@@ -48598,7 +48683,7 @@ var AvlOrbitalUnit = ({
48598
48683
  color = "var(--color-primary)",
48599
48684
  animated = false
48600
48685
  }) => {
48601
- const ids = React92__default.useMemo(() => {
48686
+ const ids = React93__default.useMemo(() => {
48602
48687
  avlOuId += 1;
48603
48688
  const base = `avl-ou-${avlOuId}`;
48604
48689
  return { glow: `${base}-glow`, grad: `${base}-grad` };
@@ -48694,7 +48779,7 @@ var AvlClosedCircuit = ({
48694
48779
  color = "var(--color-primary)",
48695
48780
  animated = false
48696
48781
  }) => {
48697
- const ids = React92__default.useMemo(() => {
48782
+ const ids = React93__default.useMemo(() => {
48698
48783
  avlCcId += 1;
48699
48784
  const base = `avl-cc-${avlCcId}`;
48700
48785
  return { glow: `${base}-glow`, grad: `${base}-grad`, arrow: `${base}-arrow` };
@@ -48849,7 +48934,7 @@ var AvlEmitListen = ({
48849
48934
  color = "var(--color-primary)",
48850
48935
  animated = false
48851
48936
  }) => {
48852
- const ids = React92__default.useMemo(() => {
48937
+ const ids = React93__default.useMemo(() => {
48853
48938
  avlElId += 1;
48854
48939
  const base = `avl-el-${avlElId}`;
48855
48940
  return { arrow: `${base}-arrow`, grad: `${base}-grad` };
@@ -49123,7 +49208,7 @@ function renderNode(node, color, glowId) {
49123
49208
  const baseR = node.type === "operator" ? 20 : 16;
49124
49209
  const r2 = Math.max(baseR, labelLen * 3.5 + 6);
49125
49210
  const nc = nodeColor(node.type, color);
49126
- return /* @__PURE__ */ jsxs(React92__default.Fragment, { children: [
49211
+ return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
49127
49212
  node.children.map((child, i) => {
49128
49213
  const childR = Math.max(
49129
49214
  child.type === "operator" ? 20 : 16,
@@ -49180,7 +49265,7 @@ var AvlExprTree = ({
49180
49265
  className,
49181
49266
  color = "var(--color-primary)"
49182
49267
  }) => {
49183
- const ids = React92__default.useMemo(() => {
49268
+ const ids = React93__default.useMemo(() => {
49184
49269
  avlEtId += 1;
49185
49270
  return { glow: `avl-et-${avlEtId}-glow` };
49186
49271
  }, []);
@@ -50015,7 +50100,7 @@ var SystemNode = ({ data }) => {
50015
50100
  stateChain.length > 0 && /* @__PURE__ */ jsx("svg", { width: stateChain.length * 14 + 2, height: 10, viewBox: `0 0 ${stateChain.length * 14 + 2} 10`, children: stateChain.map((s, i) => {
50016
50101
  const tc = transitionCounts[s.name] ?? 0;
50017
50102
  const role = getStateRole(s.name, s.isInitial ?? void 0, s.isTerminal ?? void 0, tc, maxTC);
50018
- return /* @__PURE__ */ jsxs(React92__default.Fragment, { children: [
50103
+ return /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
50019
50104
  /* @__PURE__ */ jsx(AvlState, { x: i * 14 + 1, y: 1, width: 10, height: 8, name: "", role, isInitial: s.isInitial ?? void 0, isTerminal: s.isTerminal ?? void 0 }),
50020
50105
  i < stateChain.length - 1 && /* @__PURE__ */ jsx("line", { x1: i * 14 + 12, y1: 5, x2: i * 14 + 15, y2: 5, stroke: "var(--color-border)", strokeWidth: 0.5 })
50021
50106
  ] }, s.name);
@@ -51102,7 +51187,7 @@ function resolveLambdaBindings(body, params, item, index) {
51102
51187
  }
51103
51188
  return substituted;
51104
51189
  }
51105
- if (body !== null && typeof body === "object" && !React92__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
51190
+ if (body !== null && typeof body === "object" && !React93__default.isValidElement(body) && !(body instanceof Date) && typeof body !== "function") {
51106
51191
  const out = {};
51107
51192
  for (const [k, v] of Object.entries(body)) {
51108
51193
  out[k] = recur(v);
@@ -51135,7 +51220,7 @@ function deferLambdaEntityExprs(value) {
51135
51220
  }
51136
51221
  return arr.map((v) => deferLambdaEntityExprs(v));
51137
51222
  }
51138
- if (value !== null && typeof value === "object" && !React92__default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function" && !isRenderBindingMarker(value)) {
51223
+ if (value !== null && typeof value === "object" && !React93__default.isValidElement(value) && !(value instanceof Date) && typeof value !== "function" && !isRenderBindingMarker(value)) {
51139
51224
  const out = {};
51140
51225
  for (const [k, v] of Object.entries(value)) {
51141
51226
  out[k] = deferLambdaEntityExprs(v);
@@ -51149,7 +51234,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
51149
51234
  const resolvedBody = deferLambdaEntityExprs(
51150
51235
  resolveLambdaBindings(lambdaBody, params, item, index)
51151
51236
  );
51152
- if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React92__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
51237
+ if (resolvedBody === null || typeof resolvedBody !== "object" || Array.isArray(resolvedBody) || typeof resolvedBody === "function" || React93__default.isValidElement(resolvedBody) || resolvedBody instanceof Date) {
51153
51238
  return null;
51154
51239
  }
51155
51240
  const record = resolvedBody;
@@ -51168,7 +51253,7 @@ function makeLambdaFn(params, lambdaBody, callerKey) {
51168
51253
  props: childProps,
51169
51254
  priority: 0
51170
51255
  };
51171
- return React92__default.createElement(SlotContentRenderer2, { content: childContent });
51256
+ return React93__default.createElement(SlotContentRenderer2, { content: childContent });
51172
51257
  };
51173
51258
  }
51174
51259
  function convertNode(node, callerKey) {
@@ -51188,7 +51273,7 @@ function convertNode(node, callerKey) {
51188
51273
  });
51189
51274
  return anyChanged ? mapped : node;
51190
51275
  }
51191
- if (typeof node === "object" && !React92__default.isValidElement(node) && !(node instanceof Date)) {
51276
+ if (typeof node === "object" && !React93__default.isValidElement(node) && !(node instanceof Date)) {
51192
51277
  return convertObjectProps(node);
51193
51278
  }
51194
51279
  return node;
@@ -53111,8 +53196,8 @@ function CanvasDndProvider({
53111
53196
  }) {
53112
53197
  const eventBus = useEventBus();
53113
53198
  const sensors = useAlmadarDndSensors(false);
53114
- const [activePayload, setActivePayload] = React92__default.useState(null);
53115
- const handleDragStart = React92__default.useCallback((e) => {
53199
+ const [activePayload, setActivePayload] = React93__default.useState(null);
53200
+ const handleDragStart = React93__default.useCallback((e) => {
53116
53201
  const data = e.active.data.current;
53117
53202
  const payload = data?.payload;
53118
53203
  if (payload) {
@@ -53123,7 +53208,7 @@ function CanvasDndProvider({
53123
53208
  log9.warn("dragStart:missing-payload", { id: e.active.id });
53124
53209
  }
53125
53210
  }, [eventBus]);
53126
- const handleDragEnd = React92__default.useCallback((e) => {
53211
+ const handleDragEnd = React93__default.useCallback((e) => {
53127
53212
  setActivePayload(null);
53128
53213
  const activeData = e.active.data.current;
53129
53214
  const payload = activeData?.payload;
@@ -53152,7 +53237,7 @@ function CanvasDndProvider({
53152
53237
  const suppressed = onDrop ? onDrop(drop) === true : false;
53153
53238
  if (!suppressed) defaultEmit(eventBus, drop);
53154
53239
  }, [eventBus, onDrop]);
53155
- const handleDragCancel = React92__default.useCallback(() => {
53240
+ const handleDragCancel = React93__default.useCallback(() => {
53156
53241
  setActivePayload(null);
53157
53242
  log9.info("dragCancel");
53158
53243
  }, []);
@@ -53910,7 +53995,7 @@ var OrbPreviewNodeInner = (props) => {
53910
53995
  }
53911
53996
  );
53912
53997
  };
53913
- var OrbPreviewNode = React92__default.memo(OrbPreviewNodeInner);
53998
+ var OrbPreviewNode = React93__default.memo(OrbPreviewNodeInner);
53914
53999
  OrbPreviewNode.displayName = "OrbPreviewNode";
53915
54000
  orbPreviewLog.debug("export-resolved", () => ({
53916
54001
  type: typeof OrbPreviewNode,
@@ -54015,7 +54100,7 @@ var EventFlowEdgeInner = (props) => {
54015
54100
  ) })
54016
54101
  ] });
54017
54102
  };
54018
- var EventFlowEdge = React92__default.memo(EventFlowEdgeInner);
54103
+ var EventFlowEdge = React93__default.memo(EventFlowEdgeInner);
54019
54104
  EventFlowEdge.displayName = "EventFlowEdge";
54020
54105
 
54021
54106
  // components/avl/molecules/BehaviorComposeNode.tsx
@@ -54162,7 +54247,7 @@ var BehaviorComposeNodeInner = (props) => {
54162
54247
  }
54163
54248
  );
54164
54249
  };
54165
- var BehaviorComposeNode = React92__default.memo(BehaviorComposeNodeInner);
54250
+ var BehaviorComposeNode = React93__default.memo(BehaviorComposeNodeInner);
54166
54251
  BehaviorComposeNode.displayName = "BehaviorComposeNode";
54167
54252
 
54168
54253
  // components/avl/lib/avl-behavior-compose-converter.ts
@@ -55188,7 +55273,7 @@ var TraitCardNodeInner = (props) => {
55188
55273
  }
55189
55274
  );
55190
55275
  };
55191
- var TraitCardNode = React92__default.memo(TraitCardNodeInner);
55276
+ var TraitCardNode = React93__default.memo(TraitCardNodeInner);
55192
55277
  TraitCardNode.displayName = "TraitCardNode";
55193
55278
 
55194
55279
  // components/avl/organisms/FlowCanvas.tsx
@@ -55269,7 +55354,7 @@ function FlowCanvasInner({
55269
55354
  initialOrbital
55270
55355
  );
55271
55356
  const [expandedBehaviorAlias, setExpandedBehaviorAlias] = useState(void 0);
55272
- const screenSizeUserOverrideRef = React92__default.useRef(false);
55357
+ const screenSizeUserOverrideRef = React93__default.useRef(false);
55273
55358
  const [screenSize, setScreenSize] = useState(
55274
55359
  () => typeof window === "undefined" ? "laptop" : detectScreenSize(window.innerWidth)
55275
55360
  );
@@ -55653,7 +55738,7 @@ var ZoomBreadcrumb = ({
55653
55738
  if (eventName && band === "detail") {
55654
55739
  segments.push({ icon: "\u26A1", label: eventName });
55655
55740
  }
55656
- return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React92__default.Fragment, { children: [
55741
+ return /* @__PURE__ */ jsx("div", { className: "absolute top-2 left-2 z-10 flex items-center gap-1 px-2 py-1 rounded-md bg-card/90 border border-border text-xs text-muted-foreground backdrop-blur-sm", children: segments.map((seg, i) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
55657
55742
  i > 0 && /* @__PURE__ */ jsx("span", { className: "opacity-40", children: ">" }),
55658
55743
  /* @__PURE__ */ jsx("span", { className: "opacity-60", children: seg.icon }),
55659
55744
  /* @__PURE__ */ jsx("span", { children: seg.label })
@@ -55994,7 +56079,7 @@ var EventWireOverlay = ({
55994
56079
  containerW,
55995
56080
  containerH
55996
56081
  }) => {
55997
- const ids = React92__default.useMemo(() => {
56082
+ const ids = React93__default.useMemo(() => {
55998
56083
  avlOczWireId += 1;
55999
56084
  return { arrow: `avl-ocz-wire-${avlOczWireId}-arrow` };
56000
56085
  }, []);
@@ -56361,7 +56446,7 @@ var AvlOrbitalsCosmicZoom = ({
56361
56446
  borderRadius: 6,
56362
56447
  border: `1px solid ${color}`
56363
56448
  },
56364
- children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React92__default.Fragment, { children: [
56449
+ children: /* @__PURE__ */ jsx(HStack, { gap: "xs", align: "center", children: breadcrumbs.map((crumb, i) => /* @__PURE__ */ jsxs(React93__default.Fragment, { children: [
56365
56450
  i > 0 && /* @__PURE__ */ jsx(Typography, { variant: "small", style: { opacity: 0.5, color }, children: "/" }),
56366
56451
  i < breadcrumbs.length - 1 ? /* @__PURE__ */ jsx(
56367
56452
  Box,