@carlonicora/nextjs-jsonapi 1.131.1 → 1.131.2

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.
@@ -7557,11 +7557,23 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
7557
7557
  const descriptor = Object.getOwnPropertyDescriptor(_chunkLBMNRFCYjs.Modules, matchedModuleKey);
7558
7558
  return _optionalChain([descriptor, 'optionalAccess', _181 => _181.get, 'optionalAccess', _182 => _182.call, 'call', _183 => _183(_chunkLBMNRFCYjs.Modules)]);
7559
7559
  }, "matchUrlToModule");
7560
- const currentUser = dehydratedUser ? _chunkLBMNRFCYjs.rehydrate.call(void 0, _chunkLBMNRFCYjs.Modules.User, dehydratedUser) : null;
7561
- const company = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _184 => _184.company]), () => ( null));
7560
+ const currentUser = _react.useMemo.call(void 0,
7561
+ () => dehydratedUser ? _chunkLBMNRFCYjs.rehydrate.call(void 0, _chunkLBMNRFCYjs.Modules.User, dehydratedUser) : null,
7562
+ [dehydratedUser]
7563
+ );
7564
+ const [tokenOverride, setTokenOverride] = _react.useState.call(void 0, null);
7565
+ const company = _react.useMemo.call(void 0, () => {
7566
+ const c = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _184 => _184.company]), () => ( null));
7567
+ if (!c || !tokenOverride) return c;
7568
+ return Object.assign(Object.create(Object.getPrototypeOf(c)), c, {
7569
+ _availableMonthlyTokens: tokenOverride.availableMonthlyTokens,
7570
+ _availableExtraTokens: tokenOverride.availableExtraTokens
7571
+ });
7572
+ }, [currentUser, tokenOverride]);
7562
7573
  const setUser = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (user) => {
7563
7574
  if (user) setDehydratedUser(user.dehydrate());
7564
7575
  else setDehydratedUser(null);
7576
+ setTokenOverride(null);
7565
7577
  }, "setUser");
7566
7578
  const hasRole = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (roleId) => {
7567
7579
  if (!currentUser) return false;
@@ -7618,6 +7630,7 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
7618
7630
  })]);
7619
7631
  }
7620
7632
  setDehydratedUser(fullUser.dehydrate());
7633
+ setTokenOverride(null);
7621
7634
  }
7622
7635
  } catch (error) {
7623
7636
  console.error("Failed to refresh user data:", error);
@@ -7635,21 +7648,28 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
7635
7648
  if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess', _197 => _197.company, 'optionalAccess', _198 => _198.id])) {
7636
7649
  return;
7637
7650
  }
7638
- const handleCompanyUpdate = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
7639
- if (data.companyId === _optionalChain([currentUser, 'access', _199 => _199.company, 'optionalAccess', _200 => _200.id]) && !isRefreshingRef.current) {
7651
+ const handleTokensUpdated = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
7652
+ if (data.companyId !== _optionalChain([currentUser, 'access', _199 => _199.company, 'optionalAccess', _200 => _200.id])) return;
7653
+ setTokenOverride({
7654
+ availableMonthlyTokens: data.availableMonthlyTokens,
7655
+ availableExtraTokens: data.availableExtraTokens
7656
+ });
7657
+ }, "handleTokensUpdated");
7658
+ const handleSubscriptionUpdated = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
7659
+ if (data.companyId === _optionalChain([currentUser, 'access', _201 => _201.company, 'optionalAccess', _202 => _202.id]) && !isRefreshingRef.current) {
7640
7660
  isRefreshingRef.current = true;
7641
7661
  refreshUserRef.current({ skipCookieUpdate: true }).finally(() => {
7642
7662
  isRefreshingRef.current = false;
7643
7663
  });
7644
7664
  }
7645
- }, "handleCompanyUpdate");
7646
- socket.on("company:tokens_updated", handleCompanyUpdate);
7647
- socket.on("company:subscription_updated", handleCompanyUpdate);
7665
+ }, "handleSubscriptionUpdated");
7666
+ socket.on("company:tokens_updated", handleTokensUpdated);
7667
+ socket.on("company:subscription_updated", handleSubscriptionUpdated);
7648
7668
  return () => {
7649
- socket.off("company:tokens_updated", handleCompanyUpdate);
7650
- socket.off("company:subscription_updated", handleCompanyUpdate);
7669
+ socket.off("company:tokens_updated", handleTokensUpdated);
7670
+ socket.off("company:subscription_updated", handleSubscriptionUpdated);
7651
7671
  };
7652
- }, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess', _201 => _201.company, 'optionalAccess', _202 => _202.id])]);
7672
+ }, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess', _203 => _203.company, 'optionalAccess', _204 => _204.id])]);
7653
7673
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7654
7674
  CurrentUserContext.Provider,
7655
7675
  {
@@ -7720,7 +7740,7 @@ function AddUserToRoleInternal({ role, refresh }) {
7720
7740
  const data = useDataListRetriever({
7721
7741
  ready: !!company && show,
7722
7742
  retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkLBMNRFCYjs.UserService.findAllUsers(params), "retriever"),
7723
- retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _203 => _203.id]) },
7743
+ retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _205 => _205.id]) },
7724
7744
  module: _chunkLBMNRFCYjs.Modules.User
7725
7745
  });
7726
7746
  _react.useEffect.call(void 0, () => {
@@ -7788,10 +7808,10 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
7788
7808
  onValueChange: setFiles,
7789
7809
  dropzoneOptions: dropzone2,
7790
7810
  className: "h-40 w-40 rounded-full p-0",
7791
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "bg-muted text-muted-foreground flex h-full w-full flex-col items-center justify-center", children: !resetImage && (file || _optionalChain([user, 'optionalAccess', _204 => _204.avatar])) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7811
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "bg-muted text-muted-foreground flex h-full w-full flex-col items-center justify-center", children: !resetImage && (file || _optionalChain([user, 'optionalAccess', _206 => _206.avatar])) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7792
7812
  _image2.default,
7793
7813
  {
7794
- src: file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess', _205 => _205.avatar]) || "",
7814
+ src: file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess', _207 => _207.avatar]) || "",
7795
7815
  alt: t(`common.avatar`),
7796
7816
  width: 200,
7797
7817
  height: 200
@@ -7799,7 +7819,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
7799
7819
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, { className: "my-4 h-8 w-8" }) })
7800
7820
  }
7801
7821
  ),
7802
- !resetImage && (file || _optionalChain([user, 'optionalAccess', _206 => _206.avatar])) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7822
+ !resetImage && (file || _optionalChain([user, 'optionalAccess', _208 => _208.avatar])) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7803
7823
  Button,
