@carlonicora/nextjs-jsonapi 1.47.2 → 1.48.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/{BlockNoteEditor-JQNYMLFY.js → BlockNoteEditor-4ZNFPFIR.js} +8 -8
  2. package/dist/{BlockNoteEditor-JQNYMLFY.js.map → BlockNoteEditor-4ZNFPFIR.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-CZXTJL3R.mjs → BlockNoteEditor-MY2WUSZY.mjs} +4 -4
  4. package/dist/{BlockNoteEditor-CZXTJL3R.mjs.map → BlockNoteEditor-MY2WUSZY.mjs.map} +1 -1
  5. package/dist/billing/index.js +299 -299
  6. package/dist/billing/index.mjs +1 -1
  7. package/dist/{chunk-3AYMUFM6.mjs → chunk-56YOTJYS.mjs} +2570 -2053
  8. package/dist/chunk-56YOTJYS.mjs.map +1 -0
  9. package/dist/{chunk-SUJ4GXAI.js → chunk-6RE6272L.js} +768 -251
  10. package/dist/chunk-6RE6272L.js.map +1 -0
  11. package/dist/client/index.js +2 -2
  12. package/dist/client/index.mjs +1 -1
  13. package/dist/components/index.d.mts +94 -2
  14. package/dist/components/index.d.ts +94 -2
  15. package/dist/components/index.js +6 -2
  16. package/dist/components/index.js.map +1 -1
  17. package/dist/components/index.mjs +5 -1
  18. package/dist/contexts/index.js +2 -2
  19. package/dist/contexts/index.mjs +1 -1
  20. package/dist/scripts/generate-web-module/templates/components/multi-selector.template.d.ts.map +1 -1
  21. package/dist/scripts/generate-web-module/templates/components/multi-selector.template.js +52 -54
  22. package/dist/scripts/generate-web-module/templates/components/multi-selector.template.js.map +1 -1
  23. package/package.json +1 -1
  24. package/scripts/generate-web-module/templates/components/multi-selector.template.ts +52 -54
  25. package/src/components/editors/BlockNoteEditor.tsx +2 -2
  26. package/src/features/company/hooks/useSubscriptionStatus.ts +12 -0
  27. package/src/features/user/components/forms/UserMultiSelect.tsx +82 -64
  28. package/src/shadcnui/custom/multi-select.tsx +86 -22
  29. package/src/shadcnui/custom/multiple-selector.tsx +608 -0
  30. package/src/shadcnui/index.ts +1 -0
  31. package/dist/chunk-3AYMUFM6.mjs.map +0 -1
  32. package/dist/chunk-SUJ4GXAI.js.map +0 -1
@@ -17,6 +17,7 @@
17
17
 
18
18
 
19
19
 
20
+
20
21
  var _chunkV63TFESUjs = require('./chunk-V63TFESU.js');
21
22
 
22
23
 
@@ -57,7 +58,7 @@ var _chunk3EPNHTMHjs = require('./chunk-3EPNHTMH.js');
57
58
  var _chunk7QVYU63Ejs = require('./chunk-7QVYU63E.js');
58
59
 
59
60
  // src/contexts/HeaderChildrenContext.tsx
60
- var _react = require('react'); var React3 = _interopRequireWildcard(_react); var React4 = _interopRequireWildcard(_react); var React5 = _interopRequireWildcard(_react); var React6 = _interopRequireWildcard(_react); var React7 = _interopRequireWildcard(_react); var React8 = _interopRequireWildcard(_react); var React9 = _interopRequireWildcard(_react); var React10 = _interopRequireWildcard(_react); var React11 = _interopRequireWildcard(_react); var React12 = _interopRequireWildcard(_react);
61
+ var _react = require('react'); var React3 = _interopRequireWildcard(_react); var React4 = _interopRequireWildcard(_react); var React5 = _interopRequireWildcard(_react); var React6 = _interopRequireWildcard(_react); var React7 = _interopRequireWildcard(_react); var React8 = _interopRequireWildcard(_react); var React9 = _interopRequireWildcard(_react); var React10 = _interopRequireWildcard(_react); var React11 = _interopRequireWildcard(_react); var React12 = _interopRequireWildcard(_react); var React13 = _interopRequireWildcard(_react);
61
62
  var _jsxruntime = require('react/jsx-runtime');
62
63
  var HeaderChildrenContext = _react.createContext.call(void 0, {
63
64
  headerChildren: null
@@ -6052,12 +6053,21 @@ var MultiSelect = React11.forwardRef(
6052
6053
  loading = false,
6053
6054
  loadingText = "Searching...",
6054
6055
  emptyText = "No results found.",
6056
+ hideSelectAll = false,
6057
+ isOptionSelected,
6055
6058
  ...props
6056
6059
  }, _ref) => {
6057
6060
  const [internalSelectedValues, setInternalSelectedValues] = React11.useState(defaultValue);
6058
6061
  const selectedValues = value !== void 0 ? value : internalSelectedValues;
6059
6062
  const [isPopoverOpen, setIsPopoverOpen] = React11.useState(false);
6060
6063
  const [isAnimating, setIsAnimating] = React11.useState(false);
6064
+ const triggerRef = React11.useRef(null);
6065
+ const [triggerWidth, setTriggerWidth] = React11.useState(0);
6066
+ React11.useEffect(() => {
6067
+ if (isPopoverOpen && triggerRef.current) {
6068
+ setTriggerWidth(triggerRef.current.offsetWidth);
6069
+ }
6070
+ }, [isPopoverOpen]);
6061
6071
  const handleInputKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (event) => {
6062
6072
  if (event.key === "Enter") {
6063
6073
  setIsPopoverOpen(true);
@@ -6083,7 +6093,11 @@ var MultiSelect = React11.forwardRef(
6083
6093
  }
6084
6094
  onValueChange([]);
6085
6095
  }, "handleClear");
6086
- const handleTogglePopover = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
6096
+ const handleTogglePopover = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (event) => {
6097
+ const target = event.target;
6098
+ if (target.closest("[data-remove-button]")) {
6099
+ return;
6100
+ }
6087
6101
  setIsPopoverOpen((prev) => !prev);
6088
6102
  }, "handleTogglePopover");
6089
6103
  const clearExtraOptions = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
@@ -6110,6 +6124,7 @@ var MultiSelect = React11.forwardRef(
6110
6124
  PopoverTrigger,
6111
6125
  {
6112
6126
  ...props,
6127
+ ref: triggerRef,
6113
6128
  onClick: handleTogglePopover,
6114
6129
  className: _chunkULHMVHDSjs.cn.call(void 0,
6115
6130
  "flex h-auto min-h-10 w-full items-center justify-between rounded-md border bg-inherit p-1 hover:bg-inherit [&_svg]:pointer-events-auto",
@@ -6127,13 +6142,19 @@ var MultiSelect = React11.forwardRef(
6127
6142
  style: { animationDuration: `${animation}s` },
6128
6143
  children: [
6129
6144
  IconComponent && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, IconComponent, { className: "mr-2 h-4 w-4" }),
6130
- _optionalChain([option, 'optionalAccess', _133 => _133.label]),
6145
+ _nullishCoalesce(_optionalChain([option, 'optionalAccess', _133 => _133.selectedLabel]), () => ( _optionalChain([option, 'optionalAccess', _134 => _134.label]))),
6131
6146
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6132
6147
  _lucidereact.XCircle,
6133
6148
  {
6149
+ "data-remove-button": true,
6134
6150
  className: "ml-2 h-4 w-4 cursor-pointer",
6151
+ onPointerDown: (event) => {
6152
+ event.stopPropagation();
6153
+ event.preventDefault();
6154
+ },
6135
6155
  onClick: (event) => {
6136
6156
  event.stopPropagation();
6157
+ event.preventDefault();
6137
6158
  toggleOption(value2);
6138
6159
  }
6139
6160
  }
@@ -6157,9 +6178,15 @@ var MultiSelect = React11.forwardRef(
6157
6178
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6158
6179
  _lucidereact.XCircle,
6159
6180
  {
6181
+ "data-remove-button": true,
6160
6182
  className: "ml-2 h-4 w-4 cursor-pointer",
6183
+ onPointerDown: (event) => {
6184
+ event.stopPropagation();
6185
+ event.preventDefault();
6186
+ },
6161
6187
  onClick: (event) => {
6162
6188
  event.stopPropagation();
6189
+ event.preventDefault();
6163
6190
  clearExtraOptions();
6164
6191
  }
6165
6192
  }
@@ -6172,9 +6199,15 @@ var MultiSelect = React11.forwardRef(
6172
6199
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6173
6200
  _lucidereact.XIcon,
6174
6201
  {
6202
+ "data-remove-button": true,
6175
6203
  className: "text-muted-foreground mx-2 h-4 cursor-pointer",
6204
+ onPointerDown: (event) => {
6205
+ event.stopPropagation();
6206
+ event.preventDefault();
6207
+ },
6176
6208
  onClick: (event) => {
6177
6209
  event.stopPropagation();
6210
+ event.preventDefault();
6178
6211
  handleClear();
6179
6212
  }
6180
6213
  }
@@ -6188,84 +6221,92 @@ var MultiSelect = React11.forwardRef(
6188
6221
  ] })
6189
6222
  }
6190
6223
  ),
6191
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverContent, { className: "w-auto p-0", align: "start", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Command, { children: [
6192
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6193
- CommandInput,
6194
- {
6195
- autoFocus: true,
6196
- placeholder: "Search...",
6197
- onKeyDown: handleInputKeyDown,
6198
- onValueChange: onSearchChange
6199
- }
6200
- ),
6201
- loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center py-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "text-muted-foreground h-4 w-4 animate-spin" }) }),
6202
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CommandList, { children: [
6203
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandEmpty, { children: loading ? loadingText : emptyText }),
6204
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CommandGroup, { children: [
6205
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
6206
- CommandItem,
6207
- {
6208
- onSelect: toggleAll,
6209
- className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
6210
- children: [
6211
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6212
- "div",
6213
- {
6214
- className: _chunkULHMVHDSjs.cn.call(void 0,
6215
- "border-primary mr-2 flex h-4 w-4 items-center justify-center rounded-sm border",
6216
- selectedValues.length === options.length ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"
6217
- ),
6218
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CheckIcon, { className: "h-4 w-4" })
6219
- }
6220
- ),
6221
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "(Select All)" })
6222
- ]
6223
- },
6224
- "all"
6225
- ),
6226
- options.map((option) => {
6227
- const isSelected = selectedValues.includes(option.value);
6228
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
6229
- CommandItem,
6230
- {
6231
- onSelect: () => toggleOption(option.value),
6232
- className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
6233
- children: [
6234
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6235
- "div",
6236
- {
6237
- className: _chunkULHMVHDSjs.cn.call(void 0,
6238
- "border-primary mr-2 flex h-4 w-4 items-center justify-center rounded-sm border",
6239
- isSelected ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"
6240
- ),
6241
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CheckIcon, { className: "h-4 w-4" })
6242
- }
6243
- ),
6244
- option.icon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, option.icon, { className: "text-muted-foreground mr-2 h-4 w-4" }),
6245
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: option.label })
6246
- ]
6247
- },
6248
- option.value
6249
- );
6250
- })
6251
- ] }),
6252
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandSeparator, {}),
6253
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandGroup, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
6254
- selectedValues.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
6255
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandItem, { onSelect: handleClear, className: "flex-1 cursor-pointer justify-center", children: "Clear" }),
6256
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, { orientation: "vertical", className: "flex h-full min-h-6" })
6257
- ] }),
6224
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6225
+ PopoverContent,
6226
+ {
6227
+ className: "w-auto p-0",
6228
+ style: { minWidth: triggerWidth > 0 ? triggerWidth : void 0 },
6229
+ align: "start",
6230
+ children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Command, { children: [
6258
6231
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6259
- CommandItem,
6232
+ CommandInput,
6260
6233
  {
6261
- onSelect: () => setIsPopoverOpen(false),
6262
- className: "max-w-full flex-1 cursor-pointer justify-center hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
6263
- children: "Close"
6234
+ autoFocus: true,
6235
+ placeholder: "Search...",
6236
+ onKeyDown: handleInputKeyDown,
6237
+ onValueChange: onSearchChange
6264
6238
  }
6265
- )
6266
- ] }) })
6267
- ] })
6268
- ] }) }),
6239
+ ),
6240
+ loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center py-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "text-muted-foreground h-4 w-4 animate-spin" }) }),
6241
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CommandList, { children: [
6242
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandEmpty, { children: loading ? loadingText : emptyText }),
6243
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, CommandGroup, { children: [
6244
+ !hideSelectAll && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
6245
+ CommandItem,
6246
+ {
6247
+ onSelect: toggleAll,
6248
+ className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
6249
+ children: [
6250
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6251
+ "div",
6252
+ {
6253
+ className: _chunkULHMVHDSjs.cn.call(void 0,
6254
+ "border-primary mr-2 flex h-4 w-4 items-center justify-center rounded-sm border",
6255
+ selectedValues.length === options.length ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"
6256
+ ),
6257
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CheckIcon, { className: "h-4 w-4" })
6258
+ }
6259
+ ),
6260
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "(Select All)" })
6261
+ ]
6262
+ },
6263
+ "all"
6264
+ ),
6265
+ options.map((option) => {
6266
+ const isSelected = isOptionSelected ? isOptionSelected(option.value, selectedValues) : selectedValues.includes(option.value);
6267
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
6268
+ CommandItem,
6269
+ {
6270
+ onSelect: () => toggleOption(option.value),
6271
+ className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
6272
+ children: [
6273
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6274
+ "div",
6275
+ {
6276
+ className: _chunkULHMVHDSjs.cn.call(void 0,
6277
+ "border-primary mr-2 flex h-4 w-4 items-center justify-center rounded-sm border",
6278
+ isSelected ? "bg-primary text-primary-foreground" : "opacity-50 [&_svg]:invisible"
6279
+ ),
6280
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CheckIcon, { className: "h-4 w-4" })
6281
+ }
6282
+ ),
6283
+ option.icon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, option.icon, { className: _nullishCoalesce(option.iconClassName, () => ( "text-muted-foreground mr-2 h-4 w-4")) }),
6284
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: option.label })
6285
+ ]
6286
+ },
6287
+ option.value
6288
+ );
6289
+ })
6290
+ ] }),
6291
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandSeparator, {}),
6292
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandGroup, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-between", children: [
6293
+ selectedValues.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
6294
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandItem, { onSelect: handleClear, className: "flex-1 cursor-pointer justify-center", children: "Clear" }),
6295
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, { orientation: "vertical", className: "flex h-full min-h-6" })
6296
+ ] }),
6297
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6298
+ CommandItem,
6299
+ {
6300
+ onSelect: () => setIsPopoverOpen(false),
6301
+ className: "max-w-full flex-1 cursor-pointer justify-center hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
6302
+ children: "Close"
6303
+ }
6304
+ )
6305
+ ] }) })
6306
+ ] })
6307
+ ] })
6308
+ }
6309
+ ),
6269
6310
  animation > 0 && selectedValues.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6270
