@mlw-packages/react-components 1.7.9 → 1.7.10

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
@@ -566,6 +566,7 @@ __export(index_exports, {
566
566
  CopyButton: () => CopyButton,
567
567
  DateTimePicker: () => DateTimePicker,
568
568
  DayView: () => DayView,
569
+ DebouncedInput: () => DebouncedInput,
569
570
  DefaultEndHour: () => DefaultEndHour,
570
571
  DefaultStartHour: () => DefaultStartHour,
571
572
  DestructiveDialog: () => DestructiveDialog,
@@ -2197,7 +2198,21 @@ function Select({
2197
2198
 
2198
2199
  // src/components/selects/AvatarSelect.tsx
2199
2200
  var import_react15 = require("react");
2201
+ var import_react16 = require("@phosphor-icons/react");
2200
2202
  var import_jsx_runtime19 = require("react/jsx-runtime");
2203
+ var DEFAULT_COLORS = [
2204
+ "bg-purple-100 text-purple-700",
2205
+ "bg-green-100 text-green-700",
2206
+ "bg-blue-100 text-blue-700"
2207
+ ];
2208
+ var getColor = (value, colors2 = DEFAULT_COLORS) => {
2209
+ let hash = 0;
2210
+ for (let i = 0; i < value.length; i++) {
2211
+ hash = value.charCodeAt(i) + ((hash << 5) - hash);
2212
+ }
2213
+ const index = Math.abs(hash) % colors2.length;
2214
+ return colors2[index];
2215
+ };
2201
2216
  var Square = ({
2202
2217
  className,
2203
2218
  children
@@ -2224,13 +2239,18 @@ function AvatarSelect({
2224
2239
  selected,
2225
2240
  label,
2226
2241
  labelClassname,
2227
- className
2242
+ className,
2243
+ colors: colors2
2228
2244
  }) {
2245
+ const [open, setOpen] = (0, import_react15.useState)(false);
2229
2246
  const id = (0, import_react15.useId)();
2247
+ const allItems = items || (groupItems ? Object.values(groupItems).flat() : []);
2248
+ const selectedItem = allItems.find((item) => item.value === selected);
2230
2249
  const renderItem = (item) => {
2231
2250
  const avatarContent = item.avatar ?? item.label.charAt(0).toUpperCase();
2251
+ const colorClass = item.avatarClassName ?? getColor(item.value, colors2);
2232
2252
  return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
2233
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Square, { className: item.avatarClassName, children: avatarContent }),
2253
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Square, { className: colorClass, children: avatarContent }),
2234
2254
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "truncate", children: item.label })
2235
2255
  ] });
2236
2256
  };
@@ -2243,95 +2263,95 @@ function AvatarSelect({
2243
2263
  children: label
2244
2264
  }
2245
2265
  ) : null,
2246
- /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2247
- SelectBase,
2248
- {
2249
- value: selected ?? void 0,
2250
- onValueChange: (v) => onChange(v),
2251
- "data-testid": testIds.base ?? "avatar-select-base",
2252
- children: [
2253
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2254
- SelectTriggerBase,
2255
- {
2256
- id,
2257
- className: cn(
2258
- " [&>span]:flex [&>span]:items-center [&>span]:gap-2 [&>span_[data-square]]:shrink-0",
2259
- error && "border-red-500",
2260
- className
2261
- ),
2262
- "data-testid": testIds.trigger ?? "avatar-select-trigger",
2263
- disabled,
2264
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2265
- SelectValueBase,
2266
- {
2267
- placeholder,
2268
- "data-testid": testIds.value ?? "avatar-select-value"
2269
- }
2270
- )
2271
- }
2266
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(PopoverBase, { open, onOpenChange: setOpen, children: [
2267
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2268
+ ButtonBase,
2269
+ {
2270
+ id,
2271
+ variant: "select",
2272
+ role: "combobox",
2273
+ "aria-expanded": open,
2274
+ className: cn(
2275
+ "w-full justify-between px-3 font-normal",
2276
+ error && "border-red-500",
2277
+ className
2272
2278
  ),
2273
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2274
- ScrollAreaBase,
2275
- {
2276
- "data-testid": testIds.scrollarea ?? "avatar-select-scrollarea",
2277
- children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2278
- SelectContentBase,
2279
+ disabled,
2280
+ "data-testid": testIds.trigger ?? "avatar-select-trigger",
2281
+ children: [
2282
+ selectedItem ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "flex items-center gap-2 truncate", children: renderItem(selectedItem) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)("span", { className: "text-muted-foreground", children: placeholder }),
2283
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react16.CaretDownIcon, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
2284
+ ]
2285
+ }
2286
+ ) }),
2287
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2288
+ PopoverContentBase,
2289
+ {
2290
+ className: "w-[--radix-popover-trigger-width] p-0",
2291
+ align: "start",
2292
+ "data-testid": testIds.content ?? "avatar-select-content",
2293
+ children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(CommandBase, { children: [
2294
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CommandInputBase, { placeholder: "Search..." }),
2295
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(CommandListBase, { children: [
2296
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CommandEmptyBase, { children: "No results found." }),
2297
+ groupItems ? Object.keys(groupItems).map((key) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CommandGroupBase, { heading: key, children: groupItems[key].map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2298
+ CommandItemBase,
2279
2299
  {
2280
- className: "[&_*[role=option]>span]:start-auto [&_*[role=option]>span]:end-2 [&_*[role=option]>span]:flex [&_*[role=option]>span]:items-center [&_*[role=option]>span]:gap-2 [&_*[role=option]]:ps-2 [&_*[role=option]]:pe-8",
2281
- "data-testid": testIds.content ?? "avatar-select-content",
2282
- children: groupItems ? /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_jsx_runtime19.Fragment, { children: Object.keys(groupItems).map((key) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2283
- SelectGroupBase,
2284
- {
2285
- "data-testid": testIds.group ?? "avatar-select-group",
2286
- children: [
2287
- /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2288
- SelectLabelBase,
2289
- {
2290
- className: "ps-2",
2291
- "data-testid": testIds.label ?? "avatar-select-label",
2292
- children: key
2293
- }
2294
- ),
2295
- groupItems[key].map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2296
- SelectItemBase,
2297
- {
2298
- value: item.value,
2299
- "data-testid": testIds.item?.(String(item.value)) ?? `avatar-select-item-${item.value}`,
2300
- children: renderItem(item)
2301
- },
2302
- item.value
2303
- ))
2304
- ]
2305
- },
2306
- key
2307
- )) }) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2308
- SelectGroupBase,
2309
- {
2310
- "data-testid": testIds.group ?? "avatar-select-group",
2311
- children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2312
- SelectItemBase,
2313
- {
2314
- value: item.value,
2315
- "data-testid": testIds.item?.(String(item.value)) ?? `avatar-select-item-${item.value}`,
2316
- children: renderItem(item)
2317
- },
2318
- item.value
2319
- ))
2320
- }
2321
- )
2322
- }
2323
- )
2324
- }
2325
- )
2326
- ]
2327
- }
2328
- ),
2300
+ value: item.label,
2301
+ onSelect: () => {
2302
+ onChange(item.value);
2303
+ setOpen(false);
2304
+ },
2305
+ "data-testid": testIds.item?.(String(item.value)) ?? `avatar-select-item-${item.value}`,
2306
+ children: [
2307
+ renderItem(item),
2308
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2309
+ import_react16.CheckIcon,
2310
+ {
2311
+ className: cn(
2312
+ "ml-auto h-4 w-4",
2313
+ selected === item.value ? "opacity-100" : "opacity-0"
2314
+ )
2315
+ }
2316
+ )
2317
+ ]
2318
+ },
2319
+ item.value
2320
+ )) }, key)) : /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(CommandGroupBase, { children: items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
2321
+ CommandItemBase,
2322
+ {
2323
+ value: item.label,
2324
+ onSelect: () => {
2325
+ onChange(item.value);
2326
+ setOpen(false);
2327
+ },
2328
+ "data-testid": testIds.item?.(String(item.value)) ?? `avatar-select-item-${item.value}`,
2329
+ children: [
2330
+ renderItem(item),
2331
+ /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
2332
+ import_react16.CheckIcon,
2333
+ {
2334
+ className: cn(
2335
+ "ml-auto h-4 w-4",
2336
+ selected === item.value ? "opacity-100" : "opacity-0"
2337
+ )
2338
+ }
2339
+ )
2340
+ ]
2341
+ },
2342
+ item.value
2343
+ )) })
2344
+ ] })
2345
+ ] })
2346
+ }
2347
+ )
2348
+ ] }),
2329
2349
  /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(ErrorMessage_default, { error })
2330
2350
  ] });
2331
2351
  }
2332
2352
 
2333
2353
  // src/components/charts/Chart.tsx
2334
- var import_react20 = require("react");
2354
+ var import_react21 = require("react");
2335
2355
  var import_recharts = require("recharts");
2336
2356
 
2337
2357
  // src/components/charts/utils/helpers.ts