7804
7824
  {
7805
7825
  className: "",
@@ -7827,7 +7847,7 @@ function UserDeleterInternal({ user, onDeleted, companyId }) {
7827
7847
  const router = _chunkXTLTQQ7Xjs.useI18nRouter.call(void 0, );
7828
7848
  const _t = _nextintl.useTranslations.call(void 0, );
7829
7849
  let cId;
7830
- if (_optionalChain([currentUser, 'optionalAccess', _207 => _207.roles, 'access', _208 => _208.find, 'call', _209 => _209((role) => role.id === _chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator)]) && companyId) {
7850
+ if (_optionalChain([currentUser, 'optionalAccess', _209 => _209.roles, 'access', _210 => _210.find, 'call', _211 => _211((role) => role.id === _chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator)]) && companyId) {
7831
7851
  cId = companyId;
7832
7852
  } else {
7833
7853
  if (!company) return;
@@ -7890,18 +7910,18 @@ function UserEditorInternal({
7890
7910
  }, [company]);
7891
7911
  const handleDialogOpenChange = _react.useCallback.call(void 0,
7892
7912
  (open) => {
7893
- if (open && (company || _optionalChain([currentUser, 'optionalAccess', _210 => _210.roles, 'access', _211 => _211.find, 'call', _212 => _212((role) => role.id === _chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator)])) && roles.length === 0) {
7913
+ if (open && (company || _optionalChain([currentUser, 'optionalAccess', _212 => _212.roles, 'access', _213 => _213.find, 'call', _214 => _214((role) => role.id === _chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator)])) && roles.length === 0) {
7894
7914
  async function fetchRoles() {
7895
7915
  const allRoles = await _chunkLBMNRFCYjs.RoleService.findAllRoles({});
7896
7916
  const availableRoles = allRoles.filter(
7897
- (role) => role.id !== _chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess', _213 => _213.features, 'access', _214 => _214.some, 'call', _215 => _215((feature) => feature.id === _optionalChain([role, 'access', _216 => _216.requiredFeature, 'optionalAccess', _217 => _217.id]))]))
7917
+ (role) => role.id !== _chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess', _215 => _215.features, 'access', _216 => _216.some, 'call', _217 => _217((feature) => feature.id === _optionalChain([role, 'access', _218 => _218.requiredFeature, 'optionalAccess', _219 => _219.id]))]))
7898
7918
  );
7899
7919
  setRoles(availableRoles);
7900
7920
  }
7901
7921
  _chunk7QVYU63Ejs.__name.call(void 0, fetchRoles, "fetchRoles");
7902
7922
  fetchRoles();
7903
7923
  }
7904
- _optionalChain([onDialogOpenChange, 'optionalCall', _218 => _218(open)]);
7924
+ _optionalChain([onDialogOpenChange, 'optionalCall', _220 => _220(open)]);
7905
7925
  },
7906
7926
  [company, currentUser, roles.length, onDialogOpenChange]
7907
7927
  );
@@ -7935,29 +7955,29 @@ function UserEditorInternal({
7935
7955
  );
7936
7956
  const getDefaultValues = _react.useCallback.call(void 0, () => {
7937
7957
  return {
7938
- id: _optionalChain([user, 'optionalAccess', _219 => _219.id]) || _uuid.v4.call(void 0, ),
7939
- name: _optionalChain([user, 'optionalAccess', _220 => _220.name]) || "",
7940
- title: _optionalChain([user, 'optionalAccess', _221 => _221.title]) || "",
7941
- bio: _optionalChain([user, 'optionalAccess', _222 => _222.bio]) || "",
7942
- email: _optionalChain([user, 'optionalAccess', _223 => _223.email]) || "",
7943
- phone: _optionalChain([user, 'optionalAccess', _224 => _224.phone]) || "",
7958
+ id: _optionalChain([user, 'optionalAccess', _221 => _221.id]) || _uuid.v4.call(void 0, ),
7959
+ name: _optionalChain([user, 'optionalAccess', _222 => _222.name]) || "",
7960
+ title: _optionalChain([user, 'optionalAccess', _223 => _223.title]) || "",
7961
+ bio: _optionalChain([user, 'optionalAccess', _224 => _224.bio]) || "",
7962
+ email: _optionalChain([user, 'optionalAccess', _225 => _225.email]) || "",
7963
+ phone: _optionalChain([user, 'optionalAccess', _226 => _226.phone]) || "",
7944
7964
  password: "",
7945
- roleIds: _optionalChain([user, 'optionalAccess', _225 => _225.roles, 'access', _226 => _226.map, 'call', _227 => _227((role) => role.id)]) || [],
7965
+ roleIds: _optionalChain([user, 'optionalAccess', _227 => _227.roles, 'access', _228 => _228.map, 'call', _229 => _229((role) => role.id)]) || [],
7946
7966
  sendInvitationEmail: false,
7947
- avatar: _optionalChain([user, 'optionalAccess', _228 => _228.avatarUrl]) || ""
7967
+ avatar: _optionalChain([user, 'optionalAccess', _230 => _230.avatarUrl]) || ""
7948
7968
  };
7949
7969
  }, [user]);
7950
7970
  const form = _reacthookform.useForm.call(void 0, {
7951
7971
  resolver: _zod.zodResolver.call(void 0, formSchema),
7952
7972
  defaultValues: getDefaultValues()
7953
7973
  });
7954
- const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess', _229 => _229.id]) === _optionalChain([user, 'optionalAccess', _230 => _230.id]) && hasRole(_chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator)) && (hasPermissionToModule({ module: _chunkLBMNRFCYjs.Modules.User, action: "update" /* Update */ }) || hasRole(_chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator));
7974
+ const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess', _231 => _231.id]) === _optionalChain([user, 'optionalAccess', _232 => _232.id]) && hasRole(_chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator)) && (hasPermissionToModule({ module: _chunkLBMNRFCYjs.Modules.User, action: "update" /* Update */ }) || hasRole(_chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator));
7955
7975
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7956
7976
  EditorSheet,
7957
7977
  {
7958
7978
  form,
7959
7979
  entityType: t(`entities.users`, { count: 1 }),
7960
- entityName: _optionalChain([user, 'optionalAccess', _231 => _231.name]),
7980
+ entityName: _optionalChain([user, 'optionalAccess', _233 => _233.name]),
7961
7981
  isEdit: !!user,
7962
7982
  module: _chunkLBMNRFCYjs.Modules.User,
7963
7983
  propagateChanges,
@@ -8009,7 +8029,7 @@ function UserEditorInternal({
8009
8029
  adminCreated
8010
8030
  };
8011
8031
  const updatedUser = user ? await _chunkLBMNRFCYjs.UserService.update(payload) : await _chunkLBMNRFCYjs.UserService.create(payload);
8012
- if (_optionalChain([currentUser, 'optionalAccess', _232 => _232.id]) === updatedUser.id) setUser(updatedUser);
8032
+ if (_optionalChain([currentUser, 'optionalAccess', _234 => _234.id]) === updatedUser.id) setUser(updatedUser);
8013
8033
  return updatedUser;
8014
8034
  },
8015
8035
  onRevalidate,
@@ -8263,7 +8283,7 @@ function EntityMultiSelector({
8263
8283
  if (open) {
8264
8284
  setSearchTerm("");
8265
8285
  requestAnimationFrame(() => {
8266
- _optionalChain([searchInputRef, 'access', _233 => _233.current, 'optionalAccess', _234 => _234.focus, 'call', _235 => _235()]);
8286
+ _optionalChain([searchInputRef, 'access', _235 => _235.current, 'optionalAccess', _236 => _236.focus, 'call', _237 => _237()]);
8267
8287
  });
8268
8288
  }
8269
8289
  }, [open]);
@@ -8280,7 +8300,7 @@ function EntityMultiSelector({
8280
8300
  form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
8281
8301
  const cb = onChangeRef.current;
8282
8302
  if (cb) {
8283
- const fullData = next.map((v) => _optionalChain([options, 'access', _236 => _236.find, 'call', _237 => _237((opt) => opt.id === v.id), 'optionalAccess', _238 => _238.entityData])).filter(Boolean);
8303
+ const fullData = next.map((v) => _optionalChain([options, 'access', _238 => _238.find, 'call', _239 => _239((opt) => opt.id === v.id), 'optionalAccess', _240 => _240.entityData])).filter(Boolean);
8284
8304
  cb(fullData);
8285
8305
  }
8286
8306
  },
@@ -8293,7 +8313,7 @@ function EntityMultiSelector({
8293
8313
  form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
8294
8314
  const cb = onChangeRef.current;
8295
8315
  if (cb) {
8296
- const fullData = next.map((v) => _optionalChain([options, 'access', _239 => _239.find, 'call', _240 => _240((opt) => opt.id === v.id), 'optionalAccess', _241 => _241.entityData])).filter(Boolean);
8316
+ const fullData = next.map((v) => _optionalChain([options, 'access', _241 => _241.find, 'call', _242 => _242((opt) => opt.id === v.id), 'optionalAccess', _243 => _243.entityData])).filter(Boolean);
8297
8317
  cb(fullData);
8298
8318
  }
8299
8319
  },
@@ -8437,11 +8457,11 @@ function UserMultiSelect({
8437
8457
  emptyText: t("ui.search.no_results", { type: t("entities.users", { count: 2 }) }),
8438
8458
  isRequired,
8439
8459
  retriever: (params) => _chunkLBMNRFCYjs.UserService.findAllUsers(params),
8440
- retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _242 => _242.id]) },
8460
+ retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _244 => _244.id]) },
8441
8461
  module: _chunkLBMNRFCYjs.Modules.User,
8442
8462
  getLabel: (user) => user.name,
8443
8463
  toFormValue: (user) => ({ id: user.id, name: user.name, avatar: user.avatar }),
8444
- excludeId: _optionalChain([currentUser, 'optionalAccess', _243 => _243.id]),
8464
+ excludeId: _optionalChain([currentUser, 'optionalAccess', _245 => _245.id]),
8445
8465
  onChange,
8446
8466
  renderOption: (user) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
8447
8467
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatarIcon, { url: user.avatar, name: user.name }),
@@ -9239,7 +9259,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9239
9259
  }, []);
9240
9260
  const [prevRange, setPrevRange] = _react.useState.call(void 0, date);
9241
9261
  _react.useEffect.call(void 0, () => {
9242
- if (_optionalChain([date, 'optionalAccess', _244 => _244.from]) && _optionalChain([date, 'optionalAccess', _245 => _245.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _246 => _246.from, 'optionalAccess', _247 => _247.getTime, 'call', _248 => _248()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _249 => _249.to, 'optionalAccess', _250 => _250.getTime, 'call', _251 => _251()]) !== date.to.getTime())) {
9262
+ if (_optionalChain([date, 'optionalAccess', _246 => _246.from]) && _optionalChain([date, 'optionalAccess', _247 => _247.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _248 => _248.from, 'optionalAccess', _249 => _249.getTime, 'call', _250 => _250()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _251 => _251.to, 'optionalAccess', _252 => _252.getTime, 'call', _253 => _253()]) !== date.to.getTime())) {
9243
9263
  onDateChange(date);
9244
9264
  setPrevRange(date);
9245
9265
  setOpen(false);
@@ -9250,7 +9270,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9250
9270
  setDate(void 0);
9251
9271
  return;
9252
9272
  }
9253
- if (range.from && (!_optionalChain([date, 'optionalAccess', _252 => _252.from]) || range.from.getTime() !== date.from.getTime())) {
9273
+ if (range.from && (!_optionalChain([date, 'optionalAccess', _254 => _254.from]) || range.from.getTime() !== date.from.getTime())) {
9254
9274
  setDate({ from: range.from, to: void 0 });
9255
9275
  } else {
9256
9276
  setDate(range);
@@ -9265,7 +9285,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9265
9285
  className: _chunkLBMNRFCYjs.cn.call(void 0, "w-[300px] justify-start text-left font-normal", !date && "text-muted-foreground"),
9266
9286
  children: [
9267
9287
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
9268
- _optionalChain([date, 'optionalAccess', _253 => _253.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9288
+ _optionalChain([date, 'optionalAccess', _255 => _255.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9269
9289
  _datefns.format.call(void 0, date.from, "LLL dd, y"),
9270
9290
  " - ",
9271
9291
  _datefns.format.call(void 0, date.to, "LLL dd, y")
@@ -9288,7 +9308,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9288
9308
  ),
9289
9309
  children: [
9290
9310
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
9291
- _optionalChain([date, 'optionalAccess', _254 => _254.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9311
+ _optionalChain([date, 'optionalAccess', _256 => _256.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9292
9312
  _datefns.format.call(void 0, date.from, "LLL dd, y"),
9293
9313
  " - ",
9294
9314
  _datefns.format.call(void 0, date.to, "LLL dd, y")
@@ -9301,7 +9321,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9301
9321
  Calendar,
9302
9322
  {
9303
9323
  mode: "range",
9304
- defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _255 => _255.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
9324
+ defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _257 => _257.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
9305
9325
  selected: date,
9306
9326
  onSelect: handleSelect,
9307
9327
  numberOfMonths: 2
@@ -9341,26 +9361,26 @@ function useEditorDialog(isFormDirty, options) {
9341
9361
  const [showDiscardConfirm, setShowDiscardConfirm] = _react.useState.call(void 0, false);
9342
9362
  const syncingFromProp = _react.useRef.call(void 0, false);
9343
9363
  _react.useEffect.call(void 0, () => {
9344
- if (_optionalChain([options, 'optionalAccess', _256 => _256.dialogOpen]) !== void 0 && options.dialogOpen !== open) {
9364
+ if (_optionalChain([options, 'optionalAccess', _258 => _258.dialogOpen]) !== void 0 && options.dialogOpen !== open) {
9345
9365
  syncingFromProp.current = true;
9346
9366
  setOpen(options.dialogOpen);
9347
9367
  }
9348
- }, [_optionalChain([options, 'optionalAccess', _257 => _257.dialogOpen])]);
9349
- const onDialogOpenChangeRef = _react.useRef.call(void 0, _optionalChain([options, 'optionalAccess', _258 => _258.onDialogOpenChange]));
9350
- onDialogOpenChangeRef.current = _optionalChain([options, 'optionalAccess', _259 => _259.onDialogOpenChange]);
9368
+ }, [_optionalChain([options, 'optionalAccess', _259 => _259.dialogOpen])]);
9369
+ const onDialogOpenChangeRef = _react.useRef.call(void 0, _optionalChain([options, 'optionalAccess', _260 => _260.onDialogOpenChange]));
9370
+ onDialogOpenChangeRef.current = _optionalChain([options, 'optionalAccess', _261 => _261.onDialogOpenChange]);
9351
9371
  _react.useEffect.call(void 0, () => {
9352
9372
  if (syncingFromProp.current) {
9353
9373
  syncingFromProp.current = false;
9354
9374
  return;
9355
9375
  }
9356
- _optionalChain([onDialogOpenChangeRef, 'access', _260 => _260.current, 'optionalCall', _261 => _261(open)]);
9376
+ _optionalChain([onDialogOpenChangeRef, 'access', _262 => _262.current, 'optionalCall', _263 => _263(open)]);
9357
9377
  }, [open]);
9358
9378
  _react.useEffect.call(void 0, () => {
9359
- if (_optionalChain([options, 'optionalAccess', _262 => _262.forceShow])) setOpen(true);
9360
- }, [_optionalChain([options, 'optionalAccess', _263 => _263.forceShow])]);
9379
+ if (_optionalChain([options, 'optionalAccess', _264 => _264.forceShow])) setOpen(true);
9380
+ }, [_optionalChain([options, 'optionalAccess', _265 => _265.forceShow])]);
9361
9381
  _react.useEffect.call(void 0, () => {
9362
9382
  if (!open) {
9363
- if (_optionalChain([options, 'optionalAccess', _264 => _264.onClose])) options.onClose();
9383
+ if (_optionalChain([options, 'optionalAccess', _266 => _266.onClose])) options.onClose();
9364
9384
  }
9365
9385
  }, [open]);
9366
9386
  const handleOpenChange = _react.useCallback.call(void 0,
@@ -9464,7 +9484,7 @@ function EditorSheet({
9464
9484
  hasBeenOpen.current = true;
9465
9485
  } else if (hasBeenOpen.current) {
9466
9486
  form.reset(onReset());
9467
- _optionalChain([onClose, 'optionalCall', _265 => _265()]);
9487
+ _optionalChain([onClose, 'optionalCall', _267 => _267()]);
9468
9488
  }
9469
9489
  }, [open]);
9470
9490
  const wrappedOnSubmit = _react.useCallback.call(void 0,
@@ -9478,11 +9498,11 @@ function EditorSheet({
9478
9498
  if (onSuccess) {
9479
9499
  await onSuccess();
9480
9500
  } else if (result) {
9481
- _optionalChain([onRevalidate, 'optionalCall', _266 => _266(generateUrl({ page: module, id: result.id, language: "[locale]" }))]);
9501
+ _optionalChain([onRevalidate, 'optionalCall', _268 => _268(generateUrl({ page: module, id: result.id, language: "[locale]" }))]);
9482
9502
  if (propagateChanges) {
9483
9503
  propagateChanges(result);
9484
9504
  } else {
9485
- _optionalChain([onNavigate, 'optionalCall', _267 => _267(generateUrl({ page: module, id: result.id }))]);
9505
+ _optionalChain([onNavigate, 'optionalCall', _269 => _269(generateUrl({ page: module, id: result.id }))]);
9486
9506
  }
9487
9507
  }
9488
9508
  } catch (error) {
@@ -9674,7 +9694,7 @@ function EntitySelector({
9674
9694
  {
9675
9695
  className: `bg-input/20 dark:bg-input/30 border-input focus-visible:border-ring focus-visible:ring-ring/30 focus-visible:ring-[2px] flex min-h-7 w-full items-center gap-2 rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed ${hasValue(effectiveValue) ? "" : "text-muted-foreground"} ${disabled ? "cursor-not-allowed opacity-50" : ""}`,
9676
9696
  children: [
9677
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 flex-1 truncate text-left", children: hasValue(effectiveValue) ? getSelectedItemDisplay ? getSelectedItemDisplay(effectiveValue) : _nullishCoalesce(_optionalChain([effectiveValue, 'optionalAccess', _268 => _268.name]), () => ( "")) : placeholder }),
9697
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "min-w-0 flex-1 truncate text-left", children: hasValue(effectiveValue) ? getSelectedItemDisplay ? getSelectedItemDisplay(effectiveValue) : _nullishCoalesce(_optionalChain([effectiveValue, 'optionalAccess', _270 => _270.name]), () => ( "")) : placeholder }),
9678
9698
  hasValue(effectiveValue) && !disabled && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
9679
9699
  _lucidereact.CircleX,
9680
9700
  {
@@ -9809,7 +9829,7 @@ var FileUploader = _react.forwardRef.call(void 0,
9809
9829
  movePrev();
9810
9830
  } else if (e.key === "Enter" || e.key === "Space") {
9811
9831
  if (activeIndex === -1) {
9812
- _optionalChain([dropzoneState, 'access', _269 => _269.inputRef, 'access', _270 => _270.current, 'optionalAccess', _271 => _271.click, 'call', _272 => _272()]);
9832
+ _optionalChain([dropzoneState, 'access', _271 => _271.inputRef, 'access', _272 => _272.current, 'optionalAccess', _273 => _273.click, 'call', _274 => _274()]);
9813
9833
  }
9814
9834
  } else if (e.key === "Delete" || e.key === "Backspace") {
9815
9835
  if (activeIndex !== -1) {
@@ -9847,13 +9867,13 @@ var FileUploader = _react.forwardRef.call(void 0,
9847
9867
  onValueChange(newValues);
9848
9868
  if (rejectedFiles.length > 0) {
9849
9869
  for (let i = 0; i < rejectedFiles.length; i++) {
9850
- if (_optionalChain([rejectedFiles, 'access', _273 => _273[i], 'access', _274 => _274.errors, 'access', _275 => _275[0], 'optionalAccess', _276 => _276.code]) === "file-too-large") {
9870
+ if (_optionalChain([rejectedFiles, 'access', _275 => _275[i], 'access', _276 => _276.errors, 'access', _277 => _277[0], 'optionalAccess', _278 => _278.code]) === "file-too-large") {
9851
9871
  _chunkLBMNRFCYjs.showError.call(void 0, t("common.errors.file"), {
9852
9872
  description: t(`common.errors.file_max`, { size: maxSize / 1024 / 1024 })
9853
9873
  });
9854
9874
  break;
9855
9875
  }
9856
- if (_optionalChain([rejectedFiles, 'access', _277 => _277[i], 'access', _278 => _278.errors, 'access', _279 => _279[0], 'optionalAccess', _280 => _280.message])) {
9876
+ if (_optionalChain([rejectedFiles, 'access', _279 => _279[i], 'access', _280 => _280.errors, 'access', _281 => _281[0], 'optionalAccess', _282 => _282.message])) {
9857
9877
  _chunkLBMNRFCYjs.showError.call(void 0, t(`common.errors.file`), {
9858
9878
  description: rejectedFiles[i].errors[0].message
9859
9879
  });
@@ -10050,7 +10070,7 @@ FileInput.displayName = "FileInput";
10050
10070
  var _dynamic = require('next/dynamic'); var _dynamic2 = _interopRequireDefault(_dynamic);
10051
10071
 
10052
10072
 
10053
- var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-BR3IRGJW.js"))), {
10073
+ var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-5RUXGWLR.js"))), {
10054
10074
  ssr: false
10055
10075
  });
10056
10076
  var BlockNoteEditorContainer = React.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function EditorContainer(props) {
@@ -10115,7 +10135,7 @@ function FormBlockNote({
10115
10135
  onChange: (content, isEmpty) => {
10116
10136
  lastEditorContentRef.current = content;
10117
10137
  field.onChange(content);
10118
- _optionalChain([onEmptyChange, 'optionalCall', _281 => _281(isEmpty)]);
10138
+ _optionalChain([onEmptyChange, 'optionalCall', _283 => _283(isEmpty)]);
10119
10139
  },
10120
10140
  placeholder,
10121
10141
  bordered: true,
@@ -10779,11 +10799,11 @@ function FormPlaceAutocomplete({
10779
10799
  const data = await response.json();
10780
10800
  if (data.suggestions) {
10781
10801
  const formattedSuggestions = data.suggestions.map((suggestion) => ({
10782
- place_id: _optionalChain([suggestion, 'access', _282 => _282.placePrediction, 'optionalAccess', _283 => _283.placeId]) || "",
10783
- description: _optionalChain([suggestion, 'access', _284 => _284.placePrediction, 'optionalAccess', _285 => _285.text, 'optionalAccess', _286 => _286.text]) || "",
10802
+ place_id: _optionalChain([suggestion, 'access', _284 => _284.placePrediction, 'optionalAccess', _285 => _285.placeId]) || "",
10803
+ description: _optionalChain([suggestion, 'access', _286 => _286.placePrediction, 'optionalAccess', _287 => _287.text, 'optionalAccess', _288 => _288.text]) || "",
10784
10804
  structured_formatting: {
10785
- main_text: _optionalChain([suggestion, 'access', _287 => _287.placePrediction, 'optionalAccess', _288 => _288.structuredFormat, 'optionalAccess', _289 => _289.mainText, 'optionalAccess', _290 => _290.text]) || "",
10786
- secondary_text: _optionalChain([suggestion, 'access', _291 => _291.placePrediction, 'optionalAccess', _292 => _292.structuredFormat, 'optionalAccess', _293 => _293.secondaryText, 'optionalAccess', _294 => _294.text]) || ""
10805
+ main_text: _optionalChain([suggestion, 'access', _289 => _289.placePrediction, 'optionalAccess', _290 => _290.structuredFormat, 'optionalAccess', _291 => _291.mainText, 'optionalAccess', _292 => _292.text]) || "",
10806
+ secondary_text: _optionalChain([suggestion, 'access', _293 => _293.placePrediction, 'optionalAccess', _294 => _294.structuredFormat, 'optionalAccess', _295 => _295.secondaryText, 'optionalAccess', _296 => _296.text]) || ""
10787
10807
  }
10788
10808
  }));
10789
10809
  setSuggestions(formattedSuggestions);
@@ -10930,8 +10950,8 @@ function FormPlaceAutocomplete({
10930
10950
  className: "hover:bg-muted cursor-pointer px-3 py-2 text-sm",
10931
10951
  onClick: () => handleSuggestionSelect(suggestion),
10932
10952
  children: [
10933
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _295 => _295.structured_formatting, 'optionalAccess', _296 => _296.main_text]) }),
10934
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _297 => _297.structured_formatting, 'optionalAccess', _298 => _298.secondary_text]) })
10953
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _297 => _297.structured_formatting, 'optionalAccess', _298 => _298.main_text]) }),
10954
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _299 => _299.structured_formatting, 'optionalAccess', _300 => _300.secondary_text]) })
10935
10955
  ]
10936
10956
  },
10937
10957
  suggestion.place_id || index
@@ -10979,7 +10999,7 @@ function FormSelect({
10979
10999
  disabled,
10980
11000
  "data-testid": testId,
10981
11001
  children: [
10982
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access', _299 => _299.find, 'call', _300 => _300((v) => v.id === field.value), 'optionalAccess', _301 => _301.text]) : _nullishCoalesce(placeholder, () => ( "")) }) }),
11002
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access', _301 => _301.find, 'call', _302 => _302((v) => v.id === field.value), 'optionalAccess', _303 => _303.text]) : _nullishCoalesce(placeholder, () => ( "")) }) }),
10983
11003
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SelectContent, { children: [
10984
11004
  allowEmpty && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: EMPTY_VALUE, className: "text-muted-foreground", children: _nullishCoalesce(placeholder, () => ( "")) }),
10985
11005
  values.map((type) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: type.id, children: type.text }, type.id))
@@ -11131,7 +11151,7 @@ function UserAvatar({ user, className, showFull, showLink, showTooltip = true })
11131
11151
  }, "getInitials");
11132
11152
  const getAvatar = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
11133
11153
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: `h-6 w-6 ${className}`, children: [
11134
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _302 => _302.avatar]) }),
11154
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _304 => _304.avatar]) }),
11135
11155
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: getInitials3(user.name) })
11136
11156
  ] }) });
11137
11157
  }, "getAvatar");
@@ -11322,7 +11342,7 @@ var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
11322
11342
  })
11323
11343
  };
11324
11344
  const columns = _react.useMemo.call(void 0, () => {
11325
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _303 => _303[field], 'optionalCall', _304 => _304()])).filter((col) => col !== void 0);
11345
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _305 => _305[field], 'optionalCall', _306 => _306()])).filter((col) => col !== void 0);
11326
11346
  }, [params.fields, fieldColumnMap, t, generateUrl]);
11327
11347
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
11328
11348
  }, "useUserTableStructure");
@@ -11436,10 +11456,10 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
11436
11456
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
11437
11457
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: [
11438
11458
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: `mr-2 h-4 w-4`, children: [
11439
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _305 => _305.value, 'optionalAccess', _306 => _306.avatar]) }),
11440
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _307 => _307.value, 'optionalAccess', _308 => _308.name]) ? _optionalChain([field, 'access', _309 => _309.value, 'optionalAccess', _310 => _310.name, 'access', _311 => _311.split, 'call', _312 => _312(" "), 'access', _313 => _313.map, 'call', _314 => _314((name) => name.charAt(0).toUpperCase())]) : "X" })
11459
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _307 => _307.value, 'optionalAccess', _308 => _308.avatar]) }),
11460
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _309 => _309.value, 'optionalAccess', _310 => _310.name]) ? _optionalChain([field, 'access', _311 => _311.value, 'optionalAccess', _312 => _312.name, 'access', _313 => _313.split, 'call', _314 => _314(" "), 'access', _315 => _315.map, 'call', _316 => _316((name) => name.charAt(0).toUpperCase())]) : "X" })
11441
11461
  ] }) }),
11442
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _315 => _315.value, 'optionalAccess', _316 => _316.name]), () => ( "")) })
11462
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _317 => _317.value, 'optionalAccess', _318 => _318.name]), () => ( "")) })
11443
11463
  ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input text-muted-foreground flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: _nullishCoalesce(placeholder, () => ( t(`ui.search.placeholder`, { type: t(`entities.users`, { count: 1 }) }))) }) }) }),
11444
11464
  field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
11445
11465
  _lucidereact.CircleX,
@@ -11618,7 +11638,7 @@ function UserContent({ user }) {
11618
11638
  const updated = await _chunkLBMNRFCYjs.UserService.patchAvatar({ id: user.id, avatar: imageKey });
11619
11639
  setUser(updated);
11620
11640
  },
11621
- companyId: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _317 => _317.id]), () => ( "")),
11641
+ companyId: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _319 => _319.id]), () => ( "")),
11622
11642
  className: "h-24 w-24",
11623
11643
  fallbackClassName: "text-2xl"
11624
11644
  }