6311
  _lucidereact.WandSparkles,
6271
6312
  {
@@ -6281,6 +6322,460 @@ var MultiSelect = React11.forwardRef(
6281
6322
  );
6282
6323
  MultiSelect.displayName = "MultiSelect";
6283
6324
 
6325
+ // src/shadcnui/custom/multiple-selector.tsx
6326
+
6327
+
6328
+
6329
+
6330
+
6331
+ function useDebounce2(value, delay) {
6332
+ const [debouncedValue, setDebouncedValue] = React12.useState(value);
6333
+ _react.useEffect.call(void 0, () => {
6334
+ const timer = setTimeout(() => setDebouncedValue(value), delay || 500);
6335
+ return () => {
6336
+ clearTimeout(timer);
6337
+ };
6338
+ }, [value, delay]);
6339
+ return debouncedValue;
6340
+ }
6341
+ _chunk7QVYU63Ejs.__name.call(void 0, useDebounce2, "useDebounce");
6342
+ function transToGroupOption(options, groupBy) {
6343
+ if (options.length === 0) {
6344
+ return {};
6345
+ }
6346
+ if (!groupBy) {
6347
+ return {
6348
+ "": options
6349
+ };
6350
+ }
6351
+ const groupOption = {};
6352
+ options.forEach((option) => {
6353
+ const key = option[groupBy] || "";
6354
+ if (!groupOption[key]) {
6355
+ groupOption[key] = [];
6356
+ }
6357
+ groupOption[key].push(option);
6358
+ });
6359
+ return groupOption;
6360
+ }
6361
+ _chunk7QVYU63Ejs.__name.call(void 0, transToGroupOption, "transToGroupOption");
6362
+ function removePickedOption(groupOption, picked) {
6363
+ const cloneOption = JSON.parse(JSON.stringify(groupOption));
6364
+ for (const [key, value] of Object.entries(cloneOption)) {
6365
+ cloneOption[key] = value.filter((val) => !picked.find((p) => p.value === val.value));
6366
+ }
6367
+ return cloneOption;
6368
+ }
6369
+ _chunk7QVYU63Ejs.__name.call(void 0, removePickedOption, "removePickedOption");
6370
+ function isOptionsExist(groupOption, targetOption) {
6371
+ for (const [, value] of Object.entries(groupOption)) {
6372
+ if (value.some((option) => targetOption.find((p) => p.value === option.value))) {
6373
+ return true;
6374
+ }
6375
+ }
6376
+ return false;
6377
+ }
6378
+ _chunk7QVYU63Ejs.__name.call(void 0, isOptionsExist, "isOptionsExist");
6379
+ var CommandEmpty2 = _react.forwardRef.call(void 0,
6380
+ ({ className, ...props }, forwardedRef) => {
6381
+ const render = _cmdk.useCommandState.call(void 0, (state) => state.filtered.count === 0);
6382
+ if (!render) return null;
6383
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6384
+ "div",
6385
+ {
6386
+ ref: forwardedRef,
6387
+ className: _chunkULHMVHDSjs.cn.call(void 0, "py-6 text-center text-sm", className),
6388
+ "cmdk-empty": "",
6389
+ role: "presentation",
6390
+ ...props
6391
+ }
6392
+ );
6393
+ }
6394
+ );
6395
+ CommandEmpty2.displayName = "CommandEmpty";
6396
+ var MultipleSelector = React12.forwardRef(
6397
+ ({
6398
+ value,
6399
+ onChange,
6400
+ placeholder,
6401
+ defaultOptions: arrayDefaultOptions = [],
6402
+ options: arrayOptions,
6403
+ delay,
6404
+ onSearch,
6405
+ onSearchSync,
6406
+ loadingIndicator,
6407
+ emptyIndicator,
6408
+ maxSelected = Number.MAX_SAFE_INTEGER,
6409
+ onMaxSelected,
6410
+ hidePlaceholderWhenSelected,
6411
+ disabled,
6412
+ groupBy,
6413
+ className,
6414
+ badgeClassName,
6415
+ selectFirstItem = true,
6416
+ creatable = false,
6417
+ triggerSearchOnFocus = false,
6418
+ commandProps,
6419
+ inputProps,
6420
+ hideClearAllButton = false,
6421
+ renderOption,
6422
+ maxDisplayCount
6423
+ }, ref) => {
6424
+ const inputRef = React12.useRef(null);
6425
+ const [open, setOpen] = React12.useState(false);
6426
+ const [onScrollbar, setOnScrollbar] = React12.useState(false);
6427
+ const [isLoading, setIsLoading] = React12.useState(false);
6428
+ const dropdownRef = React12.useRef(null);
6429
+ const [selected, setSelected] = React12.useState(value || []);
6430
+ const [options, setOptions] = React12.useState(transToGroupOption(arrayDefaultOptions, groupBy));
6431
+ const [inputValue, setInputValue] = React12.useState("");
6432
+ const debouncedSearchTerm = useDebounce2(inputValue, delay || 500);
6433
+ React12.useImperativeHandle(
6434
+ ref,
6435
+ () => ({
6436
+ selectedValue: [...selected],
6437
+ input: inputRef.current,
6438
+ focus: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => _optionalChain([inputRef, 'optionalAccess', _135 => _135.current, 'optionalAccess', _136 => _136.focus, 'call', _137 => _137()]), "focus"),
6439
+ reset: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => setSelected([]), "reset")
6440
+ }),
6441
+ [selected]
6442
+ );
6443
+ const handleClickOutside = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (event) => {
6444
+ if (dropdownRef.current && !dropdownRef.current.contains(event.target) && inputRef.current && !inputRef.current.contains(event.target)) {
6445
+ setOpen(false);
6446
+ inputRef.current.blur();
6447
+ }
6448
+ }, "handleClickOutside");
6449
+ const handleUnselect = React12.useCallback(
6450
+ (option) => {
6451
+ const newOptions = selected.filter((s) => s.value !== option.value);
6452
+ setSelected(newOptions);
6453
+ _optionalChain([onChange, 'optionalCall', _138 => _138(newOptions)]);
6454
+ },
6455
+ [onChange, selected]
6456
+ );
6457
+ const handleKeyDown = React12.useCallback(
6458
+ (e) => {
6459
+ const input = inputRef.current;
6460
+ if (input) {
6461
+ if (e.key === "Delete" || e.key === "Backspace") {
6462
+ if (input.value === "" && selected.length > 0) {
6463
+ const lastSelectOption = selected[selected.length - 1];
6464
+ if (lastSelectOption && !lastSelectOption.fixed) {
6465
+ handleUnselect(lastSelectOption);
6466
+ }
6467
+ }
6468
+ }
6469
+ if (e.key === "Escape") {
6470
+ input.blur();
6471
+ }
6472
+ }
6473
+ },
6474
+ [handleUnselect, selected]
6475
+ );
6476
+ _react.useEffect.call(void 0, () => {
6477
+ if (open) {
6478
+ document.addEventListener("mousedown", handleClickOutside);
6479
+ document.addEventListener("touchend", handleClickOutside);
6480
+ } else {
6481
+ document.removeEventListener("mousedown", handleClickOutside);
6482
+ document.removeEventListener("touchend", handleClickOutside);
6483
+ }
6484
+ return () => {
6485
+ document.removeEventListener("mousedown", handleClickOutside);
6486
+ document.removeEventListener("touchend", handleClickOutside);
6487
+ };
6488
+ }, [open]);
6489
+ _react.useEffect.call(void 0, () => {
6490
+ if (value) {
6491
+ setSelected(value);
6492
+ }
6493
+ }, [value]);
6494
+ _react.useEffect.call(void 0, () => {
6495
+ if (!arrayOptions || onSearch) {
6496
+ return;
6497
+ }
6498
+ const newOption = transToGroupOption(arrayOptions || [], groupBy);
6499
+ if (JSON.stringify(newOption) !== JSON.stringify(options)) {
6500
+ setOptions(newOption);
6501
+ }
6502
+ }, [arrayDefaultOptions, arrayOptions, groupBy, onSearch, options]);
6503
+ _react.useEffect.call(void 0, () => {
6504
+ const doSearchSync = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
6505
+ const res = _optionalChain([onSearchSync, 'optionalCall', _139 => _139(debouncedSearchTerm)]);
6506
+ setOptions(transToGroupOption(res || [], groupBy));
6507
+ }, "doSearchSync");
6508
+ const exec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
6509
+ if (!onSearchSync || !open) return;
6510
+ if (triggerSearchOnFocus) {
6511
+ doSearchSync();
6512
+ }
6513
+ doSearchSync();
6514
+ }, "exec");
6515
+ void exec();
6516
+ }, [debouncedSearchTerm, groupBy, open, triggerSearchOnFocus, onSearchSync]);
6517
+ _react.useEffect.call(void 0, () => {
6518
+ const doSearch = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
6519
+ setIsLoading(true);
6520
+ const res = await _optionalChain([onSearch, 'optionalCall', _140 => _140(debouncedSearchTerm)]);
6521
+ setOptions(transToGroupOption(res || [], groupBy));
6522
+ setIsLoading(false);
6523
+ }, "doSearch");
6524
+ const exec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
6525
+ if (!onSearch || !open) return;
6526
+ if (triggerSearchOnFocus) {
6527
+ await doSearch();
6528
+ }
6529
+ if (debouncedSearchTerm) {
6530
+ await doSearch();
6531
+ }
6532
+ }, "exec");
6533
+ void exec();
6534
+ }, [debouncedSearchTerm, groupBy, open, triggerSearchOnFocus, onSearch]);
6535
+ const CreatableItem = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
6536
+ if (!creatable) return void 0;
6537
+ if (isOptionsExist(options, [{ value: inputValue, label: inputValue }]) || selected.find((s) => s.value === inputValue)) {
6538
+ return void 0;
6539
+ }
6540
+ const Item = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6541
+ CommandItem,
6542
+ {
6543
+ value: inputValue,
6544
+ className: "cursor-pointer",
6545
+ onMouseDown: (e) => {
6546
+ e.preventDefault();
6547
+ e.stopPropagation();
6548
+ },
6549
+ onSelect: (value2) => {
6550
+ if (selected.length >= maxSelected) {
6551
+ _optionalChain([onMaxSelected, 'optionalCall', _141 => _141(selected.length)]);
6552
+ return;
6553
+ }
6554
+ setInputValue("");
6555
+ const newOptions = [...selected, { value: value2, label: value2 }];
6556
+ setSelected(newOptions);
6557
+ _optionalChain([onChange, 'optionalCall', _142 => _142(newOptions)]);
6558
+ },
6559
+ children: `Create "${inputValue}"`
6560
+ }
6561
+ );
6562
+ if (!onSearch && inputValue.length > 0) {
6563
+ return Item;
6564
+ }
6565
+ if (onSearch && debouncedSearchTerm.length > 0 && !isLoading) {
6566
+ return Item;
6567
+ }
6568
+ return void 0;
6569
+ }, "CreatableItem");
6570
+ const EmptyItem = React12.useCallback(() => {
6571
+ if (!emptyIndicator) return void 0;
6572
+ if (onSearch && !creatable && Object.keys(options).length === 0) {
6573
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandItem, { value: "-", disabled: true, children: emptyIndicator });
6574
+ }
6575
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandEmpty2, { children: emptyIndicator });
6576
+ }, [creatable, emptyIndicator, onSearch, options]);
6577
+ const selectables = React12.useMemo(() => removePickedOption(options, selected), [options, selected]);
6578
+ const commandFilter = React12.useCallback(() => {
6579
+ if (_optionalChain([commandProps, 'optionalAccess', _143 => _143.filter])) {
6580
+ return commandProps.filter;
6581
+ }
6582
+ if (creatable) {
6583
+ return (value2, search) => {
6584
+ return value2.toLowerCase().includes(search.toLowerCase()) ? 1 : -1;
6585
+ };
6586
+ }
6587
+ return void 0;
6588
+ }, [creatable, _optionalChain([commandProps, 'optionalAccess', _144 => _144.filter])]);
6589
+ const displayedBadges = maxDisplayCount ? selected.slice(0, maxDisplayCount) : selected;
6590
+ const hiddenCount = maxDisplayCount ? Math.max(0, selected.length - maxDisplayCount) : 0;
6591
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
6592
+ Command,
6593
+ {
6594
+ ref: dropdownRef,
6595
+ ...commandProps,
6596
+ onKeyDown: (e) => {
6597
+ handleKeyDown(e);
6598
+ _optionalChain([commandProps, 'optionalAccess', _145 => _145.onKeyDown, 'optionalCall', _146 => _146(e)]);
6599
+ },
6600
+ className: _chunkULHMVHDSjs.cn.call(void 0, "h-auto overflow-visible bg-transparent!", _optionalChain([commandProps, 'optionalAccess', _147 => _147.className])),
6601
+ shouldFilter: _optionalChain([commandProps, 'optionalAccess', _148 => _148.shouldFilter]) !== void 0 ? commandProps.shouldFilter : !onSearch,
6602
+ filter: commandFilter(),
6603
+ children: [
6604
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
6605
+ "div",
6606
+ {
6607
+ className: _chunkULHMVHDSjs.cn.call(void 0,
6608
+ "flex min-h-10 items-start justify-between rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 md:text-sm",
6609
+ {
6610
+ "cursor-text": !disabled && selected.length !== 0
6611
+ },
6612
+ className
6613
+ ),
6614
+ onClick: () => {
6615
+ if (disabled) return;
6616
+ _optionalChain([inputRef, 'optionalAccess', _149 => _149.current, 'optionalAccess', _150 => _150.focus, 'call', _151 => _151()]);
6617
+ },
6618
+ children: [
6619
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative flex flex-1 flex-wrap gap-1", children: [
6620
+ displayedBadges.map((option) => {
6621
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
6622
+ Badge,
6623
+ {
6624
+ variant: "secondary",
6625
+ className: _chunkULHMVHDSjs.cn.call(void 0,
6626
+ "data-[disabled]:bg-muted-foreground data-[disabled]:text-muted data-[disabled]:hover:bg-muted-foreground",
6627
+ "data-[fixed]:bg-muted-foreground data-[fixed]:text-muted data-[fixed]:hover:bg-muted-foreground",
6628
+ badgeClassName
6629
+ ),
6630
+ "data-fixed": option.fixed,
6631
+ "data-disabled": disabled || void 0,
6632
+ children: [
6633
+ _nullishCoalesce(option.selectedLabel, () => ( option.label)),
6634
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6635
+ "button",
6636
+ {
6637
+ type: "button",
6638
+ className: _chunkULHMVHDSjs.cn.call(void 0,
6639
+ "ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",
6640
+ (disabled || option.fixed) && "hidden"
6641
+ ),
6642
+ onKeyDown: (e) => {
6643
+ if (e.key === "Enter") {
6644
+ handleUnselect(option);
6645
+ }
6646
+ },
6647
+ onMouseDown: (e) => {
6648
+ e.preventDefault();
6649
+ e.stopPropagation();
6650
+ },
6651
+ onClick: () => handleUnselect(option),
6652
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.X, { className: "h-3 w-3 text-muted-foreground hover:text-foreground" })
6653
+ }
6654
+ )
6655
+ ]
6656
+ },
6657
+ option.value
6658
+ );
6659
+ }),
6660
+ hiddenCount > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Badge, { className: _chunkULHMVHDSjs.cn.call(void 0, "bg-transparent text-foreground hover:bg-transparent", badgeClassName), children: `+${hiddenCount} more` }),
6661
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6662
+ _cmdk.Command.Input,
6663
+ {
6664
+ ...inputProps,
6665
+ ref: inputRef,
6666
+ value: inputValue,
6667
+ disabled,
6668
+ onValueChange: (value2) => {
6669
+ setInputValue(value2);
6670
+ _optionalChain([inputProps, 'optionalAccess', _152 => _152.onValueChange, 'optionalCall', _153 => _153(value2)]);
6671
+ },
6672
+ onBlur: (event) => {
6673
+ if (!onScrollbar) {
6674
+ setOpen(false);
6675
+ }
6676
+ _optionalChain([inputProps, 'optionalAccess', _154 => _154.onBlur, 'optionalCall', _155 => _155(event)]);
6677
+ },
6678
+ onFocus: (event) => {
6679
+ setOpen(true);
6680
+ _optionalChain([inputProps, 'optionalAccess', _156 => _156.onFocus, 'optionalCall', _157 => _157(event)]);
6681
+ },
6682
+ placeholder: hidePlaceholderWhenSelected && selected.length !== 0 ? "" : placeholder,
6683
+ className: _chunkULHMVHDSjs.cn.call(void 0,
6684
+ "flex-1 self-baseline bg-transparent outline-none placeholder:text-muted-foreground text-foreground caret-foreground",
6685
+ {
6686
+ "w-full": hidePlaceholderWhenSelected,
6687
+ "ml-1": selected.length !== 0
6688
+ },
6689
+ _optionalChain([inputProps, 'optionalAccess', _158 => _158.className])
6690
+ )
6691
+ }
6692
+ )
6693
+ ] }),
6694
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-1", children: [
6695
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6696
+ "button",
6697
+ {
6698
+ type: "button",
6699
+ onClick: () => {
6700
+ setSelected(selected.filter((s) => s.fixed));
6701
+ _optionalChain([onChange, 'optionalCall', _159 => _159(selected.filter((s) => s.fixed))]);
6702
+ },
6703
+ className: _chunkULHMVHDSjs.cn.call(void 0,
6704
+ "size-5",
6705
+ (hideClearAllButton || disabled || selected.length < 1 || selected.filter((s) => s.fixed).length === selected.length) && "hidden"
6706
+ ),
6707
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.X, {})
6708
+ }
6709
+ ),
6710
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: _chunkULHMVHDSjs.cn.call(void 0, "size-5 text-muted-foreground/50", selected.length >= 1 && "hidden") })
6711
+ ] })
6712
+ ]
6713
+ }
6714
+ ),
6715
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "relative", children: open && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6716
+ CommandList,
6717
+ {
6718
+ className: "absolute top-1 z-10 w-full rounded-md border bg-background text-foreground shadow-md outline-none animate-in",
6719
+ onMouseLeave: () => {
6720
+ setOnScrollbar(false);
6721
+ },
6722
+ onMouseEnter: () => {
6723
+ setOnScrollbar(true);
6724
+ },
6725
+ onMouseUp: () => {
6726
+ _optionalChain([inputRef, 'optionalAccess', _160 => _160.current, 'optionalAccess', _161 => _161.focus, 'call', _162 => _162()]);
6727
+ },
6728
+ children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: loadingIndicator }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
6729
+ EmptyItem(),
6730
+ CreatableItem(),
6731
+ !selectFirstItem && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommandItem, { value: "-", className: "hidden" }),
6732
+ Object.entries(selectables).map(([key, dropdowns]) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6733
+ CommandGroup,
6734
+ {
6735
+ heading: key,
6736
+ className: "h-full overflow-auto [&_[cmdk-group-heading]]:border-b [&_[cmdk-group-heading]]:border-border/50 [&_[cmdk-group-heading]]:mb-1",
6737
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: dropdowns.map((option) => {
6738
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6739
+ CommandItem,
6740
+ {
6741
+ value: option.label,
6742
+ disabled: option.disable,
6743
+ onMouseDown: (e) => {
6744
+ e.preventDefault();
6745
+ e.stopPropagation();
6746
+ },
6747
+ onSelect: () => {
6748
+ if (selected.length >= maxSelected) {
6749
+ _optionalChain([onMaxSelected, 'optionalCall', _163 => _163(selected.length)]);
6750
+ return;
6751
+ }
6752
+ setInputValue("");
6753
+ const newOptions = [...selected, option];
6754
+ setSelected(newOptions);
6755
+ _optionalChain([onChange, 'optionalCall', _164 => _164(newOptions)]);
6756
+ },
6757
+ className: _chunkULHMVHDSjs.cn.call(void 0,
6758
+ "cursor-pointer bg-transparent hover:bg-accent data-selected:bg-transparent data-selected:hover:bg-accent",
6759
+ option.disable && "cursor-default text-muted-foreground"
6760
+ ),
6761
+ children: renderOption ? renderOption(option) : option.label
6762
+ },
6763
+ option.value
6764
+ );
6765
+ }) })
6766
+ },
6767
+ key
6768
+ ))
6769
+ ] })
6770
+ }
6771
+ ) })
6772
+ ]
6773
+ }
6774
+ );
6775
+ }
6776
+ );
6777
+ MultipleSelector.displayName = "MultipleSelector";
6778
+
6284
6779
  // src/features/user/components/forms/UserAvatarEditor.tsx