@@ -2478,7 +2498,7 @@ var resolveChartMargins = (margins, chartMargins, showLabels) => {
2478
2498
  var import_sonner = require("sonner");
2479
2499
 
2480
2500
  // src/components/charts/components/controls/PeriodsDropdown.tsx
2481
- var import_react16 = require("react");
2501
+ var import_react17 = require("react");
2482
2502
  var import_framer_motion6 = require("framer-motion");
2483
2503
  var import_ssr = require("@phosphor-icons/react/dist/ssr");
2484
2504
  var import_ssr2 = require("@phosphor-icons/react/dist/ssr");
@@ -2501,11 +2521,11 @@ function PeriodsDropdown({
2501
2521
  activePeriods
2502
2522
  }) {
2503
2523
  const periods = processedData.map((d) => String(d.name));
2504
- const [open, setOpen] = (0, import_react16.useState)(false);
2505
- const wrapperRef = (0, import_react16.useRef)(null);
2506
- const firstItemRef = (0, import_react16.useRef)(null);
2507
- const listRef = (0, import_react16.useRef)(null);
2508
- (0, import_react16.useEffect)(() => {
2524
+ const [open, setOpen] = (0, import_react17.useState)(false);
2525
+ const wrapperRef = (0, import_react17.useRef)(null);
2526
+ const firstItemRef = (0, import_react17.useRef)(null);
2527
+ const listRef = (0, import_react17.useRef)(null);
2528
+ (0, import_react17.useEffect)(() => {
2509
2529
  const handleClickOutside = (e) => {
2510
2530
  if (!wrapperRef.current) return;
2511
2531
  if (!wrapperRef.current.contains(e.target)) setOpen(false);
@@ -2520,7 +2540,7 @@ function PeriodsDropdown({
2520
2540
  document.removeEventListener("keydown", handleEscape);
2521
2541
  };
2522
2542
  }, []);
2523
- (0, import_react16.useEffect)(() => {
2543
+ (0, import_react17.useEffect)(() => {
2524
2544
  if (open && firstItemRef.current) {
2525
2545
  firstItemRef.current.focus();
2526
2546
  }
@@ -2613,7 +2633,7 @@ var PeriodsDropdown_default = PeriodsDropdown;
2613
2633
 
2614
2634
  // src/components/charts/components/controls/ShowOnly.tsx
2615
2635
  var import_framer_motion7 = require("framer-motion");
2616
- var import_react17 = require("@phosphor-icons/react");
2636
+ var import_react18 = require("@phosphor-icons/react");
2617
2637
  var import_jsx_runtime21 = require("react/jsx-runtime");
2618
2638
  var ShowOnly = ({
2619
2639
  showOnlyHighlighted,
@@ -2642,10 +2662,10 @@ var ShowOnly = ({
2642
2662
  !hasHighlights ? "opacity-60 cursor-not-allowed pointer-events-none" : showOnlyHighlighted ? "bg-primary/10 text-primary shadow-sm border border-primary/20" : "bg-transparent text-muted-foreground border border-transparent hover:bg-muted/10 hover:text-foreground"
2643
2663
  ),
2644
2664
  children: showOnlyHighlighted ? /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
2645
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react17.EyeSlash, { size: 16, weight: "regular" }),
2665
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react18.EyeSlash, { size: 16, weight: "regular" }),
2646
2666
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "sr-only", children: "Exibir todos" })
2647
2667
  ] }) : /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_jsx_runtime21.Fragment, { children: [
2648
- /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react17.Eye, { size: 16, weight: "bold" }),
2668
+ /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react18.Eye, { size: 16, weight: "bold" }),
2649
2669
  /* @__PURE__ */ (0, import_jsx_runtime21.jsx)("span", { className: "sr-only", children: "Mostrar somente destacados" })
2650
2670
  ] })
2651
2671
  }
@@ -2863,9 +2883,9 @@ var CloseAllButton = ({
2863
2883
  var CloseAllButton_default = CloseAllButton;
2864
2884
 
2865
2885
  // src/components/charts/components/tooltips/DraggableTooltip.tsx
2866
- var import_react18 = __toESM(require("react"));
2886
+ var import_react19 = __toESM(require("react"));
2867
2887
  var import_framer_motion9 = require("framer-motion");
2868
- var import_react19 = require("@phosphor-icons/react");
2888
+ var import_react20 = require("@phosphor-icons/react");
2869
2889
  var import_ssr5 = require("@phosphor-icons/react/dist/ssr");
2870
2890
  var import_jsx_runtime24 = require("react/jsx-runtime");
2871
2891
  var ALIGNMENT_THRESHOLD = 25;
@@ -2944,12 +2964,12 @@ var DraggableTooltipComponent = ({
2944
2964
  valueFormatter: valueFormatter2,
2945
2965
  categoryFormatter
2946
2966
  }) => {
2947
- const visibleKeys = (0, import_react18.useMemo)(
2967
+ const visibleKeys = (0, import_react19.useMemo)(
2948
2968
  () => showOnlyHighlighted && highlightedSeries && highlightedSeries.size > 0 ? dataKeys.filter((k) => highlightedSeries.has(k)) : dataKeys,
2949
2969
  [showOnlyHighlighted, highlightedSeries, dataKeys]
2950
2970
  );
2951
- const TotalDisplay = import_react18.default.memo(({ data: data2, visibleKeys: visibleKeys2, valueFormatter: localformatter }) => {
2952
- const total = (0, import_react18.useMemo)(() => {
2971
+ const TotalDisplay = import_react19.default.memo(({ data: data2, visibleKeys: visibleKeys2, valueFormatter: localformatter }) => {
2972
+ const total = (0, import_react19.useMemo)(() => {
2953
2973
  const numeric = visibleKeys2.map((k) => data2[k]).filter((v) => typeof v === "number");
2954
2974
  return numeric.reduce((s, v) => s + (v || 0), 0);
2955
2975
  }, [data2, visibleKeys2]);
@@ -2971,14 +2991,14 @@ var DraggableTooltipComponent = ({
2971
2991
  )
2972
2992
  ] });
2973
2993
  });
2974
- const [localPos, setLocalPos] = (0, import_react18.useState)(position);
2975
- const [dragging, setDragging] = (0, import_react18.useState)(false);
2976
- const offsetRef = (0, import_react18.useRef)({ x: 0, y: 0 });
2977
- const lastMouse = (0, import_react18.useRef)({ x: 0, y: 0 });
2978
- const [alignmentGuides, setAlignmentGuides] = (0, import_react18.useState)([]);
2979
- const [globalTooltipCountLocal, setGlobalTooltipCountLocal] = (0, import_react18.useState)(0);
2980
- (0, import_react18.useEffect)(() => setLocalPos(position), [position]);
2981
- const getAllTooltips = (0, import_react18.useCallback)(() => {
2994
+ const [localPos, setLocalPos] = (0, import_react19.useState)(position);
2995
+ const [dragging, setDragging] = (0, import_react19.useState)(false);
2996
+ const offsetRef = (0, import_react19.useRef)({ x: 0, y: 0 });
2997
+ const lastMouse = (0, import_react19.useRef)({ x: 0, y: 0 });
2998
+ const [alignmentGuides, setAlignmentGuides] = (0, import_react19.useState)([]);
2999
+ const [globalTooltipCountLocal, setGlobalTooltipCountLocal] = (0, import_react19.useState)(0);
3000
+ (0, import_react19.useEffect)(() => setLocalPos(position), [position]);
3001
+ const getAllTooltips = (0, import_react19.useCallback)(() => {
2982
3002
  const response = [];
2983
3003
  const ev = new CustomEvent("requestGlobalTooltips", {
2984
3004
  detail: { requesterId: id, response }
@@ -2986,7 +3006,7 @@ var DraggableTooltipComponent = ({
2986
3006
  window.dispatchEvent(ev);
2987
3007
  return response;
2988
3008
  }, [id]);
2989
- const updateAlignmentGuides = (0, import_react18.useCallback)(
3009
+ const updateAlignmentGuides = (0, import_react19.useCallback)(
2990
3010
  (currentPosition) => {
2991
3011
  const allTooltips = getAllTooltips();
2992
3012
  const otherTooltips = allTooltips.filter((t) => t.id !== id);
@@ -3035,7 +3055,7 @@ var DraggableTooltipComponent = ({
3035
3055
  },
3036
3056
  [getAllTooltips, id]
3037
3057
  );
3038
- const snapToGuides = (0, import_react18.useCallback)(
3058
+ const snapToGuides = (0, import_react19.useCallback)(
3039
3059
  (position2) => {
3040
3060
  const snappedPosition = { ...position2 };
3041
3061
  let hasSnapped = false;
@@ -3082,7 +3102,7 @@ var DraggableTooltipComponent = ({
3082
3102
  },
3083
3103
  [alignmentGuides]
3084
3104
  );
3085
- (0, import_react18.useEffect)(() => {
3105
+ (0, import_react19.useEffect)(() => {
3086
3106
  let rafId = null;
3087
3107
  const handleMouseMove = (e) => {
3088
3108
  if (!dragging) return;
@@ -3124,7 +3144,7 @@ var DraggableTooltipComponent = ({
3124
3144
  document.body.style.userSelect = "";
3125
3145
  };
3126
3146
  }, [dragging, snapToGuides, updateAlignmentGuides, id, onPositionChange]);
3127
- (0, import_react18.useEffect)(() => {
3147
+ (0, import_react19.useEffect)(() => {
3128
3148
  const handleCloseAll = () => onClose(id);
3129
3149
  const handleRequestTooltipCount = () => {
3130
3150
  window.dispatchEvent(
@@ -3155,7 +3175,7 @@ var DraggableTooltipComponent = ({
3155
3175
  });
3156
3176
  };
3157
3177
  }, [id, localPos, onClose]);
3158
- (0, import_react18.useEffect)(() => {
3178
+ (0, import_react19.useEffect)(() => {
3159
3179
  if (dragging) return;
3160
3180
  let total = 0;
3161
3181
  const timeoutId = setTimeout(() => {
@@ -3173,7 +3193,7 @@ var DraggableTooltipComponent = ({
3173
3193
  }, 0);
3174
3194
  return () => clearTimeout(timeoutId);
3175
3195
  }, [localPos, dragging]);
3176
- (0, import_react18.useEffect)(() => {
3196
+ (0, import_react19.useEffect)(() => {
3177
3197
  const recount = () => {
3178
3198
  if (dragging) return;
3179
3199
  let total = 0;
@@ -3191,7 +3211,7 @@ var DraggableTooltipComponent = ({
3191
3211
  window.addEventListener("recountTooltips", recount);
3192
3212
  return () => window.removeEventListener("recountTooltips", recount);
3193
3213
  }, [dragging]);
3194
- const handleMouseDownLocal = (0, import_react18.useCallback)(
3214
+ const handleMouseDownLocal = (0, import_react19.useCallback)(
3195
3215
  (e) => {
3196
3216
  e.preventDefault();
3197
3217
  e.stopPropagation();
@@ -3202,7 +3222,7 @@ var DraggableTooltipComponent = ({
3202
3222
  },
3203
3223
  [id, onMouseDown]
3204
3224
  );
3205
- const handleTouchStartLocal = (0, import_react18.useCallback)(
3225
+ const handleTouchStartLocal = (0, import_react19.useCallback)(
3206
3226
  (e) => {
3207
3227
  e.stopPropagation();
3208
3228
  const touch = e.touches[0];
@@ -3217,7 +3237,7 @@ var DraggableTooltipComponent = ({
3217
3237
  },
3218
3238
  [id, onMouseDown]
3219
3239
  );
3220
- const handleCloseClick = (0, import_react18.useCallback)(
3240
+ const handleCloseClick = (0, import_react19.useCallback)(
3221
3241
  (e) => {
3222
3242
  e.stopPropagation();
3223
3243
  onClose(id);
@@ -3333,7 +3353,7 @@ var DraggableTooltipComponent = ({
3333
3353
  onTouchStart: handleTouchStartLocal,
3334
3354
  style: { touchAction: "none" },
3335
3355
  children: [
3336
- /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react19.DotsSixVerticalIcon, { size: 16 }),
3356
+ /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(import_react20.DotsSixVerticalIcon, { size: 16 }),
3337
3357
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex flex-col gap-1", children: title && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("div", { className: "flex items-center gap-2 pb-0.5", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "font-bold text-foreground text-base", children: title }) }) }),
3338
3358
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3339
3359
  "button",
@@ -3363,7 +3383,7 @@ var DraggableTooltipComponent = ({
3363
3383
  ] }) }),
3364
3384
  /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)("div", { className: "p-3 pt-2 space-y-2", children: [
3365
3385
  /* @__PURE__ */ (0, import_jsx_runtime24.jsx)("p", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide mb-2", children: dataLabel }),
3366
- (0, import_react18.useMemo)(
3386
+ (0, import_react19.useMemo)(
3367
3387
  () => visibleKeys.map((key) => {
3368
3388
  const value = data[key];
3369
3389
  if (value === void 0) return null;
@@ -3481,7 +3501,7 @@ var DraggableTooltipComponent = ({
3481
3501
  )
3482
3502
  ] });
3483
3503
  };
3484
- var DraggableTooltip = import_react18.default.memo(DraggableTooltipComponent);
3504
+ var DraggableTooltip = import_react19.default.memo(DraggableTooltipComponent);
3485
3505
  DraggableTooltip.displayName = "DraggableTooltip";
3486
3506
  var DraggableTooltip_default = DraggableTooltip;
3487
3507
 
@@ -3825,14 +3845,14 @@ var pillLabelRenderer_default = renderPillLabel;
3825
3845
 
3826
3846
  // src/components/charts/Chart.tsx
3827
3847
  var import_jsx_runtime28 = require("react/jsx-runtime");
3828
- var DEFAULT_COLORS = ["#55af7d", "#8e68ff", "#2273e1"];
3848
+ var DEFAULT_COLORS2 = ["#55af7d", "#8e68ff", "#2273e1"];
3829
3849
  var Chart = ({
3830
3850
  data,
3831
3851
  series,
3832
3852
  className,
3833
3853
  height = 350,
3834
3854
  width = "100%",
3835
- colors: colors2 = DEFAULT_COLORS,
3855
+ colors: colors2 = DEFAULT_COLORS2,
3836
3856
  gridColor,
3837
3857
  showGrid = true,
3838
3858
  showTooltip = true,
@@ -3855,7 +3875,7 @@ var Chart = ({
3855
3875
  formatBR = false,
3856
3876
  chartMargin
3857
3877
  }) => {
3858
- const smartConfig = (0, import_react20.useMemo)(() => {
3878
+ const smartConfig = (0, import_react21.useMemo)(() => {
3859
3879
  const resolvedXAxisKey = typeof xAxis === "string" ? xAxis : xAxis && xAxis.dataKey || detectXAxis(data);
3860
3880
  const xAxisConfig2 = typeof xAxis === "string" ? {
3861
3881
  dataKey: resolvedXAxisKey,
@@ -3879,12 +3899,12 @@ var Chart = ({
3879
3899
  return { xAxisConfig: xAxisConfig2, mapperConfig: mapperConfig2 };
3880
3900
  }, [data, xAxis, labelMap]);
3881
3901
  const { xAxisConfig, mapperConfig } = smartConfig;
3882
- const [activeTooltips, setActiveTooltips] = (0, import_react20.useState)([]);
3883
- const [highlightedSeries, setHighlightedSeries] = (0, import_react20.useState)(
3902
+ const [activeTooltips, setActiveTooltips] = (0, import_react21.useState)([]);
3903
+ const [highlightedSeries, setHighlightedSeries] = (0, import_react21.useState)(
3884
3904
  /* @__PURE__ */ new Set()
3885
3905
  );
3886
- const [showOnlyHighlighted, setShowOnlyHighlighted] = (0, import_react20.useState)(false);
3887
- (0, import_react20.useEffect)(() => {
3906
+ const [showOnlyHighlighted, setShowOnlyHighlighted] = (0, import_react21.useState)(false);
3907
+ (0, import_react21.useEffect)(() => {
3888
3908
  if (highlightedSeries.size === 0 && showOnlyHighlighted) {
3889
3909
  setShowOnlyHighlighted(false);
3890
3910
  }
@@ -3893,9 +3913,9 @@ var Chart = ({
3893
3913
  ...item,
3894
3914
  name: String(item[xAxisConfig.dataKey] || "N/A")
3895
3915
  }));
3896
- const wrapperRef = (0, import_react20.useRef)(null);
3897
- const [measuredWidth, setMeasuredWidth] = (0, import_react20.useState)(null);
3898
- (0, import_react20.useLayoutEffect)(() => {
3916
+ const wrapperRef = (0, import_react21.useRef)(null);
3917
+ const [measuredWidth, setMeasuredWidth] = (0, import_react21.useState)(null);
3918
+ (0, import_react21.useLayoutEffect)(() => {
3899
3919
  const el = wrapperRef.current;
3900
3920
  if (!el) return;
3901
3921
  const ro = new ResizeObserver((entries) => {
@@ -3922,7 +3942,7 @@ var Chart = ({
3922
3942
  );
3923
3943
  }
3924
3944
  const allKeys = seriesOrder.map((s) => s.key).filter(Boolean);
3925
- const generateColors = (0, import_react20.useCallback)(
3945
+ const generateColors = (0, import_react21.useCallback)(
3926
3946
  (dataKeys) => {
3927
3947
  const colorMap = {};
3928
3948
  const allColors = generateAdditionalColors(colors2, dataKeys.length);
@@ -3933,25 +3953,25 @@ var Chart = ({
3933
3953
  },
3934
3954
  [colors2, mapperConfig]
3935
3955
  );
3936
- const finalColors = (0, import_react20.useMemo)(
3956
+ const finalColors = (0, import_react21.useMemo)(
3937
3957
  () => generateColors(allKeys),
3938
3958
  [generateColors, allKeys]
3939
3959
  );
3940
- const adaptDataForTooltip = (0, import_react20.useCallback)(
3960
+ const adaptDataForTooltip = (0, import_react21.useCallback)(
3941
3961
  (universalData) => ({
3942
3962
  ...universalData,
3943
3963
  name: String(universalData[xAxisConfig.dataKey] || "N/A")
3944
3964
  }),
3945
3965
  [xAxisConfig.dataKey]
3946
3966
  );
3947
- const activePeriods = (0, import_react20.useMemo)(
3967
+ const activePeriods = (0, import_react21.useMemo)(
3948
3968
  () => activeTooltips.map((t) => adaptDataForTooltip(t.data).name),
3949
3969
  [activeTooltips, adaptDataForTooltip]
3950
3970
  );
3951
- (0, import_react20.useEffect)(() => {
3971
+ (0, import_react21.useEffect)(() => {
3952
3972
  window.dispatchEvent(new Event("recountTooltips"));
3953
3973
  }, [activeTooltips.length]);
3954
- const toggleHighlight = (0, import_react20.useCallback)((key) => {
3974
+ const toggleHighlight = (0, import_react21.useCallback)((key) => {
3955
3975
  setHighlightedSeries((prev) => {
3956
3976
  const next = new Set(prev);
3957
3977
  if (next.has(key)) next.delete(key);
@@ -3959,7 +3979,7 @@ var Chart = ({
3959
3979
  return next;
3960
3980
  });
3961
3981
  }, []);
3962
- const maxDataValue = (0, import_react20.useMemo)(() => {
3982
+ const maxDataValue = (0, import_react21.useMemo)(() => {
3963
3983
  let max = 0;
3964
3984
  const numericKeys = allKeys;
3965
3985
  for (const row of processedData) {
@@ -3971,7 +3991,7 @@ var Chart = ({
3971
3991
  }
3972
3992
  return max;
3973
3993
  }, [processedData, allKeys]);
3974
- const minDataValue = (0, import_react20.useMemo)(() => {
3994
+ const minDataValue = (0, import_react21.useMemo)(() => {
3975
3995
  let min = 0;
3976
3996
  const numericKeys = allKeys;
3977
3997
  for (const row of processedData) {
@@ -3984,7 +4004,7 @@ var Chart = ({
3984
4004
  }
3985
4005
  return min;
3986
4006
  }, [processedData, allKeys]);
3987
- const niceMax = (0, import_react20.useMemo)(() => {
4007
+ const niceMax = (0, import_react21.useMemo)(() => {
3988
4008
  let padding = 0.08;
3989
4009
  if (maxDataValue > 1e6) padding = 0.05;
3990
4010
  if (maxDataValue > 1e7) padding = 0.03;
@@ -3992,7 +4012,7 @@ var Chart = ({
3992
4012
  const padded = maxDataValue * (1 + padding);
3993
4013
  return niceCeil(padded);
3994
4014
  }, [maxDataValue]);
3995
- const computedWidth = (0, import_react20.useMemo)(() => {
4015
+ const computedWidth = (0, import_react21.useMemo)(() => {
3996
4016
  if (typeof width === "number") return width;
3997
4017
  const points = Math.max(1, processedData.length);
3998
4018
  const barCount = series?.bar?.length ?? 0;
@@ -4021,7 +4041,7 @@ var Chart = ({
4021
4041
  series?.area?.length,
4022
4042
  niceMax
4023
4043
  ]);
4024
- const toggleTooltip = (0, import_react20.useCallback)(
4044
+ const toggleTooltip = (0, import_react21.useCallback)(
4025
4045
  (tooltipId, data2, basePosition) => {
4026
4046
  const existingIndex = activeTooltips.findIndex((t) => t.id === tooltipId);
4027
4047
  if (existingIndex !== -1) {
@@ -4050,7 +4070,7 @@ var Chart = ({
4050
4070
  },
4051
4071
  [activeTooltips, maxTooltips]
4052
4072
  );
4053
- const handleChartClick = (0, import_react20.useCallback)(
4073
+ const handleChartClick = (0, import_react21.useCallback)(
4054
4074
  (e) => {
4055
4075
  if (!enableDraggableTooltips) return;
4056
4076
  const ev = e;
@@ -4068,7 +4088,7 @@ var Chart = ({
4068
4088
  },
4069
4089
  [enableDraggableTooltips, xAxisConfig.dataKey, toggleTooltip]
4070
4090
  );
4071
- const handleBarClick = (0, import_react20.useCallback)(
4091
+ const handleBarClick = (0, import_react21.useCallback)(
4072
4092
  (data2, index, event) => {
4073
4093
  if (!enableDraggableTooltips) return;
4074
4094
  event.stopPropagation();
@@ -4082,7 +4102,7 @@ var Chart = ({
4082
4102
  },
4083
4103
  [enableDraggableTooltips, xAxisConfig.dataKey, toggleTooltip]
4084
4104
  );
4085
- const handleSeriesClick = (0, import_react20.useCallback)(
4105
+ const handleSeriesClick = (0, import_react21.useCallback)(
4086
4106
  (...args) => {
4087
4107
  if (args.length >= 3) {
4088
4108
  const [data2, index, event] = args;
@@ -4093,7 +4113,7 @@ var Chart = ({
4093
4113
  },
4094
4114
  [handleBarClick, handleChartClick]
4095
4115
  );
4096
- const onTooltipPositionChange = (0, import_react20.useCallback)(
4116
+ const onTooltipPositionChange = (0, import_react21.useCallback)(
4097
4117
  (id, position) => {
4098
4118
  setActiveTooltips(
4099
4119
  (prev) => prev.map((t) => t.id === id ? { ...t, position } : t)
@@ -4101,11 +4121,11 @@ var Chart = ({
4101
4121
  },
4102
4122
  []
4103
4123
  );
4104
- const titleClassName = (0, import_react20.useMemo)(
4124
+ const titleClassName = (0, import_react21.useMemo)(
4105
4125
  () => "text-xl font-semibold text-foreground mb-3",
4106
4126
  []
4107
4127
  );
4108
- const finalValueFormatter = (0, import_react20.useMemo)(() => {
4128
+ const finalValueFormatter = (0, import_react21.useMemo)(() => {
4109
4129
  const nf = new Intl.NumberFormat("pt-BR", {
4110
4130
  minimumFractionDigits: 2,
4111
4131
  maximumFractionDigits: 2
@@ -4145,7 +4165,7 @@ var Chart = ({
4145
4165
  };
4146
4166
  return builtIn;
4147
4167
  }, [valueFormatter2, formatBR]);
4148
- const yTickFormatter = (0, import_react20.useMemo)(() => {
4168
+ const yTickFormatter = (0, import_react21.useMemo)(() => {
4149
4169
  const nf = new Intl.NumberFormat("pt-BR", {
4150
4170
  minimumFractionDigits: 2,
4151
4171
  maximumFractionDigits: 2
@@ -4183,7 +4203,7 @@ var Chart = ({
4183
4203
  const measuredInner = measuredWidth ? Math.max(0, measuredWidth - 32) : void 0;
4184
4204
  const effectiveChartWidth = typeof width === "number" ? width : measuredInner ?? computedWidth;
4185
4205
  const chartInnerWidth = effectiveChartWidth - finalChartLeftMargin - finalChartRightMargin;
4186
- const openTooltipForPeriod = (0, import_react20.useCallback)(
4206
+ const openTooltipForPeriod = (0, import_react21.useCallback)(
4187
4207
  (periodName) => {
4188
4208
  if (!enableDraggableTooltips) return;
4189
4209
  const row = processedData.find((r) => String(r.name) === periodName);
@@ -4622,16 +4642,16 @@ var Chart = ({
4622
4642
  var Chart_default = Chart;
4623
4643
 
4624
4644
  // src/components/charts/BarChart.tsx
4625
- var import_react21 = require("react");
4645
+ var import_react22 = require("react");
4626
4646
  var import_recharts2 = require("recharts");
4627
4647
  var import_jsx_runtime29 = require("react/jsx-runtime");
4628
- var DEFAULT_COLORS2 = ["#55af7d", "#8e68ff", "#2273e1"];
4648
+ var DEFAULT_COLORS3 = ["#55af7d", "#8e68ff", "#2273e1"];
4629
4649
  var BarChart = ({
4630
4650
  data,
4631
4651
  className,
4632
4652
  height = 350,
4633
4653
  width = 900,
4634
- colors: colors2 = DEFAULT_COLORS2,
4654
+ colors: colors2 = DEFAULT_COLORS3,
4635
4655
  gridColor,
4636
4656
  showGrid = true,
4637
4657
  showTooltip = true,
@@ -4654,7 +4674,7 @@ var BarChart = ({
4654
4674
  containerPaddingLeft,
4655
4675
  16
4656
4676
  );
4657
- const smartConfig = (0, import_react21.useMemo)(() => {
4677
+ const smartConfig = (0, import_react22.useMemo)(() => {
4658
4678
  const providedMapper = yAxis ?? mapper;
4659
4679
  if (autoDetect === true || xAxis == null || providedMapper == null) {
4660
4680
  const detectedXAxis = detectXAxis(data);
@@ -4704,14 +4724,14 @@ var BarChart = ({
4704
4724
  return { xAxisConfig: xAxisConfig2, mapperConfig: mapperConfig2 };
4705
4725
  }, [data, xAxis, mapper, yAxis, autoDetect, labelMap]);
4706
4726
  const { xAxisConfig, mapperConfig } = smartConfig;
4707
- const [activeTooltips, setActiveTooltips] = (0, import_react21.useState)([]);
4708
- const [isDragging, setIsDragging] = (0, import_react21.useState)(null);
4709
- const [dragOffset, setDragOffset] = (0, import_react21.useState)({
4727
+ const [activeTooltips, setActiveTooltips] = (0, import_react22.useState)([]);
4728
+ const [isDragging, setIsDragging] = (0, import_react22.useState)(null);
4729
+ const [dragOffset, setDragOffset] = (0, import_react22.useState)({
4710
4730
  x: 0,
4711
4731
  y: 0
4712
4732
  });
4713
- const [globalTooltipCount, setGlobalTooltipCount] = (0, import_react21.useState)(0);
4714
- const [alignmentGuides, setAlignmentGuides] = (0, import_react21.useState)([]);
4733
+ const [globalTooltipCount, setGlobalTooltipCount] = (0, import_react22.useState)(0);
4734
+ const [alignmentGuides, setAlignmentGuides] = (0, import_react22.useState)([]);
4715
4735
  const processedData = data.map((item) => ({
4716
4736
  ...item,
4717
4737
  name: String(item[xAxisConfig.dataKey] || "N/A")
@@ -4734,7 +4754,7 @@ var BarChart = ({
4734
4754
  // Garantir que tem a propriedade 'name'
4735
4755
  };
4736
4756
  };
4737
- const maxDataValue = (0, import_react21.useMemo)(() => {
4757
+ const maxDataValue = (0, import_react22.useMemo)(() => {
4738
4758
  let max = 0;
4739
4759
  const keys = Object.keys(mapperConfig);
4740
4760
  for (const row of processedData) {
@@ -4747,7 +4767,7 @@ var BarChart = ({
4747
4767
  }
4748
4768
  return max;
4749
4769
  }, [processedData, mapperConfig]);
4750
- const niceMax = (0, import_react21.useMemo)(() => {
4770
+ const niceMax = (0, import_react22.useMemo)(() => {
4751
4771
  let padding2 = 0.08;
4752
4772
  if (maxDataValue > 1e6) padding2 = 0.05;
4753
4773
  if (maxDataValue > 1e7) padding2 = 0.03;
@@ -4788,7 +4808,7 @@ var BarChart = ({
4788
4808
  const GUIDE_THRESHOLD2 = 60;
4789
4809
  const STRONG_SNAP_THRESHOLD2 = 35;
4790
4810
  const PRECISION_SNAP_THRESHOLD2 = 8;
4791
- const updateAlignmentGuides = (0, import_react21.useCallback)(
4811
+ const updateAlignmentGuides = (0, import_react22.useCallback)(
4792
4812
  (draggedTooltipId, currentPosition) => {
4793
4813
  if (!isDragging) return;
4794
4814
  const getAllTooltips = () => {
@@ -4852,7 +4872,7 @@ var BarChart = ({
4852
4872
  },
4853
4873
  [isDragging, activeTooltips]
4854
4874
  );
4855
- const snapToGuides = (0, import_react21.useCallback)(
4875
+ const snapToGuides = (0, import_react22.useCallback)(
4856
4876
  (position) => {
4857
4877
  const snappedPosition = { ...position };
4858
4878
  let hasSnapped = false;
@@ -4914,7 +4934,7 @@ var BarChart = ({
4914
4934
  setIsDragging(tooltipId);
4915
4935
  setDragOffset({ x: offsetX, y: offsetY });
4916
4936
  };
4917
- (0, import_react21.useEffect)(() => {
4937
+ (0, import_react22.useEffect)(() => {
4918
4938
  let rafId;
4919
4939
  let lastMousePosition = { x: 0, y: 0 };
4920
4940
  const handleGlobalMouseMove = (e) => {
@@ -4972,7 +4992,7 @@ var BarChart = ({
4972
4992
  updateAlignmentGuides,
4973
4993
  snapToGuides
4974
4994
  ]);
4975
- (0, import_react21.useEffect)(() => {
4995
+ (0, import_react22.useEffect)(() => {
4976
4996
  const handleCloseAllTooltips = () => {
4977
4997
  setActiveTooltips([]);
4978
4998
  setGlobalTooltipCount(0);
@@ -4982,7 +5002,7 @@ var BarChart = ({
4982
5002
  window.removeEventListener("closeAllTooltips", handleCloseAllTooltips);
4983
5003
  };
4984
5004
  }, []);
4985
- (0, import_react21.useEffect)(() => {
5005
+ (0, import_react22.useEffect)(() => {
4986
5006
  const handleTooltipCountRequest = () => {
4987
5007
  window.dispatchEvent(
4988
5008
  new CustomEvent("tooltipCountResponse", {
@@ -5021,7 +5041,7 @@ var BarChart = ({
5021
5041
  );
5022
5042
  };
5023
5043
  }, [activeTooltips]);
5024
- (0, import_react21.useEffect)(() => {
5044
+ (0, import_react22.useEffect)(() => {
5025
5045
  if (isDragging) return;
5026
5046
  let totalCount = 0;
5027
5047
  const handleCountResponse = (event) => {
@@ -5287,7 +5307,7 @@ var BarChart = ({
5287
5307
  var BarChart_default = BarChart;
5288
5308
 
5289
5309
  // src/components/charts/LineChart.tsx
5290
- var import_react22 = require("react");
5310
+ var import_react23 = require("react");
5291
5311
  var import_recharts3 = require("recharts");
5292
5312
  var import_jsx_runtime30 = require("react/jsx-runtime");
5293
5313
  var defaultData = [
@@ -5295,13 +5315,13 @@ var defaultData = [
5295
5315
  { name: "B", value: 200 },
5296
5316
  { name: "C", value: 150 }
5297
5317
  ];
5298
- var DEFAULT_COLORS3 = ["#55af7d", "#8e68ff", "#2273e1"];
5318
+ var DEFAULT_COLORS4 = ["#55af7d", "#8e68ff", "#2273e1"];
5299
5319
  var CustomLineChart = ({
5300
5320
  data = defaultData,
5301
5321
  className,
5302
5322
  height = 300,
5303
5323
  width = "100%",
5304
- colors: colors2 = DEFAULT_COLORS3,
5324
+ colors: colors2 = DEFAULT_COLORS4,
5305
5325
  gridColor,
5306
5326
  showGrid = true,
5307
5327
  showTooltip = true,
@@ -5321,14 +5341,14 @@ var CustomLineChart = ({
5321
5341
  containerPaddingLeft,
5322
5342
  16
5323
5343
  );
5324
- const [activeTooltips, setActiveTooltips] = (0, import_react22.useState)([]);
5325
- const [isDragging, setIsDragging] = (0, import_react22.useState)(null);
5326
- const [dragOffset, setDragOffset] = (0, import_react22.useState)({
5344
+ const [activeTooltips, setActiveTooltips] = (0, import_react23.useState)([]);
5345
+ const [isDragging, setIsDragging] = (0, import_react23.useState)(null);
5346
+ const [dragOffset, setDragOffset] = (0, import_react23.useState)({
5327
5347
  x: 0,
5328
5348
  y: 0
5329
5349
  });
5330
- const [globalTooltipCount, setGlobalTooltipCount] = (0, import_react22.useState)(0);
5331
- const [alignmentGuides, setAlignmentGuides] = (0, import_react22.useState)([]);
5350
+ const [globalTooltipCount, setGlobalTooltipCount] = (0, import_react23.useState)(0);
5351
+ const [alignmentGuides, setAlignmentGuides] = (0, import_react23.useState)([]);
5332
5352
  const generateColors = (dataKeys2) => {
5333
5353
  const colorMap = {};
5334
5354
  const allColors = generateAdditionalColors(colors2, dataKeys2.length);
@@ -5337,12 +5357,12 @@ var CustomLineChart = ({
5337
5357
  });
5338
5358
  return colorMap;
5339
5359
  };
5340
- const dataKeys = (0, import_react22.useMemo)(
5360
+ const dataKeys = (0, import_react23.useMemo)(
5341
5361
  () => data.length > 0 ? Object.keys(data[0]).filter((key) => key !== "name") : [],
5342
5362
  [data]
5343
5363
  );
5344
5364
  const finalColors = generateColors(dataKeys);
5345
- const maxDataValue = (0, import_react22.useMemo)(() => {
5365
+ const maxDataValue = (0, import_react23.useMemo)(() => {
5346
5366
  let max = 0;
5347
5367
  for (const row of data) {
5348
5368
  const r = row;
@@ -5354,7 +5374,7 @@ var CustomLineChart = ({
5354
5374
  }
5355
5375
  return max;
5356
5376
  }, [data, dataKeys]);
5357
- const niceMax = (0, import_react22.useMemo)(() => {
5377
+ const niceMax = (0, import_react23.useMemo)(() => {
5358
5378
  let padding2 = 0.08;
5359
5379
  if (maxDataValue > 1e6) padding2 = 0.05;
5360
5380
  if (maxDataValue > 1e7) padding2 = 0.03;
@@ -5430,10 +5450,10 @@ var CustomLineChart = ({
5430
5450
  const handleChartBackgroundClick = () => {
5431
5451
  setActiveTooltips([]);
5432
5452
  };
5433
- const handleCloseAllTooltips = (0, import_react22.useCallback)(() => {
5453
+ const handleCloseAllTooltips = (0, import_react23.useCallback)(() => {
5434
5454
  window.dispatchEvent(new CustomEvent("closeAllTooltips"));
5435
5455
  }, []);
5436
- const updateAlignmentGuides = (0, import_react22.useCallback)(
5456
+ const updateAlignmentGuides = (0, import_react23.useCallback)(
5437
5457
  (draggedTooltipId, draggedPosition) => {
5438
5458
  const SNAP_THRESHOLD = 15;
5439
5459
  const draggedTooltip = activeTooltips.find(
@@ -5514,7 +5534,7 @@ var CustomLineChart = ({
5514
5534
  },
5515
5535
  [activeTooltips]
5516
5536
  );
5517
- const snapToGuides = (0, import_react22.useCallback)(
5537
+ const snapToGuides = (0, import_react23.useCallback)(
5518
5538
  (position) => {
5519
5539
  const SNAP_DISTANCE = 10;
5520
5540
  const snappedPosition = { ...position };
@@ -5542,7 +5562,7 @@ var CustomLineChart = ({
5542
5562
  setIsDragging(tooltipId);
5543
5563
  setDragOffset({ x: offsetX, y: offsetY });
5544
5564
  };
5545
- (0, import_react22.useEffect)(() => {
5565
+ (0, import_react23.useEffect)(() => {
5546
5566
  let rafId;
5547
5567
  let lastMousePosition = { x: 0, y: 0 };
5548
5568
  const handleGlobalMouseMove = (e) => {
@@ -5589,7 +5609,7 @@ var CustomLineChart = ({
5589
5609
  updateAlignmentGuides,
5590
5610
  snapToGuides
5591
5611
  ]);
5592
- (0, import_react22.useEffect)(() => {
5612
+ (0, import_react23.useEffect)(() => {
5593
5613
  const handleCloseAllTooltips2 = () => {
5594
5614
  setActiveTooltips([]);
5595
5615
  setGlobalTooltipCount(0);
@@ -5599,7 +5619,7 @@ var CustomLineChart = ({
5599
5619
  window.removeEventListener("closeAllTooltips", handleCloseAllTooltips2);
5600
5620
  };
5601
5621
  }, []);
5602
- (0, import_react22.useEffect)(() => {
5622
+ (0, import_react23.useEffect)(() => {
5603
5623
  const handleTooltipCountRequest = () => {
5604
5624
  window.dispatchEvent(
5605
5625
  new CustomEvent("tooltipCountResponse", {
@@ -5643,7 +5663,7 @@ var CustomLineChart = ({
5643
5663
  );
5644
5664
  };
5645
5665
  }, [activeTooltips]);
5646
- (0, import_react22.useEffect)(() => {
5666
+ (0, import_react23.useEffect)(() => {
5647
5667
  if (isDragging) return;
5648
5668
  let totalCount = 0;
5649
5669
  const handleCountResponse = (event) => {
@@ -5867,7 +5887,7 @@ var defaultData2 = [
5867
5887
  { name: "Suporte", value: 1e3 },
5868
5888
  { name: "Outros", value: 800 }
5869
5889
  ];
5870
- var DEFAULT_COLORS4 = [
5890
+ var DEFAULT_COLORS5 = [
5871
5891
  "#55af7d",
5872
5892
  // verde do projeto
5873
5893
  "#8e68ff",
@@ -5925,7 +5945,7 @@ var CustomPieChart = ({
5925
5945
  centerX = "50%",
5926
5946
  centerY = "50%"
5927
5947
  }) => {
5928
- const finalColors = colors2 || DEFAULT_COLORS4;
5948
+ const finalColors = colors2 || DEFAULT_COLORS5;
5929
5949
  return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)("div", { className: cn("w-full rounded-lg bg-card p-4", className), children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_recharts4.ResponsiveContainer, { width, height, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_recharts4.PieChart, { children: [
5930
5950
  /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
5931
5951
  import_recharts4.Pie,
@@ -5965,13 +5985,13 @@ var CustomPieChart = ({
5965
5985
  var PieChart_default = CustomPieChart;
5966
5986
 
5967
5987
  // src/components/charts/hooks/useChartHighlights.tsx
5968
- var import_react23 = require("react");
5988
+ var import_react24 = require("react");
5969
5989
  var useChartHighlights = () => {
5970
- const [highlightedSeries, setHighlightedSeries] = (0, import_react23.useState)(
5990
+ const [highlightedSeries, setHighlightedSeries] = (0, import_react24.useState)(
5971
5991
  /* @__PURE__ */ new Set()
5972
5992
  );
5973
- const [showOnlyHighlighted, setShowOnlyHighlighted] = (0, import_react23.useState)(false);
5974
- const toggleHighlight = (0, import_react23.useCallback)((key) => {
5993
+ const [showOnlyHighlighted, setShowOnlyHighlighted] = (0, import_react24.useState)(false);
5994
+ const toggleHighlight = (0, import_react24.useCallback)((key) => {
5975
5995
  setHighlightedSeries((prev) => {
5976
5996
  const next = new Set(prev);
5977
5997
  if (next.has(key)) {
@@ -5982,17 +6002,17 @@ var useChartHighlights = () => {
5982
6002
  return next;
5983
6003
  });
5984
6004
  }, []);
5985
- const clearHighlights = (0, import_react23.useCallback)(() => {
6005
+ const clearHighlights = (0, import_react24.useCallback)(() => {
5986
6006
  setHighlightedSeries(/* @__PURE__ */ new Set());
5987
6007
  setShowOnlyHighlighted(false);
5988
6008
  }, []);
5989
- const isHighlighted = (0, import_react23.useCallback)(
6009
+ const isHighlighted = (0, import_react24.useCallback)(
5990
6010
  (key) => {
5991
6011
  return highlightedSeries.has(key);
5992
6012
  },
5993
6013
  [highlightedSeries]
5994
6014
  );
5995
- const getSeriesStyle = (0, import_react23.useCallback)(
6015
+ const getSeriesStyle = (0, import_react24.useCallback)(
5996
6016
  (key) => {
5997
6017
  const hasHighlights = highlightedSeries.size > 0;
5998
6018
  const isSeriesHighlighted = highlightedSeries.has(key);
@@ -6130,7 +6150,7 @@ function Badge({
6130
6150
  }
6131
6151
 
6132
6152
  // src/components/ui/data/CalendarBase.tsx
6133
- var import_react24 = require("@phosphor-icons/react");
6153
+ var import_react25 = require("@phosphor-icons/react");
6134
6154
  var import_react_day_picker = require("react-day-picker");
6135
6155
  var import_jsx_runtime34 = require("react/jsx-runtime");
6136
6156
  function CalendarBase({
@@ -6175,8 +6195,8 @@ function CalendarBase({
6175
6195
  ...classNames
6176
6196
  },
6177
6197
  components: {
6178
- IconLeft: () => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react24.CaretLeftIcon, { className: "h-4 w-4" }),
6179
- IconRight: () => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react24.CaretRightIcon, { className: "h-4 w-4" })
6198
+ IconLeft: () => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react25.CaretLeftIcon, { className: "h-4 w-4" }),
6199
+ IconRight: () => /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react25.CaretRightIcon, { className: "h-4 w-4" })
6180
6200
  },
6181
6201
  ...props
6182
6202
  }
@@ -6254,7 +6274,7 @@ CardFooterBase.displayName = "CardFooter";
6254
6274
  // src/components/ui/data/FileUploader.tsx
6255
6275
  var React18 = __toESM(require("react"));
6256
6276
  var import_framer_motion10 = require("framer-motion");
6257
- var import_react25 = require("@phosphor-icons/react");
6277
+ var import_react26 = require("@phosphor-icons/react");
6258
6278
  var import_jsx_runtime36 = require("react/jsx-runtime");
6259
6279
  var formatFileSize = (bytes) => {
6260
6280
  if (bytes === 0) return "0 Bytes";
@@ -6270,38 +6290,38 @@ var getFileTypeIcon = (file) => {
6270
6290
  const extension = getFileExtension(file.name).toLowerCase();
6271
6291
  const mimeType = file.type.toLowerCase();
6272
6292
  if (extension === "pdf" || mimeType === "application/pdf") {
6273
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react25.FilePdfIcon, { size: 20, className: "text-red-500" });
6293
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react26.FilePdfIcon, { size: 20, className: "text-red-500" });
6274
6294
  }
6275
6295
  if (["doc", "docx"].includes(extension) || mimeType.includes("word")) {
6276
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react25.FileDocIcon, { size: 20, className: "text-blue-500" });
6296
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react26.FileDocIcon, { size: 20, className: "text-blue-500" });
6277
6297
  }
6278
6298
  if (["xls", "xlsx"].includes(extension) || mimeType.includes("sheet")) {
6279
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react25.FileXlsIcon, { size: 20, className: "text-green-500" });
6299
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react26.FileXlsIcon, { size: 20, className: "text-green-500" });
6280
6300
  }
6281
6301
  if (["ppt", "pptx"].includes(extension) || mimeType.includes("presentation")) {
6282
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react25.FilePptIcon, { size: 20, className: "text-orange-500" });
6302
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react26.FilePptIcon, { size: 20, className: "text-orange-500" });
6283
6303
  }
6284
6304
  if (extension === "csv" || mimeType === "text/csv") {
6285
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react25.FileCsvIcon, { size: 20, className: "text-green-600" });
6305
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react26.FileCsvIcon, { size: 20, className: "text-green-600" });
6286
6306
  }
6287
6307
  if (["txt", "md", "json", "xml", "js", "ts", "html", "css"].includes(
6288
6308
  extension
6289
6309
  ) || mimeType.includes("text")) {
6290
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react25.FileTextIcon, { size: 20, className: "text-gray-500" });
6310
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react26.FileTextIcon, { size: 20, className: "text-gray-500" });
6291
6311
  }
6292
6312
  if (mimeType.startsWith("image/")) {
6293
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react25.FileImageIcon, { size: 20, className: "text-purple-500" });
6313
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react26.FileImageIcon, { size: 20, className: "text-purple-500" });
6294
6314
  }
6295
6315
  if (mimeType.startsWith("video/")) {
6296
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react25.FileVideoIcon, { size: 20, className: "text-pink-500" });
6316
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react26.FileVideoIcon, { size: 20, className: "text-pink-500" });
6297
6317
  }
6298
6318
  if (mimeType.startsWith("audio/")) {
6299
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react25.FileAudioIcon, { size: 20, className: "text-indigo-500" });
6319
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react26.FileAudioIcon, { size: 20, className: "text-indigo-500" });
6300
6320
  }
6301
6321
  if (["zip", "rar", "7z", "tar", "gz"].includes(extension)) {
6302
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react25.FileZipIcon, { size: 20, className: "text-yellow-600" });
6322
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react26.FileZipIcon, { size: 20, className: "text-yellow-600" });
6303
6323
  }
6304
- return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react25.FileIcon, { size: 20, className: "text-muted-foreground" });
6324
+ return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react26.FileIcon, { size: 20, className: "text-muted-foreground" });
6305
6325
  };
6306
6326
  var createImagePreview = (file) => {
6307
6327
  return new Promise((resolve) => {
@@ -6531,7 +6551,7 @@ var FileUploader = React18.forwardRef(
6531
6551
  color: isDragging ? `hsl(var(--primary))` : `hsl(var(--muted-foreground))`
6532
6552
  },
6533
6553
  transition: { duration: 0.3 },
6534
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react25.CloudArrowUpIcon, { size: 64 })
6554
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react26.CloudArrowUpIcon, { size: 64 })
6535
6555
  }
6536
6556
  )
6537
6557
  }
@@ -6573,7 +6593,7 @@ var FileUploader = React18.forwardRef(
6573
6593
  ),
6574
6594
  transition: { duration: 0.3 },
6575
6595
  children: [
6576
- /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "h-4 w-4 text-primary flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react25.CheckIcon, { size: 16, className: "text-emerald-500" }) }),
6596
+ /* @__PURE__ */ (0, import_jsx_runtime36.jsx)("div", { className: "h-4 w-4 text-primary flex items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react26.CheckIcon, { size: 16, className: "text-emerald-500" }) }),
6577
6597
  /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(
6578
6598
  import_framer_motion10.motion.span,
6579
6599
  {
@@ -6675,7 +6695,7 @@ var FileUploader = React18.forwardRef(
6675
6695
  handleRemoveFile(file.id);
6676
6696
  },
6677
6697
  className: "",
6678
- children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react25.XIcon, { size: 12 })
6698
+ children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react26.XIcon, { size: 12 })
6679
6699
  }
6680
6700
  )
6681
6701
  ]
@@ -6799,7 +6819,7 @@ AlertDialogCancelBase.displayName = AlertDialogPrimitive.Cancel.displayName;
6799
6819
 
6800
6820
  // src/components/ui/feedback/DestructiveDialog.tsx
6801
6821
  var React20 = __toESM(require("react"));
6802
- var import_react26 = require("@phosphor-icons/react");
6822
+ var import_react27 = require("@phosphor-icons/react");
6803
6823
  var import_jsx_runtime38 = require("react/jsx-runtime");
6804
6824
  var DestructiveDialog = ({
6805
6825
  title,
@@ -6819,7 +6839,7 @@ var DestructiveDialog = ({
6819
6839
  className: cn("border border-destructive bg-background", className),
6820
6840
  children: [
6821
6841
  /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex items-start gap-4", children: [
6822
- /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex items-center justify-center w-10 h-10 rounded-full ring-1 ring-destructive/30", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react26.XCircleIcon, { className: "w-6 h-6 text-destructive" }) }),
6842
+ /* @__PURE__ */ (0, import_jsx_runtime38.jsx)("div", { className: "flex items-center justify-center w-10 h-10 rounded-full ring-1 ring-destructive/30", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react27.XCircleIcon, { className: "w-6 h-6 text-destructive" }) }),
6823
6843
  /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)("div", { className: "flex-1", children: [
6824
6844
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AlertDialogTitleBase, { className: "text-lg sm:text-xl font-semibold text-destructive", children: title }),
6825
6845
  /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(AlertDialogDescriptionBase, { className: "mt-2 text-sm text-muted-foreground", children: description })
@@ -7028,7 +7048,7 @@ LoadingBase.displayName = "LoadingBase";
7028
7048
  // src/components/ui/feedback/ModalBase.tsx
7029
7049
  var React22 = __toESM(require("react"));
7030
7050
  var DialogPrimitive2 = __toESM(require("@radix-ui/react-dialog"));
7031
- var import_react27 = require("@phosphor-icons/react");
7051
+ var import_react28 = require("@phosphor-icons/react");
7032
7052
  var import_jsx_runtime40 = require("react/jsx-runtime");
7033
7053
  var ModalBase = DialogPrimitive2.Root;
7034
7054
  var ModalTriggerBase = DialogPrimitive2.Trigger;
@@ -7101,7 +7121,7 @@ var ModalContentBase = React22.forwardRef(
7101
7121
  children: [
7102
7122
  children,
7103
7123
  /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(DialogPrimitive2.Close, { className: "absolute right-3 top-3 sm:right-4 sm:top-4 rounded-md bg-muted/10 p-1.5 opacity-80 hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none z-10 hover:bg-muted/20 transition-colors", children: [
7104
- /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react27.XIcon, { className: "h-5 w-5 sm:h-4 sm:w-4 text-foreground" }),
7124
+ /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react28.XIcon, { className: "h-5 w-5 sm:h-4 sm:w-4 text-foreground" }),
7105
7125
  /* @__PURE__ */ (0, import_jsx_runtime40.jsx)("span", { className: "sr-only", children: "Close" })
7106
7126
  ] })
7107
7127
  ]
@@ -7425,7 +7445,7 @@ function SkeletonBase({
7425
7445
  }
7426
7446
 
7427
7447
  // src/components/ui/feedback/SonnerBase.tsx
7428
- var import_react28 = require("@phosphor-icons/react");
7448
+ var import_react29 = require("@phosphor-icons/react");
7429
7449
  var import_sonner2 = require("sonner");
7430
7450
  var import_jsx_runtime43 = require("react/jsx-runtime");
7431
7451
  var iconBaseClass = "w-5 h-auto";
@@ -7477,23 +7497,23 @@ var Toaster = ({ testId, ...props }) => {
7477
7497
  };
7478
7498
  var toast2 = {
7479
7499
  success: (message) => import_sonner2.toast.success(message, {
7480
- icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react28.CheckCircleIcon, { className: `${iconBaseClass} text-green-600`, weight: "fill" }),
7500
+ icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react29.CheckCircleIcon, { className: `${iconBaseClass} text-green-600`, weight: "fill" }),
7481
7501
  className: "sonner-success"
7482
7502
  }),
7483
7503
  error: (message) => import_sonner2.toast.error(message, {
7484
- icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react28.XCircleIcon, { className: `${iconBaseClass} text-red-600`, weight: "fill" }),
7504
+ icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react29.XCircleIcon, { className: `${iconBaseClass} text-red-600`, weight: "fill" }),
7485
7505
  className: "sonner-error"
7486
7506
  }),
7487
7507
  warning: (message) => import_sonner2.toast.warning(message, {
7488
- icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react28.WarningIcon, { className: `${iconBaseClass} text-yellow-600`, weight: "fill" }),
7508
+ icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react29.WarningIcon, { className: `${iconBaseClass} text-yellow-600`, weight: "fill" }),
7489
7509
  className: "sonner-WarningIcon"
7490
7510
  }),
7491
7511
  info: (message) => import_sonner2.toast.info(message, {
7492
- icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react28.InfoIcon, { className: `${iconBaseClass} text-blue-600`, weight: "fill" }),
7512
+ icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react29.InfoIcon, { className: `${iconBaseClass} text-blue-600`, weight: "fill" }),
7493
7513
  className: "sonner-InfoIcon"
7494
7514
  }),
7495
7515
  loading: (message) => (0, import_sonner2.toast)(message, {
7496
- icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react28.SpinnerIcon, { className: `${iconBaseClass} animate-spin text-neutral-500`, weight: "fill" }),
7516
+ icon: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(import_react29.SpinnerIcon, { className: `${iconBaseClass} animate-spin text-neutral-500`, weight: "fill" }),
7497
7517
  className: "sonner-loading"
7498
7518
  })
7499
7519
  };
@@ -7501,7 +7521,7 @@ var toast2 = {
7501
7521
  // src/components/ui/form/CheckBoxBase.tsx
7502
7522
  var React24 = __toESM(require("react"));
7503
7523
  var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
7504
- var import_react29 = require("@phosphor-icons/react");
7524
+ var import_react30 = require("@phosphor-icons/react");
7505
7525
  var import_framer_motion11 = require("framer-motion");
7506
7526
  var import_jsx_runtime44 = require("react/jsx-runtime");
7507
7527
  var CheckboxBase = React24.forwardRef(({ className, testid: dataTestId = "checkbox-base", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
@@ -7509,20 +7529,35 @@ var CheckboxBase = React24.forwardRef(({ className, testid: dataTestId = "checkb
7509
7529
  {
7510
7530
  ref,
7511
7531
  className: cn(
7512
- "peer h-4 w-4 shrink-0 rounded-md border border-primary shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground transition-colors",
7532
+ "peer h-4 w-4 shrink-0 rounded-md border border-primary shadow-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground data-[state=indeterminate]:bg-primary data-[state=indeterminate]:text-primary-foreground transition-colors",
7513
7533
  className
7514
7534
  ),
7515
7535
  "data-testid": dataTestId,
7516
7536
  ...props,
7517
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CheckboxPrimitive.Indicator, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7537
+ children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(CheckboxPrimitive.Indicator, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
7518
7538
  import_framer_motion11.motion.div,
7519
7539
  {
7520
7540
  initial: { scale: 0, opacity: 0, rotate: -90 },
7521
7541
  animate: { scale: 1, opacity: 1, rotate: 0 },
7522
7542
  exit: { scale: 0, opacity: 0, rotate: 90 },
7523
7543
  transition: { type: "spring", stiffness: 500, damping: 30 },
7524
- className: "flex items-center justify-center text-current",
7525
- children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react29.CheckIcon, { className: "h-4 w-4", weight: "bold" })
7544
+ className: "flex items-center justify-center text-current group",
7545
+ children: [
7546
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7547
+ import_react30.CheckIcon,
7548
+ {
7549
+ className: "h-4 w-4 hidden group-data-[state=checked]:block",
7550
+ weight: "bold"
7551
+ }
7552
+ ),
7553
+ /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
7554
+ import_react30.MinusIcon,
7555
+ {
7556
+ className: "h-4 w-4 hidden group-data-[state=indeterminate]:block",
7557
+ weight: "bold"
7558
+ }
7559
+ )
7560
+ ]
7526
7561
  }
7527
7562
  ) })
7528
7563
  }
@@ -7532,7 +7567,7 @@ CheckboxBase.displayName = CheckboxPrimitive.Root.displayName;
7532
7567
  // src/components/ui/form/CollapsibleBase.tsx
7533
7568
  var React25 = __toESM(require("react"));
7534
7569
  var CollapsiblePrimitive = __toESM(require("@radix-ui/react-collapsible"));
7535
- var import_react30 = require("@phosphor-icons/react");
7570
+ var import_react31 = require("@phosphor-icons/react");
7536
7571
  var import_jsx_runtime45 = require("react/jsx-runtime");
7537
7572
  var CollapsibleBase = React25.forwardRef(({ ...props }, ref) => {
7538
7573
  return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(CollapsiblePrimitive.Root, { ref, "data-slot": "collapsible", ...props });
@@ -7554,7 +7589,7 @@ var CollapsibleTriggerBase = React25.forwardRef(({ className, children, leftIcon
7554
7589
  leftIcon && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "flex-shrink-0 [&>svg]:size-4", children: leftIcon }),
7555
7590
  /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { children })
7556
7591
  ] }),
7557
- showCaret && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "caret-icon flex-shrink-0 transition-transform duration-500 ease-[cubic-bezier(0.4,0,0.2,1)]", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react30.CaretUpDownIcon, { className: "h-4 w-4" }) })
7592
+ showCaret && /* @__PURE__ */ (0, import_jsx_runtime45.jsx)("span", { className: "caret-icon flex-shrink-0 transition-transform duration-500 ease-[cubic-bezier(0.4,0,0.2,1)]", children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react31.CaretUpDownIcon, { className: "h-4 w-4" }) })
7558
7593
  ]
7559
7594
  }
7560
7595
  );
@@ -7635,7 +7670,7 @@ HoverCardContentBase.displayName = HoverCardPrimitive.Content.displayName;
7635
7670
  // src/components/ui/form/Input-OTP-Base.tsx
7636
7671
  var React27 = __toESM(require("react"));
7637
7672
  var import_input_otp = require("input-otp");
7638
- var import_react31 = require("@phosphor-icons/react");
7673
+ var import_react32 = require("@phosphor-icons/react");
7639
7674
  var import_jsx_runtime47 = require("react/jsx-runtime");
7640
7675
  function InputOTPBase({
7641
7676
  className,
@@ -7690,7 +7725,7 @@ function InputOTPSlotBase({
7690
7725
  );
7691
7726
  }
7692
7727
  function InputOTPSeparatorBase({ ...props }) {
7693
- return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react31.MinusIcon, {}) });
7728
+ return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)("div", { "data-slot": "input-otp-separator", role: "separator", ...props, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react32.MinusIcon, {}) });
7694
7729
  }
7695
7730
 
7696
7731
  // src/components/ui/form/SliderBase.tsx
@@ -7778,7 +7813,7 @@ SlideBase.displayName = "SlideBase";
7778
7813
 
7779
7814
  // src/components/ui/form/SmallButtons.tsx
7780
7815
  var React29 = __toESM(require("react"));
7781
- var import_react32 = require("@phosphor-icons/react");
7816
+ var import_react33 = require("@phosphor-icons/react");
7782
7817
  var import_jsx_runtime49 = require("react/jsx-runtime");
7783
7818
  var EditButton = React29.forwardRef(
7784
7819
  ({
@@ -7809,7 +7844,7 @@ var EditButton = React29.forwardRef(
7809
7844
  ),
7810
7845
  ...props,
7811
7846
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7812
- import_react32.PencilSimpleIcon,
7847
+ import_react33.PencilSimpleIcon,
7813
7848
  {
7814
7849
  size: iconSize,
7815
7850
  color: iconColor,
@@ -7849,7 +7884,7 @@ var ChangeButton = React29.forwardRef(
7849
7884
  ),
7850
7885
  ...props,
7851
7886
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7852
- import_react32.ArrowsLeftRightIcon,
7887
+ import_react33.ArrowsLeftRightIcon,
7853
7888
  {
7854
7889
  size: iconSize,
7855
7890
  color: iconColor,
@@ -7889,7 +7924,7 @@ var SaveButton = React29.forwardRef(
7889
7924
  ),
7890
7925
  ...props,
7891
7926
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7892
- import_react32.FloppyDiskIcon,
7927
+ import_react33.FloppyDiskIcon,
7893
7928
  {
7894
7929
  size: iconSize,
7895
7930
  color: iconColor,
@@ -7929,7 +7964,7 @@ var AddButton = React29.forwardRef(
7929
7964
  ),
7930
7965
  ...props,
7931
7966
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7932
- import_react32.PlusIcon,
7967
+ import_react33.PlusIcon,
7933
7968
  {
7934
7969
  size: iconSize,
7935
7970
  color: iconColor,
@@ -7969,7 +8004,7 @@ var CloseButton = React29.forwardRef(
7969
8004
  ),
7970
8005
  ...props,
7971
8006
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
7972
- import_react32.XIcon,
8007
+ import_react33.XIcon,
7973
8008
  {
7974
8009
  size: iconSize,
7975
8010
  color: iconColor,
@@ -8001,7 +8036,7 @@ var DownloadButton = ({
8001
8036
  ),
8002
8037
  ...props,
8003
8038
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8004
- import_react32.DownloadSimpleIcon,
8039
+ import_react33.DownloadSimpleIcon,
8005
8040
  {
8006
8041
  size: 18,
8007
8042
  className: "transition-transform duration-300 group-hover:translate-y-0.5"
@@ -8030,7 +8065,7 @@ var UploadButton = ({
8030
8065
  ),
8031
8066
  ...props,
8032
8067
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8033
- import_react32.UploadSimpleIcon,
8068
+ import_react33.UploadSimpleIcon,
8034
8069
  {
8035
8070
  size: 18,
8036
8071
  className: "transition-transform duration-300 group-hover:-translate-y-0.5"
@@ -8059,7 +8094,7 @@ var CopyButton = ({
8059
8094
  ),
8060
8095
  ...props,
8061
8096
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8062
- import_react32.CopyIcon,
8097
+ import_react33.CopyIcon,
8063
8098
  {
8064
8099
  size: 18,
8065
8100
  className: "transition-transform duration-200 group-hover:scale-110"
@@ -8088,7 +8123,7 @@ var RefreshButton = ({
8088
8123
  ),
8089
8124
  ...props,
8090
8125
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8091
- import_react32.ArrowClockwiseIcon,
8126
+ import_react33.ArrowClockwiseIcon,
8092
8127
  {
8093
8128
  size: 18,
8094
8129
  className: "transition-transform duration-500 group-hover:rotate-180"
@@ -8117,7 +8152,7 @@ var SearchButton = ({
8117
8152
  ),
8118
8153
  ...props,
8119
8154
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8120
- import_react32.MagnifyingGlassIcon,
8155
+ import_react33.MagnifyingGlassIcon,
8121
8156
  {
8122
8157
  size: 18,
8123
8158
  className: "transition-transform duration-200 group-hover:scale-110 group-hover:-rotate-12"
@@ -8146,7 +8181,7 @@ var BackButton = ({
8146
8181
  ),
8147
8182
  ...props,
8148
8183
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8149
- import_react32.ArrowLeftIcon,
8184
+ import_react33.ArrowLeftIcon,
8150
8185
  {
8151
8186
  size: 18,
8152
8187
  className: "transition-transform duration-300 group-hover:-translate-x-1"
@@ -8175,7 +8210,7 @@ var SettingsButton = ({
8175
8210
  ),
8176
8211
  ...props,
8177
8212
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8178
- import_react32.GearIcon,
8213
+ import_react33.GearIcon,
8179
8214
  {
8180
8215
  size: 18,
8181
8216
  className: "transition-transform duration-500 group-hover:rotate-90"
@@ -8204,7 +8239,7 @@ var NotificationButton = ({
8204
8239
  ),
8205
8240
  ...props,
8206
8241
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8207
- import_react32.BellIcon,
8242
+ import_react33.BellIcon,
8208
8243
  {
8209
8244
  size: 18,
8210
8245
  className: "transition-transform duration-300 group-hover:scale-110 group-hover:-rotate-12"
@@ -8233,7 +8268,7 @@ var MoreButton = ({
8233
8268
  ),
8234
8269
  ...props,
8235
8270
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8236
- import_react32.DotsThreeIcon,
8271
+ import_react33.DotsThreeIcon,
8237
8272
  {
8238
8273
  size: 18,
8239
8274
  className: "transition-transform duration-200 group-hover:scale-110"
@@ -8262,7 +8297,7 @@ var CheckButton = ({
8262
8297
  ),
8263
8298
  ...props,
8264
8299
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8265
- import_react32.CheckIcon,
8300
+ import_react33.CheckIcon,
8266
8301
  {
8267
8302
  size: 18,
8268
8303
  className: "transition-transform duration-200 group-hover:scale-110"
@@ -8298,7 +8333,7 @@ var FilterButton = ({
8298
8333
  ),
8299
8334
  ...props,
8300
8335
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8301
- import_react32.FunnelIcon,
8336
+ import_react33.FunnelIcon,
8302
8337
  {
8303
8338
  size: iconSize,
8304
8339
  color: iconColor,
@@ -8337,7 +8372,7 @@ var LikeButton = ({
8337
8372
  ),
8338
8373
  ...props,
8339
8374
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8340
- import_react32.HeartIcon,
8375
+ import_react33.HeartIcon,
8341
8376
  {
8342
8377
  size: iconSize,
8343
8378
  color: iconColor,
@@ -8376,7 +8411,7 @@ var FavoriteButton = ({
8376
8411
  ),
8377
8412
  ...props,
8378
8413
  children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8379
- import_react32.StarIcon,
8414
+ import_react33.StarIcon,
8380
8415
  {
8381
8416
  size: iconSize,
8382
8417
  color: iconColor,
@@ -8414,14 +8449,14 @@ var VisibilityButton = ({
8414
8449
  ),
8415
8450
  ...props,
8416
8451
  children: isVisible ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8417
- import_react32.EyeIcon,
8452
+ import_react33.EyeIcon,
8418
8453
  {
8419
8454
  size: iconSize,
8420
8455
  color: iconColor,
8421
8456
  className: "transition-opacity duration-200"
8422
8457
  }
8423
8458
  ) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8424
- import_react32.EyeSlashIcon,
8459
+ import_react33.EyeSlashIcon,
8425
8460
  {
8426
8461
  size: iconSize,
8427
8462
  color: iconColor,
@@ -8461,14 +8496,14 @@ var LockButton = ({
8461
8496
  ),
8462
8497
  ...props,
8463
8498
  children: isLocked ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8464
- import_react32.LockIcon,
8499
+ import_react33.LockIcon,
8465
8500
  {
8466
8501
  size: iconSize,
8467
8502
  color: iconColor,
8468
8503
  className: "transition-all duration-200 group-hover:scale-110"
8469
8504
  }
8470
8505
  ) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
8471
- import_react32.LockOpenIcon,
8506
+ import_react33.LockOpenIcon,
8472
8507
  {
8473
8508
  size: iconSize,
8474
8509
  color: iconColor,
@@ -8514,7 +8549,7 @@ SwitchBase.displayName = SwitchPrimitives.Root.displayName;
8514
8549
  // src/components/ui/form/TextAreaBase.tsx
8515
8550
  var React31 = __toESM(require("react"));
8516
8551
  var import_framer_motion12 = require("framer-motion");
8517
- var import_react33 = require("@phosphor-icons/react");
8552
+ var import_react34 = require("@phosphor-icons/react");
8518
8553
  var import_jsx_runtime51 = require("react/jsx-runtime");
8519
8554
  var TextAreaBase = React31.forwardRef(
8520
8555
  ({ className, clearable = false, onClear, ...props }, ref) => {
@@ -8611,7 +8646,7 @@ var TextAreaBase = React31.forwardRef(
8611
8646
  ),
8612
8647
  disabled: props.disabled,
8613
8648
  "aria-label": "Limpar texto",
8614
- children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react33.TrashIcon, { size: 16, weight: "regular" })
8649
+ children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react34.TrashIcon, { size: 16, weight: "regular" })
8615
8650
  }
8616
8651
  ) }),
8617
8652
  /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(
@@ -8689,7 +8724,7 @@ TextAreaBase.displayName = "TextAreaBase";
8689
8724
  // src/components/ui/layout/CarouselBase.tsx
8690
8725
  var React32 = __toESM(require("react"));
8691
8726
  var import_embla_carousel_react = __toESM(require("embla-carousel-react"));
8692
- var import_react34 = require("@phosphor-icons/react");
8727
+ var import_react35 = require("@phosphor-icons/react");
8693
8728
  var import_jsx_runtime52 = require("react/jsx-runtime");
8694
8729
  var CarouselContext = React32.createContext(null);
8695
8730
  function useCarousel() {
@@ -8850,7 +8885,7 @@ function CarouselPreviousBase({
8850
8885
  onClick: scrollPrev,
8851
8886
  ...props,
8852
8887
  children: [
8853
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react34.ArrowLeftIcon, {}),
8888
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react35.ArrowLeftIcon, {}),
8854
8889
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "sr-only", children: "Previous slide" })
8855
8890
  ]
8856
8891
  }
@@ -8880,7 +8915,7 @@ function CarouselNextBase({
8880
8915
  onClick: scrollNext,
8881
8916
  ...props,
8882
8917
  children: [
8883
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react34.ArrowRightIcon, {}),
8918
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react35.ArrowRightIcon, {}),
8884
8919
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "sr-only", children: "Next slide" })
8885
8920
  ]
8886
8921
  }
@@ -9063,7 +9098,7 @@ TabsContentBase.displayName = TabsPrimitive.Content.displayName;
9063
9098
 
9064
9099
  // src/components/ui/navigation/BreadcrumbBase.tsx
9065
9100
  var import_react_slot4 = require("@radix-ui/react-slot");
9066
- var import_react35 = require("@phosphor-icons/react");
9101
+ var import_react36 = require("@phosphor-icons/react");
9067
9102
  var import_jsx_runtime56 = require("react/jsx-runtime");
9068
9103
  function BreadcrumbBase({ ...props }) {
9069
9104
  return /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
@@ -9132,7 +9167,7 @@ function BreadcrumbSeparatorBase({
9132
9167
  "aria-hidden": "true",
9133
9168
  className: cn("[&>svg]:size-3.5", className),
9134
9169
  ...props,
9135
- children: children ?? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react35.CaretRightIcon, {})
9170
+ children: children ?? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react36.CaretRightIcon, {})
9136
9171
  }
9137
9172
  );
9138
9173
  }
@@ -9149,7 +9184,7 @@ function BreadcrumbEllipsisBase({
9149
9184
  className: cn("flex size-9 items-center justify-center", className),
9150
9185
  ...props,
9151
9186
  children: [
9152
- /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react35.DotsThreeIcon, { className: "size-4" }),
9187
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react36.DotsThreeIcon, { className: "size-4" }),
9153
9188
  /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "sr-only", children: "More" })
9154
9189
  ]
9155
9190
  }
@@ -9158,7 +9193,7 @@ function BreadcrumbEllipsisBase({
9158
9193
 
9159
9194
  // src/components/ui/navigation/NavigationMenuBase.tsx
9160
9195
  var NavigationMenuPrimitive = __toESM(require("@radix-ui/react-navigation-menu"));
9161
- var import_react36 = require("@phosphor-icons/react");
9196
+ var import_react37 = require("@phosphor-icons/react");
9162
9197
  var import_jsx_runtime57 = require("react/jsx-runtime");
9163
9198
  function NavigationMenuBase({
9164
9199
  className,
@@ -9226,7 +9261,7 @@ function NavigationMenuTriggerBase({
9226
9261
  children: [
9227
9262
  children,
9228
9263
  /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
9229
- import_react36.CaretDownIcon,
9264
+ import_react37.CaretDownIcon,
9230
9265
  {
9231
9266
  className: "relative top-[1px] ml-1 size-3 transition duration-300 group-data-[state=open]:rotate-180",
9232
9267
  "aria-hidden": "true"
@@ -9329,7 +9364,7 @@ function useIsMobile() {
9329
9364
  var React37 = __toESM(require("react"));
9330
9365
  var SheetPrimitive = __toESM(require("@radix-ui/react-dialog"));
9331
9366
  var import_class_variance_authority4 = require("class-variance-authority");
9332
- var import_react37 = require("@phosphor-icons/react");
9367
+ var import_react38 = require("@phosphor-icons/react");
9333
9368
  var import_jsx_runtime58 = require("react/jsx-runtime");
9334
9369
  var SheetBase = SheetPrimitive.Root;
9335
9370
  var SheetTriggerBase = SheetPrimitive.Trigger;
@@ -9373,7 +9408,7 @@ var SheetContentBase = React37.forwardRef(({ side = "right", className, children
9373
9408
  ...props,
9374
9409
  children: [
9375
9410
  /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(SheetPrimitive.Close, { className: "absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary", children: [
9376
- /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react37.XIcon, { className: "h-4 w-4" }),
9411
+ /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_react38.XIcon, { className: "h-4 w-4" }),
9377
9412
  /* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "sr-only", children: "Close" })
9378
9413
  ] }),
9379
9414
  children
@@ -9430,7 +9465,7 @@ var SheetDescriptionBase = React37.forwardRef(({ className, ...props }, ref) =>
9430
9465
  SheetDescriptionBase.displayName = SheetPrimitive.Description.displayName;
9431
9466
 
9432
9467
  // src/components/ui/navigation/SidebarBase.tsx
9433
- var import_react38 = require("@phosphor-icons/react");
9468
+ var import_react39 = require("@phosphor-icons/react");
9434
9469
  var import_jsx_runtime59 = require("react/jsx-runtime");
9435
9470
  var SIDEBAR_COOKIE_NAME = "sidebar:state";
9436
9471
  var SIDEBAR_COOKIE_MAX_AGE = 60 * 60 * 24 * 7;
@@ -9624,7 +9659,7 @@ var SidebarTriggerBase = React38.forwardRef(({ className, onClick, ...props }, r
9624
9659
  ...props,
9625
9660
  children: [
9626
9661
  /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: "sr-only", children: "Toggle SidebarBase" }),
9627
- /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react38.SidebarSimpleIcon, {})
9662
+ /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react39.SidebarSimpleIcon, {})
9628
9663
  ]
9629
9664
  }
9630
9665
  ) });
@@ -10118,11 +10153,11 @@ function DrawerDescriptionBase({
10118
10153
  }
10119
10154
 
10120
10155
  // src/hooks/use-universal-tooltip.tsx
10121
- var import_react39 = require("react");
10156
+ var import_react40 = require("react");
10122
10157
  var import_jsx_runtime61 = require("react/jsx-runtime");
10123
- var UniversalTooltipContext = (0, import_react39.createContext)(null);
10158
+ var UniversalTooltipContext = (0, import_react40.createContext)(null);
10124
10159
  var useUniversalTooltip = () => {
10125
- const context = (0, import_react39.useContext)(UniversalTooltipContext);
10160
+ const context = (0, import_react40.useContext)(UniversalTooltipContext);
10126
10161
  if (!context) {
10127
10162
  throw new Error("useUniversalTooltip deve ser usado dentro de UniversalTooltipProvider");
10128
10163
  }
@@ -10130,7 +10165,7 @@ var useUniversalTooltip = () => {
10130
10165
  };
10131
10166
  var useTooltip = () => {
10132
10167
  const { addTooltip, removeTooltip, startDrag } = useUniversalTooltip();
10133
- const createTooltip = (0, import_react39.useCallback)((element, content, options) => {
10168
+ const createTooltip = (0, import_react40.useCallback)((element, content, options) => {
10134
10169
  const rect = element.getBoundingClientRect();
10135
10170
  let position;
10136
10171
  switch (options?.position || "auto") {
@@ -10160,7 +10195,7 @@ var useTooltip = () => {
10160
10195
  metadata: options?.metadata
10161
10196
  });
10162
10197
  }, [addTooltip]);
10163
- const handleElementMouseDown = (0, import_react39.useCallback)((tooltipId, event) => {
10198
+ const handleElementMouseDown = (0, import_react40.useCallback)((tooltipId, event) => {
10164
10199
  const rect = event.target.getBoundingClientRect();
10165
10200
  const offset = {
10166
10201
  x: event.clientX - rect.left,
@@ -10319,7 +10354,7 @@ var import_date_fns = require("date-fns");
10319
10354
  // src/components/picker/calendar.tsx
10320
10355
  var React40 = __toESM(require("react"));
10321
10356
  var import_react_day_picker2 = require("react-day-picker");
10322
- var import_react40 = require("@phosphor-icons/react");
10357
+ var import_react41 = require("@phosphor-icons/react");
10323
10358
  var import_framer_motion14 = require("framer-motion");
10324
10359
  var import_jsx_runtime63 = require("react/jsx-runtime");
10325
10360
  function CalendarBase2({
@@ -10393,8 +10428,8 @@ function CalendarBase2({
10393
10428
  ...classNames
10394
10429
  },
10395
10430
  components: {
10396
- IconLeft: () => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react40.CaretLeftIcon, { className: "h-4 w-4" }),
10397
- IconRight: () => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react40.CaretRightIcon, { className: "h-4 w-4" })
10431
+ IconLeft: () => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react41.CaretLeftIcon, { className: "h-4 w-4" }),
10432
+ IconRight: () => /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(import_react41.CaretRightIcon, { className: "h-4 w-4" })
10398
10433
  },
10399
10434
  ...props
10400
10435
  }
@@ -10409,15 +10444,15 @@ CalendarBase2.displayName = "CalendarBase";
10409
10444
 
10410
10445
  // src/components/picker/DateTimePicker.tsx
10411
10446
  var import_locale = require("date-fns/locale");
10412
- var import_react43 = require("react");
10447
+ var import_react44 = require("react");
10413
10448
 
10414
10449
  // src/components/picker/TimePicker.tsx
10415
10450
  var import_framer_motion15 = require("framer-motion");
10416
10451
  var React42 = __toESM(require("react"));
10417
10452
 
10418
10453
  // src/components/picker/TimePickerInput.tsx
10419
- var import_react41 = require("@phosphor-icons/react");
10420
- var import_react42 = __toESM(require("react"));
10454
+ var import_react42 = require("@phosphor-icons/react");
10455
+ var import_react43 = __toESM(require("react"));
10421
10456
 
10422
10457
  // src/components/picker/utils/time-picker-utils.ts
10423
10458
  function isValidHour(value) {
@@ -10560,7 +10595,7 @@ function display12HourValue(hours) {
10560
10595
 
10561
10596
  // src/components/picker/TimePickerInput.tsx
10562
10597
  var import_jsx_runtime64 = require("react/jsx-runtime");
10563
- var TimePickerInput = import_react42.default.forwardRef(
10598
+ var TimePickerInput = import_react43.default.forwardRef(
10564
10599
  ({
10565
10600
  className,
10566
10601
  type = "tel",
@@ -10579,10 +10614,10 @@ var TimePickerInput = import_react42.default.forwardRef(
10579
10614
  label,
10580
10615
  ...props
10581
10616
  }, ref) => {
10582
- const [flag, setFlag] = import_react42.default.useState(false);
10583
- const [prevIntKey, setPrevIntKey] = import_react42.default.useState("0");
10584
- const [isFocused, setIsFocused] = import_react42.default.useState(false);
10585
- import_react42.default.useEffect(() => {
10617
+ const [flag, setFlag] = import_react43.default.useState(false);
10618
+ const [prevIntKey, setPrevIntKey] = import_react43.default.useState("0");
10619
+ const [isFocused, setIsFocused] = import_react43.default.useState(false);
10620
+ import_react43.default.useEffect(() => {
10586
10621
  if (flag) {
10587
10622
  const timer = setTimeout(() => {
10588
10623
  setFlag(false);
@@ -10590,7 +10625,7 @@ var TimePickerInput = import_react42.default.forwardRef(
10590
10625
  return () => clearTimeout(timer);
10591
10626
  }
10592
10627
  }, [flag]);
10593
- const calculatedValue = import_react42.default.useMemo(() => {
10628
+ const calculatedValue = import_react43.default.useMemo(() => {
10594
10629
  return getDateByType(date, picker);
10595
10630
  }, [date, picker]);
10596
10631
  const calculateNewValue = (key) => {
@@ -10679,7 +10714,7 @@ var TimePickerInput = import_react42.default.forwardRef(
10679
10714
  ),
10680
10715
  tabIndex: -1,
10681
10716
  "aria-label": `Incrementar ${getPickerLabel().toLowerCase()}`,
10682
- children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react41.CaretUpIcon, { size: 14, className: "sm:w-4 sm:h-4" })
10717
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react42.CaretUpIcon, { size: 14, className: "sm:w-4 sm:h-4" })
10683
10718
  }
10684
10719
  ),
10685
10720
  /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)("div", { className: "relative", children: [
@@ -10746,7 +10781,7 @@ var TimePickerInput = import_react42.default.forwardRef(
10746
10781
  ),
10747
10782
  tabIndex: -1,
10748
10783
  "aria-label": `Decrementar ${getPickerLabel().toLowerCase()}`,
10749
- children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react41.CaretDownIcon, { size: 14, className: "sm:w-4 sm:h-4" })
10784
+ children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react42.CaretDownIcon, { size: 14, className: "sm:w-4 sm:h-4" })
10750
10785
  }
10751
10786
  )
10752
10787
  ]
@@ -10855,7 +10890,7 @@ function TimePicker({
10855
10890
  }
10856
10891
 
10857
10892
  // src/components/picker/DateTimePicker.tsx
10858
- var import_react44 = require("@phosphor-icons/react");
10893
+ var import_react45 = require("@phosphor-icons/react");
10859
10894
  var import_jsx_runtime66 = require("react/jsx-runtime");
10860
10895
  function DateTimePicker({
10861
10896
  label,
@@ -10870,9 +10905,9 @@ function DateTimePicker({
10870
10905
  className,
10871
10906
  error
10872
10907
  }) {
10873
- const [internalDate, setInternalDate] = (0, import_react43.useState)(date);
10874
- const [open, setOpen] = (0, import_react43.useState)(false);
10875
- const [timePickerOpen, setTimePickerOpen] = (0, import_react43.useState)(false);
10908
+ const [internalDate, setInternalDate] = (0, import_react44.useState)(date);
10909
+ const [open, setOpen] = (0, import_react44.useState)(false);
10910
+ const [timePickerOpen, setTimePickerOpen] = (0, import_react44.useState)(false);
10876
10911
  const handleSelect = (newDay) => {
10877
10912
  if (!newDay) return;
10878
10913
  if (!internalDate) {
@@ -10903,10 +10938,10 @@ function DateTimePicker({
10903
10938
  if (!timeFormat) return "dd MMMM yyyy";
10904
10939
  return `dd MMMM yyyy - ${timeFormat}`;
10905
10940
  };
10906
- (0, import_react43.useEffect)(() => {
10941
+ (0, import_react44.useEffect)(() => {
10907
10942
  setInternalDate(date);
10908
10943
  }, [date, open]);
10909
- return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: cn("space-y-2 w-full sm:w-auto", className), children: [
10944
+ return /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)("div", { className: cn("w-full sm:w-auto", className), children: [
10910
10945
  label && /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(LabelBase_default, { children: label }),
10911
10946
  /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(PopoverBase, { open, onOpenChange: setOpen, children: [
10912
10947
  /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(
@@ -10934,7 +10969,7 @@ function DateTimePicker({
10934
10969
  children: date ? (0, import_date_fns.format)(date, getDisplayFormat(), { locale: import_locale.ptBR }) : "Selecione uma data"
10935
10970
  }
10936
10971
  ),
10937
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react44.CalendarBlankIcon, { className: "flex-shrink-0 w-5 h-5 sm:w-6 sm:h-6" })
10972
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react45.CalendarBlankIcon, { className: "flex-shrink-0 w-5 h-5 sm:w-6 sm:h-6" })
10938
10973
  ]
10939
10974
  }
10940
10975
  )
@@ -10984,7 +11019,7 @@ function DateTimePicker({
10984
11019
  "shadow-sm hover:shadow-md active:scale-[0.98]"
10985
11020
  ),
10986
11021
  children: [
10987
- /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react44.ClockIcon, { className: "text-primary flex-shrink-0 w-4 h-4 sm:w-5 sm:h-5" }),
11022
+ /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_react45.ClockIcon, { className: "text-primary flex-shrink-0 w-4 h-4 sm:w-5 sm:h-5" }),
10988
11023
  /* @__PURE__ */ (0, import_jsx_runtime66.jsx)("span", { className: "text-black truncate", children: internalDate ? (0, import_date_fns.format)(internalDate, getTimeFormat() || "HH:mm", {
10989
11024
  locale: import_locale.ptBR
10990
11025
  }) : "00:00" })
@@ -11038,7 +11073,7 @@ var React43 = __toESM(require("react"));
11038
11073
  var import_react_day_picker3 = require("react-day-picker");
11039
11074
  var import_pt_BR = __toESM(require("date-fns/locale/pt-BR"));
11040
11075
  var import_date_fns2 = require("date-fns");
11041
- var import_react45 = require("@phosphor-icons/react");
11076
+ var import_react46 = require("@phosphor-icons/react");
11042
11077
  var import_framer_motion16 = require("framer-motion");
11043
11078
  var import_ssr7 = require("@phosphor-icons/react/dist/ssr");
11044
11079
  var import_jsx_runtime67 = require("react/jsx-runtime");
@@ -11066,7 +11101,7 @@ function RangePicker({
11066
11101
  onChange?.(void 0);
11067
11102
  };
11068
11103
  return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(PopoverBase, { open, onOpenChange: setOpen, children: [
11069
- /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(PopoverTriggerBase, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
11104
+ /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(PopoverTriggerBase, { asChild: true, className: cn(error && "border-red-500"), children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
11070
11105
  import_framer_motion16.motion.div,
11071
11106
  {
11072
11107
  whileTap: { scale: 0.97 },
@@ -11076,12 +11111,18 @@ function RangePicker({
11076
11111
  ButtonBase,
11077
11112
  {
11078
11113
  variant: "outline",
11079
- className: "flex gap-2 transition-all duration-200 min-w-[250px] text-left justify-between items-center",
11114
+ className: cn(
11115
+ "w-full justify-start text-left min-w-0 overflow-hidden",
11116
+ !range && "text-muted-foreground"
11117
+ ),
11080
11118
  children: [
11081
11119
  /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
11082
11120
  import_framer_motion16.motion.span,
11083
11121
  {
11084
- className: "text-sm font-medium",
11122
+ className: cn(
11123
+ "truncate flex-1",
11124
+ !range && "text-muted-foreground"
11125
+ ),
11085
11126
  transition: { duration: 0.2 },
11086
11127
  animate: controls,
11087
11128
  children: range?.from && range?.to ? `${(0, import_date_fns2.format)(range.from, "P", {
@@ -11094,7 +11135,7 @@ function RangePicker({
11094
11135
  {
11095
11136
  animate: open ? { rotate: 8, scale: 1.15 } : { rotate: 0, scale: 1 },
11096
11137
  transition: { type: "spring", stiffness: 300, damping: 18 },
11097
- children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react45.CalendarBlankIcon, { className: "w-4 h-4 transition-transform group-hover:scale-110" })
11138
+ children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react46.CalendarBlankIcon, { className: "flex-shrink-0 w-5 h-5 sm:w-6 sm:h-6" })
11098
11139
  }
11099
11140
  )
11100
11141
  ]
@@ -11171,8 +11212,8 @@ function RangePicker({
11171
11212
  day_hidden: "invisible"
11172
11213
  },
11173
11214
  components: {
11174
- IconLeft: () => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react45.CaretLeftIcon, { className: "h-4 w-4" }),
11175
- IconRight: () => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react45.CaretRightIcon, { className: "h-4 w-4" })
11215
+ IconLeft: () => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react46.CaretLeftIcon, { className: "h-4 w-4" }),
11216
+ IconRight: () => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react46.CaretRightIcon, { className: "h-4 w-4" })
11176
11217
  }
11177
11218
  }
11178
11219
  )
@@ -11244,7 +11285,7 @@ RangePicker.displayName = "RangePicker";
11244
11285
 
11245
11286
  // src/components/ui/navigation/ContextMenuBase.tsx
11246
11287
  var ContextMenuPrimitive = __toESM(require("@radix-ui/react-context-menu"));
11247
- var import_react46 = require("@phosphor-icons/react");
11288
+ var import_react47 = require("@phosphor-icons/react");
11248
11289
  var import_jsx_runtime68 = require("react/jsx-runtime");
11249
11290
  function ContextMenuBase(props) {
11250
11291
  return /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
@@ -11286,7 +11327,7 @@ function ContextMenuSubTriggerBase({
11286
11327
  ...props,
11287
11328
  children: [
11288
11329
  children,
11289
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react46.CaretRightIcon, { className: "ml-auto" })
11330
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react47.CaretRightIcon, { className: "ml-auto" })
11290
11331
  ]
11291
11332
  }
11292
11333
  );
@@ -11381,7 +11422,7 @@ function ContextMenuCheckboxItemBase({
11381
11422
  checked,
11382
11423
  ...props,
11383
11424
  children: [
11384
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react46.CheckIcon, { className: "size-4" }) }) }),
11425
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react47.CheckIcon, { className: "size-4" }) }) }),
11385
11426
  children
11386
11427
  ]
11387
11428
  }
@@ -11406,7 +11447,7 @@ function ContextMenuRadioItemBase({
11406
11447
  ),
11407
11448
  ...props,
11408
11449
  children: [
11409
- /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react46.CircleIcon, { className: "size-2 fill-current" }) }) }),
11450
+ /* @__PURE__ */ (0, import_jsx_runtime68.jsx)("span", { className: "pointer-events-none absolute left-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(ContextMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(import_react47.CircleIcon, { className: "size-2 fill-current" }) }) }),
11410
11451
  children
11411
11452
  ]
11412
11453
  }
@@ -11455,8 +11496,8 @@ function ContextMenuShortcutBase({
11455
11496
  }
11456
11497
 
11457
11498
  // src/components/ui/CodeBlock.tsx
11458
- var import_react47 = require("@phosphor-icons/react");
11459
- var import_react48 = __toESM(require("react"));
11499
+ var import_react48 = require("@phosphor-icons/react");
11500
+ var import_react49 = __toESM(require("react"));
11460
11501
  var import_react_syntax_highlighter = require("react-syntax-highlighter");
11461
11502
  var import_jsx_runtime69 = require("react/jsx-runtime");
11462
11503
  var CodeBlock = ({
@@ -11468,11 +11509,11 @@ var CodeBlock = ({
11468
11509
  breadcrumb = [],
11469
11510
  showStats = true
11470
11511
  }) => {
11471
- const [copied, setCopied] = import_react48.default.useState(false);
11472
- const [activeTab, setActiveTab] = import_react48.default.useState(0);
11473
- const [isExpanded, setIsExpanded] = import_react48.default.useState(false);
11512
+ const [copied, setCopied] = import_react49.default.useState(false);
11513
+ const [activeTab, setActiveTab] = import_react49.default.useState(0);
11514
+ const [isExpanded, setIsExpanded] = import_react49.default.useState(false);
11474
11515
  const tabsExist = tabs.length > 0;
11475
- const cssVars = import_react48.default.useMemo(
11516
+ const cssVars = import_react49.default.useMemo(
11476
11517
  () => ({
11477
11518
  container: {
11478
11519
  backgroundColor: "hsl(var(--card))",
@@ -11537,12 +11578,12 @@ var CodeBlock = ({
11537
11578
  case "jsx":
11538
11579
  case "typescript":
11539
11580
  case "tsx":
11540
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react47.CodeIcon, { size: "1em", className: "text-yellow-400" });
11581
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react48.CodeIcon, { size: "1em", className: "text-yellow-400" });
11541
11582
  case "bash":
11542
11583
  case "shell":
11543
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react47.TerminalIcon, { size: "1em", className: "text-green-400" });
11584
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react48.TerminalIcon, { size: "1em", className: "text-green-400" });
11544
11585
  default:
11545
- return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react47.FileArchiveIcon, { size: "1em", className: "text-blue-400" });
11586
+ return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react48.FileArchiveIcon, { size: "1em", className: "text-blue-400" });
11546
11587
  }
11547
11588
  };
11548
11589
  const getCodeStats = (source) => {
@@ -11567,8 +11608,8 @@ var CodeBlock = ({
11567
11608
  /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "w-3 h-3 rounded-full bg-green-500" })
11568
11609
  ] }),
11569
11610
  breadcrumb.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center min-w-0", children: [
11570
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react47.FolderIcon, { size: "1em", style: cssVars.icon }),
11571
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex items-center min-w-0 ml-2", children: breadcrumb.map((crumb, index) => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_react48.default.Fragment, { children: [
11611
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react48.FolderIcon, { size: "1em", style: cssVars.icon }),
11612
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "flex items-center min-w-0 ml-2", children: breadcrumb.map((crumb, index) => /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)(import_react49.default.Fragment, { children: [
11572
11613
  /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
11573
11614
  "span",
11574
11615
  {
@@ -11578,7 +11619,7 @@ var CodeBlock = ({
11578
11619
  }
11579
11620
  ),
11580
11621
  index < breadcrumb.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
11581
- import_react47.ArrowRightIcon,
11622
+ import_react48.ArrowRightIcon,
11582
11623
  {
11583
11624
  size: "0.75em",
11584
11625
  style: cssVars.icon,
@@ -11609,7 +11650,7 @@ var CodeBlock = ({
11609
11650
  onClick: () => setIsExpanded(!isExpanded),
11610
11651
  className: `p-2 transition-colors hover:bg-gray-200 dark:hover:bg-slate-700`,
11611
11652
  title: "Toggle fullscreen",
11612
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react47.ArrowsOutIcon, { size: "1em", style: cssVars.icon })
11653
+ children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react48.ArrowsOutIcon, { size: "1em", style: cssVars.icon })
11613
11654
  }
11614
11655
  ),
11615
11656
  /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
@@ -11618,7 +11659,7 @@ var CodeBlock = ({
11618
11659
  onClick: downloadCode,
11619
11660
  className: `p-2 transition-colors hover:bg-gray-200 dark:hover:bg-slate-700`,
11620
11661
  title: "Download code",
11621
- children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react47.DownloadIcon, { size: "1em", style: cssVars.icon })
11662
+ children: /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react48.DownloadIcon, { size: "1em", style: cssVars.icon })
11622
11663
  }
11623
11664
  ),
11624
11665
  /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
@@ -11628,12 +11669,12 @@ var CodeBlock = ({
11628
11669
  className: `p-2 transition-colors hover:bg-gray-200 dark:hover:bg-slate-700`,
11629
11670
  title: "Copy code",
11630
11671
  children: copied ? /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(
11631
- import_react47.CheckIcon,
11672
+ import_react48.CheckIcon,
11632
11673
  {
11633
11674
  size: "1em",
11634
11675
  style: { color: "hsl(var(--primary))" }
11635
11676
  }
11636
- ) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react47.CopyIcon, { size: "1em", style: cssVars.icon })
11677
+ ) : /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react48.CopyIcon, { size: "1em", style: cssVars.icon })
11637
11678
  }
11638
11679
  )
11639
11680
  ] })
@@ -11746,7 +11787,7 @@ var CodeBlock = ({
11746
11787
  ] })
11747
11788
  ] }),
11748
11789
  /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: "flex items-center gap-1 shrink-0", children: [
11749
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react47.GearIcon, { size: "0.75em", style: cssVars.icon }),
11790
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(import_react48.GearIcon, { size: "0.75em", style: cssVars.icon }),
11750
11791
  /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("span", { children: "UTF-8" })
11751
11792
  ] })
11752
11793
  ]
@@ -11825,22 +11866,74 @@ function StatusIndicator({
11825
11866
  }
11826
11867
 
11827
11868
  // src/components/ui/form/DebouncedInput.tsx
11828
- var import_react49 = require("react");
11829
- var import_react50 = require("@phosphor-icons/react");
11869
+ var import_react50 = require("react");
11870
+ var import_react51 = require("@phosphor-icons/react");
11830
11871
  var import_jsx_runtime71 = require("react/jsx-runtime");
11872
+ function DebouncedInput({
11873
+ value: initialValue,
11874
+ onChange,
11875
+ debounce = 500,
11876
+ label,
11877
+ labelClassname,
11878
+ leftIcon,
11879
+ rightIcon,
11880
+ showLoadingIndicator = false,
11881
+ className,
11882
+ error,
11883
+ ...props
11884
+ }) {
11885
+ const [value, setValue] = (0, import_react50.useState)(initialValue);
11886
+ const [isDebouncing, setIsDebouncing] = (0, import_react50.useState)(false);
11887
+ (0, import_react50.useEffect)(() => {
11888
+ setValue(initialValue);
11889
+ }, [initialValue]);
11890
+ (0, import_react50.useEffect)(() => {
11891
+ if (value !== initialValue) {
11892
+ setIsDebouncing(true);
11893
+ }
11894
+ const timeout = setTimeout(() => {
11895
+ onChange(value);
11896
+ setIsDebouncing(false);
11897
+ }, debounce);
11898
+ return () => {
11899
+ clearTimeout(timeout);
11900
+ setIsDebouncing(false);
11901
+ };
11902
+ }, [debounce, initialValue, onChange, value]);
11903
+ const renderRightIcon = () => {
11904
+ if (showLoadingIndicator && isDebouncing) {
11905
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(import_react51.CircleNotchIcon, { className: "h-4 w-4 animate-spin text-muted-foreground" });
11906
+ }
11907
+ return rightIcon;
11908
+ };
11909
+ return /* @__PURE__ */ (0, import_jsx_runtime71.jsx)(
11910
+ InputBase,
11911
+ {
11912
+ ...props,
11913
+ label,
11914
+ labelClassname,
11915
+ leftIcon,
11916
+ rightIcon: renderRightIcon(),
11917
+ className: cn("transition-all duration-200", className),
11918
+ value,
11919
+ onChange: (e) => setValue(e.target.value),
11920
+ error
11921
+ }
11922
+ );
11923
+ }
11831
11924
 
11832
11925
  // src/components/event-calendar/AgendaView.tsx
11833
11926
  var import_date_fns3 = require("date-fns");
11834
11927
  var import_locale2 = require("date-fns/locale");
11835
- var import_react51 = require("react");
11836
- var import_react52 = require("@phosphor-icons/react");
11928
+ var import_react52 = require("react");
11929
+ var import_react53 = require("@phosphor-icons/react");
11837
11930
  var import_jsx_runtime72 = require("react/jsx-runtime");
11838
11931
  function AgendaView({
11839
11932
  currentDate,
11840
11933
  events,
11841
11934
  onEventSelect
11842
11935
  }) {
11843
- const days = (0, import_react51.useMemo)(() => {
11936
+ const days = (0, import_react52.useMemo)(() => {
11844
11937
  console.log("Agenda view updating with date:", currentDate.toISOString());
11845
11938
  return Array.from(
11846
11939
  { length: AgendaDaysToShow },
@@ -11856,9 +11949,9 @@ function AgendaView({
11856
11949
  (day) => getAgendaEventsForDay(events, day).length > 0
11857
11950
  );
11858
11951
  return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("div", { className: "border-border/70 border-t px-4", children: !hasEvents ? /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)("div", { className: "flex min-h-[70svh] flex-col items-center justify-center py-16 text-center", children: [
11859
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react52.CalendarIcon, { className: "mb-2 text-muted-foreground/50", size: 32 }),
11860
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("h3", { className: "font-medium text-lg", children: "No events found" }),
11861
- /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("p", { className: "text-muted-foreground", children: "There are no events scheduled for this time period." })
11952
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(import_react53.CalendarIcon, { className: "mb-2 text-muted-foreground/50", size: 32 }),
11953
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("h3", { className: "font-medium text-lg", children: "Nenhum evento encontrado" }),
11954
+ /* @__PURE__ */ (0, import_jsx_runtime72.jsx)("p", { className: "text-muted-foreground", children: "N\xE3o h\xE1 eventos agendados para este per\xEDodo." })
11862
11955
  ] }) : days.map((day) => {
11863
11956
  const dayEvents = getAgendaEventsForDay(events, day);
11864
11957
  if (dayEvents.length === 0) return null;
@@ -11897,11 +11990,11 @@ function AgendaView({
11897
11990
  // src/components/event-calendar/CalendarDND.tsx
11898
11991
  var import_core = require("@dnd-kit/core");
11899
11992
  var import_date_fns4 = require("date-fns");
11900
- var import_react54 = require("react");
11993
+ var import_react55 = require("react");
11901
11994
 
11902
11995
  // src/components/event-calendar/hooks.ts
11903
- var import_react53 = require("react");
11904
- var CalendarDndContext = (0, import_react53.createContext)({
11996
+ var import_react54 = require("react");
11997
+ var CalendarDndContext = (0, import_react54.createContext)({
11905
11998
  activeEvent: null,
11906
11999
  activeId: null,
11907
12000
  activeView: null,
@@ -11911,7 +12004,7 @@ var CalendarDndContext = (0, import_react53.createContext)({
11911
12004
  isMultiDay: false,
11912
12005
  multiDayWidth: null
11913
12006
  });
11914
- var useCalendarDnd = () => (0, import_react53.useContext)(CalendarDndContext);
12007
+ var useCalendarDnd = () => (0, import_react54.useContext)(CalendarDndContext);
11915
12008
 
11916
12009
  // src/components/event-calendar/CalendarDND.tsx
11917
12010
  var import_jsx_runtime73 = require("react/jsx-runtime");
@@ -11919,17 +12012,17 @@ function CalendarDndProvider({
11919
12012
  children,
11920
12013
  onEventUpdate
11921
12014
  }) {
11922
- const [activeEvent, setActiveEvent] = (0, import_react54.useState)(null);
11923
- const [activeId, setActiveId] = (0, import_react54.useState)(null);
11924
- const [activeView, setActiveView] = (0, import_react54.useState)(
12015
+ const [activeEvent, setActiveEvent] = (0, import_react55.useState)(null);
12016
+ const [activeId, setActiveId] = (0, import_react55.useState)(null);
12017
+ const [activeView, setActiveView] = (0, import_react55.useState)(
11925
12018
  null
11926
12019
  );
11927
- const [currentTime, setCurrentTime] = (0, import_react54.useState)(null);
11928
- const [eventHeight, setEventHeight] = (0, import_react54.useState)(null);
11929
- const [isMultiDay, setIsMultiDay] = (0, import_react54.useState)(false);
11930
- const [multiDayWidth, setMultiDayWidth] = (0, import_react54.useState)(null);
11931
- const [dragHandlePosition, setDragHandlePosition] = (0, import_react54.useState)(null);
11932
- const eventDimensions = (0, import_react54.useRef)({ height: 0 });
12020
+ const [currentTime, setCurrentTime] = (0, import_react55.useState)(null);
12021
+ const [eventHeight, setEventHeight] = (0, import_react55.useState)(null);
12022
+ const [isMultiDay, setIsMultiDay] = (0, import_react55.useState)(false);
12023
+ const [multiDayWidth, setMultiDayWidth] = (0, import_react55.useState)(null);
12024
+ const [dragHandlePosition, setDragHandlePosition] = (0, import_react55.useState)(null);
12025
+ const eventDimensions = (0, import_react55.useRef)({ height: 0 });
11933
12026
  const sensors = (0, import_core.useSensors)(
11934
12027
  (0, import_core.useSensor)(import_core.MouseSensor, {
11935
12028
  // Require the mouse to move by 5px before activating
@@ -11951,7 +12044,7 @@ function CalendarDndProvider({
11951
12044
  }
11952
12045
  })
11953
12046
  );
11954
- const dndContextId = (0, import_react54.useId)();
12047
+ const dndContextId = (0, import_react55.useId)();
11955
12048
  const handleDragStart = (event) => {
11956
12049
  const { active } = event;
11957
12050
  if (!active.data.current) {
@@ -12143,7 +12236,7 @@ var DefaultEndHour = 10;
12143
12236
 
12144
12237
  // src/components/event-calendar/DayView.tsx
12145
12238
  var import_date_fns5 = require("date-fns");
12146
- var import_react55 = require("react");
12239
+ var import_react56 = require("react");
12147
12240
  var import_jsx_runtime74 = require("react/jsx-runtime");
12148
12241
  function DayView({
12149
12242
  currentDate,
@@ -12151,14 +12244,14 @@ function DayView({
12151
12244
  onEventSelect,
12152
12245
  onEventCreate
12153
12246
  }) {
12154
- const hours = (0, import_react55.useMemo)(() => {
12247
+ const hours = (0, import_react56.useMemo)(() => {
12155
12248
  const dayStart = (0, import_date_fns5.startOfDay)(currentDate);
12156
12249
  return (0, import_date_fns5.eachHourOfInterval)({
12157
12250
  end: (0, import_date_fns5.addHours)(dayStart, EndHour - 1),
12158
12251
  start: (0, import_date_fns5.addHours)(dayStart, StartHour)
12159
12252
  });
12160
12253
  }, [currentDate]);
12161
- const dayEvents = (0, import_react55.useMemo)(() => {
12254
+ const dayEvents = (0, import_react56.useMemo)(() => {
12162
12255
  return events.filter((event) => {
12163
12256
  const eventStart = new Date(event.start);
12164
12257
  const eventEnd = new Date(event.end);
@@ -12167,17 +12260,17 @@ function DayView({
12167
12260
  (a, b) => new Date(a.start).getTime() - new Date(b.start).getTime()
12168
12261
  );
12169
12262
  }, [currentDate, events]);
12170
- const allDayEvents = (0, import_react55.useMemo)(() => {
12263
+ const allDayEvents = (0, import_react56.useMemo)(() => {
12171
12264
  return dayEvents.filter((event) => {
12172
12265
  return event.allDay || isMultiDayEvent(event);
12173
12266
  });
12174
12267
  }, [dayEvents]);
12175
- const timeEvents = (0, import_react55.useMemo)(() => {
12268
+ const timeEvents = (0, import_react56.useMemo)(() => {
12176
12269
  return dayEvents.filter((event) => {
12177
12270
  return !event.allDay && !isMultiDayEvent(event);
12178
12271
  });
12179
12272
  }, [dayEvents]);
12180
- const positionedEvents = (0, import_react55.useMemo)(() => {
12273
+ const positionedEvents = (0, import_react56.useMemo)(() => {
12181
12274
  const result = [];
12182
12275
  const dayStart = (0, import_date_fns5.startOfDay)(currentDate);
12183
12276
  const sortedEvents = [...timeEvents].sort((a, b) => {
@@ -12274,7 +12367,7 @@ function DayView({
12274
12367
  "div",
12275
12368
  {
12276
12369
  className: "relative h-[var(--week-cells-height)] border-border/70 border-b last:border-b-0",
12277
- children: index > 0 && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "-top-3 absolute left-0 flex h-6 w-16 max-w-full items-center justify-end bg-background pe-2 text-[10px] text-muted-foreground/70 sm:pe-4 sm:text-xs", children: (0, import_date_fns5.format)(hour, "h a") })
12370
+ children: index > 0 && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)("span", { className: "-top-3 absolute left-0 flex h-6 w-16 max-w-full items-center justify-end bg-background pe-2 text-[10px] text-muted-foreground/70 sm:pe-4 sm:text-xs", children: (0, import_date_fns5.format)(hour, "HH:mm") })
12278
12371
  },
12279
12372
  hour.toString()
12280
12373
  )) }),
@@ -12358,7 +12451,7 @@ function DayView({
12358
12451
  var import_core2 = require("@dnd-kit/core");
12359
12452
  var import_utilities = require("@dnd-kit/utilities");
12360
12453
  var import_date_fns6 = require("date-fns");
12361
- var import_react56 = require("react");
12454
+ var import_react57 = require("react");
12362
12455
  var import_jsx_runtime75 = require("react/jsx-runtime");
12363
12456
  function DraggableEvent({
12364
12457
  event,
@@ -12373,8 +12466,8 @@ function DraggableEvent({
12373
12466
  "aria-hidden": ariaHidden
12374
12467
  }) {
12375
12468
  const { activeId } = useCalendarDnd();
12376
- const elementRef = (0, import_react56.useRef)(null);
12377
- const [dragHandlePosition, setDragHandlePosition] = (0, import_react56.useState)(null);
12469
+ const elementRef = (0, import_react57.useRef)(null);
12470
+ const [dragHandlePosition, setDragHandlePosition] = (0, import_react57.useState)(null);
12378
12471
  const eventStart = new Date(event.start);
12379
12472
  const eventEnd = new Date(event.end);
12380
12473
  const isMultiDayEvent2 = isMultiDay || event.allDay || (0, import_date_fns6.differenceInDays)(eventEnd, eventStart) >= 1;
@@ -12499,9 +12592,9 @@ function DroppableCell({
12499
12592
  // src/components/event-calendar/EventCalendar.tsx
12500
12593
  var import_date_fns7 = require("date-fns");
12501
12594
  var import_locale3 = require("date-fns/locale");
12502
- var import_react57 = require("react");
12595
+ var import_react58 = require("react");
12503
12596
  var import_sonner3 = require("sonner");
12504
- var import_react58 = require("@phosphor-icons/react");
12597
+ var import_react59 = require("@phosphor-icons/react");
12505
12598
  var import_jsx_runtime77 = require("react/jsx-runtime");
12506
12599
  function EventCalendar({
12507
12600
  events = [],
@@ -12511,11 +12604,11 @@ function EventCalendar({
12511
12604
  className,
12512
12605
  initialView = "month"
12513
12606
  }) {
12514
- const [currentDate, setCurrentDate] = (0, import_react57.useState)(/* @__PURE__ */ new Date());
12515
- const [view, setView] = (0, import_react57.useState)(initialView);
12516
- const [isFading, setIsFading] = (0, import_react57.useState)(false);
12607
+ const [currentDate, setCurrentDate] = (0, import_react58.useState)(/* @__PURE__ */ new Date());
12608
+ const [view, setView] = (0, import_react58.useState)(initialView);
12609
+ const [isFading, setIsFading] = (0, import_react58.useState)(false);
12517
12610
  const FADE_DURATION = 220;
12518
- const changeView = (0, import_react57.useCallback)(
12611
+ const changeView = (0, import_react58.useCallback)(
12519
12612
  (next) => {
12520
12613
  if (next === view) return;
12521
12614
  setIsFading(true);
@@ -12526,12 +12619,12 @@ function EventCalendar({
12526
12619
  },
12527
12620
  [view]
12528
12621
  );
12529
- const [isPaging, setIsPaging] = (0, import_react57.useState)(false);
12530
- const [pageDirection, setPageDirection] = (0, import_react57.useState)(
12622
+ const [isPaging, setIsPaging] = (0, import_react58.useState)(false);
12623
+ const [pageDirection, setPageDirection] = (0, import_react58.useState)(
12531
12624
  null
12532
12625
  );
12533
12626
  const PAGE_DURATION = 200;
12534
- const pageTransition = (0, import_react57.useCallback)(
12627
+ const pageTransition = (0, import_react58.useCallback)(
12535
12628
  (applyDateChange, direction) => {
12536
12629
  setIsPaging(true);
12537
12630
  setPageDirection(direction);
@@ -12545,11 +12638,11 @@ function EventCalendar({
12545
12638
  },
12546
12639
  []
12547
12640
  );
12548
- const [isEventDialogOpen, setIsEventDialogOpen] = (0, import_react57.useState)(false);
12549
- const [selectedEvent, setSelectedEvent] = (0, import_react57.useState)(
12641
+ const [isEventDialogOpen, setIsEventDialogOpen] = (0, import_react58.useState)(false);
12642
+ const [selectedEvent, setSelectedEvent] = (0, import_react58.useState)(
12550
12643
  null
12551
12644
  );
12552
- (0, import_react57.useEffect)(() => {
12645
+ (0, import_react58.useEffect)(() => {
12553
12646
  const handleKeyDown = (e) => {
12554
12647
  if (isEventDialogOpen || e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLElement && e.target.isContentEditable) {
12555
12648
  return;
@@ -12684,7 +12777,7 @@ function EventCalendar({
12684
12777
  position: "bottom-left"
12685
12778
  });
12686
12779
  };
12687
- const viewTitle = (0, import_react57.useMemo)(() => {
12780
+ const viewTitle = (0, import_react58.useMemo)(() => {
12688
12781
  const capitalize = (s) => s && s.length > 0 ? s.charAt(0).toUpperCase() + s.slice(1) : s;
12689
12782
  if (view === "month") {
12690
12783
  return capitalize((0, import_date_fns7.format)(currentDate, "MMMM yyyy", { locale: import_locale3.ptBR }));
@@ -12750,7 +12843,7 @@ function EventCalendar({
12750
12843
  variant: "outline",
12751
12844
  children: [
12752
12845
  /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
12753
- import_react58.CalendarIcon,
12846
+ import_react59.CalendarIcon,
12754
12847
  {
12755
12848
  "aria-hidden": "true",
12756
12849
  className: "min-[480px]:hidden",
@@ -12769,7 +12862,7 @@ function EventCalendar({
12769
12862
  onClick: handlePrevious,
12770
12863
  size: "icon",
12771
12864
  variant: "ghost",
12772
- children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react58.CaretLeft, { "aria-hidden": "true", size: 16 })
12865
+ children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react59.CaretLeft, { "aria-hidden": "true", size: 16 })
12773
12866
  }
12774
12867
  ),
12775
12868
  /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
@@ -12779,7 +12872,7 @@ function EventCalendar({
12779
12872
  onClick: handleNext,
12780
12873
  size: "icon",
12781
12874
  variant: "ghost",
12782
- children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react58.CaretRight, { "aria-hidden": "true", size: 16 })
12875
+ children: /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(import_react59.CaretRight, { "aria-hidden": "true", size: 16 })
12783
12876
  }
12784
12877
  )
12785
12878
  ] }),
@@ -12814,7 +12907,7 @@ function EventCalendar({
12814
12907
  })() })
12815
12908
  ] }),
12816
12909
  /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
12817
- import_react58.ArrowDownIcon,
12910
+ import_react59.ArrowDownIcon,
12818
12911
  {
12819
12912
  "aria-hidden": "true",
12820
12913
  className: "-me-1 opacity-60",
@@ -12854,7 +12947,7 @@ function EventCalendar({
12854
12947
  size: "sm",
12855
12948
  children: [
12856
12949
  /* @__PURE__ */ (0, import_jsx_runtime77.jsx)(
12857
- import_react58.PlusIcon,
12950
+ import_react59.PlusIcon,
12858
12951
  {
12859
12952
  "aria-hidden": "true",
12860
12953
  className: "sm:-ms-1 opacity-60",
@@ -12936,11 +13029,11 @@ function EventCalendar({
12936
13029
 
12937
13030
  // src/components/event-calendar/EventDialog.tsx
12938
13031
  var import_date_fns8 = require("date-fns");
12939
- var import_react59 = require("react");
13032
+ var import_react60 = require("react");
12940
13033
  var import_react_radio_group = require("@radix-ui/react-radio-group");
12941
13034
  var import_framer_motion17 = require("framer-motion");
12942
13035
  var import_locale4 = require("date-fns/locale");
12943
- var import_react60 = require("@phosphor-icons/react");
13036
+ var import_react61 = require("@phosphor-icons/react");
12944
13037
  var import_jsx_runtime78 = require("react/jsx-runtime");
12945
13038
  function EventDialog({
12946
13039
  event,
@@ -12949,21 +13042,21 @@ function EventDialog({
12949
13042
  onSave,
12950
13043
  onDelete
12951
13044
  }) {
12952
- const [title, setTitle] = (0, import_react59.useState)("");
12953
- const [description, setDescription] = (0, import_react59.useState)("");
12954
- const [startDate, setStartDate] = (0, import_react59.useState)(/* @__PURE__ */ new Date());
12955
- const [endDate, setEndDate] = (0, import_react59.useState)(/* @__PURE__ */ new Date());
12956
- const [startTime, setStartTime] = (0, import_react59.useState)(`${DefaultStartHour}:00`);
12957
- const [endTime, setEndTime] = (0, import_react59.useState)(`${DefaultEndHour}:00`);
12958
- const [allDay, setAllDay] = (0, import_react59.useState)(false);
12959
- const [location, setLocation] = (0, import_react59.useState)("");
12960
- const [color, setColor] = (0, import_react59.useState)("sky");
12961
- const [error, setError] = (0, import_react59.useState)(null);
12962
- const [startDateOpen, setStartDateOpen] = (0, import_react59.useState)(false);
12963
- const [endDateOpen, setEndDateOpen] = (0, import_react59.useState)(false);
12964
- (0, import_react59.useEffect)(() => {
13045
+ const [title, setTitle] = (0, import_react60.useState)("");
13046
+ const [description, setDescription] = (0, import_react60.useState)("");
13047
+ const [startDate, setStartDate] = (0, import_react60.useState)(/* @__PURE__ */ new Date());
13048
+ const [endDate, setEndDate] = (0, import_react60.useState)(/* @__PURE__ */ new Date());
13049
+ const [startTime, setStartTime] = (0, import_react60.useState)(`${DefaultStartHour}:00`);
13050
+ const [endTime, setEndTime] = (0, import_react60.useState)(`${DefaultEndHour}:00`);
13051
+ const [allDay, setAllDay] = (0, import_react60.useState)(false);
13052
+ const [location, setLocation] = (0, import_react60.useState)("");
13053
+ const [color, setColor] = (0, import_react60.useState)("sky");
13054
+ const [error, setError] = (0, import_react60.useState)(null);
13055
+ const [startDateOpen, setStartDateOpen] = (0, import_react60.useState)(false);
13056
+ const [endDateOpen, setEndDateOpen] = (0, import_react60.useState)(false);
13057
+ (0, import_react60.useEffect)(() => {
12965
13058
  }, [event]);
12966
- const resetForm = (0, import_react59.useCallback)(() => {
13059
+ const resetForm = (0, import_react60.useCallback)(() => {
12967
13060
  setTitle("");
12968
13061
  setDescription("");
12969
13062
  setStartDate(/* @__PURE__ */ new Date());
@@ -12975,12 +13068,12 @@ function EventDialog({
12975
13068
  setColor("sky");
12976
13069
  setError(null);
12977
13070
  }, []);
12978
- const formatTimeForInput = (0, import_react59.useCallback)((date) => {
13071
+ const formatTimeForInput = (0, import_react60.useCallback)((date) => {
12979
13072
  const hours = date.getHours().toString().padStart(2, "0");
12980
13073
  const minutes = Math.floor(date.getMinutes() / 15) * 15;
12981
13074
  return `${hours}:${minutes.toString().padStart(2, "0")}`;
12982
13075
  }, []);
12983
- (0, import_react59.useEffect)(() => {
13076
+ (0, import_react60.useEffect)(() => {
12984
13077
  if (event) {
12985
13078
  setTitle(event.title || "");
12986
13079
  setDescription(event.description || "");
@@ -12998,7 +13091,7 @@ function EventDialog({
12998
13091
  resetForm();
12999
13092
  }
13000
13093
  }, [event, formatTimeForInput, resetForm]);
13001
- const timeOptions = (0, import_react59.useMemo)(() => {
13094
+ const timeOptions = (0, import_react60.useMemo)(() => {
13002
13095
  const options = [];
13003
13096
  for (let hour = StartHour; hour <= EndHour; hour++) {
13004
13097
  for (let minute = 0; minute < 60; minute += 15) {
@@ -13187,7 +13280,7 @@ function EventDialog({
13187
13280
  }
13188
13281
  ),
13189
13282
  /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
13190
- import_react60.CalendarIcon,
13283
+ import_react61.CalendarIcon,
13191
13284
  {
13192
13285
  "aria-hidden": "true",
13193
13286
  className: "shrink-0 text-muted-foreground/80",
@@ -13266,7 +13359,7 @@ function EventDialog({
13266
13359
  }
13267
13360
  ),
13268
13361
  /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(
13269
- import_react60.CalendarIcon,
13362
+ import_react61.CalendarIcon,
13270
13363
  {
13271
13364
  "aria-hidden": "true",
13272
13365
  className: "shrink-0 text-muted-foreground/80",
@@ -13324,7 +13417,7 @@ function EventDialog({
13324
13417
  allDay ? "bg-primary border-transparent text-white" : " border border-input"
13325
13418
  ),
13326
13419
  children: [
13327
- /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react60.CalendarIcon, { size: 14, "aria-hidden": "true" }),
13420
+ /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react61.CalendarIcon, { size: 14, "aria-hidden": "true" }),
13328
13421
  "Dia inteiro"
13329
13422
  ]
13330
13423
  }
@@ -13383,7 +13476,7 @@ function EventDialog({
13383
13476
  onClick: handleDelete,
13384
13477
  size: "icon",
13385
13478
  variant: "outline",
13386
- children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react60.TrashIcon, { "aria-hidden": "true", size: 16 })
13479
+ children: /* @__PURE__ */ (0, import_jsx_runtime78.jsx)(import_react61.TrashIcon, { "aria-hidden": "true", size: 16 })
13387
13480
  }
13388
13481
  ),
13389
13482
  /* @__PURE__ */ (0, import_jsx_runtime78.jsxs)("div", { className: "flex flex-1 justify-end gap-2", children: [
@@ -13398,10 +13491,10 @@ function EventDialog({
13398
13491
 
13399
13492
  // src/components/event-calendar/EventItem.tsx
13400
13493
  var import_date_fns9 = require("date-fns");
13401
- var import_react61 = require("react");
13494
+ var import_react62 = require("react");
13402
13495
  var import_jsx_runtime79 = require("react/jsx-runtime");
13403
13496
  var formatTimeWithOptionalMinutes = (date) => {
13404
- return (0, import_date_fns9.format)(date, (0, import_date_fns9.getMinutes)(date) === 0 ? "ha" : "h:mma").toLowerCase();
13497
+ return (0, import_date_fns9.format)(date, "HH:mm");
13405
13498
  };
13406
13499
  function EventWrapper({
13407
13500
  event,
@@ -13461,15 +13554,15 @@ function EventItem({
13461
13554
  onTouchStart
13462
13555
  }) {
13463
13556
  const eventColor = event.color;
13464
- const displayStart = (0, import_react61.useMemo)(() => {
13557
+ const displayStart = (0, import_react62.useMemo)(() => {
13465
13558
  return currentTime || new Date(event.start);
13466
13559
  }, [currentTime, event.start]);
13467
- const displayEnd = (0, import_react61.useMemo)(() => {
13560
+ const displayEnd = (0, import_react62.useMemo)(() => {
13468
13561
  return currentTime ? new Date(
13469
13562
  new Date(currentTime).getTime() + (new Date(event.end).getTime() - new Date(event.start).getTime())
13470
13563
  ) : new Date(event.end);
13471
13564
  }, [currentTime, event.start, event.end]);
13472
- const durationMinutes = (0, import_react61.useMemo)(() => {
13565
+ const durationMinutes = (0, import_react62.useMemo)(() => {
13473
13566
  return (0, import_date_fns9.differenceInMinutes)(displayEnd, displayStart);
13474
13567
  }, [displayStart, displayEnd]);
13475
13568
  const getEventTime = () => {
@@ -13592,9 +13685,9 @@ function EventItem({
13592
13685
  // src/components/event-calendar/EventsPopUp.tsx
13593
13686
  var import_date_fns10 = require("date-fns");
13594
13687
  var import_locale5 = require("date-fns/locale");
13595
- var import_react62 = require("react");
13688
+ var import_react63 = require("react");
13596
13689
  var import_framer_motion18 = require("framer-motion");
13597
- var import_react63 = require("@phosphor-icons/react");
13690
+ var import_react64 = require("@phosphor-icons/react");
13598
13691
  var import_jsx_runtime80 = require("react/jsx-runtime");
13599
13692
  function EventsPopup({
13600
13693
  date,
@@ -13603,8 +13696,8 @@ function EventsPopup({
13603
13696
  onClose,
13604
13697
  onEventSelect
13605
13698
  }) {
13606
- const popupRef = (0, import_react62.useRef)(null);
13607
- (0, import_react62.useEffect)(() => {
13699
+ const popupRef = (0, import_react63.useRef)(null);
13700
+ (0, import_react63.useEffect)(() => {
13608
13701
  const handleClickOutside = (event) => {
13609
13702
  if (popupRef.current && !popupRef.current.contains(event.target)) {
13610
13703
  onClose();
@@ -13615,7 +13708,7 @@ function EventsPopup({
13615
13708
  document.removeEventListener("mousedown", handleClickOutside);
13616
13709
  };
13617
13710
  }, [onClose]);
13618
- (0, import_react62.useEffect)(() => {
13711
+ (0, import_react63.useEffect)(() => {
13619
13712
  const handleEscKey = (event) => {
13620
13713
  if (event.key === "Escape") {
13621
13714
  onClose();
@@ -13630,7 +13723,7 @@ function EventsPopup({
13630
13723
  onEventSelect(event);
13631
13724
  onClose();
13632
13725
  };
13633
- const adjustedPosition = (0, import_react62.useMemo)(() => {
13726
+ const adjustedPosition = (0, import_react63.useMemo)(() => {
13634
13727
  const positionCopy = { ...position };
13635
13728
  if (popupRef.current) {
13636
13729
  const rect = popupRef.current.getBoundingClientRect();
@@ -13670,15 +13763,15 @@ function EventsPopup({
13670
13763
  /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(
13671
13764
  "button",
13672
13765
  {
13673
- "aria-label": "Close",
13766
+ "aria-label": "Fechar",
13674
13767
  className: "rounded-full p-1 hover:bg-muted",
13675
13768
  onClick: onClose,
13676
13769
  type: "button",
13677
- children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react63.XIcon, { className: "h-4 w-4" })
13770
+ children: /* @__PURE__ */ (0, import_jsx_runtime80.jsx)(import_react64.XIcon, { className: "h-4 w-4" })
13678
13771
  }
13679
13772
  )
13680
13773
  ] }),
13681
- /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "space-y-2 p-3", children: events.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "py-2 text-muted-foreground text-sm", children: "No events" }) : events.map((event) => {
13774
+ /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "space-y-2 p-3", children: events.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime80.jsx)("div", { className: "py-2 text-muted-foreground text-sm", children: "Nenhum evento" }) : events.map((event) => {
13682
13775
  const eventStart = new Date(event.start);
13683
13776
  const eventEnd = new Date(event.end);
13684
13777
  const isFirstDay = (0, import_date_fns10.isSameDay)(date, eventStart);
@@ -13708,11 +13801,12 @@ function EventsPopup({
13708
13801
 
13709
13802
  // src/components/event-calendar/hooks/use-current-time-indicator.ts
13710
13803
  var import_date_fns11 = require("date-fns");
13711
- var import_react64 = require("react");
13804
+ var import_locale6 = require("date-fns/locale");
13805
+ var import_react65 = require("react");
13712
13806
  function useCurrentTimeIndicator(currentDate, view) {
13713
- const [currentTimePosition, setCurrentTimePosition] = (0, import_react64.useState)(0);
13714
- const [currentTimeVisible, setCurrentTimeVisible] = (0, import_react64.useState)(false);
13715
- (0, import_react64.useEffect)(() => {
13807
+ const [currentTimePosition, setCurrentTimePosition] = (0, import_react65.useState)(0);
13808
+ const [currentTimeVisible, setCurrentTimeVisible] = (0, import_react65.useState)(false);
13809
+ (0, import_react65.useEffect)(() => {
13716
13810
  const calculateTimePosition = () => {
13717
13811
  const now = /* @__PURE__ */ new Date();
13718
13812
  const hours = now.getHours();
@@ -13725,8 +13819,8 @@ function useCurrentTimeIndicator(currentDate, view) {
13725
13819
  if (view === "day") {
13726
13820
  isCurrentTimeVisible = (0, import_date_fns11.isSameDay)(now, currentDate);
13727
13821
  } else if (view === "week") {
13728
- const startOfWeekDate = (0, import_date_fns11.startOfWeek)(currentDate, { weekStartsOn: 0 });
13729
- const endOfWeekDate = (0, import_date_fns11.endOfWeek)(currentDate, { weekStartsOn: 0 });
13822
+ const startOfWeekDate = (0, import_date_fns11.startOfWeek)(currentDate, { locale: import_locale6.ptBR });
13823
+ const endOfWeekDate = (0, import_date_fns11.endOfWeek)(currentDate, { locale: import_locale6.ptBR });
13730
13824
  isCurrentTimeVisible = (0, import_date_fns11.isWithinInterval)(now, {
13731
13825
  end: endOfWeekDate,
13732
13826
  start: startOfWeekDate
@@ -13743,15 +13837,15 @@ function useCurrentTimeIndicator(currentDate, view) {
13743
13837
  }
13744
13838
 
13745
13839
  // src/components/event-calendar/hooks/use-event-visibility.ts
13746
- var import_react65 = require("react");
13840
+ var import_react66 = require("react");
13747
13841
  function useEventVisibility({
13748
13842
  eventHeight,
13749
13843
  eventGap
13750
13844
  }) {
13751
- const contentRef = (0, import_react65.useRef)(null);
13752
- const observerRef = (0, import_react65.useRef)(null);
13753
- const [contentHeight, setContentHeight] = (0, import_react65.useState)(null);
13754
- (0, import_react65.useLayoutEffect)(() => {
13845
+ const contentRef = (0, import_react66.useRef)(null);
13846
+ const observerRef = (0, import_react66.useRef)(null);
13847
+ const [contentHeight, setContentHeight] = (0, import_react66.useState)(null);
13848
+ (0, import_react66.useLayoutEffect)(() => {
13755
13849
  if (!contentRef.current) return;
13756
13850
  const updateHeight = () => {
13757
13851
  if (contentRef.current) {
@@ -13771,7 +13865,7 @@ function useEventVisibility({
13771
13865
  }
13772
13866
  };
13773
13867
  }, []);
13774
- const getVisibleEventCount = (0, import_react65.useMemo)(() => {
13868
+ const getVisibleEventCount = (0, import_react66.useMemo)(() => {
13775
13869
  return (totalEvents) => {
13776
13870
  if (!contentHeight) return totalEvents;
13777
13871
  const maxEvents = Math.floor(contentHeight / (eventHeight + eventGap));
@@ -13790,8 +13884,8 @@ function useEventVisibility({
13790
13884
 
13791
13885
  // src/components/event-calendar/MonthView.tsx
13792
13886
  var import_date_fns12 = require("date-fns");
13793
- var import_locale6 = require("date-fns/locale");
13794
- var import_react66 = require("react");
13887
+ var import_locale7 = require("date-fns/locale");
13888
+ var import_react67 = require("react");
13795
13889
  var import_jsx_runtime81 = require("react/jsx-runtime");
13796
13890
  function MonthView({
13797
13891
  currentDate,
@@ -13799,21 +13893,21 @@ function MonthView({
13799
13893
  onEventSelect,
13800
13894
  onEventCreate
13801
13895
  }) {
13802
- const days = (0, import_react66.useMemo)(() => {
13896
+ const days = (0, import_react67.useMemo)(() => {
13803
13897
  const monthStart = (0, import_date_fns12.startOfMonth)(currentDate);
13804
13898
  const monthEnd = (0, import_date_fns12.endOfMonth)(monthStart);
13805
13899
  const calendarStart = (0, import_date_fns12.startOfWeek)(monthStart, { weekStartsOn: 0 });
13806
13900
  const calendarEnd = (0, import_date_fns12.endOfWeek)(monthEnd, { weekStartsOn: 0 });
13807
13901
  return (0, import_date_fns12.eachDayOfInterval)({ end: calendarEnd, start: calendarStart });
13808
13902
  }, [currentDate]);
13809
- const weekdays = (0, import_react66.useMemo)(() => {
13903
+ const weekdays = (0, import_react67.useMemo)(() => {
13810
13904
  return Array.from({ length: 7 }).map((_, i) => {
13811
13905
  const date = (0, import_date_fns12.addDays)((0, import_date_fns12.startOfWeek)(/* @__PURE__ */ new Date(), { weekStartsOn: 0 }), i);
13812
- const short = (0, import_date_fns12.format)(date, "EEE", { locale: import_locale6.ptBR });
13906
+ const short = (0, import_date_fns12.format)(date, "EEE", { locale: import_locale7.ptBR });
13813
13907
  return short.charAt(0).toUpperCase() + short.slice(1);
13814
13908
  });
13815
13909
  }, []);
13816
- const weeks = (0, import_react66.useMemo)(() => {
13910
+ const weeks = (0, import_react67.useMemo)(() => {
13817
13911
  const result = [];
13818
13912
  let week = [];
13819
13913
  for (let i = 0; i < days.length; i++) {
@@ -13829,12 +13923,12 @@ function MonthView({
13829
13923
  e.stopPropagation();
13830
13924
  onEventSelect(event);
13831
13925
  };
13832
- const [isMounted, setIsMounted] = (0, import_react66.useState)(false);
13926
+ const [isMounted, setIsMounted] = (0, import_react67.useState)(false);
13833
13927
  const { contentRef, getVisibleEventCount } = useEventVisibility({
13834
13928
  eventGap: EventGap,
13835
13929
  eventHeight: EventHeight
13836
13930
  });
13837
- (0, import_react66.useEffect)(() => {
13931
+ (0, import_react67.useEffect)(() => {
13838
13932
  setIsMounted(true);
13839
13933
  }, []);
13840
13934
  return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "contents", "data-slot": "month-view", children: [
@@ -13909,7 +14003,7 @@ function MonthView({
13909
14003
  view: "month",
13910
14004
  children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { "aria-hidden": true, className: "invisible", children: [
13911
14005
  !event.allDay && /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("span", { children: [
13912
- (0, import_date_fns12.format)(new Date(event.start), "h:mm"),
14006
+ (0, import_date_fns12.format)(new Date(event.start), "HH:mm"),
13913
14007
  " "
13914
14008
  ] }),
13915
14009
  event.title
@@ -13949,7 +14043,7 @@ function MonthView({
13949
14043
  "aria-label": `Show ${remainingCount} more events on ${(0, import_date_fns12.format)(
13950
14044
  day,
13951
14045
  "PPP",
13952
- { locale: import_locale6.ptBR }
14046
+ { locale: import_locale7.ptBR }
13953
14047
  )}`,
13954
14048
  children: [
13955
14049
  /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("span", { className: "font-medium", children: [
@@ -13969,7 +14063,7 @@ function MonthView({
13969
14063
  "--event-height": `${EventHeight}px`
13970
14064
  },
13971
14065
  children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "space-y-2", children: [
13972
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "font-medium text-sm", children: (0, import_date_fns12.format)(day, "EEE d", { locale: import_locale6.ptBR }) }),
14066
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "font-medium text-sm", children: (0, import_date_fns12.format)(day, "EEE d", { locale: import_locale7.ptBR }) }),
13973
14067
  /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: "space-y-1", children: sortEvents(allEvents).map((event) => {
13974
14068
  const eventStart = new Date(event.start);
13975
14069
  const eventEnd = new Date(event.end);
@@ -14090,8 +14184,8 @@ function addHoursToDate(date, hours) {
14090
14184
 
14091
14185
  // src/components/event-calendar/WeekView.tsx
14092
14186
  var import_date_fns14 = require("date-fns");
14093
- var import_locale7 = require("date-fns/locale");
14094
- var import_react67 = require("react");
14187
+ var import_locale8 = require("date-fns/locale");
14188
+ var import_react68 = require("react");
14095
14189
  var import_jsx_runtime82 = require("react/jsx-runtime");
14096
14190
  function WeekView({
14097
14191
  currentDate,
@@ -14099,23 +14193,23 @@ function WeekView({
14099
14193
  onEventSelect,
14100
14194
  onEventCreate
14101
14195
  }) {
14102
- const days = (0, import_react67.useMemo)(() => {
14196
+ const days = (0, import_react68.useMemo)(() => {
14103
14197
  const weekStart2 = (0, import_date_fns14.startOfWeek)(currentDate, { weekStartsOn: 0 });
14104
14198
  const weekEnd = (0, import_date_fns14.endOfWeek)(currentDate, { weekStartsOn: 0 });
14105
14199
  return (0, import_date_fns14.eachDayOfInterval)({ end: weekEnd, start: weekStart2 });
14106
14200
  }, [currentDate]);
14107
- const weekStart = (0, import_react67.useMemo)(
14201
+ const weekStart = (0, import_react68.useMemo)(
14108
14202
  () => (0, import_date_fns14.startOfWeek)(currentDate, { weekStartsOn: 0 }),
14109
14203
  [currentDate]
14110
14204
  );
14111
- const hours = (0, import_react67.useMemo)(() => {
14205
+ const hours = (0, import_react68.useMemo)(() => {
14112
14206
  const dayStart = (0, import_date_fns14.startOfDay)(currentDate);
14113
14207
  return (0, import_date_fns14.eachHourOfInterval)({
14114
14208
  end: (0, import_date_fns14.addHours)(dayStart, EndHour - 1),
14115
14209
  start: (0, import_date_fns14.addHours)(dayStart, StartHour)
14116
14210
  });
14117
14211
  }, [currentDate]);
14118
- const allDayEvents = (0, import_react67.useMemo)(() => {
14212
+ const allDayEvents = (0, import_react68.useMemo)(() => {
14119
14213
  return events.filter((event) => {
14120
14214
  return event.allDay || isMultiDayEvent(event);
14121
14215
  }).filter((event) => {
@@ -14126,7 +14220,7 @@ function WeekView({
14126
14220
  );
14127
14221
  });
14128
14222
  }, [events, days]);
14129
- const processedDayEvents = (0, import_react67.useMemo)(() => {
14223
+ const processedDayEvents = (0, import_react68.useMemo)(() => {
14130
14224
  const result = days.map((day) => {
14131
14225
  const dayEvents = events.filter((event) => {
14132
14226
  if (event.allDay || isMultiDayEvent(event)) return false;
@@ -14219,11 +14313,11 @@ function WeekView({
14219
14313
  "data-today": (0, import_date_fns14.isToday)(day) || void 0,
14220
14314
  children: [
14221
14315
  /* @__PURE__ */ (0, import_jsx_runtime82.jsxs)("span", { "aria-hidden": "true", className: "sm:hidden", children: [
14222
- (0, import_date_fns14.format)(day, "EEE", { locale: import_locale7.ptBR })[0],
14316
+ (0, import_date_fns14.format)(day, "EEE", { locale: import_locale8.ptBR })[0],
14223
14317
  " ",
14224
- (0, import_date_fns14.format)(day, "d", { locale: import_locale7.ptBR })
14318
+ (0, import_date_fns14.format)(day, "d", { locale: import_locale8.ptBR })
14225
14319
  ] }),
14226
- /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "max-sm:hidden", children: (0, import_date_fns14.format)(day, "EEE dd", { locale: import_locale7.ptBR }) })
14320
+ /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "max-sm:hidden", children: (0, import_date_fns14.format)(day, "EEE dd", { locale: import_locale8.ptBR }) })
14227
14321
  ]
14228
14322
  },
14229
14323
  day.toString()
@@ -14282,7 +14376,7 @@ function WeekView({
14282
14376
  "div",
14283
14377
  {
14284
14378
  className: "relative min-h-[var(--week-cells-height)] border-border/70 border-b last:border-b-0",
14285
- children: index > 0 && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "-top-3 absolute left-0 flex h-6 w-16 max-w-full items-center justify-end bg-background pe-2 text-[10px] text-muted-foreground/70 sm:pe-4 sm:text-xs", children: (0, import_date_fns14.format)(hour, "h a") })
14379
+ children: index > 0 && /* @__PURE__ */ (0, import_jsx_runtime82.jsx)("span", { className: "-top-3 absolute left-0 flex h-6 w-16 max-w-full items-center justify-end bg-background pe-2 text-[10px] text-muted-foreground/70 sm:pe-4 sm:text-xs", children: (0, import_date_fns14.format)(hour, "HH:mm") })
14286
14380
  },
14287
14381
  hour.toString()
14288
14382
  )) }),
@@ -14372,13 +14466,13 @@ function WeekView({
14372
14466
  }
14373
14467
 
14374
14468
  // src/hooks/use-drag.tsx
14375
- var import_react68 = require("react");
14469
+ var import_react69 = require("react");
14376
14470
  var useDrag = (options = {}) => {
14377
- const [isDragging, setIsDragging] = (0, import_react68.useState)(null);
14378
- const [positions, setPositions] = (0, import_react68.useState)({});
14379
- const dragStartPos = (0, import_react68.useRef)(null);
14380
- const dragId = (0, import_react68.useRef)(null);
14381
- const handleMouseDown = (0, import_react68.useCallback)((id, e) => {
14471
+ const [isDragging, setIsDragging] = (0, import_react69.useState)(null);
14472
+ const [positions, setPositions] = (0, import_react69.useState)({});
14473
+ const dragStartPos = (0, import_react69.useRef)(null);
14474
+ const dragId = (0, import_react69.useRef)(null);
14475
+ const handleMouseDown = (0, import_react69.useCallback)((id, e) => {
14382
14476
  e.preventDefault();
14383
14477
  const currentPosition = positions[id] || { top: 0, left: 0 };
14384
14478
  dragStartPos.current = {
@@ -14391,7 +14485,7 @@ var useDrag = (options = {}) => {
14391
14485
  setIsDragging(id);
14392
14486
  options.onDragStart?.(id);
14393
14487
  }, [positions, options]);
14394
- const handleMouseMove = (0, import_react68.useCallback)((e) => {
14488
+ const handleMouseMove = (0, import_react69.useCallback)((e) => {
14395
14489
  if (!isDragging || !dragStartPos.current || !dragId.current) return;
14396
14490
  const deltaX = e.clientX - dragStartPos.current.x;
14397
14491
  const deltaY = e.clientY - dragStartPos.current.y;
@@ -14407,7 +14501,7 @@ var useDrag = (options = {}) => {
14407
14501
  }));
14408
14502
  options.onDrag?.(dragId.current, newPosition);
14409
14503
  }, [isDragging, options]);
14410
- const handleMouseUp = (0, import_react68.useCallback)(() => {
14504
+ const handleMouseUp = (0, import_react69.useCallback)(() => {
14411
14505
  if (dragId.current) {
14412
14506
  options.onDragEnd?.(dragId.current);
14413
14507
  }
@@ -14415,7 +14509,7 @@ var useDrag = (options = {}) => {
14415
14509
  dragStartPos.current = null;
14416
14510
  dragId.current = null;
14417
14511
  }, [options]);
14418
- (0, import_react68.useEffect)(() => {
14512
+ (0, import_react69.useEffect)(() => {
14419
14513
  if (isDragging) {
14420
14514
  document.addEventListener("mousemove", handleMouseMove);
14421
14515
  document.addEventListener("mouseup", handleMouseUp);
@@ -14427,16 +14521,16 @@ var useDrag = (options = {}) => {
14427
14521
  };
14428
14522
  }
14429
14523
  }, [isDragging, handleMouseMove, handleMouseUp]);
14430
- const setPosition = (0, import_react68.useCallback)((id, position) => {
14524
+ const setPosition = (0, import_react69.useCallback)((id, position) => {
14431
14525
  setPositions((prev) => ({
14432
14526
  ...prev,
14433
14527
  [id]: position
14434
14528
  }));
14435
14529
  }, []);
14436
- const getPosition = (0, import_react68.useCallback)((id) => {
14530
+ const getPosition = (0, import_react69.useCallback)((id) => {
14437
14531
  return positions[id] || { top: 0, left: 0 };
14438
14532
  }, [positions]);
14439
- const isElementDragging = (0, import_react68.useCallback)((id) => {
14533
+ const isElementDragging = (0, import_react69.useCallback)((id) => {
14440
14534
  return isDragging === id;
14441
14535
  }, [isDragging]);
14442
14536
  return {