@@ -11772,7 +11792,7 @@ function CompanyUsersList({ isDeleted, fullWidth }) {
11772
11792
  const data = useDataListRetriever({
11773
11793
  ready: !!company,
11774
11794
  retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkLBMNRFCYjs.UserService.findAllUsers(params), "retriever"),
11775
- retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _318 => _318.id]), isDeleted },
11795
+ retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _320 => _320.id]), isDeleted },
11776
11796
  module: _chunkLBMNRFCYjs.Modules.User
11777
11797
  });
11778
11798
  _react.useEffect.call(void 0, () => {
@@ -11879,11 +11899,11 @@ function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
11879
11899
  className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
11880
11900
  onClick: (_e) => {
11881
11901
  setSelectedUser(user);
11882
- _optionalChain([setLevelOpen, 'optionalCall', _319 => _319(true)]);
11902
+ _optionalChain([setLevelOpen, 'optionalCall', _321 => _321(true)]);
11883
11903
  },
11884
11904
  onSelect: (_e) => {
11885
11905
  setSelectedUser(user);
11886
- _optionalChain([setLevelOpen, 'optionalCall', _320 => _320(true)]);
11906
+ _optionalChain([setLevelOpen, 'optionalCall', _322 => _322(true)]);
11887
11907
  },
11888
11908
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between px-4 py-1", children: [
11889
11909
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user }),
@@ -12014,7 +12034,7 @@ function CompanyContent({ company, actions }) {
12014
12034
  company.legal_address
12015
12035
  ] }),
12016
12036
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
12017
- _optionalChain([company, 'access', _321 => _321.configurations, 'optionalAccess', _322 => _322.country]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
12037
+ _optionalChain([company, 'access', _323 => _323.configurations, 'optionalAccess', _324 => _324.country]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
12018
12038
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
12019
12039
  t("features.configuration.country"),
12020
12040
  ":"
@@ -12022,7 +12042,7 @@ function CompanyContent({ company, actions }) {
12022
12042
  " ",
12023
12043
  company.configurations.country
12024
12044
  ] }),
12025
- _optionalChain([company, 'access', _323 => _323.configurations, 'optionalAccess', _324 => _324.currency]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
12045
+ _optionalChain([company, 'access', _325 => _325.configurations, 'optionalAccess', _326 => _326.currency]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
12026
12046
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
12027
12047
  t("features.configuration.currency"),
12028
12048
  ":"
@@ -12432,7 +12452,7 @@ function CompanyEditorInternal({
12432
12452
  const t = _nextintl.useTranslations.call(void 0, );
12433
12453
  const fiscalRef = _react.useRef.call(void 0, null);
12434
12454
  const addressComponentsRef = _react.useRef.call(void 0, {});
12435
- const canAccessFeatures = hasRole(_chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access', _325 => _325.env, 'access', _326 => _326.NEXT_PUBLIC_PRIVATE_INSTALLATION, 'optionalAccess', _327 => _327.toLowerCase, 'call', _328 => _328()]) === "true";
12455
+ const canAccessFeatures = hasRole(_chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access', _327 => _327.env, 'access', _328 => _328.NEXT_PUBLIC_PRIVATE_INSTALLATION, 'optionalAccess', _329 => _329.toLowerCase, 'call', _330 => _330()]) === "true";
12436
12456
  const handleDialogOpenChange = _react.useCallback.call(void 0,
12437
12457
  (open) => {
12438
12458
  if (open && features.length === 0 && canAccessFeatures) {
@@ -12447,7 +12467,7 @@ function CompanyEditorInternal({
12447
12467
  _chunk7QVYU63Ejs.__name.call(void 0, fetchFeatures, "fetchFeatures");
12448
12468
  fetchFeatures();
12449
12469
  }
12450
- _optionalChain([onDialogOpenChange, 'optionalCall', _329 => _329(open)]);
12470
+ _optionalChain([onDialogOpenChange, 'optionalCall', _331 => _331(open)]);
12451
12471
  },
12452
12472
  [features.length, canAccessFeatures, hasRole, onDialogOpenChange]
12453
12473
  );
@@ -12492,12 +12512,12 @@ function CompanyEditorInternal({
12492
12512
  );
12493
12513
  const getDefaultValues = _react.useCallback.call(void 0, () => {
12494
12514
  return {
12495
- id: _optionalChain([company, 'optionalAccess', _330 => _330.id]) || _uuid.v4.call(void 0, ),
12496
- name: _optionalChain([company, 'optionalAccess', _331 => _331.name]) || "",
12497
- featureIds: _optionalChain([company, 'optionalAccess', _332 => _332.features, 'access', _333 => _333.map, 'call', _334 => _334((feature) => feature.id)]) || [],
12498
- moduleIds: _optionalChain([company, 'optionalAccess', _335 => _335.modules, 'access', _336 => _336.map, 'call', _337 => _337((module) => module.id)]) || [],
12499
- logo: _optionalChain([company, 'optionalAccess', _338 => _338.logo]) || "",
12500
- legal_address: _optionalChain([company, 'optionalAccess', _339 => _339.legal_address]) || ""
12515
+ id: _optionalChain([company, 'optionalAccess', _332 => _332.id]) || _uuid.v4.call(void 0, ),
12516
+ name: _optionalChain([company, 'optionalAccess', _333 => _333.name]) || "",
12517
+ featureIds: _optionalChain([company, 'optionalAccess', _334 => _334.features, 'access', _335 => _335.map, 'call', _336 => _336((feature) => feature.id)]) || [],
12518
+ moduleIds: _optionalChain([company, 'optionalAccess', _337 => _337.modules, 'access', _338 => _338.map, 'call', _339 => _339((module) => module.id)]) || [],
12519
+ logo: _optionalChain([company, 'optionalAccess', _340 => _340.logo]) || "",
12520
+ legal_address: _optionalChain([company, 'optionalAccess', _341 => _341.legal_address]) || ""
12501
12521
  };
12502
12522
  }, [company]);
12503
12523
  const form = _reacthookform.useForm.call(void 0, {
@@ -12509,7 +12529,7 @@ function CompanyEditorInternal({
12509
12529
  {
12510
12530
  form,
12511
12531
  entityType: t(`entities.companies`, { count: 1 }),
12512
- entityName: _optionalChain([company, 'optionalAccess', _340 => _340.name]),
12532
+ entityName: _optionalChain([company, 'optionalAccess', _342 => _342.name]),
12513
12533
  isEdit: !!company,
12514
12534
  module: _chunkLBMNRFCYjs.Modules.Company,
12515
12535
  propagateChanges,
@@ -12534,7 +12554,7 @@ function CompanyEditorInternal({
12534
12554
  throw new Error("Fiscal data validation failed");
12535
12555
  }
12536
12556
  const payload = {
12537
- id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _341 => _341.id]), () => ( _uuid.v4.call(void 0, ))),
12557
+ id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _343 => _343.id]), () => ( _uuid.v4.call(void 0, ))),
12538
12558
  name: values.name,
12539
12559
  logo: files && contentType ? values.logo : void 0,
12540
12560
  featureIds: values.featureIds,
@@ -12565,10 +12585,10 @@ function CompanyEditorInternal({
12565
12585
  dialogOpen,
12566
12586
  onDialogOpenChange: handleDialogOpenChange,
12567
12587
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-start justify-between gap-x-4", children: [
12568
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-96 flex-col justify-start gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileUploader, { value: files, onValueChange: setFiles, dropzoneOptions: dropzone2, className: "w-full p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "text-muted-foreground/50 outline-dashed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: file || _optionalChain([company, 'optionalAccess', _342 => _342.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12588
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-96 flex-col justify-start gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileUploader, { value: files, onValueChange: setFiles, dropzoneOptions: dropzone2, className: "w-full p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FileInput, { className: "text-muted-foreground/50 outline-dashed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col items-center justify-center pt-3 pb-4", children: file || _optionalChain([company, 'optionalAccess', _344 => _344.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12569
12589
  _image2.default,
12570
12590
  {
12571
- src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _343 => _343.logo]) || "",
12591
+ src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _345 => _345.logo]) || "",
12572
12592
  alt: "Company Logo",
12573
12593
  width: 200,
12574
12594
  height: 200
@@ -12602,7 +12622,7 @@ function CompanyEditorInternal({
12602
12622
  }
12603
12623
  ),
12604
12624
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SectionHeader, { className: "mt-2", children: t(`company.sections.fiscal_data`) }),
12605
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess', _344 => _344.fiscal_data])) })
12625
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess', _346 => _346.fiscal_data])) })
12606
12626
  ] }),
12607
12627
  canAccessFeatures && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-96 flex-col justify-start gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScrollArea, { className: "h-max", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFeatures, { form, name: t(`company.features_and_modules`), features }) }) })
12608
12628
  ] })
@@ -12719,7 +12739,7 @@ function NotificationToast(notification, t, generateUrl, reouter) {
12719
12739
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
12720
12740
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
12721
12741
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
12722
- actor: _nullishCoalesce(_optionalChain([data, 'access', _345 => _345.actor, 'optionalAccess', _346 => _346.name]), () => ( "")),
12742
+ actor: _nullishCoalesce(_optionalChain([data, 'access', _347 => _347.actor, 'optionalAccess', _348 => _348.name]), () => ( "")),
12723
12743
  title: data.title,
12724
12744
  message: _nullishCoalesce(notification.message, () => ( ""))
12725
12745
  }) }),
@@ -12748,7 +12768,7 @@ function NotificationMenuItem({ notification, closePopover }) {
12748
12768
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
12749
12769
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
12750
12770
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
12751
- actor: _nullishCoalesce(_optionalChain([data, 'access', _347 => _347.actor, 'optionalAccess', _348 => _348.name]), () => ( "")),
12771
+ actor: _nullishCoalesce(_optionalChain([data, 'access', _349 => _349.actor, 'optionalAccess', _350 => _350.name]), () => ( "")),
12752
12772
  title: data.title,
12753
12773
  message: _nullishCoalesce(notification.message, () => ( ""))
12754
12774
  }) }),
@@ -12812,7 +12832,7 @@ var NotificationContextProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(v
12812
12832
  _react.useEffect.call(void 0, () => {
12813
12833
  if (hasInitiallyLoaded || !currentUser) return;
12814
12834
  if (_chunkXTLTQQ7Xjs.isRolesConfigured.call(void 0, )) {
12815
- const isAdmin = _optionalChain([currentUser, 'access', _349 => _349.roles, 'optionalAccess', _350 => _350.some, 'call', _351 => _351((role) => role.id === _chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator)]);
12835
+ const isAdmin = _optionalChain([currentUser, 'access', _351 => _351.roles, 'optionalAccess', _352 => _352.some, 'call', _353 => _353((role) => role.id === _chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator)]);
12816
12836
  if (isAdmin) {
12817
12837
  setHasInitiallyLoaded(true);
12818
12838
  return;
@@ -13014,7 +13034,7 @@ function OnboardingProvider({
13014
13034
  let tourSteps = steps;
13015
13035
  if (!tourSteps) {
13016
13036
  const tour2 = tours.find((t) => t.id === tourId);
13017
- tourSteps = _optionalChain([tour2, 'optionalAccess', _352 => _352.steps]);
13037
+ tourSteps = _optionalChain([tour2, 'optionalAccess', _354 => _354.steps]);
13018
13038
  }
13019
13039
  if (!tourSteps || tourSteps.length === 0) {
13020
13040
  console.warn(`No steps found for tour: ${tourId}`);
@@ -13082,10 +13102,10 @@ function OnboardingProvider({
13082
13102
  when: {
13083
13103
  show: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
13084
13104
  setCurrentStepIndex(index);
13085
- _optionalChain([stepConfig, 'access', _353 => _353.onShow, 'optionalCall', _354 => _354()]);
13105
+ _optionalChain([stepConfig, 'access', _355 => _355.onShow, 'optionalCall', _356 => _356()]);
13086
13106
  }, "show"),
13087
13107
  hide: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
13088
- _optionalChain([stepConfig, 'access', _355 => _355.onHide, 'optionalCall', _356 => _356()]);
13108
+ _optionalChain([stepConfig, 'access', _357 => _357.onHide, 'optionalCall', _358 => _358()]);
13089
13109
  }, "hide")
13090
13110
  }
13091
13111
  });
@@ -13251,7 +13271,7 @@ function HowToMultiSelector({
13251
13271
  retriever: (params) => _chunkLBMNRFCYjs.HowToService.findMany(params),
13252
13272
  module: _chunkLBMNRFCYjs.Modules.HowTo,
13253
13273
  getLabel: (howTo) => howTo.name,
13254
- excludeId: _optionalChain([currentHowTo, 'optionalAccess', _357 => _357.id]),
13274
+ excludeId: _optionalChain([currentHowTo, 'optionalAccess', _359 => _359.id]),
13255
13275
  onChange
13256
13276
  }
13257
13277
  );
@@ -13359,17 +13379,17 @@ function HowToEditorInternal({
13359
13379
  );
13360
13380
  const getDefaultValues = _react.useCallback.call(void 0,
13361
13381
  () => ({
13362
- id: _optionalChain([howTo, 'optionalAccess', _358 => _358.id]) || _uuid.v4.call(void 0, ),
13363
- name: _optionalChain([howTo, 'optionalAccess', _359 => _359.name]) || "",
13364
- description: _optionalChain([howTo, 'optionalAccess', _360 => _360.description]) || [],
13365
- pages: _chunkLBMNRFCYjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess', _361 => _361.pages])),
13366
- howToType: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _362 => _362.howToType]), () => ( "how-to")),
13367
- slug: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _363 => _363.slug]), () => ( "")),
13368
- order: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _364 => _364.order]), () => ( 0)),
13369
- summary: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _365 => _365.summary]), () => ( "")),
13370
- tags: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _366 => _366.tags]), () => ( []))).join(", "),
13371
- contextualKeys: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _367 => _367.contextualKeys]), () => ( []))).join(", "),
13372
- draft: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _368 => _368.draft]), () => ( false)),
13382
+ id: _optionalChain([howTo, 'optionalAccess', _360 => _360.id]) || _uuid.v4.call(void 0, ),
13383
+ name: _optionalChain([howTo, 'optionalAccess', _361 => _361.name]) || "",
13384
+ description: _optionalChain([howTo, 'optionalAccess', _362 => _362.description]) || [],
13385
+ pages: _chunkLBMNRFCYjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess', _363 => _363.pages])),
13386
+ howToType: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _364 => _364.howToType]), () => ( "how-to")),
13387
+ slug: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _365 => _365.slug]), () => ( "")),
13388
+ order: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _366 => _366.order]), () => ( 0)),
13389
+ summary: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _367 => _367.summary]), () => ( "")),
13390
+ tags: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _368 => _368.tags]), () => ( []))).join(", "),
13391
+ contextualKeys: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _369 => _369.contextualKeys]), () => ( []))).join(", "),
13392
+ draft: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _370 => _370.draft]), () => ( false)),
13373
13393
  relatedArticles: []
13374
13394
  }),
13375
13395
  [howTo]
@@ -13380,7 +13400,7 @@ function HowToEditorInternal({
13380
13400
  });
13381
13401
  const initialRelatedIds = _react.useRef.call(void 0, []);
13382
13402
  _react.useEffect.call(void 0, () => {
13383
- if (!_optionalChain([howTo, 'optionalAccess', _369 => _369.howToType]) || !_optionalChain([howTo, 'optionalAccess', _370 => _370.slug])) return;
13403
+ if (!_optionalChain([howTo, 'optionalAccess', _371 => _371.howToType]) || !_optionalChain([howTo, 'optionalAccess', _372 => _372.slug])) return;
13384
13404
  let active = true;
13385
13405
  _chunkLBMNRFCYjs.HowToService.findRelated({ howToType: howTo.howToType, slug: howTo.slug }).then((list) => {
13386
13406
  if (!active) return;
@@ -13419,7 +13439,7 @@ function HowToEditorInternal({
13419
13439
  {
13420
13440
  form,
13421
13441
  entityType: t(`entities.howtos`, { count: 1 }),
13422
- entityName: _optionalChain([howTo, 'optionalAccess', _371 => _371.name]),
13442
+ entityName: _optionalChain([howTo, 'optionalAccess', _373 => _373.name]),
13423
13443
  isEdit: !!howTo,
13424
13444
  module: _chunkLBMNRFCYjs.Modules.HowTo,
13425
13445
  propagateChanges,
@@ -13800,7 +13820,7 @@ function withPatchedTitle(source, title) {
13800
13820
  return _chunkLBMNRFCYjs.rehydrate.call(void 0, _chunkLBMNRFCYjs.Modules.Assistant, {
13801
13821
  jsonApi: {
13802
13822
  ...dehydrated.jsonApi,
13803
- attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _372 => _372.jsonApi, 'optionalAccess', _373 => _373.attributes]), () => ( {})), title }
13823
+ attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _374 => _374.jsonApi, 'optionalAccess', _375 => _375.attributes]), () => ( {})), title }
13804
13824
  },
13805
13825
  included: dehydrated.included
13806
13826
  });
@@ -13821,7 +13841,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
13821
13841
  const [status, setStatus] = _react.useState.call(void 0, void 0);
13822
13842
  const [failedMessageIds, setFailedMessageIds] = _react.useState.call(void 0, () => /* @__PURE__ */ new Set());
13823
13843
  const [operatorMode, setOperatorMode] = _react.useState.call(void 0,
13824
- () => _optionalChain([dehydratedAssistant, 'optionalAccess', _374 => _374.jsonApi, 'optionalAccess', _375 => _375.attributes, 'optionalAccess', _376 => _376.engine]) === "operator"
13844
+ () => _optionalChain([dehydratedAssistant, 'optionalAccess', _376 => _376.jsonApi, 'optionalAccess', _377 => _377.attributes, 'optionalAccess', _378 => _378.engine]) === "operator"
13825
13845
  );
13826
13846
  const { socket } = useSocketContext();
