@carlonicora/nextjs-jsonapi 1.116.0 → 1.117.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/{BlockNoteEditor-R6U4PCQ7.js → BlockNoteEditor-6UREFUSJ.js} +9 -9
  2. package/dist/{BlockNoteEditor-R6U4PCQ7.js.map → BlockNoteEditor-6UREFUSJ.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-RFRK3STN.mjs → BlockNoteEditor-UQOOX3UT.mjs} +2 -2
  4. package/dist/billing/index.js +299 -299
  5. package/dist/billing/index.mjs +1 -1
  6. package/dist/{chunk-SPRFCAQI.js → chunk-HXU2HDRN.js} +406 -272
  7. package/dist/chunk-HXU2HDRN.js.map +1 -0
  8. package/dist/{chunk-RKUUGCYB.mjs → chunk-SVEPL5J2.mjs} +512 -378
  9. package/dist/chunk-SVEPL5J2.mjs.map +1 -0
  10. package/dist/client/index.js +2 -2
  11. package/dist/client/index.mjs +1 -1
  12. package/dist/components/index.d.mts +68 -21
  13. package/dist/components/index.d.ts +68 -21
  14. package/dist/components/index.js +4 -2
  15. package/dist/components/index.js.map +1 -1
  16. package/dist/components/index.mjs +3 -1
  17. package/dist/contexts/index.js +2 -2
  18. package/dist/contexts/index.mjs +1 -1
  19. package/dist/features/help/index.js +30 -30
  20. package/dist/features/help/index.mjs +1 -1
  21. package/package.json +1 -1
  22. package/src/components/forms/CommonDeleter.tsx +49 -18
  23. package/src/components/forms/CommonEditorButtons.tsx +4 -2
  24. package/src/components/forms/CommonEditorHeader.tsx +20 -14
  25. package/src/components/forms/CommonEditorTrigger.tsx +18 -4
  26. package/src/components/forms/DateRangeSelector.tsx +55 -19
  27. package/src/components/forms/EditorSheet.tsx +36 -9
  28. package/src/components/forms/FileUploader.tsx +51 -21
  29. package/src/components/forms/FormDate.tsx +6 -2
  30. package/src/components/forms/FormDateTime.tsx +11 -2
  31. package/src/components/forms/FormFieldWrapper.tsx +3 -1
  32. package/src/components/forms/FormInput.tsx +3 -1
  33. package/src/components/forms/FormPassword.tsx +10 -1
  34. package/src/components/forms/FormPlaceAutocomplete.tsx +8 -3
  35. package/src/components/forms/FormSelect.tsx +3 -0
  36. package/src/components/forms/FormSlider.tsx +3 -1
  37. package/src/components/forms/FormTextarea.tsx +15 -1
  38. package/src/shadcnui/ui/badge.tsx +15 -0
  39. package/dist/chunk-RKUUGCYB.mjs.map +0 -1
  40. package/dist/chunk-SPRFCAQI.js.map +0 -1
  41. /package/dist/{BlockNoteEditor-RFRK3STN.mjs.map → BlockNoteEditor-UQOOX3UT.mjs.map} +0 -0
@@ -499,7 +499,19 @@ var badgeVariants = cva3(
499
499
  destructive: "bg-destructive/10 [a]:hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 text-destructive dark:bg-destructive/20",
500
500
  outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground bg-input/20 dark:bg-input/30",
501
501
  ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
502
- link: "text-primary underline-offset-4 hover:underline"
502
+ link: "text-primary underline-offset-4 hover:underline",
503
+ warning: "bg-warning text-warning-foreground [a]:hover:bg-warning/80",
504
+ blue: "bg-sky-500 text-primary-foreground [a]:hover:bg-sky-500/80",
505
+ green: "bg-emerald-500 text-primary-foreground [a]:hover:bg-emerald-500/80",
506
+ red: "bg-red-500 text-primary-foreground [a]:hover:bg-red-500/80",
507
+ yellow: "bg-yellow-500 text-primary-foreground [a]:hover:bg-yellow-500/80",
508
+ purple: "bg-purple-500 text-primary-foreground [a]:hover:bg-purple-500/80",
509
+ pink: "bg-pink-500 text-primary-foreground [a]:hover:bg-pink-500/80",
510
+ gray: "bg-gray-500 text-primary-foreground [a]:hover:bg-gray-500/80",
511
+ orange: "bg-orange-500 text-primary-foreground [a]:hover:bg-orange-500/80",
512
+ teal: "bg-teal-500 text-primary-foreground [a]:hover:bg-teal-500/80",
513
+ lime: "bg-lime-500 text-primary-foreground [a]:hover:bg-lime-500/80",
514
+ none: "border-input bg-transparent text-muted-foreground min-w-20 min-h-5"
503
515
  }
504
516
  },