6285
6780
 
6286
6781
  function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
@@ -6308,10 +6803,10 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
6308
6803
  onValueChange: setFiles,
6309
6804
  dropzoneOptions: dropzone2,
6310
6805
  className: "h-40 w-40 rounded-full p-0",
6311
- 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', _134 => _134.avatar])) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6806
+ 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', _165 => _165.avatar])) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6312
6807
  _image2.default,
6313
6808
  {
6314
- src: file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess', _135 => _135.avatar]) || "",
6809
+ src: file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess', _166 => _166.avatar]) || "",
6315
6810
  alt: t(`common.avatar`),
6316
6811
  width: 200,
6317
6812
  height: 200
@@ -6319,7 +6814,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
6319
6814
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, { className: "my-4 h-8 w-8" }) })
6320
6815
  }
6321
6816
  ),
6322
- !resetImage && (file || _optionalChain([user, 'optionalAccess', _136 => _136.avatar])) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6817
+ !resetImage && (file || _optionalChain([user, 'optionalAccess', _167 => _167.avatar])) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6323
6818
  Button,
6324
6819
  {
6325
6820
  className: "",
@@ -6347,7 +6842,7 @@ function UserDeleterInternal({ user, onDeleted, companyId }) {
6347
6842
  const router = _chunkV63TFESUjs.useI18nRouter.call(void 0, );
6348
6843
  const _t = _nextintl.useTranslations.call(void 0, );
6349
6844
  let cId;
6350
- if (_optionalChain([currentUser, 'optionalAccess', _137 => _137.roles, 'access', _138 => _138.find, 'call', _139 => _139((role) => role.id === _chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator)]) && companyId) {
6845
+ if (_optionalChain([currentUser, 'optionalAccess', _168 => _168.roles, 'access', _169 => _169.find, 'call', _170 => _170((role) => role.id === _chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator)]) && companyId) {
6351
6846
  cId = companyId;
6352
6847
  } else {
6353
6848
  if (!company) return;
@@ -6415,16 +6910,16 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
6415
6910
  const form = _reacthookform.useForm.call(void 0, {
6416
6911
  resolver: _zod.zodResolver.call(void 0, formSchema),
6417
6912
  defaultValues: {
6418
- id: _optionalChain([user, 'optionalAccess', _140 => _140.id]) || _uuid.v4.call(void 0, ),
6419
- name: _optionalChain([user, 'optionalAccess', _141 => _141.name]) || "",
6420
- title: _optionalChain([user, 'optionalAccess', _142 => _142.title]) || "",
6421
- bio: _optionalChain([user, 'optionalAccess', _143 => _143.bio]) || "",
6422
- email: _optionalChain([user, 'optionalAccess', _144 => _144.email]) || "",
6423
- phone: _optionalChain([user, 'optionalAccess', _145 => _145.phone]) || "",
6913
+ id: _optionalChain([user, 'optionalAccess', _171 => _171.id]) || _uuid.v4.call(void 0, ),
6914
+ name: _optionalChain([user, 'optionalAccess', _172 => _172.name]) || "",
6915
+ title: _optionalChain([user, 'optionalAccess', _173 => _173.title]) || "",
6916
+ bio: _optionalChain([user, 'optionalAccess', _174 => _174.bio]) || "",
6917
+ email: _optionalChain([user, 'optionalAccess', _175 => _175.email]) || "",
6918
+ phone: _optionalChain([user, 'optionalAccess', _176 => _176.phone]) || "",
6424
6919
  password: "",
6425
- roleIds: _optionalChain([user, 'optionalAccess', _146 => _146.roles, 'access', _147 => _147.map, 'call', _148 => _148((role) => role.id)]) || [],
6920
+ roleIds: _optionalChain([user, 'optionalAccess', _177 => _177.roles, 'access', _178 => _178.map, 'call', _179 => _179((role) => role.id)]) || [],
6426
6921
  sendInvitationEmail: false,
6427
- avatar: _optionalChain([user, 'optionalAccess', _149 => _149.avatarUrl]) || ""
6922
+ avatar: _optionalChain([user, 'optionalAccess', _180 => _180.avatarUrl]) || ""
6428
6923
  }
6429
6924
  });
6430
6925
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
@@ -6470,7 +6965,7 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
6470
6965
  };
6471
6966
  try {
6472
6967
  const updatedUser = user ? await _chunkULHMVHDSjs.UserService.update(payload) : await _chunkULHMVHDSjs.UserService.create(payload);
6473
- if (_optionalChain([currentUser, 'optionalAccess', _150 => _150.id]) === updatedUser.id) setUser(updatedUser);
6968
+ if (_optionalChain([currentUser, 'optionalAccess', _181 => _181.id]) === updatedUser.id) setUser(updatedUser);
6474
6969
  if (onRevalidate) {
6475
6970
  await onRevalidate(generateUrl({ page: _chunkULHMVHDSjs.Modules.User, id: updatedUser.id, language: `[locale]` }));
6476
6971
  }
@@ -6488,12 +6983,12 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
6488
6983
  async function fetchRoles() {
6489
6984
  const roles2 = await _chunkULHMVHDSjs.RoleService.findAllRoles({});
6490
6985
  const availableRoles = roles2.filter(
6491
- (role) => role.id !== _chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess', _151 => _151.features, 'access', _152 => _152.some, 'call', _153 => _153((feature) => feature.id === _optionalChain([role, 'access', _154 => _154.requiredFeature, 'optionalAccess', _155 => _155.id]))]))
6986
+ (role) => role.id !== _chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess', _182 => _182.features, 'access', _183 => _183.some, 'call', _184 => _184((feature) => feature.id === _optionalChain([role, 'access', _185 => _185.requiredFeature, 'optionalAccess', _186 => _186.id]))]))
6492
6987
  );
6493
6988
  setRoles(availableRoles);
6494
6989
  }
6495
6990
  _chunk7QVYU63Ejs.__name.call(void 0, fetchRoles, "fetchRoles");
6496
- if (open && (company || _optionalChain([currentUser, 'optionalAccess', _156 => _156.roles, 'access', _157 => _157.find, 'call', _158 => _158((role) => role.id === _chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator)])) && roles.length === 0)
6991
+ if (open && (company || _optionalChain([currentUser, 'optionalAccess', _187 => _187.roles, 'access', _188 => _188.find, 'call', _189 => _189((role) => role.id === _chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator)])) && roles.length === 0)
6497
6992
  fetchRoles();
6498
6993
  }, [company, open]);
6499
6994
  _react.useEffect.call(void 0, () => {
@@ -6514,7 +7009,7 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
6514
7009
  setContentType(null);
6515
7010
  }
6516
7011
  }, [file]);
6517
- const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess', _159 => _159.id]) === _optionalChain([user, 'optionalAccess', _160 => _160.id]) && hasRole(_chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator)) && (hasPermissionToModule({ module: _chunkULHMVHDSjs.Modules.User, action: "update" /* Update */ }) || hasRole(_chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator));
7012
+ const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess', _190 => _190.id]) === _optionalChain([user, 'optionalAccess', _191 => _191.id]) && hasRole(_chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator)) && (hasPermissionToModule({ module: _chunkULHMVHDSjs.Modules.User, action: "update" /* Update */ }) || hasRole(_chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator));
6518
7013
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog, { open, onOpenChange: setOpen, children: [
6519
7014
  trigger ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DialogTrigger, { children: trigger }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommonEditorTrigger, { isEdit: !!user }),
6520
7015
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -6522,7 +7017,7 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
6522
7017
  {
6523
7018
  className: `flex max-h-[70vh] ${canChangeRoles ? `max-w-[90vw]` : `max-w-3xl`} min-h-3xl max-h-[90vh] flex-col overflow-y-auto`,
6524
7019
  children: [
6525
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommonEditorHeader, { type: t(`entities.users`, { count: 1 }), name: _optionalChain([user, 'optionalAccess', _161 => _161.name]) }),
7020
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommonEditorHeader, { type: t(`entities.users`, { count: 1 }), name: _optionalChain([user, 'optionalAccess', _192 => _192.name]) }),
6526
7021
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: `flex w-full flex-col gap-y-4`, children: [
6527
7022
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: `flex flex-row gap-x-4`, children: [
6528
7023
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `flex w-40 flex-col justify-start gap-y-2`, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -6601,10 +7096,10 @@ function UserEditorInternal({ user, propagateChanges, adminCreated, trigger, onR
6601
7096
  ] })
6602
7097
  ] }),
