@underverse-ui/underverse 0.1.35 → 0.1.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6780,9 +6780,9 @@ function Carousel({
6780
6780
  const [startPos, setStartPos] = React27.useState(0);
6781
6781
  const [currentTranslate, setCurrentTranslate] = React27.useState(0);
6782
6782
  const [prevTranslate, setPrevTranslate] = React27.useState(0);
6783
- const [progress, setProgress] = React27.useState(0);
6783
+ const progressElRef = React27.useRef(null);
6784
6784
  const carouselRef = React27.useRef(null);
6785
- const progressIntervalRef = React27.useRef(null);
6785
+ const rafRef = React27.useRef(null);
6786
6786
  const totalSlides = React27.Children.count(children);
6787
6787
  const maxIndex = Math.max(0, totalSlides - slidesToShow);
6788
6788
  const isHorizontal = orientation === "horizontal";
@@ -6831,29 +6831,32 @@ function Carousel({
6831
6831
  }
6832
6832
  }, [scrollPrev, scrollNext, scrollTo, maxIndex]);
6833
6833
  React27.useEffect(() => {
6834
- if (!autoScroll || isPaused || totalSlides <= slidesToShow) {
6835
- setProgress(0);
6836
- if (progressIntervalRef.current) {
6837
- clearInterval(progressIntervalRef.current);
6834
+ const stop = () => {
6835
+ if (rafRef.current != null) {
6836
+ cancelAnimationFrame(rafRef.current);
6837
+ rafRef.current = null;
6838
6838
  }
6839
+ if (progressElRef.current) progressElRef.current.style.width = "0%";
6840
+ };
6841
+ if (!autoScroll || isPaused || totalSlides <= slidesToShow) {
6842
+ stop();
6839
6843
  return;
6840
6844
  }
6841
- setProgress(0);
6842
- const progressStep = 100 / (autoScrollInterval / 50);
6843
- progressIntervalRef.current = setInterval(() => {
6844
- setProgress((prev) => {
6845
- if (prev >= 100) {
6846
- scrollNext();
6847
- return 0;
6848
- }
6849
- return prev + progressStep;
6850
- });
6851
- }, 50);
6852
- return () => {
6853
- if (progressIntervalRef.current) {
6854
- clearInterval(progressIntervalRef.current);
6845
+ let start = performance.now();
6846
+ const tick = (now) => {
6847
+ const elapsed = now - start;
6848
+ const ratio = Math.min(1, elapsed / autoScrollInterval);
6849
+ if (progressElRef.current) {
6850
+ progressElRef.current.style.width = `${ratio * 100}%`;
6851
+ }
6852
+ if (ratio >= 1) {
6853
+ scrollNext();
6854
+ start = performance.now();
6855
6855
  }
6856
+ rafRef.current = requestAnimationFrame(tick);
6856
6857
  };
6858
+ rafRef.current = requestAnimationFrame(tick);
6859
+ return stop;
6857
6860
  }, [autoScroll, isPaused, totalSlides, slidesToShow, autoScrollInterval, scrollNext]);
6858
6861
  const getPositionX = (event) => {
6859
6862
  return event.type.includes("mouse") ? event.pageX : event.touches[0].clientX;
@@ -6920,7 +6923,7 @@ function Carousel({
6920
6923
  "aria-roledescription": "carousel",
6921
6924
  tabIndex: 0,
6922
6925
  children: [
6923
- showProgress && autoScroll && /* @__PURE__ */ jsx35("div", { className: "absolute top-0 left-0 right-0 h-1 bg-muted z-20", children: /* @__PURE__ */ jsx35("div", { className: "h-full bg-primary transition-all duration-50 ease-linear", style: { width: `${progress}%` } }) }),
6926
+ showProgress && autoScroll && /* @__PURE__ */ jsx35("div", { className: "absolute top-0 left-0 right-0 h-1 bg-muted z-20", children: /* @__PURE__ */ jsx35("div", { ref: progressElRef, className: "h-full bg-primary", style: { width: "0%" } }) }),
6924
6927
  /* @__PURE__ */ jsx35(
6925
6928
  "div",
6926
6929
  {
@@ -7046,23 +7049,313 @@ function Carousel({
7046
7049
  );
7047
7050
  }
7048
7051
 
7052
+ // ../../components/ui/FallingIcons.tsx
7053
+ import React28 from "react";
7054
+ import { jsx as jsx36, jsxs as jsxs31 } from "react/jsx-runtime";
7055
+ var DEFAULT_COUNT = 24;
7056
+ var DEFAULT_SPEED_RANGE = [6, 14];
7057
+ var DEFAULT_SIZE_RANGE = [14, 28];
7058
+ function FallingIcons({
7059
+ icon: Icon,
7060
+ imageUrl,
7061
+ count = DEFAULT_COUNT,
7062
+ className,
7063
+ areaClassName,
7064
+ colorClassName,
7065
+ zIndex = 10,
7066
+ speedRange = DEFAULT_SPEED_RANGE,
7067
+ sizeRange = DEFAULT_SIZE_RANGE,
7068
+ horizontalDrift = 24,
7069
+ spin = true,
7070
+ fullScreen = false,
7071
+ randomizeEachLoop = true,
7072
+ // Modern UI enhancements
7073
+ glow = false,
7074
+ glowColor = "currentColor",
7075
+ glowIntensity = 0.5,
7076
+ trail = false,
7077
+ trailLength = 3,
7078
+ physics,
7079
+ easingFunction = "linear"
7080
+ }) {
7081
+ const uid = React28.useId().replace(/[:]/g, "");
7082
+ const containerRef = React28.useRef(null);
7083
+ const [fallDist, setFallDist] = React28.useState(null);
7084
+ const idRef = React28.useRef(1);
7085
+ const gravity = physics?.gravity ?? 1;
7086
+ const windDirection = physics?.windDirection ?? 0;
7087
+ const windStrength = physics?.windStrength ?? 0;
7088
+ const physicsRotation = physics?.rotation ?? false;
7089
+ const easingMap = {
7090
+ linear: "linear",
7091
+ ease: "ease",
7092
+ "ease-in": "ease-in",
7093
+ "ease-out": "ease-out",
7094
+ "ease-in-out": "ease-in-out",
7095
+ bounce: "cubic-bezier(0.68, -0.55, 0.265, 1.55)",
7096
+ elastic: "cubic-bezier(0.175, 0.885, 0.32, 1.275)"
7097
+ };
7098
+ const makeParticle = React28.useCallback(() => {
7099
+ const rnd = (min, max) => min + Math.random() * (max - min);
7100
+ return {
7101
+ leftPct: rnd(0, 100),
7102
+ size: rnd(sizeRange[0], sizeRange[1]),
7103
+ fallDur: rnd(speedRange[0], speedRange[1]) / gravity,
7104
+ // Apply gravity to speed
7105
+ delay: rnd(-10, 0),
7106
+ driftAmp: rnd(horizontalDrift * 0.5, horizontalDrift) + windDirection * windStrength * 50,
7107
+ // Apply wind
7108
+ spinDur: rnd(2, 6),
7109
+ key: idRef.current++
7110
+ };
7111
+ }, [sizeRange, speedRange, horizontalDrift, gravity, windDirection, windStrength]);
7112
+ const [particles, setParticles] = React28.useState([]);
7113
+ React28.useEffect(() => {
7114
+ const arr = Array.from({ length: Math.max(0, count) }).map(() => makeParticle());
7115
+ setParticles(arr);
7116
+ }, [count, makeParticle]);
7117
+ React28.useEffect(() => {
7118
+ if (fullScreen) {
7119
+ const measure2 = () => setFallDist(window.innerHeight + 200);
7120
+ measure2();
7121
+ window.addEventListener("resize", measure2);
7122
+ return () => window.removeEventListener("resize", measure2);
7123
+ }
7124
+ const el = containerRef.current;
7125
+ if (!el) return;
7126
+ const measure = () => setFallDist(el.offsetHeight + 200);
7127
+ measure();
7128
+ const ResizeObserverCtor = window.ResizeObserver;
7129
+ if (ResizeObserverCtor) {
7130
+ const ro = new ResizeObserverCtor(measure);
7131
+ ro.observe(el);
7132
+ return () => ro.disconnect();
7133
+ }
7134
+ window.addEventListener("resize", measure);
7135
+ return () => window.removeEventListener("resize", measure);
7136
+ }, [fullScreen]);
7137
+ const FallName = `uv-fall-${uid}`;
7138
+ const SwayName = `uv-sway-${uid}`;
7139
+ const SpinName = `uv-spin-${uid}`;
7140
+ const PopName = `uv-pop-${uid}`;
7141
+ const PhysicsSpinName = `uv-physics-spin-${uid}`;
7142
+ const glowStyles = React28.useMemo(() => {
7143
+ if (!glow) return {};
7144
+ const intensity = Math.max(0, Math.min(1, glowIntensity));
7145
+ return {
7146
+ filter: `drop-shadow(0 0 ${4 * intensity}px ${glowColor}) drop-shadow(0 0 ${8 * intensity}px ${glowColor})`
7147
+ };
7148
+ }, [glow, glowColor, glowIntensity]);
7149
+ const FallbackIcon = React28.useMemo(() => (props) => /* @__PURE__ */ jsx36("svg", { viewBox: "0 0 24 24", fill: "currentColor", "aria-hidden": "true", ...props, children: /* @__PURE__ */ jsx36("circle", { cx: "12", cy: "12", r: "10" }) }), []);
7150
+ const TheIcon = imageUrl ? ({ className: imgClassName }) => /* @__PURE__ */ jsx36(
7151
+ "img",
7152
+ {
7153
+ src: imageUrl,
7154
+ alt: "",
7155
+ className: cn("w-full h-full object-cover rounded-sm", imgClassName),
7156
+ draggable: false
7157
+ }
7158
+ ) : Icon || FallbackIcon;
7159
+ return /* @__PURE__ */ jsxs31(
7160
+ "div",
7161
+ {
7162
+ ref: containerRef,
7163
+ className: cn(
7164
+ fullScreen ? "fixed inset-0 overflow-hidden pointer-events-none" : "relative w-full h-full overflow-hidden",
7165
+ areaClassName
7166
+ ),
7167
+ style: { zIndex },
7168
+ children: [
7169
+ /* @__PURE__ */ jsx36("style", { children: `
7170
+ @keyframes ${FallName} {
7171
+ 0% { transform: translate3d(0, -10vh, 0); opacity: 0; }
7172
+ 10% { opacity: 1; }
7173
+ 100% { transform: translate3d(0, var(--fall, 120vh), 0); opacity: 0.95; }
7174
+ }
7175
+ @keyframes ${SwayName} {
7176
+ 0% { transform: translateX(0); }
7177
+ 50% { transform: translateX(var(--amp, 16px)); }
7178
+ 100% { transform: translateX(0); }
7179
+ }
7180
+ @keyframes ${SpinName} {
7181
+ 0% { transform: rotate(0deg); }
7182
+ 100% { transform: rotate(360deg); }
7183
+ }
7184
+ @keyframes ${PopName} {
7185
+ 0% { opacity: 1; transform: scale(1); }
7186
+ 100% { opacity: 0; transform: scale(0.3); }
7187
+ }
7188
+ @keyframes ${PhysicsSpinName} {
7189
+ 0% { transform: rotate(0deg) scale(1); }
7190
+ 25% { transform: rotate(90deg) scale(1.05); }
7191
+ 50% { transform: rotate(180deg) scale(1); }
7192
+ 75% { transform: rotate(270deg) scale(1.05); }
7193
+ 100% { transform: rotate(360deg) scale(1); }
7194
+ }
7195
+ @media (prefers-reduced-motion: reduce) {
7196
+ .uv-falling-particle {
7197
+ animation-duration: 0.01ms !important;
7198
+ animation-iteration-count: 1 !important;
7199
+ }
7200
+ }
7201
+ ` }),
7202
+ /* @__PURE__ */ jsx36(
7203
+ "div",
7204
+ {
7205
+ className: cn(
7206
+ "absolute inset-0 pointer-events-none",
7207
+ className
7208
+ ),
7209
+ "aria-hidden": true,
7210
+ children: particles.map((p, i) => {
7211
+ const swayDuration = p.fallDur * (0.8 + i % 5 * 0.05);
7212
+ const spinDuration = Math.max(1, p.spinDur);
7213
+ const handlePop = () => {
7214
+ setParticles((prev) => {
7215
+ const next = prev.slice();
7216
+ const np = makeParticle();
7217
+ np.delay = -Math.random() * 8;
7218
+ next[i] = np;
7219
+ return next;
7220
+ });
7221
+ };
7222
+ const trailParticles = trail ? Array.from({ length: Math.min(5, Math.max(1, trailLength)) }) : [];
7223
+ return /* @__PURE__ */ jsxs31(React28.Fragment, { children: [
7224
+ trail && trailParticles.map((_, trailIndex) => {
7225
+ const trailDelay = p.delay - (trailIndex + 1) * 0.15;
7226
+ const trailOpacity = 1 - (trailIndex + 1) * (1 / (trailParticles.length + 1));
7227
+ const trailScale = 1 - (trailIndex + 1) * 0.15;
7228
+ return /* @__PURE__ */ jsx36(
7229
+ "span",
7230
+ {
7231
+ className: cn("absolute top-0 will-change-transform pointer-events-none uv-falling-particle", colorClassName),
7232
+ style: {
7233
+ left: `${p.leftPct}%`,
7234
+ animationDelay: `${trailDelay}s`,
7235
+ animationDuration: `${p.fallDur}s`,
7236
+ animationName: FallName,
7237
+ animationTimingFunction: easingMap[easingFunction] || "linear",
7238
+ animationIterationCount: "infinite",
7239
+ opacity: trailOpacity * 0.4,
7240
+ ["--fall"]: `${fallDist ?? (typeof window !== "undefined" ? window.innerHeight + 200 : 1200)}px`
7241
+ },
7242
+ children: /* @__PURE__ */ jsx36(
7243
+ "span",
7244
+ {
7245
+ className: "inline-block uv-sway",
7246
+ style: {
7247
+ transform: `translateX(-50%) scale(${trailScale})`,
7248
+ animationName: SwayName,
7249
+ animationDuration: `${swayDuration}s`,
7250
+ animationTimingFunction: "ease-in-out",
7251
+ animationIterationCount: "infinite",
7252
+ ["--amp"]: `${Math.round(p.driftAmp)}px`
7253
+ },
7254
+ children: /* @__PURE__ */ jsx36(
7255
+ "span",
7256
+ {
7257
+ className: "block",
7258
+ style: {
7259
+ width: p.size,
7260
+ height: p.size,
7261
+ ...glowStyles
7262
+ },
7263
+ children: /* @__PURE__ */ jsx36(TheIcon, { className: cn("w-full h-full text-primary/70", colorClassName) })
7264
+ }
7265
+ )
7266
+ }
7267
+ )
7268
+ },
7269
+ `${p.key}-trail-${trailIndex}`
7270
+ );
7271
+ }),
7272
+ /* @__PURE__ */ jsx36(
7273
+ "span",
7274
+ {
7275
+ className: cn("absolute top-0 will-change-transform pointer-events-auto uv-falling-particle", colorClassName),
7276
+ style: {
7277
+ left: `${p.leftPct}%`,
7278
+ animationDelay: `${p.delay}s`,
7279
+ animationDuration: `${p.fallDur}s`,
7280
+ animationName: FallName,
7281
+ animationTimingFunction: easingMap[easingFunction] || "linear",
7282
+ animationIterationCount: "infinite",
7283
+ ["--fall"]: `${fallDist ?? (typeof window !== "undefined" ? window.innerHeight + 200 : 1200)}px`
7284
+ },
7285
+ onMouseEnter: handlePop,
7286
+ onAnimationIteration: (ev) => {
7287
+ if (ev.currentTarget !== ev.target) return;
7288
+ if (!randomizeEachLoop) return;
7289
+ if (ev.animationName !== FallName) return;
7290
+ setParticles((prev) => {
7291
+ const next = prev.slice();
7292
+ const np = makeParticle();
7293
+ np.delay = -Math.random() * 4;
7294
+ next[i] = np;
7295
+ return next;
7296
+ });
7297
+ },
7298
+ children: /* @__PURE__ */ jsx36(
7299
+ "span",
7300
+ {
7301
+ className: "inline-block uv-sway",
7302
+ style: {
7303
+ transform: `translateX(-50%)`,
7304
+ animationName: SwayName,
7305
+ animationDuration: `${swayDuration}s`,
7306
+ animationTimingFunction: "ease-in-out",
7307
+ animationIterationCount: "infinite",
7308
+ ["--amp"]: `${Math.round(p.driftAmp)}px`
7309
+ },
7310
+ children: /* @__PURE__ */ jsx36(
7311
+ "span",
7312
+ {
7313
+ className: cn(
7314
+ "block uv-spin hover:[animation:var(--popName)_0.35s_ease-out_forwards]",
7315
+ physicsRotation ? "[animation:var(--physicsSpinName)_var(--spinDur)_ease-in-out_infinite]" : spin && "[animation:var(--spinName)_var(--spinDur)_linear_infinite]"
7316
+ ),
7317
+ style: {
7318
+ width: p.size,
7319
+ height: p.size,
7320
+ ["--spinName"]: SpinName,
7321
+ ["--physicsSpinName"]: PhysicsSpinName,
7322
+ ["--spinDur"]: `${spinDuration}s`,
7323
+ ["--popName"]: PopName,
7324
+ ...glowStyles
7325
+ },
7326
+ children: /* @__PURE__ */ jsx36(TheIcon, { className: cn("w-full h-full text-primary/70", colorClassName) })
7327
+ }
7328
+ )
7329
+ }
7330
+ )
7331
+ }
7332
+ )
7333
+ ] }, p.key);
7334
+ })
7335
+ }
7336
+ )
7337
+ ]
7338
+ }
7339
+ );
7340
+ }
7341
+
7049
7342
  // ../../components/ui/ClientOnly.tsx
7050
7343
  import { useEffect as useEffect14, useState as useState25 } from "react";
7051
- import { Fragment as Fragment10, jsx as jsx36 } from "react/jsx-runtime";
7344
+ import { Fragment as Fragment10, jsx as jsx37 } from "react/jsx-runtime";
7052
7345
  function ClientOnly({ children, fallback = null }) {
7053
7346
  const [hasMounted, setHasMounted] = useState25(false);
7054
7347
  useEffect14(() => {
7055
7348
  setHasMounted(true);
7056
7349
  }, []);
7057
7350
  if (!hasMounted) {
7058
- return /* @__PURE__ */ jsx36(Fragment10, { children: fallback });
7351
+ return /* @__PURE__ */ jsx37(Fragment10, { children: fallback });
7059
7352
  }
7060
- return /* @__PURE__ */ jsx36(Fragment10, { children });
7353
+ return /* @__PURE__ */ jsx37(Fragment10, { children });
7061
7354
  }
7062
7355
 
7063
7356
  // ../../components/ui/Loading.tsx
7064
7357
  import { Activity as Activity3 } from "lucide-react";
7065
- import { jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
7358
+ import { jsx as jsx38, jsxs as jsxs32 } from "react/jsx-runtime";
7066
7359
  var LoadingSpinner = ({
7067
7360
  size = "md",
7068
7361
  className,
@@ -7078,7 +7371,7 @@ var LoadingSpinner = ({
7078
7371
  foreground: "text-foreground",
7079
7372
  muted: "text-muted-foreground"
7080
7373
  };
7081
- return /* @__PURE__ */ jsx37(
7374
+ return /* @__PURE__ */ jsx38(
7082
7375
  Activity3,
7083
7376
  {
7084
7377
  className: cn(
@@ -7099,7 +7392,7 @@ var LoadingDots = ({
7099
7392
  foreground: "bg-foreground",
7100
7393
  muted: "bg-muted-foreground"
7101
7394
  };
7102
- return /* @__PURE__ */ jsx37("div", { className: cn("flex items-center space-x-1", className), children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx37(
7395
+ return /* @__PURE__ */ jsx38("div", { className: cn("flex items-center space-x-1", className), children: [0, 1, 2].map((i) => /* @__PURE__ */ jsx38(
7103
7396
  "div",
7104
7397
  {
7105
7398
  className: cn(
@@ -7121,7 +7414,7 @@ var LoadingBar = ({
7121
7414
  label
7122
7415
  }) => {
7123
7416
  const pct = progress ? Math.min(Math.max(progress, 0), 100) : void 0;
7124
- return /* @__PURE__ */ jsx37(
7417
+ return /* @__PURE__ */ jsx38(
7125
7418
  "div",
7126
7419
  {
7127
7420
  className: cn("w-full bg-muted rounded-full h-2", className),
@@ -7130,7 +7423,7 @@ var LoadingBar = ({
7130
7423
  "aria-valuemax": pct === void 0 ? void 0 : 100,
7131
7424
  "aria-valuenow": pct === void 0 ? void 0 : Math.round(pct),
7132
7425
  "aria-label": label || "Loading",
7133
- children: /* @__PURE__ */ jsx37(
7426
+ children: /* @__PURE__ */ jsx38(
7134
7427
  "div",
7135
7428
  {
7136
7429
  className: cn(
@@ -7147,10 +7440,10 @@ var LoadingBar = ({
7147
7440
  };
7148
7441
 
7149
7442
  // ../../components/ui/Table.tsx
7150
- import React28 from "react";
7151
- import { jsx as jsx38, jsxs as jsxs32 } from "react/jsx-runtime";
7152
- var Table = React28.forwardRef(
7153
- ({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx38(
7443
+ import React29 from "react";
7444
+ import { jsx as jsx39, jsxs as jsxs33 } from "react/jsx-runtime";
7445
+ var Table = React29.forwardRef(
7446
+ ({ className, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx39(
7154
7447
  "div",
7155
7448
  {
7156
7449
  className: cn(
@@ -7160,7 +7453,7 @@ var Table = React28.forwardRef(
7160
7453
  "backdrop-blur-sm transition-all duration-300",
7161
7454
  containerClassName
7162
7455
  ),
7163
- children: /* @__PURE__ */ jsx38(
7456
+ children: /* @__PURE__ */ jsx39(
7164
7457
  "table",
7165
7458
  {
7166
7459
  ref,
@@ -7172,8 +7465,8 @@ var Table = React28.forwardRef(
7172
7465
  )
7173
7466
  );
7174
7467
  Table.displayName = "Table";
7175
- var TableHeader = React28.forwardRef(
7176
- ({ className, children, filterRow, ...props }, ref) => /* @__PURE__ */ jsxs32(
7468
+ var TableHeader = React29.forwardRef(
7469
+ ({ className, children, filterRow, ...props }, ref) => /* @__PURE__ */ jsxs33(
7177
7470
  "thead",
7178
7471
  {
7179
7472
  ref,
@@ -7191,7 +7484,7 @@ var TableHeader = React28.forwardRef(
7191
7484
  )
7192
7485
  );
7193
7486
  TableHeader.displayName = "TableHeader";
7194
- var TableBody = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
7487
+ var TableBody = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
7195
7488
  "tbody",
7196
7489
  {
7197
7490
  ref,
@@ -7200,7 +7493,7 @@ var TableBody = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE_
7200
7493
  }
7201
7494
  ));
7202
7495
  TableBody.displayName = "TableBody";
7203
- var TableFooter = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
7496
+ var TableFooter = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
7204
7497
  "tfoot",
7205
7498
  {
7206
7499
  ref,
@@ -7212,7 +7505,7 @@ var TableFooter = React28.forwardRef(({ className, ...props }, ref) => /* @__PUR
7212
7505
  }
7213
7506
  ));
7214
7507
  TableFooter.displayName = "TableFooter";
7215
- var TableRow = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
7508
+ var TableRow = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
7216
7509
  "tr",
7217
7510
  {
7218
7511
  ref,
@@ -7226,7 +7519,7 @@ var TableRow = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__
7226
7519
  }
7227
7520
  ));
7228
7521
  TableRow.displayName = "TableRow";
7229
- var TableHead = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
7522
+ var TableHead = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
7230
7523
  "th",
7231
7524
  {
7232
7525
  ref,
@@ -7238,7 +7531,7 @@ var TableHead = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE_
7238
7531
  }
7239
7532
  ));
7240
7533
  TableHead.displayName = "TableHead";
7241
- var TableCell = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
7534
+ var TableCell = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
7242
7535
  "td",
7243
7536
  {
7244
7537
  ref,
@@ -7247,7 +7540,7 @@ var TableCell = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE_
7247
7540
  }
7248
7541
  ));
7249
7542
  TableCell.displayName = "TableCell";
7250
- var TableCaption = React28.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx38(
7543
+ var TableCaption = React29.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx39(
7251
7544
  "caption",
7252
7545
  {
7253
7546
  ref,
@@ -7259,12 +7552,12 @@ TableCaption.displayName = "TableCaption";
7259
7552
 
7260
7553
  // ../../components/ui/DataTable.tsx
7261
7554
  import { Filter as FilterIcon } from "lucide-react";
7262
- import React29 from "react";
7555
+ import React30 from "react";
7263
7556
  import { useTranslations as useTranslations7 } from "next-intl";
7264
- import { jsx as jsx39, jsxs as jsxs33 } from "react/jsx-runtime";
7557
+ import { jsx as jsx40, jsxs as jsxs34 } from "react/jsx-runtime";
7265
7558
  function useDebounced(value, delay = 300) {
7266
- const [debounced, setDebounced] = React29.useState(value);
7267
- React29.useEffect(() => {
7559
+ const [debounced, setDebounced] = React30.useState(value);
7560
+ React30.useEffect(() => {
7268
7561
  const id = setTimeout(() => setDebounced(value), delay);
7269
7562
  return () => clearTimeout(id);
7270
7563
  }, [value, delay]);
@@ -7291,20 +7584,20 @@ function DataTable({
7291
7584
  labels
7292
7585
  }) {
7293
7586
  const t = useTranslations7("Common");
7294
- const [visibleCols, setVisibleCols] = React29.useState(() => columns.filter((c) => c.visible !== false).map((c) => c.key));
7295
- const [filters, setFilters] = React29.useState({});
7296
- const [sort, setSort] = React29.useState(null);
7297
- const [density, setDensity] = React29.useState("normal");
7298
- const [curPage, setCurPage] = React29.useState(page);
7299
- const [curPageSize, setCurPageSize] = React29.useState(pageSize);
7587
+ const [visibleCols, setVisibleCols] = React30.useState(() => columns.filter((c) => c.visible !== false).map((c) => c.key));
7588
+ const [filters, setFilters] = React30.useState({});
7589
+ const [sort, setSort] = React30.useState(null);
7590
+ const [density, setDensity] = React30.useState("normal");
7591
+ const [curPage, setCurPage] = React30.useState(page);
7592
+ const [curPageSize, setCurPageSize] = React30.useState(pageSize);
7300
7593
  const debouncedFilters = useDebounced(filters, 350);
7301
- React29.useEffect(() => {
7594
+ React30.useEffect(() => {
7302
7595
  setCurPage(page);
7303
7596
  }, [page]);
7304
- React29.useEffect(() => {
7597
+ React30.useEffect(() => {
7305
7598
  setCurPageSize(pageSize);
7306
7599
  }, [pageSize]);
7307
- React29.useEffect(() => {
7600
+ React30.useEffect(() => {
7308
7601
  if (!onQueryChange) return;
7309
7602
  onQueryChange({ filters: debouncedFilters, sort, page: curPage, pageSize: curPageSize });
7310
7603
  }, [debouncedFilters, sort, curPage, curPageSize]);
@@ -7323,7 +7616,7 @@ function DataTable({
7323
7616
  className: "h-8 w-full text-sm"
7324
7617
  };
7325
7618
  if (col.filter.type === "text") {
7326
- return /* @__PURE__ */ jsx39(
7619
+ return /* @__PURE__ */ jsx40(
7327
7620
  Input_default,
7328
7621
  {
7329
7622
  ...commonProps,
@@ -7338,7 +7631,7 @@ function DataTable({
7338
7631
  }
7339
7632
  if (col.filter.type === "select") {
7340
7633
  const options = col.filter.options || [];
7341
- return /* @__PURE__ */ jsx39(
7634
+ return /* @__PURE__ */ jsx40(
7342
7635
  Combobox,
7343
7636
  {
7344
7637
  options: ["", ...options],
@@ -7354,7 +7647,7 @@ function DataTable({
7354
7647
  );
7355
7648
  }
7356
7649
  if (col.filter.type === "date") {
7357
- return /* @__PURE__ */ jsx39(
7650
+ return /* @__PURE__ */ jsx40(
7358
7651
  DatePicker,
7359
7652
  {
7360
7653
  placeholder: col.filter.placeholder || `Select ${String(col.title)}`,
@@ -7368,7 +7661,7 @@ function DataTable({
7368
7661
  }
7369
7662
  return null;
7370
7663
  };
7371
- const renderHeader = /* @__PURE__ */ jsx39(TableRow, { children: visibleColumns.map((col, colIdx) => /* @__PURE__ */ jsx39(
7664
+ const renderHeader = /* @__PURE__ */ jsx40(TableRow, { children: visibleColumns.map((col, colIdx) => /* @__PURE__ */ jsx40(
7372
7665
  TableHead,
7373
7666
  {
7374
7667
  style: { width: col.width },
@@ -7377,10 +7670,10 @@ function DataTable({
7377
7670
  col.align === "center" && "text-center",
7378
7671
  columnDividers && colIdx > 0 && "border-l border-border/60"
7379
7672
  ),
7380
- children: /* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-between gap-2 select-none min-h-[2.5rem]", children: [
7381
- /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-1 min-w-0 flex-1", children: [
7382
- /* @__PURE__ */ jsx39("span", { className: "truncate font-medium text-sm", children: col.title }),
7383
- col.sortable && /* @__PURE__ */ jsx39(
7673
+ children: /* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-between gap-2 select-none min-h-[2.5rem]", children: [
7674
+ /* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-1 min-w-0 flex-1", children: [
7675
+ /* @__PURE__ */ jsx40("span", { className: "truncate font-medium text-sm", children: col.title }),
7676
+ col.sortable && /* @__PURE__ */ jsx40(
7384
7677
  "button",
7385
7678
  {
7386
7679
  className: cn(
@@ -7397,8 +7690,8 @@ function DataTable({
7397
7690
  },
7398
7691
  "aria-label": "Sort",
7399
7692
  title: `Sort by ${String(col.title)}`,
7400
- children: /* @__PURE__ */ jsxs33("svg", { width: "14", height: "14", viewBox: "0 0 20 20", fill: "none", className: "inline-block", children: [
7401
- /* @__PURE__ */ jsx39(
7693
+ children: /* @__PURE__ */ jsxs34("svg", { width: "14", height: "14", viewBox: "0 0 20 20", fill: "none", className: "inline-block", children: [
7694
+ /* @__PURE__ */ jsx40(
7402
7695
  "path",
7403
7696
  {
7404
7697
  d: "M7 8l3-3 3 3",
@@ -7409,7 +7702,7 @@ function DataTable({
7409
7702
  opacity: sort?.key === col.key && sort.order === "asc" ? 1 : 0.4
7410
7703
  }
7411
7704
  ),
7412
- /* @__PURE__ */ jsx39(
7705
+ /* @__PURE__ */ jsx40(
7413
7706
  "path",
7414
7707
  {
7415
7708
  d: "M7 12l3 3 3-3",
@@ -7424,11 +7717,11 @@ function DataTable({
7424
7717
  }
7425
7718
  )
7426
7719
  ] }),
7427
- col.filter && /* @__PURE__ */ jsx39(
7720
+ col.filter && /* @__PURE__ */ jsx40(
7428
7721
  Popover,
7429
7722
  {
7430
7723
  placement: "bottom-start",
7431
- trigger: /* @__PURE__ */ jsx39(
7724
+ trigger: /* @__PURE__ */ jsx40(
7432
7725
  "button",
7433
7726
  {
7434
7727
  className: cn(
@@ -7438,16 +7731,16 @@ function DataTable({
7438
7731
  ),
7439
7732
  "aria-label": "Filter",
7440
7733
  title: "Filter",
7441
- children: /* @__PURE__ */ jsx39(FilterIcon, { className: "h-4 w-4" })
7734
+ children: /* @__PURE__ */ jsx40(FilterIcon, { className: "h-4 w-4" })
7442
7735
  }
7443
7736
  ),
7444
- children: /* @__PURE__ */ jsxs33("div", { className: "w-48 p-2 space-y-2", children: [
7445
- /* @__PURE__ */ jsxs33("div", { className: "text-xs font-medium text-muted-foreground mb-2", children: [
7737
+ children: /* @__PURE__ */ jsxs34("div", { className: "w-48 p-2 space-y-2", children: [
7738
+ /* @__PURE__ */ jsxs34("div", { className: "text-xs font-medium text-muted-foreground mb-2", children: [
7446
7739
  "Filter ",
7447
7740
  col.title
7448
7741
  ] }),
7449
7742
  renderFilterControl(col),
7450
- filters[col.key] && /* @__PURE__ */ jsx39(
7743
+ filters[col.key] && /* @__PURE__ */ jsx40(
7451
7744
  "button",
7452
7745
  {
7453
7746
  onClick: () => {
@@ -7470,20 +7763,20 @@ function DataTable({
7470
7763
  col.key
7471
7764
  )) });
7472
7765
  const isServerMode = Boolean(onQueryChange);
7473
- const displayedData = isServerMode ? data : React29.useMemo(() => {
7766
+ const displayedData = isServerMode ? data : React30.useMemo(() => {
7474
7767
  const start = (curPage - 1) * curPageSize;
7475
7768
  return data.slice(start, start + curPageSize);
7476
7769
  }, [data, curPage, curPageSize]);
7477
7770
  const totalItems = isServerMode ? total : data.length;
7478
- return /* @__PURE__ */ jsxs33("div", { className: cn("space-y-2", className), children: [
7479
- /* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-between gap-4 mb-1", children: [
7480
- /* @__PURE__ */ jsx39("div", { className: "text-sm text-muted-foreground", children: caption }),
7481
- /* @__PURE__ */ jsxs33("div", { className: "flex items-center gap-2", children: [
7482
- enableDensityToggle && /* @__PURE__ */ jsx39(
7771
+ return /* @__PURE__ */ jsxs34("div", { className: cn("space-y-2", className), children: [
7772
+ /* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-between gap-4 mb-1", children: [
7773
+ /* @__PURE__ */ jsx40("div", { className: "text-sm text-muted-foreground", children: caption }),
7774
+ /* @__PURE__ */ jsxs34("div", { className: "flex items-center gap-2", children: [
7775
+ enableDensityToggle && /* @__PURE__ */ jsx40(
7483
7776
  DropdownMenu_default,
7484
7777
  {
7485
- trigger: /* @__PURE__ */ jsxs33(Button_default, { variant: "ghost", size: "sm", className: "h-8 px-2", children: [
7486
- /* @__PURE__ */ jsx39("svg", { className: "w-4 h-4 mr-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx39("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 10h16M4 14h16M4 18h16" }) }),
7778
+ trigger: /* @__PURE__ */ jsxs34(Button_default, { variant: "ghost", size: "sm", className: "h-8 px-2", children: [
7779
+ /* @__PURE__ */ jsx40("svg", { className: "w-4 h-4 mr-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx40("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M4 6h16M4 10h16M4 14h16M4 18h16" }) }),
7487
7780
  labels?.density || t("density")
7488
7781
  ] }),
7489
7782
  items: [
@@ -7493,11 +7786,11 @@ function DataTable({
7493
7786
  ]
7494
7787
  }
7495
7788
  ),
7496
- enableColumnVisibilityToggle && /* @__PURE__ */ jsx39(
7789
+ enableColumnVisibilityToggle && /* @__PURE__ */ jsx40(
7497
7790
  DropdownMenu_default,
7498
7791
  {
7499
- trigger: /* @__PURE__ */ jsxs33(Button_default, { variant: "ghost", size: "sm", className: "h-8 px-2", children: [
7500
- /* @__PURE__ */ jsx39("svg", { className: "w-4 h-4 mr-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx39(
7792
+ trigger: /* @__PURE__ */ jsxs34(Button_default, { variant: "ghost", size: "sm", className: "h-8 px-2", children: [
7793
+ /* @__PURE__ */ jsx40("svg", { className: "w-4 h-4 mr-1", fill: "none", stroke: "currentColor", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx40(
7501
7794
  "path",
7502
7795
  {
7503
7796
  strokeLinecap: "round",
@@ -7508,15 +7801,15 @@ function DataTable({
7508
7801
  ) }),
7509
7802
  labels?.columns || t("columns")
7510
7803
  ] }),
7511
- children: columns.map((c) => /* @__PURE__ */ jsxs33(
7804
+ children: columns.map((c) => /* @__PURE__ */ jsxs34(
7512
7805
  DropdownMenuItem,
7513
7806
  {
7514
7807
  onClick: () => {
7515
7808
  setVisibleCols((prev) => prev.includes(c.key) ? prev.filter((k) => k !== c.key) : [...prev, c.key]);
7516
7809
  },
7517
7810
  children: [
7518
- /* @__PURE__ */ jsx39("input", { type: "checkbox", className: "mr-2 rounded border-border", readOnly: true, checked: visibleCols.includes(c.key) }),
7519
- /* @__PURE__ */ jsx39("span", { className: "truncate", children: c.title })
7811
+ /* @__PURE__ */ jsx40("input", { type: "checkbox", className: "mr-2 rounded border-border", readOnly: true, checked: visibleCols.includes(c.key) }),
7812
+ /* @__PURE__ */ jsx40("span", { className: "truncate", children: c.title })
7520
7813
  ]
7521
7814
  },
7522
7815
  c.key
@@ -7526,17 +7819,17 @@ function DataTable({
7526
7819
  toolbar
7527
7820
  ] })
7528
7821
  ] }),
7529
- /* @__PURE__ */ jsx39("div", { className: cn("relative rounded-md border border-border/50 overflow-hidden", loading2 && "opacity-60 pointer-events-none"), children: /* @__PURE__ */ jsxs33(
7822
+ /* @__PURE__ */ jsx40("div", { className: cn("relative rounded-md border border-border/50 overflow-hidden", loading2 && "opacity-60 pointer-events-none"), children: /* @__PURE__ */ jsxs34(
7530
7823
  Table,
7531
7824
  {
7532
7825
  containerClassName: "border-0 md:border-0 rounded-none md:rounded-none shadow-none bg-transparent",
7533
7826
  className: "[&_thead]:sticky [&_thead]:top-0 [&_thead]:z-[5] [&_thead]:bg-background [&_thead]:backdrop-blur-sm",
7534
7827
  children: [
7535
- /* @__PURE__ */ jsx39(TableHeader, { children: renderHeader }),
7536
- /* @__PURE__ */ jsx39(TableBody, { children: loading2 ? /* @__PURE__ */ jsx39(TableRow, { children: /* @__PURE__ */ jsx39(TableCell, { colSpan: visibleColumns.length, className: "text-center py-8", children: /* @__PURE__ */ jsxs33("div", { className: "flex items-center justify-center gap-2 text-muted-foreground", children: [
7537
- /* @__PURE__ */ jsxs33("svg", { className: "animate-spin h-4 w-4", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
7538
- /* @__PURE__ */ jsx39("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
7539
- /* @__PURE__ */ jsx39(
7828
+ /* @__PURE__ */ jsx40(TableHeader, { children: renderHeader }),
7829
+ /* @__PURE__ */ jsx40(TableBody, { children: loading2 ? /* @__PURE__ */ jsx40(TableRow, { children: /* @__PURE__ */ jsx40(TableCell, { colSpan: visibleColumns.length, className: "text-center py-8", children: /* @__PURE__ */ jsxs34("div", { className: "flex items-center justify-center gap-2 text-muted-foreground", children: [
7830
+ /* @__PURE__ */ jsxs34("svg", { className: "animate-spin h-4 w-4", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [
7831
+ /* @__PURE__ */ jsx40("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }),
7832
+ /* @__PURE__ */ jsx40(
7540
7833
  "path",
7541
7834
  {
7542
7835
  className: "opacity-75",
@@ -7545,10 +7838,10 @@ function DataTable({
7545
7838
  }
7546
7839
  )
7547
7840
  ] }),
7548
- /* @__PURE__ */ jsx39("span", { className: "text-sm", children: "Loading..." })
7549
- ] }) }) }) : !displayedData || displayedData.length === 0 ? /* @__PURE__ */ jsx39(TableRow, { children: /* @__PURE__ */ jsx39(TableCell, { colSpan: visibleColumns.length, className: "text-center py-6 text-muted-foreground", children: "No data" }) }) : displayedData.map((row, idx) => /* @__PURE__ */ jsx39(TableRow, { className: cn(densityRowClass, striped && idx % 2 === 0 && "bg-muted/30"), children: visibleColumns.map((col, colIdx) => {
7841
+ /* @__PURE__ */ jsx40("span", { className: "text-sm", children: "Loading..." })
7842
+ ] }) }) }) : !displayedData || displayedData.length === 0 ? /* @__PURE__ */ jsx40(TableRow, { children: /* @__PURE__ */ jsx40(TableCell, { colSpan: visibleColumns.length, className: "text-center py-6 text-muted-foreground", children: "No data" }) }) : displayedData.map((row, idx) => /* @__PURE__ */ jsx40(TableRow, { className: cn(densityRowClass, striped && idx % 2 === 0 && "bg-muted/30"), children: visibleColumns.map((col, colIdx) => {
7550
7843
  const value = col.dataIndex ? row[col.dataIndex] : void 0;
7551
- return /* @__PURE__ */ jsx39(
7844
+ return /* @__PURE__ */ jsx40(
7552
7845
  TableCell,
7553
7846
  {
7554
7847
  className: cn(
@@ -7567,7 +7860,7 @@ function DataTable({
7567
7860
  ]
7568
7861
  }
7569
7862
  ) }),
7570
- totalItems > 0 && /* @__PURE__ */ jsx39("div", { className: "border-t bg-muted/30 p-4 rounded-b-md", children: /* @__PURE__ */ jsx39(
7863
+ totalItems > 0 && /* @__PURE__ */ jsx40("div", { className: "border-t bg-muted/30 p-4 rounded-b-md", children: /* @__PURE__ */ jsx40(
7571
7864
  Pagination,
7572
7865
  {
7573
7866
  page: curPage,
@@ -7589,10 +7882,10 @@ function DataTable({
7589
7882
  var DataTable_default = DataTable;
7590
7883
 
7591
7884
  // ../../components/ui/Form.tsx
7592
- import * as React31 from "react";
7885
+ import * as React32 from "react";
7593
7886
 
7594
7887
  // ../../node_modules/react-hook-form/dist/index.esm.mjs
7595
- import React30 from "react";
7888
+ import React31 from "react";
7596
7889
  var isCheckBoxInput = (element) => element.type === "checkbox";
7597
7890
  var isDateObject = (value) => value instanceof Date;
7598
7891
  var isNullOrUndefined = (value) => value == null;
@@ -7680,12 +7973,12 @@ var INPUT_VALIDATION_RULES = {
7680
7973
  required: "required",
7681
7974
  validate: "validate"
7682
7975
  };
7683
- var HookFormContext = React30.createContext(null);
7976
+ var HookFormContext = React31.createContext(null);
7684
7977
  HookFormContext.displayName = "HookFormContext";
7685
- var useFormContext = () => React30.useContext(HookFormContext);
7978
+ var useFormContext = () => React31.useContext(HookFormContext);
7686
7979
  var FormProvider = (props) => {
7687
7980
  const { children, ...data } = props;
7688
- return React30.createElement(HookFormContext.Provider, { value: data }, children);
7981
+ return React31.createElement(HookFormContext.Provider, { value: data }, children);
7689
7982
  };
7690
7983
  var getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {
7691
7984
  const result = {
@@ -7705,12 +7998,12 @@ var getProxyFormState = (formState, control, localProxyFormState, isRoot = true)
7705
7998
  }
7706
7999
  return result;
7707
8000
  };
7708
- var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React30.useLayoutEffect : React30.useEffect;
8001
+ var useIsomorphicLayoutEffect = typeof window !== "undefined" ? React31.useLayoutEffect : React31.useEffect;
7709
8002
  function useFormState(props) {
7710
8003
  const methods = useFormContext();
7711
8004
  const { control = methods.control, disabled, name, exact } = props || {};
7712
- const [formState, updateFormState] = React30.useState(control._formState);
7713
- const _localProxyFormState = React30.useRef({
8005
+ const [formState, updateFormState] = React31.useState(control._formState);
8006
+ const _localProxyFormState = React31.useRef({
7714
8007
  isDirty: false,
7715
8008
  isLoading: false,
7716
8009
  dirtyFields: false,
@@ -7731,10 +8024,10 @@ function useFormState(props) {
7731
8024
  });
7732
8025
  }
7733
8026
  }), [name, disabled, exact]);
7734
- React30.useEffect(() => {
8027
+ React31.useEffect(() => {
7735
8028
  _localProxyFormState.current.isValid && control._setValid(true);
7736
8029
  }, [control]);
7737
- return React30.useMemo(() => getProxyFormState(formState, control, _localProxyFormState.current, false), [formState, control]);
8030
+ return React31.useMemo(() => getProxyFormState(formState, control, _localProxyFormState.current, false), [formState, control]);
7738
8031
  }
7739
8032
  var isString = (value) => typeof value === "string";
7740
8033
  var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) => {
@@ -7783,12 +8076,12 @@ function deepEqual(object1, object2, _internal_visited = /* @__PURE__ */ new Wea
7783
8076
  function useWatch(props) {
7784
8077
  const methods = useFormContext();
7785
8078
  const { control = methods.control, name, defaultValue, disabled, exact, compute } = props || {};
7786
- const _defaultValue = React30.useRef(defaultValue);
7787
- const _compute = React30.useRef(compute);
7788
- const _computeFormValues = React30.useRef(void 0);
8079
+ const _defaultValue = React31.useRef(defaultValue);
8080
+ const _compute = React31.useRef(compute);
8081
+ const _computeFormValues = React31.useRef(void 0);
7789
8082
  _compute.current = compute;
7790
- const defaultValueMemo = React30.useMemo(() => control._getWatch(name, _defaultValue.current), [control, name]);
7791
- const [value, updateValue] = React30.useState(_compute.current ? _compute.current(defaultValueMemo) : defaultValueMemo);
8083
+ const defaultValueMemo = React31.useMemo(() => control._getWatch(name, _defaultValue.current), [control, name]);
8084
+ const [value, updateValue] = React31.useState(_compute.current ? _compute.current(defaultValueMemo) : defaultValueMemo);
7792
8085
  useIsomorphicLayoutEffect(() => control._subscribe({
7793
8086
  name,
7794
8087
  formState: {
@@ -7810,14 +8103,14 @@ function useWatch(props) {
7810
8103
  }
7811
8104
  }
7812
8105
  }), [control, disabled, name, exact]);
7813
- React30.useEffect(() => control._removeUnmounted());
8106
+ React31.useEffect(() => control._removeUnmounted());
7814
8107
  return value;
7815
8108
  }
7816
8109
  function useController(props) {
7817
8110
  const methods = useFormContext();
7818
8111
  const { name, disabled, control = methods.control, shouldUnregister, defaultValue } = props;
7819
8112
  const isArrayField = isNameInFieldArray(control._names.array, name);
7820
- const defaultValueMemo = React30.useMemo(() => get(control._formValues, name, get(control._defaultValues, name, defaultValue)), [control, name, defaultValue]);
8113
+ const defaultValueMemo = React31.useMemo(() => get(control._formValues, name, get(control._defaultValues, name, defaultValue)), [control, name, defaultValue]);
7821
8114
  const value = useWatch({
7822
8115
  control,
7823
8116
  name,
@@ -7829,15 +8122,15 @@ function useController(props) {
7829
8122
  name,
7830
8123
  exact: true
7831
8124
  });
7832
- const _props = React30.useRef(props);
7833
- const _previousNameRef = React30.useRef(void 0);
7834
- const _registerProps = React30.useRef(control.register(name, {
8125
+ const _props = React31.useRef(props);
8126
+ const _previousNameRef = React31.useRef(void 0);
8127
+ const _registerProps = React31.useRef(control.register(name, {
7835
8128
  ...props.rules,
7836
8129
  value,
7837
8130
  ...isBoolean(props.disabled) ? { disabled: props.disabled } : {}
7838
8131
  }));
7839
8132
  _props.current = props;
7840
- const fieldState = React30.useMemo(() => Object.defineProperties({}, {
8133
+ const fieldState = React31.useMemo(() => Object.defineProperties({}, {
7841
8134
  invalid: {
7842
8135
  enumerable: true,
7843
8136
  get: () => !!get(formState.errors, name)
@@ -7859,21 +8152,21 @@ function useController(props) {
7859
8152
  get: () => get(formState.errors, name)
7860
8153
  }
7861
8154
  }), [formState, name]);
7862
- const onChange = React30.useCallback((event) => _registerProps.current.onChange({
8155
+ const onChange = React31.useCallback((event) => _registerProps.current.onChange({
7863
8156
  target: {
7864
8157
  value: getEventValue(event),
7865
8158
  name
7866
8159
  },
7867
8160
  type: EVENTS.CHANGE
7868
8161
  }), [name]);
7869
- const onBlur = React30.useCallback(() => _registerProps.current.onBlur({
8162
+ const onBlur = React31.useCallback(() => _registerProps.current.onBlur({
7870
8163
  target: {
7871
8164
  value: get(control._formValues, name),
7872
8165
  name
7873
8166
  },
7874
8167
  type: EVENTS.BLUR
7875
8168
  }), [name, control._formValues]);
7876
- const ref = React30.useCallback((elm) => {
8169
+ const ref = React31.useCallback((elm) => {
7877
8170
  const field2 = get(control._fields, name);
7878
8171
  if (field2 && elm) {
7879
8172
  field2._f.ref = {
@@ -7884,7 +8177,7 @@ function useController(props) {
7884
8177
  };
7885
8178
  }
7886
8179
  }, [control._fields, name]);
7887
- const field = React30.useMemo(() => ({
8180
+ const field = React31.useMemo(() => ({
7888
8181
  name,
7889
8182
  value,
7890
8183
  ...isBoolean(disabled) || formState.disabled ? { disabled: formState.disabled || disabled } : {},
@@ -7892,7 +8185,7 @@ function useController(props) {
7892
8185
  onBlur,
7893
8186
  ref
7894
8187
  }), [name, disabled, formState.disabled, onChange, onBlur, ref, value]);
7895
- React30.useEffect(() => {
8188
+ React31.useEffect(() => {
7896
8189
  const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;
7897
8190
  const previousName = _previousNameRef.current;
7898
8191
  if (previousName && previousName !== name && !isArrayField) {
@@ -7922,13 +8215,13 @@ function useController(props) {
7922
8215
  (isArrayField ? _shouldUnregisterField && !control._state.action : _shouldUnregisterField) ? control.unregister(name) : updateMounted(name, false);
7923
8216
  };
7924
8217
  }, [name, control, isArrayField, shouldUnregister]);
7925
- React30.useEffect(() => {
8218
+ React31.useEffect(() => {
7926
8219
  control._setDisabledField({
7927
8220
  disabled,
7928
8221
  name
7929
8222
  });
7930
8223
  }, [disabled, name, control]);
7931
- return React30.useMemo(() => ({
8224
+ return React31.useMemo(() => ({
7932
8225
  field,
7933
8226
  formState,
7934
8227
  fieldState
@@ -9247,9 +9540,9 @@ function createFormControl(props = {}) {
9247
9540
  };
9248
9541
  }
9249
9542
  function useForm(props = {}) {
9250
- const _formControl = React30.useRef(void 0);
9251
- const _values = React30.useRef(void 0);
9252
- const [formState, updateFormState] = React30.useState({
9543
+ const _formControl = React31.useRef(void 0);
9544
+ const _values = React31.useRef(void 0);
9545
+ const [formState, updateFormState] = React31.useState({
9253
9546
  isDirty: false,
9254
9547
  isValidating: false,
9255
9548
  isLoading: isFunction(props.defaultValues),
@@ -9298,8 +9591,8 @@ function useForm(props = {}) {
9298
9591
  control._formState.isReady = true;
9299
9592
  return sub;
9300
9593
  }, [control]);
9301
- React30.useEffect(() => control._disableForm(props.disabled), [control, props.disabled]);
9302
- React30.useEffect(() => {
9594
+ React31.useEffect(() => control._disableForm(props.disabled), [control, props.disabled]);
9595
+ React31.useEffect(() => {
9303
9596
  if (props.mode) {
9304
9597
  control._options.mode = props.mode;
9305
9598
  }
@@ -9307,18 +9600,18 @@ function useForm(props = {}) {
9307
9600
  control._options.reValidateMode = props.reValidateMode;
9308
9601
  }
9309
9602
  }, [control, props.mode, props.reValidateMode]);
9310
- React30.useEffect(() => {
9603
+ React31.useEffect(() => {
9311
9604
  if (props.errors) {
9312
9605
  control._setErrors(props.errors);
9313
9606
  control._focusError();
9314
9607
  }
9315
9608
  }, [control, props.errors]);
9316
- React30.useEffect(() => {
9609
+ React31.useEffect(() => {
9317
9610
  props.shouldUnregister && control._subjects.state.next({
9318
9611
  values: control._getWatch()
9319
9612
  });
9320
9613
  }, [control, props.shouldUnregister]);
9321
- React30.useEffect(() => {
9614
+ React31.useEffect(() => {
9322
9615
  if (control._proxyFormState.isDirty) {
9323
9616
  const isDirty = control._getDirty();
9324
9617
  if (isDirty !== formState.isDirty) {
@@ -9328,7 +9621,7 @@ function useForm(props = {}) {
9328
9621
  }
9329
9622
  }
9330
9623
  }, [control, formState.isDirty]);
9331
- React30.useEffect(() => {
9624
+ React31.useEffect(() => {
9332
9625
  if (props.values && !deepEqual(props.values, _values.current)) {
9333
9626
  control._reset(props.values, {
9334
9627
  keepFieldsRef: true,
@@ -9340,7 +9633,7 @@ function useForm(props = {}) {
9340
9633
  control._resetDefaultValues();
9341
9634
  }
9342
9635
  }, [control, props.values]);
9343
- React30.useEffect(() => {
9636
+ React31.useEffect(() => {
9344
9637
  if (!control._state.mount) {
9345
9638
  control._setValid();
9346
9639
  control._state.mount = true;
@@ -9357,8 +9650,8 @@ function useForm(props = {}) {
9357
9650
 
9358
9651
  // ../../components/ui/Form.tsx
9359
9652
  import { useTranslations as useTranslations8 } from "next-intl";
9360
- import { jsx as jsx40, jsxs as jsxs34 } from "react/jsx-runtime";
9361
- var FormConfigContext = React31.createContext({ size: "md" });
9653
+ import { jsx as jsx41, jsxs as jsxs35 } from "react/jsx-runtime";
9654
+ var FormConfigContext = React32.createContext({ size: "md" });
9362
9655
  var FormWrapper = ({
9363
9656
  children,
9364
9657
  onSubmit,
@@ -9371,24 +9664,24 @@ var FormWrapper = ({
9371
9664
  const methods = useForm({
9372
9665
  defaultValues: initialValues
9373
9666
  });
9374
- React31.useEffect(() => {
9667
+ React32.useEffect(() => {
9375
9668
  if (initialValues) {
9376
9669
  methods.reset(initialValues);
9377
9670
  }
9378
9671
  }, [JSON.stringify(initialValues)]);
9379
9672
  const { validationSchema: _, ...formProps } = props;
9380
- return /* @__PURE__ */ jsx40(FormProvider, { ...methods, children: /* @__PURE__ */ jsx40(FormConfigContext.Provider, { value: { size }, children: /* @__PURE__ */ jsx40("form", { onSubmit: methods.handleSubmit(onSubmit), className, ...formProps, children }) }) });
9673
+ return /* @__PURE__ */ jsx41(FormProvider, { ...methods, children: /* @__PURE__ */ jsx41(FormConfigContext.Provider, { value: { size }, children: /* @__PURE__ */ jsx41("form", { onSubmit: methods.handleSubmit(onSubmit), className, ...formProps, children }) }) });
9381
9674
  };
9382
9675
  var Form = FormWrapper;
9383
- var FormFieldContext = React31.createContext({});
9676
+ var FormFieldContext = React32.createContext({});
9384
9677
  var FormField = ({
9385
9678
  ...props
9386
9679
  }) => {
9387
- return /* @__PURE__ */ jsx40(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx40(Controller, { ...props }) });
9680
+ return /* @__PURE__ */ jsx41(FormFieldContext.Provider, { value: { name: props.name }, children: /* @__PURE__ */ jsx41(Controller, { ...props }) });
9388
9681
  };
9389
9682
  var useFormField = () => {
9390
- const fieldContext = React31.useContext(FormFieldContext);
9391
- const itemContext = React31.useContext(FormItemContext);
9683
+ const fieldContext = React32.useContext(FormFieldContext);
9684
+ const itemContext = React32.useContext(FormItemContext);
9392
9685
  const { getFieldState, formState } = useFormContext();
9393
9686
  if (!fieldContext) {
9394
9687
  try {
@@ -9409,22 +9702,22 @@ var useFormField = () => {
9409
9702
  ...fieldState
9410
9703
  };
9411
9704
  };
9412
- var FormItemContext = React31.createContext({});
9413
- var FormItem = React31.forwardRef(({ className, ...props }, ref) => {
9414
- const id = React31.useId();
9415
- return /* @__PURE__ */ jsx40(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx40("div", { ref, className: cn("space-y-2", className), ...props }) });
9705
+ var FormItemContext = React32.createContext({});
9706
+ var FormItem = React32.forwardRef(({ className, ...props }, ref) => {
9707
+ const id = React32.useId();
9708
+ return /* @__PURE__ */ jsx41(FormItemContext.Provider, { value: { id }, children: /* @__PURE__ */ jsx41("div", { ref, className: cn("space-y-2", className), ...props }) });
9416
9709
  });
9417
9710
  FormItem.displayName = "FormItem";
9418
- var FormLabel = React31.forwardRef(({ className, ...props }, ref) => {
9711
+ var FormLabel = React32.forwardRef(({ className, ...props }, ref) => {
9419
9712
  const { error, formItemId } = useFormField();
9420
- const config = React31.useContext(FormConfigContext);
9713
+ const config = React32.useContext(FormConfigContext);
9421
9714
  const sizeClass = config.size === "sm" ? "text-xs" : config.size === "lg" ? "text-base" : "text-sm";
9422
- return /* @__PURE__ */ jsx40(Label, { ref, className: cn(sizeClass, error && "text-destructive", className), htmlFor: formItemId, ...props });
9715
+ return /* @__PURE__ */ jsx41(Label, { ref, className: cn(sizeClass, error && "text-destructive", className), htmlFor: formItemId, ...props });
9423
9716
  });
9424
9717
  FormLabel.displayName = "FormLabel";
9425
- var FormControl = React31.forwardRef(({ ...props }, ref) => {
9718
+ var FormControl = React32.forwardRef(({ ...props }, ref) => {
9426
9719
  const { error, formItemId, formDescriptionId, formMessageId } = useFormField();
9427
- return /* @__PURE__ */ jsx40(
9720
+ return /* @__PURE__ */ jsx41(
9428
9721
  "div",
9429
9722
  {
9430
9723
  ref,
@@ -9436,37 +9729,37 @@ var FormControl = React31.forwardRef(({ ...props }, ref) => {
9436
9729
  );
9437
9730
  });
9438
9731
  FormControl.displayName = "FormControl";
9439
- var FormDescription = React31.forwardRef(({ className, ...props }, ref) => {
9732
+ var FormDescription = React32.forwardRef(({ className, ...props }, ref) => {
9440
9733
  const { formDescriptionId } = useFormField();
9441
- return /* @__PURE__ */ jsx40("p", { ref, id: formDescriptionId, className: cn("text-sm text-muted-foreground", className), ...props });
9734
+ return /* @__PURE__ */ jsx41("p", { ref, id: formDescriptionId, className: cn("text-sm text-muted-foreground", className), ...props });
9442
9735
  });
9443
9736
  FormDescription.displayName = "FormDescription";
9444
- var FormMessage = React31.forwardRef(({ className, children, ...props }, ref) => {
9737
+ var FormMessage = React32.forwardRef(({ className, children, ...props }, ref) => {
9445
9738
  const { error, formMessageId } = useFormField();
9446
9739
  const body = error ? String(error?.message) : children;
9447
9740
  if (!body) {
9448
9741
  return null;
9449
9742
  }
9450
- return /* @__PURE__ */ jsx40("p", { ref, id: formMessageId, className: cn("text-sm font-medium text-destructive", className), ...props, children: body });
9743
+ return /* @__PURE__ */ jsx41("p", { ref, id: formMessageId, className: cn("text-sm font-medium text-destructive", className), ...props, children: body });
9451
9744
  });
9452
9745
  FormMessage.displayName = "FormMessage";
9453
- var FormInput = React31.forwardRef(({ name, ...props }, ref) => /* @__PURE__ */ jsx40(FormConfigContext.Consumer, { children: ({ size }) => /* @__PURE__ */ jsx40(
9746
+ var FormInput = React32.forwardRef(({ name, ...props }, ref) => /* @__PURE__ */ jsx41(FormConfigContext.Consumer, { children: ({ size }) => /* @__PURE__ */ jsx41(
9454
9747
  FormField,
9455
9748
  {
9456
9749
  name,
9457
- render: ({ field }) => /* @__PURE__ */ jsxs34(FormItem, { children: [
9458
- /* @__PURE__ */ jsx40(FormControl, { children: /* @__PURE__ */ jsx40(Input_default, { size: props.size ?? size, ...field, ...props }) }),
9459
- /* @__PURE__ */ jsx40(FormMessage, {})
9750
+ render: ({ field }) => /* @__PURE__ */ jsxs35(FormItem, { children: [
9751
+ /* @__PURE__ */ jsx41(FormControl, { children: /* @__PURE__ */ jsx41(Input_default, { size: props.size ?? size, ...field, ...props }) }),
9752
+ /* @__PURE__ */ jsx41(FormMessage, {})
9460
9753
  ] })
9461
9754
  }
9462
9755
  ) }));
9463
9756
  FormInput.displayName = "FormInput";
9464
- var FormCheckbox = React31.forwardRef(({ name, ...props }, ref) => /* @__PURE__ */ jsx40(FormConfigContext.Consumer, { children: ({ size }) => /* @__PURE__ */ jsx40(
9757
+ var FormCheckbox = React32.forwardRef(({ name, ...props }, ref) => /* @__PURE__ */ jsx41(FormConfigContext.Consumer, { children: ({ size }) => /* @__PURE__ */ jsx41(
9465
9758
  FormField,
9466
9759
  {
9467
9760
  name,
9468
- render: ({ field }) => /* @__PURE__ */ jsxs34(FormItem, { children: [
9469
- /* @__PURE__ */ jsx40(FormControl, { children: /* @__PURE__ */ jsx40(
9761
+ render: ({ field }) => /* @__PURE__ */ jsxs35(FormItem, { children: [
9762
+ /* @__PURE__ */ jsx41(FormControl, { children: /* @__PURE__ */ jsx41(
9470
9763
  Checkbox,
9471
9764
  {
9472
9765
  ref,
@@ -9480,20 +9773,20 @@ var FormCheckbox = React31.forwardRef(({ name, ...props }, ref) => /* @__PURE__
9480
9773
  ...props
9481
9774
  }
9482
9775
  ) }),
9483
- /* @__PURE__ */ jsx40(FormMessage, {})
9776
+ /* @__PURE__ */ jsx41(FormMessage, {})
9484
9777
  ] })
9485
9778
  }
9486
9779
  ) }));
9487
9780
  FormCheckbox.displayName = "FormCheckbox";
9488
- var FormActions = React31.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx40("div", { ref, className: cn("flex gap-2 justify-end", className), ...props }));
9781
+ var FormActions = React32.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx41("div", { ref, className: cn("flex gap-2 justify-end", className), ...props }));
9489
9782
  FormActions.displayName = "FormActions";
9490
- var FormSubmitButton = React31.forwardRef(({ children, loading: loading2, ...props }, ref) => /* @__PURE__ */ jsx40(FormConfigContext.Consumer, { children: ({ size }) => /* @__PURE__ */ jsx40(Button_default, { ref, type: "submit", size: props.size ?? size, disabled: loading2, ...props, children }) }));
9783
+ var FormSubmitButton = React32.forwardRef(({ children, loading: loading2, ...props }, ref) => /* @__PURE__ */ jsx41(FormConfigContext.Consumer, { children: ({ size }) => /* @__PURE__ */ jsx41(Button_default, { ref, type: "submit", size: props.size ?? size, disabled: loading2, ...props, children }) }));
9491
9784
  FormSubmitButton.displayName = "FormSubmitButton";
9492
9785
 
9493
9786
  // ../../components/ui/NotificationModal.tsx
9494
9787
  import { ExternalLink } from "lucide-react";
9495
9788
  import { useTranslations as useTranslations9 } from "next-intl";
9496
- import { jsx as jsx41, jsxs as jsxs35 } from "react/jsx-runtime";
9789
+ import { jsx as jsx42, jsxs as jsxs36 } from "react/jsx-runtime";
9497
9790
  function NotificationModal({ isOpen, onClose, notification, titleText, openLinkText, closeText }) {
9498
9791
  const t = useTranslations9("Common");
9499
9792
  if (!notification) return null;
@@ -9514,26 +9807,26 @@ function NotificationModal({ isOpen, onClose, notification, titleText, openLinkT
9514
9807
  onClose();
9515
9808
  }
9516
9809
  };
9517
- return /* @__PURE__ */ jsx41(
9810
+ return /* @__PURE__ */ jsx42(
9518
9811
  Modal_default,
9519
9812
  {
9520
9813
  isOpen,
9521
9814
  onClose,
9522
9815
  title: titleText || t("notifications"),
9523
9816
  size: "md",
9524
- children: /* @__PURE__ */ jsxs35("div", { className: "space-y-4", children: [
9525
- /* @__PURE__ */ jsxs35("div", { className: "flex items-center gap-2 pb-2 border-b border-border", children: [
9526
- /* @__PURE__ */ jsx41("div", { className: cn(
9817
+ children: /* @__PURE__ */ jsxs36("div", { className: "space-y-4", children: [
9818
+ /* @__PURE__ */ jsxs36("div", { className: "flex items-center gap-2 pb-2 border-b border-border", children: [
9819
+ /* @__PURE__ */ jsx42("div", { className: cn(
9527
9820
  "w-2 h-2 rounded-full",
9528
9821
  !notification.is_read ? "bg-primary" : "bg-border"
9529
9822
  ) }),
9530
- /* @__PURE__ */ jsx41("span", { className: "text-xs text-muted-foreground", children: !notification.is_read ? t("newNotification") : t("readStatus") })
9823
+ /* @__PURE__ */ jsx42("span", { className: "text-xs text-muted-foreground", children: !notification.is_read ? t("newNotification") : t("readStatus") })
9531
9824
  ] }),
9532
- notification.title && /* @__PURE__ */ jsx41("h3", { className: "text-lg font-semibold text-foreground", children: notification.title }),
9533
- notification.body && /* @__PURE__ */ jsx41("div", { className: "text-sm text-muted-foreground whitespace-pre-wrap leading-relaxed", children: notification.body }),
9534
- /* @__PURE__ */ jsx41("div", { className: "text-xs text-muted-foreground border-t border-border pt-2", children: formatTime2(notification.created_at) }),
9535
- /* @__PURE__ */ jsxs35("div", { className: "flex gap-2 justify-end pt-2", children: [
9536
- hasLink && /* @__PURE__ */ jsxs35(
9825
+ notification.title && /* @__PURE__ */ jsx42("h3", { className: "text-lg font-semibold text-foreground", children: notification.title }),
9826
+ notification.body && /* @__PURE__ */ jsx42("div", { className: "text-sm text-muted-foreground whitespace-pre-wrap leading-relaxed", children: notification.body }),
9827
+ /* @__PURE__ */ jsx42("div", { className: "text-xs text-muted-foreground border-t border-border pt-2", children: formatTime2(notification.created_at) }),
9828
+ /* @__PURE__ */ jsxs36("div", { className: "flex gap-2 justify-end pt-2", children: [
9829
+ hasLink && /* @__PURE__ */ jsxs36(
9537
9830
  Button_default,
9538
9831
  {
9539
9832
  variant: "primary",
@@ -9541,12 +9834,12 @@ function NotificationModal({ isOpen, onClose, notification, titleText, openLinkT
9541
9834
  onClick: handleLinkClick,
9542
9835
  className: "gap-2",
9543
9836
  children: [
9544
- /* @__PURE__ */ jsx41(ExternalLink, { className: "w-4 h-4" }),
9837
+ /* @__PURE__ */ jsx42(ExternalLink, { className: "w-4 h-4" }),
9545
9838
  openLinkText || t("openLink")
9546
9839
  ]
9547
9840
  }
9548
9841
  ),
9549
- /* @__PURE__ */ jsx41(
9842
+ /* @__PURE__ */ jsx42(
9550
9843
  Button_default,
9551
9844
  {
9552
9845
  variant: "ghost",
@@ -9568,10 +9861,10 @@ import { usePathname } from "next/navigation";
9568
9861
  import { Phone } from "lucide-react";
9569
9862
 
9570
9863
  // ../../node_modules/react-icons/lib/iconBase.mjs
9571
- import React33 from "react";
9864
+ import React34 from "react";
9572
9865
 
9573
9866
  // ../../node_modules/react-icons/lib/iconContext.mjs
9574
- import React32 from "react";
9867
+ import React33 from "react";
9575
9868
  var DefaultContext = {
9576
9869
  color: void 0,
9577
9870
  size: void 0,
@@ -9579,7 +9872,7 @@ var DefaultContext = {
9579
9872
  style: void 0,
9580
9873
  attr: void 0
9581
9874
  };
9582
- var IconContext = React32.createContext && /* @__PURE__ */ React32.createContext(DefaultContext);
9875
+ var IconContext = React33.createContext && /* @__PURE__ */ React33.createContext(DefaultContext);
9583
9876
 
9584
9877
  // ../../node_modules/react-icons/lib/iconBase.mjs
9585
9878
  var _excluded = ["attr", "size", "title"];
@@ -9668,12 +9961,12 @@ function _toPrimitive(t, r) {
9668
9961
  return ("string" === r ? String : Number)(t);
9669
9962
  }
9670
9963
  function Tree2Element(tree) {
9671
- return tree && tree.map((node, i) => /* @__PURE__ */ React33.createElement(node.tag, _objectSpread({
9964
+ return tree && tree.map((node, i) => /* @__PURE__ */ React34.createElement(node.tag, _objectSpread({
9672
9965
  key: i
9673
9966
  }, node.attr), Tree2Element(node.child)));
9674
9967
  }
9675
9968
  function GenIcon(data) {
9676
- return (props) => /* @__PURE__ */ React33.createElement(IconBase, _extends({
9969
+ return (props) => /* @__PURE__ */ React34.createElement(IconBase, _extends({
9677
9970
  attr: _objectSpread({}, data.attr)
9678
9971
  }, props), Tree2Element(data.child));
9679
9972
  }
@@ -9688,7 +9981,7 @@ function IconBase(props) {
9688
9981
  var className;
9689
9982
  if (conf.className) className = conf.className;
9690
9983
  if (props.className) className = (className ? className + " " : "") + props.className;
9691
- return /* @__PURE__ */ React33.createElement("svg", _extends({
9984
+ return /* @__PURE__ */ React34.createElement("svg", _extends({
9692
9985
  stroke: "currentColor",
9693
9986
  fill: "currentColor",
9694
9987
  strokeWidth: "0"
@@ -9700,9 +9993,9 @@ function IconBase(props) {
9700
9993
  height: computedSize,
9701
9994
  width: computedSize,
9702
9995
  xmlns: "http://www.w3.org/2000/svg"
9703
- }), title && /* @__PURE__ */ React33.createElement("title", null, title), props.children);
9996
+ }), title && /* @__PURE__ */ React34.createElement("title", null, title), props.children);
9704
9997
  };
9705
- return IconContext !== void 0 ? /* @__PURE__ */ React33.createElement(IconContext.Consumer, null, (conf) => elem(conf)) : elem(DefaultContext);
9998
+ return IconContext !== void 0 ? /* @__PURE__ */ React34.createElement(IconContext.Consumer, null, (conf) => elem(conf)) : elem(DefaultContext);
9706
9999
  }
9707
10000
 
9708
10001
  // ../../node_modules/react-icons/fa/index.mjs
@@ -9716,9 +10009,9 @@ function SiZalo(props) {
9716
10009
  }
9717
10010
 
9718
10011
  // ../../components/ui/FloatingContacts.tsx
9719
- import { jsx as jsx42, jsxs as jsxs36 } from "react/jsx-runtime";
10012
+ import { jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
9720
10013
  function MessengerIcon(props) {
9721
- return /* @__PURE__ */ jsx42("svg", { viewBox: "0 0 24 24", width: 24, height: 24, "aria-hidden": "true", ...props, children: /* @__PURE__ */ jsx42(
10014
+ return /* @__PURE__ */ jsx43("svg", { viewBox: "0 0 24 24", width: 24, height: 24, "aria-hidden": "true", ...props, children: /* @__PURE__ */ jsx43(
9722
10015
  "path",
9723
10016
  {
9724
10017
  d: "M12 2C6.477 2 2 6.145 2 11.235c0 2.93 1.35 5.542 3.464 7.25v3.515l3.344-1.836c.894.247 1.843.375 2.192.375 5.523 0 10-4.145 10-9.235S17.523 2 12 2zm.994 12.444l-2.563-2.73-5.004 2.73 5.507-5.84 2.626 2.729 4.942-2.729-5.508 5.84z",
@@ -9727,10 +10020,10 @@ function MessengerIcon(props) {
9727
10020
  ) });
9728
10021
  }
9729
10022
  function ZaloIcon(props) {
9730
- return /* @__PURE__ */ jsx42(SiZalo, { size: 20, ...props });
10023
+ return /* @__PURE__ */ jsx43(SiZalo, { size: 20, ...props });
9731
10024
  }
9732
10025
  function InstagramIcon(props) {
9733
- return /* @__PURE__ */ jsx42(FaInstagram, { size: 20, ...props });
10026
+ return /* @__PURE__ */ jsx43(FaInstagram, { size: 20, ...props });
9734
10027
  }
9735
10028
  function FloatingContacts({ className }) {
9736
10029
  const pathname = usePathname();
@@ -9765,8 +10058,8 @@ function FloatingContacts({ className }) {
9765
10058
  external: true
9766
10059
  }
9767
10060
  ];
9768
- return /* @__PURE__ */ jsxs36("div", { className: cn("fixed bottom-6 right-4 z-[100000]", "flex flex-col items-end gap-3", className), "aria-label": "Quick contacts", children: [
9769
- /* @__PURE__ */ jsx42(
10061
+ return /* @__PURE__ */ jsxs37("div", { className: cn("fixed bottom-6 right-4 z-[100000]", "flex flex-col items-end gap-3", className), "aria-label": "Quick contacts", children: [
10062
+ /* @__PURE__ */ jsx43(
9770
10063
  Link2,
9771
10064
  {
9772
10065
  href: `tel:${hotline.replace(/\D/g, "")}`,
@@ -9777,10 +10070,10 @@ function FloatingContacts({ className }) {
9777
10070
  "hover:scale-105 active:scale-95 transition-transform",
9778
10071
  "bg-[#22c55e]"
9779
10072
  ),
9780
- children: /* @__PURE__ */ jsx42(Phone, { className: "w-6 h-6" })
10073
+ children: /* @__PURE__ */ jsx43(Phone, { className: "w-6 h-6" })
9781
10074
  }
9782
10075
  ),
9783
- moreItems.map(({ key, href, label, bg, Icon, external }) => /* @__PURE__ */ jsx42(
10076
+ moreItems.map(({ key, href, label, bg, Icon, external }) => /* @__PURE__ */ jsx43(
9784
10077
  Link2,
9785
10078
  {
9786
10079
  href,
@@ -9792,7 +10085,7 @@ function FloatingContacts({ className }) {
9792
10085
  "hover:scale-105 active:scale-95 transition-transform",
9793
10086
  bg
9794
10087
  ),
9795
- children: /* @__PURE__ */ jsx42(Icon, { className: "w-6 h-6" })
10088
+ children: /* @__PURE__ */ jsx43(Icon, { className: "w-6 h-6" })
9796
10089
  },
9797
10090
  key
9798
10091
  ))
@@ -9801,7 +10094,7 @@ function FloatingContacts({ className }) {
9801
10094
 
9802
10095
  // ../../components/ui/AccessDenied.tsx
9803
10096
  import { Lock, ShieldAlert, Ban } from "lucide-react";
9804
- import { jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
10097
+ import { jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
9805
10098
  var VARIANT_STYLES = {
9806
10099
  destructive: { bg: "bg-destructive/5", border: "border-destructive/20", text: "text-destructive" },
9807
10100
  warning: { bg: "bg-warning/5", border: "border-warning/20", text: "text-warning" },
@@ -9822,13 +10115,13 @@ function AccessDenied({
9822
10115
  }) {
9823
10116
  const styles = VARIANT_STYLES[variant];
9824
10117
  const UsedIcon = Icon || DEFAULT_ICONS[variant];
9825
- return /* @__PURE__ */ jsx43(Card_default, { className: cn("p-8 text-center shadow-sm", styles.bg, styles.border, className), children: /* @__PURE__ */ jsxs37("div", { className: "flex flex-col items-center gap-4", children: [
9826
- /* @__PURE__ */ jsx43("div", { className: cn("p-3 rounded-lg", styles.bg.replace("/5", "/10")), children: /* @__PURE__ */ jsx43(UsedIcon, { className: cn("w-8 h-8", styles.text) }) }),
9827
- /* @__PURE__ */ jsxs37("div", { children: [
9828
- /* @__PURE__ */ jsx43("h3", { className: cn("font-semibold mb-2", styles.text), children: title }),
9829
- /* @__PURE__ */ jsx43("p", { className: cn(styles.text.replace("text-", "text-") + "/80", "text-sm"), children: description })
10118
+ return /* @__PURE__ */ jsx44(Card_default, { className: cn("p-8 text-center shadow-sm", styles.bg, styles.border, className), children: /* @__PURE__ */ jsxs38("div", { className: "flex flex-col items-center gap-4", children: [
10119
+ /* @__PURE__ */ jsx44("div", { className: cn("p-3 rounded-lg", styles.bg.replace("/5", "/10")), children: /* @__PURE__ */ jsx44(UsedIcon, { className: cn("w-8 h-8", styles.text) }) }),
10120
+ /* @__PURE__ */ jsxs38("div", { children: [
10121
+ /* @__PURE__ */ jsx44("h3", { className: cn("font-semibold mb-2", styles.text), children: title }),
10122
+ /* @__PURE__ */ jsx44("p", { className: cn(styles.text.replace("text-", "text-") + "/80", "text-sm"), children: description })
9830
10123
  ] }),
9831
- children && /* @__PURE__ */ jsx43("div", { className: "mt-2 flex flex-wrap gap-2 justify-center", children })
10124
+ children && /* @__PURE__ */ jsx44("div", { className: "mt-2 flex flex-wrap gap-2 justify-center", children })
9832
10125
  ] }) });
9833
10126
  }
9834
10127
 
@@ -9836,7 +10129,7 @@ function AccessDenied({
9836
10129
  import { Moon, Sun, Monitor } from "lucide-react";
9837
10130
  import { useEffect as useEffect16, useRef as useRef11, useState as useState26 } from "react";
9838
10131
  import { createPortal as createPortal9 } from "react-dom";
9839
- import { Fragment as Fragment11, jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
10132
+ import { Fragment as Fragment11, jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
9840
10133
  function ThemeToggleHeadless({
9841
10134
  theme,
9842
10135
  onChange,
@@ -9865,8 +10158,8 @@ function ThemeToggleHeadless({
9865
10158
  const top = rect.bottom + scrollTop + 8;
9866
10159
  return { top, left, width };
9867
10160
  };
9868
- return /* @__PURE__ */ jsxs38("div", { className: cn("relative", className), children: [
9869
- /* @__PURE__ */ jsx44(
10161
+ return /* @__PURE__ */ jsxs39("div", { className: cn("relative", className), children: [
10162
+ /* @__PURE__ */ jsx45(
9870
10163
  Button_default,
9871
10164
  {
9872
10165
  variant: "ghost",
@@ -9884,25 +10177,25 @@ function ThemeToggleHeadless({
9884
10177
  "aria-haspopup": "menu",
9885
10178
  "aria-expanded": isOpen,
9886
10179
  "aria-label": labels?.heading ?? "Theme",
9887
- children: /* @__PURE__ */ jsx44(CurrentIcon, { className: "h-5 w-5" })
10180
+ children: /* @__PURE__ */ jsx45(CurrentIcon, { className: "h-5 w-5" })
9888
10181
  }
9889
10182
  ),
9890
- isOpen && /* @__PURE__ */ jsxs38(Fragment11, { children: [
9891
- typeof window !== "undefined" && createPortal9(/* @__PURE__ */ jsx44("div", { className: "fixed inset-0 z-[9998]", onClick: () => setIsOpen(false) }), document.body),
10183
+ isOpen && /* @__PURE__ */ jsxs39(Fragment11, { children: [
10184
+ typeof window !== "undefined" && createPortal9(/* @__PURE__ */ jsx45("div", { className: "fixed inset-0 z-[9998]", onClick: () => setIsOpen(false) }), document.body),
9892
10185
  typeof window !== "undefined" && dropdownPosition && createPortal9(
9893
- /* @__PURE__ */ jsx44(
10186
+ /* @__PURE__ */ jsx45(
9894
10187
  "div",
9895
10188
  {
9896
10189
  className: "z-[9999] bg-card border border-border rounded-lg shadow-lg overflow-hidden",
9897
10190
  style: { position: "absolute", top: dropdownPosition.top, left: dropdownPosition.left, width: dropdownPosition.width },
9898
10191
  onMouseDown: (e) => e.stopPropagation(),
9899
10192
  role: "menu",
9900
- children: /* @__PURE__ */ jsxs38("div", { className: "p-2", children: [
9901
- /* @__PURE__ */ jsx44("div", { className: "px-3 py-2 text-sm font-medium text-muted-foreground border-b border-border mb-2", children: labels?.heading ?? "Theme" }),
10193
+ children: /* @__PURE__ */ jsxs39("div", { className: "p-2", children: [
10194
+ /* @__PURE__ */ jsx45("div", { className: "px-3 py-2 text-sm font-medium text-muted-foreground border-b border-border mb-2", children: labels?.heading ?? "Theme" }),
9902
10195
  themes.map((opt) => {
9903
10196
  const Icon = opt.icon;
9904
10197
  const active = theme === opt.value;
9905
- return /* @__PURE__ */ jsxs38(
10198
+ return /* @__PURE__ */ jsxs39(
9906
10199
  Button_default,
9907
10200
  {
9908
10201
  variant: "ghost",
@@ -9918,9 +10211,9 @@ function ThemeToggleHeadless({
9918
10211
  role: "menuitemradio",
9919
10212
  "aria-checked": active,
9920
10213
  children: [
9921
- /* @__PURE__ */ jsx44(Icon, { className: "h-4 w-4" }),
9922
- /* @__PURE__ */ jsx44("span", { className: "flex-1 text-left", children: opt.label }),
9923
- active && /* @__PURE__ */ jsx44("div", { className: "w-2 h-2 rounded-full bg-primary" })
10214
+ /* @__PURE__ */ jsx45(Icon, { className: "h-4 w-4" }),
10215
+ /* @__PURE__ */ jsx45("span", { className: "flex-1 text-left", children: opt.label }),
10216
+ active && /* @__PURE__ */ jsx45("div", { className: "w-2 h-2 rounded-full bg-primary" })
9924
10217
  ]
9925
10218
  },
9926
10219
  opt.value
@@ -9939,7 +10232,7 @@ function ThemeToggleHeadless({
9939
10232
  import { useRef as useRef12, useState as useState27 } from "react";
9940
10233
  import { createPortal as createPortal10 } from "react-dom";
9941
10234
  import { Globe } from "lucide-react";
9942
- import { Fragment as Fragment12, jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
10235
+ import { Fragment as Fragment12, jsx as jsx46, jsxs as jsxs40 } from "react/jsx-runtime";
9943
10236
  function LanguageSwitcherHeadless({
9944
10237
  locales,
9945
10238
  currentLocale,
@@ -9961,8 +10254,8 @@ function LanguageSwitcherHeadless({
9961
10254
  const top = rect.bottom + scrollTop + 8;
9962
10255
  return { top, left, width };
9963
10256
  };
9964
- return /* @__PURE__ */ jsxs39("div", { className: cn("relative", className), children: [
9965
- /* @__PURE__ */ jsx45(
10257
+ return /* @__PURE__ */ jsxs40("div", { className: cn("relative", className), children: [
10258
+ /* @__PURE__ */ jsx46(
9966
10259
  Button_default,
9967
10260
  {
9968
10261
  variant: "ghost",
@@ -9981,22 +10274,22 @@ function LanguageSwitcherHeadless({
9981
10274
  "aria-expanded": isOpen,
9982
10275
  "aria-label": labels?.heading ?? "Language",
9983
10276
  title: labels?.heading ?? "Language",
9984
- children: /* @__PURE__ */ jsx45(Globe, { className: "h-5 w-5" })
10277
+ children: /* @__PURE__ */ jsx46(Globe, { className: "h-5 w-5" })
9985
10278
  }
9986
10279
  ),
9987
- isOpen && /* @__PURE__ */ jsxs39(Fragment12, { children: [
9988
- typeof window !== "undefined" && createPortal10(/* @__PURE__ */ jsx45("div", { className: "fixed inset-0 z-[9998]", onClick: () => setIsOpen(false) }), document.body),
10280
+ isOpen && /* @__PURE__ */ jsxs40(Fragment12, { children: [
10281
+ typeof window !== "undefined" && createPortal10(/* @__PURE__ */ jsx46("div", { className: "fixed inset-0 z-[9998]", onClick: () => setIsOpen(false) }), document.body),
9989
10282
  typeof window !== "undefined" && dropdownPosition && createPortal10(
9990
- /* @__PURE__ */ jsx45(
10283
+ /* @__PURE__ */ jsx46(
9991
10284
  "div",
9992
10285
  {
9993
10286
  className: "z-[9999] bg-card border border-border rounded-lg shadow-lg overflow-hidden",
9994
10287
  style: { position: "absolute", top: dropdownPosition.top, left: dropdownPosition.left, width: dropdownPosition.width },
9995
10288
  onMouseDown: (e) => e.stopPropagation(),
9996
10289
  role: "menu",
9997
- children: /* @__PURE__ */ jsxs39("div", { className: "p-2", children: [
9998
- /* @__PURE__ */ jsx45("div", { className: "px-3 py-2 text-sm font-medium text-muted-foreground border-b border-border mb-2", children: labels?.heading ?? "Language" }),
9999
- locales.map((language) => /* @__PURE__ */ jsxs39(
10290
+ children: /* @__PURE__ */ jsxs40("div", { className: "p-2", children: [
10291
+ /* @__PURE__ */ jsx46("div", { className: "px-3 py-2 text-sm font-medium text-muted-foreground border-b border-border mb-2", children: labels?.heading ?? "Language" }),
10292
+ locales.map((language) => /* @__PURE__ */ jsxs40(
10000
10293
  Button_default,
10001
10294
  {
10002
10295
  variant: "ghost",
@@ -10009,9 +10302,9 @@ function LanguageSwitcherHeadless({
10009
10302
  role: "menuitemradio",
10010
10303
  "aria-checked": currentLocale === language.code,
10011
10304
  children: [
10012
- language.flag && /* @__PURE__ */ jsx45("span", { className: "text-lg", children: language.flag }),
10013
- /* @__PURE__ */ jsx45("span", { className: "flex-1 text-left", children: language.name }),
10014
- currentLocale === language.code && /* @__PURE__ */ jsx45("div", { className: "w-2 h-2 rounded-full bg-primary" })
10305
+ language.flag && /* @__PURE__ */ jsx46("span", { className: "text-lg", children: language.flag }),
10306
+ /* @__PURE__ */ jsx46("span", { className: "flex-1 text-left", children: language.name }),
10307
+ currentLocale === language.code && /* @__PURE__ */ jsx46("div", { className: "w-2 h-2 rounded-full bg-primary" })
10015
10308
  ]
10016
10309
  },
10017
10310
  language.code
@@ -10183,6 +10476,7 @@ export {
10183
10476
  DropdownMenu_default as DropdownMenu,
10184
10477
  DropdownMenuItem,
10185
10478
  DropdownMenuSeparator,
10479
+ FallingIcons,
10186
10480
  FloatingContacts,
10187
10481
  Form,
10188
10482
  FormActions,