13827
13847
  const sendMessage = _react.useCallback.call(void 0,
@@ -13830,7 +13850,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
13830
13850
  if (!trimmed) return;
13831
13851
  const optimistic = _chunkLBMNRFCYjs.AssistantMessage.buildOptimistic({
13832
13852
  content: trimmed,
13833
- assistantId: _optionalChain([assistant, 'optionalAccess', _377 => _377.id]),
13853
+ assistantId: _optionalChain([assistant, 'optionalAccess', _379 => _379.id]),
13834
13854
  position: nextPosition(messages)
13835
13855
  });
13836
13856
  setMessages((prev) => [...prev, optimistic]);
@@ -13840,13 +13860,13 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
13840
13860
  if (assistant && payload.assistantId && payload.assistantId !== assistant.id) return;
13841
13861
  if (typeof payload.status === "string") setStatus(payload.status);
13842
13862
  }, "handler");
13843
- _optionalChain([socket, 'optionalAccess', _378 => _378.on, 'call', _379 => _379("assistant:status", handler)]);
13863
+ _optionalChain([socket, 'optionalAccess', _380 => _380.on, 'call', _381 => _381("assistant:status", handler)]);
13844
13864
  try {
13845
13865
  if (!assistant) {
13846
13866
  const input = {
13847
13867
  firstMessage: trimmed,
13848
- howToMode: _optionalChain([opts, 'optionalAccess', _380 => _380.howToMode]),
13849
- limitToHowToId: _optionalChain([opts, 'optionalAccess', _381 => _381.limitToHowToId])
13868
+ howToMode: _optionalChain([opts, 'optionalAccess', _382 => _382.howToMode]),
13869
+ limitToHowToId: _optionalChain([opts, 'optionalAccess', _383 => _383.limitToHowToId])
13850
13870
  };
13851
13871
  const created = operatorMode ? await _chunkLBMNRFCYjs.AssistantService.createOperator(input) : await _chunkLBMNRFCYjs.AssistantService.create(input);
13852
13872
  const msgs = await _chunkLBMNRFCYjs.AssistantMessageService.findByAssistant({ assistantId: created.id });
@@ -13863,8 +13883,8 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
13863
13883
  }) : await _chunkLBMNRFCYjs.AssistantService.appendMessage({
13864
13884
  assistantId: assistant.id,
13865
13885
  content: trimmed,
13866
- howToMode: _optionalChain([opts, 'optionalAccess', _382 => _382.howToMode]),
13867
- limitToHowToId: _optionalChain([opts, 'optionalAccess', _383 => _383.limitToHowToId])
13886
+ howToMode: _optionalChain([opts, 'optionalAccess', _384 => _384.howToMode]),
13887
+ limitToHowToId: _optionalChain([opts, 'optionalAccess', _385 => _385.limitToHowToId])
13868
13888
  });
13869
13889
  setMessages((prev) => [...stripOptimistic(prev), ...result]);
13870
13890
  }
@@ -13875,7 +13895,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
13875
13895
  return next;
13876
13896
  });
13877
13897
  } finally {
13878
- _optionalChain([socket, 'optionalAccess', _384 => _384.off, 'call', _385 => _385("assistant:status", handler)]);
13898
+ _optionalChain([socket, 'optionalAccess', _386 => _386.off, 'call', _387 => _387("assistant:status", handler)]);
13879
13899
  setSending(false);
13880
13900
  setStatus(void 0);
13881
13901
  }
@@ -13933,7 +13953,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
13933
13953
  await _chunkLBMNRFCYjs.AssistantService.delete({ id });
13934
13954
  setThreads((prev) => prev.filter((t2) => t2.id !== id));
13935
13955
  setAssistant((prev) => {
13936
- if (_optionalChain([prev, 'optionalAccess', _386 => _386.id]) === id) {
13956
+ if (_optionalChain([prev, 'optionalAccess', _388 => _388.id]) === id) {
13937
13957
  setMessages([]);
13938
13958
  return void 0;
13939
13959
  }
@@ -14087,7 +14107,7 @@ function usePageTracker() {
14087
14107
  if (typeof document !== "undefined") {
14088
14108
  const titleParts = document.title.split("]");
14089
14109
  if (titleParts[1]) {
14090
- const cleanTitle = _optionalChain([titleParts, 'access', _387 => _387[1], 'access', _388 => _388.split, 'call', _389 => _389("|"), 'access', _390 => _390[0], 'optionalAccess', _391 => _391.trim, 'call', _392 => _392()]);
14110
+ const cleanTitle = _optionalChain([titleParts, 'access', _389 => _389[1], 'access', _390 => _390.split, 'call', _391 => _391("|"), 'access', _392 => _392[0], 'optionalAccess', _393 => _393.trim, 'call', _394 => _394()]);
14091
14111
  pageTitle = cleanTitle || foundModule.name;
14092
14112
  }
14093
14113
  }
@@ -14124,7 +14144,7 @@ function usePushNotifications() {
14124
14144
  const register = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
14125
14145
  if ("serviceWorker" in navigator && "PushManager" in window) {
14126
14146
  try {
14127
- const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess', _393 => _393.id])}`;
14147
+ const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess', _395 => _395.id])}`;
14128
14148
  const lastRegisteredSubscription = sessionStorage.getItem(sessionKey);
14129
14149
  const registration = await navigator.serviceWorker.register(`${_chunkXTLTQQ7Xjs.getAppUrl.call(void 0, )}/sw.js`);
14130
14150
  let permission = Notification.permission;
@@ -14181,7 +14201,7 @@ function useSocket({ token }) {
14181
14201
  const socketRef = _react.useRef.call(void 0, null);
14182
14202
  _react.useEffect.call(void 0, () => {
14183
14203
  if (!token) return;
14184
- const globalSocketKey = `__socket_${_optionalChain([process, 'access', _394 => _394.env, 'access', _395 => _395.NEXT_PUBLIC_API_URL, 'optionalAccess', _396 => _396.replace, 'call', _397 => _397(/[^a-zA-Z0-9]/g, "_")])}`;
14204
+ const globalSocketKey = `__socket_${_optionalChain([process, 'access', _396 => _396.env, 'access', _397 => _397.NEXT_PUBLIC_API_URL, 'optionalAccess', _398 => _398.replace, 'call', _399 => _399(/[^a-zA-Z0-9]/g, "_")])}`;
14185
14205
  if (typeof window !== "undefined") {
14186
14206
  const _allSocketKeys = Object.keys(window).filter((key) => key.startsWith("__socket_"));
14187
14207
  const existingSocket = window[globalSocketKey];
@@ -14237,14 +14257,14 @@ function useSocket({ token }) {
14237
14257
  });
14238
14258
  }, "handleMessage");
14239
14259
  const handleNotification = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
14240
- const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _398 => _398.data]), () => ( _optionalChain([data, 'optionalAccess', _399 => _399.jsonApi])));
14241
- if (!_optionalChain([resource, 'optionalAccess', _400 => _400.type])) {
14260
+ const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _400 => _400.data]), () => ( _optionalChain([data, 'optionalAccess', _401 => _401.jsonApi])));
14261
+ if (!_optionalChain([resource, 'optionalAccess', _402 => _402.type])) {
14242
14262
  console.warn("[useSocket] ignoring notification with unexpected payload shape", data);
14243
14263
  return;
14244
14264
  }
14245
14265
  const notification = _chunkLBMNRFCYjs.rehydrate.call(void 0, _chunkLBMNRFCYjs.Modules.Notification, {
14246
14266
  jsonApi: resource,
14247
- included: _optionalChain([data, 'optionalAccess', _401 => _401.included]) || []
14267
+ included: _optionalChain([data, 'optionalAccess', _403 => _403.included]) || []
14248
14268
  });
14249
14269
  if (notification) {
14250
14270
  setSocketNotifications((prev) => {
@@ -14363,7 +14383,7 @@ function BreadcrumbMobile({
14363
14383
  }
14364
14384
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenu, { open, onOpenChange: setOpen, children: [
14365
14385
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenuTrigger, { className: "text-foreground text-xs/relaxed font-normal hover:bg-accent flex items-center gap-1 rounded-md px-1.5 py-0.5 transition-colors outline-none", children: [
14366
- _optionalChain([lastItem, 'optionalAccess', _402 => _402.name]),
14386
+ _optionalChain([lastItem, 'optionalAccess', _404 => _404.name]),
14367
14387
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "text-muted-foreground size-3.5" })
14368
14388
  ] }),
14369
14389
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuContent, { align: "start", children: allItems.map((item, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuItem, { children: item.href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: item.name }) }, index)) })
@@ -14693,7 +14713,7 @@ var railTriggerClass = _chunkLBMNRFCYjs.cn.call(void 0,
14693
14713
  "data-[state=active]:bg-foreground data-[state=active]:text-background",
14694
14714
  "data-[state=active]:font-semibold data-[state=active]:shadow-none"
14695
14715
  );
14696
- var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access', _403 => _403.key, 'optionalAccess', _404 => _404.name]))), () => ( tab.label)), "tabValue");
14716
+ var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access', _405 => _405.key, 'optionalAccess', _406 => _406.name]))), () => ( tab.label)), "tabValue");
14697
14717
  function RoundPageContainer({
14698
14718
  module,
14699
14719
  id,
@@ -14713,7 +14733,7 @@ function RoundPageContainer({
14713
14733
  const [mounted, setMounted] = _react.useState.call(void 0, false);
14714
14734
  _react.useEffect.call(void 0, () => {
14715
14735
  const match = document.cookie.split("; ").find((row) => row.startsWith(`${DETAILS_COOKIE_NAME}=`));
14716
- if (_optionalChain([match, 'optionalAccess', _405 => _405.split, 'call', _406 => _406("="), 'access', _407 => _407[1]]) === "true") setShowDetailsState(true);
14736
+ if (_optionalChain([match, 'optionalAccess', _407 => _407.split, 'call', _408 => _408("="), 'access', _409 => _409[1]]) === "true") setShowDetailsState(true);
14717
14737
  }, []);
14718
14738
  _react.useEffect.call(void 0, () => {
14719
14739
  setMounted(true);
@@ -14743,11 +14763,11 @@ function RoundPageContainer({
14743
14763
  } else {
14744
14764
  rewriteUrl({ page: window.location.pathname, additionalParameters: { section: key } });
14745
14765
  }
14746
- _optionalChain([onSectionChange, 'optionalCall', _408 => _408(key)]);
14766
+ _optionalChain([onSectionChange, 'optionalCall', _410 => _410(key)]);
14747
14767
  },
14748
14768
  [module, id, rewriteUrl, onSectionChange]
14749
14769
  );
14750
- const activeFillHeight = _optionalChain([tabs, 'optionalAccess', _409 => _409.find, 'call', _410 => _410((t) => tabValue(t) === activeTab), 'optionalAccess', _411 => _411.fillHeight]) === true;
14770
+ const activeFillHeight = _optionalChain([tabs, 'optionalAccess', _411 => _411.find, 'call', _412 => _412((t) => tabValue(t) === activeTab), 'optionalAccess', _413 => _413.fillHeight]) === true;
14751
14771
  const { ungrouped, groups } = _react.useMemo.call(void 0, () => partitionTabs(_nullishCoalesce(tabs, () => ( []))), [tabs]);
14752
14772
  const isReady = mounted && isMobile !== void 0;
14753
14773
  if (!isReady) {
@@ -15037,14 +15057,14 @@ function BlockNoteEditorMentionHoverCard({
15037
15057
  const entityType = target.dataset.mentionType;
15038
15058
  const alias = target.dataset.mentionAlias;
15039
15059
  setHovered((prev) => {
15040
- if (_optionalChain([prev, 'optionalAccess', _412 => _412.id]) === id && _optionalChain([prev, 'optionalAccess', _413 => _413.element]) === target) return prev;
15060
+ if (_optionalChain([prev, 'optionalAccess', _414 => _414.id]) === id && _optionalChain([prev, 'optionalAccess', _415 => _415.element]) === target) return prev;
15041
15061
  return { id, entityType, alias, element: target };
15042
15062
  });
15043
15063
  }, "handleMouseOver");
15044
15064
  const handleMouseOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
15045
15065
  const target = e.target.closest("[data-mention-id]");
15046
15066
  if (!target) return;
15047
- const related = _optionalChain([e, 'access', _414 => _414.relatedTarget, 'optionalAccess', _415 => _415.closest, 'call', _416 => _416("[data-mention-id]")]);
15067
+ const related = _optionalChain([e, 'access', _416 => _416.relatedTarget, 'optionalAccess', _417 => _417.closest, 'call', _418 => _418("[data-mention-id]")]);
15048
15068
  if (related) return;
15049
15069
  scheduleClose();
15050
15070
  }, "handleMouseOut");
@@ -15058,7 +15078,7 @@ function BlockNoteEditorMentionHoverCard({
15058
15078
  }, [containerRef, mentionResolveFn, cancelClose, scheduleClose]);
15059
15079
  if (!hovered || !mentionResolveFn) return null;
15060
15080
  const resolved = mentionResolveFn(hovered.id, hovered.entityType, hovered.alias);
15061
- if (!_optionalChain([resolved, 'optionalAccess', _417 => _417.HoverContent])) return null;
15081
+ if (!_optionalChain([resolved, 'optionalAccess', _419 => _419.HoverContent])) return null;
15062
15082
  const ContentComponent = resolved.HoverContent;
15063
15083
  const rect = hovered.element.getBoundingClientRect();
15064
15084
  return _reactdom.createPortal.call(void 0,
@@ -15101,28 +15121,28 @@ var parseMentionElement = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
15101
15121
  }, "parseMentionElement");
15102
15122
  var createMentionInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (resolveFn, disableMention, nameResolver) => {
15103
15123
  const MentionExternalHTML = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
15104
- const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _418 => _418(props.id, props.entityType, props.alias)]), () => ( props.alias));
15124
+ const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _420 => _420(props.id, props.entityType, props.alias)]), () => ( props.alias));
15105
15125
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { "data-mention-id": props.id, "data-mention-type": props.entityType, "data-mention-alias": props.alias, children: [
15106
15126
  "@",
15107
15127
  displayName
15108
15128
  ] });
15109
15129
  }, "MentionExternalHTML");
15110
15130
  const Mention = React.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function Mention2(props) {
15111
- const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _419 => _419(props.id, props.entityType, props.alias)]), () => ( props.alias));
15131
+ const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _421 => _421(props.id, props.entityType, props.alias)]), () => ( props.alias));
15112
15132
  if (disableMention) {
15113
- const resolved2 = _optionalChain([resolveFn, 'optionalCall', _420 => _420(props.id, props.entityType, displayName)]);
15114
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _421 => _421.url]), () => ( "#")), className: "text-primary", children: [
15133
+ const resolved2 = _optionalChain([resolveFn, 'optionalCall', _422 => _422(props.id, props.entityType, displayName)]);
15134
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _423 => _423.url]), () => ( "#")), className: "text-primary", children: [
15115
15135
  "@",
15116
15136
  displayName
15117
15137
  ] });
15118
15138
  }
15119
- const resolved = _optionalChain([resolveFn, 'optionalCall', _422 => _422(props.id, props.entityType, displayName)]);
15120
- if (_optionalChain([resolved, 'optionalAccess', _423 => _423.Inline])) {
15139
+ const resolved = _optionalChain([resolveFn, 'optionalCall', _424 => _424(props.id, props.entityType, displayName)]);
15140
+ if (_optionalChain([resolved, 'optionalAccess', _425 => _425.Inline])) {
15121
15141
  const Custom = resolved.Inline;
15122
15142
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Custom, { ...props, alias: displayName });
15123
15143
  }
