analytica-frontend-lib 1.2.16 → 1.2.18

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
@@ -171,6 +171,7 @@ __export(src_exports, {
171
171
  getSubjectInfo: () => getSubjectInfo,
172
172
  getSubjectName: () => getSubjectName,
173
173
  syncDropdownState: () => syncDropdownState,
174
+ useAlertFormStore: () => useAlertFormStore,
174
175
  useApiConfig: () => useApiConfig,
175
176
  useAppContent: () => useAppContent,
176
177
  useAppInitialization: () => useAppInitialization,
@@ -2087,6 +2088,7 @@ var MessageStep = ({
2087
2088
  const handleRemoveFile = () => {
2088
2089
  setImage(null);
2089
2090
  };
2091
+ const isImageFile = image instanceof File;
2090
2092
  return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)("section", { className: "flex flex-col gap-4", children: [
2091
2093
  /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2092
2094
  Input_default,
@@ -2112,7 +2114,7 @@ var MessageStep = ({
2112
2114
  allowImageAttachment && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
2113
2115
  ImageUpload,
2114
2116
  {
2115
- selectedFile: image,
2117
+ selectedFile: isImageFile ? image : null,
2116
2118
  onFileSelect: handleFileSelect,
2117
2119
  onRemoveFile: handleRemoveFile
2118
2120
  }
@@ -2315,13 +2317,8 @@ var DateStep = ({
2315
2317
 
2316
2318
  // src/components/AlertManager/AlertSteps/PreviewStep.tsx
2317
2319
  var import_react12 = require("react");
2318
-
2319
- // src/assets/img/notification.png
2320
- var notification_default = "./notification-TD7ZFRLL.png";
2321
-
2322
- // src/components/AlertManager/AlertSteps/PreviewStep.tsx
2323
2320
  var import_jsx_runtime18 = require("react/jsx-runtime");
2324
- var PreviewStep = () => {
2321
+ var PreviewStep = ({ imageLink, defaultImage }) => {
2325
2322
  const title = useAlertFormStore((state) => state.title);
2326
2323
  const message = useAlertFormStore((state) => state.message);
2327
2324
  const image = useAlertFormStore((state) => state.image);
@@ -2332,17 +2329,21 @@ var PreviewStep = () => {
2332
2329
  if (image instanceof File) {
2333
2330
  return globalThis.window.URL.createObjectURL(image);
2334
2331
  }
2332
+ if (typeof image === "string") {
2333
+ return image;
2334
+ }
2335
2335
  return void 0;
2336
2336
  }, [image]);
2337
2337
  (0, import_react12.useEffect)(() => {
2338
2338
  return () => {
2339
- if (imageUrl && globalThis.window !== void 0) {
2339
+ if (globalThis.window !== void 0 && imageUrl && image instanceof File) {
2340
2340
  URL.revokeObjectURL(imageUrl);
2341
2341
  }
2342
2342
  };
2343
- }, [imageUrl]);
2343
+ }, [imageUrl, image]);
2344
+ const finalImageUrl = imageLink || imageUrl || defaultImage || void 0;
2344
2345
  return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("section", { className: "flex flex-col gap-4", children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "bg-background-50 px-5 py-6 flex flex-col items-center gap-4 rounded-xl", children: [
2345
- /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: imageUrl || notification_default, alt: title || "Imagem do alerta" }),
2346
+ finalImageUrl && /* @__PURE__ */ (0, import_jsx_runtime18.jsx)("img", { src: finalImageUrl, alt: title || "Imagem do alerta" }),
2346
2347
  /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)("div", { className: "flex flex-col items-center text-center gap-3", children: [
2347
2348
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text_default, { size: "lg", weight: "semibold", children: title || "Nenhum T\xEDtulo de Alerta" }),
2348
2349
  /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(Text_default, { size: "sm", weight: "normal", className: "text-text-500", children: message || "Aqui aparecer\xE1 a mensagem do alerta definido pelo usu\xE1rio" })
@@ -2436,7 +2437,9 @@ var StepWrapper = ({ children }) => /* @__PURE__ */ (0, import_jsx_runtime19.jsx
2436
2437
  var AlertsManager = ({
2437
2438
  config,
2438
2439
  isOpen = false,
2439
- onClose
2440
+ onClose,
2441
+ imageLink,
2442
+ defaultImage
2440
2443
  }) => {
2441
2444
  const [isModalOpen, setIsModalOpen] = (0, import_react13.useState)(isOpen);
2442
2445
  const [currentStep, setCurrentStep] = (0, import_react13.useState)(0);
@@ -2595,7 +2598,7 @@ var AlertsManager = ({
2595
2598
  }
2596
2599
  ) });
2597
2600
  case 3:
2598
- return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StepWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PreviewStep, {}) });
2601
+ return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(StepWrapper, { children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(PreviewStep, { imageLink, defaultImage }) });
2599
2602
  default:
2600
2603
  return null;
2601
2604
  }
@@ -2606,7 +2609,9 @@ var AlertsManager = ({
2606
2609
  labels,
2607
2610
  behavior,
2608
2611
  handleNext2,
2609
- handlePrevious
2612
+ handlePrevious,
2613
+ imageLink,
2614
+ defaultImage
2610
2615
  ]);
2611
2616
  const isFirstStep = currentStep === 0;
2612
2617
  const isLastStep = currentStep === steps.length - 1;
@@ -2669,9 +2674,6 @@ var AlertsManager = ({
2669
2674
  );
2670
2675
  };
2671
2676
 
2672
- // src/components/AlertManagerView/AlertsManagerView.tsx
2673
- var import_react16 = require("react");
2674
-
2675
2677
  // src/components/Modal/Modal.tsx
2676
2678
  var import_react14 = require("react");
2677
2679
  var import_phosphor_react9 = require("phosphor-react");
@@ -3282,7 +3284,9 @@ var Table = (0, import_react15.forwardRef)(
3282
3284
  {
3283
3285
  ref,
3284
3286
  className: cn(
3285
- "analytica-table w-full caption-bottom text-sm border-separate border-spacing-0",
3287
+ variant === "default" && "analytica-table",
3288
+ variant === "default" && "border-separate border-spacing-0",
3289
+ "w-full caption-bottom text-sm",
3286
3290
  className
3287
3291
  ),
3288
3292
  ...props,
@@ -3309,11 +3313,15 @@ var TableHeader = (0, import_react15.forwardRef)(({ className, ...props }, ref)
3309
3313
  ));
3310
3314
  TableHeader.displayName = "TableHeader";
3311
3315
  var TableBody = (0, import_react15.forwardRef)(
3312
- ({ className, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3316
+ ({ className, variant = "default", ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
3313
3317
  "tbody",
3314
3318
  {
3315
3319
  ref,
3316
- className: cn("[&_tr:last-child]:border-border-200", className),
3320
+ className: cn(
3321
+ "[&_tr:last-child]:border-border-200",
3322
+ variant === "default" && "border-t border-border-200",
3323
+ className
3324
+ ),
3317
3325
  ...props
3318
3326
  }
3319
3327
  )
@@ -3337,18 +3345,22 @@ TableFooter.displayName = "TableFooter";
3337
3345
  var VARIANT_STATES_ROW = {
3338
3346
  default: {
3339
3347
  default: "border border-border-200",
3348
+ defaultBorderless: "border-b border-border-200",
3340
3349
  borderless: ""
3341
3350
  },
3342
3351
  selected: {
3343
3352
  default: "border-b-2 border-indicator-primary",
3353
+ defaultBorderless: "border-b border-indicator-primary",
3344
3354
  borderless: "bg-indicator-primary/10"
3345
3355
  },
3346
3356
  invalid: {
3347
3357
  default: "border-b-2 border-indicator-error",
3358
+ defaultBorderless: "border-b border-indicator-error",
3348
3359
  borderless: "bg-indicator-error/10"
3349
3360
  },
3350
3361
  disabled: {
3351
3362
  default: "border-b border-border-100 bg-background-50 opacity-50 cursor-not-allowed",
3363
+ defaultBorderless: "border-b border-border-100 bg-background-50 opacity-50 cursor-not-allowed",
3352
3364
  borderless: "bg-background-50 opacity-50 cursor-not-allowed"
3353
3365
  }
3354
3366
  };
@@ -3448,27 +3460,13 @@ var AlertsManagerView = ({
3448
3460
  alertData,
3449
3461
  isOpen = false,
3450
3462
  onClose,
3463
+ imageLink,
3464
+ defaultImage,
3451
3465
  currentPage = 1,
3452
3466
  totalPages: externalTotalPages,
3453
3467
  onPageChange,
3454
3468
  itemsPerPage = 10
3455
3469
  }) => {
3456
- const imageUrl = (0, import_react16.useMemo)(() => {
3457
- if (globalThis.window == void 0) {
3458
- return void 0;
3459
- }
3460
- if (alertData.image instanceof File) {
3461
- return globalThis.window.URL.createObjectURL(alertData.image);
3462
- }
3463
- return void 0;
3464
- }, [alertData.image]);
3465
- (0, import_react16.useEffect)(() => {
3466
- return () => {
3467
- if (imageUrl && globalThis.window !== void 0) {
3468
- URL.revokeObjectURL(imageUrl);
3469
- }
3470
- };
3471
- }, [imageUrl]);
3472
3470
  const totalPages = externalTotalPages ?? Math.ceil(alertData.recipients.length / itemsPerPage);
3473
3471
  const effectiveCurrentPage = Math.min(totalPages, Math.max(1, currentPage));
3474
3472
  const startIndex = (effectiveCurrentPage - 1) * itemsPerPage;
@@ -3496,10 +3494,10 @@ var AlertsManagerView = ({
3496
3494
  contentClassName: "p-0",
3497
3495
  children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)("div", { className: "flex flex-col h-[calc(100vh-8rem)] max-h-[700px]", children: /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "flex-1 overflow-y-auto px-6 py-4", children: [
3498
3496
  /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)("div", { className: "bg-background-50 px-5 py-6 flex flex-col items-center gap-4 rounded-xl mb-4", children: [
3499
- /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3497
+ (imageLink || alertData.image || defaultImage) && /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
3500
3498
  "img",
3501
3499
  {
3502
- src: imageUrl || notification_default,
3500
+ src: imageLink || alertData.image || defaultImage || void 0,
3503
3501
  alt: alertData.title || "Imagem do alerta"
3504
3502
  }
3505
3503
  ),
@@ -3588,7 +3586,7 @@ var AlertsManagerView = ({
3588
3586
  };
3589
3587
 
3590
3588
  // src/components/Radio/Radio.tsx
3591
- var import_react17 = require("react");
3589
+ var import_react16 = require("react");
3592
3590
  var import_zustand3 = require("zustand");
3593
3591
  var import_jsx_runtime26 = require("react/jsx-runtime");
3594
3592
  var SIZE_CLASSES7 = {
@@ -3655,7 +3653,7 @@ var DOT_CLASSES = {
3655
3653
  invalid: "bg-primary-950",
3656
3654
  disabled: "bg-primary-950"
3657
3655
  };
3658
- var Radio = (0, import_react17.forwardRef)(
3656
+ var Radio = (0, import_react16.forwardRef)(
3659
3657
  ({
3660
3658
  label,
3661
3659
  size = "medium",
@@ -3673,10 +3671,10 @@ var Radio = (0, import_react17.forwardRef)(
3673
3671
  onChange,
3674
3672
  ...props
3675
3673
  }, ref) => {
3676
- const generatedId = (0, import_react17.useId)();
3674
+ const generatedId = (0, import_react16.useId)();
3677
3675
  const inputId = id ?? `radio-${generatedId}`;
3678
- const inputRef = (0, import_react17.useRef)(null);
3679
- const [internalChecked, setInternalChecked] = (0, import_react17.useState)(defaultChecked);
3676
+ const inputRef = (0, import_react16.useRef)(null);
3677
+ const [internalChecked, setInternalChecked] = (0, import_react16.useState)(defaultChecked);
3680
3678
  const isControlled = checkedProp !== void 0;
3681
3679
  const checked = isControlled ? checkedProp : internalChecked;
3682
3680
  const handleChange = (event) => {
@@ -3862,16 +3860,16 @@ var useRadioGroupStore = (externalStore) => {
3862
3860
  }
3863
3861
  return externalStore;
3864
3862
  };
3865
- var injectStore2 = (children, store) => import_react17.Children.map(children, (child) => {
3866
- if (!(0, import_react17.isValidElement)(child)) return child;
3863
+ var injectStore2 = (children, store) => import_react16.Children.map(children, (child) => {
3864
+ if (!(0, import_react16.isValidElement)(child)) return child;
3867
3865
  const typedChild = child;
3868
3866
  const shouldInject = typedChild.type === RadioGroupItem;
3869
- return (0, import_react17.cloneElement)(typedChild, {
3867
+ return (0, import_react16.cloneElement)(typedChild, {
3870
3868
  ...shouldInject ? { store } : {},
3871
3869
  ...typedChild.props.children ? { children: injectStore2(typedChild.props.children, store) } : {}
3872
3870
  });
3873
3871
  });
3874
- var RadioGroup = (0, import_react17.forwardRef)(
3872
+ var RadioGroup = (0, import_react16.forwardRef)(
3875
3873
  ({
3876
3874
  value: propValue,
3877
3875
  defaultValue = "",
@@ -3882,9 +3880,9 @@ var RadioGroup = (0, import_react17.forwardRef)(
3882
3880
  children,
3883
3881
  ...props
3884
3882
  }, ref) => {
3885
- const generatedId = (0, import_react17.useId)();
3883
+ const generatedId = (0, import_react16.useId)();
3886
3884
  const name = propName || `radio-group-${generatedId}`;
3887
- const storeRef = (0, import_react17.useRef)(null);
3885
+ const storeRef = (0, import_react16.useRef)(null);
3888
3886
  storeRef.current ??= createRadioGroupStore(
3889
3887
  name,
3890
3888
  defaultValue,
@@ -3893,18 +3891,18 @@ var RadioGroup = (0, import_react17.forwardRef)(
3893
3891
  );
3894
3892
  const store = storeRef.current;
3895
3893
  const { setValue } = (0, import_zustand3.useStore)(store, (s) => s);
3896
- (0, import_react17.useEffect)(() => {
3894
+ (0, import_react16.useEffect)(() => {
3897
3895
  const currentValue = store.getState().value;
3898
3896
  if (currentValue && onValueChange) {
3899
3897
  onValueChange(currentValue);
3900
3898
  }
3901
3899
  }, []);
3902
- (0, import_react17.useEffect)(() => {
3900
+ (0, import_react16.useEffect)(() => {
3903
3901
  if (propValue !== void 0) {
3904
3902
  setValue(propValue);
3905
3903
  }
3906
3904
  }, [propValue, setValue]);
3907
- (0, import_react17.useEffect)(() => {
3905
+ (0, import_react16.useEffect)(() => {
3908
3906
  store.setState({ disabled });
3909
3907
  }, [disabled, store]);
3910
3908
  return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
@@ -3921,7 +3919,7 @@ var RadioGroup = (0, import_react17.forwardRef)(
3921
3919
  }
3922
3920
  );
3923
3921
  RadioGroup.displayName = "RadioGroup";
3924
- var RadioGroupItem = (0, import_react17.forwardRef)(
3922
+ var RadioGroupItem = (0, import_react16.forwardRef)(
3925
3923
  ({
3926
3924
  value,
3927
3925
  store: externalStore,
@@ -3939,7 +3937,7 @@ var RadioGroupItem = (0, import_react17.forwardRef)(
3939
3937
  disabled: groupDisabled,
3940
3938
  name
3941
3939
  } = (0, import_zustand3.useStore)(store);
3942
- const generatedId = (0, import_react17.useId)();
3940
+ const generatedId = (0, import_react16.useId)();
3943
3941
  const inputId = id ?? `radio-item-${generatedId}`;
3944
3942
  const isChecked = groupValue === value;
3945
3943
  const isDisabled = groupDisabled || itemDisabled;
@@ -4087,19 +4085,19 @@ var Toaster_default = Toaster;
4087
4085
 
4088
4086
  // src/components/Search/Search.tsx
4089
4087
  var import_phosphor_react16 = require("phosphor-react");
4090
- var import_react21 = require("react");
4088
+ var import_react20 = require("react");
4091
4089
 
4092
4090
  // src/components/DropdownMenu/DropdownMenu.tsx
4093
4091
  var import_phosphor_react15 = require("phosphor-react");
4094
- var import_react20 = require("react");
4092
+ var import_react19 = require("react");
4095
4093
  var import_zustand6 = require("zustand");
4096
4094
 
4097
4095
  // src/components/ThemeToggle/ThemeToggle.tsx
4098
4096
  var import_phosphor_react14 = require("phosphor-react");
4099
- var import_react19 = require("react");
4097
+ var import_react18 = require("react");
4100
4098
 
4101
4099
  // src/hooks/useTheme.ts
4102
- var import_react18 = require("react");
4100
+ var import_react17 = require("react");
4103
4101
 
4104
4102
  // src/store/themeStore.ts
4105
4103
  var import_zustand5 = require("zustand");
@@ -4203,7 +4201,7 @@ var useTheme = () => {
4203
4201
  initializeTheme,
4204
4202
  handleSystemThemeChange
4205
4203
  } = useThemeStore();
4206
- (0, import_react18.useEffect)(() => {
4204
+ (0, import_react17.useEffect)(() => {
4207
4205
  initializeTheme();
4208
4206
  const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
4209
4207
  mediaQuery.addEventListener("change", handleSystemThemeChange);
@@ -4226,8 +4224,8 @@ var ThemeToggle = ({
4226
4224
  onToggle
4227
4225
  }) => {
4228
4226
  const { themeMode, setTheme } = useTheme();
4229
- const [tempTheme, setTempTheme] = (0, import_react19.useState)(themeMode);
4230
- (0, import_react19.useEffect)(() => {
4227
+ const [tempTheme, setTempTheme] = (0, import_react18.useState)(themeMode);
4228
+ (0, import_react18.useEffect)(() => {
4231
4229
  setTempTheme(themeMode);
4232
4230
  }, [themeMode]);
4233
4231
  const problemTypes = [
@@ -4304,8 +4302,8 @@ var useDropdownStore = (externalStore) => {
4304
4302
  return externalStore;
4305
4303
  };
4306
4304
  var injectStore3 = (children, store) => {
4307
- return import_react20.Children.map(children, (child) => {
4308
- if ((0, import_react20.isValidElement)(child)) {
4305
+ return import_react19.Children.map(children, (child) => {
4306
+ if ((0, import_react19.isValidElement)(child)) {
4309
4307
  const typedChild = child;
4310
4308
  const displayName = typedChild.type.displayName;
4311
4309
  const allowed = [
@@ -4327,7 +4325,7 @@ var injectStore3 = (children, store) => {
4327
4325
  if (typedChild.props.children) {
4328
4326
  newProps.children = injectStore3(typedChild.props.children, store);
4329
4327
  }
4330
- return (0, import_react20.cloneElement)(typedChild, newProps);
4328
+ return (0, import_react19.cloneElement)(typedChild, newProps);
4331
4329
  }
4332
4330
  return child;
4333
4331
  });
@@ -4337,14 +4335,14 @@ var DropdownMenu = ({
4337
4335
  open: propOpen,
4338
4336
  onOpenChange
4339
4337
  }) => {
4340
- const storeRef = (0, import_react20.useRef)(null);
4338
+ const storeRef = (0, import_react19.useRef)(null);
4341
4339
  storeRef.current ??= createDropdownStore();
4342
4340
  const store = storeRef.current;
4343
4341
  const { open, setOpen: storeSetOpen } = (0, import_zustand6.useStore)(store, (s) => s);
4344
4342
  const setOpen = (newOpen) => {
4345
4343
  storeSetOpen(newOpen);
4346
4344
  };
4347
- const menuRef = (0, import_react20.useRef)(null);
4345
+ const menuRef = (0, import_react19.useRef)(null);
4348
4346
  const handleArrowDownOrArrowUp = (event) => {
4349
4347
  const menuContent = menuRef.current?.querySelector('[role="menu"]');
4350
4348
  if (menuContent) {
@@ -4378,7 +4376,7 @@ var DropdownMenu = ({
4378
4376
  setOpen(false);
4379
4377
  }
4380
4378
  };
4381
- (0, import_react20.useEffect)(() => {
4379
+ (0, import_react19.useEffect)(() => {
4382
4380
  if (open) {
4383
4381
  document.addEventListener("pointerdown", handleClickOutside);
4384
4382
  document.addEventListener("keydown", handleDownkey);
@@ -4388,10 +4386,10 @@ var DropdownMenu = ({
4388
4386
  document.removeEventListener("keydown", handleDownkey);
4389
4387
  };
4390
4388
  }, [open]);
4391
- (0, import_react20.useEffect)(() => {
4389
+ (0, import_react19.useEffect)(() => {
4392
4390
  onOpenChange?.(open);
4393
4391
  }, [open, onOpenChange]);
4394
- (0, import_react20.useEffect)(() => {
4392
+ (0, import_react19.useEffect)(() => {
4395
4393
  if (propOpen !== void 0) {
4396
4394
  setOpen(propOpen);
4397
4395
  }
@@ -4452,7 +4450,7 @@ var MENUCONTENT_VARIANT_CLASSES = {
4452
4450
  menu: "p-1",
4453
4451
  profile: "p-6"
4454
4452
  };
4455
- var MenuLabel = (0, import_react20.forwardRef)(({ className, inset, store: _store, ...props }, ref) => {
4453
+ var MenuLabel = (0, import_react19.forwardRef)(({ className, inset, store: _store, ...props }, ref) => {
4456
4454
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4457
4455
  "div",
4458
4456
  {
@@ -4463,7 +4461,7 @@ var MenuLabel = (0, import_react20.forwardRef)(({ className, inset, store: _stor
4463
4461
  );
4464
4462
  });
4465
4463
  MenuLabel.displayName = "MenuLabel";
4466
- var DropdownMenuContent = (0, import_react20.forwardRef)(
4464
+ var DropdownMenuContent = (0, import_react19.forwardRef)(
4467
4465
  ({
4468
4466
  className,
4469
4467
  align = "start",
@@ -4476,8 +4474,8 @@ var DropdownMenuContent = (0, import_react20.forwardRef)(
4476
4474
  }, ref) => {
4477
4475
  const store = useDropdownStore(externalStore);
4478
4476
  const open = (0, import_zustand6.useStore)(store, (s) => s.open);
4479
- const [isVisible, setIsVisible] = (0, import_react20.useState)(open);
4480
- (0, import_react20.useEffect)(() => {
4477
+ const [isVisible, setIsVisible] = (0, import_react19.useState)(open);
4478
+ (0, import_react19.useEffect)(() => {
4481
4479
  if (open) {
4482
4480
  setIsVisible(true);
4483
4481
  } else {
@@ -4517,7 +4515,7 @@ var DropdownMenuContent = (0, import_react20.forwardRef)(
4517
4515
  }
4518
4516
  );
4519
4517
  DropdownMenuContent.displayName = "DropdownMenuContent";
4520
- var DropdownMenuItem = (0, import_react20.forwardRef)(
4518
+ var DropdownMenuItem = (0, import_react19.forwardRef)(
4521
4519
  ({
4522
4520
  className,
4523
4521
  size = "small",
@@ -4595,7 +4593,7 @@ var DropdownMenuItem = (0, import_react20.forwardRef)(
4595
4593
  }
4596
4594
  );
4597
4595
  DropdownMenuItem.displayName = "DropdownMenuItem";
4598
- var DropdownMenuSeparator = (0, import_react20.forwardRef)(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4596
+ var DropdownMenuSeparator = (0, import_react19.forwardRef)(({ className, store: _store, ...props }, ref) => /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
4599
4597
  "div",
4600
4598
  {
4601
4599
  ref,
@@ -4604,7 +4602,7 @@ var DropdownMenuSeparator = (0, import_react20.forwardRef)(({ className, store:
4604
4602
  }
4605
4603
  ));
4606
4604
  DropdownMenuSeparator.displayName = "DropdownMenuSeparator";
4607
- var ProfileMenuTrigger = (0, import_react20.forwardRef)(({ className, onClick, store: externalStore, ...props }, ref) => {
4605
+ var ProfileMenuTrigger = (0, import_react19.forwardRef)(({ className, onClick, store: externalStore, ...props }, ref) => {
4608
4606
  const store = useDropdownStore(externalStore);
4609
4607
  const open = (0, import_zustand6.useStore)(store, (s) => s.open);
4610
4608
  const toggleOpen = () => store.setState({ open: !open });
@@ -4628,7 +4626,7 @@ var ProfileMenuTrigger = (0, import_react20.forwardRef)(({ className, onClick, s
4628
4626
  );
4629
4627
  });
4630
4628
  ProfileMenuTrigger.displayName = "ProfileMenuTrigger";
4631
- var ProfileMenuHeader = (0, import_react20.forwardRef)(({ className, name, email, photoUrl, store: _store, ...props }, ref) => {
4629
+ var ProfileMenuHeader = (0, import_react19.forwardRef)(({ className, name, email, photoUrl, store: _store, ...props }, ref) => {
4632
4630
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsxs)(
4633
4631
  "div",
4634
4632
  {
@@ -4659,9 +4657,9 @@ var ProfileToggleTheme = ({
4659
4657
  ...props
4660
4658
  }) => {
4661
4659
  const { themeMode, setTheme } = useTheme();
4662
- const [modalThemeToggle, setModalThemeToggle] = (0, import_react20.useState)(false);
4663
- const [selectedTheme, setSelectedTheme] = (0, import_react20.useState)(themeMode);
4664
- const internalStoreRef = (0, import_react20.useRef)(null);
4660
+ const [modalThemeToggle, setModalThemeToggle] = (0, import_react19.useState)(false);
4661
+ const [selectedTheme, setSelectedTheme] = (0, import_react19.useState)(themeMode);
4662
+ const internalStoreRef = (0, import_react19.useRef)(null);
4665
4663
  internalStoreRef.current ??= createDropdownStore();
4666
4664
  const store = externalStore ?? internalStoreRef.current;
4667
4665
  const setOpen = (0, import_zustand6.useStore)(store, (s) => s.setOpen);
@@ -4737,7 +4735,7 @@ var ProfileToggleTheme = ({
4737
4735
  ] });
4738
4736
  };
4739
4737
  ProfileToggleTheme.displayName = "ProfileToggleTheme";
4740
- var ProfileMenuSection = (0, import_react20.forwardRef)(({ className, children, store: _store, ...props }, ref) => {
4738
+ var ProfileMenuSection = (0, import_react19.forwardRef)(({ className, children, store: _store, ...props }, ref) => {
4741
4739
  return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)("div", { ref, className: cn("flex flex-col p-2", className), ...props, children });
4742
4740
  });
4743
4741
  ProfileMenuSection.displayName = "ProfileMenuSection";
@@ -4797,7 +4795,7 @@ var updateInputValue = (value, ref, onChange) => {
4797
4795
  onChange(event);
4798
4796
  }
4799
4797
  };
4800
- var Search = (0, import_react21.forwardRef)(
4798
+ var Search = (0, import_react20.forwardRef)(
4801
4799
  ({
4802
4800
  options = [],
4803
4801
  onSelect,
@@ -4818,13 +4816,13 @@ var Search = (0, import_react21.forwardRef)(
4818
4816
  onKeyDown: userOnKeyDown,
4819
4817
  ...props
4820
4818
  }, ref) => {
4821
- const [dropdownOpen, setDropdownOpen] = (0, import_react21.useState)(false);
4822
- const [forceClose, setForceClose] = (0, import_react21.useState)(false);
4823
- const justSelectedRef = (0, import_react21.useRef)(false);
4824
- const dropdownStore = (0, import_react21.useRef)(createDropdownStore()).current;
4825
- const dropdownRef = (0, import_react21.useRef)(null);
4826
- const inputElRef = (0, import_react21.useRef)(null);
4827
- const filteredOptions = (0, import_react21.useMemo)(() => {
4819
+ const [dropdownOpen, setDropdownOpen] = (0, import_react20.useState)(false);
4820
+ const [forceClose, setForceClose] = (0, import_react20.useState)(false);
4821
+ const justSelectedRef = (0, import_react20.useRef)(false);
4822
+ const dropdownStore = (0, import_react20.useRef)(createDropdownStore()).current;
4823
+ const dropdownRef = (0, import_react20.useRef)(null);
4824
+ const inputElRef = (0, import_react20.useRef)(null);
4825
+ const filteredOptions = (0, import_react20.useMemo)(() => {
4828
4826
  if (!options.length) {
4829
4827
  return [];
4830
4828
  }
@@ -4837,7 +4835,7 @@ var Search = (0, import_react21.forwardRef)(
4837
4835
  dropdownStore.setState({ open });
4838
4836
  onDropdownChange?.(open);
4839
4837
  };
4840
- (0, import_react21.useEffect)(() => {
4838
+ (0, import_react20.useEffect)(() => {
4841
4839
  if (justSelectedRef.current) {
4842
4840
  justSelectedRef.current = false;
4843
4841
  return;
@@ -4856,7 +4854,7 @@ var Search = (0, import_react21.forwardRef)(
4856
4854
  setOpenAndNotify(false);
4857
4855
  updateInputValue(option, ref, onChange);
4858
4856
  };
4859
- (0, import_react21.useEffect)(() => {
4857
+ (0, import_react20.useEffect)(() => {
4860
4858
  const handleClickOutside = (event) => {
4861
4859
  if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
4862
4860
  setOpenAndNotify(false);
@@ -4869,7 +4867,7 @@ var Search = (0, import_react21.forwardRef)(
4869
4867
  document.removeEventListener("mousedown", handleClickOutside);
4870
4868
  };
4871
4869
  }, [showDropdown, dropdownStore, onDropdownChange]);
4872
- const generatedId = (0, import_react21.useId)();
4870
+ const generatedId = (0, import_react20.useId)();
4873
4871
  const inputId = id ?? `search-${generatedId}`;
4874
4872
  const dropdownId = `${inputId}-dropdown`;
4875
4873
  const handleClear = () => {
@@ -5997,7 +5995,7 @@ var Stepper = ({
5997
5995
  var Stepper_default = Stepper;
5998
5996
 
5999
5997
  // src/components/Calendar/Calendar.tsx
6000
- var import_react22 = require("react");
5998
+ var import_react21 = require("react");
6001
5999
  var import_jsx_runtime36 = require("react/jsx-runtime");
6002
6000
  var WEEK_DAYS = ["SEG", "TER", "QUA", "QUI", "SEX", "S\xC1B", "DOM"];
6003
6001
  var WEEK_DAYS_SHORT = ["S", "T", "Q", "Q", "S", "S", "D"];
@@ -6097,11 +6095,11 @@ var Calendar = ({
6097
6095
  showActivities = true,
6098
6096
  className = ""
6099
6097
  }) => {
6100
- const [currentDate, setCurrentDate] = (0, import_react22.useState)(selectedDate || /* @__PURE__ */ new Date());
6101
- const [isMonthPickerOpen, setIsMonthPickerOpen] = (0, import_react22.useState)(false);
6102
- const monthPickerRef = (0, import_react22.useRef)(null);
6103
- const monthPickerContainerRef = (0, import_react22.useRef)(null);
6104
- (0, import_react22.useEffect)(() => {
6098
+ const [currentDate, setCurrentDate] = (0, import_react21.useState)(selectedDate || /* @__PURE__ */ new Date());
6099
+ const [isMonthPickerOpen, setIsMonthPickerOpen] = (0, import_react21.useState)(false);
6100
+ const monthPickerRef = (0, import_react21.useRef)(null);
6101
+ const monthPickerContainerRef = (0, import_react21.useRef)(null);
6102
+ (0, import_react21.useEffect)(() => {
6105
6103
  const handleClickOutside = (event) => {
6106
6104
  if (monthPickerContainerRef.current && !monthPickerContainerRef.current.contains(event.target)) {
6107
6105
  setIsMonthPickerOpen(false);
@@ -6115,7 +6113,7 @@ var Calendar = ({
6115
6113
  };
6116
6114
  }, [isMonthPickerOpen]);
6117
6115
  const today = /* @__PURE__ */ new Date();
6118
- const availableYears = (0, import_react22.useMemo)(() => {
6116
+ const availableYears = (0, import_react21.useMemo)(() => {
6119
6117
  const currentYear = (/* @__PURE__ */ new Date()).getFullYear();
6120
6118
  const years = [];
6121
6119
  for (let year = currentYear - 10; year <= currentYear + 10; year++) {
@@ -6123,7 +6121,7 @@ var Calendar = ({
6123
6121
  }
6124
6122
  return years;
6125
6123
  }, []);
6126
- const calendarData = (0, import_react22.useMemo)(() => {
6124
+ const calendarData = (0, import_react21.useMemo)(() => {
6127
6125
  const year = currentDate.getFullYear();
6128
6126
  const month = currentDate.getMonth();
6129
6127
  const firstDay = new Date(year, month, 1);
@@ -6494,7 +6492,7 @@ var Calendar = ({
6494
6492
  var Calendar_default = Calendar;
6495
6493
 
6496
6494
  // src/components/AlertDialog/AlertDialog.tsx
6497
- var import_react23 = require("react");
6495
+ var import_react22 = require("react");
6498
6496
  var import_jsx_runtime37 = require("react/jsx-runtime");
6499
6497
  var SIZE_CLASSES11 = {
6500
6498
  "extra-small": "w-screen max-w-[324px]",
@@ -6503,7 +6501,7 @@ var SIZE_CLASSES11 = {
6503
6501
  large: "w-screen max-w-[578px]",
6504
6502
  "extra-large": "w-screen max-w-[912px]"
6505
6503
  };
6506
- var AlertDialog = (0, import_react23.forwardRef)(
6504
+ var AlertDialog = (0, import_react22.forwardRef)(
6507
6505
  ({
6508
6506
  description,
6509
6507
  cancelButtonLabel = "Cancelar",
@@ -6521,7 +6519,7 @@ var AlertDialog = (0, import_react23.forwardRef)(
6521
6519
  size = "medium",
6522
6520
  ...props
6523
6521
  }, ref) => {
6524
- (0, import_react23.useEffect)(() => {
6522
+ (0, import_react22.useEffect)(() => {
6525
6523
  if (!isOpen || !closeOnEscape) return;
6526
6524
  const handleEscape = (event) => {
6527
6525
  if (event.key === "Escape") {
@@ -6531,7 +6529,7 @@ var AlertDialog = (0, import_react23.forwardRef)(
6531
6529
  document.addEventListener("keydown", handleEscape);
6532
6530
  return () => document.removeEventListener("keydown", handleEscape);
6533
6531
  }, [isOpen, closeOnEscape]);
6534
- (0, import_react23.useEffect)(() => {
6532
+ (0, import_react22.useEffect)(() => {
6535
6533
  if (isOpen) {
6536
6534
  document.body.style.overflow = "hidden";
6537
6535
  } else {
@@ -6617,9 +6615,9 @@ var AlertDialog = (0, import_react23.forwardRef)(
6617
6615
  AlertDialog.displayName = "AlertDialog";
6618
6616
 
6619
6617
  // src/components/LoadingModal/loadingModal.tsx
6620
- var import_react24 = require("react");
6618
+ var import_react23 = require("react");
6621
6619
  var import_jsx_runtime38 = require("react/jsx-runtime");
6622
- var LoadingModal = (0, import_react24.forwardRef)(
6620
+ var LoadingModal = (0, import_react23.forwardRef)(
6623
6621
  ({ open, title = "Titulo...", subtitle = "Subtitulo...", ...props }, ref) => {
6624
6622
  if (!open) return null;
6625
6623
  return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
@@ -6673,10 +6671,10 @@ var loadingModal_default = LoadingModal;
6673
6671
 
6674
6672
  // src/components/NotificationCard/NotificationCard.tsx
6675
6673
  var import_phosphor_react19 = require("phosphor-react");
6676
- var import_react27 = require("react");
6674
+ var import_react26 = require("react");
6677
6675
 
6678
6676
  // src/components/Skeleton/Skeleton.tsx
6679
- var import_react25 = require("react");
6677
+ var import_react24 = require("react");
6680
6678
  var import_jsx_runtime39 = require("react/jsx-runtime");
6681
6679
  var SKELETON_ANIMATION_CLASSES = {
6682
6680
  pulse: "animate-pulse",
@@ -6694,7 +6692,7 @@ var SPACING_CLASSES = {
6694
6692
  medium: "space-y-2",
6695
6693
  large: "space-y-3"
6696
6694
  };
6697
- var Skeleton = (0, import_react25.forwardRef)(
6695
+ var Skeleton = (0, import_react24.forwardRef)(
6698
6696
  ({
6699
6697
  variant = "text",
6700
6698
  width,
@@ -6743,13 +6741,13 @@ var Skeleton = (0, import_react25.forwardRef)(
6743
6741
  );
6744
6742
  }
6745
6743
  );
6746
- var SkeletonText = (0, import_react25.forwardRef)(
6744
+ var SkeletonText = (0, import_react24.forwardRef)(
6747
6745
  (props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "text", ...props })
6748
6746
  );
6749
- var SkeletonCircle = (0, import_react25.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "circular", ...props }));
6750
- var SkeletonRectangle = (0, import_react25.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "rectangular", ...props }));
6751
- var SkeletonRounded = (0, import_react25.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "rounded", ...props }));
6752
- var SkeletonCard = (0, import_react25.forwardRef)(
6747
+ var SkeletonCircle = (0, import_react24.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "circular", ...props }));
6748
+ var SkeletonRectangle = (0, import_react24.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "rectangular", ...props }));
6749
+ var SkeletonRounded = (0, import_react24.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Skeleton, { ref, variant: "rounded", ...props }));
6750
+ var SkeletonCard = (0, import_react24.forwardRef)(
6753
6751
  ({
6754
6752
  showAvatar = true,
6755
6753
  showTitle = true,
@@ -6785,7 +6783,7 @@ var SkeletonCard = (0, import_react25.forwardRef)(
6785
6783
  );
6786
6784
  }
6787
6785
  );
6788
- var SkeletonList = (0, import_react25.forwardRef)(
6786
+ var SkeletonList = (0, import_react24.forwardRef)(
6789
6787
  ({
6790
6788
  items = 3,
6791
6789
  showAvatar = true,
@@ -6804,7 +6802,7 @@ var SkeletonList = (0, import_react25.forwardRef)(
6804
6802
  ] }, index)) });
6805
6803
  }
6806
6804
  );
6807
- var SkeletonTable = (0, import_react25.forwardRef)(
6805
+ var SkeletonTable = (0, import_react24.forwardRef)(
6808
6806
  ({ rows = 5, columns = 4, showHeader = true, className = "", ...props }, ref) => {
6809
6807
  return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("div", { ref, className: cn("w-full", className), ...props, children: [
6810
6808
  showHeader && /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("div", { className: "flex space-x-2 mb-3", children: Array.from({ length: columns }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
@@ -6828,7 +6826,7 @@ var SkeletonTable = (0, import_react25.forwardRef)(
6828
6826
  );
6829
6827
 
6830
6828
  // src/hooks/useMobile.ts
6831
- var import_react26 = require("react");
6829
+ var import_react25 = require("react");
6832
6830
  var MOBILE_WIDTH = 500;
6833
6831
  var TABLET_WIDTH = 931;
6834
6832
  var SMALL_MOBILE_WIDTH = 425;
@@ -6847,13 +6845,13 @@ var getDeviceType = () => {
6847
6845
  return width < TABLET_WIDTH ? "responsive" : "desktop";
6848
6846
  };
6849
6847
  var useMobile = () => {
6850
- const [isMobile, setIsMobile] = (0, import_react26.useState)(false);
6851
- const [isTablet, setIsTablet] = (0, import_react26.useState)(false);
6852
- const [isSmallMobile, setIsSmallMobile] = (0, import_react26.useState)(false);
6853
- const [isExtraSmallMobile, setIsExtraSmallMobile] = (0, import_react26.useState)(false);
6854
- const [isUltraSmallMobile, setIsUltraSmallMobile] = (0, import_react26.useState)(false);
6855
- const [isTinyMobile, setIsTinyMobile] = (0, import_react26.useState)(false);
6856
- (0, import_react26.useEffect)(() => {
6848
+ const [isMobile, setIsMobile] = (0, import_react25.useState)(false);
6849
+ const [isTablet, setIsTablet] = (0, import_react25.useState)(false);
6850
+ const [isSmallMobile, setIsSmallMobile] = (0, import_react25.useState)(false);
6851
+ const [isExtraSmallMobile, setIsExtraSmallMobile] = (0, import_react25.useState)(false);
6852
+ const [isUltraSmallMobile, setIsUltraSmallMobile] = (0, import_react25.useState)(false);
6853
+ const [isTinyMobile, setIsTinyMobile] = (0, import_react25.useState)(false);
6854
+ (0, import_react25.useEffect)(() => {
6857
6855
  const checkScreenSize = () => {
6858
6856
  const width = getWindowWidth();
6859
6857
  setIsMobile(width < MOBILE_WIDTH);
@@ -7286,7 +7284,7 @@ var NotificationList = ({
7286
7284
  className,
7287
7285
  emptyStateImage
7288
7286
  }) => {
7289
- const [globalNotificationModal, setGlobalNotificationModal] = (0, import_react27.useState)({ isOpen: false, notification: null });
7287
+ const [globalNotificationModal, setGlobalNotificationModal] = (0, import_react26.useState)({ isOpen: false, notification: null });
7290
7288
  const handleGlobalNotificationClick = (notification) => {
7291
7289
  if (onGlobalNotificationClick) {
7292
7290
  onGlobalNotificationClick(notification);
@@ -7400,8 +7398,8 @@ var NotificationCenter = ({
7400
7398
  className
7401
7399
  }) => {
7402
7400
  const { isMobile } = useMobile();
7403
- const [isModalOpen, setIsModalOpen] = (0, import_react27.useState)(false);
7404
- const [globalNotificationModal, setGlobalNotificationModal] = (0, import_react27.useState)({ isOpen: false, notification: null });
7401
+ const [isModalOpen, setIsModalOpen] = (0, import_react26.useState)(false);
7402
+ const [globalNotificationModal, setGlobalNotificationModal] = (0, import_react26.useState)({ isOpen: false, notification: null });
7405
7403
  const handleMobileClick = () => {
7406
7404
  setIsModalOpen(true);
7407
7405
  onFetchNotifications?.();
@@ -7416,7 +7414,7 @@ var NotificationCenter = ({
7416
7414
  onToggleActive?.();
7417
7415
  }
7418
7416
  };
7419
- (0, import_react27.useEffect)(() => {
7417
+ (0, import_react26.useEffect)(() => {
7420
7418
  if (isActive) {
7421
7419
  onFetchNotifications?.();
7422
7420
  }
@@ -7949,7 +7947,7 @@ var createUseNotificationStore = (apiClient) => {
7949
7947
  };
7950
7948
 
7951
7949
  // src/hooks/useNotifications.ts
7952
- var import_react28 = require("react");
7950
+ var import_react27 = require("react");
7953
7951
  var createUseNotifications = (apiClient) => {
7954
7952
  const useNotificationStore = createUseNotificationStore(apiClient);
7955
7953
  return () => {
@@ -7968,7 +7966,7 @@ var createUseNotifications = (apiClient) => {
7968
7966
  resetError,
7969
7967
  getGroupedNotifications
7970
7968
  } = useNotificationStore();
7971
- const handleNavigate = (0, import_react28.useCallback)(
7969
+ const handleNavigate = (0, import_react27.useCallback)(
7972
7970
  (entityType, entityId, onAfterNavigate) => {
7973
7971
  if (entityType && entityId) {
7974
7972
  switch (entityType.toUpperCase()) {
@@ -7986,7 +7984,7 @@ var createUseNotifications = (apiClient) => {
7986
7984
  },
7987
7985
  []
7988
7986
  );
7989
- const getActionLabel = (0, import_react28.useCallback)(
7987
+ const getActionLabel = (0, import_react27.useCallback)(
7990
7988
  (entityType) => {
7991
7989
  if (!entityType) return "Ver mais";
7992
7990
  switch (entityType.toUpperCase()) {
@@ -8000,7 +7998,7 @@ var createUseNotifications = (apiClient) => {
8000
7998
  },
8001
7999
  []
8002
8000
  );
8003
- const markAsReadAndNavigate = (0, import_react28.useCallback)(
8001
+ const markAsReadAndNavigate = (0, import_react27.useCallback)(
8004
8002
  async (id, entityType, entityId, onAfterNavigate) => {
8005
8003
  await markAsRead(id);
8006
8004
  if (entityType && entityId) {
@@ -8009,11 +8007,11 @@ var createUseNotifications = (apiClient) => {
8009
8007
  },
8010
8008
  [markAsRead, handleNavigate]
8011
8009
  );
8012
- const refreshNotifications = (0, import_react28.useCallback)(async () => {
8010
+ const refreshNotifications = (0, import_react27.useCallback)(async () => {
8013
8011
  resetError();
8014
8012
  await fetchNotifications();
8015
8013
  }, [resetError, fetchNotifications]);
8016
- const formatNotification = (0, import_react28.useCallback)(
8014
+ const formatNotification = (0, import_react27.useCallback)(
8017
8015
  (notification) => ({
8018
8016
  ...notification,
8019
8017
  time: formatTimeAgo(notification.createdAt),
@@ -8022,7 +8020,7 @@ var createUseNotifications = (apiClient) => {
8022
8020
  }),
8023
8021
  []
8024
8022
  );
8025
- const getFormattedGroupedNotifications = (0, import_react28.useCallback)(() => {
8023
+ const getFormattedGroupedNotifications = (0, import_react27.useCallback)(() => {
8026
8024
  const groups = getGroupedNotifications();
8027
8025
  return groups.map((group) => ({
8028
8026
  ...group,
@@ -8202,10 +8200,10 @@ var FilterModal = ({
8202
8200
  };
8203
8201
 
8204
8202
  // src/components/Filter/useTableFilter.ts
8205
- var import_react29 = require("react");
8203
+ var import_react28 = require("react");
8206
8204
  var useTableFilter = (initialConfigs, options = {}) => {
8207
8205
  const { syncWithUrl = false } = options;
8208
- const getInitialState = (0, import_react29.useCallback)(() => {
8206
+ const getInitialState = (0, import_react28.useCallback)(() => {
8209
8207
  if (!syncWithUrl || globalThis.window === void 0) {
8210
8208
  return initialConfigs;
8211
8209
  }
@@ -8223,8 +8221,8 @@ var useTableFilter = (initialConfigs, options = {}) => {
8223
8221
  }));
8224
8222
  return configsWithUrlState;
8225
8223
  }, [initialConfigs, syncWithUrl]);
8226
- const [filterConfigs, setFilterConfigs] = (0, import_react29.useState)(getInitialState);
8227
- const activeFilters = (0, import_react29.useMemo)(() => {
8224
+ const [filterConfigs, setFilterConfigs] = (0, import_react28.useState)(getInitialState);
8225
+ const activeFilters = (0, import_react28.useMemo)(() => {
8228
8226
  const filters = {};
8229
8227
  for (const config of filterConfigs) {
8230
8228
  for (const category of config.categories) {
@@ -8236,10 +8234,10 @@ var useTableFilter = (initialConfigs, options = {}) => {
8236
8234
  return filters;
8237
8235
  }, [filterConfigs]);
8238
8236
  const hasActiveFilters = Object.keys(activeFilters).length > 0;
8239
- const updateFilters = (0, import_react29.useCallback)((configs) => {
8237
+ const updateFilters = (0, import_react28.useCallback)((configs) => {
8240
8238
  setFilterConfigs(configs);
8241
8239
  }, []);
8242
- const applyFilters = (0, import_react29.useCallback)(() => {
8240
+ const applyFilters = (0, import_react28.useCallback)(() => {
8243
8241
  if (!syncWithUrl || globalThis.window === void 0) {
8244
8242
  return;
8245
8243
  }
@@ -8257,7 +8255,7 @@ var useTableFilter = (initialConfigs, options = {}) => {
8257
8255
  }
8258
8256
  globalThis.window.history.replaceState({}, "", url.toString());
8259
8257
  }, [filterConfigs, syncWithUrl]);
8260
- const clearFilters = (0, import_react29.useCallback)(() => {
8258
+ const clearFilters = (0, import_react28.useCallback)(() => {
8261
8259
  const clearedConfigs = filterConfigs.map((config) => ({
8262
8260
  ...config,
8263
8261
  categories: config.categories.map((category) => ({
@@ -8277,7 +8275,7 @@ var useTableFilter = (initialConfigs, options = {}) => {
8277
8275
  globalThis.window.history.replaceState({}, "", url.toString());
8278
8276
  }
8279
8277
  }, [filterConfigs, syncWithUrl]);
8280
- (0, import_react29.useEffect)(() => {
8278
+ (0, import_react28.useEffect)(() => {
8281
8279
  if (!syncWithUrl || globalThis.window === void 0) {
8282
8280
  return;
8283
8281
  }
@@ -8299,7 +8297,7 @@ var useTableFilter = (initialConfigs, options = {}) => {
8299
8297
 
8300
8298
  // src/components/Select/Select.tsx
8301
8299
  var import_zustand8 = require("zustand");
8302
- var import_react30 = require("react");
8300
+ var import_react29 = require("react");
8303
8301
  var import_phosphor_react21 = require("phosphor-react");
8304
8302
  var import_jsx_runtime49 = require("react/jsx-runtime");
8305
8303
  var VARIANT_CLASSES4 = {
@@ -8359,13 +8357,13 @@ function getLabelAsNode(children) {
8359
8357
  if (typeof children === "string" || typeof children === "number") {
8360
8358
  return children;
8361
8359
  }
8362
- const flattened = import_react30.Children.toArray(children);
8360
+ const flattened = import_react29.Children.toArray(children);
8363
8361
  if (flattened.length === 1) return flattened[0];
8364
8362
  return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_jsx_runtime49.Fragment, { children: flattened });
8365
8363
  }
8366
8364
  var injectStore4 = (children, store, size, selectId) => {
8367
- return import_react30.Children.map(children, (child) => {
8368
- if ((0, import_react30.isValidElement)(child)) {
8365
+ return import_react29.Children.map(children, (child) => {
8366
+ if ((0, import_react29.isValidElement)(child)) {
8369
8367
  const typedChild = child;
8370
8368
  const newProps = {
8371
8369
  store
@@ -8382,7 +8380,7 @@ var injectStore4 = (children, store, size, selectId) => {
8382
8380
  selectId
8383
8381
  );
8384
8382
  }
8385
- return (0, import_react30.cloneElement)(typedChild, newProps);
8383
+ return (0, import_react29.cloneElement)(typedChild, newProps);
8386
8384
  }
8387
8385
  return child;
8388
8386
  });
@@ -8399,18 +8397,18 @@ var Select = ({
8399
8397
  errorMessage,
8400
8398
  id
8401
8399
  }) => {
8402
- const storeRef = (0, import_react30.useRef)(null);
8400
+ const storeRef = (0, import_react29.useRef)(null);
8403
8401
  storeRef.current ??= createSelectStore(onValueChange);
8404
8402
  const store = storeRef.current;
8405
- const selectRef = (0, import_react30.useRef)(null);
8403
+ const selectRef = (0, import_react29.useRef)(null);
8406
8404
  const { open, setOpen, setValue, selectedLabel } = (0, import_zustand8.useStore)(store, (s) => s);
8407
- const generatedId = (0, import_react30.useId)();
8405
+ const generatedId = (0, import_react29.useId)();
8408
8406
  const selectId = id ?? `select-${generatedId}`;
8409
8407
  const findLabelForValue = (children2, targetValue) => {
8410
8408
  let found = null;
8411
8409
  const search = (nodes) => {
8412
- import_react30.Children.forEach(nodes, (child) => {
8413
- if (!(0, import_react30.isValidElement)(child)) return;
8410
+ import_react29.Children.forEach(nodes, (child) => {
8411
+ if (!(0, import_react29.isValidElement)(child)) return;
8414
8412
  const typedChild = child;
8415
8413
  if (typedChild.type === SelectItem && typedChild.props.value === targetValue) {
8416
8414
  if (typeof typedChild.props.children === "string")
@@ -8423,13 +8421,13 @@ var Select = ({
8423
8421
  search(children2);
8424
8422
  return found;
8425
8423
  };
8426
- (0, import_react30.useEffect)(() => {
8424
+ (0, import_react29.useEffect)(() => {
8427
8425
  if (!selectedLabel && defaultValue) {
8428
8426
  const label2 = findLabelForValue(children, defaultValue);
8429
8427
  if (label2) store.setState({ selectedLabel: label2 });
8430
8428
  }
8431
8429
  }, [children, defaultValue, selectedLabel]);
8432
- (0, import_react30.useEffect)(() => {
8430
+ (0, import_react29.useEffect)(() => {
8433
8431
  const handleClickOutside = (event) => {
8434
8432
  if (selectRef.current && !selectRef.current.contains(event.target)) {
8435
8433
  setOpen(false);
@@ -8464,7 +8462,7 @@ var Select = ({
8464
8462
  document.removeEventListener("keydown", handleArrowKeys);
8465
8463
  };
8466
8464
  }, [open]);
8467
- (0, import_react30.useEffect)(() => {
8465
+ (0, import_react29.useEffect)(() => {
8468
8466
  if (propValue) {
8469
8467
  setValue(propValue);
8470
8468
  const label2 = findLabelForValue(children, propValue);
@@ -8501,7 +8499,7 @@ var SelectValue = ({
8501
8499
  const value = (0, import_zustand8.useStore)(store, (s) => s.value);
8502
8500
  return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)("span", { className: "text-inherit flex gap-2 items-center", children: selectedLabel || placeholder || value });
8503
8501
  };
8504
- var SelectTrigger = (0, import_react30.forwardRef)(
8502
+ var SelectTrigger = (0, import_react29.forwardRef)(
8505
8503
  ({
8506
8504
  className,
8507
8505
  invalid = false,
@@ -8555,7 +8553,7 @@ var SelectTrigger = (0, import_react30.forwardRef)(
8555
8553
  }
8556
8554
  );
8557
8555
  SelectTrigger.displayName = "SelectTrigger";
8558
- var SelectContent = (0, import_react30.forwardRef)(
8556
+ var SelectContent = (0, import_react29.forwardRef)(
8559
8557
  ({
8560
8558
  children,
8561
8559
  className,
@@ -8585,7 +8583,7 @@ var SelectContent = (0, import_react30.forwardRef)(
8585
8583
  }
8586
8584
  );
8587
8585
  SelectContent.displayName = "SelectContent";
8588
- var SelectItem = (0, import_react30.forwardRef)(
8586
+ var SelectItem = (0, import_react29.forwardRef)(
8589
8587
  ({
8590
8588
  className,
8591
8589
  children,
@@ -8644,7 +8642,7 @@ var Select_default = Select;
8644
8642
 
8645
8643
  // src/components/Menu/Menu.tsx
8646
8644
  var import_zustand9 = require("zustand");
8647
- var import_react31 = require("react");
8645
+ var import_react30 = require("react");
8648
8646
  var import_phosphor_react22 = require("phosphor-react");
8649
8647
  var import_jsx_runtime50 = require("react/jsx-runtime");
8650
8648
  var createMenuStore = (onValueChange) => (0, import_zustand9.create)((set) => ({
@@ -8665,7 +8663,7 @@ var VARIANT_CLASSES5 = {
8665
8663
  "menu-overflow": "",
8666
8664
  breadcrumb: "bg-transparent shadow-none !px-0"
8667
8665
  };
8668
- var Menu = (0, import_react31.forwardRef)(
8666
+ var Menu = (0, import_react30.forwardRef)(
8669
8667
  ({
8670
8668
  className,
8671
8669
  children,
@@ -8675,11 +8673,11 @@ var Menu = (0, import_react31.forwardRef)(
8675
8673
  onValueChange,
8676
8674
  ...props
8677
8675
  }, ref) => {
8678
- const storeRef = (0, import_react31.useRef)(null);
8676
+ const storeRef = (0, import_react30.useRef)(null);
8679
8677
  storeRef.current ??= createMenuStore(onValueChange);
8680
8678
  const store = storeRef.current;
8681
8679
  const { setValue } = (0, import_zustand9.useStore)(store, (s) => s);
8682
- (0, import_react31.useEffect)(() => {
8680
+ (0, import_react30.useEffect)(() => {
8683
8681
  setValue(propValue ?? defaultValue);
8684
8682
  }, [defaultValue, propValue, setValue]);
8685
8683
  const baseClasses = variant === "menu-overflow" ? "w-fit py-2 flex flex-row items-center justify-center" : "w-full py-2 flex flex-row items-center justify-center";
@@ -8700,7 +8698,7 @@ var Menu = (0, import_react31.forwardRef)(
8700
8698
  }
8701
8699
  );
8702
8700
  Menu.displayName = "Menu";
8703
- var MenuContent = (0, import_react31.forwardRef)(
8701
+ var MenuContent = (0, import_react30.forwardRef)(
8704
8702
  ({ className, children, variant = "menu", ...props }, ref) => {
8705
8703
  const baseClasses = "w-full flex flex-row items-center gap-2";
8706
8704
  const variantClasses = variant === "menu2" || variant === "menu-overflow" ? "overflow-x-auto scroll-smooth" : "";
@@ -8722,7 +8720,7 @@ var MenuContent = (0, import_react31.forwardRef)(
8722
8720
  }
8723
8721
  );
8724
8722
  MenuContent.displayName = "MenuContent";
8725
- var MenuItem = (0, import_react31.forwardRef)(
8723
+ var MenuItem = (0, import_react30.forwardRef)(
8726
8724
  ({
8727
8725
  className,
8728
8726
  children,
@@ -8880,10 +8878,10 @@ var MenuOverflow = ({
8880
8878
  onValueChange,
8881
8879
  ...props
8882
8880
  }) => {
8883
- const containerRef = (0, import_react31.useRef)(null);
8884
- const [showLeftArrow, setShowLeftArrow] = (0, import_react31.useState)(false);
8885
- const [showRightArrow, setShowRightArrow] = (0, import_react31.useState)(false);
8886
- (0, import_react31.useEffect)(() => {
8881
+ const containerRef = (0, import_react30.useRef)(null);
8882
+ const [showLeftArrow, setShowLeftArrow] = (0, import_react30.useState)(false);
8883
+ const [showRightArrow, setShowRightArrow] = (0, import_react30.useState)(false);
8884
+ (0, import_react30.useEffect)(() => {
8887
8885
  const checkScroll = () => internalCheckScroll(
8888
8886
  containerRef.current,
8889
8887
  setShowLeftArrow,
@@ -8943,11 +8941,11 @@ var MenuOverflow = ({
8943
8941
  }
8944
8942
  );
8945
8943
  };
8946
- var injectStore5 = (children, store) => import_react31.Children.map(children, (child) => {
8947
- if (!(0, import_react31.isValidElement)(child)) return child;
8944
+ var injectStore5 = (children, store) => import_react30.Children.map(children, (child) => {
8945
+ if (!(0, import_react30.isValidElement)(child)) return child;
8948
8946
  const typedChild = child;
8949
8947
  const shouldInject = typedChild.type === MenuItem;
8950
- return (0, import_react31.cloneElement)(typedChild, {
8948
+ return (0, import_react30.cloneElement)(typedChild, {
8951
8949
  ...shouldInject ? { store } : {},
8952
8950
  ...typedChild.props.children ? { children: injectStore5(typedChild.props.children, store) } : {}
8953
8951
  });
@@ -8955,11 +8953,11 @@ var injectStore5 = (children, store) => import_react31.Children.map(children, (c
8955
8953
  var Menu_default = Menu;
8956
8954
 
8957
8955
  // src/components/Card/Card.tsx
8958
- var import_react33 = require("react");
8956
+ var import_react32 = require("react");
8959
8957
  var import_phosphor_react23 = require("phosphor-react");
8960
8958
 
8961
8959
  // src/components/IconRender/IconRender.tsx
8962
- var import_react32 = require("react");
8960
+ var import_react31 = require("react");
8963
8961
  var PhosphorIcons = __toESM(require("phosphor-react"));
8964
8962
  var import_jsx_runtime51 = require("react/jsx-runtime");
8965
8963
  var IconRender = ({
@@ -8982,7 +8980,7 @@ var IconRender = ({
8982
8980
  }
8983
8981
  }
8984
8982
  } else {
8985
- return (0, import_react32.cloneElement)(iconName, {
8983
+ return (0, import_react31.cloneElement)(iconName, {
8986
8984
  size,
8987
8985
  color: "currentColor"
8988
8986
  });
@@ -9017,7 +9015,7 @@ var CARD_CURSOR_CLASSES = {
9017
9015
  default: "",
9018
9016
  pointer: "cursor-pointer"
9019
9017
  };
9020
- var CardBase = (0, import_react33.forwardRef)(
9018
+ var CardBase = (0, import_react32.forwardRef)(
9021
9019
  ({
9022
9020
  children,
9023
9021
  variant = "default",
@@ -9075,7 +9073,7 @@ var ACTION_HEADER_CLASSES = {
9075
9073
  error: "text-error-300",
9076
9074
  info: "text-info-300"
9077
9075
  };
9078
- var CardActivitiesResults = (0, import_react33.forwardRef)(
9076
+ var CardActivitiesResults = (0, import_react32.forwardRef)(
9079
9077
  ({
9080
9078
  icon,
9081
9079
  title,
@@ -9157,7 +9155,7 @@ var CardActivitiesResults = (0, import_react33.forwardRef)(
9157
9155
  );
9158
9156
  }
9159
9157
  );
9160
- var CardQuestions = (0, import_react33.forwardRef)(
9158
+ var CardQuestions = (0, import_react32.forwardRef)(
9161
9159
  ({
9162
9160
  header,
9163
9161
  state = "undone",
@@ -9205,7 +9203,7 @@ var CardQuestions = (0, import_react33.forwardRef)(
9205
9203
  );
9206
9204
  }
9207
9205
  );
9208
- var CardProgress = (0, import_react33.forwardRef)(
9206
+ var CardProgress = (0, import_react32.forwardRef)(
9209
9207
  ({
9210
9208
  header,
9211
9209
  subhead,
@@ -9303,7 +9301,7 @@ var CardProgress = (0, import_react33.forwardRef)(
9303
9301
  );
9304
9302
  }
9305
9303
  );
9306
- var CardTopic = (0, import_react33.forwardRef)(
9304
+ var CardTopic = (0, import_react32.forwardRef)(
9307
9305
  ({
9308
9306
  header,
9309
9307
  subHead,
@@ -9324,7 +9322,7 @@ var CardTopic = (0, import_react33.forwardRef)(
9324
9322
  className: cn("justify-center gap-2 py-2 px-4", className),
9325
9323
  ...props,
9326
9324
  children: [
9327
- subHead && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react33.Fragment, { children: [
9325
+ subHead && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "text-text-600 text-2xs flex flex-row gap-1", children: subHead.map((text, index) => /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react32.Fragment, { children: [
9328
9326
  /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: text }),
9329
9327
  index < subHead.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("p", { children: "\u2022" })
9330
9328
  ] }, `${text} - ${index}`)) }),
@@ -9359,7 +9357,7 @@ var CardTopic = (0, import_react33.forwardRef)(
9359
9357
  );
9360
9358
  }
9361
9359
  );
9362
- var CardPerformance = (0, import_react33.forwardRef)(
9360
+ var CardPerformance = (0, import_react32.forwardRef)(
9363
9361
  ({
9364
9362
  header,
9365
9363
  progress,
@@ -9422,7 +9420,7 @@ var CardPerformance = (0, import_react33.forwardRef)(
9422
9420
  );
9423
9421
  }
9424
9422
  );
9425
- var CardResults = (0, import_react33.forwardRef)(
9423
+ var CardResults = (0, import_react32.forwardRef)(
9426
9424
  ({
9427
9425
  header,
9428
9426
  correct_answers,
@@ -9504,7 +9502,7 @@ var CardResults = (0, import_react33.forwardRef)(
9504
9502
  );
9505
9503
  }
9506
9504
  );
9507
- var CardStatus = (0, import_react33.forwardRef)(
9505
+ var CardStatus = (0, import_react32.forwardRef)(
9508
9506
  ({ header, className, status, label, ...props }, ref) => {
9509
9507
  const getLabelBadge = (status2) => {
9510
9508
  switch (status2) {
@@ -9574,7 +9572,7 @@ var CardStatus = (0, import_react33.forwardRef)(
9574
9572
  );
9575
9573
  }
9576
9574
  );
9577
- var CardSettings = (0, import_react33.forwardRef)(
9575
+ var CardSettings = (0, import_react32.forwardRef)(
9578
9576
  ({ header, className, icon, ...props }, ref) => {
9579
9577
  return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
9580
9578
  CardBase,
@@ -9597,7 +9595,7 @@ var CardSettings = (0, import_react33.forwardRef)(
9597
9595
  );
9598
9596
  }
9599
9597
  );
9600
- var CardSupport = (0, import_react33.forwardRef)(
9598
+ var CardSupport = (0, import_react32.forwardRef)(
9601
9599
  ({ header, className, direction = "col", children, ...props }, ref) => {
9602
9600
  return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
9603
9601
  CardBase,
@@ -9631,7 +9629,7 @@ var CardSupport = (0, import_react33.forwardRef)(
9631
9629
  );
9632
9630
  }
9633
9631
  );
9634
- var CardForum = (0, import_react33.forwardRef)(
9632
+ var CardForum = (0, import_react32.forwardRef)(
9635
9633
  ({
9636
9634
  title,
9637
9635
  content,
@@ -9698,7 +9696,7 @@ var CardForum = (0, import_react33.forwardRef)(
9698
9696
  );
9699
9697
  }
9700
9698
  );
9701
- var CardAudio = (0, import_react33.forwardRef)(
9699
+ var CardAudio = (0, import_react32.forwardRef)(
9702
9700
  ({
9703
9701
  src,
9704
9702
  title,
@@ -9712,16 +9710,16 @@ var CardAudio = (0, import_react33.forwardRef)(
9712
9710
  className,
9713
9711
  ...props
9714
9712
  }, ref) => {
9715
- const [isPlaying, setIsPlaying] = (0, import_react33.useState)(false);
9716
- const [currentTime, setCurrentTime] = (0, import_react33.useState)(0);
9717
- const [duration, setDuration] = (0, import_react33.useState)(0);
9718
- const [volume, setVolume] = (0, import_react33.useState)(1);
9719
- const [showVolumeControl, setShowVolumeControl] = (0, import_react33.useState)(false);
9720
- const [showSpeedMenu, setShowSpeedMenu] = (0, import_react33.useState)(false);
9721
- const [playbackRate, setPlaybackRate] = (0, import_react33.useState)(1);
9722
- const audioRef = (0, import_react33.useRef)(null);
9723
- const volumeControlRef = (0, import_react33.useRef)(null);
9724
- const speedMenuRef = (0, import_react33.useRef)(null);
9713
+ const [isPlaying, setIsPlaying] = (0, import_react32.useState)(false);
9714
+ const [currentTime, setCurrentTime] = (0, import_react32.useState)(0);
9715
+ const [duration, setDuration] = (0, import_react32.useState)(0);
9716
+ const [volume, setVolume] = (0, import_react32.useState)(1);
9717
+ const [showVolumeControl, setShowVolumeControl] = (0, import_react32.useState)(false);
9718
+ const [showSpeedMenu, setShowSpeedMenu] = (0, import_react32.useState)(false);
9719
+ const [playbackRate, setPlaybackRate] = (0, import_react32.useState)(1);
9720
+ const audioRef = (0, import_react32.useRef)(null);
9721
+ const volumeControlRef = (0, import_react32.useRef)(null);
9722
+ const speedMenuRef = (0, import_react32.useRef)(null);
9725
9723
  const formatTime2 = (time) => {
9726
9724
  const minutes = Math.floor(time / 60);
9727
9725
  const seconds = Math.floor(time % 60);
@@ -9795,7 +9793,7 @@ var CardAudio = (0, import_react33.forwardRef)(
9795
9793
  }
9796
9794
  return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_phosphor_react23.SpeakerHigh, { size: 24 });
9797
9795
  };
9798
- (0, import_react33.useEffect)(() => {
9796
+ (0, import_react32.useEffect)(() => {
9799
9797
  const handleClickOutside = (event) => {
9800
9798
  if (volumeControlRef.current && !volumeControlRef.current.contains(event.target)) {
9801
9799
  setShowVolumeControl(false);
@@ -9999,7 +9997,7 @@ var SIMULADO_BACKGROUND_CLASSES = {
9999
9997
  simuladao: "bg-exam-3",
10000
9998
  vestibular: "bg-exam-4"
10001
9999
  };
10002
- var CardSimulado = (0, import_react33.forwardRef)(
10000
+ var CardSimulado = (0, import_react32.forwardRef)(
10003
10001
  ({ title, duration, info, backgroundColor, className, ...props }, ref) => {
10004
10002
  const backgroundClass = SIMULADO_BACKGROUND_CLASSES[backgroundColor];
10005
10003
  return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
@@ -10039,7 +10037,7 @@ var CardSimulado = (0, import_react33.forwardRef)(
10039
10037
  );
10040
10038
  }
10041
10039
  );
10042
- var CardTest = (0, import_react33.forwardRef)(
10040
+ var CardTest = (0, import_react32.forwardRef)(
10043
10041
  ({
10044
10042
  title,
10045
10043
  duration,
@@ -10182,7 +10180,7 @@ var SIMULATION_TYPE_STYLES = {
10182
10180
  text: "Vestibular"
10183
10181
  }
10184
10182
  };
10185
- var CardSimulationHistory = (0, import_react33.forwardRef)(({ data, onSimulationClick, className, ...props }, ref) => {
10183
+ var CardSimulationHistory = (0, import_react32.forwardRef)(({ data, onSimulationClick, className, ...props }, ref) => {
10186
10184
  return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
10187
10185
  "div",
10188
10186
  {
@@ -10519,12 +10517,12 @@ var NotFound = ({
10519
10517
  var NotFound_default = NotFound;
10520
10518
 
10521
10519
  // src/components/VideoPlayer/VideoPlayer.tsx
10522
- var import_react35 = require("react");
10520
+ var import_react34 = require("react");
10523
10521
  var import_react_dom = require("react-dom");
10524
10522
  var import_phosphor_react26 = require("phosphor-react");
10525
10523
 
10526
10524
  // src/components/DownloadButton/DownloadButton.tsx
10527
- var import_react34 = require("react");
10525
+ var import_react33 = require("react");
10528
10526
  var import_phosphor_react25 = require("phosphor-react");
10529
10527
  var import_jsx_runtime55 = require("react/jsx-runtime");
10530
10528
  var getMimeType = (url) => {
@@ -10601,13 +10599,13 @@ var DownloadButton = ({
10601
10599
  lessonTitle = "aula",
10602
10600
  disabled = false
10603
10601
  }) => {
10604
- const [isDownloading, setIsDownloading] = (0, import_react34.useState)(false);
10605
- const isValidUrl = (0, import_react34.useCallback)((url) => {
10602
+ const [isDownloading, setIsDownloading] = (0, import_react33.useState)(false);
10603
+ const isValidUrl = (0, import_react33.useCallback)((url) => {
10606
10604
  return Boolean(
10607
10605
  url && url.trim() !== "" && url !== "undefined" && url !== "null"
10608
10606
  );
10609
10607
  }, []);
10610
- const getAvailableContent = (0, import_react34.useCallback)(() => {
10608
+ const getAvailableContent = (0, import_react33.useCallback)(() => {
10611
10609
  const downloads = [];
10612
10610
  if (isValidUrl(content.urlDoc)) {
10613
10611
  downloads.push({
@@ -10642,7 +10640,7 @@ var DownloadButton = ({
10642
10640
  }
10643
10641
  return downloads;
10644
10642
  }, [content, isValidUrl]);
10645
- const handleDownload = (0, import_react34.useCallback)(async () => {
10643
+ const handleDownload = (0, import_react33.useCallback)(async () => {
10646
10644
  if (disabled || isDownloading) return;
10647
10645
  const availableContent = getAvailableContent();
10648
10646
  if (availableContent.length === 0) {
@@ -10780,9 +10778,9 @@ var SpeedMenu = ({
10780
10778
  iconSize = 24,
10781
10779
  isTinyMobile = false
10782
10780
  }) => {
10783
- const buttonRef = (0, import_react35.useRef)(null);
10784
- const speedMenuContainerRef = (0, import_react35.useRef)(null);
10785
- const speedMenuRef = (0, import_react35.useRef)(null);
10781
+ const buttonRef = (0, import_react34.useRef)(null);
10782
+ const speedMenuContainerRef = (0, import_react34.useRef)(null);
10783
+ const speedMenuRef = (0, import_react34.useRef)(null);
10786
10784
  const getMenuPosition = () => {
10787
10785
  if (!buttonRef.current) return { top: 0, left: 0 };
10788
10786
  const rect = buttonRef.current.getBoundingClientRect();
@@ -10796,7 +10794,7 @@ var SpeedMenu = ({
10796
10794
  };
10797
10795
  };
10798
10796
  const position = getMenuPosition();
10799
- (0, import_react35.useEffect)(() => {
10797
+ (0, import_react34.useEffect)(() => {
10800
10798
  const handleClickOutside = (event) => {
10801
10799
  const target = event.target;
10802
10800
  const isOutsideContainer = speedMenuContainerRef.current && !speedMenuContainerRef.current.contains(target);
@@ -10875,28 +10873,28 @@ var VideoPlayer = ({
10875
10873
  onDownloadComplete,
10876
10874
  onDownloadError
10877
10875
  }) => {
10878
- const videoRef = (0, import_react35.useRef)(null);
10876
+ const videoRef = (0, import_react34.useRef)(null);
10879
10877
  const { isUltraSmallMobile, isTinyMobile } = useMobile();
10880
- const [isPlaying, setIsPlaying] = (0, import_react35.useState)(false);
10881
- const [currentTime, setCurrentTime] = (0, import_react35.useState)(0);
10882
- const [duration, setDuration] = (0, import_react35.useState)(0);
10883
- const [isMuted, setIsMuted] = (0, import_react35.useState)(false);
10884
- const [volume, setVolume] = (0, import_react35.useState)(1);
10885
- const [isFullscreen, setIsFullscreen] = (0, import_react35.useState)(false);
10886
- const [showControls, setShowControls] = (0, import_react35.useState)(true);
10887
- const [hasCompleted, setHasCompleted] = (0, import_react35.useState)(false);
10888
- const [showCaptions, setShowCaptions] = (0, import_react35.useState)(false);
10889
- const [subtitlesValidation, setSubtitlesValidation] = (0, import_react35.useState)("idle");
10890
- (0, import_react35.useEffect)(() => {
10878
+ const [isPlaying, setIsPlaying] = (0, import_react34.useState)(false);
10879
+ const [currentTime, setCurrentTime] = (0, import_react34.useState)(0);
10880
+ const [duration, setDuration] = (0, import_react34.useState)(0);
10881
+ const [isMuted, setIsMuted] = (0, import_react34.useState)(false);
10882
+ const [volume, setVolume] = (0, import_react34.useState)(1);
10883
+ const [isFullscreen, setIsFullscreen] = (0, import_react34.useState)(false);
10884
+ const [showControls, setShowControls] = (0, import_react34.useState)(true);
10885
+ const [hasCompleted, setHasCompleted] = (0, import_react34.useState)(false);
10886
+ const [showCaptions, setShowCaptions] = (0, import_react34.useState)(false);
10887
+ const [subtitlesValidation, setSubtitlesValidation] = (0, import_react34.useState)("idle");
10888
+ (0, import_react34.useEffect)(() => {
10891
10889
  setHasCompleted(false);
10892
10890
  }, [src]);
10893
- const [playbackRate, setPlaybackRate] = (0, import_react35.useState)(1);
10894
- const [showSpeedMenu, setShowSpeedMenu] = (0, import_react35.useState)(false);
10895
- const lastSaveTimeRef = (0, import_react35.useRef)(0);
10896
- const trackRef = (0, import_react35.useRef)(null);
10897
- const controlsTimeoutRef = (0, import_react35.useRef)(null);
10898
- const lastMousePositionRef = (0, import_react35.useRef)({ x: 0, y: 0 });
10899
- const isUserInteracting = (0, import_react35.useCallback)(() => {
10891
+ const [playbackRate, setPlaybackRate] = (0, import_react34.useState)(1);
10892
+ const [showSpeedMenu, setShowSpeedMenu] = (0, import_react34.useState)(false);
10893
+ const lastSaveTimeRef = (0, import_react34.useRef)(0);
10894
+ const trackRef = (0, import_react34.useRef)(null);
10895
+ const controlsTimeoutRef = (0, import_react34.useRef)(null);
10896
+ const lastMousePositionRef = (0, import_react34.useRef)({ x: 0, y: 0 });
10897
+ const isUserInteracting = (0, import_react34.useCallback)(() => {
10900
10898
  if (showSpeedMenu) {
10901
10899
  return true;
10902
10900
  }
@@ -10913,13 +10911,13 @@ var VideoPlayer = ({
10913
10911
  }
10914
10912
  return false;
10915
10913
  }, [showSpeedMenu]);
10916
- const clearControlsTimeout = (0, import_react35.useCallback)(() => {
10914
+ const clearControlsTimeout = (0, import_react34.useCallback)(() => {
10917
10915
  if (controlsTimeoutRef.current) {
10918
10916
  clearTimeout(controlsTimeoutRef.current);
10919
10917
  controlsTimeoutRef.current = null;
10920
10918
  }
10921
10919
  }, []);
10922
- const showControlsWithTimer = (0, import_react35.useCallback)(() => {
10920
+ const showControlsWithTimer = (0, import_react34.useCallback)(() => {
10923
10921
  setShowControls(true);
10924
10922
  clearControlsTimeout();
10925
10923
  if (isFullscreen) {
@@ -10934,7 +10932,7 @@ var VideoPlayer = ({
10934
10932
  }, CONTROLS_HIDE_TIMEOUT);
10935
10933
  }
10936
10934
  }, [isFullscreen, isPlaying, clearControlsTimeout]);
10937
- const handleMouseMove = (0, import_react35.useCallback)(
10935
+ const handleMouseMove = (0, import_react34.useCallback)(
10938
10936
  (event) => {
10939
10937
  const currentX = event.clientX;
10940
10938
  const currentY = event.clientY;
@@ -10947,10 +10945,10 @@ var VideoPlayer = ({
10947
10945
  },
10948
10946
  [showControlsWithTimer]
10949
10947
  );
10950
- const handleMouseEnter = (0, import_react35.useCallback)(() => {
10948
+ const handleMouseEnter = (0, import_react34.useCallback)(() => {
10951
10949
  showControlsWithTimer();
10952
10950
  }, [showControlsWithTimer]);
10953
- const handleMouseLeave = (0, import_react35.useCallback)(() => {
10951
+ const handleMouseLeave = (0, import_react34.useCallback)(() => {
10954
10952
  const userInteracting = isUserInteracting();
10955
10953
  clearControlsTimeout();
10956
10954
  if (!isFullscreen && !userInteracting) {
@@ -10959,13 +10957,13 @@ var VideoPlayer = ({
10959
10957
  }, LEAVE_HIDE_TIMEOUT);
10960
10958
  }
10961
10959
  }, [isFullscreen, clearControlsTimeout, isUserInteracting]);
10962
- (0, import_react35.useEffect)(() => {
10960
+ (0, import_react34.useEffect)(() => {
10963
10961
  if (videoRef.current) {
10964
10962
  videoRef.current.volume = volume;
10965
10963
  videoRef.current.muted = isMuted;
10966
10964
  }
10967
10965
  }, [volume, isMuted]);
10968
- (0, import_react35.useEffect)(() => {
10966
+ (0, import_react34.useEffect)(() => {
10969
10967
  const video = videoRef.current;
10970
10968
  if (!video) return;
10971
10969
  const onPlay = () => setIsPlaying(true);
@@ -10980,13 +10978,13 @@ var VideoPlayer = ({
10980
10978
  video.removeEventListener("ended", onEnded);
10981
10979
  };
10982
10980
  }, []);
10983
- (0, import_react35.useEffect)(() => {
10981
+ (0, import_react34.useEffect)(() => {
10984
10982
  const video = videoRef.current;
10985
10983
  if (!video) return;
10986
10984
  video.setAttribute("playsinline", "");
10987
10985
  video.setAttribute("webkit-playsinline", "");
10988
10986
  }, []);
10989
- (0, import_react35.useEffect)(() => {
10987
+ (0, import_react34.useEffect)(() => {
10990
10988
  if (isPlaying) {
10991
10989
  showControlsWithTimer();
10992
10990
  } else {
@@ -10998,7 +10996,7 @@ var VideoPlayer = ({
10998
10996
  }
10999
10997
  }
11000
10998
  }, [isPlaying, isFullscreen, showControlsWithTimer, clearControlsTimeout]);
11001
- (0, import_react35.useEffect)(() => {
10999
+ (0, import_react34.useEffect)(() => {
11002
11000
  const video = videoRef.current;
11003
11001
  if (!video) return;
11004
11002
  const handleFullscreenChange = () => {
@@ -11033,7 +11031,7 @@ var VideoPlayer = ({
11033
11031
  );
11034
11032
  };
11035
11033
  }, [showControlsWithTimer]);
11036
- (0, import_react35.useEffect)(() => {
11034
+ (0, import_react34.useEffect)(() => {
11037
11035
  const init = () => {
11038
11036
  if (!isFullscreen) {
11039
11037
  showControlsWithTimer();
@@ -11055,7 +11053,7 @@ var VideoPlayer = ({
11055
11053
  };
11056
11054
  }
11057
11055
  }, []);
11058
- const getInitialTime = (0, import_react35.useCallback)(() => {
11056
+ const getInitialTime = (0, import_react34.useCallback)(() => {
11059
11057
  if (!autoSave || !storageKey) {
11060
11058
  return Number.isFinite(initialTime) && initialTime >= 0 ? initialTime : void 0;
11061
11059
  }
@@ -11068,14 +11066,14 @@ var VideoPlayer = ({
11068
11066
  if (hasValidSaved) return saved;
11069
11067
  return void 0;
11070
11068
  }, [autoSave, storageKey, src, initialTime]);
11071
- (0, import_react35.useEffect)(() => {
11069
+ (0, import_react34.useEffect)(() => {
11072
11070
  const start = getInitialTime();
11073
11071
  if (start !== void 0 && videoRef.current) {
11074
11072
  videoRef.current.currentTime = start;
11075
11073
  setCurrentTime(start);
11076
11074
  }
11077
11075
  }, [getInitialTime]);
11078
- const saveProgress = (0, import_react35.useCallback)(
11076
+ const saveProgress = (0, import_react34.useCallback)(
11079
11077
  (time) => {
11080
11078
  if (!autoSave || !storageKey) return;
11081
11079
  const now = Date.now();
@@ -11086,7 +11084,7 @@ var VideoPlayer = ({
11086
11084
  },
11087
11085
  [autoSave, storageKey, src]
11088
11086
  );
11089
- const togglePlayPause = (0, import_react35.useCallback)(async () => {
11087
+ const togglePlayPause = (0, import_react34.useCallback)(async () => {
11090
11088
  const video = videoRef.current;
11091
11089
  if (!video) return;
11092
11090
  if (!video.paused) {
@@ -11098,7 +11096,7 @@ var VideoPlayer = ({
11098
11096
  } catch {
11099
11097
  }
11100
11098
  }, []);
11101
- const handleVolumeChange = (0, import_react35.useCallback)(
11099
+ const handleVolumeChange = (0, import_react34.useCallback)(
11102
11100
  (newVolume) => {
11103
11101
  const video = videoRef.current;
11104
11102
  if (!video) return;
@@ -11117,7 +11115,7 @@ var VideoPlayer = ({
11117
11115
  },
11118
11116
  [isMuted]
11119
11117
  );
11120
- const toggleMute = (0, import_react35.useCallback)(() => {
11118
+ const toggleMute = (0, import_react34.useCallback)(() => {
11121
11119
  const video = videoRef.current;
11122
11120
  if (!video) return;
11123
11121
  if (isMuted) {
@@ -11131,20 +11129,20 @@ var VideoPlayer = ({
11131
11129
  setIsMuted(true);
11132
11130
  }
11133
11131
  }, [isMuted, volume]);
11134
- const handleSeek = (0, import_react35.useCallback)((newTime) => {
11132
+ const handleSeek = (0, import_react34.useCallback)((newTime) => {
11135
11133
  const video = videoRef.current;
11136
11134
  if (video) {
11137
11135
  video.currentTime = newTime;
11138
11136
  }
11139
11137
  }, []);
11140
- const isSafariIOS = (0, import_react35.useCallback)(() => {
11138
+ const isSafariIOS = (0, import_react34.useCallback)(() => {
11141
11139
  const ua = navigator.userAgent;
11142
11140
  const isIOS = /iPad|iPhone|iPod/.test(ua);
11143
11141
  const isWebKit = /WebKit/.test(ua);
11144
11142
  const isNotChrome = !/CriOS|Chrome/.test(ua);
11145
11143
  return isIOS && isWebKit && isNotChrome;
11146
11144
  }, []);
11147
- const toggleFullscreen = (0, import_react35.useCallback)(() => {
11145
+ const toggleFullscreen = (0, import_react34.useCallback)(() => {
11148
11146
  const video = videoRef.current;
11149
11147
  const container = video?.parentElement;
11150
11148
  if (!video || !container) return;
@@ -11161,24 +11159,24 @@ var VideoPlayer = ({
11161
11159
  document.exitFullscreen();
11162
11160
  }
11163
11161
  }, [isFullscreen, isSafariIOS]);
11164
- const handleSpeedChange = (0, import_react35.useCallback)((speed) => {
11162
+ const handleSpeedChange = (0, import_react34.useCallback)((speed) => {
11165
11163
  if (videoRef.current) {
11166
11164
  videoRef.current.playbackRate = speed;
11167
11165
  setPlaybackRate(speed);
11168
11166
  setShowSpeedMenu(false);
11169
11167
  }
11170
11168
  }, []);
11171
- const toggleSpeedMenu = (0, import_react35.useCallback)(() => {
11169
+ const toggleSpeedMenu = (0, import_react34.useCallback)(() => {
11172
11170
  setShowSpeedMenu(!showSpeedMenu);
11173
11171
  }, [showSpeedMenu]);
11174
- const toggleCaptions = (0, import_react35.useCallback)(() => {
11172
+ const toggleCaptions = (0, import_react34.useCallback)(() => {
11175
11173
  if (!trackRef.current?.track || !subtitles || subtitlesValidation !== "valid")
11176
11174
  return;
11177
11175
  const newShowCaptions = !showCaptions;
11178
11176
  setShowCaptions(newShowCaptions);
11179
11177
  trackRef.current.track.mode = newShowCaptions ? "showing" : "hidden";
11180
11178
  }, [showCaptions, subtitles, subtitlesValidation]);
11181
- const checkVideoCompletion = (0, import_react35.useCallback)(
11179
+ const checkVideoCompletion = (0, import_react34.useCallback)(
11182
11180
  (progressPercent) => {
11183
11181
  if (progressPercent >= 95 && !hasCompleted) {
11184
11182
  setHasCompleted(true);
@@ -11187,7 +11185,7 @@ var VideoPlayer = ({
11187
11185
  },
11188
11186
  [hasCompleted, onVideoComplete]
11189
11187
  );
11190
- const handleTimeUpdate = (0, import_react35.useCallback)(() => {
11188
+ const handleTimeUpdate = (0, import_react34.useCallback)(() => {
11191
11189
  const video = videoRef.current;
11192
11190
  if (!video) return;
11193
11191
  const current = video.currentTime;
@@ -11200,12 +11198,12 @@ var VideoPlayer = ({
11200
11198
  checkVideoCompletion(progressPercent);
11201
11199
  }
11202
11200
  }, [duration, saveProgress, onTimeUpdate, onProgress, checkVideoCompletion]);
11203
- const handleLoadedMetadata = (0, import_react35.useCallback)(() => {
11201
+ const handleLoadedMetadata = (0, import_react34.useCallback)(() => {
11204
11202
  if (videoRef.current) {
11205
11203
  setDuration(videoRef.current.duration);
11206
11204
  }
11207
11205
  }, []);
11208
- (0, import_react35.useEffect)(() => {
11206
+ (0, import_react34.useEffect)(() => {
11209
11207
  const controller = new AbortController();
11210
11208
  const validateSubtitles = async () => {
11211
11209
  if (!subtitles) {
@@ -11252,12 +11250,12 @@ var VideoPlayer = ({
11252
11250
  controller.abort();
11253
11251
  };
11254
11252
  }, [subtitles]);
11255
- (0, import_react35.useEffect)(() => {
11253
+ (0, import_react34.useEffect)(() => {
11256
11254
  if (trackRef.current?.track) {
11257
11255
  trackRef.current.track.mode = showCaptions && subtitles && subtitlesValidation === "valid" ? "showing" : "hidden";
11258
11256
  }
11259
11257
  }, [subtitles, showCaptions, subtitlesValidation]);
11260
- (0, import_react35.useEffect)(() => {
11258
+ (0, import_react34.useEffect)(() => {
11261
11259
  const handleVisibilityChange = () => {
11262
11260
  if (document.hidden && isPlaying && videoRef.current) {
11263
11261
  videoRef.current.pause();
@@ -11279,54 +11277,54 @@ var VideoPlayer = ({
11279
11277
  };
11280
11278
  }, [isPlaying, clearControlsTimeout]);
11281
11279
  const progressPercentage = duration > 0 ? currentTime / duration * 100 : 0;
11282
- const getIconSize2 = (0, import_react35.useCallback)(() => {
11280
+ const getIconSize2 = (0, import_react34.useCallback)(() => {
11283
11281
  if (isTinyMobile) return 18;
11284
11282
  if (isUltraSmallMobile) return 20;
11285
11283
  return 24;
11286
11284
  }, [isTinyMobile, isUltraSmallMobile]);
11287
- const getControlsPadding = (0, import_react35.useCallback)(() => {
11285
+ const getControlsPadding = (0, import_react34.useCallback)(() => {
11288
11286
  if (isTinyMobile) return "px-2 pb-2 pt-1";
11289
11287
  if (isUltraSmallMobile) return "px-3 pb-3 pt-1";
11290
11288
  return "px-4 pb-4";
11291
11289
  }, [isTinyMobile, isUltraSmallMobile]);
11292
- const getControlsGap = (0, import_react35.useCallback)(() => {
11290
+ const getControlsGap = (0, import_react34.useCallback)(() => {
11293
11291
  if (isTinyMobile) return "gap-1";
11294
11292
  if (isUltraSmallMobile) return "gap-2";
11295
11293
  return "gap-4";
11296
11294
  }, [isTinyMobile, isUltraSmallMobile]);
11297
- const getProgressBarPadding = (0, import_react35.useCallback)(() => {
11295
+ const getProgressBarPadding = (0, import_react34.useCallback)(() => {
11298
11296
  if (isTinyMobile) return "px-2 pb-1";
11299
11297
  if (isUltraSmallMobile) return "px-3 pb-1";
11300
11298
  return "px-4 pb-2";
11301
11299
  }, [isTinyMobile, isUltraSmallMobile]);
11302
- const getCenterPlayButtonPosition = (0, import_react35.useCallback)(() => {
11300
+ const getCenterPlayButtonPosition = (0, import_react34.useCallback)(() => {
11303
11301
  if (isTinyMobile) return "items-center justify-center -translate-y-12";
11304
11302
  if (isUltraSmallMobile) return "items-center justify-center -translate-y-8";
11305
11303
  return "items-center justify-center";
11306
11304
  }, [isTinyMobile, isUltraSmallMobile]);
11307
- const getTopControlsOpacity = (0, import_react35.useCallback)(() => {
11305
+ const getTopControlsOpacity = (0, import_react34.useCallback)(() => {
11308
11306
  return showControls ? "opacity-100" : "opacity-0";
11309
11307
  }, [showControls]);
11310
- const getBottomControlsOpacity = (0, import_react35.useCallback)(() => {
11308
+ const getBottomControlsOpacity = (0, import_react34.useCallback)(() => {
11311
11309
  return showControls ? "opacity-100" : "opacity-0";
11312
11310
  }, [showControls]);
11313
- const seekBackward = (0, import_react35.useCallback)(() => {
11311
+ const seekBackward = (0, import_react34.useCallback)(() => {
11314
11312
  if (videoRef.current) {
11315
11313
  videoRef.current.currentTime -= 10;
11316
11314
  }
11317
11315
  }, []);
11318
- const seekForward = (0, import_react35.useCallback)(() => {
11316
+ const seekForward = (0, import_react34.useCallback)(() => {
11319
11317
  if (videoRef.current) {
11320
11318
  videoRef.current.currentTime += 10;
11321
11319
  }
11322
11320
  }, []);
11323
- const increaseVolume = (0, import_react35.useCallback)(() => {
11321
+ const increaseVolume = (0, import_react34.useCallback)(() => {
11324
11322
  handleVolumeChange(Math.min(100, volume * 100 + 10));
11325
11323
  }, [handleVolumeChange, volume]);
11326
- const decreaseVolume = (0, import_react35.useCallback)(() => {
11324
+ const decreaseVolume = (0, import_react34.useCallback)(() => {
11327
11325
  handleVolumeChange(Math.max(0, volume * 100 - 10));
11328
11326
  }, [handleVolumeChange, volume]);
11329
- const handleVideoKeyDown = (0, import_react35.useCallback)(
11327
+ const handleVideoKeyDown = (0, import_react34.useCallback)(
11330
11328
  (e) => {
11331
11329
  if (!e.key) return;
11332
11330
  e.stopPropagation();
@@ -11569,7 +11567,7 @@ var VideoPlayer = ({
11569
11567
  var VideoPlayer_default = VideoPlayer;
11570
11568
 
11571
11569
  // src/components/Whiteboard/Whiteboard.tsx
11572
- var import_react36 = require("react");
11570
+ var import_react35 = require("react");
11573
11571
  var import_phosphor_react27 = require("phosphor-react");
11574
11572
  var import_jsx_runtime57 = require("react/jsx-runtime");
11575
11573
  var IMAGE_WIDTH = 225;
@@ -11582,8 +11580,8 @@ var Whiteboard = ({
11582
11580
  imagesPerRow = 2,
11583
11581
  ...rest
11584
11582
  }) => {
11585
- const [imageErrors, setImageErrors] = (0, import_react36.useState)(/* @__PURE__ */ new Set());
11586
- const handleDownload = (0, import_react36.useCallback)(
11583
+ const [imageErrors, setImageErrors] = (0, import_react35.useState)(/* @__PURE__ */ new Set());
11584
+ const handleDownload = (0, import_react35.useCallback)(
11587
11585
  (image) => {
11588
11586
  if (onDownload) {
11589
11587
  onDownload(image);
@@ -11600,7 +11598,7 @@ var Whiteboard = ({
11600
11598
  },
11601
11599
  [onDownload]
11602
11600
  );
11603
- const handleImageError = (0, import_react36.useCallback)((imageId) => {
11601
+ const handleImageError = (0, import_react35.useCallback)((imageId) => {
11604
11602
  setImageErrors((prev) => new Set(prev).add(imageId));
11605
11603
  }, []);
11606
11604
  const gridColsClass = images?.length === 1 ? "grid-cols-1" : {
@@ -11687,10 +11685,10 @@ var Whiteboard = ({
11687
11685
  var Whiteboard_default = Whiteboard;
11688
11686
 
11689
11687
  // src/components/Auth/Auth.tsx
11690
- var import_react37 = require("react");
11688
+ var import_react36 = require("react");
11691
11689
  var import_react_router_dom = require("react-router-dom");
11692
11690
  var import_jsx_runtime58 = require("react/jsx-runtime");
11693
- var AuthContext = (0, import_react37.createContext)(void 0);
11691
+ var AuthContext = (0, import_react36.createContext)(void 0);
11694
11692
  var AuthProvider = ({
11695
11693
  children,
11696
11694
  checkAuthFn,
@@ -11700,12 +11698,12 @@ var AuthProvider = ({
11700
11698
  getSessionFn,
11701
11699
  getTokensFn
11702
11700
  }) => {
11703
- const [authState, setAuthState] = (0, import_react37.useState)({
11701
+ const [authState, setAuthState] = (0, import_react36.useState)({
11704
11702
  isAuthenticated: false,
11705
11703
  isLoading: true,
11706
11704
  ...initialAuthState
11707
11705
  });
11708
- const checkAuth = (0, import_react37.useCallback)(async () => {
11706
+ const checkAuth = (0, import_react36.useCallback)(async () => {
11709
11707
  try {
11710
11708
  setAuthState((prev) => ({ ...prev, isLoading: true }));
11711
11709
  if (!checkAuthFn) {
@@ -11736,7 +11734,7 @@ var AuthProvider = ({
11736
11734
  return false;
11737
11735
  }
11738
11736
  }, [checkAuthFn, getUserFn, getSessionFn, getTokensFn]);
11739
- const signOut = (0, import_react37.useCallback)(() => {
11737
+ const signOut = (0, import_react36.useCallback)(() => {
11740
11738
  if (signOutFn) {
11741
11739
  signOutFn();
11742
11740
  }
@@ -11748,10 +11746,10 @@ var AuthProvider = ({
11748
11746
  tokens: void 0
11749
11747
  }));
11750
11748
  }, [signOutFn]);
11751
- (0, import_react37.useEffect)(() => {
11749
+ (0, import_react36.useEffect)(() => {
11752
11750
  checkAuth();
11753
11751
  }, [checkAuth]);
11754
- const contextValue = (0, import_react37.useMemo)(
11752
+ const contextValue = (0, import_react36.useMemo)(
11755
11753
  () => ({
11756
11754
  ...authState,
11757
11755
  checkAuth,
@@ -11762,7 +11760,7 @@ var AuthProvider = ({
11762
11760
  return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(AuthContext.Provider, { value: contextValue, children });
11763
11761
  };
11764
11762
  var useAuth = () => {
11765
- const context = (0, import_react37.useContext)(AuthContext);
11763
+ const context = (0, import_react36.useContext)(AuthContext);
11766
11764
  if (context === void 0) {
11767
11765
  throw new Error("useAuth deve ser usado dentro de um AuthProvider");
11768
11766
  }
@@ -11860,10 +11858,10 @@ var getRootDomain = () => {
11860
11858
  };
11861
11859
 
11862
11860
  // src/components/Accordation/Accordation.tsx
11863
- var import_react38 = require("react");
11861
+ var import_react37 = require("react");
11864
11862
  var import_phosphor_react28 = require("phosphor-react");
11865
11863
  var import_jsx_runtime59 = require("react/jsx-runtime");
11866
- var CardAccordation = (0, import_react38.forwardRef)(
11864
+ var CardAccordation = (0, import_react37.forwardRef)(
11867
11865
  ({
11868
11866
  trigger,
11869
11867
  children,
@@ -11875,13 +11873,13 @@ var CardAccordation = (0, import_react38.forwardRef)(
11875
11873
  disabled = false,
11876
11874
  ...props
11877
11875
  }, ref) => {
11878
- const [internalExpanded, setInternalExpanded] = (0, import_react38.useState)(defaultExpanded);
11879
- const generatedId = (0, import_react38.useId)();
11876
+ const [internalExpanded, setInternalExpanded] = (0, import_react37.useState)(defaultExpanded);
11877
+ const generatedId = (0, import_react37.useId)();
11880
11878
  const contentId = value ? `accordion-content-${value}` : generatedId;
11881
11879
  const headerId = value ? `accordion-header-${value}` : `${generatedId}-header`;
11882
11880
  const isControlled = controlledExpanded !== void 0;
11883
11881
  const isExpanded = isControlled ? controlledExpanded : internalExpanded;
11884
- (0, import_react38.useEffect)(() => {
11882
+ (0, import_react37.useEffect)(() => {
11885
11883
  if (isControlled) {
11886
11884
  setInternalExpanded(controlledExpanded);
11887
11885
  }
@@ -11967,7 +11965,7 @@ var CardAccordation = (0, import_react38.forwardRef)(
11967
11965
  CardAccordation.displayName = "CardAccordation";
11968
11966
 
11969
11967
  // src/components/Accordation/AccordionGroup.tsx
11970
- var import_react39 = require("react");
11968
+ var import_react38 = require("react");
11971
11969
  var import_zustand10 = require("zustand");
11972
11970
  var import_jsx_runtime60 = require("react/jsx-runtime");
11973
11971
  function createAccordionGroupStore(type, initialValue, collapsible) {
@@ -11987,8 +11985,8 @@ function createAccordionGroupStore(type, initialValue, collapsible) {
11987
11985
  }));
11988
11986
  }
11989
11987
  var injectStore6 = (children, store, indexRef, onItemToggle) => {
11990
- return import_react39.Children.map(children, (child) => {
11991
- if (!(0, import_react39.isValidElement)(child)) {
11988
+ return import_react38.Children.map(children, (child) => {
11989
+ if (!(0, import_react38.isValidElement)(child)) {
11992
11990
  return child;
11993
11991
  }
11994
11992
  const typedChild = child;
@@ -12015,16 +12013,16 @@ var injectStore6 = (children, store, indexRef, onItemToggle) => {
12015
12013
  if (displayName === "CardAccordation") {
12016
12014
  newProps.children = processedChildren;
12017
12015
  } else if (processedChildren !== typedChild.props.children) {
12018
- return (0, import_react39.cloneElement)(typedChild, { children: processedChildren });
12016
+ return (0, import_react38.cloneElement)(typedChild, { children: processedChildren });
12019
12017
  }
12020
12018
  }
12021
12019
  if (Object.keys(newProps).length > 0) {
12022
- return (0, import_react39.cloneElement)(typedChild, newProps);
12020
+ return (0, import_react38.cloneElement)(typedChild, newProps);
12023
12021
  }
12024
12022
  return child;
12025
12023
  });
12026
12024
  };
12027
- var AccordionGroup = (0, import_react39.forwardRef)(
12025
+ var AccordionGroup = (0, import_react38.forwardRef)(
12028
12026
  ({
12029
12027
  type = "single",
12030
12028
  defaultValue,
@@ -12035,12 +12033,12 @@ var AccordionGroup = (0, import_react39.forwardRef)(
12035
12033
  className,
12036
12034
  ...props
12037
12035
  }, ref) => {
12038
- const [internalValue, setInternalValue] = (0, import_react39.useState)(
12036
+ const [internalValue, setInternalValue] = (0, import_react38.useState)(
12039
12037
  defaultValue || (type === "single" ? "" : [])
12040
12038
  );
12041
12039
  const isControlled = controlledValue !== void 0;
12042
12040
  const currentValue = isControlled ? controlledValue : internalValue;
12043
- const storeRef = (0, import_react39.useRef)(null);
12041
+ const storeRef = (0, import_react38.useRef)(null);
12044
12042
  if (storeRef.current) {
12045
12043
  storeRef.current.setState((prev) => {
12046
12044
  const nextState = {};
@@ -12060,10 +12058,10 @@ var AccordionGroup = (0, import_react39.forwardRef)(
12060
12058
  );
12061
12059
  }
12062
12060
  const store = storeRef.current;
12063
- (0, import_react39.useEffect)(() => {
12061
+ (0, import_react38.useEffect)(() => {
12064
12062
  store.setState({ value: currentValue });
12065
12063
  }, [currentValue, store]);
12066
- (0, import_react39.useEffect)(() => {
12064
+ (0, import_react38.useEffect)(() => {
12067
12065
  if (!isControlled) {
12068
12066
  setInternalValue((prev) => {
12069
12067
  if (type === "single") {
@@ -12116,7 +12114,7 @@ AccordionGroup.displayName = "AccordionGroup";
12116
12114
 
12117
12115
  // src/components/Alternative/Alternative.tsx
12118
12116
  var import_phosphor_react29 = require("phosphor-react");
12119
- var import_react40 = require("react");
12117
+ var import_react39 = require("react");
12120
12118
  var import_jsx_runtime61 = require("react/jsx-runtime");
12121
12119
  var AlternativesList = ({
12122
12120
  alternatives,
@@ -12130,9 +12128,9 @@ var AlternativesList = ({
12130
12128
  mode = "interactive",
12131
12129
  selectedValue
12132
12130
  }) => {
12133
- const uniqueId = (0, import_react40.useId)();
12131
+ const uniqueId = (0, import_react39.useId)();
12134
12132
  const groupName = name || `alternatives-${uniqueId}`;
12135
- const [actualValue, setActualValue] = (0, import_react40.useState)(value);
12133
+ const [actualValue, setActualValue] = (0, import_react39.useState)(value);
12136
12134
  const isReadonly = mode === "readonly";
12137
12135
  const getStatusStyles2 = (status, isReadonly2) => {
12138
12136
  const hoverClass = isReadonly2 ? "" : "hover:bg-background-50";
@@ -12351,7 +12349,7 @@ var AlternativesList = ({
12351
12349
  }
12352
12350
  );
12353
12351
  };
12354
- var HeaderAlternative = (0, import_react40.forwardRef)(
12352
+ var HeaderAlternative = (0, import_react39.forwardRef)(
12355
12353
  ({ className, title, subTitle, content, ...props }, ref) => {
12356
12354
  return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
12357
12355
  "div",
@@ -12417,7 +12415,7 @@ function createZustandAuthAdapter(useAuthStore2) {
12417
12415
  }
12418
12416
 
12419
12417
  // src/components/Auth/useUrlAuthentication.ts
12420
- var import_react41 = require("react");
12418
+ var import_react40 = require("react");
12421
12419
  var import_react_router_dom2 = require("react-router-dom");
12422
12420
  var getAuthParams = (location, extractParams) => {
12423
12421
  const searchParams = new URLSearchParams(location.search);
@@ -12465,8 +12463,8 @@ var handleUserData = (responseData, setUser) => {
12465
12463
  };
12466
12464
  function useUrlAuthentication(options) {
12467
12465
  const location = (0, import_react_router_dom2.useLocation)();
12468
- const processedRef = (0, import_react41.useRef)(false);
12469
- (0, import_react41.useEffect)(() => {
12466
+ const processedRef = (0, import_react40.useRef)(false);
12467
+ (0, import_react40.useEffect)(() => {
12470
12468
  const handleAuthentication = async () => {
12471
12469
  if (processedRef.current) {
12472
12470
  return;
@@ -12537,9 +12535,9 @@ function useUrlAuthentication(options) {
12537
12535
  }
12538
12536
 
12539
12537
  // src/components/Auth/useApiConfig.ts
12540
- var import_react42 = require("react");
12538
+ var import_react41 = require("react");
12541
12539
  function useApiConfig(api) {
12542
- return (0, import_react42.useMemo)(
12540
+ return (0, import_react41.useMemo)(
12543
12541
  () => ({
12544
12542
  get: (endpoint, config) => api.get(endpoint, config)
12545
12543
  }),
@@ -12549,7 +12547,7 @@ function useApiConfig(api) {
12549
12547
 
12550
12548
  // src/components/Quiz/Quiz.tsx
12551
12549
  var import_phosphor_react32 = require("phosphor-react");
12552
- var import_react45 = require("react");
12550
+ var import_react44 = require("react");
12553
12551
 
12554
12552
  // src/components/Quiz/useQuizStore.ts
12555
12553
  var import_zustand11 = require("zustand");
@@ -13159,10 +13157,10 @@ var useQuizStore = (0, import_zustand11.create)()(
13159
13157
  );
13160
13158
 
13161
13159
  // src/components/Quiz/QuizContent.tsx
13162
- var import_react44 = require("react");
13160
+ var import_react43 = require("react");
13163
13161
 
13164
13162
  // src/components/MultipleChoice/MultipleChoice.tsx
13165
- var import_react43 = require("react");
13163
+ var import_react42 = require("react");
13166
13164
  var import_phosphor_react30 = require("phosphor-react");
13167
13165
  var import_jsx_runtime62 = require("react/jsx-runtime");
13168
13166
  var MultipleChoiceList = ({
@@ -13174,8 +13172,8 @@ var MultipleChoiceList = ({
13174
13172
  onHandleSelectedValues,
13175
13173
  mode = "interactive"
13176
13174
  }) => {
13177
- const [actualValue, setActualValue] = (0, import_react43.useState)(selectedValues);
13178
- (0, import_react43.useEffect)(() => {
13175
+ const [actualValue, setActualValue] = (0, import_react42.useState)(selectedValues);
13176
+ (0, import_react42.useEffect)(() => {
13179
13177
  setActualValue(selectedValues);
13180
13178
  }, [selectedValues]);
13181
13179
  const getStatusBadge2 = (status) => {
@@ -13320,12 +13318,12 @@ var getStatusStyles = (variantCorrect) => {
13320
13318
  return "bg-error-background border-error-300";
13321
13319
  }
13322
13320
  };
13323
- var QuizSubTitle = (0, import_react44.forwardRef)(
13321
+ var QuizSubTitle = (0, import_react43.forwardRef)(
13324
13322
  ({ subTitle, ...props }, ref) => {
13325
13323
  return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("div", { className: "px-4 pb-2 pt-6", ...props, ref, children: /* @__PURE__ */ (0, import_jsx_runtime63.jsx)("p", { className: "font-bold text-lg text-text-950", children: subTitle }) });
13326
13324
  }
13327
13325
  );
13328
- var QuizContainer = (0, import_react44.forwardRef)(({ children, className, ...props }, ref) => {
13326
+ var QuizContainer = (0, import_react43.forwardRef)(({ children, className, ...props }, ref) => {
13329
13327
  return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
13330
13328
  "div",
13331
13329
  {
@@ -13414,15 +13412,15 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
13414
13412
  const currentQuestionResult = getQuestionResultByQuestionId(
13415
13413
  currentQuestion?.id || ""
13416
13414
  );
13417
- const prevSelectedValuesRef = (0, import_react44.useRef)([]);
13418
- const prevQuestionIdRef = (0, import_react44.useRef)("");
13419
- const allCurrentAnswerIds = (0, import_react44.useMemo)(() => {
13415
+ const prevSelectedValuesRef = (0, import_react43.useRef)([]);
13416
+ const prevQuestionIdRef = (0, import_react43.useRef)("");
13417
+ const allCurrentAnswerIds = (0, import_react43.useMemo)(() => {
13420
13418
  return allCurrentAnswers?.map((answer) => answer.optionId) || [];
13421
13419
  }, [allCurrentAnswers]);
13422
- const selectedValues = (0, import_react44.useMemo)(() => {
13420
+ const selectedValues = (0, import_react43.useMemo)(() => {
13423
13421
  return allCurrentAnswerIds?.filter((id) => id !== null) || [];
13424
13422
  }, [allCurrentAnswerIds]);
13425
- const stableSelectedValues = (0, import_react44.useMemo)(() => {
13423
+ const stableSelectedValues = (0, import_react43.useMemo)(() => {
13426
13424
  const currentQuestionId = currentQuestion?.id || "";
13427
13425
  const hasQuestionChanged = prevQuestionIdRef.current !== currentQuestionId;
13428
13426
  if (hasQuestionChanged) {
@@ -13446,7 +13444,7 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
13446
13444
  variant,
13447
13445
  currentQuestionResult?.selectedOptions
13448
13446
  ]);
13449
- const handleSelectedValues = (0, import_react44.useCallback)(
13447
+ const handleSelectedValues = (0, import_react43.useCallback)(
13450
13448
  (values) => {
13451
13449
  if (currentQuestion) {
13452
13450
  selectMultipleAnswer(currentQuestion.id, values);
@@ -13454,7 +13452,7 @@ var QuizMultipleChoice = ({ paddingBottom }) => {
13454
13452
  },
13455
13453
  [currentQuestion, selectMultipleAnswer]
13456
13454
  );
13457
- const questionKey = (0, import_react44.useMemo)(
13455
+ const questionKey = (0, import_react43.useMemo)(
13458
13456
  () => `question-${currentQuestion?.id || "1"}`,
13459
13457
  [currentQuestion?.id]
13460
13458
  );
@@ -13515,14 +13513,14 @@ var QuizDissertative = ({ paddingBottom }) => {
13515
13513
  currentQuestion?.id || ""
13516
13514
  );
13517
13515
  const currentAnswer = getCurrentAnswer();
13518
- const textareaRef = (0, import_react44.useRef)(null);
13516
+ const textareaRef = (0, import_react43.useRef)(null);
13519
13517
  const charLimit = getDissertativeCharLimit();
13520
13518
  const handleAnswerChange = (value) => {
13521
13519
  if (currentQuestion) {
13522
13520
  selectDissertativeAnswer(currentQuestion.id, value);
13523
13521
  }
13524
13522
  };
13525
- const adjustTextareaHeight = (0, import_react44.useCallback)(() => {
13523
+ const adjustTextareaHeight = (0, import_react43.useCallback)(() => {
13526
13524
  if (textareaRef.current) {
13527
13525
  textareaRef.current.style.height = "auto";
13528
13526
  const scrollHeight = textareaRef.current.scrollHeight;
@@ -13532,7 +13530,7 @@ var QuizDissertative = ({ paddingBottom }) => {
13532
13530
  textareaRef.current.style.height = `${newHeight}px`;
13533
13531
  }
13534
13532
  }, []);
13535
- (0, import_react44.useEffect)(() => {
13533
+ (0, import_react43.useEffect)(() => {
13536
13534
  adjustTextareaHeight();
13537
13535
  }, [currentAnswer, adjustTextareaHeight]);
13538
13536
  if (!currentQuestion) {
@@ -13673,7 +13671,7 @@ var QuizConnectDots = ({ paddingBottom }) => {
13673
13671
  isCorrect: false
13674
13672
  }
13675
13673
  ];
13676
- const [userAnswers, setUserAnswers] = (0, import_react44.useState)(() => {
13674
+ const [userAnswers, setUserAnswers] = (0, import_react43.useState)(() => {
13677
13675
  if (variant === "result") {
13678
13676
  return mockUserAnswers;
13679
13677
  }
@@ -13792,8 +13790,8 @@ var QuizFill = ({ paddingBottom }) => {
13792
13790
  isCorrect: true
13793
13791
  }
13794
13792
  ];
13795
- const [answers, setAnswers] = (0, import_react44.useState)({});
13796
- const baseId = (0, import_react44.useId)();
13793
+ const [answers, setAnswers] = (0, import_react43.useState)({});
13794
+ const baseId = (0, import_react43.useId)();
13797
13795
  const getAvailableOptionsForSelect = (selectId) => {
13798
13796
  const usedOptions = new Set(
13799
13797
  Object.entries(answers).filter(([key]) => key !== selectId).map(([, value]) => value)
@@ -13932,7 +13930,7 @@ var QuizImageQuestion = ({ paddingBottom }) => {
13932
13930
  };
13933
13931
  const correctRadiusRelative = calculateCorrectRadiusRelative();
13934
13932
  const mockUserAnswerRelative = { x: 0.72, y: 0.348 };
13935
- const [clickPositionRelative, setClickPositionRelative] = (0, import_react44.useState)(variant == "result" ? mockUserAnswerRelative : null);
13933
+ const [clickPositionRelative, setClickPositionRelative] = (0, import_react43.useState)(variant == "result" ? mockUserAnswerRelative : null);
13936
13934
  const convertToRelativeCoordinates = (x, y, rect) => {
13937
13935
  const safeWidth = Math.max(rect.width, 1e-3);
13938
13936
  const safeHeight = Math.max(rect.height, 1e-3);
@@ -14098,14 +14096,14 @@ var getFinishConfirmationText = (type) => {
14098
14096
  const config = getQuizTypeConfig(type);
14099
14097
  return `Tem certeza que deseja finalizar ${config.article} ${config.label.toLowerCase()}?`;
14100
14098
  };
14101
- var Quiz = (0, import_react45.forwardRef)(({ children, className, variant = "default", ...props }, ref) => {
14099
+ var Quiz = (0, import_react44.forwardRef)(({ children, className, variant = "default", ...props }, ref) => {
14102
14100
  const { setVariant } = useQuizStore();
14103
- (0, import_react45.useEffect)(() => {
14101
+ (0, import_react44.useEffect)(() => {
14104
14102
  setVariant(variant);
14105
14103
  }, [variant, setVariant]);
14106
14104
  return /* @__PURE__ */ (0, import_jsx_runtime64.jsx)("div", { ref, className: cn("flex flex-col", className), ...props, children });
14107
14105
  });
14108
- var QuizTitle = (0, import_react45.forwardRef)(({ className, onBack, ...props }, ref) => {
14106
+ var QuizTitle = (0, import_react44.forwardRef)(({ className, onBack, ...props }, ref) => {
14109
14107
  const {
14110
14108
  quiz,
14111
14109
  currentQuestionIndex,
@@ -14115,7 +14113,7 @@ var QuizTitle = (0, import_react45.forwardRef)(({ className, onBack, ...props },
14115
14113
  formatTime: formatTime2,
14116
14114
  isStarted
14117
14115
  } = useQuizStore();
14118
- const [showExitConfirmation, setShowExitConfirmation] = (0, import_react45.useState)(false);
14116
+ const [showExitConfirmation, setShowExitConfirmation] = (0, import_react44.useState)(false);
14119
14117
  const totalQuestions = getTotalQuestions();
14120
14118
  const quizTitle = getQuizTitle();
14121
14119
  const handleBackClick = () => {
@@ -14284,7 +14282,7 @@ var QuizQuestionList = ({
14284
14282
  )
14285
14283
  ] });
14286
14284
  };
14287
- var QuizFooter = (0, import_react45.forwardRef)(
14285
+ var QuizFooter = (0, import_react44.forwardRef)(
14288
14286
  ({
14289
14287
  className,
14290
14288
  onGoToSimulated,
@@ -14318,8 +14316,8 @@ var QuizFooter = (0, import_react45.forwardRef)(
14318
14316
  const currentAnswer = getCurrentAnswer();
14319
14317
  const currentQuestion = getCurrentQuestion();
14320
14318
  const isCurrentQuestionSkipped = currentQuestion ? getQuestionStatusFromUserAnswers(currentQuestion.id) === "skipped" : false;
14321
- const [activeModal, setActiveModal] = (0, import_react45.useState)(null);
14322
- const [filterType, setFilterType] = (0, import_react45.useState)("all");
14319
+ const [activeModal, setActiveModal] = (0, import_react44.useState)(null);
14320
+ const [filterType, setFilterType] = (0, import_react44.useState)("all");
14323
14321
  const openModal = (modalName) => setActiveModal(modalName);
14324
14322
  const closeModal = () => setActiveModal(null);
14325
14323
  const isModalOpen = (modalName) => activeModal === modalName;
@@ -14661,7 +14659,7 @@ var QuizFooter = (0, import_react45.forwardRef)(
14661
14659
  );
14662
14660
 
14663
14661
  // src/components/Quiz/QuizResult.tsx
14664
- var import_react46 = require("react");
14662
+ var import_react45 = require("react");
14665
14663
  var import_phosphor_react33 = require("phosphor-react");
14666
14664
  var import_jsx_runtime65 = require("react/jsx-runtime");
14667
14665
  var QuizBadge = ({
@@ -14683,15 +14681,15 @@ var QuizBadge = ({
14683
14681
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Badge_default, { variant: "solid", action: "info", "data-testid": "quiz-badge", children: subtype });
14684
14682
  }
14685
14683
  };
14686
- var QuizHeaderResult = (0, import_react46.forwardRef)(
14684
+ var QuizHeaderResult = (0, import_react45.forwardRef)(
14687
14685
  ({ className, ...props }, ref) => {
14688
14686
  const {
14689
14687
  getQuestionResultByQuestionId,
14690
14688
  getCurrentQuestion,
14691
14689
  questionsResult
14692
14690
  } = useQuizStore();
14693
- const [status, setStatus] = (0, import_react46.useState)(void 0);
14694
- (0, import_react46.useEffect)(() => {
14691
+ const [status, setStatus] = (0, import_react45.useState)(void 0);
14692
+ (0, import_react45.useEffect)(() => {
14695
14693
  const cq = getCurrentQuestion();
14696
14694
  if (!cq) {
14697
14695
  setStatus(void 0);
@@ -14755,7 +14753,7 @@ var QuizHeaderResult = (0, import_react46.forwardRef)(
14755
14753
  );
14756
14754
  }
14757
14755
  );
14758
- var QuizResultHeaderTitle = (0, import_react46.forwardRef)(({ className, showBadge = true, onRepeat, canRetry, ...props }, ref) => {
14756
+ var QuizResultHeaderTitle = (0, import_react45.forwardRef)(({ className, showBadge = true, onRepeat, canRetry, ...props }, ref) => {
14759
14757
  const { quiz } = useQuizStore();
14760
14758
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(
14761
14759
  "div",
@@ -14785,7 +14783,7 @@ var QuizResultHeaderTitle = (0, import_react46.forwardRef)(({ className, showBad
14785
14783
  }
14786
14784
  );
14787
14785
  });
14788
- var QuizResultTitle = (0, import_react46.forwardRef)(({ className, ...props }, ref) => {
14786
+ var QuizResultTitle = (0, import_react45.forwardRef)(({ className, ...props }, ref) => {
14789
14787
  const { getQuizTitle } = useQuizStore();
14790
14788
  const quizTitle = getQuizTitle();
14791
14789
  return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
@@ -14829,7 +14827,7 @@ var calculateAnswerStatistics = (answers) => {
14829
14827
  }
14830
14828
  return stats;
14831
14829
  };
14832
- var QuizResultPerformance = (0, import_react46.forwardRef)(({ showDetails = true, ...props }, ref) => {
14830
+ var QuizResultPerformance = (0, import_react45.forwardRef)(({ showDetails = true, ...props }, ref) => {
14833
14831
  const {
14834
14832
  getTotalQuestions,
14835
14833
  formatTime: formatTime2,
@@ -14934,7 +14932,7 @@ var QuizResultPerformance = (0, import_react46.forwardRef)(({ showDetails = true
14934
14932
  }
14935
14933
  );
14936
14934
  });
14937
- var QuizListResult = (0, import_react46.forwardRef)(({ className, onSubjectClick, ...props }, ref) => {
14935
+ var QuizListResult = (0, import_react45.forwardRef)(({ className, onSubjectClick, ...props }, ref) => {
14938
14936
  const { getQuestionsGroupedBySubject } = useQuizStore();
14939
14937
  const { isDark } = useTheme();
14940
14938
  const groupedQuestions = getQuestionsGroupedBySubject();
@@ -15064,7 +15062,7 @@ var BreadcrumbMenu = ({
15064
15062
  };
15065
15063
 
15066
15064
  // src/components/BreadcrumbMenu/useBreadcrumbBuilder.ts
15067
- var import_react47 = require("react");
15065
+ var import_react46 = require("react");
15068
15066
 
15069
15067
  // src/components/BreadcrumbMenu/breadcrumbStore.ts
15070
15068
  var import_zustand12 = require("zustand");
@@ -15193,7 +15191,7 @@ var useBreadcrumbBuilder = (config) => {
15193
15191
  (level) => isBreadcrumbWithData(level) ? level.data : null
15194
15192
  );
15195
15193
  const levelUrlIds = levels.map((level) => level.urlId);
15196
- (0, import_react47.useEffect)(() => {
15194
+ (0, import_react46.useEffect)(() => {
15197
15195
  const newBreadcrumbs = [root];
15198
15196
  const previousIds = [];
15199
15197
  for (const level of levels) {
@@ -15225,11 +15223,11 @@ var useBreadcrumbBuilder = (config) => {
15225
15223
  };
15226
15224
 
15227
15225
  // src/components/BreadcrumbMenu/useUrlParams.ts
15228
- var import_react48 = require("react");
15226
+ var import_react47 = require("react");
15229
15227
  var import_react_router_dom4 = require("react-router-dom");
15230
15228
  var useUrlParams = (config) => {
15231
15229
  const location = (0, import_react_router_dom4.useLocation)();
15232
- return (0, import_react48.useMemo)(() => {
15230
+ return (0, import_react47.useMemo)(() => {
15233
15231
  const segments = location.pathname.split("/").filter(Boolean);
15234
15232
  const params = {};
15235
15233
  for (const [key, index] of Object.entries(config)) {
@@ -15240,15 +15238,15 @@ var useUrlParams = (config) => {
15240
15238
  };
15241
15239
 
15242
15240
  // src/hooks/useAppInitialization.ts
15243
- var import_react50 = require("react");
15241
+ var import_react49 = require("react");
15244
15242
 
15245
15243
  // src/hooks/useInstitution.ts
15246
- var import_react49 = require("react");
15244
+ var import_react48 = require("react");
15247
15245
  function useInstitutionId() {
15248
- const [institutionId, setInstitutionId] = (0, import_react49.useState)(() => {
15246
+ const [institutionId, setInstitutionId] = (0, import_react48.useState)(() => {
15249
15247
  return document.querySelector('meta[name="institution-id"]')?.getAttribute("content") ?? null;
15250
15248
  });
15251
- (0, import_react49.useEffect)(() => {
15249
+ (0, import_react48.useEffect)(() => {
15252
15250
  const metaTag = document.querySelector('meta[name="institution-id"]');
15253
15251
  if (!metaTag) return;
15254
15252
  const observer = new MutationObserver(() => {
@@ -15415,7 +15413,7 @@ var useAuthStore = (0, import_zustand14.create)()(
15415
15413
  function useAppInitialization() {
15416
15414
  const getInstitutionId = useInstitutionId();
15417
15415
  const { initialize, initialized, institutionId } = useAppStore();
15418
- const authFunctions = (0, import_react50.useMemo)(
15416
+ const authFunctions = (0, import_react49.useMemo)(
15419
15417
  () => ({
15420
15418
  checkAuth: async () => {
15421
15419
  const { sessionInfo, tokens } = useAuthStore.getState();
@@ -15452,7 +15450,7 @@ function useAppInitialization() {
15452
15450
  }
15453
15451
 
15454
15452
  // src/hooks/useAppContent.ts
15455
- var import_react51 = require("react");
15453
+ var import_react50 = require("react");
15456
15454
  var import_react_router_dom5 = require("react-router-dom");
15457
15455
  function useAppContent(config) {
15458
15456
  const navigate = (0, import_react_router_dom5.useNavigate)();
@@ -15478,20 +15476,20 @@ function useAppContent(config) {
15478
15476
  navigate("/painel");
15479
15477
  }
15480
15478
  };
15481
- const handleSetSelectedProfile = (0, import_react51.useCallback)(
15479
+ const handleSetSelectedProfile = (0, import_react50.useCallback)(
15482
15480
  (profile) => {
15483
15481
  setSelectedProfile(profile);
15484
15482
  },
15485
15483
  [setSelectedProfile]
15486
15484
  );
15487
- const handleClearParamsFromURL = (0, import_react51.useCallback)(() => {
15485
+ const handleClearParamsFromURL = (0, import_react50.useCallback)(() => {
15488
15486
  if (onClearParamsFromURL) {
15489
15487
  onClearParamsFromURL();
15490
15488
  } else {
15491
15489
  globalThis.location.replace("/painel");
15492
15490
  }
15493
15491
  }, [onClearParamsFromURL]);
15494
- const handleError = (0, import_react51.useCallback)(
15492
+ const handleError = (0, import_react50.useCallback)(
15495
15493
  (error) => {
15496
15494
  if (onError) {
15497
15495
  onError(error);
@@ -15502,7 +15500,7 @@ function useAppContent(config) {
15502
15500
  },
15503
15501
  [navigate, onError]
15504
15502
  );
15505
- const urlAuthConfig = (0, import_react51.useMemo)(
15503
+ const urlAuthConfig = (0, import_react50.useMemo)(
15506
15504
  () => ({
15507
15505
  setTokens,
15508
15506
  setSessionInfo,
@@ -15528,10 +15526,10 @@ function useAppContent(config) {
15528
15526
  );
15529
15527
  useUrlAuthentication(urlAuthConfig);
15530
15528
  const { sessionInfo } = useAuth();
15531
- const institutionIdToUse = (0, import_react51.useMemo)(() => {
15529
+ const institutionIdToUse = (0, import_react50.useMemo)(() => {
15532
15530
  return sessionInfo?.institutionId || getInstitutionId;
15533
15531
  }, [sessionInfo?.institutionId, getInstitutionId]);
15534
- (0, import_react51.useEffect)(() => {
15532
+ (0, import_react50.useEffect)(() => {
15535
15533
  if (institutionIdToUse && !initialized) {
15536
15534
  initialize(institutionIdToUse);
15537
15535
  }
@@ -15685,6 +15683,7 @@ function useAppContent(config) {
15685
15683
  getSubjectInfo,
15686
15684
  getSubjectName,
15687
15685
  syncDropdownState,
15686
+ useAlertFormStore,
15688
15687
  useApiConfig,
15689
15688
  useAppContent,
15690
15689
  useAppInitialization,