6603
7098
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end gap-x-4", children: [
6604
- user && _optionalChain([currentUser, 'optionalAccess', _162 => _162.roles, 'access', _163 => _163.find, 'call', _164 => _164((role) => role.id === _chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator)]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7099
+ user && _optionalChain([currentUser, 'optionalAccess', _193 => _193.roles, 'access', _194 => _194.find, 'call', _195 => _195((role) => role.id === _chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator)]) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6605
7100
  UserDeleter,
6606
7101
  {
6607
- companyId: _optionalChain([user, 'access', _165 => _165.company, 'optionalAccess', _166 => _166.id]),
7102
+ companyId: _optionalChain([user, 'access', _196 => _196.company, 'optionalAccess', _197 => _197.id]),
6608
7103
  user,
6609
7104
  onDeleted: () => {
6610
7105
  setOpen(false);
@@ -6638,6 +7133,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, UserEditor, "UserEditor");
6638
7133
 
6639
7134
 
6640
7135
 
7136
+
6641
7137
  // src/components/forms/CommonAssociationForm.tsx
6642
7138
 
6643
7139
 
@@ -6780,7 +7276,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, ErrorDetails, "ErrorDetails");
6780
7276
 
6781
7277
  // src/components/errors/errorToast.ts
6782
7278
  function errorToast(params) {
6783
- _chunkULHMVHDSjs.showError.call(void 0, _nullishCoalesce(_optionalChain([params, 'optionalAccess', _167 => _167.title]), () => ( "Error")), {
7279
+ _chunkULHMVHDSjs.showError.call(void 0, _nullishCoalesce(_optionalChain([params, 'optionalAccess', _198 => _198.title]), () => ( "Error")), {
6784
7280
  description: params.error instanceof Error ? params.error.message : String(params.error)
6785
7281
  });
6786
7282
  }
@@ -7095,7 +7591,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
7095
7591
  const [open, setOpen] = _react.useState.call(void 0, false);
7096
7592
  const [prevRange, setPrevRange] = _react.useState.call(void 0, date);
7097
7593
  _react.useEffect.call(void 0, () => {
7098
- if (_optionalChain([date, 'optionalAccess', _168 => _168.from]) && _optionalChain([date, 'optionalAccess', _169 => _169.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _170 => _170.from, 'optionalAccess', _171 => _171.getTime, 'call', _172 => _172()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _173 => _173.to, 'optionalAccess', _174 => _174.getTime, 'call', _175 => _175()]) !== date.to.getTime())) {
7594
+ if (_optionalChain([date, 'optionalAccess', _199 => _199.from]) && _optionalChain([date, 'optionalAccess', _200 => _200.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _201 => _201.from, 'optionalAccess', _202 => _202.getTime, 'call', _203 => _203()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _204 => _204.to, 'optionalAccess', _205 => _205.getTime, 'call', _206 => _206()]) !== date.to.getTime())) {
7099
7595
  onDateChange(date);
7100
7596
  setPrevRange(date);
7101
7597
  setOpen(false);
@@ -7106,7 +7602,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
7106
7602
  setDate(void 0);
7107
7603
  return;
7108
7604
  }
7109
- if (range.from && (!_optionalChain([date, 'optionalAccess', _176 => _176.from]) || range.from.getTime() !== date.from.getTime())) {
7605
+ if (range.from && (!_optionalChain([date, 'optionalAccess', _207 => _207.from]) || range.from.getTime() !== date.from.getTime())) {
7110
7606
  setDate({ from: range.from, to: void 0 });
7111
7607
  } else {
7112
7608
  setDate(range);
@@ -7121,7 +7617,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
7121
7617
  className: _chunkULHMVHDSjs.cn.call(void 0, "w-[300px] justify-start text-left font-normal", !date && "text-muted-foreground"),
7122
7618
  children: [
7123
7619
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
7124
- _optionalChain([date, 'optionalAccess', _177 => _177.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
7620
+ _optionalChain([date, 'optionalAccess', _208 => _208.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
7125
7621
  _datefns.format.call(void 0, date.from, "LLL dd, y"),
7126
7622
  " - ",
7127
7623
  _datefns.format.call(void 0, date.to, "LLL dd, y")
@@ -7134,7 +7630,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
7134
7630
  Calendar,
7135
7631
  {
7136
7632
  mode: "range",
7137
- defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _178 => _178.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
7633
+ defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _209 => _209.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
7138
7634
  selected: date,
7139
7635
  onSelect: handleSelect,
7140
7636
  numberOfMonths: 2
@@ -7221,7 +7717,7 @@ var FileUploader = _react.forwardRef.call(void 0,
7221
7717
  movePrev();
7222
7718
  } else if (e.key === "Enter" || e.key === "Space") {
7223
7719
  if (activeIndex === -1) {
7224
- _optionalChain([dropzoneState, 'access', _179 => _179.inputRef, 'access', _180 => _180.current, 'optionalAccess', _181 => _181.click, 'call', _182 => _182()]);
7720
+ _optionalChain([dropzoneState, 'access', _210 => _210.inputRef, 'access', _211 => _211.current, 'optionalAccess', _212 => _212.click, 'call', _213 => _213()]);
7225
7721
  }
7226
7722
  } else if (e.key === "Delete" || e.key === "Backspace") {
7227
7723
  if (activeIndex !== -1) {
@@ -7259,13 +7755,13 @@ var FileUploader = _react.forwardRef.call(void 0,
7259
7755
  onValueChange(newValues);
7260
7756
  if (rejectedFiles.length > 0) {
7261
7757
  for (let i = 0; i < rejectedFiles.length; i++) {
7262
- if (_optionalChain([rejectedFiles, 'access', _183 => _183[i], 'access', _184 => _184.errors, 'access', _185 => _185[0], 'optionalAccess', _186 => _186.code]) === "file-too-large") {
7758
+ if (_optionalChain([rejectedFiles, 'access', _214 => _214[i], 'access', _215 => _215.errors, 'access', _216 => _216[0], 'optionalAccess', _217 => _217.code]) === "file-too-large") {
7263
7759
  _chunkULHMVHDSjs.showError.call(void 0, t("common.errors.file"), {
7264
7760
  description: t(`common.errors.file_max`, { size: maxSize / 1024 / 1024 })
7265
7761
  });
7266
7762
  break;
7267
7763
  }
7268
- if (_optionalChain([rejectedFiles, 'access', _187 => _187[i], 'access', _188 => _188.errors, 'access', _189 => _189[0], 'optionalAccess', _190 => _190.message])) {
7764
+ if (_optionalChain([rejectedFiles, 'access', _218 => _218[i], 'access', _219 => _219.errors, 'access', _220 => _220[0], 'optionalAccess', _221 => _221.message])) {
7269
7765
  _chunkULHMVHDSjs.showError.call(void 0, t(`common.errors.file`), {
7270
7766
  description: rejectedFiles[i].errors[0].message
7271
7767
  });
@@ -7901,9 +8397,9 @@ _chunk7QVYU63Ejs.__name.call(void 0, FormInput, "FormInput");
7901
8397
 
7902
8398
 
7903
8399
 
7904
- var PasswordInput = React12.forwardRef(
8400
+ var PasswordInput = React13.forwardRef(
7905
8401
  ({ className, type: _type, ...props }, ref) => {
7906
- const [showPassword, setShowPassword] = React12.useState(false);
8402
+ const [showPassword, setShowPassword] = React13.useState(false);
7907
8403
  const disabled = props.value === "" || props.value === void 0 || props.disabled;
7908
8404
  const t = _nextintl.useTranslations.call(void 0, );
7909
8405
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative", children: [
@@ -8022,11 +8518,11 @@ function FormPlaceAutocomplete({
8022
8518
  const data = await response.json();
8023
8519
  if (data.suggestions) {
8024
8520
  const formattedSuggestions = data.suggestions.map((suggestion) => ({
8025
- place_id: _optionalChain([suggestion, 'access', _191 => _191.placePrediction, 'optionalAccess', _192 => _192.placeId]) || "",
8026
- description: _optionalChain([suggestion, 'access', _193 => _193.placePrediction, 'optionalAccess', _194 => _194.text, 'optionalAccess', _195 => _195.text]) || "",
8521
+ place_id: _optionalChain([suggestion, 'access', _222 => _222.placePrediction, 'optionalAccess', _223 => _223.placeId]) || "",
8522
+ description: _optionalChain([suggestion, 'access', _224 => _224.placePrediction, 'optionalAccess', _225 => _225.text, 'optionalAccess', _226 => _226.text]) || "",
8027
8523
  structured_formatting: {
8028
- main_text: _optionalChain([suggestion, 'access', _196 => _196.placePrediction, 'optionalAccess', _197 => _197.structuredFormat, 'optionalAccess', _198 => _198.mainText, 'optionalAccess', _199 => _199.text]) || "",
8029
- secondary_text: _optionalChain([suggestion, 'access', _200 => _200.placePrediction, 'optionalAccess', _201 => _201.structuredFormat, 'optionalAccess', _202 => _202.secondaryText, 'optionalAccess', _203 => _203.text]) || ""
8524
+ main_text: _optionalChain([suggestion, 'access', _227 => _227.placePrediction, 'optionalAccess', _228 => _228.structuredFormat, 'optionalAccess', _229 => _229.mainText, 'optionalAccess', _230 => _230.text]) || "",
8525
+ secondary_text: _optionalChain([suggestion, 'access', _231 => _231.placePrediction, 'optionalAccess', _232 => _232.structuredFormat, 'optionalAccess', _233 => _233.secondaryText, 'optionalAccess', _234 => _234.text]) || ""
8030
8526
  }
8031
8527
  }));
8032
8528
  setSuggestions(formattedSuggestions);
@@ -8121,8 +8617,8 @@ function FormPlaceAutocomplete({
8121
8617
  className: "hover:bg-muted cursor-pointer px-3 py-2 text-sm",
8122
8618
  onClick: () => handleSuggestionSelect(suggestion),
8123
8619
  children: [
8124
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _204 => _204.structured_formatting, 'optionalAccess', _205 => _205.main_text]) }),
8125
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _206 => _206.structured_formatting, 'optionalAccess', _207 => _207.secondary_text]) })
8620
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _235 => _235.structured_formatting, 'optionalAccess', _236 => _236.main_text]) }),
8621
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _237 => _237.structured_formatting, 'optionalAccess', _238 => _238.secondary_text]) })
8126
8622
  ]
8127
8623
  },
8128
8624
  suggestion.place_id || index
@@ -8163,7 +8659,7 @@ function FormSelect({
8163
8659
  disabled,
8164
8660
  "data-testid": testId,
8165
8661
  children: [
8166
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: _optionalChain([values, 'access', _208 => _208.find, 'call', _209 => _209((v) => v.id === field.value), 'optionalAccess', _210 => _210.text]) }) }),
8662
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: _optionalChain([values, 'access', _239 => _239.find, 'call', _240 => _240((v) => v.id === field.value), 'optionalAccess', _241 => _241.text]) }) }),
8167
8663
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectContent, { children: values.map((type) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: type.id, children: type.text }, type.id)) })
8168
8664
  ]
8169
8665
  }
@@ -8347,7 +8843,7 @@ function UserMultiSelect({
8347
8843
  retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
8348
8844
  return _chunkULHMVHDSjs.UserService.findAllUsers(params);
8349
8845
  }, "retriever"),
8350
- retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _211 => _211.id]) },
8846
+ retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _242 => _242.id]) },
8351
8847
  module: _chunkULHMVHDSjs.Modules.User
8352
8848
  });
8353
8849
  _react.useEffect.call(void 0, () => {
@@ -8374,65 +8870,75 @@ function UserMultiSelect({
8374
8870
  _react.useEffect.call(void 0, () => {
8375
8871
  if (data.data && data.data.length > 0) {
8376
8872
  const users = data.data;
8377
- const filteredUsers = users.filter((user) => user.id !== _optionalChain([currentUser, 'optionalAccess', _212 => _212.id]));
8873
+ const filteredUsers = users.filter((user) => user.id !== _optionalChain([currentUser, 'optionalAccess', _243 => _243.id]));
8378
8874
  const options = filteredUsers.map((user) => ({
8379
8875
  label: user.name,
8380
8876
  value: user.id,
8381
- icon: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ className }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatarIcon, { className, url: user.avatar, name: user.name }), "icon"),
8382
- userData: user
8877
+ userData: user,
8878
+ avatar: user.avatar
8383
8879
  }));
8384
- setUserOptions(options);
8385
- }
8386
- }, [data.data, currentUser]);
8387
- _react.useEffect.call(void 0, () => {
8388
- if (selectedUsers.length > 0) {
8389
- const existingOptionIds = new Set(userOptions.map((option) => option.value));
8880
+ const existingOptionIds = new Set(options.map((option) => option.value));
8390
8881
  const missingOptions = selectedUsers.filter((user) => !existingOptionIds.has(user.id)).map((user) => ({
8391
8882
  label: user.name,
8392
8883
  value: user.id,
8393
- icon: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ className }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatarIcon, { className, url: user.avatar, name: user.name }), "icon"),
8394
- userData: user
8884
+ userData: user,
8885
+ avatar: user.avatar
8395
8886
  }));
8396
- if (missingOptions.length > 0) {
8397
- setUserOptions((prev) => [...prev, ...missingOptions]);
8398
- }
8399
- }
8400
- }, [selectedUsers, userOptions]);
8401
- const handleValueChange = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (selectedIds) => {
8402
- const updatedSelectedUsers = selectedIds.map((id2) => {
8403
- const existingUser = selectedUsers.find((user) => user.id === id2);
8404
- if (existingUser) {
8405
- return existingUser;
8406
- }
8407
- const option = userOptions.find((option2) => option2.value === id2);
8408
- if (_optionalChain([option, 'optionalAccess', _213 => _213.userData])) {
8409
- return {
8410
- id: option.userData.id,
8411
- name: option.userData.name,
8412
- avatar: option.userData.avatar
8413
- };
8414
- }
8415
- return { id: id2, name: id2 };
8887
+ setUserOptions([...options, ...missingOptions]);
8888
+ }
8889
+ }, [data.data, currentUser, selectedUsers]);
8890
+ const selectedOptions = _react.useMemo.call(void 0, () => {
8891
+ return selectedUsers.map((user) => ({
8892
+ value: user.id,
8893
+ label: user.name
8894
+ }));
8895
+ }, [selectedUsers]);
8896
+ const handleChange = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (options) => {
8897
+ const formValues = options.map((option) => {
8898
+ const userOption = userOptions.find((opt) => opt.value === option.value);
8899
+ return {
8900
+ id: option.value,
8901
+ name: option.label,
8902
+ avatar: _optionalChain([userOption, 'optionalAccess', _244 => _244.avatar])
8903
+ };
8416
8904
  });
8417
- form.setValue(id, updatedSelectedUsers);
8905
+ form.setValue(id, formValues, { shouldDirty: true, shouldTouch: true });
8418
8906
  if (onChange) {
8419
- const fullSelectedUsers = selectedIds.map((id2) => _optionalChain([userOptions, 'access', _214 => _214.find, 'call', _215 => _215((option) => option.value === id2), 'optionalAccess', _216 => _216.userData])).filter(Boolean);
8420
- onChange(fullSelectedUsers);
8907
+ const fullUsers = options.map((option) => {
8908
+ const userOption = userOptions.find((opt) => opt.value === option.value);
8909
+ return _optionalChain([userOption, 'optionalAccess', _245 => _245.userData]);
8910
+ }).filter(Boolean);
8911
+ onChange(fullUsers);
8421
8912
  }
8422
- }, "handleValueChange");
8423
- const selectedUserIds = selectedUsers.map((user) => user.id);
8913
+ }, "handleChange");
8914
+ const renderOption = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (option) => {
8915
+ const userOption = option;
8916
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
8917
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatarIcon, { url: userOption.avatar, name: option.label }),
8918
+ option.label
8919
+ ] });
8920
+ }, "renderOption");
8921
+ const handleSearchSync = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (search2) => {
8922
+ _setSearchTerm(search2);
8923
+ return userOptions;
8924
+ }, "handleSearchSync");
8424
8925
  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: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8425