15124
- const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _424 => _424.url]), () => ( "#"));
15125
- const handleClick = _optionalChain([resolved, 'optionalAccess', _425 => _425.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
15144
+ const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _426 => _426.url]), () => ( "#"));
15145
+ const handleClick = _optionalChain([resolved, 'optionalAccess', _427 => _427.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
15126
15146
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
15127
15147
  _link2.default,
15128
15148
  {
@@ -15228,7 +15248,7 @@ function BlockNoteEditorMentionSuggestionMenu({
15228
15248
  if (!suggestionMenuComponent) return void 0;
15229
15249
  const Component2 = suggestionMenuComponent;
15230
15250
  const Wrapped = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
15231
- const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _426 => _426.items, 'access', _427 => _427[0], 'optionalAccess', _428 => _428.title]) === KEEP_OPEN_SENTINEL_TITLE;
15251
+ const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _428 => _428.items, 'access', _429 => _429[0], 'optionalAccess', _430 => _430.title]) === KEEP_OPEN_SENTINEL_TITLE;
15232
15252
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15233
15253
  Component2,
15234
15254
  {
@@ -15237,7 +15257,7 @@ function BlockNoteEditorMentionSuggestionMenu({
15237
15257
  selectedIndex: isSentinelOnly ? void 0 : props.selectedIndex,
15238
15258
  onItemClick: (item) => {
15239
15259
  if (item.title === KEEP_OPEN_SENTINEL_TITLE) return;
15240
- _optionalChain([props, 'access', _429 => _429.onItemClick, 'optionalCall', _430 => _430(item)]);
15260
+ _optionalChain([props, 'access', _431 => _431.onItemClick, 'optionalCall', _432 => _432(item)]);
15241
15261
  }
15242
15262
  }
15243
15263
  );
@@ -15431,10 +15451,10 @@ var cellId = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
15431
15451
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => params.toggleId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15432
15452
  Checkbox,
15433
15453
  {
15434
- checked: _optionalChain([params, 'access', _431 => _431.checkedIds, 'optionalAccess', _432 => _432.includes, 'call', _433 => _433(row.getValue(params.name))]) || false,
15454
+ checked: _optionalChain([params, 'access', _433 => _433.checkedIds, 'optionalAccess', _434 => _434.includes, 'call', _435 => _435(row.getValue(params.name))]) || false,
15435
15455
  onCheckedChange: (value) => {
15436
15456
  row.toggleSelected(!!value);
15437
- _optionalChain([params, 'access', _434 => _434.toggleId, 'optionalCall', _435 => _435(row.getValue(params.name))]);
15457
+ _optionalChain([params, 'access', _436 => _436.toggleId, 'optionalCall', _437 => _437(row.getValue(params.name))]);
15438
15458
  },
15439
15459
  "aria-label": "Select row"
15440
15460
  }
@@ -15493,7 +15513,7 @@ function useJsonApiGet(params) {
15493
15513
  const [response, setResponse] = _react.useState.call(void 0, null);
15494
15514
  const isMounted = _react.useRef.call(void 0, true);
15495
15515
  const fetchData = _react.useCallback.call(void 0, async () => {
15496
- if (_optionalChain([params, 'access', _436 => _436.options, 'optionalAccess', _437 => _437.enabled]) === false) return;
15516
+ if (_optionalChain([params, 'access', _438 => _438.options, 'optionalAccess', _439 => _439.enabled]) === false) return;
15497
15517
  setLoading(true);
15498
15518
  setError(null);
15499
15519
  try {
@@ -15520,9 +15540,9 @@ function useJsonApiGet(params) {
15520
15540
  setLoading(false);
15521
15541
  }
15522
15542
  }
15523
- }, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _438 => _438.options, 'optionalAccess', _439 => _439.enabled])]);
15543
+ }, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _440 => _440.options, 'optionalAccess', _441 => _441.enabled])]);
15524
15544
  const fetchNextPage = _react.useCallback.call(void 0, async () => {
15525
- if (!_optionalChain([response, 'optionalAccess', _440 => _440.nextPage])) return;
15545
+ if (!_optionalChain([response, 'optionalAccess', _442 => _442.nextPage])) return;
15526
15546
  setLoading(true);
15527
15547
  try {
15528
15548
  const nextResponse = await response.nextPage();
@@ -15543,7 +15563,7 @@ function useJsonApiGet(params) {
15543
15563
  }
15544
15564
  }, [response]);
15545
15565
  const fetchPreviousPage = _react.useCallback.call(void 0, async () => {
15546
- if (!_optionalChain([response, 'optionalAccess', _441 => _441.prevPage])) return;
15566
+ if (!_optionalChain([response, 'optionalAccess', _443 => _443.prevPage])) return;
15547
15567
  setLoading(true);
15548
15568
  try {
15549
15569
  const prevResponse = await response.prevPage();
@@ -15569,15 +15589,15 @@ function useJsonApiGet(params) {
15569
15589
  return () => {
15570
15590
  isMounted.current = false;
15571
15591
  };
15572
- }, [fetchData, ..._optionalChain([params, 'access', _442 => _442.options, 'optionalAccess', _443 => _443.deps]) || []]);
15592
+ }, [fetchData, ..._optionalChain([params, 'access', _444 => _444.options, 'optionalAccess', _445 => _445.deps]) || []]);
15573
15593
  return {
15574
15594
  data,
15575
15595
  loading,
15576
15596
  error,
15577
15597
  response,
15578
15598
  refetch: fetchData,
15579
- hasNextPage: !!_optionalChain([response, 'optionalAccess', _444 => _444.next]),
15580
- hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _445 => _445.prev]),
15599
+ hasNextPage: !!_optionalChain([response, 'optionalAccess', _446 => _446.next]),
15600
+ hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _447 => _447.prev]),
15581
15601
  fetchNextPage,
15582
15602
  fetchPreviousPage
15583
15603
  };
@@ -15655,17 +15675,17 @@ function useJsonApiMutation(config) {
15655
15675
  if (apiResponse.ok) {
15656
15676
  const resultData = apiResponse.data;
15657
15677
  setData(resultData);
15658
- _optionalChain([config, 'access', _446 => _446.onSuccess, 'optionalCall', _447 => _447(resultData)]);
15678
+ _optionalChain([config, 'access', _448 => _448.onSuccess, 'optionalCall', _449 => _449(resultData)]);
15659
15679
  return resultData;
15660
15680
  } else {
15661
15681
  setError(apiResponse.error);
15662
- _optionalChain([config, 'access', _448 => _448.onError, 'optionalCall', _449 => _449(apiResponse.error)]);
15682
+ _optionalChain([config, 'access', _450 => _450.onError, 'optionalCall', _451 => _451(apiResponse.error)]);
15663
15683
  return null;
15664
15684
  }
15665
15685
  } catch (err) {
15666
15686
  const errorMessage = err instanceof Error ? err.message : "Unknown error";
15667
15687
  setError(errorMessage);
15668
- _optionalChain([config, 'access', _450 => _450.onError, 'optionalCall', _451 => _451(errorMessage)]);
15688
+ _optionalChain([config, 'access', _452 => _452.onError, 'optionalCall', _453 => _453(errorMessage)]);
15669
15689
  return null;
15670
15690
  } finally {
15671
15691
  setLoading(false);
@@ -15738,7 +15758,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
15738
15758
  {
15739
15759
  href: hasRole(_chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator) ? generateUrl({
15740
15760
  page: "/administration",
15741
- id: _optionalChain([_chunkLBMNRFCYjs.Modules, 'access', _452 => _452.Company, 'access', _453 => _453.pageUrl, 'optionalAccess', _454 => _454.substring, 'call', _455 => _455(1)]),
15761
+ id: _optionalChain([_chunkLBMNRFCYjs.Modules, 'access', _454 => _454.Company, 'access', _455 => _455.pageUrl, 'optionalAccess', _456 => _456.substring, 'call', _457 => _457(1)]),
15742
15762
  childPage: company.id
15743
15763
  }) : generateUrl({ page: _chunkLBMNRFCYjs.Modules.Company, id: company.id }),
15744
15764
  children: row.getValue("name")
@@ -15754,7 +15774,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
15754
15774
  })
15755
15775
  };
15756
15776
  const columns = _react.useMemo.call(void 0, () => {
15757
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _456 => _456[field], 'optionalCall', _457 => _457()])).filter((col) => col !== void 0);
15777
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _458 => _458[field], 'optionalCall', _459 => _459()])).filter((col) => col !== void 0);
15758
15778
  }, [params.fields, fieldColumnMap, t, generateUrl, hasRole]);
15759
15779
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
15760
15780
  }, "useCompanyTableStructure");
@@ -15766,7 +15786,7 @@ var GRACE_DAYS = 3;
15766
15786
  var isAdministrator = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (currentUser) => {
15767
15787
  if (!currentUser || !_chunkXTLTQQ7Xjs.isRolesConfigured.call(void 0, )) return false;
15768
15788
  const adminRoleId = _chunkXTLTQQ7Xjs.getRoleId.call(void 0, ).Administrator;
15769
- return !!_optionalChain([currentUser, 'access', _458 => _458.roles, 'optionalAccess', _459 => _459.some, 'call', _460 => _460((role) => role.id === adminRoleId)]);
15789
+ return !!_optionalChain([currentUser, 'access', _460 => _460.roles, 'optionalAccess', _461 => _461.some, 'call', _462 => _462((role) => role.id === adminRoleId)]);
15770
15790
  }, "isAdministrator");
15771
15791
  function useSubscriptionStatus() {
15772
15792
  const { company, currentUser } = useCurrentUserContext();
@@ -15883,7 +15903,7 @@ var useRoleTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
15883
15903
  })
15884
15904
  };
15885
15905
  const columns = _react.useMemo.call(void 0, () => {
15886
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _461 => _461[field], 'optionalCall', _462 => _462()])).filter((col) => col !== void 0);
15906
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _463 => _463[field], 'optionalCall', _464 => _464()])).filter((col) => col !== void 0);
15887
15907
  }, [params.fields, fieldColumnMap, t, generateUrl]);
15888
15908
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
15889
15909
  }, "useRoleTableStructure");
@@ -15984,11 +16004,11 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
15984
16004
  return params.fields.map((field) => {
15985
16005
  const localHandler = fieldColumnMap[field];
15986
16006
  if (localHandler) return localHandler();
15987
- const customHandler = _optionalChain([params, 'access', _463 => _463.context, 'optionalAccess', _464 => _464.customCells, 'optionalAccess', _465 => _465[field]]);
16007
+ const customHandler = _optionalChain([params, 'access', _465 => _465.context, 'optionalAccess', _466 => _466.customCells, 'optionalAccess', _467 => _467[field]]);
15988
16008
  if (customHandler) return customHandler({ t });
15989
16009
  return void 0;
15990
16010
  }).filter((col) => col !== void 0);
15991
- }, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _466 => _466.context, 'optionalAccess', _467 => _467.customCells])]);
16011
+ }, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _468 => _468.context, 'optionalAccess', _469 => _469.customCells])]);
15992
16012
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
15993
16013
  }, "useContentTableStructure");
15994
16014
 
@@ -16324,7 +16344,7 @@ function ContentTableSearch({ data }) {
16324
16344
  const handleSearchIconClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
16325
16345
  if (!isExpanded) {
16326
16346
  setIsFocused(true);
16327
- setTimeout(() => _optionalChain([inputRef, 'access', _468 => _468.current, 'optionalAccess', _469 => _469.focus, 'call', _470 => _470()]), 50);
16347
+ setTimeout(() => _optionalChain([inputRef, 'access', _470 => _470.current, 'optionalAccess', _471 => _471.focus, 'call', _472 => _472()]), 50);
16328
16348
  }
16329
16349
  }, "handleSearchIconClick");
16330
16350
  const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
@@ -16404,7 +16424,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
16404
16424
  props.defaultExpanded === true ? true : typeof props.defaultExpanded === "object" ? props.defaultExpanded : {}
16405
16425
  );
16406
16426
  const { data: tableData, columns: tableColumns } = useTableGenerator(props.tableGeneratorType, {
16407
- data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _471 => _471.data]), () => ( EMPTY_ARRAY)),
16427
+ data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _473 => _473.data]), () => ( EMPTY_ARRAY)),
16408
16428
  fields,
16409
16429
  checkedIds,
16410
16430
  toggleId,
@@ -16437,7 +16457,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
16437
16457
  });
16438
16458
  const rowModel = tableData ? table.getRowModel() : null;
16439
16459
  const groupedRows = _react.useMemo.call(void 0, () => {
16440
- if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _472 => _472.rows, 'optionalAccess', _473 => _473.length])) return null;
16460
+ if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _474 => _474.rows, 'optionalAccess', _475 => _475.length])) return null;
16441
16461
  const groupMap = /* @__PURE__ */ new Map();
16442
16462
  for (const row of rowModel.rows) {
16443
16463
  const keys = getGroupKeys(row.original, props.groupBy);
@@ -16494,10 +16514,10 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
16494
16514
  ) }),
16495
16515
  table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: headerGroup.headers.map((header) => {
16496
16516
  const meta = header.column.columnDef.meta;
16497
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _474 => _474.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
16517
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _476 => _476.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
16498
16518
  }) }, headerGroup.id))
16499
16519
  ] }),
16500
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _475 => _475.rows, 'optionalAccess', _476 => _476.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React.default.Fragment, { children: [
16520
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _477 => _477.rows, 'optionalAccess', _478 => _478.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React.default.Fragment, { children: [
16501
16521
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16502
16522
  TableCell,
16503
16523
  {
@@ -16509,11 +16529,11 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
16509
16529
  group.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16510
16530
  TableRow,
16511
16531
  {
16512
- onClick: () => _optionalChain([onRowClick, 'optionalCall', _477 => _477(row.original.jsonApiData)]),
16532
+ onClick: () => _optionalChain([onRowClick, 'optionalCall', _479 => _479(row.original.jsonApiData)]),
16513
16533
  className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
16514
16534
  children: row.getVisibleCells().map((cell) => {
16515
16535
  const meta = cell.column.columnDef.meta;
16516
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _478 => _478.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
16536
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _480 => _480.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
16517
16537
  })
16518
16538
  },
16519
16539
  row.id
@@ -16521,11 +16541,11 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
16521
16541
  ] }, group.groupKey)) : rowModel.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16522
16542
  TableRow,
16523
16543
  {
16524
- onClick: () => _optionalChain([onRowClick, 'optionalCall', _479 => _479(row.original.jsonApiData)]),
16544
+ onClick: () => _optionalChain([onRowClick, 'optionalCall', _481 => _481(row.original.jsonApiData)]),
16525
16545
  className: `group ${onRowClick ? "hover:bg-muted/50 cursor-pointer" : ""}`,
16526
16546
  children: row.getVisibleCells().map((cell) => {
16527
16547
  const meta = cell.column.columnDef.meta;
16528
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _480 => _480.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
16548
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _482 => _482.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
16529
16549
  })
16530
16550
  },
16531
16551
  row.id
@@ -16538,7 +16558,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
16538
16558
  size: "sm",
16539
16559
  onClick: (e) => {
16540
16560
  e.preventDefault();
16541
- _optionalChain([data, 'access', _481 => _481.previous, 'optionalCall', _482 => _482(true)]);
16561
+ _optionalChain([data, 'access', _483 => _483.previous, 'optionalCall', _484 => _484(true)]);
16542
16562
  },
16543
16563
  disabled: !data.previous,
16544
16564
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronLeft, { className: "h-4 w-4" })
@@ -16552,7 +16572,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
16552
16572
  size: "sm",
16553
16573
  onClick: (e) => {
16554
16574
  e.preventDefault();
16555
- _optionalChain([data, 'access', _483 => _483.next, 'optionalCall', _484 => _484(true)]);
16575
+ _optionalChain([data, 'access', _485 => _485.next, 'optionalCall', _486 => _486(true)]);
16556
16576
  },
16557
16577
  disabled: !data.next,
16558
16578
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight, { className: "h-4 w-4" })
@@ -16573,7 +16593,7 @@ function ContentListGrid(props) {
16573
16593
  if (!data.next || !sentinelRef.current) return;
16574
16594
  const observer = new IntersectionObserver(
16575
16595
  (entries) => {
16576
- if (_optionalChain([entries, 'access', _485 => _485[0], 'optionalAccess', _486 => _486.isIntersecting])) _optionalChain([data, 'access', _487 => _487.next, 'optionalCall', _488 => _488()]);
16596
+ if (_optionalChain([entries, 'access', _487 => _487[0], 'optionalAccess', _488 => _488.isIntersecting])) _optionalChain([data, 'access', _489 => _489.next, 'optionalCall', _490 => _490()]);
16577
16597
  },
16578
16598
  { threshold: 0.1, rootMargin: "200px" }
16579
16599
  );
@@ -17411,7 +17431,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
17411
17431
  newDigits[index] = digit;
17412
17432
  setDigits(newDigits);
17413
17433
  if (digit && index < 5) {
17414
- _optionalChain([inputRefs, 'access', _489 => _489.current, 'access', _490 => _490[index + 1], 'optionalAccess', _491 => _491.focus, 'call', _492 => _492()]);
17434
+ _optionalChain([inputRefs, 'access', _491 => _491.current, 'access', _492 => _492[index + 1], 'optionalAccess', _493 => _493.focus, 'call', _494 => _494()]);
17415
17435
  }
17416
17436
  const code = newDigits.join("");
17417
17437
  if (code.length === 6 && newDigits.every((d) => d !== "")) {
@@ -17420,7 +17440,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
17420
17440
  }, "handleChange");
17421
17441
  const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index, e) => {
17422
17442
  if (e.key === "Backspace" && !digits[index] && index > 0) {
17423
- _optionalChain([inputRefs, 'access', _493 => _493.current, 'access', _494 => _494[index - 1], 'optionalAccess', _495 => _495.focus, 'call', _496 => _496()]);
17443
+ _optionalChain([inputRefs, 'access', _495 => _495.current, 'access', _496 => _496[index - 1], 'optionalAccess', _497 => _497.focus, 'call', _498 => _498()]);
17424
17444
  }
17425
17445
  }, "handleKeyDown");
17426
17446
  const handlePaste = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
@@ -17429,7 +17449,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
17429
17449
  if (pastedData.length === 6) {
17430
17450
  const newDigits = pastedData.split("");
17431
17451
  setDigits(newDigits);
17432
- _optionalChain([inputRefs, 'access', _497 => _497.current, 'access', _498 => _498[5], 'optionalAccess', _499 => _499.focus, 'call', _500 => _500()]);
17452
+ _optionalChain([inputRefs, 'access', _499 => _499.current, 'access', _500 => _500[5], 'optionalAccess', _501 => _501.focus, 'call', _502 => _502()]);
17433
17453
  onComplete(pastedData);
17434
17454
  }
17435
17455
  }, "handlePaste");
@@ -17640,8 +17660,8 @@ function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
17640
17660
  try {
17641
17661
  const registrationData = await _chunkLBMNRFCYjs.TwoFactorService.getPasskeyRegistrationOptions({
17642
17662
  id: _uuid.v4.call(void 0, ),
17643
- userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _501 => _501.email]), () => ( "")),
17644
- userDisplayName: _optionalChain([currentUser, 'optionalAccess', _502 => _502.name])
17663
+ userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _503 => _503.email]), () => ( "")),
17664
+ userDisplayName: _optionalChain([currentUser, 'optionalAccess', _504 => _504.name])
17645
17665
  });
17646
17666
  const credential = await _browser.startRegistration.call(void 0, { optionsJSON: registrationData.options });
17647
17667
  await _chunkLBMNRFCYjs.TwoFactorService.verifyPasskeyRegistration({
@@ -17792,7 +17812,7 @@ function TotpSetupDialog({ onSuccess, trigger }) {
17792
17812
  const setup = await _chunkLBMNRFCYjs.TwoFactorService.setupTotp({
17793
17813
  id: _uuid.v4.call(void 0, ),
17794
17814
  name: name.trim(),
17795
- accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _503 => _503.email]), () => ( ""))
17815
+ accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _505 => _505.email]), () => ( ""))
17796
17816
  });
17797
17817
  setQrCodeUri(setup.qrCodeUri);
17798
17818
  setAuthenticatorId(setup.authenticatorId);