505
517
  defaultVariants: {
@@ -6138,7 +6150,7 @@ function EntityAvatar({
6138
6150
  __name(EntityAvatar, "EntityAvatar");
6139
6151
 
6140
6152
  // src/features/company/contexts/CompanyContext.tsx
6141
- import { useTranslations as useTranslations37 } from "next-intl";
6153
+ import { useTranslations as useTranslations38 } from "next-intl";
6142
6154
  import { Fragment as Fragment19, createContext as createContext9, useContext as useContext10, useState as useState34 } from "react";
6143
6155
 
6144
6156
  // src/hooks/TableGeneratorRegistry.ts
@@ -7699,7 +7711,7 @@ function useCurrentUserContext() {
7699
7711
  __name(useCurrentUserContext, "useCurrentUserContext");
7700
7712
 
7701
7713
  // src/features/user/contexts/UserContext.tsx
7702
- import { useTranslations as useTranslations20 } from "next-intl";
7714
+ import { useTranslations as useTranslations21 } from "next-intl";
7703
7715
  import { createContext as createContext8, useContext as useContext9, useState as useState31 } from "react";
7704
7716
 
7705
7717
  // src/features/user/components/forms/RoleUserAdd.tsx
@@ -8161,6 +8173,7 @@ function FormFieldWrapper({
8161
8173
  description,
8162
8174
  isRequired,
8163
8175
  orientation = "vertical",
8176
+ className,
8164
8177
  children,
8165
8178
  testId
8166
8179
  }) {
@@ -8169,7 +8182,7 @@ function FormFieldWrapper({
8169
8182
  {
8170
8183
  control: form.control,
8171
8184
  name,
8172
- render: ({ field, fieldState }) => /* @__PURE__ */ jsxs30(Field, { orientation, "data-invalid": !!fieldState.error, "data-testid": testId, children: [
8185
+ render: ({ field, fieldState }) => /* @__PURE__ */ jsxs30(Field, { orientation, className, "data-invalid": !!fieldState.error, "data-testid": testId, children: [
8173
8186
  label && /* @__PURE__ */ jsxs30(FieldLabel, { children: [
8174
8187
  label,
8175
8188
  isRequired && /* @__PURE__ */ jsx59("span", { className: "text-destructive ml-1 font-semibold", children: "*" })
@@ -8568,7 +8581,7 @@ __name(UserResentInvitationEmail, "UserResentInvitationEmail");
8568
8581
 
8569
8582
  // src/features/user/components/forms/UserSelector.tsx
8570
8583
  import { CircleX, RefreshCwIcon as RefreshCwIcon2, SearchIcon as SearchIcon4, XIcon as XIcon8 } from "lucide-react";
8571
- import { useTranslations as useTranslations19 } from "next-intl";
8584
+ import { useTranslations as useTranslations20 } from "next-intl";
8572
8585
  import { useCallback as useCallback18, useEffect as useEffect27, useRef as useRef18, useState as useState30 } from "react";
8573
8586
 
8574
8587
  // src/components/forms/CommonAssociationForm.tsx
@@ -8721,7 +8734,19 @@ __name(errorToast, "errorToast");
8721
8734
 
8722
8735
  // src/components/forms/CommonDeleter.tsx
8723
8736
  import { Fragment as Fragment8, jsx as jsx66, jsxs as jsxs37 } from "react/jsx-runtime";
8724
- function CommonDeleter({ deleteFunction, redirectTo, type, forceShow, testId, onSuccess }) {
8737
+ function CommonDeleter({
8738
+ deleteFunction,
8739
+ redirectTo,
8740
+ type,
8741
+ title,
8742
+ subtitle,
8743
+ description,
8744
+ forceShow,
8745
+ testId,
8746
+ trigger,
8747
+ onSuccess,
8748
+ propagateChanges
8749
+ }) {
8725
8750
  const t = useI18nTranslations();
8726
8751
  const router = useI18nRouter();
8727
8752
  const [open, setOpen] = useState17(forceShow || false);
@@ -8733,13 +8758,14 @@ function CommonDeleter({ deleteFunction, redirectTo, type, forceShow, testId, on
8733
8758
  setOpen(false);
8734
8759
  if (onSuccess) await onSuccess();
8735
8760
  else if (redirectTo) router.push(redirectTo);
8761
+ if (propagateChanges) propagateChanges();
8736
8762
  } catch (error) {
8737
8763
  errorToast({ title: t(`common.errors.delete`), error });
8738
8764
  }
8739
8765
  setIsDeleting(false);
8740
8766
  }, "handleDelete");
8741
8767
  return /* @__PURE__ */ jsxs37(AlertDialog, { open, onOpenChange: setOpen, children: [
8742
- forceShow ? null : /* @__PURE__ */ jsx66(AlertDialogTrigger, { children: /* @__PURE__ */ jsx66(
8768
+ forceShow ? null : /* @__PURE__ */ jsx66(AlertDialogTrigger, { children: trigger || /* @__PURE__ */ jsx66(
8743
8769
  Button,
8744
8770
  {
8745
8771
  render: /* @__PURE__ */ jsx66("div", {}),
@@ -8753,10 +8779,10 @@ function CommonDeleter({ deleteFunction, redirectTo, type, forceShow, testId, on
8753
8779
  ) }),
8754
8780
  /* @__PURE__ */ jsxs37(AlertDialogContent, { className: `flex max-h-[70vh] max-w-3xl flex-col overflow-y-auto`, children: [
8755
8781
  /* @__PURE__ */ jsxs37(AlertDialogHeader, { children: [
8756
- /* @__PURE__ */ jsx66(AlertDialogTitle, { children: t(`common.delete.title`, { type: t(`entities.${type}`, { count: 1 }) }) }),
8757
- /* @__PURE__ */ jsx66(AlertDialogDescription, { children: t(`common.delete.subtitle`, { type: t(`entities.${type}`, { count: 1 }) }) })
8782
+ /* @__PURE__ */ jsx66(AlertDialogTitle, { children: title ?? t(`common.delete.title`, { type: t(`entities.${type}`, { count: 1 }) }) }),
8783
+ /* @__PURE__ */ jsx66(AlertDialogDescription, { children: subtitle ?? t(`common.delete.subtitle`, { type: t(`entities.${type}`, { count: 1 }) }) })
8758
8784
  ] }),
8759
- /* @__PURE__ */ jsx66("div", { className: "text-destructive p-4 text-sm", children: t(`common.delete.description`, { type: t(`entities.${type}`, { count: 1 }) }) }),
8785
+ description !== void 0 ? description : /* @__PURE__ */ jsx66("div", { className: "text-destructive p-4 text-sm", children: t(`common.delete.description`, { type: t(`entities.${type}`, { count: 1 }) }) }),
8760
8786
  /* @__PURE__ */ jsxs37("div", { className: "flex justify-end", children: [
8761
8787
  /* @__PURE__ */ jsx66(
8762
8788
  Button,
@@ -8800,14 +8826,15 @@ function CommonEditorButtons({
8800
8826
  disabled,
8801
8827
  setOpen,
8802
8828
  hideSubmit,
8803
- centerButtons
8829
+ centerButtons,
8830
+ buttonTitle
8804
8831
  }) {
8805
8832
  const t = useTranslations9();
8806
8833
  if (centerButtons) {
8807
8834
  return /* @__PURE__ */ jsxs38("div", { className: "flex w-full items-center justify-between gap-x-2", children: [
8808
8835
  /* @__PURE__ */ jsx67(Button, { variant: "outline", type: `button`, onClick: () => setOpen(false), "data-testid": `modal-button-cancel`, children: t(`ui.buttons.cancel`) }),
8809
8836
  /* @__PURE__ */ jsx67("div", { className: "flex flex-1 justify-center gap-x-2", children: centerButtons }),
8810
- !hideSubmit ? /* @__PURE__ */ jsx67(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: isEdit ? t(`ui.buttons.confirm_update`) : t(`ui.buttons.confirm_create`) }) : /* @__PURE__ */ jsx67("div", {})
8837
+ !hideSubmit ? /* @__PURE__ */ jsx67(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: buttonTitle ? buttonTitle : isEdit ? t(`ui.buttons.confirm_update`) : t(`ui.buttons.confirm_create`) }) : /* @__PURE__ */ jsx67("div", {})
8811
8838
  ] });
8812
8839
  }
8813
8840
  return /* @__PURE__ */ jsxs38("div", { className: "flex justify-end", children: [
@@ -8822,7 +8849,7 @@ function CommonEditorButtons({
8822
8849
  children: t(`ui.buttons.cancel`)
8823
8850
  }
8824
8851
  ),
8825
- !hideSubmit && /* @__PURE__ */ jsx67(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: isEdit ? t(`ui.buttons.confirm_update`) : t(`ui.buttons.confirm_create`) })
8852
+ !hideSubmit && /* @__PURE__ */ jsx67(Button, { type: "submit", disabled: form.formState.isSubmitting || disabled, "data-testid": `modal-button-create`, children: buttonTitle ? buttonTitle : isEdit ? t(`ui.buttons.confirm_update`) : t(`ui.buttons.confirm_create`) })
8826
8853
  ] });
8827
8854
  }
8828
8855
  __name(CommonEditorButtons, "CommonEditorButtons");
@@ -8830,13 +8857,13 @@ __name(CommonEditorButtons, "CommonEditorButtons");
8830
8857
  // src/components/forms/CommonEditorHeader.tsx
8831
8858
  import { useTranslations as useTranslations10 } from "next-intl";
8832
8859
  import { jsx as jsx68, jsxs as jsxs39 } from "react/jsx-runtime";
8833
- function CommonEditorHeader({ type, name }) {
8860
+ function CommonEditorHeader({ type, name, title, description }) {
8834
8861
  const t = useTranslations10();
8835
8862
  return /* @__PURE__ */ jsxs39(DialogHeader, { children: [
8836
- /* @__PURE__ */ jsx68(DialogTitle, { children: name ? t(`common.edit.update.title`, {
8863
+ /* @__PURE__ */ jsx68(DialogTitle, { children: title ? title : name ? t(`common.edit.update.title`, {
8837
8864
  type
8838
8865
  }) : t(`common.edit.create.title`, { type }) }),
8839
- /* @__PURE__ */ jsx68(DialogDescription, { children: name ? t(`common.edit.update.description`, {
8866
+ /* @__PURE__ */ jsx68(DialogDescription, { children: description ? description : name ? t(`common.edit.update.description`, {
8840
8867
  type,
8841
8868
  name
8842
8869
  }) : t(`common.edit.create.description`, {
@@ -8865,12 +8892,13 @@ function CommonEditorDiscardDialog({ open, onOpenChange, onDiscard }) {
8865
8892
  __name(CommonEditorDiscardDialog, "CommonEditorDiscardDialog");
8866
8893
 
8867
8894
  // src/components/forms/CommonEditorTrigger.tsx
8868
- import { PencilIcon } from "lucide-react";
8895
+ import { PencilIcon, PlusCircleIcon } from "lucide-react";
8869
8896
  import { useTranslations as useTranslations12 } from "next-intl";
8897
+ import React15 from "react";
8870
8898
  import { jsx as jsx70 } from "react/jsx-runtime";
8871
- function CommonEditorTrigger({ isEdit, edit: _edit, create, testId }) {
8899
+ function CommonEditorTrigger({ isEdit, edit: _edit, create, testId, title }) {
8872
8900
  const t = useTranslations12();
8873
- return /* @__PURE__ */ jsx70(DialogTrigger, { children: isEdit ? /* @__PURE__ */ jsx70(
8901
+ return /* @__PURE__ */ jsx70(DialogTrigger, { children: title ? /* @__PURE__ */ jsx70(Button, { render: /* @__PURE__ */ jsx70("div", {}), nativeButton: false, size: "sm", variant: `outline`, "data-testid": testId, children: title }) : isEdit ? /* @__PURE__ */ jsx70(
8874
8902
  Button,
8875
8903
  {
8876
8904
  render: /* @__PURE__ */ jsx70("div", {}),
@@ -8884,6 +8912,10 @@ function CommonEditorTrigger({ isEdit, edit: _edit, create, testId }) {
8884
8912
  ) : /* @__PURE__ */ jsx70(Button, { render: /* @__PURE__ */ jsx70("div", {}), nativeButton: false, size: "sm", variant: `outline`, "data-testid": testId, children: create ? create : t(`ui.buttons.create`) }) });
8885
8913
  }
8886
8914
  __name(CommonEditorTrigger, "CommonEditorTrigger");
8915
+ var CommonAddTrigger = React15.forwardRef(
8916
+ (props, ref) => /* @__PURE__ */ jsx70(Button, { ref, variant: "ghost", size: "sm", className: "text-muted-foreground", ...props, children: /* @__PURE__ */ jsx70(PlusCircleIcon, {}) })
8917
+ );
8918
+ CommonAddTrigger.displayName = "CommonAddTrigger";
8887
8919
 
8888
8920
  // src/components/forms/useEditorDialog.ts
8889
8921
  import { useCallback as useCallback14, useEffect as useEffect19, useState as useState18 } from "react";
@@ -8982,6 +9014,7 @@ function EditorSheet({
8982
9014
  onClose,
8983
9015
  dialogOpen,
8984
9016
  onDialogOpenChange,
9017
+ renderFooter,
8985
9018
  children
8986
9019
  }) {
8987
9020
  const t = useTranslations13();
@@ -9031,7 +9064,7 @@ function EditorSheet({
9031
9064
  );
9032
9065
  return /* @__PURE__ */ jsxs41(Fragment9, { children: [
9033
9066
  /* @__PURE__ */ jsxs41(Sheet, { open, onOpenChange: handleOpenChange, children: [
9034
- dialogOpen === void 0 && (trigger ? /* @__PURE__ */ jsx71(SheetTrigger, { children: trigger }) : /* @__PURE__ */ jsx71(SheetTrigger, { children: isEdit ? /* @__PURE__ */ jsx71(
9067
+ dialogOpen === void 0 && forceShow === void 0 && (trigger ? /* @__PURE__ */ jsx71(SheetTrigger, { children: trigger }) : /* @__PURE__ */ jsx71(SheetTrigger, { children: isEdit ? /* @__PURE__ */ jsx71(
9035
9068
  Button,
9036
9069
  {
9037
9070
  render: /* @__PURE__ */ jsx71("div", {}),
@@ -9047,20 +9080,30 @@ function EditorSheet({
9047
9080
  /* @__PURE__ */ jsx71(SheetTitle, { children: titleOverride ?? (isEdit ? t("common.edit.update.title", { type: entityType }) : t("common.edit.create.title", { type: entityType })) }),
9048
9081
  /* @__PURE__ */ jsx71(SheetDescription, { children: descriptionOverride ?? (isEdit ? t("common.edit.update.description", { type: entityType, name: entityName ?? "" }) : t("common.edit.create.description", { type: entityType })) })
9049
9082
  ] }),
9050
- /* @__PURE__ */ jsx71(Form, { ...form, children: /* @__PURE__ */ jsxs41("form", { onSubmit: form.handleSubmit(wrappedOnSubmit), className: "flex min-h-0 flex-1 flex-col", children: [
9051
- /* @__PURE__ */ jsx71("div", { className: "flex-1 overflow-y-auto px-6 py-4", children }),
9052
- /* @__PURE__ */ jsx71(SheetFooter, { className: "shrink-0 border-t px-6 py-4", children: /* @__PURE__ */ jsx71(
9053
- CommonEditorButtons,
9054
- {
9055
- form,
9056
- setOpen: handleOpenChange,
9057
- isEdit,
9058
- disabled,
9059
- hideSubmit,
9060
- centerButtons
9061
- }
9062
- ) })
9063
- ] }) })
9083
+ /* @__PURE__ */ jsx71(Form, { ...form, children: /* @__PURE__ */ jsxs41(
9084
+ "form",
9085
+ {
9086
+ onSubmit: (e) => {
9087
+ e.stopPropagation();
9088
+ return form.handleSubmit(wrappedOnSubmit)(e);
9089
+ },
9090
+ className: "flex min-h-0 flex-1 flex-col",
9091
+ children: [
9092
+ /* @__PURE__ */ jsx71("div", { className: "flex-1 overflow-y-auto px-6 py-4", children }),
9093
+ /* @__PURE__ */ jsx71(SheetFooter, { className: "shrink-0 border-t px-6 py-4", children: renderFooter ? renderFooter({ form, isEdit, setOpen: handleOpenChange, closeWithoutConfirm: setOpen }) : /* @__PURE__ */ jsx71(
9094
+ CommonEditorButtons,
9095
+ {
9096
+ form,
9097
+ setOpen: handleOpenChange,
9098
+ isEdit,
9099
+ disabled,
9100
+ hideSubmit,
9101
+ centerButtons
9102
+ }
9103
+ ) })
9104
+ ]
9105
+ }
9106
+ ) })
9064
9107
  ] })
9065
9108
  ] }),
9066
9109
  /* @__PURE__ */ jsx71(CommonEditorDiscardDialog, { ...discardDialogProps })
@@ -9232,9 +9275,11 @@ var DatePickerPopover = /* @__PURE__ */ __name(({
9232
9275
  // src/components/forms/DateRangeSelector.tsx
9233
9276
  import { format } from "date-fns";
9234
9277
  import { CalendarIcon as CalendarIcon2 } from "lucide-react";
9278
+ import { useTranslations as useTranslations14 } from "next-intl";
9235
9279
  import { useEffect as useEffect21, useState as useState20 } from "react";
9236
9280
  import { Fragment as Fragment10, jsx as jsx73, jsxs as jsxs43 } from "react/jsx-runtime";
9237
9281
  function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth }) {
9282
+ const t = useTranslations14();
9238
9283
  const [date, setDate] = useState20(
9239
9284
  avoidSettingDates ? void 0 : {
9240
9285
  from: new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth(), 1),
@@ -9242,6 +9287,10 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9242
9287
  }
9243
9288
  );
9244
9289
  const [open, setOpen] = useState20(false);
9290
+ const [mounted, setMounted] = useState20(false);
9291
+ useEffect21(() => {
9292
+ setMounted(true);
9293
+ }, []);
9245
9294
  const [prevRange, setPrevRange] = useState20(date);
9246
9295
  useEffect21(() => {
9247
9296
  if (date?.from && date?.to && date.to > date.from && (prevRange?.from?.getTime() !== date.from.getTime() || prevRange?.to?.getTime() !== date.to.getTime())) {
@@ -9261,8 +9310,8 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9261
9310
  setDate(range);
9262
9311
  }
9263
9312
  }, "handleSelect");
9264
- return /* @__PURE__ */ jsx73("div", { className: cn("grid gap-2"), children: /* @__PURE__ */ jsxs43(Popover, { open, onOpenChange: setOpen, children: [
9265
- /* @__PURE__ */ jsx73(PopoverTrigger, { children: /* @__PURE__ */ jsxs43(
9313
+ if (!mounted) {
9314
+ return /* @__PURE__ */ jsx73("div", { className: cn("grid gap-2"), children: /* @__PURE__ */ jsxs43(
9266
9315
  Button,
9267
9316
  {
9268
9317
  id: "date",
@@ -9274,10 +9323,33 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9274
9323
  format(date.from, "LLL dd, y"),
9275
9324
  " - ",
9276
9325
  format(date.to, "LLL dd, y")
9277
- ] }) : format(date.from, "LLL dd, y") : /* @__PURE__ */ jsx73("span", { children: "Pick a date" })
9326
+ ] }) : format(date.from, "LLL dd, y") : /* @__PURE__ */ jsx73("span", { children: t("ui.labels.pick_a_date") })
9278
9327
  ]
9279
9328
  }
9280
- ) }),
9329
+ ) });
9330
+ }
9331
+ return /* @__PURE__ */ jsx73("div", { className: cn("grid gap-2"), children: /* @__PURE__ */ jsxs43(Popover, { open, onOpenChange: setOpen, children: [
9332
+ /* @__PURE__ */ jsxs43(
9333
+ PopoverTrigger,
9334
+ {
9335
+ render: /* @__PURE__ */ jsx73(
9336
+ Button,
9337
+ {
9338
+ id: "date",
9339
+ variant: "outline",
9340
+ className: cn("w-[300px] justify-start text-left font-normal", !date && "text-muted-foreground")
9341
+ }
9342
+ ),
9343
+ children: [
9344
+ /* @__PURE__ */ jsx73(CalendarIcon2, {}),
9345
+ date?.from ? date.to ? /* @__PURE__ */ jsxs43(Fragment10, { children: [
9346
+ format(date.from, "LLL dd, y"),
9347
+ " - ",
9348
+ format(date.to, "LLL dd, y")
9349
+ ] }) : format(date.from, "LLL dd, y") : /* @__PURE__ */ jsx73("span", { children: t("ui.labels.pick_a_date") })
9350
+ ]
9351
+ }
9352
+ ),
9281
9353
  /* @__PURE__ */ jsx73(PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ jsxs43("div", { className: "flex flex-col gap-2 p-2", children: [
9282
9354
  /* @__PURE__ */ jsx73(
9283
9355
  Calendar,
@@ -9302,7 +9374,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9302
9374
  },
9303
9375
  className: "cursor-pointer",
9304
9376
  disabled: !date,
9305
- children: "Clear"
9377
+ children: t("ui.buttons.clear")
9306
9378
  }
9307
9379
  )
9308
9380
  ] }) })
@@ -9312,13 +9384,14 @@ __name(DateRangeSelector, "DateRangeSelector");
9312
9384
 
9313
9385
  // src/components/forms/FileUploader.tsx
9314
9386
  import { Trash2 as RemoveIcon } from "lucide-react";
9315
- import { useTranslations as useTranslations14 } from "next-intl";
9387
+ import { useTranslations as useTranslations15 } from "next-intl";
9316
9388
  import {
9317
9389
  createContext as createContext7,
9318
9390
  forwardRef as forwardRef6,
9319
9391
  useCallback as useCallback16,
9320
9392
  useContext as useContext8,
9321
9393
  useEffect as useEffect22,
9394
+ useMemo as useMemo12,
9322
9395
  useRef as useRef14,
9323
9396
  useState as useState21
9324
9397
  } from "react";
@@ -9338,7 +9411,7 @@ var FileUploader = forwardRef6(
9338
9411
  const [isLOF, setIsLOF] = useState21(false);
9339
9412
  const [activeIndex, setActiveIndex] = useState21(-1);
9340
9413
  const { maxFiles = 1, maxSize = 4 * 1024 * 1024, multiple = true } = dropzoneOptions;
9341
- const t = useTranslations14();
9414
+ const t = useTranslations15();
9342
9415
  const reSelectAll = maxFiles === 1 ? true : reSelect;
9343
9416
  const direction = dir === "rtl" ? "rtl" : "ltr";
9344
9417
  const removeFileFromSet = useCallback16(
@@ -9451,7 +9524,8 @@ var FileUploader = forwardRef6(
9451
9524
  activeIndex,
9452
9525
  setActiveIndex,
9453
9526
  orientation,
9454
- direction
9527
+ direction,
9528
+ accept: dropzoneOptions.accept
9455
9529
  },
9456
9530
  children: /* @__PURE__ */ jsx74(
9457
9531
  "div",
@@ -9503,7 +9577,7 @@ var FileUploaderItem = forwardRef6(
9503
9577
  ({ className, index, children, ...props }, ref) => {
9504
9578
  const { removeFileFromSet, activeIndex, direction } = useFileUpload();
9505
9579
  const isSelected = index === activeIndex;
9506
- const t = useTranslations14();
9580
+ const t = useTranslations15();
9507
9581
  return /* @__PURE__ */ jsxs44(
9508
9582
  "div",
9509
9583
  {
@@ -9537,9 +9611,41 @@ var FileUploaderItem = forwardRef6(
9537
9611
  FileUploaderItem.displayName = "FileUploaderItem";
9538
9612
  var FileInput = forwardRef6(
9539
9613
  ({ className, children, ...props }, ref) => {
9540
- const { dropzoneState, isFileTooBig, isLOF } = useFileUpload();
9614
+ const { dropzoneState, isFileTooBig, isLOF, accept } = useFileUpload();
9615
+ const t = useTranslations15();
9541
9616
  const rootProps = isLOF ? {} : dropzoneState.getRootProps();
9542
9617
  const { isDragActive: parentIsDragActive } = dropzoneState;
9618
+ const acceptedLabels = useMemo12(() => {
9619
+ if (!accept) return null;
9620
+ const extensions = /* @__PURE__ */ new Set();
9621
+ let hasWildcardImages = false;
9622
+ for (const [mime, exts] of Object.entries(accept)) {
9623
+ if (mime === "image/*") hasWildcardImages = true;
9624
+ for (const ext of exts) extensions.add(ext);
9625
+ }
9626
+ const labels = Array.from(extensions).sort();
9627
+ if (hasWildcardImages) labels.push(t("ui.labels.images"));
9628
+ return labels.length > 0 ? labels : null;
9629
+ }, [accept, t]);
9630
+ const dropArea = /* @__PURE__ */ jsx74(
9631
+ "div",
9632
+ {
9633
+ className: cn(
9634
+ "w-full rounded-lg duration-300 ease-in-out",
9635
+ // Simpler border logic: if parent is drag-active, it controls the border.
9636
+ // Otherwise, FileInput can show its own accept/reject/default border.
9637
+ {
9638
+ "border-green-500": dropzoneState.isDragAccept && !parentIsDragActive,
9639
+ "border-red-500": (dropzoneState.isDragReject || isFileTooBig) && !parentIsDragActive,
9640
+ "border-gray-300": !dropzoneState.isDragAccept && !dropzoneState.isDragReject && !isFileTooBig && !parentIsDragActive
9641
+ },
9642
+ // className from props should be last to allow overrides if necessary
9643
+ className
9644
+ ),
9645
+ ...rootProps,
9646
+ children
9647
+ }
9648
+ );
9543
9649
  return /* @__PURE__ */ jsxs44(
9544
9650
  "div",
9545
9651
  {
@@ -9547,25 +9653,14 @@ var FileInput = forwardRef6(
9547
9653
  ...props,
9548
9654
  className: cn(`relative w-full ${isLOF ? "cursor-not-allowed opacity-50" : "cursor-pointer"}`, className),
9549
9655
  children: [
9550
- /* @__PURE__ */ jsx74(
9551
- "div",
9552
- {
9553
- className: cn(
9554
- "w-full rounded-lg duration-300 ease-in-out",
9555
- // Simpler border logic: if parent is drag-active, it controls the border.
9556
- // Otherwise, FileInput can show its own accept/reject/default border.
9557
- {
9558
- "border-green-500": dropzoneState.isDragAccept && !parentIsDragActive,
9559
- "border-red-500": (dropzoneState.isDragReject || isFileTooBig) && !parentIsDragActive,
9560
- "border-gray-300": !dropzoneState.isDragAccept && !dropzoneState.isDragReject && !isFileTooBig && !parentIsDragActive
9561
- },
9562
- // className from props should be last to allow overrides if necessary
9563
- className
9564
- ),
9565
- ...rootProps,
9566
- children
9567
- }
9568
- ),
9656
+ acceptedLabels ? /* @__PURE__ */ jsxs44(Tooltip2, { children: [
9657
+ /* @__PURE__ */ jsx74(TooltipTrigger, { render: dropArea }),
9658
+ /* @__PURE__ */ jsxs44(TooltipContent, { children: [
9659
+ t("ui.labels.accepted_file_types"),
9660
+ ": ",
9661
+ acceptedLabels.join(", ")
9662
+ ] })
9663
+ ] }) : dropArea,
9569
9664
  /* @__PURE__ */ jsx74(
9570
9665
  Input,
9571
9666
  {
@@ -9689,12 +9784,12 @@ import { useRef as useRef15 } from "react";
9689
9784
 
9690
9785
  // src/components/editors/BlockNoteEditorContainer.tsx
9691
9786
  import dynamic from "next/dynamic";
9692
- import React16 from "react";
9787
+ import React17 from "react";
9693
9788
  import { jsx as jsx77 } from "react/jsx-runtime";
9694
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-RFRK3STN.mjs"), {
9789
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-UQOOX3UT.mjs"), {
9695
9790
  ssr: false
9696
9791
  });
9697
- var BlockNoteEditorContainer = React16.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
9792
+ var BlockNoteEditorContainer = React17.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
9698
9793
  return /* @__PURE__ */ jsx77(BlockNoteEditor, { ...props });
9699
9794
  }, "EditorContainer"));
9700
9795
 
@@ -9785,7 +9880,7 @@ __name(FormBlockNote, "FormBlockNote");
9785
9880
  // src/components/forms/FormDate.tsx
9786
9881
  import { isValid as isValid2, parse as parse2 } from "date-fns";
9787
9882
  import { Calendar as CalendarIcon3, CircleXIcon as CircleXIcon2 } from "lucide-react";
9788
- import { useMemo as useMemo12, useState as useState23 } from "react";
9883
+ import { useMemo as useMemo13, useState as useState23 } from "react";
9789
9884
  import { jsx as jsx79, jsxs as jsxs47 } from "react/jsx-runtime";
9790
9885
  function FormDate({
9791
9886
  form,
@@ -9795,7 +9890,9 @@ function FormDate({
9795
9890
  onChange,
9796
9891
  isRequired = false,
9797
9892
  defaultMonth,
9798
- allowEmpty
9893
+ allowEmpty,
9894
+ description,
9895
+ futureYears
9799
9896
  }) {
9800
9897
  const t = useI18nTranslations();
9801
9898
  const locale = useI18nLocale();
@@ -9805,12 +9902,12 @@ function FormDate({
9805
9902
  const currentValue = form.getValues(id);
9806
9903
  return currentValue || defaultMonth || /* @__PURE__ */ new Date();
9807
9904
  });
9808
- const dateFormatter = useMemo12(
9905
+ const dateFormatter = useMemo13(
9809
9906
  () => new Intl.DateTimeFormat(locale, { day: "2-digit", month: "2-digit", year: "numeric" }),
9810
9907
  [locale]
9811
9908
  );
9812
9909
  const formatDate = /* @__PURE__ */ __name((date) => dateFormatter.format(date), "formatDate");
9813
- const datePlaceholder = useMemo12(() => {
9910
+ const datePlaceholder = useMemo13(() => {
9814
9911
  const parts = dateFormatter.formatToParts(new Date(2e3, 0, 1));
9815
9912
  return parts.map((part) => {
9816
9913
  if (part.type === "day") return "dd";
@@ -9819,7 +9916,7 @@ function FormDate({
9819
9916
  return part.value;
9820
9917
  }).join("");
9821
9918
  }, [dateFormatter]);
9822
- const dateFormatPattern = useMemo12(() => {
9919
+ const dateFormatPattern = useMemo13(() => {
9823
9920
  const parts = dateFormatter.formatToParts(new Date(2e3, 0, 1));
9824
9921
  return parts.map((part) => {
9825
9922
  if (part.type === "day") return "dd";
@@ -9854,7 +9951,7 @@ function FormDate({
9854
9951
  }
9855
9952
  if (onChange) onChange(selectedDate);
9856
9953
  }, "handleCalendarSelect");
9857
- return /* @__PURE__ */ jsx79("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx79(FormFieldWrapper, { form, name: id, label: name, isRequired, children: (field) => /* @__PURE__ */ jsxs47(Popover, { open, onOpenChange: setOpen, modal: true, children: [
9954
+ return /* @__PURE__ */ jsx79("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx79(FormFieldWrapper, { form, name: id, label: name, isRequired, description, children: (field) => /* @__PURE__ */ jsxs47(Popover, { open, onOpenChange: setOpen, modal: true, children: [
9858
9955
  /* @__PURE__ */ jsxs47(InputGroup, { children: [
9859
9956
  /* @__PURE__ */ jsx79(
9860
9957
  InputGroupInput,
@@ -9898,7 +9995,7 @@ function FormDate({
9898
9995
  month: displayMonth,
9899
9996
  onMonthChange: setDisplayMonth,
9900
9997
  startMonth: new Date(1900, 0),
9901
- endMonth: new Date((/* @__PURE__ */ new Date()).getFullYear() + 10, 11)
9998
+ endMonth: new Date((/* @__PURE__ */ new Date()).getFullYear() + (futureYears ?? 10), 11)
9902
9999
  }
9903
10000
  ),
9904
10001
  allowEmpty !== false && /* @__PURE__ */ jsx79("div", { className: "border-t p-2", children: /* @__PURE__ */ jsx79(
@@ -9924,7 +10021,7 @@ __name(FormDate, "FormDate");
9924
10021
 
9925
10022
  // src/components/forms/FormDateTime.tsx
9926
10023
  import { Calendar as CalendarIcon4, CircleXIcon as CircleXIcon3 } from "lucide-react";
9927
- import { useMemo as useMemo13, useState as useState24 } from "react";
10024
+ import { useMemo as useMemo14, useState as useState24 } from "react";
9928
10025
  import { jsx as jsx80, jsxs as jsxs48 } from "react/jsx-runtime";
9929
10026
  function FormDateTime({
9930
10027
  form,
@@ -9933,7 +10030,10 @@ function FormDateTime({
9933
10030
  minDate,
9934
10031
  onChange,
9935
10032
  allowEmpty,
9936
- defaultMonth
10033
+ defaultMonth,
10034
+ placeholder,
10035
+ isRequired,
10036
+ description
9937
10037
  }) {
9938
10038
  const [open, setOpen] = useState24(false);
9939
10039
  const t = useI18nTranslations();
@@ -9943,7 +10043,7 @@ function FormDateTime({
9943
10043
  const currentValue = form.getValues(id);
9944
10044
  return currentValue || defaultMonth || /* @__PURE__ */ new Date();
9945
10045
  });
9946
- const dateTimeFormatter = useMemo13(
10046
+ const dateTimeFormatter = useMemo14(
9947
10047
  () => new Intl.DateTimeFormat(locale, {
9948
10048
  year: "numeric",
9949
10049
  month: "long",
@@ -9985,7 +10085,7 @@ function FormDateTime({
9985
10085
  if (onChange) onChange(updatedDate);
9986
10086
  }
9987
10087
  }, "handleTimeChange");
9988
- return /* @__PURE__ */ jsx80("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx80(FormFieldWrapper, { form, name: id, label: name, children: (field) => /* @__PURE__ */ jsx80("div", { className: "relative flex flex-row", children: /* @__PURE__ */ jsxs48(Popover, { open, onOpenChange: setOpen, modal: true, children: [
10088
+ return /* @__PURE__ */ jsx80("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx80(FormFieldWrapper, { form, name: id, label: name, isRequired, description, children: (field) => /* @__PURE__ */ jsx80("div", { className: "relative flex flex-row", children: /* @__PURE__ */ jsxs48(Popover, { open, onOpenChange: setOpen, modal: true, children: [
9989
10089
  /* @__PURE__ */ jsxs48("div", { className: "flex w-full flex-row items-center justify-between", children: [
9990
10090
  /* @__PURE__ */ jsxs48(
9991
10091
  PopoverTrigger,
@@ -9998,7 +10098,7 @@ function FormDateTime({
9998
10098
  }
9999
10099
  ),
10000
10100
  children: [
10001
- field.value ? formatDateTime(field.value) : /* @__PURE__ */ jsx80("span", { children: t(`common.pick_date_time`) }),
10101
+ field.value ? formatDateTime(field.value) : /* @__PURE__ */ jsx80("span", { children: placeholder ? placeholder : t(`common.pick_date_time`) }),
10002
10102
  /* @__PURE__ */ jsx80(CalendarIcon4, { className: "ml-auto h-4 w-4 opacity-50" })
10003
10103
  ]
10004
10104
  }
@@ -10126,12 +10226,13 @@ function FormDateTime({
10126
10226
  __name(FormDateTime, "FormDateTime");
10127
10227
 
10128
10228
  // src/components/forms/FormInput.tsx
10129
- import { useTranslations as useTranslations15 } from "next-intl";
10229
+ import { useTranslations as useTranslations16 } from "next-intl";
10130
10230
  import { jsx as jsx81, jsxs as jsxs49 } from "react/jsx-runtime";
10131
10231
  function FormInput({
10132
10232
  form,
10133
10233
  id,
10134
10234
  name,
10235
+ description,
10135
10236
  placeholder,
10136
10237
  type,
10137
10238
  onBlur,
@@ -10142,8 +10243,8 @@ function FormInput({
10142
10243
  testId,
10143
10244
  isRequired = false
10144
10245
  }) {
10145
- const t = useTranslations15();
10146
- return /* @__PURE__ */ jsx81("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx81(FormFieldWrapper, { form, name: id, label: name, isRequired, children: (field) => {
10246
+ const t = useTranslations16();
10247
+ return /* @__PURE__ */ jsx81("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx81(FormFieldWrapper, { form, name: id, label: name, description, isRequired, children: (field) => {
10147
10248
  const handleBlur = /* @__PURE__ */ __name(async (e) => {
10148
10249
  let value = e.target.value;
10149
10250
  if (type === "link" && value) {
@@ -10210,15 +10311,15 @@ function FormInput({
10210
10311
  __name(FormInput, "FormInput");
10211
10312
 
10212
10313
  // src/components/forms/PasswordInput.tsx
10213
- import * as React18 from "react";
10314
+ import * as React19 from "react";
10214
10315
  import { EyeIcon, EyeOffIcon } from "lucide-react";
10215
- import { useTranslations as useTranslations16 } from "next-intl";
10316
+ import { useTranslations as useTranslations17 } from "next-intl";
10216
10317
  import { jsx as jsx82, jsxs as jsxs50 } from "react/jsx-runtime";
10217
- var PasswordInput = React18.forwardRef(
10318
+ var PasswordInput = React19.forwardRef(
10218
10319
  ({ className, type: _type, ...props }, ref) => {
10219
- const [showPassword, setShowPassword] = React18.useState(false);
10320
+ const [showPassword, setShowPassword] = React19.useState(false);
10220
10321
  const disabled = props.value === "" || props.value === void 0 || props.disabled;
10221
- const t = useTranslations16();
10322
+ const t = useTranslations17();
10222
10323
  return /* @__PURE__ */ jsxs50("div", { className: "relative", children: [
10223
10324
  /* @__PURE__ */ jsx82(Input, { type: showPassword ? "text" : "password", className: cn("", className), ref, ...props }),
10224
10325
  /* @__PURE__ */ jsxs50(
@@ -10259,19 +10360,31 @@ function FormPassword({
10259
10360
  onBlur,
10260
10361
  disabled,
10261
10362
  testId,
10262
- isRequired
10363
+ isRequired,
10364
+ description
10263
10365
  }) {
10264
- return /* @__PURE__ */ jsx83("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx83(FormFieldWrapper, { form, name: id, label: name, isRequired, testId, children: (field) => /* @__PURE__ */ jsx83(
10265
- PasswordInput,
10366
+ return /* @__PURE__ */ jsx83("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx83(
10367
+ FormFieldWrapper,
10266
10368
  {
10267
- ...field,
10268
- className: "w-full",
10269
- disabled: disabled === true || form.formState.isSubmitting,
10270
- placeholder: placeholder ? placeholder : "",
10271
- onBlur,
10272
- "data-testid": testId
10369
+ form,
10370
+ name: id,
10371
+ label: name,
10372
+ isRequired,
10373
+ description,
10374
+ testId,
10375
+ children: (field) => /* @__PURE__ */ jsx83(
10376
+ PasswordInput,
10377
+ {
10378
+ ...field,
10379
+ className: "w-full",
10380
+ disabled: disabled === true || form.formState.isSubmitting,
10381
+ placeholder: placeholder ? placeholder : "",
10382
+ onBlur,
10383
+ "data-testid": testId
10384
+ }
10385
+ )
10273
10386
  }
10274
- ) }) });
10387
+ ) });
10275
10388
  }
10276
10389
  __name(FormPassword, "FormPassword");
10277
10390
 
@@ -10282,13 +10395,15 @@ function FormPlaceAutocomplete({
10282
10395
  form,
10283
10396
  id,
10284
10397
  name,
10398
+ description,
10285
10399
  placeholder,
10286
10400
  disabled,
10287
10401
  testId,
10288
10402
  isRequired = false,
10289
10403
  onPlaceSelect,
10290
10404
  className,
10291
- includeTypes
10405
+ includeTypes,
10406
+ languageCode = "en"
10292
10407
  }) {
10293
10408
  const [inputValue, setInputValue] = useState26("");
10294
10409
  const [suggestions, setSuggestions] = useState26([]);
@@ -10326,7 +10441,7 @@ function FormPlaceAutocomplete({
10326
10441
  body: JSON.stringify({
10327
10442
  input,
10328
10443
  ...includeTypes ? { includedPrimaryTypes: includeTypes } : {},
10329
- languageCode: "en"
10444
+ languageCode
10330
10445
  })
10331
10446
  });
10332
10447
  if (!response.ok) {
@@ -10450,7 +10565,7 @@ function FormPlaceAutocomplete({
10450
10565
  };
10451
10566
  }, []);
10452
10567
  if (loadError) {
10453
- return /* @__PURE__ */ jsx84("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx84(FormFieldWrapper, { form, name: id, label: name, isRequired, children: (field) => /* @__PURE__ */ jsx84(
10568
+ return /* @__PURE__ */ jsx84("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx84(FormFieldWrapper, { form, name: id, label: name, description, isRequired, children: (field) => /* @__PURE__ */ jsx84(
10454
10569
  Input,
10455
10570
  {
10456
10571
  ...field,
@@ -10461,7 +10576,7 @@ function FormPlaceAutocomplete({
10461
10576
  }
10462
10577
  ) }) });
10463
10578
  }
10464
- return /* @__PURE__ */ jsx84("div", { className: "flex w-full flex-col", ref: containerRef, children: /* @__PURE__ */ jsx84(FormFieldWrapper, { form, name: id, label: name, isRequired, children: (field) => /* @__PURE__ */ jsxs51("div", { className: "relative", children: [
10579
+ return /* @__PURE__ */ jsx84("div", { className: "flex w-full flex-col", ref: containerRef, children: /* @__PURE__ */ jsx84(FormFieldWrapper, { form, name: id, label: name, description, isRequired, children: (field) => /* @__PURE__ */ jsxs51("div", { className: "relative", children: [
10465
10580
  /* @__PURE__ */ jsx84(
10466
10581
  Input,
10467
10582
  {
@@ -10503,6 +10618,7 @@ function FormSelect({
10503
10618
  form,
10504
10619
  id,
10505
10620
  name,
10621
+ description,
10506
10622
  placeholder,
10507
10623
  disabled,
10508
10624
  values,
@@ -10518,6 +10634,7 @@ function FormSelect({
10518
10634
  form,
10519
10635
  name: id,
10520
10636
  label: name,
10637
+ description,
10521
10638
  isRequired,
10522
10639
  orientation: useRows ? "horizontal" : "vertical",
10523
10640
  testId,
@@ -10554,10 +10671,11 @@ function FormSlider({
10554
10671
  id,
10555
10672
  name,
10556
10673
  disabled,
10557
- showPercentage
10674
+ showPercentage,
10675
+ description
10558
10676
  }) {
10559
10677
  const value = useWatch2({ control: form.control, name: id });
10560
- return /* @__PURE__ */ jsx86("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx86(FormFieldWrapper, { form, name: id, label: name, children: () => /* @__PURE__ */ jsxs53("div", { children: [
10678
+ return /* @__PURE__ */ jsx86("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx86(FormFieldWrapper, { form, name: id, label: name, description, children: () => /* @__PURE__ */ jsxs53("div", { children: [
10561
10679
  showPercentage && /* @__PURE__ */ jsx86("div", { className: "text-muted-foreground mb-2 flex w-full justify-center text-xs", children: `${value}%` }),
10562
10680
  /* @__PURE__ */ jsx86(
10563
10681
  Slider,
@@ -10603,18 +10721,33 @@ function FormTextarea({
10603
10721
  name,
10604
10722
  className,
10605
10723
  placeholder,
10606
- testId
10724
+ testId,
10725
+ description,
10726
+ isRequired,
10727
+ textareaRef
10607
10728
  }) {
10608
- return /* @__PURE__ */ jsx88("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx88(FormFieldWrapper, { form, name: id, label: name, testId, children: (field) => /* @__PURE__ */ jsx88(
10609
- Textarea,
10729
+ return /* @__PURE__ */ jsx88("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx88(
10730
+ FormFieldWrapper,
10610
10731
  {
10611
- ...field,
10612
- className: cn("min-h-96 w-full", className),
10613
- disabled: form.formState.isSubmitting,
10614
- placeholder,
10615
- "data-testid": testId
10732
+ form,
10733
+ name: id,
10734
+ label: name,
10735
+ description,
10736
+ isRequired,
10737
+ testId,
10738
+ children: (field) => /* @__PURE__ */ jsx88(
10739
+ Textarea,
10740
+ {
10741
+ ...field,
10742
+ ref: textareaRef,
10743
+ className: cn("min-h-96 w-full", className),
10744
+ disabled: form.formState.isSubmitting,
10745
+ placeholder,
10746
+ "data-testid": testId
10747
+ }
10748
+ )
10616
10749
  }
10617
- ) }) });
10750
+ ) });
10618
10751
  }
10619
10752
  __name(FormTextarea, "FormTextarea");
10620
10753
 
@@ -10754,7 +10887,7 @@ __name(UserAvatarList, "UserAvatarList");
10754
10887
 
10755
10888
  // src/features/user/components/widgets/UserSearchPopover.tsx
10756
10889
  import { RefreshCwIcon, SearchIcon as SearchIcon3, XIcon as XIcon7 } from "lucide-react";
10757
- import { useTranslations as useTranslations18 } from "next-intl";
10890
+ import { useTranslations as useTranslations19 } from "next-intl";
10758
10891
  import { useEffect as useEffect26, useState as useState29 } from "react";
10759
10892
 
10760
10893
  // src/features/user/hooks/useUserSearch.ts
@@ -10803,13 +10936,13 @@ var useUserSearch = /* @__PURE__ */ __name(() => {
10803
10936
  }, "useUserSearch");
10804
10937
 
10805
10938
  // src/features/user/hooks/useUserTableStructure.tsx
10806
- import { useTranslations as useTranslations17 } from "next-intl";
10807
- import { useMemo as useMemo14 } from "react";
10939
+ import { useTranslations as useTranslations18 } from "next-intl";
10940
+ import { useMemo as useMemo15 } from "react";
10808
10941
  import { Fragment as Fragment11, jsx as jsx94, jsxs as jsxs59 } from "react/jsx-runtime";
10809
10942
  var useUserTableStructure = /* @__PURE__ */ __name((params) => {
10810
- const t = useTranslations17();
10943
+ const t = useTranslations18();
10811
10944
  const generateUrl = usePageUrlGenerator();
10812
- const tableData = useMemo14(() => {
10945
+ const tableData = useMemo15(() => {
10813
10946
  return params.data.map((user) => {
10814
10947
  const entry = {
10815
10948
  jsonApiData: user
@@ -10894,16 +11027,16 @@ var useUserTableStructure = /* @__PURE__ */ __name((params) => {
10894
11027
  title: t(`common.date.create`)
10895
11028
  })
10896
11029
  };
10897
- const columns = useMemo14(() => {
11030
+ const columns = useMemo15(() => {
10898
11031
  return params.fields.map((field) => fieldColumnMap[field]?.()).filter((col) => col !== void 0);
10899
11032
  }, [params.fields, fieldColumnMap, t, generateUrl]);
10900
- return useMemo14(() => ({ data: tableData, columns }), [tableData, columns]);
11033
+ return useMemo15(() => ({ data: tableData, columns }), [tableData, columns]);
10901
11034
  }, "useUserTableStructure");
10902
11035
 
10903
11036
  // src/features/user/components/widgets/UserSearchPopover.tsx
10904
11037
  import { jsx as jsx95, jsxs as jsxs60 } from "react/jsx-runtime";
10905
11038
  var UserSearchPopover = /* @__PURE__ */ __name(({ children, onSelect, align = "start", className }) => {
10906
- const t = useTranslations18();
11039
+ const t = useTranslations19();
10907
11040
  const [isOpen, setIsOpen] = useState29(false);
10908
11041
  const { users, searchQuery, setSearchQuery, isLoading, loadUsers, clearSearch } = useUserSearch();
10909
11042
  useEffect26(() => {
@@ -10962,7 +11095,7 @@ var UserSearchPopover = /* @__PURE__ */ __name(({ children, onSelect, align = "s
10962
11095
  // src/features/user/components/forms/UserSelector.tsx
10963
11096
  import { Fragment as Fragment12, jsx as jsx96, jsxs as jsxs61 } from "react/jsx-runtime";
10964
11097
  function UserSelector({ id, form, label, placeholder, onChange, isRequired = false }) {
10965
- const t = useTranslations19();
11098
+ const t = useTranslations20();
10966
11099
  const [open, setOpen] = useState30(false);
10967
11100
  const searchTermRef = useRef18("");
10968
11101
  const [searchTerm, setSearchTerm] = useState30("");
@@ -11069,7 +11202,7 @@ var UserContext = createContext8(void 0);
11069
11202
  var UserProvider = /* @__PURE__ */ __name(({ children, dehydratedUser }) => {
11070
11203
  const generateUrl = usePageUrlGenerator();
11071
11204
  const { hasPermissionToModule } = useCurrentUserContext();
11072
- const t = useTranslations20();
11205
+ const t = useTranslations21();
11073
11206
  const [user, setUser] = useState31(
11074
11207
  dehydratedUser ? rehydrate(Modules.User, dehydratedUser) : void 0
11075
11208
  );
@@ -11127,11 +11260,11 @@ var useUserContext = /* @__PURE__ */ __name(() => {
11127
11260
  }, "useUserContext");
11128
11261
 
11129
11262
  // src/features/user/components/containers/AllUsersListContainer.tsx
11130
- import { useTranslations as useTranslations21 } from "next-intl";
11263
+ import { useTranslations as useTranslations22 } from "next-intl";
11131
11264
  import { jsx as jsx98 } from "react/jsx-runtime";
11132
11265
  function AllUsersListContainerInternal() {
11133
11266
  const { hasPermissionToModule } = useCurrentUserContext();
11134
- const t = useTranslations21();
11267
+ const t = useTranslations22();
11135
11268
  if (!hasPermissionToModule({ module: Modules.User, action: "delete" /* Delete */ })) return /* @__PURE__ */ jsx98(CompanyUsersList, {});
11136
11269
  const tabs = [
11137
11270
  {
@@ -11156,7 +11289,7 @@ function AllUsersListContainer() {
11156
11289
  __name(AllUsersListContainer, "AllUsersListContainer");
11157
11290
 
11158
11291
  // src/features/user/components/details/UserContent.tsx
11159
- import { useTranslations as useTranslations22 } from "next-intl";
11292
+ import { useTranslations as useTranslations23 } from "next-intl";
11160
11293
 
11161
11294
  // src/components/contents/AttributeElement.tsx
11162
11295
  import { jsx as jsx99, jsxs as jsxs62 } from "react/jsx-runtime";
@@ -11172,7 +11305,7 @@ __name(AttributeElement, "AttributeElement");
11172
11305
  import { BriefcaseIcon, MailIcon as MailIcon2, PhoneIcon } from "lucide-react";
11173
11306
  import { Fragment as Fragment13, jsx as jsx100, jsxs as jsxs63 } from "react/jsx-runtime";
11174
11307
  function UserContent({ user }) {
11175
- const t = useTranslations22();
11308
+ const t = useTranslations23();
11176
11309
  const generateUrl = usePageUrlGenerator();
11177
11310
  const { setUser } = useUserContext();
11178
11311
  const hasBio = !!user.bio;
@@ -11233,12 +11366,12 @@ function UserIndexDetails() {
11233
11366
  __name(UserIndexDetails, "UserIndexDetails");
11234
11367
 
11235
11368
  // src/features/user/components/details/UserStandaloneDetails.tsx
11236
- import { useTranslations as useTranslations23 } from "next-intl";
11369
+ import { useTranslations as useTranslations24 } from "next-intl";
11237
11370
  import Image4 from "next/image";
11238
11371
  import { Fragment as Fragment14, jsx as jsx102, jsxs as jsxs65 } from "react/jsx-runtime";
11239
11372
  function UserStanadaloneDetails({ user }) {
11240
11373
  const generateUrl = usePageUrlGenerator();
11241
- const t = useTranslations23();
11374
+ const t = useTranslations24();
11242
11375
  const { title } = useSharedContext();
11243
11376
  let roles = /* @__PURE__ */ jsx102(Fragment14, {});
11244
11377
  if (user.roles && user.roles.length > 0) {
@@ -11305,10 +11438,10 @@ function UsersListContainer({ fullWidth }) {
11305
11438
  __name(UsersListContainer, "UsersListContainer");
11306
11439
 
11307
11440
  // src/features/user/components/lists/AdminUsersList.tsx
11308
- import { useTranslations as useTranslations24 } from "next-intl";
11441
+ import { useTranslations as useTranslations25 } from "next-intl";
11309
11442
  import { jsx as jsx106 } from "react/jsx-runtime";
11310
11443
  function AdminUsersListInternal({ company }) {
11311
- const t = useTranslations24();
11444
+ const t = useTranslations25();
11312
11445
  const data = useDataListRetriever({
11313
11446
  retriever: /* @__PURE__ */ __name((params) => UserService.findManyForAmin(params), "retriever"),
11314
11447
  retrieverParams: { companyId: company.id },
@@ -11334,12 +11467,12 @@ function AdminUsersList() {
11334
11467
  __name(AdminUsersList, "AdminUsersList");
11335
11468
 
11336
11469
  // src/features/user/components/lists/CompanyUsersList.tsx
11337
- import { useTranslations as useTranslations25 } from "next-intl";
11470
+ import { useTranslations as useTranslations26 } from "next-intl";
11338
11471
  import { useEffect as useEffect28 } from "react";
11339
11472
  import { jsx as jsx107 } from "react/jsx-runtime";
11340
11473
  function CompanyUsersList({ isDeleted, fullWidth }) {
11341
11474
  const { company } = useCurrentUserContext();
11342
- const t = useTranslations25();
11475
+ const t = useTranslations26();
11343
11476
  const data = useDataListRetriever({
11344
11477
  ready: !!company,
11345
11478
  retriever: /* @__PURE__ */ __name((params) => UserService.findAllUsers(params), "retriever"),
@@ -11394,10 +11527,10 @@ function ContributorsList({ content }) {
11394
11527
  __name(ContributorsList, "ContributorsList");
11395
11528
 
11396
11529
  // src/features/user/components/lists/RelevantUsersList.tsx
11397
- import { useTranslations as useTranslations26 } from "next-intl";
11530
+ import { useTranslations as useTranslations27 } from "next-intl";
11398
11531
  import { jsx as jsx109 } from "react/jsx-runtime";
11399
11532
  function RelevantUsersList({ id }) {
11400
- const t = useTranslations26();
11533
+ const t = useTranslations27();
11401
11534
  const data = useDataListRetriever({
11402
11535
  module: Modules.User,
11403
11536
  retriever: /* @__PURE__ */ __name((params) => UserService.findRelevant(params), "retriever"),
@@ -11416,10 +11549,10 @@ function RelevantUsersList({ id }) {
11416
11549
  __name(RelevantUsersList, "RelevantUsersList");
11417
11550
 
11418
11551
  // src/features/user/components/lists/RoleUsersList.tsx
11419
- import { useTranslations as useTranslations27 } from "next-intl";
11552
+ import { useTranslations as useTranslations28 } from "next-intl";
11420
11553
  import { jsx as jsx110 } from "react/jsx-runtime";
11421
11554
  function RoleUsersList({ role }) {
11422
- const t = useTranslations27();
11555
+ const t = useTranslations28();
11423
11556
  const data = useDataListRetriever({
11424
11557
  retriever: /* @__PURE__ */ __name((params) => UserService.findAllUsersByRole(params), "retriever"),
11425
11558
  retrieverParams: { roleId: role.id },
@@ -11438,13 +11571,13 @@ function RoleUsersList({ role }) {
11438
11571
  __name(RoleUsersList, "RoleUsersList");
11439
11572
 
11440
11573
  // src/features/user/components/lists/UserListInAdd.tsx
11441
- import React19 from "react";
11574
+ import React20 from "react";
11442
11575
  import { Fragment as Fragment15, jsx as jsx111, jsxs as jsxs67 } from "react/jsx-runtime";
11443
11576
  function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
11444
11577
  return /* @__PURE__ */ jsx111(Fragment15, { children: data.data !== void 0 && data.data.filter(
11445
11578
  (user) => existingUsers && !existingUsers.find((existingUser) => existingUser.id === user.id)
11446
11579
  ).map((user) => {
11447
- return /* @__PURE__ */ jsx111(React19.Fragment, { children: /* @__PURE__ */ jsx111(
11580
+ return /* @__PURE__ */ jsx111(React20.Fragment, { children: /* @__PURE__ */ jsx111(
11448
11581
  CommandItem,
11449
11582
  {
11450
11583
  className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
@@ -11471,7 +11604,7 @@ function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
11471
11604
  __name(UserListInAdd, "UserListInAdd");
11472
11605
 
11473
11606
  // src/features/user/components/lists/UsersList.tsx
11474
- import { useTranslations as useTranslations28 } from "next-intl";
11607
+ import { useTranslations as useTranslations29 } from "next-intl";
11475
11608
  import { jsx as jsx112 } from "react/jsx-runtime";
11476
11609
  function UsersList({
11477
11610
  data,
@@ -11480,7 +11613,7 @@ function UsersList({
11480
11613
  hideOptions: _hideOptions,
11481
11614
  showRelevance: _showRelevance
11482
11615
  }) {
11483
- const t = useTranslations28();
11616
+ const t = useTranslations29();
11484
11617
  return /* @__PURE__ */ jsx112(
11485
11618
  ContentListTable,
11486
11619
  {
@@ -11494,10 +11627,10 @@ function UsersList({
11494
11627
  __name(UsersList, "UsersList");
11495
11628
 
11496
11629
  // src/features/user/components/lists/UsersListByContentIds.tsx
11497
- import { useTranslations as useTranslations29 } from "next-intl";
11630
+ import { useTranslations as useTranslations30 } from "next-intl";
11498
11631
  import { jsx as jsx113 } from "react/jsx-runtime";
11499
11632
  function UsersListByContentIds({ contentIds }) {
11500
- const t = useTranslations29();
11633
+ const t = useTranslations30();
11501
11634
  const data = useDataListRetriever({
11502
11635
  module: Modules.User,
11503
11636
  retriever: /* @__PURE__ */ __name((params) => UserService.findManyByContentIds(params), "retriever"),
@@ -11517,7 +11650,7 @@ __name(UsersListByContentIds, "UsersListByContentIds");
11517
11650
 
11518
11651
  // src/features/company/components/details/CompanyContent.tsx
11519
11652
  import { MapPinIcon } from "lucide-react";
11520
- import { useTranslations as useTranslations31 } from "next-intl";
11653
+ import { useTranslations as useTranslations32 } from "next-intl";
11521
11654
  import Image5 from "next/image";
11522
11655
 
11523
11656
  // src/utils/fiscal-utils.ts
@@ -11531,10 +11664,10 @@ function parseFiscalData(fiscalDataJson) {
11531
11664
  __name(parseFiscalData, "parseFiscalData");
11532
11665
 
11533
11666
  // src/components/fiscal/ItalianFiscalDataDisplay.tsx
11534
- import { useTranslations as useTranslations30 } from "next-intl";
11667
+ import { useTranslations as useTranslations31 } from "next-intl";
11535
11668
  import { jsx as jsx114, jsxs as jsxs68 } from "react/jsx-runtime";
11536
11669
  function ItalianFiscalDataDisplay({ data }) {
11537
- const t = useTranslations30();
11670
+ const t = useTranslations31();
11538
11671
  return /* @__PURE__ */ jsxs68("div", { className: "grid grid-cols-1 gap-4 md:grid-cols-3", children: [
11539
11672
  data.codice_fiscale && /* @__PURE__ */ jsx114(AttributeElement, { title: t("common.fields.codice_fiscale.label"), value: data.codice_fiscale }),
11540
11673
  data.partita_iva && /* @__PURE__ */ jsx114(AttributeElement, { title: t("common.fields.partita_iva.label"), value: data.partita_iva }),
@@ -11570,7 +11703,7 @@ function hasAddressDetails(company) {
11570
11703
  }
11571
11704
  __name(hasAddressDetails, "hasAddressDetails");
11572
11705
  function CompanyContent({ company, actions }) {
11573
- const t = useTranslations31();
11706
+ const t = useTranslations32();
11574
11707
  if (!company) return null;
11575
11708
  return /* @__PURE__ */ jsxs69("div", { className: "flex flex-col gap-y-8", children: [
11576
11709
  /* @__PURE__ */ jsxs69("div", { className: "flex w-full items-center justify-between", children: [
@@ -11627,11 +11760,11 @@ __name(CompanyContent, "CompanyContent");
11627
11760
  // src/features/company/components/details/TokenStatusIndicator.tsx
11628
11761
  import { Battery, BatteryFull, BatteryLow, BatteryMedium, PlusCircle } from "lucide-react";
11629
11762
  import Link2 from "next/link";
11630
- import { useTranslations as useTranslations32 } from "next-intl";
11763
+ import { useTranslations as useTranslations33 } from "next-intl";
11631
11764
  import { jsx as jsx117, jsxs as jsxs70 } from "react/jsx-runtime";
11632
11765
  function TokenStatusIndicator({ className, size = "md", showExtraPages = true }) {
11633
11766
  const { company } = useCurrentUserContext();
11634
- const t = useTranslations32();
11767
+ const t = useTranslations33();
11635
11768
  if (!company) return null;
11636
11769
  const monthlyTokens = company.monthlyTokens;
11637
11770
  const availableMonthlyTokens = company.availableMonthlyTokens;
@@ -11776,7 +11909,7 @@ __name(CompanyContainer, "CompanyContainer");
11776
11909
  // src/features/company/components/forms/CompanyConfigurationEditor.tsx
11777
11910
  import { zodResolver as zodResolver2 } from "@hookform/resolvers/zod";
11778
11911
  import { Settings2Icon } from "lucide-react";
11779
- import { useTranslations as useTranslations33 } from "next-intl";
11912
+ import { useTranslations as useTranslations34 } from "next-intl";
11780
11913
  import { useForm as useForm2 } from "react-hook-form";
11781
11914
  import { jsx as jsx121, jsxs as jsxs73 } from "react/jsx-runtime";
11782
11915
  function CompanyConfigurationEditorInternal({
@@ -11786,7 +11919,7 @@ function CompanyConfigurationEditorInternal({
11786
11919
  buildPayload,
11787
11920
  children
11788
11921
  }) {
11789
- const t = useTranslations33();
11922
+ const t = useTranslations34();
11790
11923
  const { setUser } = useCurrentUserContext();
11791
11924
  const form = useForm2({
11792
11925
  resolver: zodResolver2(formSchema),
@@ -11837,11 +11970,11 @@ __name(CompanyConfigurationEditor, "CompanyConfigurationEditor");
11837
11970
 
11838
11971
  // src/features/company/components/forms/CompanyDeleter.tsx
11839
11972
  import { LoaderCircleIcon as LoaderCircleIcon2, Trash2Icon as Trash2Icon2 } from "lucide-react";
11840
- import { useTranslations as useTranslations34 } from "next-intl";
11973
+ import { useTranslations as useTranslations35 } from "next-intl";
11841
11974
  import { useState as useState32 } from "react";
11842
11975
  import { Fragment as Fragment17, jsx as jsx122, jsxs as jsxs74 } from "react/jsx-runtime";
11843
11976
  function CompanyDeleterInternal({ company, isAdministrator: isAdministrator2 }) {
11844
- const t = useTranslations34();
11977
+ const t = useTranslations35();
11845
11978
  const generateUrl = usePageUrlGenerator();
11846
11979
  const [open, setOpen] = useState32(false);
11847
11980
  const [finalWarningOpen, setFinalWarningOpen] = useState32(false);
@@ -11977,9 +12110,9 @@ __name(CompanyDeleter, "CompanyDeleter");
11977
12110
  // src/features/company/components/forms/CompanyEditor.tsx
11978
12111
  import { zodResolver as zodResolver3 } from "@hookform/resolvers/zod";
11979
12112
  import { UploadIcon as UploadIcon3 } from "lucide-react";
11980
- import { useTranslations as useTranslations35 } from "next-intl";
12113
+ import { useTranslations as useTranslations36 } from "next-intl";
11981
12114
  import Image6 from "next/image";
11982
- import { useCallback as useCallback19, useEffect as useEffect29, useMemo as useMemo15, useRef as useRef19, useState as useState33 } from "react";
12115
+ import { useCallback as useCallback19, useEffect as useEffect29, useMemo as useMemo16, useRef as useRef19, useState as useState33 } from "react";
11983
12116
  import { useForm as useForm3 } from "react-hook-form";
11984
12117
  import { v4 as v42 } from "uuid";
11985
12118
  import { z as z2 } from "zod";
@@ -12000,7 +12133,7 @@ function CompanyEditorInternal({
12000
12133
  const [file, setFile] = useState33(null);
12001
12134
  const [files, setFiles] = useState33(null);
12002
12135
  const [contentType, setContentType] = useState33(null);
12003
- const t = useTranslations35();
12136
+ const t = useTranslations36();
12004
12137
  const fiscalRef = useRef19(null);
12005
12138
  const addressComponentsRef = useRef19({});
12006
12139
  const canAccessFeatures = hasRole(getRoleId().Administrator) || hasRole(getRoleId().CompanyAdministrator) && process.env.NEXT_PUBLIC_PRIVATE_INSTALLATION?.toLowerCase() === "true";
@@ -12048,7 +12181,7 @@ function CompanyEditorInternal({
12048
12181
  setContentType(null);
12049
12182
  }
12050
12183
  }, [file]);
12051
- const formSchema = useMemo15(
12184
+ const formSchema = useMemo16(
12052
12185
  () => z2.object({
12053
12186
  id: z2.uuidv4(),
12054
12187
  name: z2.string().min(1, {
@@ -12187,10 +12320,10 @@ function CompanyEditor(props) {
12187
12320
  __name(CompanyEditor, "CompanyEditor");
12188
12321
 
12189
12322
  // src/features/company/components/lists/CompaniesList.tsx
12190
- import { useTranslations as useTranslations36 } from "next-intl";
12323
+ import { useTranslations as useTranslations37 } from "next-intl";
12191
12324
  import { jsx as jsx124 } from "react/jsx-runtime";
12192
12325
  function CompaniesList() {
12193
- const t = useTranslations36();
12326
+ const t = useTranslations37();
12194
12327
  const data = useDataListRetriever({
12195
12328
  retriever: /* @__PURE__ */ __name((params) => CompanyService.findMany(params), "retriever"),
12196
12329
  retrieverParams: {},
@@ -12220,7 +12353,7 @@ var defaultContextValue2 = {
12220
12353
  };
12221
12354
  var CompanyProvider = /* @__PURE__ */ __name(({ children, dehydratedCompany, configurationEditorSlot }) => {
12222
12355
  const generateUrl = usePageUrlGenerator();
12223
- const t = useTranslations37();
12356
+ const t = useTranslations38();
12224
12357
  const { hasPermissionToModule, hasRole } = useCurrentUserContext();
12225
12358
  const [company, setCompany] = useState34(
12226
12359
  dehydratedCompany ? rehydrate(Modules.Company, dehydratedCompany) : void 0
@@ -12266,11 +12399,11 @@ var useCompanyContext = /* @__PURE__ */ __name(() => {
12266
12399
  }, "useCompanyContext");
12267
12400
 
12268
12401
  // src/features/notification/contexts/NotificationContext.tsx
12269
- import { useTranslations as useTranslations39 } from "next-intl";
12402
+ import { useTranslations as useTranslations40 } from "next-intl";
12270
12403
  import { createContext as createContext10, useCallback as useCallback20, useContext as useContext11, useEffect as useEffect31, useRef as useRef20, useState as useState36 } from "react";
12271
12404
 
12272
12405
  // src/features/notification/components/notifications/Notification.tsx
12273
- import { useTranslations as useTranslations38 } from "next-intl";
12406
+ import { useTranslations as useTranslations39 } from "next-intl";
12274
12407
  import { useEffect as useEffect30, useState as useState35 } from "react";
12275
12408
  import { jsx as jsx126, jsxs as jsxs76 } from "react/jsx-runtime";
12276
12409
  var generateNotificationData = /* @__PURE__ */ __name((params) => {
@@ -12309,7 +12442,7 @@ __name(NotificationToast, "NotificationToast");
12309
12442
  function NotificationMenuItem({ notification, closePopover }) {
12310
12443
  const generateUrl = usePageUrlGenerator();
12311
12444
  const [isRead, setIsRead] = useState35(false);
12312
- const t = useTranslations38();
12445
+ const t = useTranslations39();
12313
12446
  useEffect30(() => {
12314
12447
  setIsRead(notification.isRead);
12315
12448
  }, []);
@@ -12335,7 +12468,7 @@ __name(NotificationMenuItem, "NotificationMenuItem");
12335
12468
  import { jsx as jsx127 } from "react/jsx-runtime";
12336
12469
  var NotificationContext = createContext10(void 0);
12337
12470
  var NotificationContextProvider = /* @__PURE__ */ __name(({ children }) => {
12338
- const t = useTranslations39();
12471
+ const t = useTranslations40();
12339
12472
  const router = useI18nRouter();
12340
12473
  const [notifications, setNotifications] = useState36([]);
12341
12474
  const [isLoading, setIsLoading] = useState36(false);
@@ -12698,13 +12831,13 @@ function useOnboarding() {
12698
12831
  __name(useOnboarding, "useOnboarding");
12699
12832
 
12700
12833
  // src/features/role/contexts/RoleContext.tsx
12701
- import { useTranslations as useTranslations40 } from "next-intl";
12834
+ import { useTranslations as useTranslations41 } from "next-intl";
12702
12835
  import { createContext as createContext12, useContext as useContext13, useState as useState38 } from "react";
12703
12836
  import { jsx as jsx130 } from "react/jsx-runtime";
12704
12837
  var RoleContext = createContext12(void 0);
12705
12838
  var RoleProvider = /* @__PURE__ */ __name(({ children, dehydratedRole }) => {
12706
12839
  const generateUrl = usePageUrlGenerator();
12707
- const t = useTranslations40();
12840
+ const t = useTranslations41();
12708
12841
  const [role, setRole] = useState38(
12709
12842
  dehydratedRole ? rehydrate(Modules.Role, dehydratedRole) : void 0
12710
12843
  );
@@ -12767,10 +12900,10 @@ var useSharedContext = /* @__PURE__ */ __name(() => {
12767
12900
  }, "useSharedContext");
12768
12901
 
12769
12902
  // src/features/how-to/components/forms/HowToDeleter.tsx
12770
- import { useTranslations as useTranslations41 } from "next-intl";
12903
+ import { useTranslations as useTranslations42 } from "next-intl";
12771
12904
  import { jsx as jsx132 } from "react/jsx-runtime";
12772
12905
  function HowToDeleterInternal({ howTo }) {
12773
- const t = useTranslations41();
12906
+ const t = useTranslations42();
12774
12907
  const generateUrl = usePageUrlGenerator();
12775
12908
  if (!howTo) return null;
12776
12909
  return /* @__PURE__ */ jsx132(
@@ -12791,14 +12924,14 @@ __name(HowToDeleter, "HowToDeleter");
12791
12924
  // src/features/how-to/components/forms/HowToEditor.tsx
12792
12925
  import { zodResolver as zodResolver4 } from "@hookform/resolvers/zod";
12793
12926
  import { PlusIcon, SearchIcon as SearchIcon5, XIcon as XIcon9 } from "lucide-react";
12794
- import { useTranslations as useTranslations43 } from "next-intl";
12795
- import { useCallback as useCallback22, useEffect as useEffect33, useMemo as useMemo16, useRef as useRef22, useState as useState39 } from "react";
12927
+ import { useTranslations as useTranslations44 } from "next-intl";
12928
+ import { useCallback as useCallback22, useEffect as useEffect33, useMemo as useMemo17, useRef as useRef22, useState as useState39 } from "react";
12796
12929
  import { useForm as useForm4 } from "react-hook-form";
12797
12930
  import { v4 as v43 } from "uuid";
12798
12931
  import { z as z3 } from "zod";
12799
12932
 
12800
12933
  // src/features/how-to/components/forms/HowToMultiSelector.tsx
12801
- import { useTranslations as useTranslations42 } from "next-intl";
12934
+ import { useTranslations as useTranslations43 } from "next-intl";
12802
12935
  import { jsx as jsx133 } from "react/jsx-runtime";
12803
12936
  function HowToMultiSelector({
12804
12937
  id,
@@ -12809,7 +12942,7 @@ function HowToMultiSelector({
12809
12942
  onChange,
12810
12943
  isRequired = false
12811
12944
  }) {
12812
- const t = useTranslations42();
12945
+ const t = useTranslations43();
12813
12946
  return /* @__PURE__ */ jsx133(
12814
12947
  EntityMultiSelector,
12815
12948
  {
@@ -12844,7 +12977,7 @@ function PageSelector({
12844
12977
  const [open, setOpen] = useState39(false);
12845
12978
  const [search, setSearch] = useState39("");
12846
12979
  const selectedLabel = value ? allPageUrls.find((opt) => opt.id === value) : void 0;
12847
- const filteredOptions = useMemo16(() => {
12980
+ const filteredOptions = useMemo17(() => {
12848
12981
  const available = allPageUrls.filter((opt) => opt.id === value || !selectedPages.includes(opt.id));
12849
12982
  if (!search) return available;
12850
12983
  const term = search.toLowerCase();
@@ -12910,8 +13043,8 @@ function HowToEditorInternal({
12910
13043
  onDialogOpenChange
12911
13044
  }) {
12912
13045
  const router = useI18nRouter();
12913
- const t = useTranslations43();
12914
- const formSchema = useMemo16(
13046
+ const t = useTranslations44();
13047
+ const formSchema = useMemo17(
12915
13048
  () => z3.object({
12916
13049
  id: z3.string().uuid(),
12917
13050
  name: z3.string().min(1, { message: t(`howto.fields.name.error`) }),
@@ -12973,7 +13106,7 @@ function HowToEditorInternal({
12973
13106
  },
12974
13107
  [form]
12975
13108
  );
12976
- const allPageUrls = useMemo16(() => ModuleRegistry.getAllPageUrls(), []);
13109
+ const allPageUrls = useMemo17(() => ModuleRegistry.getAllPageUrls(), []);
12977
13110
  const pages = form.watch("pages");
12978
13111
  const addPage = /* @__PURE__ */ __name(() => {
12979
13112
  form.setValue("pages", [...pages, ""], { shouldDirty: true });
@@ -13154,13 +13287,13 @@ function HowToEditor(props) {
13154
13287
  __name(HowToEditor, "HowToEditor");
13155
13288
 
13156
13289
  // src/features/how-to/contexts/HowToContext.tsx
13157
- import { useTranslations as useTranslations44 } from "next-intl";
13290
+ import { useTranslations as useTranslations45 } from "next-intl";
13158
13291
  import { createContext as createContext14, useContext as useContext15, useState as useState40 } from "react";
13159
13292
  import { jsx as jsx135 } from "react/jsx-runtime";
13160
13293
  var HowToContext = createContext14(void 0);
13161
13294
  var HowToProvider = /* @__PURE__ */ __name(({ children, dehydratedHowTo }) => {
13162
13295
  const generateUrl = usePageUrlGenerator();
13163
- const t = useTranslations44();
13296
+ const t = useTranslations45();
13164
13297
  const [howTo, setHowTo] = useState40(
13165
13298
  dehydratedHowTo ? rehydrate(Modules.HowTo, dehydratedHowTo) : void 0
13166
13299
  );
@@ -13219,8 +13352,8 @@ var useHowToContext = /* @__PURE__ */ __name(() => {
13219
13352
 
13220
13353
  // src/features/rbac/contexts/RbacContext.tsx
13221
13354
  import { DownloadIcon, Loader2Icon as Loader2Icon3 } from "lucide-react";
13222
- import { useTranslations as useTranslations45 } from "next-intl";
13223
- import { createContext as createContext15, useCallback as useCallback23, useContext as useContext16, useEffect as useEffect34, useMemo as useMemo17, useState as useState41 } from "react";
13355
+ import { useTranslations as useTranslations46 } from "next-intl";
13356
+ import { createContext as createContext15, useCallback as useCallback23, useContext as useContext16, useEffect as useEffect34, useMemo as useMemo18, useState as useState41 } from "react";
13224
13357
  import { jsx as jsx136, jsxs as jsxs79 } from "react/jsx-runtime";
13225
13358
  var DEFAULT_OUTPUT_PATH = "apps/api/src/rbac/permissions.ts";
13226
13359
  function upsertToken(tokens, action, scope) {
@@ -13242,7 +13375,7 @@ var RbacProvider = /* @__PURE__ */ __name(({
13242
13375
  outputPath = DEFAULT_OUTPUT_PATH
13243
13376
  }) => {
13244
13377
  const generateUrl = usePageUrlGenerator();
13245
- const t = useTranslations45();
13378
+ const t = useTranslations46();
13246
13379
  const [matrix, setMatrix] = useState41(null);
13247
13380
  const [modulePaths, setModulePaths] = useState41({});
13248
13381
  const [loading, setLoading] = useState41(true);
@@ -13329,7 +13462,7 @@ var RbacProvider = /* @__PURE__ */ __name(({
13329
13462
  if (functions.length > 0) response.functions = functions;
13330
13463
  return response;
13331
13464
  }, "title");
13332
- const contextValue = useMemo17(
13465
+ const contextValue = useMemo18(
13333
13466
  () => ({
13334
13467
  matrix,
13335
13468
  modulePaths,
@@ -13354,8 +13487,8 @@ var useRbacContext = /* @__PURE__ */ __name(() => {
13354
13487
  }, "useRbacContext");
13355
13488
 
13356
13489
  // src/features/assistant/contexts/AssistantContext.tsx
13357
- import { useTranslations as useTranslations46 } from "next-intl";
13358
- import { createContext as createContext16, useCallback as useCallback24, useContext as useContext17, useEffect as useEffect35, useMemo as useMemo18, useState as useState42 } from "react";
13490
+ import { useTranslations as useTranslations47 } from "next-intl";
13491
+ import { createContext as createContext16, useCallback as useCallback24, useContext as useContext17, useEffect as useEffect35, useMemo as useMemo19, useState as useState42 } from "react";
13359
13492
  import { jsx as jsx137 } from "react/jsx-runtime";
13360
13493
  var AssistantContext = createContext16(void 0);
13361
13494
  function stripOptimistic(list) {
@@ -13378,7 +13511,7 @@ function withPatchedTitle(source, title) {
13378
13511
  }
13379
13512
  __name(withPatchedTitle, "withPatchedTitle");
13380
13513
  function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages, manageUrl = true }) {
13381
- const t = useTranslations46();
13514
+ const t = useTranslations47();
13382
13515
  const generateUrl = usePageUrlGenerator();
13383
13516
  const [assistant, setAssistant] = useState42(
13384
13517
  () => dehydratedAssistant ? rehydrate(Modules.Assistant, dehydratedAssistant) : void 0
@@ -13526,7 +13659,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
13526
13659
  cancelled = true;
13527
13660
  };
13528
13661
  }, []);
13529
- const value = useMemo18(
13662
+ const value = useMemo19(
13530
13663
  () => ({
13531
13664
  assistant,
13532
13665
  messages,
@@ -13583,13 +13716,13 @@ function useAssistantContext() {
13583
13716
  __name(useAssistantContext, "useAssistantContext");
13584
13717
 
13585
13718
  // src/contexts/CommonContext.tsx
13586
- import { useTranslations as useTranslations47 } from "next-intl";
13719
+ import { useTranslations as useTranslations48 } from "next-intl";
13587
13720
  import { createContext as createContext17, useContext as useContext18 } from "react";
13588
13721
  import { jsx as jsx138 } from "react/jsx-runtime";
13589
13722
  var CommonContext = createContext17(void 0);
13590
13723
  var CommonProvider = /* @__PURE__ */ __name(({ children }) => {
13591
13724
  const { company } = useCurrentUserContext();
13592
- const t = useTranslations47();
13725
+ const t = useTranslations48();
13593
13726
  const breadcrumb = /* @__PURE__ */ __name(() => {
13594
13727
  const response = [];
13595
13728
  return response;
@@ -13645,7 +13778,7 @@ __name(useHeaderLeftContent, "useHeaderLeftContent");
13645
13778
 
13646
13779
  // src/components/EditableAvatar.tsx
13647
13780
  import { PencilIcon as PencilIcon3, Trash2Icon as Trash2Icon3 } from "lucide-react";
13648
- import { useTranslations as useTranslations48 } from "next-intl";
13781
+ import { useTranslations as useTranslations49 } from "next-intl";
13649
13782
  import { useCallback as useCallback25, useRef as useRef23, useState as useState43 } from "react";
13650
13783
  import { jsx as jsx141, jsxs as jsxs80 } from "react/jsx-runtime";
13651
13784
  function EditableAvatar({
@@ -13659,7 +13792,7 @@ function EditableAvatar({
13659
13792
  fallbackClassName
13660
13793
  }) {
13661
13794
  const { company } = useCurrentUserContext();
13662
- const t = useTranslations48();
13795
+ const t = useTranslations49();
13663
13796
  const fileInputRef = useRef23(null);
13664
13797
  const [optimisticImage, setOptimisticImage] = useState43(null);
13665
13798
  const [isUploading, setIsUploading] = useState43(false);
@@ -13795,7 +13928,7 @@ function TableCellAvatar({ image, name, className }) {
13795
13928
  __name(TableCellAvatar, "TableCellAvatar");
13796
13929
 
13797
13930
  // src/components/navigations/Breadcrumb.tsx
13798
- import { useTranslations as useTranslations49 } from "next-intl";
13931
+ import { useTranslations as useTranslations50 } from "next-intl";
13799
13932
  import { Fragment as Fragment20, useState as useState44 } from "react";
13800
13933
  import { ChevronDownIcon as ChevronDownIcon8 } from "lucide-react";
13801
13934
  import { Fragment as Fragment21, jsx as jsx143, jsxs as jsxs82 } from "react/jsx-runtime";
@@ -13850,7 +13983,7 @@ function BreadcrumbMobile({
13850
13983
  __name(BreadcrumbMobile, "BreadcrumbMobile");
13851
13984
  function BreadcrumbNavigation({ items }) {
13852
13985
  const generateUrl = usePageUrlGenerator();
13853
- const t = useTranslations49();
13986
+ const t = useTranslations50();
13854
13987
  const isMobile = useIsMobile();
13855
13988
  if (isMobile) {
13856
13989
  return /* @__PURE__ */ jsx143(BreadcrumbMobile, { items, generateUrl, t });
@@ -13970,11 +14103,11 @@ __name(PageSection, "PageSection");
13970
14103
  // src/components/navigations/RecentPagesNavigator.tsx
13971
14104
  import { useAtomValue } from "jotai";
13972
14105
  import { HistoryIcon } from "lucide-react";
13973
- import { useTranslations as useTranslations50 } from "next-intl";
14106
+ import { useTranslations as useTranslations51 } from "next-intl";
13974
14107
  import { jsx as jsx148, jsxs as jsxs86 } from "react/jsx-runtime";
13975
14108
  function RecentPagesNavigator() {
13976
14109
  const recentPages = useAtomValue(recentPagesAtom);
13977
- const t = useTranslations50();
14110
+ const t = useTranslations51();
13978
14111
  const { state } = useSidebar();
13979
14112
  if (recentPages.length === 0) {
13980
14113
  return null;
@@ -14007,7 +14140,7 @@ __name(PageContainer, "PageContainer");
14007
14140
 
14008
14141
  // src/components/containers/ReactMarkdownContainer.tsx
14009
14142
  import { ChevronDown as ChevronDown2, ChevronUp } from "lucide-react";
14010
- import { useTranslations as useTranslations51 } from "next-intl";
14143
+ import { useTranslations as useTranslations52 } from "next-intl";
14011
14144
  import { useEffect as useEffect38, useRef as useRef24, useState as useState47 } from "react";
14012
14145
  import ReactMarkdown from "react-markdown";
14013
14146
  import remarkGfm from "remark-gfm";
@@ -14018,7 +14151,7 @@ function ReactMarkdownContainer({
14018
14151
  initialLines = 4,
14019
14152
  size = "normal"
14020
14153
  }) {
14021
- const t = useTranslations51("ui.buttons");
14154
+ const t = useTranslations52("ui.buttons");
14022
14155
  const [isExpanded, setIsExpanded] = useState47(false);
14023
14156
  const [showExpandButton, setShowExpandButton] = useState47(false);
14024
14157
  const contentRef = useRef24(null);
@@ -14336,10 +14469,10 @@ function TabsContainer({
14336
14469
  __name(TabsContainer, "TabsContainer");
14337
14470
 
14338
14471
  // src/components/details/AllowedUsersDetails.tsx
14339
- import { useTranslations as useTranslations52 } from "next-intl";
14472
+ import { useTranslations as useTranslations53 } from "next-intl";
14340
14473
  import { jsx as jsx154, jsxs as jsxs92 } from "react/jsx-runtime";
14341
14474
  function AllowedUsersDetails({ showTitle, content }) {
14342
- const t = useTranslations52();
14475
+ const t = useTranslations53();
14343
14476
  return /* @__PURE__ */ jsxs92("div", { className: "mb-2 flex w-full flex-col gap-y-2", children: [
14344
14477
  showTitle && /* @__PURE__ */ jsx154("h3", { className: "text-xs font-semibold", children: t("common.permissions") }),
14345
14478
  /* @__PURE__ */ jsx154("div", { className: "flex w-full items-center justify-start gap-x-4", children: /* @__PURE__ */ jsx154(ContributorsList, { content }) })
@@ -14425,7 +14558,7 @@ __name(BlockNoteEditorMentionHoverCard, "BlockNoteEditorMentionHoverCard");
14425
14558
  // src/components/editors/BlockNoteEditorMentionInlineContent.tsx
14426
14559
  import { createReactInlineContentSpec } from "@blocknote/react";
14427
14560
  import Link3 from "next/link";
14428
- import React23 from "react";
14561
+ import React24 from "react";
14429
14562
  import { jsx as jsx156, jsxs as jsxs93 } from "react/jsx-runtime";
14430
14563
  var mentionDataAttrs = /* @__PURE__ */ __name((p) => ({
14431
14564
  "data-mention-id": p.id,
@@ -14447,7 +14580,7 @@ var createMentionInlineContentSpec = /* @__PURE__ */ __name((resolveFn, disableM
14447
14580
  displayName
14448
14581
  ] });
14449
14582
  }, "MentionExternalHTML");
14450
- const Mention = React23.memo(/* @__PURE__ */ __name(function Mention2(props) {
14583
+ const Mention = React24.memo(/* @__PURE__ */ __name(function Mention2(props) {
14451
14584
  const displayName = nameResolver?.(props.id, props.entityType, props.alias) ?? props.alias;
14452
14585
  if (disableMention) {
14453
14586
  const resolved2 = resolveFn?.(props.id, props.entityType, displayName);
@@ -14512,10 +14645,10 @@ var createMentionInlineContentSpec = /* @__PURE__ */ __name((resolveFn, disableM
14512
14645
  // src/components/editors/BlockNoteEditorSuggestionMenuController.tsx
14513
14646
  import { SuggestionMenuController } from "@blocknote/react";
14514
14647
  import { autoUpdate, flip, shift } from "@floating-ui/react";
14515
- import React24, { useCallback as useCallback28, useMemo as useMemo19 } from "react";
14648
+ import React25, { useCallback as useCallback28, useMemo as useMemo20 } from "react";
14516
14649
  import { jsx as jsx157 } from "react/jsx-runtime";
14517
- var MentionInsertContext = React24.createContext(null);
14518
- var useMentionInsert = /* @__PURE__ */ __name(() => React24.useContext(MentionInsertContext), "useMentionInsert");
14650
+ var MentionInsertContext = React25.createContext(null);
14651
+ var useMentionInsert = /* @__PURE__ */ __name(() => React25.useContext(MentionInsertContext), "useMentionInsert");
14519
14652
  var KEEP_OPEN_SENTINEL_TITLE = "__blocknote_mention_keep_open__";
14520
14653
  function BlockNoteEditorMentionSuggestionMenu({
14521
14654
  editor,
@@ -14564,7 +14697,7 @@ function BlockNoteEditorMentionSuggestionMenu({
14564
14697
  },
14565
14698
  [editor, mentionSearchFn, mentionSearchParams]
14566
14699
  );
14567
- const wrappedSuggestionMenuComponent = useMemo19(() => {
14700
+ const wrappedSuggestionMenuComponent = useMemo20(() => {
14568
14701
  if (!suggestionMenuComponent) return void 0;
14569
14702
  const Component2 = suggestionMenuComponent;
14570
14703
  const Wrapped = /* @__PURE__ */ __name((props) => {
@@ -14605,10 +14738,10 @@ __name(BlockNoteEditorMentionSuggestionMenu, "BlockNoteEditorMentionSuggestionMe
14605
14738
 
14606
14739
  // src/components/viewers/BlockNoteViewerContainer.tsx
14607
14740
  import dynamic2 from "next/dynamic";
14608
- import React25 from "react";
14741
+ import React26 from "react";
14609
14742
  import { jsx as jsx158 } from "react/jsx-runtime";
14610
14743
  var BlockNoteViewer = dynamic2(() => import("./BlockNoteViewer-OPSCTHKJ.mjs").then((m) => m.BlockNoteViewer), { ssr: false });
14611
- var BlockNoteViewerContainer = React25.memo(/* @__PURE__ */ __name(function ViewerContainer(props) {
14744
+ var BlockNoteViewerContainer = React26.memo(/* @__PURE__ */ __name(function ViewerContainer(props) {
14612
14745
  return /* @__PURE__ */ jsx158(BlockNoteViewer, { ...props });
14613
14746
  }, "ViewerContainer"));
14614
14747
 
@@ -14811,7 +14944,7 @@ var cellUrl = /* @__PURE__ */ __name((params) => {
14811
14944
  }, "cellUrl");
14812
14945
 
14813
14946
  // src/client/context/JsonApiProvider.tsx
14814
- import { useEffect as useEffect43, useMemo as useMemo20 } from "react";
14947
+ import { useEffect as useEffect43, useMemo as useMemo21 } from "react";
14815
14948
  import { jsx as jsx166 } from "react/jsx-runtime";
14816
14949
  function JsonApiProvider({ config, children }) {
14817
14950
  useEffect43(() => {
@@ -14819,7 +14952,7 @@ function JsonApiProvider({ config, children }) {
14819
14952
  config.bootstrapper();
14820
14953
  }
14821
14954
  }, [config.bootstrapper]);
14822
- const memoizedConfig = useMemo20(() => config, [config]);
14955
+ const memoizedConfig = useMemo21(() => config, [config]);
14823
14956
  return /* @__PURE__ */ jsx166(JsonApiContext.Provider, { value: memoizedConfig, children });
14824
14957
  }
14825
14958
  __name(JsonApiProvider, "JsonApiProvider");
@@ -15025,16 +15158,16 @@ function useJsonApiMutation(config) {
15025
15158
  __name(useJsonApiMutation, "useJsonApiMutation");
15026
15159
 
15027
15160
  // src/client/hooks/useRehydration.ts
15028
- import { useMemo as useMemo21 } from "react";
15161
+ import { useMemo as useMemo22 } from "react";
15029
15162
  function useRehydration(classKey, data) {
15030
- return useMemo21(() => {
15163
+ return useMemo22(() => {
15031
15164
  if (!data) return null;
15032
15165
  return RehydrationFactory.rehydrate(classKey, data);
15033
15166
  }, [classKey, data]);
15034
15167
  }
15035
15168
  __name(useRehydration, "useRehydration");
15036
15169
  function useRehydrationList(classKey, data) {
15037
- return useMemo21(() => {
15170
+ return useMemo22(() => {
15038
15171
  if (!data || data.length === 0) return [];
15039
15172
  return RehydrationFactory.rehydrateList(classKey, data);
15040
15173
  }, [classKey, data]);
@@ -15042,14 +15175,14 @@ function useRehydrationList(classKey, data) {
15042
15175
  __name(useRehydrationList, "useRehydrationList");
15043
15176
 
15044
15177
  // src/features/company/hooks/useCompanyTableStructure.tsx
15045
- import { useTranslations as useTranslations53 } from "next-intl";
15046
- import { useMemo as useMemo22 } from "react";
15178
+ import { useTranslations as useTranslations54 } from "next-intl";
15179
+ import { useMemo as useMemo23 } from "react";
15047
15180
  import { jsx as jsx167 } from "react/jsx-runtime";
15048
15181
  var useCompanyTableStructure = /* @__PURE__ */ __name((params) => {
15049
- const t = useTranslations53();
15182
+ const t = useTranslations54();
15050
15183
  const generateUrl = usePageUrlGenerator();
15051
15184
  const { hasRole } = useCurrentUserContext();
15052
- const tableData = useMemo22(() => {
15185
+ const tableData = useMemo23(() => {
15053
15186
  return params.data.map((company) => {
15054
15187
  const entry = {
15055
15188
  jsonApiData: company
@@ -15093,14 +15226,14 @@ var useCompanyTableStructure = /* @__PURE__ */ __name((params) => {
15093
15226
  title: t(`common.date.create`)
15094
15227
  })
15095
15228
  };
15096
- const columns = useMemo22(() => {
15229
+ const columns = useMemo23(() => {
15097
15230
  return params.fields.map((field) => fieldColumnMap[field]?.()).filter((col) => col !== void 0);
15098
15231
  }, [params.fields, fieldColumnMap, t, generateUrl, hasRole]);
15099
- return useMemo22(() => ({ data: tableData, columns }), [tableData, columns]);
15232
+ return useMemo23(() => ({ data: tableData, columns }), [tableData, columns]);
15100
15233
  }, "useCompanyTableStructure");
15101
15234
 
15102
15235
  // src/features/company/hooks/useSubscriptionStatus.ts
15103
- import { useMemo as useMemo23 } from "react";
15236
+ import { useMemo as useMemo24 } from "react";
15104
15237
  var TRIAL_DAYS = 14;
15105
15238
  var GRACE_DAYS = 3;
15106
15239
  var isAdministrator = /* @__PURE__ */ __name((currentUser) => {
@@ -15110,7 +15243,7 @@ var isAdministrator = /* @__PURE__ */ __name((currentUser) => {
15110
15243
  }, "isAdministrator");
15111
15244
  function useSubscriptionStatus() {
15112
15245
  const { company, currentUser } = useCurrentUserContext();
15113
- return useMemo23(() => {
15246
+ return useMemo24(() => {
15114
15247
  if (currentUser === null) {
15115
15248
  return {
15116
15249
  status: "loading",
@@ -15174,13 +15307,13 @@ function useSubscriptionStatus() {
15174
15307
  __name(useSubscriptionStatus, "useSubscriptionStatus");
15175
15308
 
15176
15309
  // src/features/role/hooks/useRoleTableStructure.tsx
15177
- import { useTranslations as useTranslations54 } from "next-intl";
15178
- import { useMemo as useMemo24 } from "react";
15310
+ import { useTranslations as useTranslations55 } from "next-intl";
15311
+ import { useMemo as useMemo25 } from "react";
15179
15312
  import { Fragment as Fragment24, jsx as jsx168 } from "react/jsx-runtime";
15180
15313
  var useRoleTableStructure = /* @__PURE__ */ __name((params) => {
15181
- const t = useTranslations54();
15314
+ const t = useTranslations55();
15182
15315
  const generateUrl = usePageUrlGenerator();
15183
- const tableData = useMemo24(() => {
15316
+ const tableData = useMemo25(() => {
15184
15317
  return params.data.map((role) => {
15185
15318
  const entry = {
15186
15319
  jsonApiData: role
@@ -15222,20 +15355,20 @@ var useRoleTableStructure = /* @__PURE__ */ __name((params) => {
15222
15355
  title: t(`common.date.create`)
15223
15356
  })
15224
15357
  };
15225
- const columns = useMemo24(() => {
15358
+ const columns = useMemo25(() => {
15226
15359
  return params.fields.map((field) => fieldColumnMap[field]?.()).filter((col) => col !== void 0);
15227
15360
  }, [params.fields, fieldColumnMap, t, generateUrl]);
15228
- return useMemo24(() => ({ data: tableData, columns }), [tableData, columns]);
15361
+ return useMemo25(() => ({ data: tableData, columns }), [tableData, columns]);
15229
15362
  }, "useRoleTableStructure");
15230
15363
 
15231
15364
  // src/features/content/hooks/useContentTableStructure.tsx
15232
- import { useTranslations as useTranslations55 } from "next-intl";
15233
- import { useMemo as useMemo25 } from "react";
15365
+ import { useTranslations as useTranslations56 } from "next-intl";
15366
+ import { useMemo as useMemo26 } from "react";
15234
15367
  import { Fragment as Fragment25, jsx as jsx169, jsxs as jsxs96 } from "react/jsx-runtime";
15235
15368
  var useContentTableStructure = /* @__PURE__ */ __name((params) => {
15236
- const t = useTranslations55();
15369
+ const t = useTranslations56();
15237
15370
  const generateUrl = usePageUrlGenerator();
15238
- const tableData = useMemo25(() => {
15371
+ const tableData = useMemo26(() => {
15239
15372
  return params.data.map((content) => {
15240
15373
  const entry = {
15241
15374
  jsonApiData: content
@@ -15320,7 +15453,7 @@ var useContentTableStructure = /* @__PURE__ */ __name((params) => {
15320
15453
  title: t(`common.date.update`)
15321
15454
  })
15322
15455
  };
15323
- const columns = useMemo25(() => {
15456
+ const columns = useMemo26(() => {
15324
15457
  return params.fields.map((field) => {
15325
15458
  const localHandler = fieldColumnMap[field];
15326
15459
  if (localHandler) return localHandler();
@@ -15329,7 +15462,7 @@ var useContentTableStructure = /* @__PURE__ */ __name((params) => {
15329
15462
  return void 0;
15330
15463
  }).filter((col) => col !== void 0);
15331
15464
  }, [params.fields, fieldColumnMap, t, generateUrl, params.context?.customCells]);
15332
- return useMemo25(() => ({ data: tableData, columns }), [tableData, columns]);
15465
+ return useMemo26(() => ({ data: tableData, columns }), [tableData, columns]);
15333
15466
  }, "useContentTableStructure");
15334
15467
 
15335
15468
  // src/features/oauth/hooks/useOAuthClients.ts
@@ -15628,15 +15761,15 @@ registerTableGenerator("companies", useCompanyTableStructure);
15628
15761
  // src/components/tables/ContentListTable.tsx
15629
15762
  import { flexRender, getCoreRowModel, getExpandedRowModel, useReactTable } from "@tanstack/react-table";
15630
15763
  import { ChevronLeft, ChevronRight } from "lucide-react";
15631
- import React27, { memo, useMemo as useMemo26, useState as useState57 } from "react";
15764
+ import React28, { memo, useMemo as useMemo27, useState as useState57 } from "react";
15632
15765
 
15633
15766
  // src/components/tables/ContentTableSearch.tsx
15634
15767
  import { RefreshCw, Search, X as X3 } from "lucide-react";
15635
- import { useTranslations as useTranslations56 } from "next-intl";
15768
+ import { useTranslations as useTranslations57 } from "next-intl";
15636
15769
  import { useCallback as useCallback34, useEffect as useEffect48, useRef as useRef28, useState as useState56 } from "react";
15637
15770
  import { jsx as jsx170, jsxs as jsxs97 } from "react/jsx-runtime";
15638
15771
  function ContentTableSearch({ data }) {
15639
- const t = useTranslations56();
15772
+ const t = useTranslations57();
15640
15773
  const searchTermRef = useRef28("");
15641
15774
  const inputRef = useRef28(null);
15642
15775
  const [searchTerm, setSearchTerm] = useState56("");
@@ -15747,7 +15880,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
15747
15880
  dataRetriever: data,
15748
15881
  context: props.context
15749
15882
  });
15750
- const columnVisibility = useMemo26(
15883
+ const columnVisibility = useMemo27(
15751
15884
  () => fields.reduce(
15752
15885
  (acc, columnId) => {
15753
15886
  acc[columnId] = true;
@@ -15772,7 +15905,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
15772
15905
  }
15773
15906
  });
15774
15907
  const rowModel = tableData ? table.getRowModel() : null;
15775
- const groupedRows = useMemo26(() => {
15908
+ const groupedRows = useMemo27(() => {
15776
15909
  if (!props.groupBy || !rowModel?.rows?.length) return null;
15777
15910
  const groupMap = /* @__PURE__ */ new Map();
15778
15911
  for (const row of rowModel.rows) {
@@ -15832,7 +15965,7 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
15832
15965
  return /* @__PURE__ */ jsx171(TableHead, { className: meta?.className, children: header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext()) }, header.id);
15833
15966
  }) }, headerGroup.id))
15834
15967
  ] }),
15835
- /* @__PURE__ */ jsx171(TableBody, { children: rowModel && rowModel.rows?.length ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ jsxs98(React27.Fragment, { children: [
15968
+ /* @__PURE__ */ jsx171(TableBody, { children: rowModel && rowModel.rows?.length ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ jsxs98(React28.Fragment, { children: [
15836
15969
  /* @__PURE__ */ jsx171(TableRow, { children: /* @__PURE__ */ jsx171(
15837
15970
  TableCell,
15838
15971
  {
@@ -15981,12 +16114,12 @@ function validateItalianTaxCode(value, type) {
15981
16114
  __name(validateItalianTaxCode, "validateItalianTaxCode");
15982
16115
 
15983
16116
  // src/components/fiscal/ItalianFiscalData.tsx
15984
- import { useTranslations as useTranslations57 } from "next-intl";
16117
+ import { useTranslations as useTranslations58 } from "next-intl";
15985
16118
  import { forwardRef as forwardRef8, useCallback as useCallback35, useImperativeHandle as useImperativeHandle2, useRef as useRef30, useState as useState58 } from "react";
15986
16119
  import { z as z4 } from "zod";
15987
16120
  import { jsx as jsx173, jsxs as jsxs100 } from "react/jsx-runtime";
15988
16121
  var ItalianFiscalData = forwardRef8(/* @__PURE__ */ __name(function ItalianFiscalData2({ initialData }, ref) {
15989
- const t = useTranslations57();
16122
+ const t = useTranslations58();
15990
16123
  const initialRef = useRef30(initialData);
15991
16124
  const [fiscalData, setFiscalData] = useState58(initialData);
15992
16125
  const fiscalDataRef = useRef30(initialData);
@@ -16095,12 +16228,12 @@ var ItalianFiscalData_default = ItalianFiscalData;
16095
16228
  import Image8 from "next/image";
16096
16229
 
16097
16230
  // src/features/auth/contexts/AuthContext.tsx
16098
- import { createContext as createContext20, useContext as useContext21, useMemo as useMemo27, useState as useState60 } from "react";
16231
+ import { createContext as createContext20, useContext as useContext21, useMemo as useMemo28, useState as useState60 } from "react";
16099
16232
 
16100
16233
  // src/features/auth/components/forms/Register.tsx
16101
16234
  import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
16102
16235
  import { Loader2 as Loader23 } from "lucide-react";
16103
- import { useTranslations as useTranslations59 } from "next-intl";
16236
+ import { useTranslations as useTranslations60 } from "next-intl";
16104
16237
  import Image7 from "next/image";
16105
16238
  import { useSearchParams as useSearchParams2 } from "next/navigation";
16106
16239
  import { useEffect as useEffect50, useState as useState59 } from "react";
@@ -16109,14 +16242,14 @@ import { v4 as v45 } from "uuid";
16109
16242
  import { z as z5 } from "zod";
16110
16243
 
16111
16244
  // src/features/auth/components/GdprConsentSection.tsx
16112
- import { useTranslations as useTranslations58 } from "next-intl";
16245
+ import { useTranslations as useTranslations59 } from "next-intl";
16113
16246
  import { Fragment as Fragment28, jsx as jsx174, jsxs as jsxs101 } from "react/jsx-runtime";
16114
16247
  function GdprConsentSection({
16115
16248
  form,
16116
16249
  termsCheckboxId = "termsAccepted",
16117
16250
  marketingCheckboxId = "marketingConsent"
16118
16251
  }) {
16119
- const t = useTranslations58("auth.gdpr");
16252
+ const t = useTranslations59("auth.gdpr");
16120
16253
  const termsLabel = /* @__PURE__ */ jsxs101(Fragment28, { children: [
16121
16254
  t("terms_prefix"),
16122
16255
  " ",
@@ -16169,7 +16302,7 @@ function buildOAuthQueryParams(inviteCode, referralCode) {
16169
16302
  }
16170
16303
  __name(buildOAuthQueryParams, "buildOAuthQueryParams");
16171
16304
  function Register() {
16172
- const t = useTranslations59();
16305
+ const t = useTranslations60();
16173
16306
  const { setComponentType } = useAuthContext();
16174
16307
  const searchParams = useSearchParams2();
16175
16308
  const inviteCode = searchParams.get("invite");
@@ -16454,7 +16587,7 @@ var AuthContextProvider = /* @__PURE__ */ __name(({
16454
16587
  const [componentType, setComponentType] = useState60(initialComponentType);
16455
16588
  const [params, setParams] = useState60(initialParams);
16456
16589
  const [pendingTwoFactor, setPendingTwoFactor] = useState60();
16457
- const activeComponent = useMemo27(() => {
16590
+ const activeComponent = useMemo28(() => {
16458
16591
  if (componentType === void 0) return null;
16459
16592
  switch (componentType) {
16460
16593
  case 0 /* Login */:
@@ -16514,17 +16647,17 @@ __name(InnerAuthContainer, "InnerAuthContainer");
16514
16647
 
16515
16648
  // src/features/auth/components/two-factor/TwoFactorSettings.tsx
16516
16649
  import { ShieldAlert, ShieldCheck } from "lucide-react";
16517
- import { useTranslations as useTranslations66 } from "next-intl";
16650
+ import { useTranslations as useTranslations67 } from "next-intl";
16518
16651
  import { useCallback as useCallback36, useEffect as useEffect52, useState as useState68 } from "react";
16519
16652
  import { v4 as v48 } from "uuid";
16520
16653
 
16521
16654
  // src/features/auth/components/two-factor/BackupCodesDialog.tsx
16522
16655
  import { Copy, Download, RefreshCw as RefreshCw2 } from "lucide-react";
16523
- import { useTranslations as useTranslations60 } from "next-intl";
16656
+ import { useTranslations as useTranslations61 } from "next-intl";
16524
16657
  import { useState as useState61 } from "react";
16525
16658
  import { jsx as jsx178, jsxs as jsxs103 } from "react/jsx-runtime";
16526
16659
  function BackupCodesDialog({ remainingCodes, onRegenerate, trigger }) {
16527
- const t = useTranslations60();
16660
+ const t = useTranslations61();
16528
16661
  const [open, setOpen] = useState61(false);
16529
16662
  const [codes, setCodes] = useState61([]);
16530
16663
  const [isLoading, setIsLoading] = useState61(false);
@@ -16622,7 +16755,7 @@ Keep these codes safe. Each code can only be used once.`;
16622
16755
  __name(BackupCodesDialog, "BackupCodesDialog");
16623
16756
 
16624
16757
  // src/features/auth/components/two-factor/DisableTwoFactorDialog.tsx
16625
- import { useTranslations as useTranslations61 } from "next-intl";
16758
+ import { useTranslations as useTranslations62 } from "next-intl";
16626
16759
  import { useState as useState63 } from "react";
16627
16760
 
16628
16761
  // src/features/auth/components/two-factor/TotpInput.tsx
@@ -16692,7 +16825,7 @@ __name(TotpInput, "TotpInput");
16692
16825
  // src/features/auth/components/two-factor/DisableTwoFactorDialog.tsx
16693
16826
  import { jsx as jsx180, jsxs as jsxs105 } from "react/jsx-runtime";
16694
16827
  function DisableTwoFactorDialog({ onSuccess, trigger }) {
16695
- const t = useTranslations61();
16828
+ const t = useTranslations62();
16696
16829
  const [open, setOpen] = useState63(false);
16697
16830
  const [isLoading, setIsLoading] = useState63(false);
16698
16831
  const [error, setError] = useState63();
@@ -16735,11 +16868,11 @@ __name(DisableTwoFactorDialog, "DisableTwoFactorDialog");
16735
16868
 
16736
16869
  // src/features/auth/components/two-factor/PasskeyList.tsx
16737
16870
  import { Edit, Key, Trash2 } from "lucide-react";
16738
- import { useTranslations as useTranslations62 } from "next-intl";
16871
+ import { useTranslations as useTranslations63 } from "next-intl";
16739
16872
  import { useState as useState64 } from "react";
16740
16873
  import { Fragment as Fragment30, jsx as jsx181, jsxs as jsxs106 } from "react/jsx-runtime";
16741
16874
  function PasskeyList({ passkeys, onRefresh }) {
16742
- const t = useTranslations62();
16875
+ const t = useTranslations63();
16743
16876
  const [renameDialogOpen, setRenameDialogOpen] = useState64(false);
16744
16877
  const [selectedPasskey, setSelectedPasskey] = useState64(null);
16745
16878
  const [newName, setNewName] = useState64("");
@@ -16856,12 +16989,12 @@ __name(PasskeyList, "PasskeyList");
16856
16989
 
16857
16990
  // src/features/auth/components/two-factor/PasskeySetupDialog.tsx
16858
16991
  import { startRegistration } from "@simplewebauthn/browser";
16859
- import { useTranslations as useTranslations63 } from "next-intl";
16992
+ import { useTranslations as useTranslations64 } from "next-intl";
16860
16993
  import { useState as useState65 } from "react";
16861
16994
  import { v4 as v46 } from "uuid";
16862
16995
  import { jsx as jsx182, jsxs as jsxs107 } from "react/jsx-runtime";
16863
16996
  function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
16864
- const t = useTranslations63();
16997
+ const t = useTranslations64();
16865
16998
  const { currentUser } = useCurrentUserContext();
16866
16999
  const [name, setName] = useState65("");
16867
17000
  const [isLoading, setIsLoading] = useState65(false);
@@ -16927,11 +17060,11 @@ __name(PasskeySetupDialog, "PasskeySetupDialog");
16927
17060
 
16928
17061
  // src/features/auth/components/two-factor/TotpAuthenticatorList.tsx
16929
17062
  import { Smartphone, Trash2 as Trash22 } from "lucide-react";
16930
- import { useTranslations as useTranslations64 } from "next-intl";
17063
+ import { useTranslations as useTranslations65 } from "next-intl";
16931
17064
  import { useState as useState66 } from "react";
16932
17065
  import { jsx as jsx183, jsxs as jsxs108 } from "react/jsx-runtime";
16933
17066
  function TotpAuthenticatorList({ authenticators, onDelete }) {
16934
- const t = useTranslations64();
17067
+ const t = useTranslations65();
16935
17068
  const [deletingId, setDeletingId] = useState66(null);
16936
17069
  const handleDelete = /* @__PURE__ */ __name(async (id) => {
16937
17070
  setDeletingId(id);
@@ -17001,13 +17134,13 @@ function TotpAuthenticatorList({ authenticators, onDelete }) {
17001
17134
  __name(TotpAuthenticatorList, "TotpAuthenticatorList");
17002
17135
 
17003
17136
  // src/features/auth/components/two-factor/TotpSetupDialog.tsx
17004
- import { useTranslations as useTranslations65 } from "next-intl";
17137
+ import { useTranslations as useTranslations66 } from "next-intl";
17005
17138
  import { QRCodeSVG } from "qrcode.react";
17006
17139
  import { useState as useState67 } from "react";
17007
17140
  import { v4 as v47 } from "uuid";
17008
17141
  import { jsx as jsx184, jsxs as jsxs109 } from "react/jsx-runtime";
17009
17142
  function TotpSetupDialog({ onSuccess, trigger }) {
17010
- const t = useTranslations65();
17143
+ const t = useTranslations66();
17011
17144
  const { currentUser } = useCurrentUserContext();
17012
17145
  const [open, setOpen] = useState67(false);
17013
17146
  const [step, setStep] = useState67("name");
@@ -17112,7 +17245,7 @@ __name(TotpSetupDialog, "TotpSetupDialog");
17112
17245
  // src/features/auth/components/two-factor/TwoFactorSettings.tsx
17113
17246
  import { Fragment as Fragment31, jsx as jsx185, jsxs as jsxs110 } from "react/jsx-runtime";
17114
17247
  function TwoFactorSettings() {
17115
- const t = useTranslations66();
17248
+ const t = useTranslations67();
17116
17249
  const [status, setStatus] = useState68(null);
17117
17250
  const [authenticators, setAuthenticators] = useState68([]);
17118
17251
  const [passkeys, setPasskeys] = useState68([]);
@@ -17230,7 +17363,7 @@ function SecurityContainer() {
17230
17363
  __name(SecurityContainer, "SecurityContainer");
17231
17364
 
17232
17365
  // src/features/auth/components/details/LandingComponent.tsx
17233
- import { useTranslations as useTranslations67 } from "next-intl";
17366
+ import { useTranslations as useTranslations68 } from "next-intl";
17234
17367
  import Image9 from "next/image";
17235
17368
 
17236
17369
  // src/features/auth/components/buttons/GoogleSignInButton.tsx
@@ -17291,7 +17424,7 @@ __name(GoogleSignInButton, "GoogleSignInButton");
17291
17424
  // src/features/auth/components/details/LandingComponent.tsx
17292
17425
  import { Fragment as Fragment32, jsx as jsx188, jsxs as jsxs112 } from "react/jsx-runtime";
17293
17426
  function LandingComponent() {
17294
- const t = useTranslations67();
17427
+ const t = useTranslations68();
17295
17428
  const { setComponentType } = useAuthContext();
17296
17429
  return /* @__PURE__ */ jsxs112(Fragment32, { children: [
17297
17430
  /* @__PURE__ */ jsxs112(CardHeader, { className: "mb-4", "data-testid": "page-pre-login-container", children: [
@@ -17323,7 +17456,7 @@ __name(LandingComponent, "LandingComponent");
17323
17456
 
17324
17457
  // src/features/auth/components/forms/AcceptInvitation.tsx
17325
17458
  import { zodResolver as zodResolver6 } from "@hookform/resolvers/zod";
17326
- import { useTranslations as useTranslations68 } from "next-intl";
17459
+ import { useTranslations as useTranslations69 } from "next-intl";
17327
17460
  import Image10 from "next/image";
17328
17461
  import { useEffect as useEffect53, useState as useState69 } from "react";
17329
17462
  import { useForm as useForm6 } from "react-hook-form";
@@ -17333,7 +17466,7 @@ function AcceptInvitation() {
17333
17466
  const { setComponentType, params, setParams } = useAuthContext();
17334
17467
  const [showConfirmation, setShowConfirmation] = useState69(false);
17335
17468
  const [error, setError] = useState69(void 0);
17336
- const t = useTranslations68();
17469
+ const t = useTranslations69();
17337
17470
  useEffect53(() => {
17338
17471
  async function validateCode(code) {
17339
17472
  try {
@@ -17425,7 +17558,7 @@ function AcceptInvitation() {
17425
17558
  __name(AcceptInvitation, "AcceptInvitation");
17426
17559
 
17427
17560
  // src/features/auth/components/forms/ActivateAccount.tsx
17428
- import { useTranslations as useTranslations69 } from "next-intl";
17561
+ import { useTranslations as useTranslations70 } from "next-intl";
17429
17562
  import Image11 from "next/image";
17430
17563
  import { useEffect as useEffect54, useState as useState70 } from "react";
17431
17564
  import { Fragment as Fragment34, jsx as jsx190, jsxs as jsxs114 } from "react/jsx-runtime";
@@ -17433,7 +17566,7 @@ function ActivateAccount() {
17433
17566
  const { setComponentType, params, setParams } = useAuthContext();
17434
17567
  const [showConfirmation, setShowConfirmation] = useState70(false);
17435
17568
  const [error, setError] = useState70(void 0);
17436
- const t = useTranslations69();
17569
+ const t = useTranslations70();
17437
17570
  useEffect54(() => {
17438
17571
  async function ActivateAccount2(code) {
17439
17572
  try {
@@ -17501,14 +17634,14 @@ __name(Cookies, "Cookies");
17501
17634
 
17502
17635
  // src/features/auth/components/forms/ForgotPassword.tsx
17503
17636
  import { zodResolver as zodResolver7 } from "@hookform/resolvers/zod";
17504
- import { useTranslations as useTranslations70 } from "next-intl";
17637
+ import { useTranslations as useTranslations71 } from "next-intl";
17505
17638
  import Image12 from "next/image";
17506
17639
  import { useState as useState72 } from "react";
17507
17640
  import { useForm as useForm7 } from "react-hook-form";
17508
17641
  import { z as z7 } from "zod";
17509
17642
  import { Fragment as Fragment35, jsx as jsx191, jsxs as jsxs115 } from "react/jsx-runtime";
17510
17643
  function ForgotPassword() {
17511
- const t = useTranslations70();
17644
+ const t = useTranslations71();
17512
17645
  const { setComponentType } = useAuthContext();
17513
17646
  const [showConfirmation, setShowConfirmation] = useState72(false);
17514
17647
  const formSchema = z7.object({
@@ -17572,7 +17705,7 @@ __name(ForgotPassword, "ForgotPassword");
17572
17705
 
17573
17706
  // src/features/auth/components/forms/Login.tsx
17574
17707
  import { zodResolver as zodResolver8 } from "@hookform/resolvers/zod";
17575
- import { useTranslations as useTranslations71 } from "next-intl";
17708
+ import { useTranslations as useTranslations72 } from "next-intl";
17576
17709
  import Image13 from "next/image";
17577
17710
  import { useRouter, useSearchParams as useSearchParams3 } from "next/navigation";
17578
17711
  import { useEffect as useEffect56, useState as useState73 } from "react";
@@ -17580,7 +17713,7 @@ import { useForm as useForm8 } from "react-hook-form";
17580
17713
  import { z as z8 } from "zod";
17581
17714
  import { Fragment as Fragment36, jsx as jsx192, jsxs as jsxs116 } from "react/jsx-runtime";
17582
17715
  function Login() {
17583
- const t = useTranslations71();
17716
+ const t = useTranslations72();
17584
17717
  const { setUser } = useCurrentUserContext();
17585
17718
  const { setComponentType, setPendingTwoFactor } = useAuthContext();
17586
17719
  const generateUrl = usePageUrlGenerator();
@@ -17769,7 +17902,7 @@ __name(RefreshUser, "RefreshUser");
17769
17902
 
17770
17903
  // src/features/auth/components/forms/ResetPassword.tsx
17771
17904
  import { zodResolver as zodResolver9 } from "@hookform/resolvers/zod";
17772
- import { useTranslations as useTranslations72 } from "next-intl";
17905
+ import { useTranslations as useTranslations73 } from "next-intl";
17773
17906
  import Image14 from "next/image";
17774
17907
  import { useEffect as useEffect59, useState as useState74 } from "react";
17775
17908
  import { useForm as useForm9 } from "react-hook-form";
@@ -17779,7 +17912,7 @@ function ResetPassword() {
17779
17912
  const { setComponentType, params, setParams } = useAuthContext();
17780
17913
  const [showConfirmation, setShowConfirmation] = useState74(false);
17781
17914
  const [error, setError] = useState74(void 0);
17782
- const t = useTranslations72();
17915
+ const t = useTranslations73();
17783
17916
  useEffect59(() => {
17784
17917
  async function validateResetPasswordCode(code) {
17785
17918
  try {
@@ -17855,19 +17988,19 @@ function ResetPassword() {
17855
17988
  __name(ResetPassword, "ResetPassword");
17856
17989
 
17857
17990
  // src/features/auth/components/forms/TwoFactorChallenge.tsx
17858
- import { useTranslations as useTranslations74 } from "next-intl";
17991
+ import { useTranslations as useTranslations75 } from "next-intl";
17859
17992
  import { useRouter as useRouter2, useSearchParams as useSearchParams4 } from "next/navigation";
17860
17993
  import { useState as useState76 } from "react";
17861
17994
  import { v4 as v410 } from "uuid";
17862
17995
 
17863
17996
  // src/features/auth/components/two-factor/PasskeyButton.tsx
17864
17997
  import { startAuthentication } from "@simplewebauthn/browser";
17865
- import { useTranslations as useTranslations73 } from "next-intl";
17998
+ import { useTranslations as useTranslations74 } from "next-intl";
17866
17999
  import { useState as useState75 } from "react";
17867
18000
  import { v4 as v49 } from "uuid";
17868
18001
  import { jsx as jsx195 } from "react/jsx-runtime";
17869
18002
  function PasskeyButton({ pendingToken, onSuccess, onError, disabled = false }) {
17870
- const t = useTranslations73();
18003
+ const t = useTranslations74();
17871
18004
  const [isLoading, setIsLoading] = useState75(false);
17872
18005
  const handleClick = /* @__PURE__ */ __name(async () => {
17873
18006
  setIsLoading(true);
@@ -17905,7 +18038,7 @@ __name(PasskeyButton, "PasskeyButton");
17905
18038
  // src/features/auth/components/forms/TwoFactorChallenge.tsx
17906
18039
  import { Fragment as Fragment39, jsx as jsx196, jsxs as jsxs118 } from "react/jsx-runtime";
17907
18040
  function TwoFactorChallenge() {
17908
- const t = useTranslations74();
18041
+ const t = useTranslations75();
17909
18042
  const { setUser } = useCurrentUserContext();
17910
18043
  const { pendingTwoFactor, setPendingTwoFactor } = useAuthContext();
17911
18044
  const generateUrl = usePageUrlGenerator();
@@ -18042,10 +18175,10 @@ function TwoFactorChallenge() {
18042
18175
  __name(TwoFactorChallenge, "TwoFactorChallenge");
18043
18176
 
18044
18177
  // src/features/content/components/lists/ContentsList.tsx
18045
- import { useTranslations as useTranslations75 } from "next-intl";
18178
+ import { useTranslations as useTranslations76 } from "next-intl";
18046
18179
  import { jsx as jsx197, jsxs as jsxs119 } from "react/jsx-runtime";
18047
18180
  function ContentsList({ contentList }) {
18048
- const t = useTranslations75();
18181
+ const t = useTranslations76();
18049
18182
  return /* @__PURE__ */ jsxs119("div", { className: "flex min-h-0 w-full flex-col overflow-y-auto", children: [
18050
18183
  /* @__PURE__ */ jsx197("h2", { className: "text-xl font-semibold", children: t(`content.news`) }),
18051
18184
  /* @__PURE__ */ jsx197("div", { className: "flex flex-col", children: contentList.map((content) => /* @__PURE__ */ jsx197(ContentsListElement, { content }, content.id)) })
@@ -18073,10 +18206,10 @@ function ContentsListElement({ content }) {
18073
18206
  __name(ContentsListElement, "ContentsListElement");
18074
18207
 
18075
18208
  // src/features/content/components/lists/ContentsListById.tsx
18076
- import { useTranslations as useTranslations76 } from "next-intl";
18209
+ import { useTranslations as useTranslations77 } from "next-intl";
18077
18210
  import { jsx as jsx198 } from "react/jsx-runtime";
18078
18211
  function ContentsListById({ contentIds }) {
18079
- const t = useTranslations76();
18212
+ const t = useTranslations77();
18080
18213
  const data = useDataListRetriever({
18081
18214
  module: Modules.Content,
18082
18215
  retriever: /* @__PURE__ */ __name((params) => ContentService.findMany(params), "retriever"),
@@ -18095,10 +18228,10 @@ function ContentsListById({ contentIds }) {
18095
18228
  __name(ContentsListById, "ContentsListById");
18096
18229
 
18097
18230
  // src/features/content/components/lists/RelevantContentsList.tsx
18098
- import { useTranslations as useTranslations77 } from "next-intl";
18231
+ import { useTranslations as useTranslations78 } from "next-intl";
18099
18232
  import { jsx as jsx199 } from "react/jsx-runtime";
18100
18233
  function RelevantContentsList({ id }) {
18101
- const t = useTranslations77();
18234
+ const t = useTranslations78();
18102
18235
  const data = useDataListRetriever({
18103
18236
  module: Modules.Content,
18104
18237
  retriever: /* @__PURE__ */ __name((params) => ContentService.findRelevant(params), "retriever"),
@@ -18118,13 +18251,13 @@ __name(RelevantContentsList, "RelevantContentsList");
18118
18251
 
18119
18252
  // src/features/how-to/components/containers/HowToCommand.tsx
18120
18253
  import { ArrowRight, LifeBuoyIcon } from "lucide-react";
18121
- import { useTranslations as useTranslations79 } from "next-intl";
18122
- import { useCallback as useCallback37, useEffect as useEffect60, useMemo as useMemo29, useRef as useRef32, useState as useState77 } from "react";
18254
+ import { useTranslations as useTranslations80 } from "next-intl";
18255
+ import { useCallback as useCallback37, useEffect as useEffect60, useMemo as useMemo30, useRef as useRef32, useState as useState77 } from "react";
18123
18256
 
18124
18257
  // src/features/how-to/components/containers/HowToCommandViewer.tsx
18125
18258
  import { ArrowLeft, BookOpen, MessageSquare } from "lucide-react";
18126
- import { useTranslations as useTranslations78 } from "next-intl";
18127
- import { useMemo as useMemo28 } from "react";
18259
+ import { useTranslations as useTranslations79 } from "next-intl";
18260
+ import { useMemo as useMemo29 } from "react";
18128
18261
 
18129
18262
  // src/features/how-to/utils/blocknote.ts
18130
18263
  function extractTextFromContent(content) {
@@ -18195,9 +18328,9 @@ __name(extractHeadings, "extractHeadings");
18195
18328
  // src/features/how-to/components/containers/HowToCommandViewer.tsx
18196
18329
  import { jsx as jsx200, jsxs as jsxs120 } from "react/jsx-runtime";
18197
18330
  function HowToCommandViewer({ howTo, onBack, onStartChat }) {
18198
- const t = useTranslations78();
18199
- const readingTime = useMemo28(() => calculateReadingTime(howTo.description), [howTo.description]);
18200
- const headings = useMemo28(() => extractHeadings(howTo.description), [howTo.description]);
18331
+ const t = useTranslations79();
18332
+ const readingTime = useMemo29(() => calculateReadingTime(howTo.description), [howTo.description]);
18333
+ const headings = useMemo29(() => extractHeadings(howTo.description), [howTo.description]);
18201
18334
  return /* @__PURE__ */ jsxs120("div", { className: "flex h-full flex-col", children: [
18202
18335
  /* @__PURE__ */ jsxs120("div", { className: "flex items-center gap-3 border-b px-4 py-3", children: [
18203
18336
  /* @__PURE__ */ jsxs120(Button, { variant: "ghost", size: "sm", onClick: onBack, className: "h-8 px-2", children: [
@@ -18244,7 +18377,7 @@ function matchPage(pathname, pattern) {
18244
18377
  }
18245
18378
  __name(matchPage, "matchPage");
18246
18379
  function HowToCommand({ pathname, extraGroups, onStartChat }) {
18247
- const t = useTranslations79();
18380
+ const t = useTranslations80();
18248
18381
  const [dialogOpen, setDialogOpen] = useState77(false);
18249
18382
  const [selectedHowTo, setSelectedHowTo] = useState77(null);
18250
18383
  const searchTermRef = useRef32("");
@@ -18256,7 +18389,7 @@ function HowToCommand({ pathname, extraGroups, onStartChat }) {
18256
18389
  retrieverParams: {},
18257
18390
  module: Modules.HowTo
18258
18391
  });
18259
- const { relevantHowTos, otherHowTos } = useMemo29(() => {
18392
+ const { relevantHowTos, otherHowTos } = useMemo30(() => {
18260
18393
  if (!data.data) return { relevantHowTos: [], otherHowTos: [] };
18261
18394
  const relevant = [];
18262
18395
  const other = [];
@@ -18410,10 +18543,10 @@ function HowToContent() {
18410
18543
  __name(HowToContent, "HowToContent");
18411
18544
 
18412
18545
  // src/features/how-to/components/details/HowToDetails.tsx
18413
- import { useTranslations as useTranslations80 } from "next-intl";
18546
+ import { useTranslations as useTranslations81 } from "next-intl";
18414
18547
  import { jsx as jsx203, jsxs as jsxs122 } from "react/jsx-runtime";
18415
18548
  function HowToDetailsInternal({ howTo }) {
18416
- const t = useTranslations80();
18549
+ const t = useTranslations81();
18417
18550
  const { title } = useSharedContext();
18418
18551
  const pagesList = HowTo.parsePagesFromString(howTo.pages);
18419
18552
  return /* @__PURE__ */ jsxs122("div", { className: "flex w-full flex-col gap-y-4", children: [
@@ -18449,16 +18582,16 @@ function HowToContainer() {
18449
18582
  __name(HowToContainer, "HowToContainer");
18450
18583
 
18451
18584
  // src/features/how-to/components/lists/HowToList.tsx
18452
- import { useTranslations as useTranslations82 } from "next-intl";
18585
+ import { useTranslations as useTranslations83 } from "next-intl";
18453
18586
 
18454
18587
  // src/features/how-to/hooks/useHowToTableStructure.tsx
18455
- import { useTranslations as useTranslations81 } from "next-intl";
18456
- import { useMemo as useMemo30 } from "react";
18588
+ import { useTranslations as useTranslations82 } from "next-intl";
18589
+ import { useMemo as useMemo31 } from "react";
18457
18590
  import { Fragment as Fragment41, jsx as jsx205 } from "react/jsx-runtime";
18458
18591
  var useHowToTableStructure = /* @__PURE__ */ __name((params) => {
18459
- const t = useTranslations81();
18592
+ const t = useTranslations82();
18460
18593
  const generateUrl = usePageUrlGenerator();
18461
- const tableData = useMemo30(() => {
18594
+ const tableData = useMemo31(() => {
18462
18595
  return params.data.map((howTo) => {
18463
18596
  const entry = {
18464
18597
  jsonApiData: howTo
@@ -18512,17 +18645,17 @@ var useHowToTableStructure = /* @__PURE__ */ __name((params) => {
18512
18645
  title: t(`common.date.update`)
18513
18646
  })
18514
18647
  };
18515
- const columns = useMemo30(() => {
18648
+ const columns = useMemo31(() => {
18516
18649
  return params.fields.map((field) => fieldColumnMap[field]?.()).filter((col) => col !== void 0);
18517
18650
  }, [params.fields, fieldColumnMap, t, generateUrl]);
18518
- return useMemo30(() => ({ data: tableData, columns }), [tableData, columns]);
18651
+ return useMemo31(() => ({ data: tableData, columns }), [tableData, columns]);
18519
18652
  }, "useHowToTableStructure");
18520
18653
  registerTableGenerator("howtos", useHowToTableStructure);
18521
18654
 
18522
18655
  // src/features/how-to/components/lists/HowToList.tsx
18523
18656
  import { jsx as jsx206 } from "react/jsx-runtime";
18524
18657
  function HowToList({ fullWidth }) {
18525
- const t = useTranslations82();
18658
+ const t = useTranslations83();
18526
18659
  const data = useDataListRetriever({
18527
18660
  module: Modules.HowTo,
18528
18661
  retriever: /* @__PURE__ */ __name((params) => HowToService.findMany(params), "retriever"),
@@ -18556,7 +18689,7 @@ __name(HowToListContainer, "HowToListContainer");
18556
18689
 
18557
18690
  // src/features/how-to/components/forms/HowToSelector.tsx
18558
18691
  import { CircleX as CircleX2, RefreshCwIcon as RefreshCwIcon3, SearchIcon as SearchIcon6, XIcon as XIcon10 } from "lucide-react";
18559
- import { useTranslations as useTranslations83 } from "next-intl";
18692
+ import { useTranslations as useTranslations84 } from "next-intl";
18560
18693
  import { useCallback as useCallback38, useEffect as useEffect61, useRef as useRef33, useState as useState78 } from "react";
18561
18694
  import { Fragment as Fragment42, jsx as jsx208, jsxs as jsxs123 } from "react/jsx-runtime";
18562
18695
  function HowToSelector({
@@ -18567,7 +18700,7 @@ function HowToSelector({
18567
18700
  onChange,
18568
18701
  isRequired = false
18569
18702
  }) {
18570
- const t = useTranslations83();
18703
+ const t = useTranslations84();
18571
18704
  const [open, setOpen] = useState78(false);
18572
18705
  const searchTermRef = useRef33("");
18573
18706
  const [searchTerm, setSearchTerm] = useState78("");
@@ -18660,7 +18793,7 @@ function HowToSelector({
18660
18793
  __name(HowToSelector, "HowToSelector");
18661
18794
 
18662
18795
  // src/features/assistant/components/parts/AssistantSidebar.tsx
18663
- import { useTranslations as useTranslations84 } from "next-intl";
18796
+ import { useTranslations as useTranslations85 } from "next-intl";
18664
18797
  import { Plus } from "lucide-react";
18665
18798
 
18666
18799
  // src/features/assistant/utils/groupThreadsByBucket.ts
@@ -18686,7 +18819,7 @@ __name(groupThreadsByBucket, "groupThreadsByBucket");
18686
18819
  // src/features/assistant/components/parts/AssistantSidebar.tsx
18687
18820
  import { Fragment as Fragment43, jsx as jsx209, jsxs as jsxs124 } from "react/jsx-runtime";
18688
18821
  function AssistantSidebar({ threads, activeId, onSelect, onNew }) {
18689
- const t = useTranslations84();
18822
+ const t = useTranslations85();
18690
18823
  const groups = groupThreadsByBucket(threads);
18691
18824
  const renderSection = /* @__PURE__ */ __name((label, items) => {
18692
18825
  if (items.length === 0) return null;
@@ -18721,16 +18854,16 @@ __name(AssistantSidebar, "AssistantSidebar");
18721
18854
 
18722
18855
  // src/features/assistant/components/parts/AssistantEmptyState.tsx
18723
18856
  import { useState as useState80 } from "react";
18724
- import { useTranslations as useTranslations86 } from "next-intl";
18857
+ import { useTranslations as useTranslations87 } from "next-intl";
18725
18858
  import { Sparkles } from "lucide-react";
18726
18859
 
18727
18860
  // src/features/assistant/components/parts/AssistantComposer.tsx
18728
18861
  import { useState as useState79 } from "react";
18729
- import { useTranslations as useTranslations85 } from "next-intl";
18862
+ import { useTranslations as useTranslations86 } from "next-intl";
18730
18863
  import { ArrowUp } from "lucide-react";
18731
18864
  import { jsx as jsx210, jsxs as jsxs125 } from "react/jsx-runtime";
18732
18865
  function AssistantComposer({ onSend, disabled, value: controlled, onValueChange }) {
18733
- const t = useTranslations85();
18866
+ const t = useTranslations86();
18734
18867
  const [internal, setInternal] = useState79("");
18735
18868
  const value = controlled ?? internal;
18736
18869
  const setValue = onValueChange ?? setInternal;
@@ -18776,7 +18909,7 @@ __name(AssistantComposer, "AssistantComposer");
18776
18909
  import { jsx as jsx211, jsxs as jsxs126 } from "react/jsx-runtime";
18777
18910
  var STARTER_KEYS = ["a", "b", "c", "d"];
18778
18911
  function AssistantEmptyState({ onSend, operatorMode = false, onOperatorModeChange }) {
18779
- const t = useTranslations86();
18912
+ const t = useTranslations87();
18780
18913
  const [draft, setDraft] = useState80("");
18781
18914
  return /* @__PURE__ */ jsx211("div", { className: "flex h-full w-full items-center justify-center p-10", children: /* @__PURE__ */ jsxs126("div", { className: "flex w-full max-w-2xl flex-col gap-6", children: [
18782
18915
  /* @__PURE__ */ jsxs126("div", { className: "text-center", children: [
@@ -18816,10 +18949,10 @@ __name(AssistantEmptyState, "AssistantEmptyState");
18816
18949
 
18817
18950
  // src/features/assistant/components/parts/AssistantThreadHeader.tsx
18818
18951
  import { useState as useState81 } from "react";
18819
- import { useTranslations as useTranslations87 } from "next-intl";
18952
+ import { useTranslations as useTranslations88 } from "next-intl";
18820
18953
  import { jsx as jsx212, jsxs as jsxs127 } from "react/jsx-runtime";
18821
18954
  function AssistantThreadHeader({ assistant, onRename, onDelete }) {
18822
- const t = useTranslations87();
18955
+ const t = useTranslations88();
18823
18956
  const [renameValue, setRenameValue] = useState81(assistant.title);
18824
18957
  const [renameOpen, setRenameOpen] = useState81(false);
18825
18958
  const [deleteOpen, setDeleteOpen] = useState81(false);
@@ -18878,25 +19011,25 @@ __name(AssistantThreadHeader, "AssistantThreadHeader");
18878
19011
  import { useEffect as useEffect63, useRef as useRef34 } from "react";
18879
19012
 
18880
19013
  // src/features/assistant-message/components/MessageItem.tsx
18881
- import { useTranslations as useTranslations93 } from "next-intl";
19014
+ import { useTranslations as useTranslations94 } from "next-intl";
18882
19015
  import { Sparkles as Sparkles2, AlertCircle } from "lucide-react";
18883
19016
  import ReactMarkdown3 from "react-markdown";
18884
19017
  import remarkGfm3 from "remark-gfm";
18885
19018
 
18886
19019
  // src/features/assistant-message/components/parts/MessageSourcesContainer.tsx
18887
- import { useEffect as useEffect62, useMemo as useMemo32, useState as useState84 } from "react";
19020
+ import { useEffect as useEffect62, useMemo as useMemo33, useState as useState84 } from "react";
18888
19021
 
18889
19022
  // src/features/assistant-message/components/parts/MessageSourcesPanel.tsx
18890
- import { useMemo as useMemo31, useState as useState83 } from "react";
18891
- import { useTranslations as useTranslations92 } from "next-intl";
19023
+ import { useMemo as useMemo32, useState as useState83 } from "react";
19024
+ import { useTranslations as useTranslations93 } from "next-intl";
18892
19025
  import { ChevronDown as ChevronDown4, ChevronRight as ChevronRight2 } from "lucide-react";
18893
19026
 
18894
19027
  // src/features/assistant-message/components/parts/tabs/ReferencesTab.tsx
18895
- import { useTranslations as useTranslations88 } from "next-intl";
19028
+ import { useTranslations as useTranslations89 } from "next-intl";
18896
19029
  import Link4 from "next/link";
18897
19030
  import { jsx as jsx213, jsxs as jsxs128 } from "react/jsx-runtime";
18898
19031
  function ReferencesTab({ references }) {
18899
- const t = useTranslations88();
19032
+ const t = useTranslations89();
18900
19033
  const generate = usePageUrlGenerator();
18901
19034
  if (references.length === 0) return null;
18902
19035
  return /* @__PURE__ */ jsxs128(Table, { children: [
@@ -18925,7 +19058,7 @@ __name(ReferencesTab, "ReferencesTab");
18925
19058
 
18926
19059
  // src/features/assistant-message/components/parts/tabs/CitationsTab.tsx
18927
19060
  import { Fragment as Fragment44, useState as useState82 } from "react";
18928
- import { useTranslations as useTranslations89 } from "next-intl";
19061
+ import { useTranslations as useTranslations90 } from "next-intl";
18929
19062
  import { ChevronDown as ChevronDown3, HelpCircle } from "lucide-react";
18930
19063
  import ReactMarkdown2 from "react-markdown";
18931
19064
  import remarkGfm2 from "remark-gfm";
@@ -18962,7 +19095,7 @@ __name(RelevanceMeter, "RelevanceMeter");
18962
19095
  // src/features/assistant-message/components/parts/tabs/CitationsTab.tsx
18963
19096
  import { jsx as jsx215, jsxs as jsxs130 } from "react/jsx-runtime";
18964
19097
  function CitationsTab({ citations, sources }) {
18965
- const t = useTranslations89();
19098
+ const t = useTranslations90();
18966
19099
  const [expanded, setExpanded] = useState82(/* @__PURE__ */ new Set());
18967
19100
  if (citations.length === 0) return null;
18968
19101
  const sorted = [...citations].sort((a, b) => (b.relevance ?? 0) - (a.relevance ?? 0));
@@ -19020,11 +19153,11 @@ function CitationsTab({ citations, sources }) {
19020
19153
  __name(CitationsTab, "CitationsTab");
19021
19154
 
19022
19155
  // src/features/assistant-message/components/parts/tabs/ContentsTab.tsx
19023
- import { useTranslations as useTranslations90 } from "next-intl";
19156
+ import { useTranslations as useTranslations91 } from "next-intl";
19024
19157
  import Link5 from "next/link";
19025
19158
  import { jsx as jsx216, jsxs as jsxs131 } from "react/jsx-runtime";
19026
19159
  function ContentsTab({ citations, sources }) {
19027
- const t = useTranslations90();
19160
+ const t = useTranslations91();
19028
19161
  const generate = usePageUrlGenerator();
19029
19162
  const map = /* @__PURE__ */ new Map();
19030
19163
  for (const c of citations) {
@@ -19076,7 +19209,7 @@ function ContentsTab({ citations, sources }) {
19076
19209
  __name(ContentsTab, "ContentsTab");
19077
19210
 
19078
19211
  // src/features/assistant-message/components/parts/tabs/UsersTab.tsx
19079
- import { useTranslations as useTranslations91 } from "next-intl";
19212
+ import { useTranslations as useTranslations92 } from "next-intl";
19080
19213
  import Link6 from "next/link";
19081
19214
  import { jsx as jsx217, jsxs as jsxs132 } from "react/jsx-runtime";
19082
19215
  function getInitials2(name) {
@@ -19093,7 +19226,7 @@ function readAuthor(source) {
19093
19226
  }
19094
19227
  __name(readAuthor, "readAuthor");
19095
19228
  function UsersTab({ users, citations, sources }) {
19096
- const t = useTranslations91();
19229
+ const t = useTranslations92();
19097
19230
  const generate = usePageUrlGenerator();
19098
19231
  const userMap = /* @__PURE__ */ new Map();
19099
19232
  for (const u of users) {
@@ -19179,8 +19312,8 @@ __name(SuggestedQuestionsTab, "SuggestedQuestionsTab");
19179
19312
  // src/features/assistant-message/components/parts/MessageSourcesPanel.tsx
19180
19313
  import { jsx as jsx219, jsxs as jsxs133 } from "react/jsx-runtime";
19181
19314
  function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sources, users }) {
19182
- const t = useTranslations92();
19183
- const visibleReferences = useMemo31(
19315
+ const t = useTranslations93();
19316
+ const visibleReferences = useMemo32(
19184
19317
  () => message.references.filter((ref) => {
19185
19318
  try {
19186
19319
  return !!ModuleRegistry.findByName(ref.type).pageUrl;
@@ -19193,7 +19326,7 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
19193
19326
  const refsCount = visibleReferences.length;
19194
19327
  const citationsCount = message.citations.length;
19195
19328
  const suggestionsCount = isLatestAssistant ? message.suggestedQuestions.length : 0;
19196
- const contentsCount = useMemo31(() => {
19329
+ const contentsCount = useMemo32(() => {
19197
19330
  const ids = /* @__PURE__ */ new Set();
19198
19331
  for (const c of message.citations) {
19199
19332
  if (!c.nodeId) continue;
@@ -19272,7 +19405,7 @@ var SourcesFetcher = class extends ClientAbstractService {
19272
19405
  }
19273
19406
  };
19274
19407
  function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp }) {
19275
- const groups = useMemo32(() => {
19408
+ const groups = useMemo33(() => {
19276
19409
  const map = /* @__PURE__ */ new Map();
19277
19410
  for (const chunk of message.citations) {
19278
19411
  if (!chunk.nodeType || !chunk.nodeId) continue;
@@ -19285,7 +19418,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
19285
19418
  }
19286
19419
  return map;
19287
19420
  }, [message.citations]);
19288
- const groupsKey = useMemo32(() => {
19421
+ const groupsKey = useMemo33(() => {
19289
19422
  const parts = [];
19290
19423
  for (const [nodeType, ids] of groups) {
19291
19424
  parts.push(`${nodeType}:${Array.from(ids).sort().join(",")}`);
@@ -19327,12 +19460,12 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
19327
19460
  cancelled = true;
19328
19461
  };
19329
19462
  }, [groupsKey, groups]);
19330
- const sources = useMemo32(() => {
19463
+ const sources = useMemo33(() => {
19331
19464
  const map = /* @__PURE__ */ new Map();
19332
19465
  for (const entity of resolved) map.set(entity.id, entity);
19333
19466
  return map;
19334
19467
  }, [resolved]);
19335
- const users = useMemo32(() => {
19468
+ const users = useMemo33(() => {
19336
19469
  const userMap = /* @__PURE__ */ new Map();
19337
19470
  for (const entity of resolved) {
19338
19471
  const author = entity._author ?? (() => {
@@ -19369,7 +19502,7 @@ function MessageItem({
19369
19502
  onRetry,
19370
19503
  renderApprovalAction
19371
19504
  }) {
19372
- const t = useTranslations93();
19505
+ const t = useTranslations94();
19373
19506
  const isUser = message.role === "user";
19374
19507
  const isFailed = isUser && !!failedMessageIds?.has(message.id);
19375
19508
  if (isUser) {
@@ -19428,11 +19561,11 @@ function MessageList({ messages, onSelectFollowUp, failedMessageIds, onRetry, re
19428
19561
  __name(MessageList, "MessageList");
19429
19562
 
19430
19563
  // src/features/assistant/components/parts/AssistantStatusLine.tsx
19431
- import { useTranslations as useTranslations94 } from "next-intl";
19564
+ import { useTranslations as useTranslations95 } from "next-intl";
19432
19565
  import { Loader2 as Loader24 } from "lucide-react";
19433
19566
  import { jsx as jsx223, jsxs as jsxs135 } from "react/jsx-runtime";
19434
19567
  function AssistantStatusLine({ status }) {
19435
- const t = useTranslations94();
19568
+ const t = useTranslations95();
19436
19569
  const text = status ?? t("features.assistant.thinking");
19437
19570
  return /* @__PURE__ */ jsxs135("div", { className: "text-muted-foreground flex items-center gap-2 px-4 py-2 text-sm", children: [
19438
19571
  /* @__PURE__ */ jsx223(Loader24, { className: "h-4 w-4 animate-spin" }),
@@ -19558,14 +19691,14 @@ var NotificationErrorBoundary = class extends Component {
19558
19691
  };
19559
19692
 
19560
19693
  // src/features/notification/components/containers/NotificationsListContainer.tsx
19561
- import { useTranslations as useTranslations96 } from "next-intl";
19694
+ import { useTranslations as useTranslations97 } from "next-intl";
19562
19695
 
19563
19696
  // src/features/notification/components/lists/NotificationsList.tsx
19564
19697
  import { ArchiveIcon } from "lucide-react";
19565
- import { useTranslations as useTranslations95 } from "next-intl";
19698
+ import { useTranslations as useTranslations96 } from "next-intl";
19566
19699
  import { Fragment as Fragment46, jsx as jsx227, jsxs as jsxs139 } from "react/jsx-runtime";
19567
19700
  function NotificationsList({ archived }) {
19568
- const t = useTranslations95();
19701
+ const t = useTranslations96();
19569
19702
  const generateUrl = usePageUrlGenerator();
19570
19703
  const data = useDataListRetriever({
19571
19704
  retriever: /* @__PURE__ */ __name((params) => NotificationService.findMany(params), "retriever"),
@@ -19623,7 +19756,7 @@ __name(NotificationsList, "NotificationsList");
19623
19756
  // src/features/notification/components/containers/NotificationsListContainer.tsx
19624
19757
  import { jsx as jsx228, jsxs as jsxs140 } from "react/jsx-runtime";
19625
19758
  function NotificationsListContainerContent() {
19626
- const t = useTranslations96();
19759
+ const t = useTranslations97();
19627
19760
  const { notifications: _notifications, isLoading: _isLoading, error } = useNotificationContext();
19628
19761
  if (error) {
19629
19762
  return /* @__PURE__ */ jsx228("div", { className: "flex items-center justify-center p-8 text-center", children: /* @__PURE__ */ jsxs140("div", { className: "text-destructive text-sm", children: [
@@ -19654,8 +19787,8 @@ __name(NotificationsListContainer, "NotificationsListContainer");
19654
19787
 
19655
19788
  // src/features/notification/components/modals/NotificationModal.tsx
19656
19789
  import { BellIcon } from "lucide-react";
19657
- import { useTranslations as useTranslations97 } from "next-intl";
19658
- import { Fragment as Fragment47, useCallback as useCallback39, useEffect as useEffect64, useMemo as useMemo33, useRef as useRef35, useState as useState85 } from "react";
19790
+ import { useTranslations as useTranslations98 } from "next-intl";
19791
+ import { Fragment as Fragment47, useCallback as useCallback39, useEffect as useEffect64, useMemo as useMemo34, useRef as useRef35, useState as useState85 } from "react";
19659
19792
  import { jsx as jsx229, jsxs as jsxs141 } from "react/jsx-runtime";
19660
19793
  function NotificationModalContent({ isOpen, setIsOpen }) {
19661
19794
  const _instanceId = useRef35(Math.random().toString(36).substr(2, 9));
@@ -19675,7 +19808,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
19675
19808
  removeSocketNotification: _removeSocketNotification,
19676
19809
  clearSocketNotifications
19677
19810
  } = useSocketContext();
19678
- const t = useTranslations97();
19811
+ const t = useTranslations98();
19679
19812
  const generateUrl = usePageUrlGenerator();
19680
19813
  const [newNotifications, setNewNotifications] = useState85(false);
19681
19814
  const preventAutoClose = useRef35(false);
@@ -19699,7 +19832,7 @@ function NotificationModalContent({ isOpen, setIsOpen }) {
19699
19832
  }
19700
19833
  return !breaker.isOpen;
19701
19834
  }, []);
19702
- const { unreadCount, unreadIds } = useMemo33(() => {
19835
+ const { unreadCount, unreadIds } = useMemo34(() => {
19703
19836
  const unreadNotifications2 = notifications.filter((notif) => !notif.isRead);
19704
19837
  return {
19705
19838
  unreadCount: unreadNotifications2.length,
@@ -20129,11 +20262,11 @@ function ReferralDialog({
20129
20262
  __name(ReferralDialog, "ReferralDialog");
20130
20263
 
20131
20264
  // src/features/role/components/details/RoleDetails.tsx
20132
- import { useTranslations as useTranslations98 } from "next-intl";
20265
+ import { useTranslations as useTranslations99 } from "next-intl";
20133
20266
  import { jsx as jsx233 } from "react/jsx-runtime";
20134
20267
  function RoleDetails() {
20135
20268
  const { role } = useRoleContext();
20136
- const t = useTranslations98();
20269
+ const t = useTranslations99();
20137
20270
  if (!role) return null;
20138
20271
  return /* @__PURE__ */ jsx233(Card, { className: "w-full", children: /* @__PURE__ */ jsx233(CardContent, { className: "p-4", children: /* @__PURE__ */ jsx233(AttributeElement, { title: t(`role.fields.description.label`), value: role.description }) }) });
20139
20272
  }
@@ -20152,10 +20285,10 @@ function RoleContainer() {
20152
20285
  __name(RoleContainer, "RoleContainer");
20153
20286
 
20154
20287
  // src/features/role/components/forms/FormRoles.tsx
20155
- import { useTranslations as useTranslations99 } from "next-intl";
20288
+ import { useTranslations as useTranslations100 } from "next-intl";
20156
20289
  import { jsx as jsx235, jsxs as jsxs145 } from "react/jsx-runtime";
20157
20290
  function FormRoles({ form, id, name, roles }) {
20158
- const t = useTranslations99();
20291
+ const t = useTranslations100();
20159
20292
  const { hasAccesToFeature } = useCurrentUserContext();
20160
20293
  return /* @__PURE__ */ jsx235("div", { className: "flex w-full flex-col", children: /* @__PURE__ */ jsx235(FormFieldWrapper, { form, name: id, label: name, children: (field) => /* @__PURE__ */ jsx235("div", { className: "flex w-full flex-col gap-y-1", children: roles.filter((role) => role.isSelectable).sort((a, b) => a.name.localeCompare(b.name)).map((role) => {
20161
20294
  if (role.requiredFeature && !hasAccesToFeature(role.requiredFeature.id)) return null;
@@ -20187,13 +20320,13 @@ function FormRoles({ form, id, name, roles }) {
20187
20320
  __name(FormRoles, "FormRoles");
20188
20321
 
20189
20322
  // src/features/role/components/forms/RemoveUserFromRole.tsx
20190
- import { useTranslations as useTranslations100 } from "next-intl";
20323
+ import { useTranslations as useTranslations101 } from "next-intl";
20191
20324
  import { useEffect as useEffect67, useState as useState89 } from "react";
20192
20325
  import { Fragment as Fragment50, jsx as jsx236, jsxs as jsxs146 } from "react/jsx-runtime";
20193
20326
  function RemoveUserFromRole({ role, user, refresh }) {
20194
20327
  const [open, setOpen] = useState89(false);
20195
20328
  const [canRemove, setCanRemove] = useState89(false);
20196
- const t = useTranslations100();
20329
+ const t = useTranslations101();
20197
20330
  useEffect67(() => {
20198
20331
  async function checkCompanyAdminDeletability() {
20199
20332
  const roleUsers = await UserService.findAllUsersByRole({
@@ -20263,7 +20396,7 @@ __name(RemoveUserFromRole, "RemoveUserFromRole");
20263
20396
 
20264
20397
  // src/features/role/components/forms/UserRoleAdd.tsx
20265
20398
  import { PlusCircle as PlusCircle2 } from "lucide-react";
20266
- import { useTranslations as useTranslations101 } from "next-intl";
20399
+ import { useTranslations as useTranslations102 } from "next-intl";
20267
20400
  import { useCallback as useCallback41, useEffect as useEffect68, useRef as useRef37, useState as useState90 } from "react";
20268
20401
  import { Fragment as Fragment51, jsx as jsx237, jsxs as jsxs147 } from "react/jsx-runtime";
20269
20402
  function UserRoleAdd({ user, refresh }) {
@@ -20271,7 +20404,7 @@ function UserRoleAdd({ user, refresh }) {
20271
20404
  const inputRef = useRef37(null);
20272
20405
  const [searchTerm, setSearchTerm] = useState90("");
20273
20406
  const [roles, setRoles] = useState90([]);
20274
- const t = useTranslations101();
20407
+ const t = useTranslations102();
20275
20408
  const addUserToRole = /* @__PURE__ */ __name(async (role) => {
20276
20409
  await RoleService.addUserToRole({
20277
20410
  roleId: role.id,
@@ -20360,10 +20493,10 @@ function UserRoleAdd({ user, refresh }) {
20360
20493
  __name(UserRoleAdd, "UserRoleAdd");
20361
20494
 
20362
20495
  // src/features/role/components/lists/RolesList.tsx
20363
- import { useTranslations as useTranslations102 } from "next-intl";
20496
+ import { useTranslations as useTranslations103 } from "next-intl";
20364
20497
  import { jsx as jsx238 } from "react/jsx-runtime";
20365
20498
  function RolesList() {
20366
- const t = useTranslations102();
20499
+ const t = useTranslations103();
20367
20500
  const data = useDataListRetriever({
20368
20501
  retriever: /* @__PURE__ */ __name((params) => RoleService.findAllRoles(params), "retriever"),
20369
20502
  retrieverParams: {},
@@ -20382,10 +20515,10 @@ function RolesList() {
20382
20515
  __name(RolesList, "RolesList");
20383
20516
 
20384
20517
  // src/features/role/components/lists/UserRolesList.tsx
20385
- import { useTranslations as useTranslations103 } from "next-intl";
20518
+ import { useTranslations as useTranslations104 } from "next-intl";
20386
20519
  import { jsx as jsx239 } from "react/jsx-runtime";
20387
20520
  function UserRolesList({ user }) {
20388
- const t = useTranslations103();
20521
+ const t = useTranslations104();
20389
20522
  const data = useDataListRetriever({
20390
20523
  retriever: /* @__PURE__ */ __name((params) => RoleService.findAllRolesByUser(params), "retriever"),
20391
20524
  retrieverParams: { userId: user.id },
@@ -21190,7 +21323,7 @@ __name(OAuthConsentScreen, "OAuthConsentScreen");
21190
21323
  // src/features/waitlist/components/forms/WaitlistForm.tsx
21191
21324
  import { zodResolver as zodResolver10 } from "@hookform/resolvers/zod";
21192
21325
  import { CheckCircle, Mail as Mail2 } from "lucide-react";
21193
- import { useTranslations as useTranslations104 } from "next-intl";
21326
+ import { useTranslations as useTranslations105 } from "next-intl";
21194
21327
  import { useState as useState94 } from "react";
21195
21328
  import { useForm as useForm10 } from "react-hook-form";
21196
21329
  import { v4 as v411 } from "uuid";
@@ -21291,7 +21424,7 @@ __name(WaitlistQuestionnaireRenderer, "WaitlistQuestionnaireRenderer");
21291
21424
  // src/features/waitlist/components/forms/WaitlistForm.tsx
21292
21425
  import { Fragment as Fragment53, jsx as jsx252, jsxs as jsxs160 } from "react/jsx-runtime";
21293
21426
  function WaitlistForm({ onSuccess }) {
21294
- const t = useTranslations104();
21427
+ const t = useTranslations105();
21295
21428
  const [isSubmitting, setIsSubmitting] = useState94(false);
21296
21429
  const [isSuccess, setIsSuccess] = useState94(false);
21297
21430
  const config = getWaitlistConfig();
@@ -21456,10 +21589,10 @@ __name(WaitlistHeroSection, "WaitlistHeroSection");
21456
21589
 
21457
21590
  // src/features/waitlist/components/sections/WaitlistSuccessState.tsx
21458
21591
  import { CheckCircle as CheckCircle3 } from "lucide-react";
21459
- import { useTranslations as useTranslations105 } from "next-intl";
21592
+ import { useTranslations as useTranslations106 } from "next-intl";
21460
21593
  import { jsx as jsx254, jsxs as jsxs162 } from "react/jsx-runtime";
21461
21594
  function WaitlistSuccessState() {
21462
- const t = useTranslations105();
21595
+ const t = useTranslations106();
21463
21596
  return /* @__PURE__ */ jsxs162("div", { className: "flex flex-col items-center justify-center space-y-4 py-8 text-center", children: [
21464
21597
  /* @__PURE__ */ jsx254("div", { className: "bg-primary/10 rounded-full p-4", children: /* @__PURE__ */ jsx254(CheckCircle3, { className: "text-primary h-12 w-12" }) }),
21465
21598
  /* @__PURE__ */ jsx254("h2", { className: "text-2xl font-bold", children: t("waitlist.success.title") }),
@@ -21471,11 +21604,11 @@ __name(WaitlistSuccessState, "WaitlistSuccessState");
21471
21604
 
21472
21605
  // src/features/waitlist/components/sections/WaitlistConfirmation.tsx
21473
21606
  import { CheckCircle as CheckCircle4, Loader2 as Loader27, XCircle as XCircle2 } from "lucide-react";
21474
- import { useTranslations as useTranslations106 } from "next-intl";
21607
+ import { useTranslations as useTranslations107 } from "next-intl";
21475
21608
  import { useEffect as useEffect69, useState as useState95 } from "react";
21476
21609
  import { jsx as jsx255, jsxs as jsxs163 } from "react/jsx-runtime";
21477
21610
  function WaitlistConfirmation({ code }) {
21478
- const t = useTranslations106();
21611
+ const t = useTranslations107();
21479
21612
  const [state, setState] = useState95("loading");
21480
21613
  const [errorMessage, setErrorMessage] = useState95("");
21481
21614
  useEffect69(() => {
@@ -21517,12 +21650,12 @@ __name(WaitlistConfirmation, "WaitlistConfirmation");
21517
21650
  // src/features/waitlist/components/lists/WaitlistList.tsx
21518
21651
  import { flexRender as flexRender2, getCoreRowModel as getCoreRowModel2, useReactTable as useReactTable2 } from "@tanstack/react-table";
21519
21652
  import { RefreshCw as RefreshCw4, Users as Users2 } from "lucide-react";
21520
- import { useTranslations as useTranslations108 } from "next-intl";
21653
+ import { useTranslations as useTranslations109 } from "next-intl";
21521
21654
  import { useCallback as useCallback47, useEffect as useEffect70, useState as useState96 } from "react";
21522
21655
 
21523
21656
  // src/features/waitlist/hooks/useWaitlistTableStructure.tsx
21524
21657
  import { Send } from "lucide-react";
21525
- import { useTranslations as useTranslations107 } from "next-intl";
21658
+ import { useTranslations as useTranslations108 } from "next-intl";
21526
21659
  import { jsx as jsx256, jsxs as jsxs164 } from "react/jsx-runtime";
21527
21660
  function parseQuestionnaire(questionnaire) {
21528
21661
  if (!questionnaire) return null;
@@ -21536,7 +21669,7 @@ __name(parseQuestionnaire, "parseQuestionnaire");
21536
21669
  function useWaitlistTableStructure({
21537
21670
  onInvite
21538
21671
  }) {
21539
- const t = useTranslations107();
21672
+ const t = useTranslations108();
21540
21673
  const getStatusBadge = /* @__PURE__ */ __name((status) => {
21541
21674
  const variants = {
21542
21675
  pending: { variant: "secondary" },
@@ -21614,7 +21747,7 @@ __name(useWaitlistTableStructure, "useWaitlistTableStructure");
21614
21747
  // src/features/waitlist/components/lists/WaitlistList.tsx
21615
21748
  import { jsx as jsx257, jsxs as jsxs165 } from "react/jsx-runtime";
21616
21749
  function WaitlistList() {
21617
- const t = useTranslations108();
21750
+ const t = useTranslations109();
21618
21751
  const [entries, setEntries] = useState96([]);
21619
21752
  const [total, setTotal] = useState96(0);
21620
21753
  const [isLoading, setIsLoading] = useState96(true);
@@ -21687,8 +21820,8 @@ __name(WaitlistList, "WaitlistList");
21687
21820
 
21688
21821
  // src/features/rbac/components/RbacContainer.tsx
21689
21822
  import { Loader2Icon as Loader2Icon4 } from "lucide-react";
21690
- import { useTranslations as useTranslations110 } from "next-intl";
21691
- import { memo as memo2, useCallback as useCallback49, useEffect as useEffect72, useMemo as useMemo34, useRef as useRef38, useState as useState98 } from "react";
21823
+ import { useTranslations as useTranslations111 } from "next-intl";
21824
+ import { memo as memo2, useCallback as useCallback49, useEffect as useEffect72, useMemo as useMemo35, useRef as useRef38, useState as useState98 } from "react";
21692
21825
 
21693
21826
  // src/features/rbac/components/RbacPermissionCell.tsx
21694
21827
  import { CheckIcon as CheckIcon9, MinusIcon as MinusIcon2, XIcon as XIcon11 } from "lucide-react";
@@ -21768,7 +21901,7 @@ __name(RbacPermissionCell, "RbacPermissionCell");
21768
21901
  // src/features/rbac/components/RbacPermissionPicker.tsx
21769
21902
  import { Popover as PopoverPrimitive2 } from "@base-ui/react/popover";
21770
21903
  import { CheckIcon as CheckIcon10, MinusIcon as MinusIcon3, XIcon as XIcon12 } from "lucide-react";
21771
- import { useTranslations as useTranslations109 } from "next-intl";
21904
+ import { useTranslations as useTranslations110 } from "next-intl";
21772
21905
  import { useCallback as useCallback48, useEffect as useEffect71, useState as useState97 } from "react";
21773
21906
  import { Fragment as Fragment54, jsx as jsx259, jsxs as jsxs167 } from "react/jsx-runtime";
21774
21907
  function RbacPermissionPicker({
@@ -21781,7 +21914,7 @@ function RbacPermissionPicker({
21781
21914
  onClear,
21782
21915
  onClose
21783
21916
  }) {
21784
- const t = useTranslations109();
21917
+ const t = useTranslations110();
21785
21918
  const [customSegment, setCustomSegment] = useState97("");
21786
21919
  useEffect71(() => {
21787
21920
  if (!open) setCustomSegment("");
@@ -21979,7 +22112,7 @@ var ModuleEditor = memo2(/* @__PURE__ */ __name(function ModuleEditor2({
21979
22112
  roleNames,
21980
22113
  onOpenPicker
21981
22114
  }) {
21982
- const t = useTranslations110();
22115
+ const t = useTranslations111();
21983
22116
  const defaultTokens = block.default ?? [];
21984
22117
  return /* @__PURE__ */ jsxs168("div", { className: "rounded-lg border border-accent bg-card", children: [
21985
22118
  /* @__PURE__ */ jsxs168("div", { className: "flex items-center justify-between border-b px-4 py-2", children: [
@@ -22029,7 +22162,7 @@ var ModuleEditor = memo2(/* @__PURE__ */ __name(function ModuleEditor2({
22029
22162
  ] });
22030
22163
  }, "ModuleEditor"));
22031
22164
  function RbacContainer() {
22032
- const t = useTranslations110();
22165
+ const t = useTranslations111();
22033
22166
  const { matrix, modulePaths, loading, error, roleNames, moduleNames, updateCell, clearCell } = useRbacContext();
22034
22167
  const [selectedModuleId, setSelectedModuleId] = useState98(null);
22035
22168
  const [activePicker, setActivePicker] = useState98(null);
@@ -22043,11 +22176,11 @@ function RbacContainer() {
22043
22176
  setSelectedModuleId(id);
22044
22177
  setActivePicker(null);
22045
22178
  }, []);
22046
- const sortedModuleIds = useMemo34(() => {
22179
+ const sortedModuleIds = useMemo35(() => {
22047
22180
  if (!matrix) return [];
22048
22181
  return Object.keys(matrix).sort((a, b) => (moduleNames?.[a] ?? a).localeCompare(moduleNames?.[b] ?? b));
22049
22182
  }, [matrix, moduleNames]);
22050
- const roleIds = useMemo34(() => {
22183
+ const roleIds = useMemo35(() => {
22051
22184
  if (roleNames) {
22052
22185
  return Object.keys(roleNames).sort((a, b) => (roleNames[a] ?? a).localeCompare(roleNames[b] ?? b));
22053
22186
  }
@@ -22065,14 +22198,14 @@ function RbacContainer() {
22065
22198
  setSelectedModuleId(sortedModuleIds[0]);
22066
22199
  }
22067
22200
  }, [selectedModuleId, sortedModuleIds]);
22068
- const activeValue = useMemo34(() => {
22201
+ const activeValue = useMemo35(() => {
22069
22202
  if (!activePicker || !matrix) return void 0;
22070
22203
  const block = matrix[activePicker.moduleId];
22071
22204
  if (!block) return void 0;
22072
22205
  const tokens = activePicker.rowKey === "default" ? block.default : block[activePicker.rowKey];
22073
22206
  return cellValue(tokens, activePicker.action);
22074
22207
  }, [activePicker, matrix]);
22075
- const activeSegments = useMemo34(() => {
22208
+ const activeSegments = useMemo35(() => {
22076
22209
  if (!activePicker) return [];
22077
22210
  return modulePaths[activePicker.moduleId] ?? [];
22078
22211
  }, [activePicker, modulePaths]);
@@ -22142,8 +22275,8 @@ __name(RbacContainer, "RbacContainer");
22142
22275
 
22143
22276
  // src/features/rbac/components/RbacByRoleContainer.tsx
22144
22277
  import { Loader2Icon as Loader2Icon5 } from "lucide-react";
22145
- import { useTranslations as useTranslations111 } from "next-intl";
22146
- import { Fragment as Fragment55, memo as memo3, useCallback as useCallback50, useEffect as useEffect73, useMemo as useMemo35, useRef as useRef39, useState as useState99 } from "react";
22278
+ import { useTranslations as useTranslations112 } from "next-intl";
22279
+ import { Fragment as Fragment55, memo as memo3, useCallback as useCallback50, useEffect as useEffect73, useMemo as useMemo36, useRef as useRef39, useState as useState99 } from "react";
22147
22280
  import { jsx as jsx261, jsxs as jsxs169 } from "react/jsx-runtime";
22148
22281
  function findToken2(tokens, action) {
22149
22282
  if (!tokens) return void 0;
@@ -22179,7 +22312,7 @@ var ACTION_LABELS2 = {
22179
22312
  delete: "Delete"
22180
22313
  };
22181
22314
  function RbacByRoleContainer() {
22182
- const t = useTranslations111();
22315
+ const t = useTranslations112();
22183
22316
  const { matrix, modulePaths, loading, error, roleNames, moduleNames, updateCell, clearCell } = useRbacContext();
22184
22317
  const [selectedRoleId, setSelectedRoleId] = useState99(null);
22185
22318
  const [activePicker, setActivePicker] = useState99(null);
@@ -22193,11 +22326,11 @@ function RbacByRoleContainer() {
22193
22326
  setSelectedRoleId(id);
22194
22327
  setActivePicker(null);
22195
22328
  }, []);
22196
- const sortedRoleIds = useMemo35(() => {
22329
+ const sortedRoleIds = useMemo36(() => {
22197
22330
  if (!roleNames) return [];
22198
22331
  return Object.keys(roleNames).sort((a, b) => (roleNames[a] ?? a).localeCompare(roleNames[b] ?? b));
22199
22332
  }, [roleNames]);
22200
- const sortedModuleIds = useMemo35(() => {
22333
+ const sortedModuleIds = useMemo36(() => {
22201
22334
  if (!matrix) return [];
22202
22335
  return Object.keys(matrix).sort((a, b) => (moduleNames?.[a] ?? a).localeCompare(moduleNames?.[b] ?? b));
22203
22336
  }, [matrix, moduleNames]);
@@ -22206,14 +22339,14 @@ function RbacByRoleContainer() {
22206
22339
  setSelectedRoleId(sortedRoleIds[0]);
22207
22340
  }
22208
22341
  }, [selectedRoleId, sortedRoleIds]);
22209
- const activeValue = useMemo35(() => {
22342
+ const activeValue = useMemo36(() => {
22210
22343
  if (!activePicker || !matrix) return void 0;
22211
22344
  const block = matrix[activePicker.moduleId];
22212
22345
  if (!block) return void 0;
22213
22346
  const tokens = activePicker.rowKey === "default" ? block.default : block[activePicker.rowKey];
22214
22347
  return cellValue2(tokens, activePicker.action);
22215
22348
  }, [activePicker, matrix]);
22216
- const activeSegments = useMemo35(() => {
22349
+ const activeSegments = useMemo36(() => {
22217
22350
  if (!activePicker) return [];
22218
22351
  return modulePaths[activePicker.moduleId] ?? [];
22219
22352
  }, [activePicker, modulePaths]);
@@ -22674,6 +22807,7 @@ export {
22674
22807
  CommonEditorHeader,
22675
22808
  CommonEditorDiscardDialog,
22676
22809
  CommonEditorTrigger,
22810
+ CommonAddTrigger,
22677
22811
  useEditorDialog,
22678
22812
  EditorSheet,
22679
22813
  DatePickerPopover,
@@ -22842,4 +22976,4 @@ export {
22842
22976
  useOAuthClients,
22843
22977
  useOAuthClient
22844
22978
  };
22845
- //# sourceMappingURL=chunk-RKUUGCYB.mjs.map
22979
+ //# sourceMappingURL=chunk-SVEPL5J2.mjs.map