- MultiSelect,
8926
+ MultipleSelector,
8426
8927
  {
8928
+ value: selectedOptions,
8929
+ onChange: handleChange,
8427
8930
  options: userOptions,
8428
- onValueChange: handleValueChange,
8429
- defaultValue: selectedUserIds,
8430
8931
  placeholder,
8431
- maxCount,
8432
- animation: 0,
8433
- loading: isSearching,
8434
- loadingText: t("ui.search.button"),
8435
- emptyText: t("ui.search.no_results", { type: t("entities.users", { count: 2 }) })
8932
+ maxDisplayCount: maxCount,
8933
+ hideClearAllButton: true,
8934
+ onSearchSync: handleSearchSync,
8935
+ delay: 0,
8936
+ renderOption,
8937
+ loadingIndicator: isSearching ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-center py-2", children: [
8938
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin text-muted-foreground" }),
8939
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "ml-2 text-sm text-muted-foreground", children: t("ui.search.button") })
8940
+ ] }) : void 0,
8941
+ emptyIndicator: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: t("ui.search.no_results", { type: t("entities.users", { count: 2 }) }) })
8436
8942
  }
8437
8943
  ) }) });
8438
8944
  }
@@ -8566,7 +9072,7 @@ function UserAvatar({ user, className, showFull, showLink, showTooltip = true })
8566
9072
  }, "getInitials");
8567
9073
  const getAvatar = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
8568
9074
  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: [
8569
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _217 => _217.avatar]) }),
9075
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _246 => _246.avatar]) }),
8570
9076
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: getInitials(user.name) })
8571
9077
  ] }) });
8572
9078
  }, "getAvatar");