@@ -17926,7 +17946,7 @@ function TwoFactorSettings() {
17926
17946
  if (isLoading) {
17927
17947
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground", children: t("common.loading") }) }) });
17928
17948
  }
17929
- const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _504 => _504.isEnabled]), () => ( false));
17949
+ const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _506 => _506.isEnabled]), () => ( false));
17930
17950
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { children: [
17931
17951
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
17932
17952
  isEnabled ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ShieldCheck, { className: "text-success h-6 w-6" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ShieldAlert, { className: "text-warning h-6 w-6" }),
@@ -17964,7 +17984,7 @@ function TwoFactorSettings() {
17964
17984
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-medium", children: t("auth.two_factor.backup_codes") }),
17965
17985
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("auth.two_factor.backup_codes_description") })
17966
17986
  ] }),
17967
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _505 => _505.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
17987
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _507 => _507.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
17968
17988
  ] }) }),
17969
17989
  !isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
17970
17990
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, {}),
@@ -18142,9 +18162,9 @@ function AcceptInvitation() {
18142
18162
  });
18143
18163
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
18144
18164
  try {
18145
- if (!_optionalChain([params, 'optionalAccess', _506 => _506.code])) return;
18165
+ if (!_optionalChain([params, 'optionalAccess', _508 => _508.code])) return;
18146
18166
  const payload = {
18147
- code: _optionalChain([params, 'optionalAccess', _507 => _507.code]),
18167
+ code: _optionalChain([params, 'optionalAccess', _509 => _509.code]),
18148
18168
  password: values.password
18149
18169
  };
18150
18170
  await _chunkLBMNRFCYjs.AuthService.acceptInvitation(payload);
@@ -18494,7 +18514,7 @@ function Logout({ storageKeys }) {
18494
18514
  const generateUrl = usePageUrlGenerator();
18495
18515
  _react.useEffect.call(void 0, () => {
18496
18516
  const logOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
18497
- if (_optionalChain([storageKeys, 'optionalAccess', _508 => _508.length])) {
18517
+ if (_optionalChain([storageKeys, 'optionalAccess', _510 => _510.length])) {
18498
18518
  clearClientStorage(storageKeys);
18499
18519
  }
18500
18520
  await _chunkLBMNRFCYjs.AuthService.logout();
@@ -18517,14 +18537,14 @@ function RefreshUser() {
18517
18537
  setUser(fullUser);
18518
18538
  const token = {
18519
18539
  userId: fullUser.id,
18520
- companyId: _optionalChain([fullUser, 'access', _509 => _509.company, 'optionalAccess', _510 => _510.id]),
18540
+ companyId: _optionalChain([fullUser, 'access', _511 => _511.company, 'optionalAccess', _512 => _512.id]),
18521
18541
  roles: fullUser.roles.map((role) => role.id),
18522
- features: _nullishCoalesce(_optionalChain([fullUser, 'access', _511 => _511.company, 'optionalAccess', _512 => _512.features, 'optionalAccess', _513 => _513.map, 'call', _514 => _514((feature) => feature.id)]), () => ( [])),
18542
+ features: _nullishCoalesce(_optionalChain([fullUser, 'access', _513 => _513.company, 'optionalAccess', _514 => _514.features, 'optionalAccess', _515 => _515.map, 'call', _516 => _516((feature) => feature.id)]), () => ( [])),
18523
18543
  modules: fullUser.modules.map((module) => {
18524
18544
  return { id: module.id, permissions: module.permissions };
18525
18545
  })
18526
18546
  };
18527
- await _optionalChain([_chunkLBMNRFCYjs.getTokenHandler.call(void 0, ), 'optionalAccess', _515 => _515.updateToken, 'call', _516 => _516(token)]);
18547
+ await _optionalChain([_chunkLBMNRFCYjs.getTokenHandler.call(void 0, ), 'optionalAccess', _517 => _517.updateToken, 'call', _518 => _518(token)]);
18528
18548
  _cookiesnext.deleteCookie.call(void 0, "reloadData");
18529
18549
  }
18530
18550
  }, "loadFullUser");
@@ -18588,9 +18608,9 @@ function ResetPassword() {
18588
18608
  });
18589
18609
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
18590
18610
  try {
18591
- if (!_optionalChain([params, 'optionalAccess', _517 => _517.code])) return;
18611
+ if (!_optionalChain([params, 'optionalAccess', _519 => _519.code])) return;
18592
18612
  const payload = {
18593
- code: _optionalChain([params, 'optionalAccess', _518 => _518.code]),
18613
+ code: _optionalChain([params, 'optionalAccess', _520 => _520.code]),
18594
18614
  password: values.password
18595
18615
  };
18596
18616
  await _chunkLBMNRFCYjs.AuthService.resetPassword(payload);
@@ -18939,7 +18959,7 @@ function extractHeadings(blocks) {
18939
18959
  function processBlocks(blockArray) {
18940
18960
  for (const block of blockArray) {
18941
18961
  if (block.type === "heading") {
18942
- const level = _optionalChain([block, 'access', _519 => _519.props, 'optionalAccess', _520 => _520.level]) || 1;
18962
+ const level = _optionalChain([block, 'access', _521 => _521.props, 'optionalAccess', _522 => _522.level]) || 1;
18943
18963
  const text = extractTextFromContent(block.content);
18944
18964
  if (text.trim()) {
18945
18965
  headings.push({
@@ -19282,7 +19302,7 @@ var useHowToTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
19282
19302
  })
19283
19303
  };
19284
19304
  const columns = _react.useMemo.call(void 0, () => {
19285
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _521 => _521[field], 'optionalCall', _522 => _522()])).filter((col) => col !== void 0);
19305
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _523 => _523[field], 'optionalCall', _524 => _524()])).filter((col) => col !== void 0);
19286
19306
  }, [params.fields, fieldColumnMap, t, generateUrl]);
19287
19307
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
19288
19308
  }, "useHowToTableStructure");
@@ -19381,7 +19401,7 @@ function HowToSelector({
19381
19401
  }, "setHowTo");
19382
19402
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFieldWrapper, { form, name: id, label, isRequired, children: (field) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Popover, { open, onOpenChange: setOpen, modal: true, children: [
19383
19403
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
19384
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _523 => _523.value, 'optionalAccess', _524 => _524.name]), () => ( "")) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input text-muted-foreground flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: _nullishCoalesce(placeholder, () => ( t(`generic.search.placeholder`, { type: t(`entities.howtos`, { count: 1 }) }))) }) }) }),
19404
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _525 => _525.value, 'optionalAccess', _526 => _526.name]), () => ( "")) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input text-muted-foreground flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: _nullishCoalesce(placeholder, () => ( t(`generic.search.placeholder`, { type: t(`entities.howtos`, { count: 1 }) }))) }) }) }),
19385
19405
  field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
19386
19406
  _lucidereact.CircleX,
19387
19407
  {
@@ -19750,9 +19770,9 @@ function CitationsTab({ citations, sources }) {
19750
19770
  ] }) }),
19751
19771
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: sorted.map((chunk) => {
19752
19772
  const isOpen = expanded.has(chunk.id);
19753
- const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _525 => _525.get, 'call', _526 => _526(chunk.nodeId)]) : void 0;
19773
+ const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _527 => _527.get, 'call', _528 => _528(chunk.nodeId)]) : void 0;
19754
19774
  const fallbackName = chunk.nodeId ? `${_nullishCoalesce(chunk.nodeType, () => ( t("features.assistant.message.sources.source")))} ${chunk.nodeId.slice(0, 8)}` : _nullishCoalesce(chunk.nodeType, () => ( t("features.assistant.message.sources.source")));
19755
- const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _527 => _527.name]), () => ( fallbackName));
19775
+ const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _529 => _529.name]), () => ( fallbackName));
19756
19776
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
19757
19777
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, TableRow, { children: [
19758
19778
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -19799,7 +19819,7 @@ function ContentsTab({ citations, sources }) {
19799
19819
  for (const c of citations) {
19800
19820
  const id = c.nodeId;
19801
19821
  if (!id) continue;
19802
- const source = _optionalChain([sources, 'optionalAccess', _528 => _528.get, 'call', _529 => _529(id)]);
19822
+ const source = _optionalChain([sources, 'optionalAccess', _530 => _530.get, 'call', _531 => _531(id)]);
19803
19823
  if (!source) continue;
19804
19824
  const existing = map.get(id);
19805
19825
  if (existing) {
@@ -19866,7 +19886,7 @@ function UsersTab({ users, citations, sources }) {
19866
19886
  const generate = usePageUrlGenerator();
19867
19887
  const userMap = /* @__PURE__ */ new Map();
19868
19888
  for (const u of users) {
19869
- if (!_optionalChain([u, 'optionalAccess', _530 => _530.id])) continue;
19889
+ if (!_optionalChain([u, 'optionalAccess', _532 => _532.id])) continue;
19870
19890
  userMap.set(u.id, { user: u, contentCount: 0, citationCount: 0 });
19871
19891
  }
19872
19892
  if (citations && sources) {
@@ -19971,7 +19991,7 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
19971
19991
  }
19972
19992
  return ids.size;
19973
19993
  }, [message.citations, sources]);
19974
- const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _531 => _531.length]), () => ( 0));
19994
+ const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _533 => _533.length]), () => ( 0));
19975
19995
  const total = refsCount + citationsCount + contentsCount + usersCount + suggestionsCount;
19976
19996
  const visibleTabs = [];
19977
19997
  if (suggestionsCount > 0) visibleTabs.push("suggested");
@@ -20031,8 +20051,8 @@ var SourcesFetcher = class extends _chunkLBMNRFCYjs.ClientAbstractService {
20031
20051
  const endpoint = new (0, _chunkLBMNRFCYjs.EndpointCreator)({ endpoint: params.module });
20032
20052
  endpoint.addAdditionalParam(params.idsParam, params.ids.join(","));
20033
20053
  endpoint.addAdditionalParam("fetchAll", "true");
20034
- if (_optionalChain([params, 'access', _532 => _532.module, 'access', _533 => _533.inclusions, 'optionalAccess', _534 => _534.lists, 'optionalAccess', _535 => _535.fields])) endpoint.limitToFields(params.module.inclusions.lists.fields);
20035
- if (_optionalChain([params, 'access', _536 => _536.module, 'access', _537 => _537.inclusions, 'optionalAccess', _538 => _538.lists, 'optionalAccess', _539 => _539.types])) endpoint.limitToType(params.module.inclusions.lists.types);
20054
+ if (_optionalChain([params, 'access', _534 => _534.module, 'access', _535 => _535.inclusions, 'optionalAccess', _536 => _536.lists, 'optionalAccess', _537 => _537.fields])) endpoint.limitToFields(params.module.inclusions.lists.fields);
20055
+ if (_optionalChain([params, 'access', _538 => _538.module, 'access', _539 => _539.inclusions, 'optionalAccess', _540 => _540.lists, 'optionalAccess', _541 => _541.types])) endpoint.limitToType(params.module.inclusions.lists.types);
20036
20056
  return this.callApi({
20037
20057
  type: params.module,
20038
20058
  method: "GET" /* GET */,
@@ -20111,7 +20131,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
20111
20131
  return void 0;
20112
20132
  }
20113
20133
  })()));
20114
- if (_optionalChain([author, 'optionalAccess', _540 => _540.id])) userMap.set(author.id, author);
20134
+ if (_optionalChain([author, 'optionalAccess', _542 => _542.id])) userMap.set(author.id, author);
20115
20135
  }
20116
20136
  return Array.from(userMap.values());
20117
20137
  }, [resolved]);
@@ -20140,14 +20160,14 @@ function MessageItem({
20140
20160
  }) {
20141
20161
  const t = _nextintl.useTranslations.call(void 0, );
20142
20162
  const isUser = message.role === "user";
20143
- const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _541 => _541.has, 'call', _542 => _542(message.id)]);
20163
+ const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _543 => _543.has, 'call', _544 => _544(message.id)]);
20144
20164
  if (isUser) {
20145
20165
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-end gap-1", children: [
20146
20166
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-primary text-primary-foreground max-w-[72%] rounded-2xl rounded-br-sm px-3.5 py-2 text-sm", children: message.content }),
20147
20167
  isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-destructive flex items-center gap-2 text-xs", children: [
20148
20168
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-3.5 w-3.5" }),
20149
20169
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("features.assistant.send_failed") }),
20150
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "underline", onClick: () => _optionalChain([onRetry, 'optionalCall', _543 => _543(message.id)]), children: t("features.assistant.retry") })
20170
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "underline", onClick: () => _optionalChain([onRetry, 'optionalCall', _545 => _545(message.id)]), children: t("features.assistant.retry") })
20151
20171
  ] })
20152
20172
  ] });
20153
20173
  }
@@ -20223,7 +20243,7 @@ function AssistantThread({
20223
20243
  }) {
20224
20244
  const endRef = _react.useRef.call(void 0, null);
20225
20245
  _react.useEffect.call(void 0, () => {
20226
- _optionalChain([endRef, 'access', _544 => _544.current, 'optionalAccess', _545 => _545.scrollIntoView, 'call', _546 => _546({ behavior: "smooth" })]);
20246
+ _optionalChain([endRef, 'access', _546 => _546.current, 'optionalAccess', _547 => _547.scrollIntoView, 'call', _548 => _548({ behavior: "smooth" })]);
20227
20247
  }, [messages.length, sending]);
20228
20248
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 overflow-x-hidden overflow-y-auto px-6 py-5", children: [
20229
20249
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -20252,7 +20272,7 @@ function AssistantContainer({ renderApprovalAction } = {}) {
20252
20272
  AssistantSidebar,
20253
20273
  {
20254
20274
  threads: ctx.threads,
20255
- activeId: _optionalChain([ctx, 'access', _547 => _547.assistant, 'optionalAccess', _548 => _548.id]),
20275
+ activeId: _optionalChain([ctx, 'access', _549 => _549.assistant, 'optionalAccess', _550 => _550.id]),
20256
20276
  onSelect: ctx.selectThread,
20257
20277
  onNew: ctx.startNew
20258
20278
  }
@@ -20353,14 +20373,14 @@ function NotificationsList({ archived }) {
20353
20373
  ] }),
20354
20374
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Skeleton, { className: "h-8 w-20" })
20355
20375
  ] }) }) }, i)) }), "LoadingSkeleton");
20356
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access', _549 => _549.data, 'optionalAccess', _550 => _550.map, 'call', _551 => _551((notification) => {
20376
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access', _551 => _551.data, 'optionalAccess', _552 => _552.map, 'call', _553 => _553((notification) => {
20357
20377
  const notificationData = generateNotificationData({ notification, generateUrl });
20358
20378
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "p-0", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `flex w-full flex-row items-center p-2`, children: [
20359
20379
  notificationData.actor ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-12 max-w-12 px-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: generateUrl({ page: _chunkLBMNRFCYjs.Modules.User, id: notificationData.actor.id }), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user: notificationData.actor, className: "h-8 w-8" }) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-14 max-w-14 px-2" }),
20360
20380
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
20361
20381
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
20362
20382
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
20363
- actor: _nullishCoalesce(_optionalChain([notificationData, 'access', _552 => _552.actor, 'optionalAccess', _553 => _553.name]), () => ( "")),
20383
+ actor: _nullishCoalesce(_optionalChain([notificationData, 'access', _554 => _554.actor, 'optionalAccess', _555 => _555.name]), () => ( "")),
20364
20384
  title: notificationData.title
20365
20385
  }) }),
20366
20386
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
@@ -20706,7 +20726,7 @@ var DEFAULT_TRANSLATIONS = {
20706
20726
  invalidEmail: "Please enter a valid email address"
20707
20727
  };
20708
20728
  async function copyToClipboard(text) {
20709
- if (_optionalChain([navigator, 'access', _554 => _554.clipboard, 'optionalAccess', _555 => _555.writeText])) {
20729
+ if (_optionalChain([navigator, 'access', _556 => _556.clipboard, 'optionalAccess', _557 => _557.writeText])) {
20710
20730
  try {
20711
20731
  await navigator.clipboard.writeText(text);
20712
20732
  return true;
@@ -20748,7 +20768,7 @@ function ReferralWidget({
20748
20768
  const linkInputRef = _react.useRef.call(void 0, null);
20749
20769
  const config = _chunkXTLTQQ7Xjs.getReferralConfig.call(void 0, );
20750
20770
  const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
20751
- const referralUrl = _optionalChain([stats, 'optionalAccess', _556 => _556.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
20771
+ const referralUrl = _optionalChain([stats, 'optionalAccess', _558 => _558.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
20752
20772
  if (!_chunkXTLTQQ7Xjs.isReferralEnabled.call(void 0, )) {
20753
20773
  return null;
20754
20774
  }
@@ -20758,7 +20778,7 @@ function ReferralWidget({
20758
20778
  if (success) {
20759
20779
  setCopied(true);
20760
20780
  _chunkLBMNRFCYjs.showToast.call(void 0, t.copiedMessage);
20761
- _optionalChain([onLinkCopied, 'optionalCall', _557 => _557()]);
20781
+ _optionalChain([onLinkCopied, 'optionalCall', _559 => _559()]);
20762
20782
  setTimeout(() => setCopied(false), 2e3);
20763
20783
  } else {
20764
20784
  _chunkLBMNRFCYjs.showError.call(void 0, t.copyError);
@@ -20772,12 +20792,12 @@ function ReferralWidget({
20772
20792
  try {
20773
20793
  await sendInvite(email);
20774
20794
  _chunkLBMNRFCYjs.showToast.call(void 0, t.inviteSent);
20775
- _optionalChain([onInviteSent, 'optionalCall', _558 => _558(email)]);
20795
+ _optionalChain([onInviteSent, 'optionalCall', _560 => _560(email)]);
20776
20796
  setEmail("");
20777
20797
  } catch (err) {
20778
20798
  const error2 = err instanceof Error ? err : new Error(t.inviteError);
20779
20799
  _chunkLBMNRFCYjs.showError.call(void 0, error2.message);
20780
- _optionalChain([onInviteError, 'optionalCall', _559 => _559(error2)]);
20800
+ _optionalChain([onInviteError, 'optionalCall', _561 => _561(error2)]);
20781
20801
  }
20782
20802
  }, [email, sendInvite, t.inviteSent, t.inviteError, t.invalidEmail, onInviteSent, onInviteError]);
20783
20803
  const handleEmailKeyDown = _react.useCallback.call(void 0,
@@ -21531,7 +21551,7 @@ function OAuthClientList({
21531
21551
  OAuthClientCard,
21532
21552
  {
21533
21553
  client,
21534
- onClick: () => _optionalChain([onClientClick, 'optionalCall', _560 => _560(client)]),
21554
+ onClick: () => _optionalChain([onClientClick, 'optionalCall', _562 => _562(client)]),
21535
21555
  onEdit: onEditClick ? () => onEditClick(client) : void 0,
21536
21556
  onDelete: onDeleteClick ? () => onDeleteClick(client) : void 0
21537
21557
  },
@@ -21547,11 +21567,11 @@ _chunk7QVYU63Ejs.__name.call(void 0, OAuthClientList, "OAuthClientList");
21547
21567
  function OAuthClientForm({ client, onSubmit, onCancel, isLoading = false }) {
21548
21568
  const isEditMode = !!client;
21549
21569
  const [formState, setFormState] = _react.useState.call(void 0, {
21550
- name: _optionalChain([client, 'optionalAccess', _561 => _561.name]) || "",
21551
- description: _optionalChain([client, 'optionalAccess', _562 => _562.description]) || "",
21552
- redirectUris: _optionalChain([client, 'optionalAccess', _563 => _563.redirectUris, 'optionalAccess', _564 => _564.length]) ? client.redirectUris : [""],
21553
- allowedScopes: _optionalChain([client, 'optionalAccess', _565 => _565.allowedScopes]) || [],
21554
- isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _566 => _566.isConfidential]), () => ( true))
21570
+ name: _optionalChain([client, 'optionalAccess', _563 => _563.name]) || "",
21571
+ description: _optionalChain([client, 'optionalAccess', _564 => _564.description]) || "",
21572
+ redirectUris: _optionalChain([client, 'optionalAccess', _565 => _565.redirectUris, 'optionalAccess', _566 => _566.length]) ? client.redirectUris : [""],
21573
+ allowedScopes: _optionalChain([client, 'optionalAccess', _567 => _567.allowedScopes]) || [],
21574
+ isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _568 => _568.isConfidential]), () => ( true))
21555
21575
  });
21556
21576
  const [errors, setErrors] = _react.useState.call(void 0, {});
21557
21577
  const validate = _react.useCallback.call(void 0, () => {
@@ -21779,7 +21799,7 @@ function OAuthClientDetail({
21779
21799
  ] }),
21780
21800
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
21781
21801
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Allowed Scopes" }),
21782
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap gap-2", children: client.allowedScopes.map((scope) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "secondary", children: _optionalChain([_chunkLBMNRFCYjs.OAUTH_SCOPE_DISPLAY, 'access', _567 => _567[scope], 'optionalAccess', _568 => _568.name]) || scope }, scope)) })
21802
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex flex-wrap gap-2", children: client.allowedScopes.map((scope) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { variant: "secondary", children: _optionalChain([_chunkLBMNRFCYjs.OAUTH_SCOPE_DISPLAY, 'access', _569 => _569[scope], 'optionalAccess', _570 => _570.name]) || scope }, scope)) })
21783
21803
  ] }),
21784
21804
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
21785
21805
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Grant Types" }),
@@ -21923,7 +21943,7 @@ function OAuthConsentScreen({
21923
21943
  if (error || !clientInfo) {
21924
21944
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-h-screen flex items-center justify-center p-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Card, { className: "w-full max-w-md", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardContent, { className: "py-8", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Alert, { variant: "destructive", children: [
21925
21945
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertTriangle, { className: "h-4 w-4" }),
21926
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _569 => _569.message]) || "Invalid authorization request. Please try again." })
21946
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _571 => _571.message]) || "Invalid authorization request. Please try again." })
21927
21947
  ] }) }) }) });
21928
21948
  }
21929
21949
  const { client, scopes } = clientInfo;
@@ -22139,7 +22159,7 @@ function WaitlistForm({ onSuccess }) {
22139
22159
  questionnaire: values.questionnaire
22140
22160
  });
22141
22161
  setIsSuccess(true);
22142
- _optionalChain([onSuccess, 'optionalCall', _570 => _570()]);
22162
+ _optionalChain([onSuccess, 'optionalCall', _572 => _572()]);
22143
22163
  } catch (e) {
22144
22164
  errorToast({ error: e });
22145
22165
  } finally {
@@ -22777,7 +22797,7 @@ var ModuleEditor = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs.__n
22777
22797
  ] }),
22778
22798
  roleIds.map((roleId) => {
22779
22799
  const roleTokens = block[roleId];
22780
- const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _571 => _571[roleId]]), () => ( roleId));
22800
+ const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _573 => _573[roleId]]), () => ( roleId));
22781
22801
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
22782
22802
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: roleLabel }),
22783
22803
  _chunkXTLTQQ7Xjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -22814,7 +22834,7 @@ function RbacContainer() {
22814
22834
  }, []);
22815
22835
  const sortedModuleIds = _react.useMemo.call(void 0, () => {
22816
22836
  if (!matrix) return [];
22817
- return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _572 => _572[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _573 => _573[b]]), () => ( b))));
22837
+ return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _574 => _574[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _575 => _575[b]]), () => ( b))));
22818
22838
  }, [matrix, moduleNames]);
22819
22839
  const roleIds = _react.useMemo.call(void 0, () => {
22820
22840
  if (roleNames) {
@@ -22877,7 +22897,7 @@ function RbacContainer() {
22877
22897
  id === selectedModuleId && "bg-muted font-medium text-foreground",
22878
22898
  id !== selectedModuleId && "text-muted-foreground"
22879
22899
  ),
22880
- children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _574 => _574[id]]), () => ( id))
22900
+ children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _576 => _576[id]]), () => ( id))
22881
22901
  }
22882
22902
  ) }, id)) }) }),
22883
22903
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: selectedModuleId && selectedBlock ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -22885,7 +22905,7 @@ function RbacContainer() {
22885
22905
  {
22886
22906
  moduleId: selectedModuleId,
22887
22907
  block: selectedBlock,
22888
- moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _575 => _575[selectedModuleId]]), () => ( selectedModuleId)),
22908
+ moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _577 => _577[selectedModuleId]]), () => ( selectedModuleId)),
22889
22909
  roleIds,
22890
22910
  roleNames,
22891
22911
  onOpenPicker: openPicker
@@ -22896,12 +22916,12 @@ function RbacContainer() {
22896
22916
  RbacPermissionPicker,
22897
22917
  {
22898
22918
  open: !!activePicker,
22899
- anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _576 => _576.anchor]), () => ( null)),
22919
+ anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _578 => _578.anchor]), () => ( null)),
22900
22920
  value: activeValue,
22901
- isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _577 => _577.isRoleColumn]), () => ( false)),
22921
+ isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _579 => _579.isRoleColumn]), () => ( false)),
22902
22922
  knownSegments: activeSegments,
22903
22923
  onSetValue: handleSetValue,
22904
- onClear: _optionalChain([activePicker, 'optionalAccess', _578 => _578.isRoleColumn]) ? handleClear : void 0,
22924
+ onClear: _optionalChain([activePicker, 'optionalAccess', _580 => _580.isRoleColumn]) ? handleClear : void 0,
22905
22925
  onClose: closePicker
22906
22926
  }
22907
22927
  )
@@ -22968,7 +22988,7 @@ function RbacByRoleContainer() {
22968
22988
  }, [roleNames]);
22969
22989
  const sortedModuleIds = _react.useMemo.call(void 0, () => {
22970
22990
  if (!matrix) return [];
22971
- return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _579 => _579[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _580 => _580[b]]), () => ( b))));
22991
+ return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _581 => _581[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _582 => _582[b]]), () => ( b))));
22972
22992
  }, [matrix, moduleNames]);
22973
22993
  _react.useEffect.call(void 0, () => {
22974
22994
  if (!selectedRoleId && sortedRoleIds.length > 0) {
@@ -23017,7 +23037,7 @@ function RbacByRoleContainer() {
23017
23037
  id === selectedRoleId && "bg-muted font-medium text-foreground",
23018
23038
  id !== selectedRoleId && "text-muted-foreground"
23019
23039
  ),
23020
- children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _581 => _581[id]]), () => ( id))
23040
+ children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _583 => _583[id]]), () => ( id))
23021
23041
  }
23022
23042
  ) }, id)) }) }),
23023
23043
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: sortedModuleIds.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-lg border border-accent bg-card", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "table", { className: "w-full text-sm", children: [
@@ -23037,7 +23057,7 @@ function RbacByRoleContainer() {
23037
23057
  if (!block) return null;
23038
23058
  const defaultTokens = _nullishCoalesce(block.default, () => ( []));
23039
23059
  const roleTokens = block[selectedRoleId];
23040
- const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _582 => _582[moduleId]]), () => ( moduleId));
23060
+ const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _584 => _584[moduleId]]), () => ( moduleId));
23041
23061
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
23042
23062
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { className: "border-b bg-muted/40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
23043
23063
  "td",
@@ -23052,7 +23072,7 @@ function RbacByRoleContainer() {
23052
23072
  _chunkXTLTQQ7Xjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RbacPermissionCell, { value: cellValue2(defaultTokens, action) }) }, action))
23053
23073
  ] }),
23054
23074
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
23055
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _583 => _583[selectedRoleId]]), () => ( selectedRoleId)) }),
23075
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _585 => _585[selectedRoleId]]), () => ( selectedRoleId)) }),
23056
23076
  _chunkXTLTQQ7Xjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
23057
23077
  CellButton3,
23058
23078
  {
@@ -23073,12 +23093,12 @@ function RbacByRoleContainer() {
23073
23093
  RbacPermissionPicker,
23074
23094
  {
23075
23095
  open: !!activePicker,
23076
- anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _584 => _584.anchor]), () => ( null)),
23096
+ anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _586 => _586.anchor]), () => ( null)),
23077
23097
  value: activeValue,
23078
- isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _585 => _585.isRoleColumn]), () => ( false)),
23098
+ isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _587 => _587.isRoleColumn]), () => ( false)),
23079
23099
  knownSegments: activeSegments,
23080
23100
  onSetValue: handleSetValue,
23081
- onClear: _optionalChain([activePicker, 'optionalAccess', _586 => _586.isRoleColumn]) ? handleClear : void 0,
23101
+ onClear: _optionalChain([activePicker, 'optionalAccess', _588 => _588.isRoleColumn]) ? handleClear : void 0,
23082
23102
  onClose: closePicker
23083
23103
  }
23084
23104
  )
@@ -23626,4 +23646,4 @@ _chunk7QVYU63Ejs.__name.call(void 0, RbacByRoleContainer, "RbacByRoleContainer")
23626
23646
 
23627
23647
 