@@ -8648,10 +9154,10 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
8648
9154
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
8649
9155
  /* @__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, _jsxruntime.Fragment, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md border p-2", children: [
8650
9156
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: `mr-2 h-6 w-6`, children: [
8651
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _218 => _218.value, 'optionalAccess', _219 => _219.avatar]) }),
8652
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _220 => _220.value, 'optionalAccess', _221 => _221.name]) ? _optionalChain([field, 'access', _222 => _222.value, 'optionalAccess', _223 => _223.name, 'access', _224 => _224.split, 'call', _225 => _225(" "), 'access', _226 => _226.map, 'call', _227 => _227((name) => name.charAt(0).toUpperCase())]) : "X" })
9157
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _247 => _247.value, 'optionalAccess', _248 => _248.avatar]) }),
9158
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _249 => _249.value, 'optionalAccess', _250 => _250.name]) ? _optionalChain([field, 'access', _251 => _251.value, 'optionalAccess', _252 => _252.name, 'access', _253 => _253.split, 'call', _254 => _254(" "), 'access', _255 => _255.map, 'call', _256 => _256((name) => name.charAt(0).toUpperCase())]) : "X" })
8653
9159
  ] }) }),
8654
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "", children: _nullishCoalesce(_optionalChain([field, 'access', _228 => _228.value, 'optionalAccess', _229 => _229.name]), () => ( "")) })
9160
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "", children: _nullishCoalesce(_optionalChain([field, 'access', _257 => _257.value, 'optionalAccess', _258 => _258.name]), () => ( "")) })
8655
9161
  ] }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground mr-7 flex h-10 w-full flex-row items-center justify-start rounded-md border p-2 text-sm", children: _nullishCoalesce(placeholder, () => ( t(`ui.search.placeholder`, { type: t(`entities.users`, { count: 1 }) }))) }) }) }),
8656
9162
  field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
8657
9163
  _lucidereact.CircleX,
@@ -8946,7 +9452,7 @@ function CompanyUsersList({ isDeleted }) {
8946
9452
  const data = useDataListRetriever({
8947
9453
  ready: !!company,
8948
9454
  retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkULHMVHDSjs.UserService.findAllUsers(params), "retriever"),
8949
- retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _230 => _230.id]), isDeleted },
9455
+ retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _259 => _259.id]), isDeleted },
8950
9456
  module: _chunkULHMVHDSjs.Modules.User
8951
9457
  });
8952
9458
  _react.useEffect.call(void 0, () => {
@@ -9052,11 +9558,11 @@ function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
9052
9558
  className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
9053
9559
  onClick: (_e) => {
9054
9560
  setSelectedUser(user);
9055
- _optionalChain([setLevelOpen, 'optionalCall', _231 => _231(true)]);
9561
+ _optionalChain([setLevelOpen, 'optionalCall', _260 => _260(true)]);
9056
9562
  },
9057
9563
  onSelect: (_e) => {
9058
9564
  setSelectedUser(user);
9059
- _optionalChain([setLevelOpen, 'optionalCall', _232 => _232(true)]);
9565
+ _optionalChain([setLevelOpen, 'optionalCall', _261 => _261(true)]);
9060
9566
  },
9061
9567
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between px-4 py-1", children: [
9062
9568
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user }),
@@ -9341,8 +9847,8 @@ function CompanyConfigurationEditorInternal({ company }) {
9341
9847
  const { setUser } = useCurrentUserContext();
9342
9848
  const defaultValues = _react.useMemo.call(void 0, () => {
9343
9849
  return {
9344
- isManagedKnowledge: _nullishCoalesce(_optionalChain([company, 'access', _233 => _233.configurations, 'optionalAccess', _234 => _234.isManagedKnowledge]), () => ( false)),
9345
- allowPublicBot: _nullishCoalesce(_optionalChain([company, 'access', _235 => _235.configurations, 'optionalAccess', _236 => _236.allowPublicBot]), () => ( false))
9850
+ isManagedKnowledge: _nullishCoalesce(_optionalChain([company, 'access', _262 => _262.configurations, 'optionalAccess', _263 => _263.isManagedKnowledge]), () => ( false)),
9851
+ allowPublicBot: _nullishCoalesce(_optionalChain([company, 'access', _264 => _264.configurations, 'optionalAccess', _265 => _265.allowPublicBot]), () => ( false))
9346
9852
  };
9347
9853
  }, [company.configurations]);
9348
9854
  const close = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
@@ -9361,8 +9867,8 @@ function CompanyConfigurationEditorInternal({ company }) {
9361
9867
  _react.useEffect.call(void 0, () => {
9362
9868
  if (open) {
9363
9869
  form.reset({
9364
- isManagedKnowledge: _nullishCoalesce(_optionalChain([company, 'access', _237 => _237.configurations, 'optionalAccess', _238 => _238.isManagedKnowledge]), () => ( false)),
9365
- allowPublicBot: _nullishCoalesce(_optionalChain([company, 'access', _239 => _239.configurations, 'optionalAccess', _240 => _240.allowPublicBot]), () => ( false))
9870
+ isManagedKnowledge: _nullishCoalesce(_optionalChain([company, 'access', _266 => _266.configurations, 'optionalAccess', _267 => _267.isManagedKnowledge]), () => ( false)),
9871
+ allowPublicBot: _nullishCoalesce(_optionalChain([company, 'access', _268 => _268.configurations, 'optionalAccess', _269 => _269.allowPublicBot]), () => ( false))
9366
9872
  });
9367
9873
  }
9368
9874
  }, [company, open]);
@@ -9589,11 +10095,11 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
9589
10095
  const form = _reacthookform.useForm.call(void 0, {
9590
10096
  resolver: _zod.zodResolver.call(void 0, formSchema),
9591
10097
  defaultValues: {
9592
- id: _optionalChain([company, 'optionalAccess', _241 => _241.id]) || _uuid.v4.call(void 0, ),
9593
- name: _optionalChain([company, 'optionalAccess', _242 => _242.name]) || "",
9594
- featureIds: _optionalChain([company, 'optionalAccess', _243 => _243.features, 'access', _244 => _244.map, 'call', _245 => _245((feature) => feature.id)]) || [],
9595
- moduleIds: _optionalChain([company, 'optionalAccess', _246 => _246.modules, 'access', _247 => _247.map, 'call', _248 => _248((module) => module.id)]) || [],
9596
- logo: _optionalChain([company, 'optionalAccess', _249 => _249.logo]) || ""
10098
+ id: _optionalChain([company, 'optionalAccess', _270 => _270.id]) || _uuid.v4.call(void 0, ),
10099
+ name: _optionalChain([company, 'optionalAccess', _271 => _271.name]) || "",
10100
+ featureIds: _optionalChain([company, 'optionalAccess', _272 => _272.features, 'access', _273 => _273.map, 'call', _274 => _274((feature) => feature.id)]) || [],
10101
+ moduleIds: _optionalChain([company, 'optionalAccess', _275 => _275.modules, 'access', _276 => _276.map, 'call', _277 => _277((module) => module.id)]) || [],
10102
+ logo: _optionalChain([company, 'optionalAccess', _278 => _278.logo]) || ""
9597
10103
  }
9598
10104
  });
9599
10105
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
@@ -9610,7 +10116,7 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
9610
10116
  });
9611
10117
  }
9612
10118
  const payload = {
9613
- id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _250 => _250.id]), () => ( _uuid.v4.call(void 0, ))),
10119
+ id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _279 => _279.id]), () => ( _uuid.v4.call(void 0, ))),
9614
10120
  name: values.name,
9615
10121
  logo: files && contentType ? values.logo : void 0,
9616
10122
  featureIds: values.featureIds,
@@ -9645,7 +10151,7 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
9645
10151
  }
9646
10152
  }
9647
10153
  _chunk7QVYU63Ejs.__name.call(void 0, fetchFeatures, "fetchFeatures");
9648
- if (open && features.length === 0 && (hasRole(_chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkV63TFESUjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access', _251 => _251.env, 'access', _252 => _252.NEXT_PUBLIC_PRIVATE_INSTALLATION, 'optionalAccess', _253 => _253.toLowerCase, 'call', _254 => _254()]) === "true"))
10154
+ if (open && features.length === 0 && (hasRole(_chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkV63TFESUjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access', _280 => _280.env, 'access', _281 => _281.NEXT_PUBLIC_PRIVATE_INSTALLATION, 'optionalAccess', _282 => _282.toLowerCase, 'call', _283 => _283()]) === "true"))
9649
10155
  fetchFeatures();
9650
10156
  }, [open, features]);
9651
10157
  _react.useEffect.call(void 0, () => {
@@ -9679,7 +10185,7 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
9679
10185
  "application/images": [".jpg", ".jpeg", ".png", ".gif", ".webp", ".svg"]
9680
10186
  }
9681
10187
  };
9682
- const canAccessFeatures = hasRole(_chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkV63TFESUjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access', _255 => _255.env, 'access', _256 => _256.NEXT_PUBLIC_PRIVATE_INSTALLATION, 'optionalAccess', _257 => _257.toLowerCase, 'call', _258 => _258()]) === "true";
10188
+ const canAccessFeatures = hasRole(_chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkV63TFESUjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access', _284 => _284.env, 'access', _285 => _285.NEXT_PUBLIC_PRIVATE_INSTALLATION, 'optionalAccess', _286 => _286.toLowerCase, 'call', _287 => _287()]) === "true";
9683
10189
  const isAdministrator2 = hasRole(_chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator);
9684
10190
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Dialog, { open, onOpenChange: setOpen, children: [
9685
10191
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommonEditorTrigger, { isEdit: !!company }),
@@ -9688,13 +10194,13 @@ function CompanyEditorInternal({ company, propagateChanges, onRevalidate }) {
9688
10194
  {
9689
10195
  className: `flex max-h-[70vh] w-full ${isAdministrator2 || canAccessFeatures ? `max-w-5xl` : `max-w-4xl`} flex-col overflow-y-auto`,
9690
10196
  children: [
9691
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommonEditorHeader, { type: t(`entities.companies`, { count: 1 }), name: _optionalChain([company, 'optionalAccess', _259 => _259.name]) }),
10197
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CommonEditorHeader, { type: t(`entities.companies`, { count: 1 }), name: _optionalChain([company, 'optionalAccess', _288 => _288.name]) }),
9692
10198
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: `flex w-full flex-col gap-y-4`, children: [
9693
10199
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-start justify-between gap-x-4", children: [
9694
- /* @__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-neutral-300 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', _260 => _260.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
10200
+ /* @__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-neutral-300 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', _289 => _289.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
9695
10201
  _image2.default,
9696
10202
  {
9697
- src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _261 => _261.logo]) || "",
10203
+ src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _290 => _290.logo]) || "",
9698
10204
  alt: "Company Logo",
9699
10205
  width: 200,
9700
10206
  height: 200
@@ -9829,7 +10335,7 @@ function NotificationToast(notification, t, generateUrl, reouter) {
9829
10335
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
9830
10336
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
9831
10337
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
9832
- actor: _nullishCoalesce(_optionalChain([data, 'access', _262 => _262.actor, 'optionalAccess', _263 => _263.name]), () => ( "")),
10338
+ actor: _nullishCoalesce(_optionalChain([data, 'access', _291 => _291.actor, 'optionalAccess', _292 => _292.name]), () => ( "")),
9833
10339
  title: data.title,
9834
10340
  message: _nullishCoalesce(notification.message, () => ( ""))
9835
10341
  }) }),
@@ -9858,7 +10364,7 @@ function NotificationMenuItem({ notification, closePopover }) {
9858
10364
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
9859
10365
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
9860
10366
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
9861
- actor: _nullishCoalesce(_optionalChain([data, 'access', _264 => _264.actor, 'optionalAccess', _265 => _265.name]), () => ( "")),
10367
+ actor: _nullishCoalesce(_optionalChain([data, 'access', _293 => _293.actor, 'optionalAccess', _294 => _294.name]), () => ( "")),
9862
10368
  title: data.title,
9863
10369
  message: _nullishCoalesce(notification.message, () => ( ""))
9864
10370
  }) }),
@@ -9915,7 +10421,7 @@ var NotificationContextProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(v
9915
10421
  _react.useEffect.call(void 0, () => {
9916
10422
  if (hasInitiallyLoaded || !currentUser) return;
9917
10423
  if (_chunkV63TFESUjs.isRolesConfigured.call(void 0, )) {
9918
- const isAdmin = _optionalChain([currentUser, 'access', _266 => _266.roles, 'optionalAccess', _267 => _267.some, 'call', _268 => _268((role) => role.id === _chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator)]);
10424
+ const isAdmin = _optionalChain([currentUser, 'access', _295 => _295.roles, 'optionalAccess', _296 => _296.some, 'call', _297 => _297((role) => role.id === _chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator)]);
9919
10425
  if (isAdmin) {
9920
10426
  setHasInitiallyLoaded(true);
9921
10427
  return;
@@ -10117,7 +10623,7 @@ function OnboardingProvider({
10117
10623
  let tourSteps = steps;
10118
10624
  if (!tourSteps) {
10119
10625
  const tour2 = tours.find((t) => t.id === tourId);
10120
- tourSteps = _optionalChain([tour2, 'optionalAccess', _269 => _269.steps]);
10626
+ tourSteps = _optionalChain([tour2, 'optionalAccess', _298 => _298.steps]);
10121
10627
  }
10122
10628
  if (!tourSteps || tourSteps.length === 0) {
10123
10629
  console.warn(`No steps found for tour: ${tourId}`);
@@ -10185,10 +10691,10 @@ function OnboardingProvider({
10185
10691
  when: {
10186
10692
  show: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
10187
10693
  setCurrentStepIndex(index);
10188
- _optionalChain([stepConfig, 'access', _270 => _270.onShow, 'optionalCall', _271 => _271()]);
10694
+ _optionalChain([stepConfig, 'access', _299 => _299.onShow, 'optionalCall', _300 => _300()]);
10189
10695
  }, "show"),
10190
10696
  hide: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
10191
- _optionalChain([stepConfig, 'access', _272 => _272.onHide, 'optionalCall', _273 => _273()]);
10697
+ _optionalChain([stepConfig, 'access', _301 => _301.onHide, 'optionalCall', _302 => _302()]);
10192
10698
  }, "hide")
10193
10699
  }
10194
10700
  });
@@ -10376,7 +10882,7 @@ function usePageTracker() {
10376
10882
  if (typeof document !== "undefined") {
10377
10883
  const titleParts = document.title.split("]");
10378
10884
  if (titleParts[1]) {
10379
- const cleanTitle = _optionalChain([titleParts, 'access', _274 => _274[1], 'access', _275 => _275.split, 'call', _276 => _276("|"), 'access', _277 => _277[0], 'optionalAccess', _278 => _278.trim, 'call', _279 => _279()]);
10885
+ const cleanTitle = _optionalChain([titleParts, 'access', _303 => _303[1], 'access', _304 => _304.split, 'call', _305 => _305("|"), 'access', _306 => _306[0], 'optionalAccess', _307 => _307.trim, 'call', _308 => _308()]);
10380
10886
  pageTitle = cleanTitle || foundModule.name;
10381
10887
  }
10382
10888
  }
@@ -10413,7 +10919,7 @@ function usePushNotifications() {
10413
10919
  const register = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
10414
10920
  if ("serviceWorker" in navigator && "PushManager" in window) {
10415
10921
  try {
10416
- const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess', _280 => _280.id])}`;
10922
+ const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess', _309 => _309.id])}`;
10417
10923
  const lastRegisteredSubscription = sessionStorage.getItem(sessionKey);
10418
10924
  const registration = await navigator.serviceWorker.register(`${_chunkV63TFESUjs.getAppUrl.call(void 0, )}/sw.js`);
10419
10925
  let permission = Notification.permission;
@@ -10467,7 +10973,7 @@ function useSocket({ token }) {
10467
10973
  const socketRef = _react.useRef.call(void 0, null);
10468
10974
  _react.useEffect.call(void 0, () => {
10469
10975
  if (!token) return;
10470
- const globalSocketKey = `__socket_${_optionalChain([process, 'access', _281 => _281.env, 'access', _282 => _282.NEXT_PUBLIC_API_URL, 'optionalAccess', _283 => _283.replace, 'call', _284 => _284(/[^a-zA-Z0-9]/g, "_")])}`;
10976
+ const globalSocketKey = `__socket_${_optionalChain([process, 'access', _310 => _310.env, 'access', _311 => _311.NEXT_PUBLIC_API_URL, 'optionalAccess', _312 => _312.replace, 'call', _313 => _313(/[^a-zA-Z0-9]/g, "_")])}`;
10471
10977
  if (typeof window !== "undefined") {
10472
10978
  const _allSocketKeys = Object.keys(window).filter((key) => key.startsWith("__socket_"));
10473
10979
  const existingSocket = window[globalSocketKey];
@@ -10925,7 +11431,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, AllowedUsersDetails, "AllowedUsersDetails")
10925
11431
  var _dynamic = require('next/dynamic'); var _dynamic2 = _interopRequireDefault(_dynamic);
10926
11432
 
10927
11433
 
10928
- var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-JQNYMLFY.js"))), {
11434
+ var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-4ZNFPFIR.js"))), {
10929
11435
  ssr: false
10930
11436
  });
10931
11437
  var BlockNoteEditorContainer = React3.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function EditorContainer(props) {
@@ -11074,10 +11580,10 @@ var cellId = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
11074
11580
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => params.toggleId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
11075
11581
  Checkbox,
11076
11582
  {
11077
- checked: _optionalChain([params, 'access', _285 => _285.checkedIds, 'optionalAccess', _286 => _286.includes, 'call', _287 => _287(row.getValue(params.name))]) || false,
11583
+ checked: _optionalChain([params, 'access', _314 => _314.checkedIds, 'optionalAccess', _315 => _315.includes, 'call', _316 => _316(row.getValue(params.name))]) || false,
11078
11584
  onCheckedChange: (value) => {
11079
11585
  row.toggleSelected(!!value);
11080
- _optionalChain([params, 'access', _288 => _288.toggleId, 'optionalCall', _289 => _289(row.getValue(params.name))]);
11586
+ _optionalChain([params, 'access', _317 => _317.toggleId, 'optionalCall', _318 => _318(row.getValue(params.name))]);
11081
11587
  },
11082
11588
  "aria-label": "Select row"
11083
11589
  }
@@ -11136,7 +11642,7 @@ function useJsonApiGet(params) {
11136
11642
  const [response, setResponse] = _react.useState.call(void 0, null);
11137
11643
  const isMounted = _react.useRef.call(void 0, true);
11138
11644
  const fetchData = _react.useCallback.call(void 0, async () => {
11139
- if (_optionalChain([params, 'access', _290 => _290.options, 'optionalAccess', _291 => _291.enabled]) === false) return;
11645
+ if (_optionalChain([params, 'access', _319 => _319.options, 'optionalAccess', _320 => _320.enabled]) === false) return;
11140
11646
  setLoading(true);
11141
11647
  setError(null);
11142
11648
  try {
@@ -11163,9 +11669,9 @@ function useJsonApiGet(params) {
11163
11669
  setLoading(false);
11164
11670
  }
11165
11671
  }
11166
- }, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _292 => _292.options, 'optionalAccess', _293 => _293.enabled])]);
11672
+ }, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _321 => _321.options, 'optionalAccess', _322 => _322.enabled])]);
11167
11673
  const fetchNextPage = _react.useCallback.call(void 0, async () => {
11168
- if (!_optionalChain([response, 'optionalAccess', _294 => _294.nextPage])) return;
11674
+ if (!_optionalChain([response, 'optionalAccess', _323 => _323.nextPage])) return;
11169
11675
  setLoading(true);
11170
11676
  try {
11171
11677
  const nextResponse = await response.nextPage();
@@ -11186,7 +11692,7 @@ function useJsonApiGet(params) {
11186
11692
  }
11187
11693
  }, [response]);
11188
11694
  const fetchPreviousPage = _react.useCallback.call(void 0, async () => {
11189
- if (!_optionalChain([response, 'optionalAccess', _295 => _295.prevPage])) return;
11695
+ if (!_optionalChain([response, 'optionalAccess', _324 => _324.prevPage])) return;
11190
11696
  setLoading(true);
11191
11697
  try {
11192
11698
  const prevResponse = await response.prevPage();
@@ -11212,15 +11718,15 @@ function useJsonApiGet(params) {
11212
11718
  return () => {
11213
11719
  isMounted.current = false;
11214
11720
  };
11215
- }, [fetchData, ..._optionalChain([params, 'access', _296 => _296.options, 'optionalAccess', _297 => _297.deps]) || []]);
11721
+ }, [fetchData, ..._optionalChain([params, 'access', _325 => _325.options, 'optionalAccess', _326 => _326.deps]) || []]);
11216
11722
  return {
11217
11723
  data,
11218
11724
  loading,
11219
11725
  error,
11220
11726
  response,
11221
11727
  refetch: fetchData,
11222
- hasNextPage: !!_optionalChain([response, 'optionalAccess', _298 => _298.next]),
11223
- hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _299 => _299.prev]),
11728
+ hasNextPage: !!_optionalChain([response, 'optionalAccess', _327 => _327.next]),
11729
+ hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _328 => _328.prev]),
11224
11730
  fetchNextPage,
11225
11731
  fetchPreviousPage
11226
11732
  };
@@ -11298,17 +11804,17 @@ function useJsonApiMutation(config) {
11298
11804
  if (apiResponse.ok) {
11299
11805
  const resultData = apiResponse.data;
11300
11806
  setData(resultData);
11301
- _optionalChain([config, 'access', _300 => _300.onSuccess, 'optionalCall', _301 => _301(resultData)]);
11807
+ _optionalChain([config, 'access', _329 => _329.onSuccess, 'optionalCall', _330 => _330(resultData)]);
11302
11808
  return resultData;
11303
11809
  } else {
11304
11810
  setError(apiResponse.error);
11305
- _optionalChain([config, 'access', _302 => _302.onError, 'optionalCall', _303 => _303(apiResponse.error)]);
11811
+ _optionalChain([config, 'access', _331 => _331.onError, 'optionalCall', _332 => _332(apiResponse.error)]);
11306
11812
  return null;
11307
11813
  }
11308
11814
  } catch (err) {
11309
11815
  const errorMessage = err instanceof Error ? err.message : "Unknown error";
11310
11816
  setError(errorMessage);
11311
- _optionalChain([config, 'access', _304 => _304.onError, 'optionalCall', _305 => _305(errorMessage)]);
11817
+ _optionalChain([config, 'access', _333 => _333.onError, 'optionalCall', _334 => _334(errorMessage)]);
11312
11818
  return null;
11313
11819
  } finally {
11314
11820
  setLoading(false);
@@ -11381,7 +11887,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
11381
11887
  {
11382
11888
  href: hasRole(_chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator) ? generateUrl({
11383
11889
  page: "/administration",
11384
- id: _optionalChain([_chunkULHMVHDSjs.Modules, 'access', _306 => _306.Company, 'access', _307 => _307.pageUrl, 'optionalAccess', _308 => _308.substring, 'call', _309 => _309(1)]),
11890
+ id: _optionalChain([_chunkULHMVHDSjs.Modules, 'access', _335 => _335.Company, 'access', _336 => _336.pageUrl, 'optionalAccess', _337 => _337.substring, 'call', _338 => _338(1)]),
11385
11891
  childPage: company.id
11386
11892
  }) : generateUrl({ page: _chunkULHMVHDSjs.Modules.Company, id: company.id }),
11387
11893
  children: row.getValue("name")
@@ -11397,7 +11903,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
11397
11903
  })
11398
11904
  };
11399
11905
  const columns = _react.useMemo.call(void 0, () => {
11400
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _310 => _310[field], 'optionalCall', _311 => _311()])).filter((col) => col !== void 0);
11906
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _339 => _339[field], 'optionalCall', _340 => _340()])).filter((col) => col !== void 0);
11401
11907
  }, [params.fields, fieldColumnMap, t, generateUrl, hasRole]);
11402
11908
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
11403
11909
  }, "useCompanyTableStructure");
@@ -11409,7 +11915,7 @@ var GRACE_DAYS = 3;
11409
11915
  var isAdministrator = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (currentUser) => {
11410
11916
  if (!currentUser || !_chunkV63TFESUjs.isRolesConfigured.call(void 0, )) return false;
11411
11917
  const adminRoleId = _chunkV63TFESUjs.getRoleId.call(void 0, ).Administrator;
11412
- return !!_optionalChain([currentUser, 'access', _312 => _312.roles, 'optionalAccess', _313 => _313.some, 'call', _314 => _314((role) => role.id === adminRoleId)]);
11918
+ return !!_optionalChain([currentUser, 'access', _341 => _341.roles, 'optionalAccess', _342 => _342.some, 'call', _343 => _343((role) => role.id === adminRoleId)]);
11413
11919
  }, "isAdministrator");
11414
11920
  function useSubscriptionStatus() {
11415
11921
  const { company, currentUser } = useCurrentUserContext();
@@ -11423,6 +11929,15 @@ function useSubscriptionStatus() {
11423
11929
  isBlocked: false
11424
11930
  };
11425
11931
  }
11932
+ if (!_chunkV63TFESUjs.getStripePublishableKey.call(void 0, )) {
11933
+ return {
11934
+ status: "active",
11935
+ trialEndsAt: null,
11936
+ daysRemaining: 0,
11937
+ isGracePeriod: false,
11938
+ isBlocked: false
11939
+ };
11940
+ }
11426
11941
  if (isAdministrator(currentUser)) {
11427
11942
  return {
11428
11943
  status: "active",
@@ -11517,7 +12032,7 @@ var useRoleTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
11517
12032
  })
11518
12033
  };
11519
12034
  const columns = _react.useMemo.call(void 0, () => {
11520
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _315 => _315[field], 'optionalCall', _316 => _316()])).filter((col) => col !== void 0);
12035
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _344 => _344[field], 'optionalCall', _345 => _345()])).filter((col) => col !== void 0);
11521
12036
  }, [params.fields, fieldColumnMap, t, generateUrl]);
11522
12037
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
11523
12038
  }, "useRoleTableStructure");
@@ -11660,7 +12175,7 @@ var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
11660
12175
  })
11661
12176
  };
11662
12177
  const columns = _react.useMemo.call(void 0, () => {
11663
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _317 => _317[field], 'optionalCall', _318 => _318()])).filter((col) => col !== void 0);
12178
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _346 => _346[field], 'optionalCall', _347 => _347()])).filter((col) => col !== void 0);
11664
12179
  }, [params.fields, fieldColumnMap, t, generateUrl]);
11665
12180
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
11666
12181
  }, "useUserTableStructure");
@@ -11761,11 +12276,11 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
11761
12276
  return params.fields.map((field) => {
11762
12277
  const localHandler = fieldColumnMap[field];
11763
12278
  if (localHandler) return localHandler();
11764
- const customHandler = _optionalChain([params, 'access', _319 => _319.context, 'optionalAccess', _320 => _320.customCells, 'optionalAccess', _321 => _321[field]]);
12279
+ const customHandler = _optionalChain([params, 'access', _348 => _348.context, 'optionalAccess', _349 => _349.customCells, 'optionalAccess', _350 => _350[field]]);
11765
12280
  if (customHandler) return customHandler({ t });
11766
12281
  return void 0;
11767
12282
  }).filter((col) => col !== void 0);
11768
- }, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _322 => _322.context, 'optionalAccess', _323 => _323.customCells])]);
12283
+ }, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _351 => _351.context, 'optionalAccess', _352 => _352.customCells])]);
11769
12284
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
11770
12285
  }, "useContentTableStructure");
11771
12286
 
@@ -12100,7 +12615,7 @@ function ContentTableSearch({ data }) {
12100
12615
  const handleSearchIconClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
12101
12616
  if (!isExpanded) {
12102
12617
  setIsFocused(true);
12103
- setTimeout(() => _optionalChain([inputRef, 'access', _324 => _324.current, 'optionalAccess', _325 => _325.focus, 'call', _326 => _326()]), 50);
12618
+ setTimeout(() => _optionalChain([inputRef, 'access', _353 => _353.current, 'optionalAccess', _354 => _354.focus, 'call', _355 => _355()]), 50);
12104
12619
  }
12105
12620
  }, "handleSearchIconClick");
12106
12621
  const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
@@ -12166,7 +12681,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
12166
12681
  props.defaultExpanded === true ? true : typeof props.defaultExpanded === "object" ? props.defaultExpanded : {}
12167
12682
  );
12168
12683
  const { data: tableData, columns: tableColumns } = useTableGenerator(props.tableGeneratorType, {
12169
- data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _327 => _327.data]), () => ( EMPTY_ARRAY)),
12684
+ data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _356 => _356.data]), () => ( EMPTY_ARRAY)),
12170
12685
  fields,
12171
12686
  checkedIds,
12172
12687
  toggleId,
@@ -12211,12 +12726,12 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
12211
12726
  ] }) }) }),
12212
12727
  table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: headerGroup.headers.map((header) => {
12213
12728
  const meta = header.column.columnDef.meta;
12214
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _328 => _328.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
12729
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _357 => _357.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
12215
12730
  }) }, headerGroup.id))
12216
12731
  ] }),
12217
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _329 => _329.rows, 'optionalAccess', _330 => _330.length]) ? rowModel.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: row.getVisibleCells().map((cell) => {
12732
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _358 => _358.rows, 'optionalAccess', _359 => _359.length]) ? rowModel.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: row.getVisibleCells().map((cell) => {
12218
12733
  const meta = cell.column.columnDef.meta;
12219
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _331 => _331.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
12734
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _360 => _360.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
12220
12735
  }) }, row.id)) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { colSpan: tableColumns.length, className: "h-24 text-center", children: "No results." }) }) }),
12221
12736
  showFooter && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { colSpan: tableColumns.length, className: "bg-card py-4 text-right", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center justify-end space-x-2", children: [
12222
12737
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -12226,7 +12741,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
12226
12741
  size: "sm",
12227
12742
  onClick: (e) => {
12228
12743
  e.preventDefault();
12229
- _optionalChain([data, 'access', _332 => _332.previous, 'optionalCall', _333 => _333(true)]);
12744
+ _optionalChain([data, 'access', _361 => _361.previous, 'optionalCall', _362 => _362(true)]);
12230
12745
  },
12231
12746
  disabled: !data.previous,
12232
12747
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronLeft, { className: "h-4 w-4" })
@@ -12240,7 +12755,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
12240
12755
  size: "sm",
12241
12756
  onClick: (e) => {
12242
12757
  e.preventDefault();
12243
- _optionalChain([data, 'access', _334 => _334.next, 'optionalCall', _335 => _335(true)]);
12758
+ _optionalChain([data, 'access', _363 => _363.next, 'optionalCall', _364 => _364(true)]);
12244
12759
  },
12245
12760
  disabled: !data.next,
12246
12761
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight, { className: "h-4 w-4" })
@@ -12801,7 +13316,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
12801
13316
  newDigits[index] = digit;
12802
13317
  setDigits(newDigits);
12803
13318
  if (digit && index < 5) {
12804
- _optionalChain([inputRefs, 'access', _336 => _336.current, 'access', _337 => _337[index + 1], 'optionalAccess', _338 => _338.focus, 'call', _339 => _339()]);
13319
+ _optionalChain([inputRefs, 'access', _365 => _365.current, 'access', _366 => _366[index + 1], 'optionalAccess', _367 => _367.focus, 'call', _368 => _368()]);
12805
13320
  }
12806
13321
  const code = newDigits.join("");
12807
13322
  if (code.length === 6 && newDigits.every((d) => d !== "")) {
@@ -12810,7 +13325,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
12810
13325
  }, "handleChange");
12811
13326
  const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index, e) => {
12812
13327
  if (e.key === "Backspace" && !digits[index] && index > 0) {
12813
- _optionalChain([inputRefs, 'access', _340 => _340.current, 'access', _341 => _341[index - 1], 'optionalAccess', _342 => _342.focus, 'call', _343 => _343()]);
13328
+ _optionalChain([inputRefs, 'access', _369 => _369.current, 'access', _370 => _370[index - 1], 'optionalAccess', _371 => _371.focus, 'call', _372 => _372()]);
12814
13329
  }
12815
13330
  }, "handleKeyDown");
12816
13331
  const handlePaste = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
@@ -12819,7 +13334,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
12819
13334
  if (pastedData.length === 6) {
12820
13335
  const newDigits = pastedData.split("");
12821
13336
  setDigits(newDigits);
12822
- _optionalChain([inputRefs, 'access', _344 => _344.current, 'access', _345 => _345[5], 'optionalAccess', _346 => _346.focus, 'call', _347 => _347()]);
13337
+ _optionalChain([inputRefs, 'access', _373 => _373.current, 'access', _374 => _374[5], 'optionalAccess', _375 => _375.focus, 'call', _376 => _376()]);
12823
13338
  onComplete(pastedData);
12824
13339
  }
12825
13340
  }, "handlePaste");
@@ -13030,8 +13545,8 @@ function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
13030
13545
  try {
13031
13546
  const registrationData = await _chunkULHMVHDSjs.TwoFactorService.getPasskeyRegistrationOptions({
13032
13547
  id: _uuid.v4.call(void 0, ),
13033
- userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _348 => _348.email]), () => ( "")),
13034
- userDisplayName: _optionalChain([currentUser, 'optionalAccess', _349 => _349.name])
13548
+ userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _377 => _377.email]), () => ( "")),
13549
+ userDisplayName: _optionalChain([currentUser, 'optionalAccess', _378 => _378.name])
13035
13550
  });
13036
13551
  const credential = await _browser.startRegistration.call(void 0, { optionsJSON: registrationData.options });
13037
13552
  await _chunkULHMVHDSjs.TwoFactorService.verifyPasskeyRegistration({
@@ -13182,7 +13697,7 @@ function TotpSetupDialog({ onSuccess, trigger }) {
13182
13697
  const setup = await _chunkULHMVHDSjs.TwoFactorService.setupTotp({
13183
13698
  id: _uuid.v4.call(void 0, ),
13184
13699
  name: name.trim(),
13185
- accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _350 => _350.email]), () => ( ""))
13700
+ accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _379 => _379.email]), () => ( ""))
13186
13701
  });
13187
13702
  setQrCodeUri(setup.qrCodeUri);
13188
13703
  setAuthenticatorId(setup.authenticatorId);
@@ -13316,7 +13831,7 @@ function TwoFactorSettings() {
13316
13831
  if (isLoading) {
13317
13832
  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") }) }) });
13318
13833
  }
13319
- const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _351 => _351.isEnabled]), () => ( false));
13834
+ const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _380 => _380.isEnabled]), () => ( false));
13320
13835
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { children: [
13321
13836
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
13322
13837
  isEnabled ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ShieldCheck, { className: "h-6 w-6 text-green-600" }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ShieldAlert, { className: "h-6 w-6 text-yellow-600" }),
@@ -13354,7 +13869,7 @@ function TwoFactorSettings() {
13354
13869
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-medium", children: t("auth.two_factor.backup_codes") }),
13355
13870
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("auth.two_factor.backup_codes_description") })
13356
13871
  ] }),
13357
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _352 => _352.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
13872
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _381 => _381.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
13358
13873
  ] }) }),
13359
13874
  !isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
13360
13875
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, {}),
@@ -13532,9 +14047,9 @@ function AcceptInvitation() {
13532
14047
  });
13533
14048
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
13534
14049
  try {
13535
- if (!_optionalChain([params, 'optionalAccess', _353 => _353.code])) return;
14050
+ if (!_optionalChain([params, 'optionalAccess', _382 => _382.code])) return;
13536
14051
  const payload = {
13537
- code: _optionalChain([params, 'optionalAccess', _354 => _354.code]),
14052
+ code: _optionalChain([params, 'optionalAccess', _383 => _383.code]),
13538
14053
  password: values.password
13539
14054
  };
13540
14055
  await _chunkULHMVHDSjs.AuthService.acceptInvitation(payload);
@@ -13884,7 +14399,7 @@ function Logout({ storageKeys }) {
13884
14399
  const generateUrl = usePageUrlGenerator();
13885
14400
  _react.useEffect.call(void 0, () => {
13886
14401
  const logOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
13887
- if (_optionalChain([storageKeys, 'optionalAccess', _355 => _355.length])) {
14402
+ if (_optionalChain([storageKeys, 'optionalAccess', _384 => _384.length])) {
13888
14403
  clearClientStorage(storageKeys);
13889
14404
  }
13890
14405
  await _chunkULHMVHDSjs.AuthService.logout();
@@ -13907,14 +14422,14 @@ function RefreshUser() {
13907
14422
  setUser(fullUser);
13908
14423
  const token = {
13909
14424
  userId: fullUser.id,
13910
- companyId: _optionalChain([fullUser, 'access', _356 => _356.company, 'optionalAccess', _357 => _357.id]),
14425
+ companyId: _optionalChain([fullUser, 'access', _385 => _385.company, 'optionalAccess', _386 => _386.id]),
13911
14426
  roles: fullUser.roles.map((role) => role.id),
13912
- features: _nullishCoalesce(_optionalChain([fullUser, 'access', _358 => _358.company, 'optionalAccess', _359 => _359.features, 'optionalAccess', _360 => _360.map, 'call', _361 => _361((feature) => feature.id)]), () => ( [])),
14427
+ features: _nullishCoalesce(_optionalChain([fullUser, 'access', _387 => _387.company, 'optionalAccess', _388 => _388.features, 'optionalAccess', _389 => _389.map, 'call', _390 => _390((feature) => feature.id)]), () => ( [])),
13913
14428
  modules: fullUser.modules.map((module) => {
13914
14429
  return { id: module.id, permissions: module.permissions };
13915
14430
  })
13916
14431
  };
13917
- await _optionalChain([_chunkULHMVHDSjs.getTokenHandler.call(void 0, ), 'optionalAccess', _362 => _362.updateToken, 'call', _363 => _363(token)]);
14432
+ await _optionalChain([_chunkULHMVHDSjs.getTokenHandler.call(void 0, ), 'optionalAccess', _391 => _391.updateToken, 'call', _392 => _392(token)]);
13918
14433
  _cookiesnext.deleteCookie.call(void 0, "reloadData");
13919
14434
  }
13920
14435
  }, "loadFullUser");
@@ -13978,9 +14493,9 @@ function ResetPassword() {
13978
14493
  });
13979
14494
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
13980
14495
  try {
13981
- if (!_optionalChain([params, 'optionalAccess', _364 => _364.code])) return;
14496
+ if (!_optionalChain([params, 'optionalAccess', _393 => _393.code])) return;
13982
14497
  const payload = {
13983
- code: _optionalChain([params, 'optionalAccess', _365 => _365.code]),
14498
+ code: _optionalChain([params, 'optionalAccess', _394 => _394.code]),
13984
14499
  password: values.password
13985
14500
  };
13986
14501
  await _chunkULHMVHDSjs.AuthService.resetPassword(payload);
@@ -14337,14 +14852,14 @@ function NotificationsList({ archived }) {
14337
14852
  ] }),
14338
14853
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Skeleton, { className: "h-8 w-20" })
14339
14854
  ] }) }) }, i)) }), "LoadingSkeleton");
14340
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access', _366 => _366.data, 'optionalAccess', _367 => _367.map, 'call', _368 => _368((notification) => {
14855
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access', _395 => _395.data, 'optionalAccess', _396 => _396.map, 'call', _397 => _397((notification) => {
14341
14856
  const notificationData = generateNotificationData({ notification, generateUrl });
14342
14857
  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: [
14343
14858
  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: _chunkULHMVHDSjs.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" }),
14344
14859
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
14345
14860
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
14346
14861
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
14347
- actor: _nullishCoalesce(_optionalChain([notificationData, 'access', _369 => _369.actor, 'optionalAccess', _370 => _370.name]), () => ( "")),
14862
+ actor: _nullishCoalesce(_optionalChain([notificationData, 'access', _398 => _398.actor, 'optionalAccess', _399 => _399.name]), () => ( "")),
14348
14863
  title: notificationData.title
14349
14864
  }) }),
14350
14865
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
@@ -14694,7 +15209,7 @@ var DEFAULT_TRANSLATIONS = {
14694
15209
  invalidEmail: "Please enter a valid email address"
14695
15210
  };
14696
15211
  async function copyToClipboard(text) {
14697
- if (_optionalChain([navigator, 'access', _371 => _371.clipboard, 'optionalAccess', _372 => _372.writeText])) {
15212
+ if (_optionalChain([navigator, 'access', _400 => _400.clipboard, 'optionalAccess', _401 => _401.writeText])) {
14698
15213
  try {
14699
15214
  await navigator.clipboard.writeText(text);
14700
15215
  return true;
@@ -14736,7 +15251,7 @@ function ReferralWidget({
14736
15251
  const linkInputRef = _react.useRef.call(void 0, null);
14737
15252
  const config = _chunkV63TFESUjs.getReferralConfig.call(void 0, );
14738
15253
  const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
14739
- const referralUrl = _optionalChain([stats, 'optionalAccess', _373 => _373.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
15254
+ const referralUrl = _optionalChain([stats, 'optionalAccess', _402 => _402.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
14740
15255
  if (!_chunkV63TFESUjs.isReferralEnabled.call(void 0, )) {
14741
15256
  return null;
14742
15257
  }
@@ -14746,7 +15261,7 @@ function ReferralWidget({
14746
15261
  if (success) {
14747
15262
  setCopied(true);
14748
15263
  _chunkULHMVHDSjs.showToast.call(void 0, t.copiedMessage);
14749
- _optionalChain([onLinkCopied, 'optionalCall', _374 => _374()]);
15264
+ _optionalChain([onLinkCopied, 'optionalCall', _403 => _403()]);
14750
15265
  setTimeout(() => setCopied(false), 2e3);
14751
15266
  } else {
14752
15267
  _chunkULHMVHDSjs.showError.call(void 0, t.copyError);
@@ -14760,12 +15275,12 @@ function ReferralWidget({
14760
15275
  try {
14761
15276
  await sendInvite(email);
14762
15277
  _chunkULHMVHDSjs.showToast.call(void 0, t.inviteSent);
14763
- _optionalChain([onInviteSent, 'optionalCall', _375 => _375(email)]);
15278
+ _optionalChain([onInviteSent, 'optionalCall', _404 => _404(email)]);
14764
15279
  setEmail("");
14765
15280
  } catch (err) {
14766
15281
  const error2 = err instanceof Error ? err : new Error(t.inviteError);
14767
15282
  _chunkULHMVHDSjs.showError.call(void 0, error2.message);
14768
- _optionalChain([onInviteError, 'optionalCall', _376 => _376(error2)]);
15283
+ _optionalChain([onInviteError, 'optionalCall', _405 => _405(error2)]);
14769
15284
  }
14770
15285
  }, [email, sendInvite, t.inviteSent, t.inviteError, t.invalidEmail, onInviteSent, onInviteError]);
14771
15286
  const handleEmailKeyDown = _react.useCallback.call(void 0,
@@ -15518,7 +16033,7 @@ function OAuthClientList({
15518
16033
  OAuthClientCard,
15519
16034
  {
15520
16035
  client,
15521
- onClick: () => _optionalChain([onClientClick, 'optionalCall', _377 => _377(client)]),
16036
+ onClick: () => _optionalChain([onClientClick, 'optionalCall', _406 => _406(client)]),
15522
16037
  onEdit: onEditClick ? () => onEditClick(client) : void 0,
15523
16038
  onDelete: onDeleteClick ? () => onDeleteClick(client) : void 0
15524
16039
  },
@@ -15534,11 +16049,11 @@ _chunk7QVYU63Ejs.__name.call(void 0, OAuthClientList, "OAuthClientList");
15534
16049
  function OAuthClientForm({ client, onSubmit, onCancel, isLoading = false }) {
15535
16050
  const isEditMode = !!client;
15536
16051
  const [formState, setFormState] = _react.useState.call(void 0, {
15537
- name: _optionalChain([client, 'optionalAccess', _378 => _378.name]) || "",
15538
- description: _optionalChain([client, 'optionalAccess', _379 => _379.description]) || "",
15539
- redirectUris: _optionalChain([client, 'optionalAccess', _380 => _380.redirectUris, 'optionalAccess', _381 => _381.length]) ? client.redirectUris : [""],
15540
- allowedScopes: _optionalChain([client, 'optionalAccess', _382 => _382.allowedScopes]) || [],
15541
- isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _383 => _383.isConfidential]), () => ( true))
16052
+ name: _optionalChain([client, 'optionalAccess', _407 => _407.name]) || "",
16053
+ description: _optionalChain([client, 'optionalAccess', _408 => _408.description]) || "",
16054
+ redirectUris: _optionalChain([client, 'optionalAccess', _409 => _409.redirectUris, 'optionalAccess', _410 => _410.length]) ? client.redirectUris : [""],
16055
+ allowedScopes: _optionalChain([client, 'optionalAccess', _411 => _411.allowedScopes]) || [],
16056
+ isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _412 => _412.isConfidential]), () => ( true))
15542
16057
  });
15543
16058
  const [errors, setErrors] = _react.useState.call(void 0, {});
15544
16059
  const validate = _react.useCallback.call(void 0, () => {
@@ -15766,7 +16281,7 @@ function OAuthClientDetail({
15766
16281
  ] }),
15767
16282
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
15768
16283
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Allowed Scopes" }),
15769
- /* @__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([_chunkULHMVHDSjs.OAUTH_SCOPE_DISPLAY, 'access', _384 => _384[scope], 'optionalAccess', _385 => _385.name]) || scope }, scope)) })
16284
+ /* @__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([_chunkULHMVHDSjs.OAUTH_SCOPE_DISPLAY, 'access', _413 => _413[scope], 'optionalAccess', _414 => _414.name]) || scope }, scope)) })
15770
16285
  ] }),
15771
16286
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
15772
16287
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Grant Types" }),
@@ -15910,7 +16425,7 @@ function OAuthConsentScreen({
15910
16425
  if (error || !clientInfo) {
15911
16426
  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: [
15912
16427
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertTriangle, { className: "h-4 w-4" }),
15913
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _386 => _386.message]) || "Invalid authorization request. Please try again." })
16428
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _415 => _415.message]) || "Invalid authorization request. Please try again." })
15914
16429
  ] }) }) }) });
15915
16430
  }
15916
16431
  const { client, scopes } = clientInfo;
@@ -16126,7 +16641,7 @@ function WaitlistForm({ onSuccess }) {
16126
16641
  questionnaire: values.questionnaire
16127
16642
  });
16128
16643
  setIsSuccess(true);
16129
- _optionalChain([onSuccess, 'optionalCall', _387 => _387()]);
16644
+ _optionalChain([onSuccess, 'optionalCall', _416 => _416()]);
16130
16645
  } catch (e) {
16131
16646
  errorToast({ error: e });
16132
16647
  } finally {
@@ -16884,5 +17399,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, WaitlistList, "WaitlistList");
16884
17399
 
16885
17400
 
16886
17401
 
16887
- 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 = useDebounce; exports.registerTableGenerator = registerTableGenerator; exports.useTableGenerator = useTableGenerator; exports.useCustomD3Graph = useCustomD3Graph; exports.SocketContext = SocketContext; exports.SocketProvider = SocketProvider; exports.useSocketContext = useSocketContext; exports.CurrentUserProvider = CurrentUserProvider; exports.useCurrentUserContext = useCurrentUserContext; exports.HeaderChildrenProvider = HeaderChildrenProvider; exports.useHeaderChildren = useHeaderChildren; 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.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.Input = Input; exports.Textarea = Textarea; exports.InputGroup = InputGroup; exports.InputGroupAddon = InputGroupAddon; exports.InputGroupButton = InputGroupButton; exports.InputGroupText = InputGroupText; exports.InputGroupInput = InputGroupInput; exports.InputGroupTextarea = InputGroupTextarea; 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.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.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.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.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.ReactMarkdownContainer = ReactMarkdownContainer; exports.TabsContainer = TabsContainer; exports.AttributeElement = AttributeElement; exports.UserDetails = UserDetails; exports.UserAvatar = UserAvatar; 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.errorToast = errorToast; exports.BlockNoteEditorContainer = BlockNoteEditorContainer; exports.CommonAssociationTrigger = CommonAssociationTrigger; exports.CommonAssociationCommandDialog = CommonAssociationCommandDialog; exports.triggerAssociationToast = triggerAssociationToast; exports.CommonDeleter = CommonDeleter; exports.CommonEditorButtons = CommonEditorButtons; exports.CommonEditorHeader = CommonEditorHeader; exports.CommonEditorTrigger = CommonEditorTrigger; exports.DatePickerPopover = DatePickerPopover; exports.DateRangeSelector = DateRangeSelector; exports.useFileUpload = useFileUpload; exports.FileUploader = FileUploader; exports.FileUploaderContent = FileUploaderContent; exports.FileUploaderItem = FileUploaderItem; exports.FileInput = FileInput; exports.FormFieldWrapper = FormFieldWrapper; exports.FormCheckbox = FormCheckbox; exports.FormDate = FormDate; exports.FormDateTime = FormDateTime; exports.FormInput = FormInput; 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.FormFeatures = FormFeatures; exports.PageContainerContentDetails = PageContainerContentDetails; exports.PageContentContainer = PageContentContainer; exports.cellComponent = cellComponent; exports.cellDate = cellDate; exports.cellId = cellId; exports.cellLink = cellLink; exports.cellUrl = cellUrl; exports.ContentTableSearch = ContentTableSearch; exports.ContentListTable = ContentListTable; 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.CompanyDetails = CompanyDetails; exports.AdminCompanyContainer = AdminCompanyContainer; exports.CompanyContainer = CompanyContainer; exports.TokenStatusIndicator = TokenStatusIndicator; exports.CompanyConfigurationSecurityForm = CompanyConfigurationSecurityForm; exports.CompanyConfigurationEditor = CompanyConfigurationEditor; exports.CompanyDeleter = CompanyDeleter; exports.CompanyEditor = CompanyEditor; exports.CompaniesList = CompaniesList; exports.ContentsList = ContentsList; exports.ContentsListById = ContentsListById; exports.RelevantContentsList = RelevantContentsList; 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.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.useUserSearch = useUserSearch; exports.useUserTableStructure = useUserTableStructure; exports.useContentTableStructure = useContentTableStructure; exports.useOAuthClients = useOAuthClients; exports.useOAuthClient = useOAuthClient;
16888
- //# sourceMappingURL=chunk-SUJ4GXAI.js.map
17402
+
17403
+
17404
+ 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 = useDebounce; exports.registerTableGenerator = registerTableGenerator; exports.useTableGenerator = useTableGenerator; exports.useCustomD3Graph = useCustomD3Graph; exports.SocketContext = SocketContext; exports.SocketProvider = SocketProvider; exports.useSocketContext = useSocketContext; exports.CurrentUserProvider = CurrentUserProvider; exports.useCurrentUserContext = useCurrentUserContext; exports.HeaderChildrenProvider = HeaderChildrenProvider; exports.useHeaderChildren = useHeaderChildren; 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.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.Input = Input; exports.Textarea = Textarea; exports.InputGroup = InputGroup; exports.InputGroupAddon = InputGroupAddon; exports.InputGroupButton = InputGroupButton; exports.InputGroupText = InputGroupText; exports.InputGroupInput = InputGroupInput; exports.InputGroupTextarea = InputGroupTextarea; 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.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.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.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 = useDebounce2; exports.MultipleSelector = MultipleSelector; 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.ReactMarkdownContainer = ReactMarkdownContainer; exports.TabsContainer = TabsContainer; exports.AttributeElement = AttributeElement; exports.UserDetails = UserDetails; exports.UserAvatar = UserAvatar; 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.errorToast = errorToast; exports.BlockNoteEditorContainer = BlockNoteEditorContainer; exports.CommonAssociationTrigger = CommonAssociationTrigger; exports.CommonAssociationCommandDialog = CommonAssociationCommandDialog; exports.triggerAssociationToast = triggerAssociationToast; exports.CommonDeleter = CommonDeleter; exports.CommonEditorButtons = CommonEditorButtons; exports.CommonEditorHeader = CommonEditorHeader; exports.CommonEditorTrigger = CommonEditorTrigger; exports.DatePickerPopover = DatePickerPopover; exports.DateRangeSelector = DateRangeSelector; exports.useFileUpload = useFileUpload; exports.FileUploader = FileUploader; exports.FileUploaderContent = FileUploaderContent; exports.FileUploaderItem = FileUploaderItem; exports.FileInput = FileInput; exports.FormFieldWrapper = FormFieldWrapper; exports.FormCheckbox = FormCheckbox; exports.FormDate = FormDate; exports.FormDateTime = FormDateTime; exports.FormInput = FormInput; 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.FormFeatures = FormFeatures; exports.PageContainerContentDetails = PageContainerContentDetails; exports.PageContentContainer = PageContentContainer; exports.cellComponent = cellComponent; exports.cellDate = cellDate; exports.cellId = cellId; exports.cellLink = cellLink; exports.cellUrl = cellUrl; exports.ContentTableSearch = ContentTableSearch; exports.ContentListTable = ContentListTable; 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.CompanyDetails = CompanyDetails; exports.AdminCompanyContainer = AdminCompanyContainer; exports.CompanyContainer = CompanyContainer; exports.TokenStatusIndicator = TokenStatusIndicator; exports.CompanyConfigurationSecurityForm = CompanyConfigurationSecurityForm; exports.CompanyConfigurationEditor = CompanyConfigurationEditor; exports.CompanyDeleter = CompanyDeleter; exports.CompanyEditor = CompanyEditor; exports.CompaniesList = CompaniesList; exports.ContentsList = ContentsList; exports.ContentsListById = ContentsListById; exports.RelevantContentsList = RelevantContentsList; 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.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.useUserSearch = useUserSearch; exports.useUserTableStructure = useUserTableStructure; exports.useContentTableStructure = useContentTableStructure; exports.useOAuthClients = useOAuthClients; exports.useOAuthClient = useOAuthClient;
17405
+ //# sourceMappingURL=chunk-6RE6272L.js.map