23628
23648
  exports.JsonApiProvider = JsonApiProvider; exports.useJsonApiGet = useJsonApiGet; exports.useJsonApiMutation = useJsonApiMutation; exports.useRehydration = useRehydration; exports.useRehydrationList = useRehydrationList; exports.TableGeneratorRegistry = TableGeneratorRegistry; exports.tableGeneratorRegistry = tableGeneratorRegistry; exports.usePageUrlGenerator = usePageUrlGenerator; exports.useUrlRewriter = useUrlRewriter; exports.useDataListRetriever = useDataListRetriever; exports.useDebounce = useDebounce2; exports.registerTableGenerator = registerTableGenerator; exports.useTableGenerator = useTableGenerator; exports.computeLayeredLayout = computeLayeredLayout; exports.fitLayeredLayoutToAspectRatio = fitLayeredLayoutToAspectRatio; exports.useCustomD3Graph = useCustomD3Graph; exports.SocketContext = SocketContext; exports.SocketProvider = SocketProvider; exports.useSocketContext = useSocketContext; exports.CurrentUserProvider = CurrentUserProvider; exports.useCurrentUserContext = useCurrentUserContext; exports.Accordion = Accordion; exports.AccordionItem = AccordionItem; exports.AccordionTrigger = AccordionTrigger; exports.AccordionContent = AccordionContent; exports.Alert = Alert; exports.AlertTitle = AlertTitle; exports.AlertDescription = AlertDescription; exports.AlertAction = AlertAction; exports.buttonVariants = buttonVariants; exports.Button = Button; exports.AlertDialog = AlertDialog; exports.AlertDialogTrigger = AlertDialogTrigger; exports.AlertDialogPortal = AlertDialogPortal; exports.AlertDialogOverlay = AlertDialogOverlay; exports.AlertDialogContent = AlertDialogContent; exports.AlertDialogHeader = AlertDialogHeader; exports.AlertDialogFooter = AlertDialogFooter; exports.AlertDialogMedia = AlertDialogMedia; exports.AlertDialogTitle = AlertDialogTitle; exports.AlertDialogDescription = AlertDialogDescription; exports.AlertDialogAction = AlertDialogAction; exports.AlertDialogCancel = AlertDialogCancel; exports.Avatar = Avatar; exports.AvatarImage = AvatarImage; exports.AvatarFallback = AvatarFallback; exports.AvatarBadge = AvatarBadge; exports.AvatarGroup = AvatarGroup; exports.AvatarGroupCount = AvatarGroupCount; exports.badgeVariants = badgeVariants; exports.Badge = Badge; exports.Breadcrumb = Breadcrumb; exports.BreadcrumbList = BreadcrumbList; exports.BreadcrumbItem = BreadcrumbItem; exports.BreadcrumbLink = BreadcrumbLink; exports.BreadcrumbPage = BreadcrumbPage; exports.BreadcrumbSeparator = BreadcrumbSeparator; exports.BreadcrumbEllipsis = BreadcrumbEllipsis; exports.Calendar = Calendar; exports.CalendarDayButton = CalendarDayButton; exports.Card = Card; exports.CardHeader = CardHeader; exports.CardTitle = CardTitle; exports.CardDescription = CardDescription; exports.CardAction = CardAction; exports.CardContent = CardContent; exports.CardFooter = CardFooter; exports.useCarousel = useCarousel; exports.Carousel = Carousel; exports.CarouselContent = CarouselContent; exports.CarouselItem = CarouselItem; exports.CarouselPrevious = CarouselPrevious; exports.CarouselNext = CarouselNext; exports.ChartContainer = ChartContainer; exports.ChartStyle = ChartStyle; exports.ChartTooltip = ChartTooltip; exports.ChartTooltipContent = ChartTooltipContent; exports.ChartLegend = ChartLegend; exports.ChartLegendContent = ChartLegendContent; exports.Checkbox = Checkbox; exports.Collapsible = Collapsible; exports.CollapsibleTrigger = CollapsibleTrigger; exports.CollapsibleContent = CollapsibleContent; exports.Input = Input; exports.Textarea = Textarea; exports.InputGroup = InputGroup; exports.InputGroupAddon = InputGroupAddon; exports.InputGroupButton = InputGroupButton; exports.InputGroupText = InputGroupText; exports.InputGroupInput = InputGroupInput; exports.InputGroupTextarea = InputGroupTextarea; exports.Combobox = Combobox; exports.ComboboxValue = ComboboxValue; exports.ComboboxTrigger = ComboboxTrigger; exports.ComboboxInput = ComboboxInput; exports.ComboboxContent = ComboboxContent; exports.ComboboxList = ComboboxList; exports.ComboboxItem = ComboboxItem; exports.ComboboxGroup = ComboboxGroup; exports.ComboboxLabel = ComboboxLabel; exports.ComboboxCollection = ComboboxCollection; exports.ComboboxEmpty = ComboboxEmpty; exports.ComboboxSeparator = ComboboxSeparator; exports.ComboboxChips = ComboboxChips; exports.ComboboxChip = ComboboxChip; exports.ComboboxChipsInput = ComboboxChipsInput; exports.useComboboxAnchor = useComboboxAnchor; exports.Dialog = Dialog; exports.DialogTrigger = DialogTrigger; exports.DialogPortal = DialogPortal; exports.DialogClose = DialogClose; exports.DialogOverlay = DialogOverlay; exports.DialogContent = DialogContent; exports.DialogHeader = DialogHeader; exports.DialogFooter = DialogFooter; exports.DialogTitle = DialogTitle; exports.DialogDescription = DialogDescription; exports.Command = Command; exports.CommandDialog = CommandDialog; exports.CommandInput = CommandInput; exports.CommandList = CommandList; exports.CommandEmpty = CommandEmpty; exports.CommandGroup = CommandGroup; exports.CommandSeparator = CommandSeparator; exports.CommandItem = CommandItem; exports.CommandShortcut = CommandShortcut; exports.ConfirmDialog = ConfirmDialog; exports.ContextMenu = ContextMenu; exports.ContextMenuPortal = ContextMenuPortal; exports.ContextMenuTrigger = ContextMenuTrigger; exports.ContextMenuContent = ContextMenuContent; exports.ContextMenuGroup = ContextMenuGroup; exports.ContextMenuLabel = ContextMenuLabel; exports.ContextMenuItem = ContextMenuItem; exports.ContextMenuSub = ContextMenuSub; exports.ContextMenuSubTrigger = ContextMenuSubTrigger; exports.ContextMenuSubContent = ContextMenuSubContent; exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem; exports.ContextMenuRadioGroup = ContextMenuRadioGroup; exports.ContextMenuRadioItem = ContextMenuRadioItem; exports.ContextMenuSeparator = ContextMenuSeparator; exports.ContextMenuShortcut = ContextMenuShortcut; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerPortal = DrawerPortal; exports.DrawerClose = DrawerClose; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerFooter = DrawerFooter; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DropdownMenu = DropdownMenu; exports.DropdownMenuPortal = DropdownMenuPortal; exports.DropdownMenuTrigger = DropdownMenuTrigger; exports.DropdownMenuContent = DropdownMenuContent; exports.DropdownMenuGroup = DropdownMenuGroup; exports.DropdownMenuLabel = DropdownMenuLabel; exports.DropdownMenuItem = DropdownMenuItem; exports.DropdownMenuSub = DropdownMenuSub; exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger; exports.DropdownMenuSubContent = DropdownMenuSubContent; exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem; exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup; exports.DropdownMenuRadioItem = DropdownMenuRadioItem; exports.DropdownMenuSeparator = DropdownMenuSeparator; exports.DropdownMenuShortcut = DropdownMenuShortcut; exports.EmptyState = EmptyState; exports.Label = Label; exports.Separator = Separator; exports.FieldSet = FieldSet; exports.FieldLegend = FieldLegend; exports.FieldGroup = FieldGroup; exports.Field = Field; exports.FieldContent = FieldContent; exports.FieldLabel = FieldLabel; exports.FieldTitle = FieldTitle; exports.FieldDescription = FieldDescription; exports.FieldSeparator = FieldSeparator; exports.FieldError = FieldError; exports.Form = Form; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.InputOTP = InputOTP; exports.InputOTPGroup = InputOTPGroup; exports.InputOTPSlot = InputOTPSlot; exports.InputOTPSeparator = InputOTPSeparator; exports.NavigationMenu = NavigationMenu; exports.NavigationMenuList = NavigationMenuList; exports.NavigationMenuItem = NavigationMenuItem; exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle; exports.NavigationMenuTrigger = NavigationMenuTrigger; exports.NavigationMenuContent = NavigationMenuContent; exports.NavigationMenuPositioner = NavigationMenuPositioner; exports.NavigationMenuLink = NavigationMenuLink; exports.NavigationMenuIndicator = NavigationMenuIndicator; exports.Popover = Popover; exports.PopoverTrigger = PopoverTrigger; exports.PopoverContent = PopoverContent; exports.PopoverHeader = PopoverHeader; exports.PopoverTitle = PopoverTitle; exports.PopoverDescription = PopoverDescription; exports.Progress = Progress; exports.ProgressTrack = ProgressTrack; exports.ProgressIndicator = ProgressIndicator; exports.ProgressLabel = ProgressLabel; exports.ProgressValue = ProgressValue; exports.RadioGroup = RadioGroup; exports.RadioGroupItem = RadioGroupItem; exports.ResizablePanelGroup = ResizablePanelGroup; exports.ResizablePanel = ResizablePanel; exports.ResizableHandle = ResizableHandle; exports.ScrollArea = ScrollArea; exports.ScrollBar = ScrollBar; exports.Select = Select; exports.SelectGroup = SelectGroup; exports.SelectValue = SelectValue; exports.SelectTrigger = SelectTrigger; exports.SelectContent = SelectContent; exports.SelectLabel = SelectLabel; exports.SelectItem = SelectItem; exports.SelectSeparator = SelectSeparator; exports.SelectScrollUpButton = SelectScrollUpButton; exports.SelectScrollDownButton = SelectScrollDownButton; exports.Sheet = Sheet; exports.SheetTrigger = SheetTrigger; exports.SheetClose = SheetClose; exports.SheetContent = SheetContent; exports.SheetHeader = SheetHeader; exports.SheetFooter = SheetFooter; exports.SheetTitle = SheetTitle; exports.SheetDescription = SheetDescription; exports.Skeleton = Skeleton; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip2; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.useSidebar = useSidebar; exports.SidebarProvider = SidebarProvider; exports.Sidebar = Sidebar; exports.SidebarTrigger = SidebarTrigger; exports.SidebarRail = SidebarRail; exports.SidebarInset = SidebarInset; exports.SidebarInput = SidebarInput; exports.SidebarHeader = SidebarHeader; exports.SidebarFooter = SidebarFooter; exports.SidebarSeparator = SidebarSeparator; exports.SidebarContent = SidebarContent; exports.SidebarGroup = SidebarGroup; exports.SidebarGroupLabel = SidebarGroupLabel; exports.SidebarGroupAction = SidebarGroupAction; exports.SidebarGroupContent = SidebarGroupContent; exports.SidebarMenu = SidebarMenu; exports.SidebarMenuItem = SidebarMenuItem; exports.SidebarMenuButton = SidebarMenuButton; exports.SidebarMenuAction = SidebarMenuAction; exports.SidebarMenuBadge = SidebarMenuBadge; exports.SidebarMenuSkeleton = SidebarMenuSkeleton; exports.SidebarMenuSub = SidebarMenuSub; exports.SidebarMenuSubItem = SidebarMenuSubItem; exports.SidebarMenuSubButton = SidebarMenuSubButton; exports.Slider = Slider; exports.Toaster = Toaster; exports.spinnerVariants = spinnerVariants; exports.Spinner = Spinner; exports.Switch = Switch; exports.Table = Table; exports.TableHeader = TableHeader; exports.TableBody = TableBody; exports.TableFooter = TableFooter; exports.TableRow = TableRow; exports.TableHead = TableHead; exports.TableCell = TableCell; exports.TableCaption = TableCaption; exports.Tabs = Tabs; exports.tabsListVariants = tabsListVariants; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.toggleVariants = toggleVariants; exports.Toggle = Toggle; exports.KanbanRoot = KanbanRoot; exports.KanbanBoard = KanbanBoard; exports.KanbanColumn = KanbanColumn; exports.KanbanColumnHandle = KanbanColumnHandle; exports.KanbanItem = KanbanItem; exports.KanbanItemHandle = KanbanItemHandle; exports.KanbanOverlay = KanbanOverlay; exports.Link = Link; exports.MultiSelect = MultiSelect; exports.useDebounce2 = useDebounce; exports.MultipleSelector = MultipleSelector; exports.EntityAvatar = EntityAvatar; exports.errorToast = errorToast; exports.EditableAvatar = EditableAvatar; exports.TableCellAvatar = TableCellAvatar; exports.HeaderChildrenProvider = HeaderChildrenProvider; exports.useHeaderChildren = useHeaderChildren; exports.HeaderLeftContentProvider = HeaderLeftContentProvider; exports.useHeaderLeftContent = useHeaderLeftContent; exports.BreadcrumbNavigation = BreadcrumbNavigation; exports.ContentTitle = ContentTitle; exports.SharedProvider = SharedProvider; exports.useSharedContext = useSharedContext; exports.Header = Header; exports.ModeToggleSwitch = ModeToggleSwitch; exports.PageSection = PageSection; exports.recentPagesAtom = recentPagesAtom; exports.RecentPagesNavigator = RecentPagesNavigator; exports.PageContainer = PageContainer; exports.partitionTabs = partitionTabs; exports.ReactMarkdownContainer = ReactMarkdownContainer; exports.RoundPageContainerTitle = RoundPageContainerTitle; exports.RoundPageContainer = RoundPageContainer; exports.TabsContainer = TabsContainer; exports.AttributeElement = AttributeElement; exports.AllUsersListContainer = AllUsersListContainer; exports.UserContent = UserContent; exports.UserAvatar = UserAvatar; exports.UserAvatarList = UserAvatarList; exports.useUserSearch = useUserSearch; exports.useUserTableStructure = useUserTableStructure; exports.UserSearchPopover = UserSearchPopover; exports.UserIndexDetails = UserIndexDetails; exports.UserStanadaloneDetails = UserStanadaloneDetails; exports.UserContainer = UserContainer; exports.UserIndexContainer = UserIndexContainer; exports.UsersListContainer = UsersListContainer; exports.AdminUsersList = AdminUsersList; exports.CompanyUsersList = CompanyUsersList; exports.ContributorsList = ContributorsList; exports.RelevantUsersList = RelevantUsersList; exports.RoleUsersList = RoleUsersList; exports.UserListInAdd = UserListInAdd; exports.UsersList = UsersList; exports.UsersListByContentIds = UsersListByContentIds; exports.AllowedUsersDetails = AllowedUsersDetails; exports.ErrorDetails = ErrorDetails; exports.BlockNoteEditorMentionHoverCard = BlockNoteEditorMentionHoverCard; exports.mentionDataAttrs = mentionDataAttrs; exports.parseMentionElement = parseMentionElement; exports.createMentionInlineContentSpec = createMentionInlineContentSpec; exports.useMentionInsert = useMentionInsert; exports.BlockNoteEditorMentionSuggestionMenu = BlockNoteEditorMentionSuggestionMenu; exports.BlockNoteEditorContainer = BlockNoteEditorContainer; exports.BlockNoteViewerContainer = BlockNoteViewerContainer; exports.SectionHeader = SectionHeader; exports.MicroLabel = MicroLabel; exports.DetailField = DetailField; exports.FormFeatures = FormFeatures; exports.CommonAssociationTrigger = CommonAssociationTrigger; exports.CommonAssociationCommandDialog = CommonAssociationCommandDialog; exports.triggerAssociationToast = triggerAssociationToast; exports.CommonDeleter = CommonDeleter; exports.CommonEditorButtons = CommonEditorButtons; exports.CommonEditorDiscardDialog = CommonEditorDiscardDialog; exports.CommonEditorHeader = CommonEditorHeader; exports.CommonEditorTrigger = CommonEditorTrigger; exports.CommonAddTrigger = CommonAddTrigger; exports.CurrencyInput = CurrencyInput; exports.DatePickerPopover = DatePickerPopover; exports.DateRangeSelector = DateRangeSelector; exports.useEditorDialog = useEditorDialog; exports.EditorSheet = EditorSheet; exports.FormFieldWrapper = FormFieldWrapper; exports.EntityMultiSelector = EntityMultiSelector; exports.EntitySelector = EntitySelector; exports.useFileUpload = useFileUpload; exports.FileUploader = FileUploader; exports.FileUploaderContent = FileUploaderContent; exports.FileUploaderItem = FileUploaderItem; exports.FileInput = FileInput; exports.FormBlockNote = FormBlockNote; exports.FormCheckbox = FormCheckbox; exports.FormDate = FormDate; exports.FormDateTime = FormDateTime; exports.FormInput = FormInput; exports.FormBody = FormBody; exports.FormSection = FormSection; exports.FormRow = FormRow; exports.FormCol = FormCol; exports.PasswordInput = PasswordInput; exports.FormPassword = FormPassword; exports.FormPlaceAutocomplete = FormPlaceAutocomplete; exports.FormSelect = FormSelect; exports.FormSlider = FormSlider; exports.FormSwitch = FormSwitch; exports.FormTextarea = FormTextarea; exports.GdprConsentCheckbox = GdprConsentCheckbox; exports.PageContainerContentDetails = PageContainerContentDetails; exports.PageContentContainer = PageContentContainer; exports.cellComponent = cellComponent; exports.cellDate = cellDate; exports.cellDateTime = cellDateTime; exports.cellId = cellId; exports.cellLink = cellLink; exports.cellUrl = cellUrl; exports.ContentTableSearch = ContentTableSearch; exports.ContentListTable = ContentListTable; exports.ContentListGrid = ContentListGrid; exports.ItalianFiscalData_default = ItalianFiscalData_default; exports.ItalianFiscalDataDisplay = ItalianFiscalDataDisplay; exports.parseFiscalData = parseFiscalData; exports.FiscalDataDisplay = FiscalDataDisplay; exports.EntityHeroLayout = EntityHeroLayout; exports.EntityHero = EntityHero; exports.EntityHeroAvatar = EntityHeroAvatar; exports.EntityHeroMetaRow = EntityHeroMetaRow; exports.EntitySection = EntitySection; exports.GdprConsentSection = GdprConsentSection; exports.AuthContainer = AuthContainer; exports.BackupCodesDialog = BackupCodesDialog; exports.TotpInput = TotpInput; exports.DisableTwoFactorDialog = DisableTwoFactorDialog; exports.PasskeyList = PasskeyList; exports.PasskeySetupDialog = PasskeySetupDialog; exports.TotpAuthenticatorList = TotpAuthenticatorList; exports.TotpSetupDialog = TotpSetupDialog; exports.TwoFactorSettings = TwoFactorSettings; exports.SecurityContainer = SecurityContainer; exports.LandingComponent = LandingComponent; exports.AcceptInvitation = AcceptInvitation; exports.ActivateAccount = ActivateAccount; exports.Cookies = Cookies; exports.ForgotPassword = ForgotPassword; exports.Login = Login; exports.Logout = Logout; exports.RefreshUser = RefreshUser; exports.ResetPassword = ResetPassword; exports.PasskeyButton = PasskeyButton; exports.TwoFactorChallenge = TwoFactorChallenge; exports.CompanyContent = CompanyContent; exports.TokenStatusIndicator = TokenStatusIndicator; exports.CompanyDetails = CompanyDetails; exports.AdminCompanyContainer = AdminCompanyContainer; exports.CompanyContainer = CompanyContainer; exports.CompanyConfigurationEditor = CompanyConfigurationEditor; exports.CompanyDeleter = CompanyDeleter; exports.CompanyEditor = CompanyEditor; exports.CompaniesList = CompaniesList; exports.ContentsList = ContentsList; exports.ContentsListById = ContentsListById; exports.RelevantContentsList = RelevantContentsList; exports.HowToCommandViewer = HowToCommandViewer; exports.HowToCommand = HowToCommand; exports.HowToDeleter = HowToDeleter; exports.HowToMultiSelector = HowToMultiSelector; exports.HowToEditor = HowToEditor; exports.HowToProvider = HowToProvider; exports.useHowToContext = useHowToContext; exports.HowToContent = HowToContent; exports.HowToDetails = HowToDetails; exports.HowToContainer = HowToContainer; exports.HowToList = HowToList; exports.HowToListContainer = HowToListContainer; exports.HowToSelector = HowToSelector; exports.AssistantProvider = AssistantProvider; exports.useAssistantContext = useAssistantContext; exports.AssistantComposer = AssistantComposer; exports.AssistantEmptyState = AssistantEmptyState; exports.MessageSourcesPanel = MessageSourcesPanel; exports.MessageItem = MessageItem; exports.MessageList = MessageList; exports.AssistantThread = AssistantThread; exports.AssistantContainer = AssistantContainer; exports.NotificationErrorBoundary = NotificationErrorBoundary; exports.generateNotificationData = generateNotificationData; exports.NotificationToast = NotificationToast; exports.NotificationMenuItem = NotificationMenuItem; exports.NotificationContextProvider = NotificationContextProvider; exports.useNotificationContext = useNotificationContext; exports.NotificationsList = NotificationsList; exports.NotificationsListContainer = NotificationsListContainer; exports.NotificationModal = NotificationModal; exports.PushNotificationProvider = PushNotificationProvider; exports.OnboardingCard = OnboardingCard; exports.ReferralCodeCapture = ReferralCodeCapture; exports.ReferralWidget = ReferralWidget; exports.ReferralDialog = ReferralDialog; exports.RoleProvider = RoleProvider; exports.useRoleContext = useRoleContext; exports.RoleDetails = RoleDetails; exports.RoleContainer = RoleContainer; exports.FormRoles = FormRoles; exports.RemoveUserFromRole = RemoveUserFromRole; exports.UserRoleAdd = UserRoleAdd; exports.useRoleTableStructure = useRoleTableStructure; exports.RolesList = RolesList; exports.UserRolesList = UserRolesList; exports.OAuthRedirectUriInput = OAuthRedirectUriInput; exports.OAuthScopeSelector = OAuthScopeSelector; exports.OAuthClientSecretDisplay = OAuthClientSecretDisplay; exports.OAuthClientCard = OAuthClientCard; exports.OAuthClientList = OAuthClientList; exports.OAuthClientForm = OAuthClientForm; exports.OAuthClientDetail = OAuthClientDetail; exports.OAuthConsentHeader = OAuthConsentHeader; exports.OAuthScopeList = OAuthScopeList; exports.OAuthConsentActions = OAuthConsentActions; exports.useOAuthConsent = useOAuthConsent; exports.OAuthConsentScreen = OAuthConsentScreen; exports.WaitlistQuestionnaireRenderer = WaitlistQuestionnaireRenderer; exports.WaitlistForm = WaitlistForm; exports.WaitlistHeroSection = WaitlistHeroSection; exports.WaitlistSuccessState = WaitlistSuccessState; exports.WaitlistConfirmation = WaitlistConfirmation; exports.WaitlistList = WaitlistList; exports.RbacProvider = RbacProvider; exports.useRbacContext = useRbacContext; exports.RbacPermissionCell = RbacPermissionCell; exports.RbacPermissionPicker = RbacPermissionPicker; exports.RbacContainer = RbacContainer; exports.RbacByRoleContainer = RbacByRoleContainer; exports.AddUserToRole = AddUserToRole; exports.UserAvatarEditor = UserAvatarEditor; exports.UserDeleter = UserDeleter; exports.UserEditor = UserEditor; exports.UserMultiSelect = UserMultiSelect; exports.UserReactivator = UserReactivator; exports.UserResentInvitationEmail = UserResentInvitationEmail; exports.UserSelector = UserSelector; exports.UserProvider = UserProvider; exports.useUserContext = useUserContext; exports.CompanyProvider = CompanyProvider; exports.useCompanyContext = useCompanyContext; exports.DEFAULT_ONBOARDING_LABELS = DEFAULT_ONBOARDING_LABELS; exports.OnboardingProvider = OnboardingProvider; exports.useOnboarding = useOnboarding; exports.CommonProvider = CommonProvider; exports.useCommonContext = useCommonContext; exports.useNotificationSync = useNotificationSync; exports.usePageTracker = usePageTracker; exports.useSocket = useSocket; exports.useSubscriptionStatus = useSubscriptionStatus; exports.useContentTableStructure = useContentTableStructure; exports.useOAuthClients = useOAuthClients; exports.useOAuthClient = useOAuthClient;
23629
- //# sourceMappingURL=chunk-5SQFK35K.js.map
23649
+ //# sourceMappingURL=chunk-T7F2EVPR.js.map