@carlonicora/nextjs-jsonapi 1.121.0 → 1.123.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.
@@ -4417,16 +4417,33 @@ _chunk7QVYU63Ejs.__name.call(void 0, TableCaption, "TableCaption");
4417
4417
  var _tabs = require('@base-ui/react/tabs');
4418
4418
 
4419
4419
 
4420
- function Tabs({ className, orientation = "horizontal", ...props }) {
4421
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4420
+
4421
+ var TabsActiveValueContext = _react.createContext.call(void 0, void 0);
4422
+ function Tabs({
4423
+ className,
4424
+ orientation = "horizontal",
4425
+ value,
4426
+ defaultValue,
4427
+ onValueChange,
4428
+ ...props
4429
+ }) {
4430
+ const [uncontrolledValue, setUncontrolledValue] = _react.useState.call(void 0, defaultValue);
4431
+ const activeValue = value !== void 0 ? value : uncontrolledValue;
4432
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TabsActiveValueContext.Provider, { value: activeValue, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4422
4433
  _tabs.Tabs.Root,
4423
4434
  {
4424
4435
  "data-slot": "tabs",
4425
4436
  "data-orientation": orientation,
4426
4437
  className: _chunkPQBKPWBYjs.cn.call(void 0, "gap-2 group/tabs flex data-[orientation=horizontal]:flex-col", className),
4438
+ value,
4439
+ defaultValue,
4440
+ onValueChange: (newValue, eventDetails) => {
4441
+ setUncontrolledValue(newValue);
4442
+ _optionalChain([onValueChange, 'optionalCall', _44 => _44(newValue, eventDetails)]);
4443
+ },
4427
4444
  ...props
4428
4445
  }
4429
- );
4446
+ ) });
4430
4447
  }
4431
4448
  _chunk7QVYU63Ejs.__name.call(void 0, Tabs, "Tabs");
4432
4449
  var tabsListVariants = _classvarianceauthority.cva.call(void 0,
@@ -4476,13 +4493,21 @@ function TabsTrigger({ className, ...props }) {
4476
4493
  );
4477
4494
  }
4478
4495
  _chunk7QVYU63Ejs.__name.call(void 0, TabsTrigger, "TabsTrigger");
4479
- function TabsContent({ className, ...props }) {
4496
+ function TabsContent({ className, value, keepMounted, children, ...props }) {
4497
+ const activeValue = _react.useContext.call(void 0, TabsActiveValueContext);
4498
+ const isActive = activeValue !== void 0 && activeValue === value;
4499
+ const [hasBeenActive, setHasBeenActive] = _react.useState.call(void 0, isActive);
4500
+ if (isActive && !hasBeenActive) setHasBeenActive(true);
4501
+ const shouldRenderChildren = !keepMounted || activeValue === void 0 || hasBeenActive;
4480
4502
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4481
4503
  _tabs.Tabs.Panel,
4482
4504
  {
4483
4505
  "data-slot": "tabs-content",
4506
+ value,
4507
+ keepMounted,
4484
4508
  className: _chunkPQBKPWBYjs.cn.call(void 0, "text-xs/relaxed flex-1 outline-none", className),
4485
- ...props
4509
+ ...props,
4510
+ children: shouldRenderChildren ? children : null
4486
4511
  }
4487
4512
  );
4488
4513
  }
@@ -4561,14 +4586,14 @@ var coordinateGetter = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (eve
4561
4586
  if (!active || !collisionRect) return;
4562
4587
  const filteredContainers = [];
4563
4588
  for (const entry of droppableContainers.getEnabled()) {
4564
- if (!entry || _optionalChain([entry, 'optionalAccess', _44 => _44.disabled])) return;
4589
+ if (!entry || _optionalChain([entry, 'optionalAccess', _45 => _45.disabled])) return;
4565
4590
  const rect = droppableRects.get(entry.id);
4566
4591
  if (!rect) return;
4567
4592
  const data = entry.data.current;
4568
4593
  if (data) {
4569
4594
  const { type, children } = data;
4570
- if (type === "container" && _optionalChain([children, 'optionalAccess', _45 => _45.length]) > 0) {
4571
- if (_optionalChain([active, 'access', _46 => _46.data, 'access', _47 => _47.current, 'optionalAccess', _48 => _48.type]) !== "container") {
4595
+ if (type === "container" && _optionalChain([children, 'optionalAccess', _46 => _46.length]) > 0) {
4596
+ if (_optionalChain([active, 'access', _47 => _47.data, 'access', _48 => _48.current, 'optionalAccess', _49 => _49.type]) !== "container") {
4572
4597
  return;
4573
4598
  }
4574
4599
  }
@@ -4606,8 +4631,8 @@ var coordinateGetter = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (eve
4606
4631
  const closestId = _core.getFirstCollision.call(void 0, collisions, "id");
4607
4632
  if (closestId != null) {
4608
4633
  const newDroppable = droppableContainers.get(closestId);
4609
- const newNode = _optionalChain([newDroppable, 'optionalAccess', _49 => _49.node, 'access', _50 => _50.current]);
4610
- const newRect = _optionalChain([newDroppable, 'optionalAccess', _51 => _51.rect, 'access', _52 => _52.current]);
4634
+ const newNode = _optionalChain([newDroppable, 'optionalAccess', _50 => _50.node, 'access', _51 => _51.current]);
4635
+ const newRect = _optionalChain([newDroppable, 'optionalAccess', _52 => _52.rect, 'access', _53 => _53.current]);
4611
4636
  if (newNode && newRect) {
4612
4637
  if (newDroppable.id === "placeholder") {
4613
4638
  return {
@@ -4615,7 +4640,7 @@ var coordinateGetter = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (eve
4615
4640
  y: newRect.top + (newRect.height - collisionRect.height) / 2
4616
4641
  };
4617
4642
  }
4618
- if (_optionalChain([newDroppable, 'access', _53 => _53.data, 'access', _54 => _54.current, 'optionalAccess', _55 => _55.type]) === "container") {
4643
+ if (_optionalChain([newDroppable, 'access', _54 => _54.data, 'access', _55 => _55.current, 'optionalAccess', _56 => _56.type]) === "container") {
4619
4644
  return {
4620
4645
  x: newRect.left + 20,
4621
4646
  y: newRect.top + 74
@@ -4719,7 +4744,7 @@ function KanbanRoot(props) {
4719
4744
  )
4720
4745
  });
4721
4746
  if (closestItem.length > 0) {
4722
- overId = _nullishCoalesce(_optionalChain([closestItem, 'access', _56 => _56[0], 'optionalAccess', _57 => _57.id]), () => ( overId));
4747
+ overId = _nullishCoalesce(_optionalChain([closestItem, 'access', _57 => _57[0], 'optionalAccess', _58 => _58.id]), () => ( overId));
4723
4748
  }
4724
4749
  }
4725
4750
  }
@@ -4730,7 +4755,7 @@ function KanbanRoot(props) {
4730
4755
  );
4731
4756
  const onDragStart = React9.useCallback(
4732
4757
  (event) => {
4733
- _optionalChain([kanbanProps, 'access', _58 => _58.onDragStart, 'optionalCall', _59 => _59(event)]);
4758
+ _optionalChain([kanbanProps, 'access', _59 => _59.onDragStart, 'optionalCall', _60 => _60(event)]);
4734
4759
  if (event.activatorEvent.defaultPrevented) return;
4735
4760
  setActiveId(event.active.id);
4736
4761
  },
@@ -4738,7 +4763,7 @@ function KanbanRoot(props) {
4738
4763
  );
4739
4764
  const onDragOver = React9.useCallback(
4740
4765
  (event) => {
4741
- _optionalChain([kanbanProps, 'access', _60 => _60.onDragOver, 'optionalCall', _61 => _61(event)]);
4766
+ _optionalChain([kanbanProps, 'access', _61 => _61.onDragOver, 'optionalCall', _62 => _62(event)]);
4742
4767
  if (event.activatorEvent.defaultPrevented) return;
4743
4768
  const { active, over } = event;
4744
4769
  if (!over) return;
@@ -4753,7 +4778,7 @@ function KanbanRoot(props) {
4753
4778
  if (activeIndex !== overIndex) {
4754
4779
  const newColumns = { ...value };
4755
4780
  newColumns[activeColumn] = _sortable.arrayMove.call(void 0, items, activeIndex, overIndex);
4756
- _optionalChain([onValueChange, 'optionalCall', _62 => _62(newColumns)]);
4781
+ _optionalChain([onValueChange, 'optionalCall', _63 => _63(newColumns)]);
4757
4782
  }
4758
4783
  } else {
4759
4784
  const activeItems = value[activeColumn];
@@ -4768,7 +4793,7 @@ function KanbanRoot(props) {
4768
4793
  [activeColumn]: activeItems.filter((item) => getItemValue(item) !== active.id),
4769
4794
  [overColumn]: [...overItems, activeItem]
4770
4795
  };
4771
- _optionalChain([onValueChange, 'optionalCall', _63 => _63(updatedItems)]);
4796
+ _optionalChain([onValueChange, 'optionalCall', _64 => _64(updatedItems)]);
4772
4797
  hasMovedRef.current = true;
4773
4798
  }
4774
4799
  },
@@ -4776,7 +4801,7 @@ function KanbanRoot(props) {
4776
4801
  );
4777
4802
  const onDragEnd = React9.useCallback(
4778
4803
  (event) => {
4779
- _optionalChain([kanbanProps, 'access', _64 => _64.onDragEnd, 'optionalCall', _65 => _65(event)]);
4804
+ _optionalChain([kanbanProps, 'access', _65 => _65.onDragEnd, 'optionalCall', _66 => _66(event)]);
4780
4805
  if (event.activatorEvent.defaultPrevented) return;
4781
4806
  const { active, over } = event;
4782
4807
  if (!over) {
@@ -4799,7 +4824,7 @@ function KanbanRoot(props) {
4799
4824
  if (onMove) {
4800
4825
  onMove({ ...event, activeIndex, overIndex });
4801
4826
  } else {
4802
- _optionalChain([onValueChange, 'optionalCall', _66 => _66(newColumns)]);
4827
+ _optionalChain([onValueChange, 'optionalCall', _67 => _67(newColumns)]);
4803
4828
  }
4804
4829
  }
4805
4830
  } else {
@@ -4827,7 +4852,7 @@ function KanbanRoot(props) {
4827
4852
  overIndex
4828
4853
  });
4829
4854
  } else {
4830
- _optionalChain([onValueChange, 'optionalCall', _67 => _67(newColumns)]);
4855
+ _optionalChain([onValueChange, 'optionalCall', _68 => _68(newColumns)]);
4831
4856
  }
4832
4857
  }
4833
4858
  }
@@ -4839,7 +4864,7 @@ function KanbanRoot(props) {
4839
4864
  );
4840
4865
  const onDragCancel = React9.useCallback(
4841
4866
  (event) => {
4842
- _optionalChain([kanbanProps, 'access', _68 => _68.onDragCancel, 'optionalCall', _69 => _69(event)]);
4867
+ _optionalChain([kanbanProps, 'access', _69 => _69.onDragCancel, 'optionalCall', _70 => _70(event)]);
4843
4868
  if (event.activatorEvent.defaultPrevented) return;
4844
4869
  setActiveId(null);
4845
4870
  hasMovedRef.current = false;
@@ -4858,7 +4883,7 @@ function KanbanRoot(props) {
4858
4883
  })();
4859
4884
  const total = isColumn ? Object.keys(value).length : (() => {
4860
4885
  const column = getColumn(active.id);
4861
- return column ? _nullishCoalesce(_optionalChain([value, 'access', _70 => _70[column], 'optionalAccess', _71 => _71.length]), () => ( 0)) : 0;
4886
+ return column ? _nullishCoalesce(_optionalChain([value, 'access', _71 => _71[column], 'optionalAccess', _72 => _72.length]), () => ( 0)) : 0;
4862
4887
  })();
4863
4888
  return `Picked up ${itemType} at position ${position} of ${total}`;
4864
4889
  },
@@ -4873,7 +4898,7 @@ function KanbanRoot(props) {
4873
4898
  })();
4874
4899
  const total = isColumn ? Object.keys(value).length : (() => {
4875
4900
  const column = getColumn(over.id);
4876
- return column ? _nullishCoalesce(_optionalChain([value, 'access', _72 => _72[column], 'optionalAccess', _73 => _73.length]), () => ( 0)) : 0;
4901
+ return column ? _nullishCoalesce(_optionalChain([value, 'access', _73 => _73[column], 'optionalAccess', _74 => _74.length]), () => ( 0)) : 0;
4877
4902
  })();
4878
4903
  const overColumn = getColumn(over.id);
4879
4904
  const activeColumn = getColumn(active.id);
@@ -4896,7 +4921,7 @@ function KanbanRoot(props) {
4896
4921
  })();
4897
4922
  const total = isColumn ? Object.keys(value).length : (() => {
4898
4923
  const column = getColumn(over.id);
4899
- return column ? _nullishCoalesce(_optionalChain([value, 'access', _74 => _74[column], 'optionalAccess', _75 => _75.length]), () => ( 0)) : 0;
4924
+ return column ? _nullishCoalesce(_optionalChain([value, 'access', _75 => _75[column], 'optionalAccess', _76 => _76.length]), () => ( 0)) : 0;
4900
4925
  })();
4901
4926
  const overColumn = getColumn(over.id);
4902
4927
  const activeColumn = getColumn(active.id);
@@ -5242,7 +5267,7 @@ function KanbanOverlay(props) {
5242
5267
  const context = useKanbanContext(OVERLAY_NAME);
5243
5268
  const [mounted, setMounted] = React9.useState(false);
5244
5269
  React9.useLayoutEffect(() => setMounted(true), []);
5245
- const container = _nullishCoalesce(containerProp, () => ( (mounted ? _optionalChain([globalThis, 'access', _76 => _76.document, 'optionalAccess', _77 => _77.body]) : null)));
5270
+ const container = _nullishCoalesce(containerProp, () => ( (mounted ? _optionalChain([globalThis, 'access', _77 => _77.document, 'optionalAccess', _78 => _78.body]) : null)));
5246
5271
  if (!container) return null;
5247
5272
  const variant = context.activeId && context.activeId in context.items ? "column" : "item";
5248
5273
  return ReactDOM.createPortal(
@@ -5391,7 +5416,7 @@ var MultiSelect = React11.forwardRef(
5391
5416
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap items-center", children: [
5392
5417
  selectedValues.slice(0, maxCount).map((value2) => {
5393
5418
  const option = options.find((o) => o.value === value2);
5394
- const IconComponent = _optionalChain([option, 'optionalAccess', _78 => _78.icon]);
5419
+ const IconComponent = _optionalChain([option, 'optionalAccess', _79 => _79.icon]);
5395
5420
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
5396
5421
  Badge,
5397
5422
  {
@@ -5399,7 +5424,7 @@ var MultiSelect = React11.forwardRef(
5399
5424
  style: { animationDuration: `${animation}s` },
5400
5425
  children: [
5401
5426
  IconComponent && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, IconComponent, { className: "mr-2 h-4 w-4" }),
5402
- _nullishCoalesce(_optionalChain([option, 'optionalAccess', _79 => _79.selectedLabel]), () => ( _optionalChain([option, 'optionalAccess', _80 => _80.label]))),
5427
+ _nullishCoalesce(_optionalChain([option, 'optionalAccess', _80 => _80.selectedLabel]), () => ( _optionalChain([option, 'optionalAccess', _81 => _81.label]))),
5403
5428
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
5404
5429
  _lucidereact.XCircle,
5405
5430
  {
@@ -5696,7 +5721,7 @@ var MultipleSelector = React12.forwardRef(
5696
5721
  () => ({
5697
5722
  selectedValue: [...selected],
5698
5723
  input: inputRef.current,
5699
- focus: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => _optionalChain([inputRef, 'optionalAccess', _81 => _81.current, 'optionalAccess', _82 => _82.focus, 'call', _83 => _83()]), "focus"),
5724
+ focus: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => _optionalChain([inputRef, 'optionalAccess', _82 => _82.current, 'optionalAccess', _83 => _83.focus, 'call', _84 => _84()]), "focus"),
5700
5725
  reset: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => setSelected([]), "reset")
5701
5726
  }),
5702
5727
  [selected]
@@ -5711,7 +5736,7 @@ var MultipleSelector = React12.forwardRef(
5711
5736
  (option) => {
5712
5737
  const newOptions = selected.filter((s) => s.value !== option.value);
5713
5738
  setSelected(newOptions);
5714
- _optionalChain([onChange, 'optionalCall', _84 => _84(newOptions)]);
5739
+ _optionalChain([onChange, 'optionalCall', _85 => _85(newOptions)]);
5715
5740
  },
5716
5741
  [onChange, selected]
5717
5742
  );
@@ -5763,7 +5788,7 @@ var MultipleSelector = React12.forwardRef(
5763
5788
  }, [arrayDefaultOptions, arrayOptions, groupBy, onSearch, options]);
5764
5789
  _react.useEffect.call(void 0, () => {
5765
5790
  const doSearchSync = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
5766
- const res = _optionalChain([onSearchSync, 'optionalCall', _85 => _85(debouncedSearchTerm)]);
5791
+ const res = _optionalChain([onSearchSync, 'optionalCall', _86 => _86(debouncedSearchTerm)]);
5767
5792
  setOptions(transToGroupOption(res || [], groupBy));
5768
5793
  }, "doSearchSync");
5769
5794
  const exec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
@@ -5808,7 +5833,7 @@ var MultipleSelector = React12.forwardRef(
5808
5833
  _react.useEffect.call(void 0, () => {
5809
5834
  const doSearch = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
5810
5835
  setIsLoading(true);
5811
- const res = await _optionalChain([onSearch, 'optionalCall', _86 => _86(debouncedSearchTerm)]);
5836
+ const res = await _optionalChain([onSearch, 'optionalCall', _87 => _87(debouncedSearchTerm)]);
5812
5837
  setOptions(transToGroupOption(res || [], groupBy));
5813
5838
  setIsLoading(false);
5814
5839
  }, "doSearch");
@@ -5839,13 +5864,13 @@ var MultipleSelector = React12.forwardRef(
5839
5864
  },
5840
5865
  onSelect: (value2) => {
5841
5866
  if (selected.length >= maxSelected) {
5842
- _optionalChain([onMaxSelected, 'optionalCall', _87 => _87(selected.length)]);
5867
+ _optionalChain([onMaxSelected, 'optionalCall', _88 => _88(selected.length)]);
5843
5868
  return;
5844
5869
  }
5845
5870
  setInputValue("");
5846
5871
  const newOptions = [...selected, { value: value2, label: value2 }];
5847
5872
  setSelected(newOptions);
5848
- _optionalChain([onChange, 'optionalCall', _88 => _88(newOptions)]);
5873
+ _optionalChain([onChange, 'optionalCall', _89 => _89(newOptions)]);
5849
5874
  },
5850
5875
  children: `Create "${inputValue}"`
5851
5876
  }
@@ -5867,7 +5892,7 @@ var MultipleSelector = React12.forwardRef(
5867
5892
  }, [creatable, emptyIndicator, onSearch, options]);
5868
5893
  const selectables = React12.useMemo(() => removePickedOption(options, selected), [options, selected]);
5869
5894
  const commandFilter = React12.useCallback(() => {
5870
- if (_optionalChain([commandProps, 'optionalAccess', _89 => _89.filter])) {
5895
+ if (_optionalChain([commandProps, 'optionalAccess', _90 => _90.filter])) {
5871
5896
  return commandProps.filter;
5872
5897
  }
5873
5898
  if (creatable) {
@@ -5876,7 +5901,7 @@ var MultipleSelector = React12.forwardRef(
5876
5901
  };
5877
5902
  }
5878
5903
  return void 0;
5879
- }, [creatable, _optionalChain([commandProps, 'optionalAccess', _90 => _90.filter])]);
5904
+ }, [creatable, _optionalChain([commandProps, 'optionalAccess', _91 => _91.filter])]);
5880
5905
  const displayedBadges = maxDisplayCount ? selected.slice(0, maxDisplayCount) : selected;
5881
5906
  const hiddenCount = maxDisplayCount ? Math.max(0, selected.length - maxDisplayCount) : 0;
5882
5907
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -5886,10 +5911,10 @@ var MultipleSelector = React12.forwardRef(
5886
5911
  ...commandProps,
5887
5912
  onKeyDown: (e) => {
5888
5913
  handleKeyDown(e);
5889
- _optionalChain([commandProps, 'optionalAccess', _91 => _91.onKeyDown, 'optionalCall', _92 => _92(e)]);
5914
+ _optionalChain([commandProps, 'optionalAccess', _92 => _92.onKeyDown, 'optionalCall', _93 => _93(e)]);
5890
5915
  },
5891
- className: _chunkPQBKPWBYjs.cn.call(void 0, "h-auto overflow-visible bg-transparent!", _optionalChain([commandProps, 'optionalAccess', _93 => _93.className])),
5892
- shouldFilter: _optionalChain([commandProps, 'optionalAccess', _94 => _94.shouldFilter]) !== void 0 ? commandProps.shouldFilter : !onSearch,
5916
+ className: _chunkPQBKPWBYjs.cn.call(void 0, "h-auto overflow-visible bg-transparent!", _optionalChain([commandProps, 'optionalAccess', _94 => _94.className])),
5917
+ shouldFilter: _optionalChain([commandProps, 'optionalAccess', _95 => _95.shouldFilter]) !== void 0 ? commandProps.shouldFilter : !onSearch,
5893
5918
  filter: commandFilter(),
5894
5919
  children: [
5895
5920
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -5905,7 +5930,7 @@ var MultipleSelector = React12.forwardRef(
5905
5930
  ),
5906
5931
  onClick: () => {
5907
5932
  if (disabled) return;
5908
- _optionalChain([inputRef, 'optionalAccess', _95 => _95.current, 'optionalAccess', _96 => _96.focus, 'call', _97 => _97()]);
5933
+ _optionalChain([inputRef, 'optionalAccess', _96 => _96.current, 'optionalAccess', _97 => _97.focus, 'call', _98 => _98()]);
5909
5934
  },
5910
5935
  children: [
5911
5936
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative flex flex-1 flex-wrap gap-1", children: [
@@ -5959,17 +5984,17 @@ var MultipleSelector = React12.forwardRef(
5959
5984
  disabled,
5960
5985
  onValueChange: (value2) => {
5961
5986
  setInputValue(value2);
5962
- _optionalChain([inputProps, 'optionalAccess', _98 => _98.onValueChange, 'optionalCall', _99 => _99(value2)]);
5987
+ _optionalChain([inputProps, 'optionalAccess', _99 => _99.onValueChange, 'optionalCall', _100 => _100(value2)]);
5963
5988
  },
5964
5989
  onBlur: (event) => {
5965
5990
  if (!onScrollbar) {
5966
5991
  setOpen(false);
5967
5992
  }
5968
- _optionalChain([inputProps, 'optionalAccess', _100 => _100.onBlur, 'optionalCall', _101 => _101(event)]);
5993
+ _optionalChain([inputProps, 'optionalAccess', _101 => _101.onBlur, 'optionalCall', _102 => _102(event)]);
5969
5994
  },
5970
5995
  onFocus: (event) => {
5971
5996
  setOpen(true);
5972
- _optionalChain([inputProps, 'optionalAccess', _102 => _102.onFocus, 'optionalCall', _103 => _103(event)]);
5997
+ _optionalChain([inputProps, 'optionalAccess', _103 => _103.onFocus, 'optionalCall', _104 => _104(event)]);
5973
5998
  },
5974
5999
  placeholder: hidePlaceholderWhenSelected && selected.length !== 0 ? "" : placeholder,
5975
6000
  className: _chunkPQBKPWBYjs.cn.call(void 0,
@@ -5978,7 +6003,7 @@ var MultipleSelector = React12.forwardRef(
5978
6003
  "w-full": hidePlaceholderWhenSelected,
5979
6004
  "ml-1": selected.length !== 0
5980
6005
  },
5981
- _optionalChain([inputProps, 'optionalAccess', _104 => _104.className])
6006
+ _optionalChain([inputProps, 'optionalAccess', _105 => _105.className])
5982
6007
  )
5983
6008
  }
5984
6009
  )
@@ -5990,7 +6015,7 @@ var MultipleSelector = React12.forwardRef(
5990
6015
  type: "button",
5991
6016
  onClick: () => {
5992
6017
  setSelected(selected.filter((s) => s.fixed));
5993
- _optionalChain([onChange, 'optionalCall', _105 => _105(selected.filter((s) => s.fixed))]);
6018
+ _optionalChain([onChange, 'optionalCall', _106 => _106(selected.filter((s) => s.fixed))]);
5994
6019
  },
5995
6020
  className: _chunkPQBKPWBYjs.cn.call(void 0,
5996
6021
  "size-5",
@@ -6015,7 +6040,7 @@ var MultipleSelector = React12.forwardRef(
6015
6040
  setOnScrollbar(true);
6016
6041
  },
6017
6042
  onMouseUp: () => {
6018
- _optionalChain([inputRef, 'optionalAccess', _106 => _106.current, 'optionalAccess', _107 => _107.focus, 'call', _108 => _108()]);
6043
+ _optionalChain([inputRef, 'optionalAccess', _107 => _107.current, 'optionalAccess', _108 => _108.focus, 'call', _109 => _109()]);
6019
6044
  },
6020
6045
  children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: loadingIndicator }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
6021
6046
  EmptyItem(),
@@ -6038,13 +6063,13 @@ var MultipleSelector = React12.forwardRef(
6038
6063
  },
6039
6064
  onSelect: () => {
6040
6065
  if (selected.length >= maxSelected) {
6041
- _optionalChain([onMaxSelected, 'optionalCall', _109 => _109(selected.length)]);
6066
+ _optionalChain([onMaxSelected, 'optionalCall', _110 => _110(selected.length)]);
6042
6067
  return;
6043
6068
  }
6044
6069
  setInputValue("");
6045
6070
  const newOptions = [...selected, option];
6046
6071
  setSelected(newOptions);
6047
- _optionalChain([onChange, 'optionalCall', _110 => _110(newOptions)]);
6072
+ _optionalChain([onChange, 'optionalCall', _111 => _111(newOptions)]);
6048
6073
  },
6049
6074
  className: _chunkPQBKPWBYjs.cn.call(void 0,
6050
6075
  "cursor-pointer bg-transparent hover:bg-accent data-selected:bg-transparent data-selected:hover:bg-accent",
@@ -6079,7 +6104,7 @@ var MultipleSelector = React12.forwardRef(
6079
6104
  setOnScrollbar(true);
6080
6105
  },
6081
6106
  onMouseUp: () => {
6082
- _optionalChain([inputRef, 'optionalAccess', _111 => _111.current, 'optionalAccess', _112 => _112.focus, 'call', _113 => _113()]);
6107
+ _optionalChain([inputRef, 'optionalAccess', _112 => _112.current, 'optionalAccess', _113 => _113.focus, 'call', _114 => _114()]);
6083
6108
  },
6084
6109
  children: isLoading ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: loadingIndicator }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
6085
6110
  EmptyItem(),
@@ -6102,13 +6127,13 @@ var MultipleSelector = React12.forwardRef(
6102
6127
  },
6103
6128
  onSelect: () => {
6104
6129
  if (selected.length >= maxSelected) {
6105
- _optionalChain([onMaxSelected, 'optionalCall', _114 => _114(selected.length)]);
6130
+ _optionalChain([onMaxSelected, 'optionalCall', _115 => _115(selected.length)]);
6106
6131
  return;
6107
6132
  }
6108
6133
  setInputValue("");
6109
6134
  const newOptions = [...selected, option];
6110
6135
  setSelected(newOptions);
6111
- _optionalChain([onChange, 'optionalCall', _115 => _115(newOptions)]);
6136
+ _optionalChain([onChange, 'optionalCall', _116 => _116(newOptions)]);
6112
6137
  },
6113
6138
  className: _chunkPQBKPWBYjs.cn.call(void 0,
6114
6139
  "cursor-pointer bg-transparent hover:bg-accent data-selected:bg-transparent data-selected:hover:bg-accent",
@@ -6328,19 +6353,19 @@ function useDataListRetriever(params) {
6328
6353
  const fetchData = _react.useCallback.call(void 0,
6329
6354
  async (fetchParams) => {
6330
6355
  if (ready === false) return;
6331
- if ((_optionalChain([fetchParams, 'optionalAccess', _116 => _116.callNext]) || _optionalChain([fetchParams, 'optionalAccess', _117 => _117.callPrevious])) && isPaginatingRef.current) {
6356
+ if ((_optionalChain([fetchParams, 'optionalAccess', _117 => _117.callNext]) || _optionalChain([fetchParams, 'optionalAccess', _118 => _118.callPrevious])) && isPaginatingRef.current) {
6332
6357
  return;
6333
6358
  }
6334
- if (isFetchingRef.current && !_optionalChain([fetchParams, 'optionalAccess', _118 => _118.callNext]) && !_optionalChain([fetchParams, 'optionalAccess', _119 => _119.callPrevious])) return;
6335
- if (_optionalChain([fetchParams, 'optionalAccess', _120 => _120.callNext]) || _optionalChain([fetchParams, 'optionalAccess', _121 => _121.callPrevious])) {
6359
+ if (isFetchingRef.current && !_optionalChain([fetchParams, 'optionalAccess', _119 => _119.callNext]) && !_optionalChain([fetchParams, 'optionalAccess', _120 => _120.callPrevious])) return;
6360
+ if (_optionalChain([fetchParams, 'optionalAccess', _121 => _121.callNext]) || _optionalChain([fetchParams, 'optionalAccess', _122 => _122.callPrevious])) {
6336
6361
  isPaginatingRef.current = true;
6337
6362
  }
6338
6363
  const thisRequestId = ++requestIdRef.current;
6339
6364
  isFetchingRef.current = true;
6340
- if (stableParams.requiresSearch === true && _optionalChain([fetchParams, 'optionalAccess', _122 => _122.isRefine]) !== true && _optionalChain([fetchParams, 'optionalAccess', _123 => _123.isRefresh]) !== true) {
6365
+ if (stableParams.requiresSearch === true && _optionalChain([fetchParams, 'optionalAccess', _123 => _123.isRefine]) !== true && _optionalChain([fetchParams, 'optionalAccess', _124 => _124.isRefresh]) !== true) {
6341
6366
  return;
6342
6367
  }
6343
- if (!nextPage && !previousPage && isLoaded && _optionalChain([fetchParams, 'optionalAccess', _124 => _124.callNext]) !== true && _optionalChain([fetchParams, 'optionalAccess', _125 => _125.callPrevious]) !== true && params.search === searchTermRef.current) {
6368
+ if (!nextPage && !previousPage && isLoaded && _optionalChain([fetchParams, 'optionalAccess', _125 => _125.callNext]) !== true && _optionalChain([fetchParams, 'optionalAccess', _126 => _126.callPrevious]) !== true && params.search === searchTermRef.current) {
6344
6369
  return;
6345
6370
  }
6346
6371
  const currentSearchTerm = searchTermRef.current;
@@ -6351,7 +6376,7 @@ function useDataListRetriever(params) {
6351
6376
  const previousRef = { previous: void 0 };
6352
6377
  const selfRef = { self: void 0 };
6353
6378
  const totalRef = { total: void 0 };
6354
- if (nextPage && _optionalChain([fetchParams, 'optionalAccess', _126 => _126.callNext]) && _optionalChain([fetchParams, 'optionalAccess', _127 => _127.isRefine]) !== true) {
6379
+ if (nextPage && _optionalChain([fetchParams, 'optionalAccess', _127 => _127.callNext]) && _optionalChain([fetchParams, 'optionalAccess', _128 => _128.isRefine]) !== true) {
6355
6380
  const ServiceClass = stableParams.service;
6356
6381
  response = await ServiceClass.next({
6357
6382
  type: stableParams.type,
@@ -6361,7 +6386,7 @@ function useDataListRetriever(params) {
6361
6386
  self: selfRef,
6362
6387
  total: totalRef
6363
6388
  });
6364
- } else if (previousPage && _optionalChain([fetchParams, 'optionalAccess', _128 => _128.callPrevious]) && _optionalChain([fetchParams, 'optionalAccess', _129 => _129.isRefine]) !== true) {
6389
+ } else if (previousPage && _optionalChain([fetchParams, 'optionalAccess', _129 => _129.callPrevious]) && _optionalChain([fetchParams, 'optionalAccess', _130 => _130.isRefine]) !== true) {
6365
6390
  const ServiceClass = stableParams.service;
6366
6391
  response = await ServiceClass.previous({
6367
6392
  type: stableParams.type,
@@ -6384,8 +6409,8 @@ function useDataListRetriever(params) {
6384
6409
  retrieverParams.total = totalRef;
6385
6410
  response = await stableParams.retriever(retrieverParams);
6386
6411
  }
6387
- if (thisRequestId === requestIdRef.current && !_optionalChain([abortControllerRef, 'access', _130 => _130.current, 'optionalAccess', _131 => _131.signal, 'access', _132 => _132.aborted])) {
6388
- if (_optionalChain([fetchParams, 'optionalAccess', _133 => _133.isRefresh]) === true) {
6412
+ if (thisRequestId === requestIdRef.current && !_optionalChain([abortControllerRef, 'access', _131 => _131.current, 'optionalAccess', _132 => _132.signal, 'access', _133 => _133.aborted])) {
6413
+ if (_optionalChain([fetchParams, 'optionalAccess', _134 => _134.isRefresh]) === true) {
6389
6414
  setData(response);
6390
6415
  } else {
6391
6416
  setData((prevData) => [...prevData ? prevData : [], ...response]);
@@ -6590,12 +6615,12 @@ var SUBTITLE_PX_PER_CHAR_11 = 6;
6590
6615
  var LABEL_PADDING_PX = 16;
6591
6616
  function estimateLabelWidth(node) {
6592
6617
  if (node.subtitle) {
6593
- const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access', _134 => _134.name, 'optionalAccess', _135 => _135.length]), () => ( 0))) * TITLE_PX_PER_CHAR_16;
6618
+ const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access', _135 => _135.name, 'optionalAccess', _136 => _136.length]), () => ( 0))) * TITLE_PX_PER_CHAR_16;
6594
6619
  const subtitleWidth = node.subtitle.length * SUBTITLE_PX_PER_CHAR_11;
6595
6620
  return Math.max(titleWidth, subtitleWidth) + LABEL_PADDING_PX;
6596
6621
  }
6597
6622
  const perChar = node.bold ? NAME_PX_PER_CHAR_16_BOLD : NAME_PX_PER_CHAR_12;
6598
- return (_nullishCoalesce(_optionalChain([node, 'access', _136 => _136.name, 'optionalAccess', _137 => _137.length]), () => ( 0))) * perChar + LABEL_PADDING_PX;
6623
+ return (_nullishCoalesce(_optionalChain([node, 'access', _137 => _137.name, 'optionalAccess', _138 => _138.length]), () => ( 0))) * perChar + LABEL_PADDING_PX;
6599
6624
  }
6600
6625
  _chunk7QVYU63Ejs.__name.call(void 0, estimateLabelWidth, "estimateLabelWidth");
6601
6626
  function linkEndpointId(end) {
@@ -6708,12 +6733,12 @@ var SUBTITLE_PX_PER_CHAR_112 = 6;
6708
6733
  var LABEL_PADDING_PX2 = 16;
6709
6734
  function estimateLabelWidth2(node) {
6710
6735
  if (node.subtitle) {
6711
- const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access', _138 => _138.name, 'optionalAccess', _139 => _139.length]), () => ( 0))) * TITLE_PX_PER_CHAR_162;
6736
+ const titleWidth = (_nullishCoalesce(_optionalChain([node, 'access', _139 => _139.name, 'optionalAccess', _140 => _140.length]), () => ( 0))) * TITLE_PX_PER_CHAR_162;
6712
6737
  const subtitleWidth = node.subtitle.length * SUBTITLE_PX_PER_CHAR_112;
6713
6738
  return Math.max(titleWidth, subtitleWidth) + LABEL_PADDING_PX2;
6714
6739
  }
6715
6740
  const perChar = node.bold ? NAME_PX_PER_CHAR_16_BOLD2 : NAME_PX_PER_CHAR_122;
6716
- return (_nullishCoalesce(_optionalChain([node, 'access', _140 => _140.name, 'optionalAccess', _141 => _141.length]), () => ( 0))) * perChar + LABEL_PADDING_PX2;
6741
+ return (_nullishCoalesce(_optionalChain([node, 'access', _141 => _141.name, 'optionalAccess', _142 => _142.length]), () => ( 0))) * perChar + LABEL_PADDING_PX2;
6717
6742
  }
6718
6743
  _chunk7QVYU63Ejs.__name.call(void 0, estimateLabelWidth2, "estimateLabelWidth");
6719
6744
  function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, loadingNodeIds, containerKey) {
@@ -6780,7 +6805,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
6780
6805
  });
6781
6806
  const typeColorMap = /* @__PURE__ */ new Map();
6782
6807
  Array.from(groupTypes).forEach((type, index) => {
6783
- if (type === _optionalChain([nodes, 'access', _142 => _142[0], 'optionalAccess', _143 => _143.instanceType])) {
6808
+ if (type === _optionalChain([nodes, 'access', _143 => _143[0], 'optionalAccess', _144 => _144.instanceType])) {
6784
6809
  typeColorMap.set(type, accentColor);
6785
6810
  } else if (type === "documents" || type === "articles" || type === "hyperlinks") {
6786
6811
  typeColorMap.set(type, contentColor);
@@ -6826,14 +6851,14 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
6826
6851
  });
6827
6852
  const svg = d3.select(svgRef.current);
6828
6853
  svg.selectAll("*").remove();
6829
- const container = _optionalChain([svgRef, 'access', _144 => _144.current, 'optionalAccess', _145 => _145.parentElement]);
6854
+ const container = _optionalChain([svgRef, 'access', _145 => _145.current, 'optionalAccess', _146 => _146.parentElement]);
6830
6855
  if (!container) return;
6831
6856
  const width = container.clientWidth;
6832
6857
  const height = container.clientHeight;
6833
6858
  svg.attr("width", width).attr("height", height).attr("viewBox", `0 0 ${width} ${height}`);
6834
6859
  const graphGroup = svg.append("g").attr("class", "graph-content");
6835
6860
  const nodeRadius = 40;
6836
- const directed = _optionalChain([options, 'optionalAccess', _146 => _146.directed]) === true;
6861
+ const directed = _optionalChain([options, 'optionalAccess', _147 => _147.directed]) === true;
6837
6862
  if (directed) {
6838
6863
  const defs = svg.append("defs");
6839
6864
  defs.append("marker").attr("id", "narr8-arrow").attr("viewBox", "-10 -10 20 20").attr("markerWidth", 14).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").attr("refX", 0).attr("refY", 0).append("path").attr("d", "M-10,-10 L0,0 L-10,10 z").attr("fill", "#999");
@@ -6845,10 +6870,10 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
6845
6870
  });
6846
6871
  zoomBehaviorRef.current = zoom2;
6847
6872
  svg.call(zoom2).on("wheel.zoom", null).on("dblclick.zoom", null);
6848
- const layoutMode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _147 => _147.layout]), () => ( "radial"));
6873
+ const layoutMode = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _148 => _148.layout]), () => ( "radial"));
6849
6874
  let layeredPositionsApplied = false;
6850
6875
  if (layoutMode === "layered") {
6851
- const layeredOpts = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _148 => _148.layered]), () => ( {}));
6876
+ const layeredOpts = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _149 => _149.layered]), () => ( {}));
6852
6877
  const useFit = layeredOpts.fitContainer === true && width > 0 && height > 0;
6853
6878
  const positions = useFit ? fitLayeredLayoutToAspectRatio(visibleNodes, visibleLinks, {
6854
6879
  rankdir: _nullishCoalesce(layeredOpts.rankdir, () => ( "LR")),
@@ -6931,7 +6956,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
6931
6956
  sourceNode.children.push(targetId);
6932
6957
  }
6933
6958
  });
6934
- const rootChildren = _optionalChain([nodeHierarchy, 'access', _149 => _149.get, 'call', _150 => _150(centralNodeId), 'optionalAccess', _151 => _151.children]) || [];
6959
+ const rootChildren = _optionalChain([nodeHierarchy, 'access', _150 => _150.get, 'call', _151 => _151(centralNodeId), 'optionalAccess', _152 => _152.children]) || [];
6935
6960
  const childAngleStep = 2 * Math.PI / Math.max(rootChildren.length, 1);
6936
6961
  rootChildren.forEach((childId, index) => {
6937
6962
  const childNode = nodeHierarchy.get(childId);
@@ -7083,7 +7108,7 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
7083
7108
  if (d.instanceType === "root") return;
7084
7109
  const currentNode = d3.select(this);
7085
7110
  currentNode.raise();
7086
- const currentZoom = _optionalChain([zoomRef, 'access', _152 => _152.current, 'optionalAccess', _153 => _153.k]) || 1;
7111
+ const currentZoom = _optionalChain([zoomRef, 'access', _153 => _153.current, 'optionalAccess', _154 => _154.k]) || 1;
7087
7112
  const targetScreenFontSize = 20;
7088
7113
  const baseFontSize = 12;
7089
7114
  const textScale = targetScreenFontSize / (baseFontSize * currentZoom);
@@ -7158,19 +7183,19 @@ function useCustomD3Graph(nodes, links, onNodeClick, visibleNodeIds, options, lo
7158
7183
  }
7159
7184
  });
7160
7185
  return () => {
7161
- _optionalChain([simulation, 'optionalAccess', _154 => _154.stop, 'call', _155 => _155()]);
7186
+ _optionalChain([simulation, 'optionalAccess', _155 => _155.stop, 'call', _156 => _156()]);
7162
7187
  };
7163
7188
  }, [
7164
7189
  nodes,
7165
7190
  links,
7166
7191
  colorScale,
7167
7192
  visibleNodeIds,
7168
- _optionalChain([options, 'optionalAccess', _156 => _156.directed]),
7169
- _optionalChain([options, 'optionalAccess', _157 => _157.layout]),
7170
- _optionalChain([options, 'optionalAccess', _158 => _158.layered, 'optionalAccess', _159 => _159.rankdir]),
7171
- _optionalChain([options, 'optionalAccess', _160 => _160.layered, 'optionalAccess', _161 => _161.nodesep]),
7172
- _optionalChain([options, 'optionalAccess', _162 => _162.layered, 'optionalAccess', _163 => _163.ranksep]),
7173
- _optionalChain([options, 'optionalAccess', _164 => _164.layered, 'optionalAccess', _165 => _165.fitContainer]),
7193
+ _optionalChain([options, 'optionalAccess', _157 => _157.directed]),
7194
+ _optionalChain([options, 'optionalAccess', _158 => _158.layout]),
7195
+ _optionalChain([options, 'optionalAccess', _159 => _159.layered, 'optionalAccess', _160 => _160.rankdir]),
7196
+ _optionalChain([options, 'optionalAccess', _161 => _161.layered, 'optionalAccess', _162 => _162.nodesep]),
7197
+ _optionalChain([options, 'optionalAccess', _163 => _163.layered, 'optionalAccess', _164 => _164.ranksep]),
7198
+ _optionalChain([options, 'optionalAccess', _165 => _165.layered, 'optionalAccess', _166 => _166.fitContainer]),
7174
7199
  loadingNodeIds,
7175
7200
  onNodeClick
7176
7201
  ]);
@@ -7293,7 +7318,7 @@ function usePageTracker() {
7293
7318
  if (typeof document !== "undefined") {
7294
7319
  const titleParts = document.title.split("]");
7295
7320
  if (titleParts[1]) {
7296
- const cleanTitle = _optionalChain([titleParts, 'access', _166 => _166[1], 'access', _167 => _167.split, 'call', _168 => _168("|"), 'access', _169 => _169[0], 'optionalAccess', _170 => _170.trim, 'call', _171 => _171()]);
7321
+ const cleanTitle = _optionalChain([titleParts, 'access', _167 => _167[1], 'access', _168 => _168.split, 'call', _169 => _169("|"), 'access', _170 => _170[0], 'optionalAccess', _171 => _171.trim, 'call', _172 => _172()]);
7297
7322
  pageTitle = cleanTitle || foundModule.name;
7298
7323
  }
7299
7324
  }
@@ -7330,7 +7355,7 @@ function usePushNotifications() {
7330
7355
  const register = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
7331
7356
  if ("serviceWorker" in navigator && "PushManager" in window) {
7332
7357
  try {
7333
- const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess', _172 => _172.id])}`;
7358
+ const sessionKey = `push_registered_${_optionalChain([currentUser, 'optionalAccess', _173 => _173.id])}`;
7334
7359
  const lastRegisteredSubscription = sessionStorage.getItem(sessionKey);
7335
7360
  const registration = await navigator.serviceWorker.register(`${_chunkJO5BLONKjs.getAppUrl.call(void 0, )}/sw.js`);
7336
7361
  let permission = Notification.permission;
@@ -7387,7 +7412,7 @@ function useSocket({ token }) {
7387
7412
  const socketRef = _react.useRef.call(void 0, null);
7388
7413
  _react.useEffect.call(void 0, () => {
7389
7414
  if (!token) return;
7390
- const globalSocketKey = `__socket_${_optionalChain([process, 'access', _173 => _173.env, 'access', _174 => _174.NEXT_PUBLIC_API_URL, 'optionalAccess', _175 => _175.replace, 'call', _176 => _176(/[^a-zA-Z0-9]/g, "_")])}`;
7415
+ const globalSocketKey = `__socket_${_optionalChain([process, 'access', _174 => _174.env, 'access', _175 => _175.NEXT_PUBLIC_API_URL, 'optionalAccess', _176 => _176.replace, 'call', _177 => _177(/[^a-zA-Z0-9]/g, "_")])}`;
7391
7416
  if (typeof window !== "undefined") {
7392
7417
  const _allSocketKeys = Object.keys(window).filter((key) => key.startsWith("__socket_"));
7393
7418
  const existingSocket = window[globalSocketKey];
@@ -7443,14 +7468,14 @@ function useSocket({ token }) {
7443
7468
  });
7444
7469
  }, "handleMessage");
7445
7470
  const handleNotification = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
7446
- const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _177 => _177.data]), () => ( _optionalChain([data, 'optionalAccess', _178 => _178.jsonApi])));
7447
- if (!_optionalChain([resource, 'optionalAccess', _179 => _179.type])) {
7471
+ const resource = _nullishCoalesce(_optionalChain([data, 'optionalAccess', _178 => _178.data]), () => ( _optionalChain([data, 'optionalAccess', _179 => _179.jsonApi])));
7472
+ if (!_optionalChain([resource, 'optionalAccess', _180 => _180.type])) {
7448
7473
  console.warn("[useSocket] ignoring notification with unexpected payload shape", data);
7449
7474
  return;
7450
7475
  }
7451
7476
  const notification = _chunkPQBKPWBYjs.rehydrate.call(void 0, _chunkPQBKPWBYjs.Modules.Notification, {
7452
7477
  jsonApi: resource,
7453
- included: _optionalChain([data, 'optionalAccess', _180 => _180.included]) || []
7478
+ included: _optionalChain([data, 'optionalAccess', _181 => _181.included]) || []
7454
7479
  });
7455
7480
  if (notification) {
7456
7481
  setSocketNotifications((prev) => {
@@ -7588,23 +7613,23 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
7588
7613
  );
7589
7614
  const matchedModuleKey = moduleKeys.find((key) => {
7590
7615
  const descriptor2 = Object.getOwnPropertyDescriptor(_chunkPQBKPWBYjs.Modules, key);
7591
- if (!_optionalChain([descriptor2, 'optionalAccess', _181 => _181.get])) return false;
7616
+ if (!_optionalChain([descriptor2, 'optionalAccess', _182 => _182.get])) return false;
7592
7617
  const selectedModule = descriptor2.get.call(_chunkPQBKPWBYjs.Modules);
7593
- return path.toLowerCase().startsWith(_optionalChain([selectedModule, 'access', _182 => _182.pageUrl, 'optionalAccess', _183 => _183.toLowerCase, 'call', _184 => _184()]));
7618
+ return path.toLowerCase().startsWith(_optionalChain([selectedModule, 'access', _183 => _183.pageUrl, 'optionalAccess', _184 => _184.toLowerCase, 'call', _185 => _185()]));
7594
7619
  });
7595
7620
  if (!matchedModuleKey) return void 0;
7596
7621
  const descriptor = Object.getOwnPropertyDescriptor(_chunkPQBKPWBYjs.Modules, matchedModuleKey);
7597
- return _optionalChain([descriptor, 'optionalAccess', _185 => _185.get, 'optionalAccess', _186 => _186.call, 'call', _187 => _187(_chunkPQBKPWBYjs.Modules)]);
7622
+ return _optionalChain([descriptor, 'optionalAccess', _186 => _186.get, 'optionalAccess', _187 => _187.call, 'call', _188 => _188(_chunkPQBKPWBYjs.Modules)]);
7598
7623
  }, "matchUrlToModule");
7599
7624
  const currentUser = dehydratedUser ? _chunkPQBKPWBYjs.rehydrate.call(void 0, _chunkPQBKPWBYjs.Modules.User, dehydratedUser) : null;
7600
- const company = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _188 => _188.company]), () => ( null));
7625
+ const company = _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _189 => _189.company]), () => ( null));
7601
7626
  const setUser = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (user) => {
7602
7627
  if (user) setDehydratedUser(user.dehydrate());
7603
7628
  else setDehydratedUser(null);
7604
7629
  }, "setUser");
7605
7630
  const hasRole = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (roleId) => {
7606
7631
  if (!currentUser) return false;
7607
- return !!_optionalChain([currentUser, 'access', _189 => _189.roles, 'optionalAccess', _190 => _190.some, 'call', _191 => _191((userRole) => userRole.id === roleId)]);
7632
+ return !!_optionalChain([currentUser, 'access', _190 => _190.roles, 'optionalAccess', _191 => _191.some, 'call', _192 => _192((userRole) => userRole.id === roleId)]);
7608
7633
  }, "hasRole");
7609
7634
  const hasAccesToFeature = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (featureIdentifier) => {
7610
7635
  if (hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator)) return true;
@@ -7644,12 +7669,12 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
7644
7669
  try {
7645
7670
  const fullUser = await _chunkPQBKPWBYjs.UserService.findFullUser();
7646
7671
  if (fullUser) {
7647
- if (!_optionalChain([options, 'optionalAccess', _192 => _192.skipCookieUpdate])) {
7648
- await _optionalChain([_chunkPQBKPWBYjs.getTokenHandler.call(void 0, ), 'optionalAccess', _193 => _193.updateToken, 'call', _194 => _194({
7672
+ if (!_optionalChain([options, 'optionalAccess', _193 => _193.skipCookieUpdate])) {
7673
+ await _optionalChain([_chunkPQBKPWBYjs.getTokenHandler.call(void 0, ), 'optionalAccess', _194 => _194.updateToken, 'call', _195 => _195({
7649
7674
  userId: fullUser.id,
7650
- companyId: _optionalChain([fullUser, 'access', _195 => _195.company, 'optionalAccess', _196 => _196.id]),
7675
+ companyId: _optionalChain([fullUser, 'access', _196 => _196.company, 'optionalAccess', _197 => _197.id]),
7651
7676
  roles: fullUser.roles.map((role) => role.id),
7652
- features: _nullishCoalesce(_optionalChain([fullUser, 'access', _197 => _197.company, 'optionalAccess', _198 => _198.features, 'optionalAccess', _199 => _199.map, 'call', _200 => _200((feature) => feature.id)]), () => ( [])),
7677
+ features: _nullishCoalesce(_optionalChain([fullUser, 'access', _198 => _198.company, 'optionalAccess', _199 => _199.features, 'optionalAccess', _200 => _200.map, 'call', _201 => _201((feature) => feature.id)]), () => ( [])),
7653
7678
  modules: fullUser.modules.map((module) => ({
7654
7679
  id: module.id,
7655
7680
  permissions: module.permissions
@@ -7671,11 +7696,11 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
7671
7696
  refreshUserRef.current = refreshUser;
7672
7697
  const isRefreshingRef = _react.useRef.call(void 0, false);
7673
7698
  _react.useEffect.call(void 0, () => {
7674
- if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess', _201 => _201.company, 'optionalAccess', _202 => _202.id])) {
7699
+ if (!socket || !isConnected || !_optionalChain([currentUser, 'optionalAccess', _202 => _202.company, 'optionalAccess', _203 => _203.id])) {
7675
7700
  return;
7676
7701
  }
7677
7702
  const handleCompanyUpdate = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (data) => {
7678
- if (data.companyId === _optionalChain([currentUser, 'access', _203 => _203.company, 'optionalAccess', _204 => _204.id]) && !isRefreshingRef.current) {
7703
+ if (data.companyId === _optionalChain([currentUser, 'access', _204 => _204.company, 'optionalAccess', _205 => _205.id]) && !isRefreshingRef.current) {
7679
7704
  isRefreshingRef.current = true;
7680
7705
  refreshUserRef.current({ skipCookieUpdate: true }).finally(() => {
7681
7706
  isRefreshingRef.current = false;
@@ -7688,7 +7713,7 @@ var CurrentUserProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
7688
7713
  socket.off("company:tokens_updated", handleCompanyUpdate);
7689
7714
  socket.off("company:subscription_updated", handleCompanyUpdate);
7690
7715
  };
7691
- }, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess', _205 => _205.company, 'optionalAccess', _206 => _206.id])]);
7716
+ }, [socket, isConnected, _optionalChain([currentUser, 'optionalAccess', _206 => _206.company, 'optionalAccess', _207 => _207.id])]);
7692
7717
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7693
7718
  CurrentUserContext.Provider,
7694
7719
  {
@@ -7759,7 +7784,7 @@ function AddUserToRoleInternal({ role, refresh }) {
7759
7784
  const data = useDataListRetriever({
7760
7785
  ready: !!company && show,
7761
7786
  retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkPQBKPWBYjs.UserService.findAllUsers(params), "retriever"),
7762
- retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _207 => _207.id]) },
7787
+ retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _208 => _208.id]) },
7763
7788
  module: _chunkPQBKPWBYjs.Modules.User
7764
7789
  });
7765
7790
  _react.useEffect.call(void 0, () => {
@@ -7827,10 +7852,10 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
7827
7852
  onValueChange: setFiles,
7828
7853
  dropzoneOptions: dropzone2,
7829
7854
  className: "h-40 w-40 rounded-full p-0",
7830
- 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', _208 => _208.avatar])) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7855
+ 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', _209 => _209.avatar])) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7831
7856
  _image2.default,
7832
7857
  {
7833
- src: file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess', _209 => _209.avatar]) || "",
7858
+ src: file ? URL.createObjectURL(file) : _optionalChain([user, 'optionalAccess', _210 => _210.avatar]) || "",
7834
7859
  alt: t(`common.avatar`),
7835
7860
  width: 200,
7836
7861
  height: 200
@@ -7838,7 +7863,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
7838
7863
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, { className: "my-4 h-8 w-8" }) })
7839
7864
  }
7840
7865
  ),
7841
- !resetImage && (file || _optionalChain([user, 'optionalAccess', _210 => _210.avatar])) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7866
+ !resetImage && (file || _optionalChain([user, 'optionalAccess', _211 => _211.avatar])) && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7842
7867
  Button,
7843
7868
  {
7844
7869
  className: "",
@@ -7866,7 +7891,7 @@ function UserDeleterInternal({ user, onDeleted, companyId }) {
7866
7891
  const router = _chunkJO5BLONKjs.useI18nRouter.call(void 0, );
7867
7892
  const _t = _nextintl.useTranslations.call(void 0, );
7868
7893
  let cId;
7869
- if (_optionalChain([currentUser, 'optionalAccess', _211 => _211.roles, 'access', _212 => _212.find, 'call', _213 => _213((role) => role.id === _chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator)]) && companyId) {
7894
+ if (_optionalChain([currentUser, 'optionalAccess', _212 => _212.roles, 'access', _213 => _213.find, 'call', _214 => _214((role) => role.id === _chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator)]) && companyId) {
7870
7895
  cId = companyId;
7871
7896
  } else {
7872
7897
  if (!company) return;
@@ -7929,18 +7954,18 @@ function UserEditorInternal({
7929
7954
  }, [company]);
7930
7955
  const handleDialogOpenChange = _react.useCallback.call(void 0,
7931
7956
  (open) => {
7932
- if (open && (company || _optionalChain([currentUser, 'optionalAccess', _214 => _214.roles, 'access', _215 => _215.find, 'call', _216 => _216((role) => role.id === _chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator)])) && roles.length === 0) {
7957
+ if (open && (company || _optionalChain([currentUser, 'optionalAccess', _215 => _215.roles, 'access', _216 => _216.find, 'call', _217 => _217((role) => role.id === _chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator)])) && roles.length === 0) {
7933
7958
  async function fetchRoles() {
7934
7959
  const allRoles = await _chunkPQBKPWBYjs.RoleService.findAllRoles({});
7935
7960
  const availableRoles = allRoles.filter(
7936
- (role) => role.id !== _chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess', _217 => _217.features, 'access', _218 => _218.some, 'call', _219 => _219((feature) => feature.id === _optionalChain([role, 'access', _220 => _220.requiredFeature, 'optionalAccess', _221 => _221.id]))]))
7961
+ (role) => role.id !== _chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator && (role.requiredFeature === void 0 || _optionalChain([company, 'optionalAccess', _218 => _218.features, 'access', _219 => _219.some, 'call', _220 => _220((feature) => feature.id === _optionalChain([role, 'access', _221 => _221.requiredFeature, 'optionalAccess', _222 => _222.id]))]))
7937
7962
  );
7938
7963
  setRoles(availableRoles);
7939
7964
  }
7940
7965
  _chunk7QVYU63Ejs.__name.call(void 0, fetchRoles, "fetchRoles");
7941
7966
  fetchRoles();
7942
7967
  }
7943
- _optionalChain([onDialogOpenChange, 'optionalCall', _222 => _222(open)]);
7968
+ _optionalChain([onDialogOpenChange, 'optionalCall', _223 => _223(open)]);
7944
7969
  },
7945
7970
  [company, currentUser, roles.length, onDialogOpenChange]
7946
7971
  );
@@ -7974,29 +7999,29 @@ function UserEditorInternal({
7974
7999
  );
7975
8000
  const getDefaultValues = _react.useCallback.call(void 0, () => {
7976
8001
  return {
7977
- id: _optionalChain([user, 'optionalAccess', _223 => _223.id]) || _uuid.v4.call(void 0, ),
7978
- name: _optionalChain([user, 'optionalAccess', _224 => _224.name]) || "",
7979
- title: _optionalChain([user, 'optionalAccess', _225 => _225.title]) || "",
7980
- bio: _optionalChain([user, 'optionalAccess', _226 => _226.bio]) || "",
7981
- email: _optionalChain([user, 'optionalAccess', _227 => _227.email]) || "",
7982
- phone: _optionalChain([user, 'optionalAccess', _228 => _228.phone]) || "",
8002
+ id: _optionalChain([user, 'optionalAccess', _224 => _224.id]) || _uuid.v4.call(void 0, ),
8003
+ name: _optionalChain([user, 'optionalAccess', _225 => _225.name]) || "",
8004
+ title: _optionalChain([user, 'optionalAccess', _226 => _226.title]) || "",
8005
+ bio: _optionalChain([user, 'optionalAccess', _227 => _227.bio]) || "",
8006
+ email: _optionalChain([user, 'optionalAccess', _228 => _228.email]) || "",
8007
+ phone: _optionalChain([user, 'optionalAccess', _229 => _229.phone]) || "",
7983
8008
  password: "",
7984
- roleIds: _optionalChain([user, 'optionalAccess', _229 => _229.roles, 'access', _230 => _230.map, 'call', _231 => _231((role) => role.id)]) || [],
8009
+ roleIds: _optionalChain([user, 'optionalAccess', _230 => _230.roles, 'access', _231 => _231.map, 'call', _232 => _232((role) => role.id)]) || [],
7985
8010
  sendInvitationEmail: false,
7986
- avatar: _optionalChain([user, 'optionalAccess', _232 => _232.avatarUrl]) || ""
8011
+ avatar: _optionalChain([user, 'optionalAccess', _233 => _233.avatarUrl]) || ""
7987
8012
  };
7988
8013
  }, [user]);
7989
8014
  const form = _reacthookform.useForm.call(void 0, {
7990
8015
  resolver: _zod.zodResolver.call(void 0, formSchema),
7991
8016
  defaultValues: getDefaultValues()
7992
8017
  });
7993
- const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess', _233 => _233.id]) === _optionalChain([user, 'optionalAccess', _234 => _234.id]) && hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator)) && (hasPermissionToModule({ module: _chunkPQBKPWBYjs.Modules.User, action: "update" /* Update */ }) || hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator));
8018
+ const canChangeRoles = !(_optionalChain([currentUser, 'optionalAccess', _234 => _234.id]) === _optionalChain([user, 'optionalAccess', _235 => _235.id]) && hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator)) && (hasPermissionToModule({ module: _chunkPQBKPWBYjs.Modules.User, action: "update" /* Update */ }) || hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator));
7994
8019
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
7995
8020
  EditorSheet,
7996
8021
  {
7997
8022
  form,
7998
8023
  entityType: t(`entities.users`, { count: 1 }),
7999
- entityName: _optionalChain([user, 'optionalAccess', _235 => _235.name]),
8024
+ entityName: _optionalChain([user, 'optionalAccess', _236 => _236.name]),
8000
8025
  isEdit: !!user,
8001
8026
  module: _chunkPQBKPWBYjs.Modules.User,
8002
8027
  propagateChanges,
@@ -8048,7 +8073,7 @@ function UserEditorInternal({
8048
8073
  adminCreated
8049
8074
  };
8050
8075
  const updatedUser = user ? await _chunkPQBKPWBYjs.UserService.update(payload) : await _chunkPQBKPWBYjs.UserService.create(payload);
8051
- if (_optionalChain([currentUser, 'optionalAccess', _236 => _236.id]) === updatedUser.id) setUser(updatedUser);
8076
+ if (_optionalChain([currentUser, 'optionalAccess', _237 => _237.id]) === updatedUser.id) setUser(updatedUser);
8052
8077
  return updatedUser;
8053
8078
  },
8054
8079
  onRevalidate,
@@ -8296,7 +8321,7 @@ function EntityMultiSelector({
8296
8321
  if (open) {
8297
8322
  setSearchTerm("");
8298
8323
  requestAnimationFrame(() => {
8299
- _optionalChain([searchInputRef, 'access', _237 => _237.current, 'optionalAccess', _238 => _238.focus, 'call', _239 => _239()]);
8324
+ _optionalChain([searchInputRef, 'access', _238 => _238.current, 'optionalAccess', _239 => _239.focus, 'call', _240 => _240()]);
8300
8325
  });
8301
8326
  }
8302
8327
  }, [open]);
@@ -8313,7 +8338,7 @@ function EntityMultiSelector({
8313
8338
  form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
8314
8339
  const cb = onChangeRef.current;
8315
8340
  if (cb) {
8316
- const fullData = next.map((v) => _optionalChain([options, 'access', _240 => _240.find, 'call', _241 => _241((opt) => opt.id === v.id), 'optionalAccess', _242 => _242.entityData])).filter(Boolean);
8341
+ const fullData = next.map((v) => _optionalChain([options, 'access', _241 => _241.find, 'call', _242 => _242((opt) => opt.id === v.id), 'optionalAccess', _243 => _243.entityData])).filter(Boolean);
8317
8342
  cb(fullData);
8318
8343
  }
8319
8344
  },
@@ -8326,7 +8351,7 @@ function EntityMultiSelector({
8326
8351
  form.setValue(id, next, { shouldDirty: true, shouldTouch: true });
8327
8352
  const cb = onChangeRef.current;
8328
8353
  if (cb) {
8329
- const fullData = next.map((v) => _optionalChain([options, 'access', _243 => _243.find, 'call', _244 => _244((opt) => opt.id === v.id), 'optionalAccess', _245 => _245.entityData])).filter(Boolean);
8354
+ const fullData = next.map((v) => _optionalChain([options, 'access', _244 => _244.find, 'call', _245 => _245((opt) => opt.id === v.id), 'optionalAccess', _246 => _246.entityData])).filter(Boolean);
8330
8355
  cb(fullData);
8331
8356
  }
8332
8357
  },
@@ -8464,11 +8489,11 @@ function UserMultiSelect({
8464
8489
  emptyText: t("ui.search.no_results", { type: t("entities.users", { count: 2 }) }),
8465
8490
  isRequired,
8466
8491
  retriever: (params) => _chunkPQBKPWBYjs.UserService.findAllUsers(params),
8467
- retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _246 => _246.id]) },
8492
+ retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _247 => _247.id]) },
8468
8493
  module: _chunkPQBKPWBYjs.Modules.User,
8469
8494
  getLabel: (user) => user.name,
8470
8495
  toFormValue: (user) => ({ id: user.id, name: user.name, avatar: user.avatar }),
8471
- excludeId: _optionalChain([currentUser, 'optionalAccess', _247 => _247.id]),
8496
+ excludeId: _optionalChain([currentUser, 'optionalAccess', _248 => _248.id]),
8472
8497
  onChange,
8473
8498
  renderOption: (user) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex items-center gap-2", children: [
8474
8499
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatarIcon, { url: user.avatar, name: user.name }),
@@ -8734,7 +8759,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, ErrorDetails, "ErrorDetails");
8734
8759
 
8735
8760
  // src/components/errors/errorToast.ts
8736
8761
  function errorToast(params) {
8737
- _chunkPQBKPWBYjs.showError.call(void 0, _nullishCoalesce(_optionalChain([params, 'optionalAccess', _248 => _248.title]), () => ( "Error")), {
8762
+ _chunkPQBKPWBYjs.showError.call(void 0, _nullishCoalesce(_optionalChain([params, 'optionalAccess', _249 => _249.title]), () => ( "Error")), {
8738
8763
  description: params.error instanceof Error ? params.error.message : String(params.error)
8739
8764
  });
8740
8765
  }
@@ -8931,21 +8956,21 @@ function useEditorDialog(isFormDirty, options) {
8931
8956
  const [open, setOpen] = _react.useState.call(void 0, false);
8932
8957
  const [showDiscardConfirm, setShowDiscardConfirm] = _react.useState.call(void 0, false);
8933
8958
  _react.useEffect.call(void 0, () => {
8934
- if (_optionalChain([options, 'optionalAccess', _249 => _249.dialogOpen]) !== void 0) {
8959
+ if (_optionalChain([options, 'optionalAccess', _250 => _250.dialogOpen]) !== void 0) {
8935
8960
  setOpen(options.dialogOpen);
8936
8961
  }
8937
- }, [_optionalChain([options, 'optionalAccess', _250 => _250.dialogOpen])]);
8962
+ }, [_optionalChain([options, 'optionalAccess', _251 => _251.dialogOpen])]);
8938
8963
  _react.useEffect.call(void 0, () => {
8939
- if (typeof _optionalChain([options, 'optionalAccess', _251 => _251.onDialogOpenChange]) === "function") {
8964
+ if (typeof _optionalChain([options, 'optionalAccess', _252 => _252.onDialogOpenChange]) === "function") {
8940
8965
  options.onDialogOpenChange(open);
8941
8966
  }
8942
- }, [open, _optionalChain([options, 'optionalAccess', _252 => _252.onDialogOpenChange])]);
8967
+ }, [open, _optionalChain([options, 'optionalAccess', _253 => _253.onDialogOpenChange])]);
8943
8968
  _react.useEffect.call(void 0, () => {
8944
- if (_optionalChain([options, 'optionalAccess', _253 => _253.forceShow])) setOpen(true);
8945
- }, [_optionalChain([options, 'optionalAccess', _254 => _254.forceShow])]);
8969
+ if (_optionalChain([options, 'optionalAccess', _254 => _254.forceShow])) setOpen(true);
8970
+ }, [_optionalChain([options, 'optionalAccess', _255 => _255.forceShow])]);
8946
8971
  _react.useEffect.call(void 0, () => {
8947
8972
  if (!open) {
8948
- if (_optionalChain([options, 'optionalAccess', _255 => _255.onClose])) options.onClose();
8973
+ if (_optionalChain([options, 'optionalAccess', _256 => _256.onClose])) options.onClose();
8949
8974
  }
8950
8975
  }, [open]);
8951
8976
  const handleOpenChange = _react.useCallback.call(void 0,
@@ -9023,6 +9048,7 @@ function EditorSheet({
9023
9048
  dialogOpen,
9024
9049
  onDialogOpenChange,
9025
9050
  renderFooter,
9051
+ actions,
9026
9052
  children
9027
9053
  }) {
9028
9054
  const t = _nextintl.useTranslations.call(void 0, );
@@ -9040,7 +9066,7 @@ function EditorSheet({
9040
9066
  hasBeenOpen.current = true;
9041
9067
  } else if (hasBeenOpen.current) {
9042
9068
  form.reset(onReset());
9043
- _optionalChain([onClose, 'optionalCall', _256 => _256()]);
9069
+ _optionalChain([onClose, 'optionalCall', _257 => _257()]);
9044
9070
  }
9045
9071
  }, [open]);
9046
9072
  const wrappedOnSubmit = _react.useCallback.call(void 0,
@@ -9054,11 +9080,11 @@ function EditorSheet({
9054
9080
  if (onSuccess) {
9055
9081
  await onSuccess();
9056
9082
  } else if (result) {
9057
- _optionalChain([onRevalidate, 'optionalCall', _257 => _257(generateUrl({ page: module, id: result.id, language: "[locale]" }))]);
9083
+ _optionalChain([onRevalidate, 'optionalCall', _258 => _258(generateUrl({ page: module, id: result.id, language: "[locale]" }))]);
9058
9084
  if (isEdit && propagateChanges) {
9059
9085
  propagateChanges(result);
9060
9086
  } else {
9061
- _optionalChain([onNavigate, 'optionalCall', _258 => _258(generateUrl({ page: module, id: result.id }))]);
9087
+ _optionalChain([onNavigate, 'optionalCall', _259 => _259(generateUrl({ page: module, id: result.id }))]);
9062
9088
  }
9063
9089
  }
9064
9090
  } catch (error) {
@@ -9070,6 +9096,8 @@ function EditorSheet({
9070
9096
  },
9071
9097
  [onSubmit, setOpen, onSuccess, onSaved, onRevalidate, onNavigate, generateUrl, module, isEdit, propagateChanges, t]
9072
9098
  );
9099
+ const headerTitle = _nullishCoalesce(titleOverride, () => ( (isEdit ? t("common.edit.update.title", { type: entityType }) : t("common.edit.create.title", { type: entityType }))));
9100
+ const headerDescription = _nullishCoalesce(descriptionOverride, () => ( (isEdit ? t("common.edit.update.description", { type: entityType, name: _nullishCoalesce(entityName, () => ( "")) }) : t("common.edit.create.description", { type: entityType }))));
9073
9101
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9074
9102
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Sheet, { open, onOpenChange: handleOpenChange, children: [
9075
9103
  dialogOpen === void 0 && forceShow === void 0 && (trigger ? (
@@ -9091,10 +9119,19 @@ function EditorSheet({
9091
9119
  }
9092
9120
  ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Button, { render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}), nativeButton: false, size: "sm", variant: "outline", children: t("ui.buttons.create") }) })),
9093
9121
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SheetContent, { side: "right", className: sizeClasses[size], children: [
9094
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SheetHeader, { className: "border-b px-6 py-4", children: [
9095
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetTitle, { children: _nullishCoalesce(titleOverride, () => ( (isEdit ? t("common.edit.update.title", { type: entityType }) : t("common.edit.create.title", { type: entityType })))) }),
9096
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetDescription, { children: _nullishCoalesce(descriptionOverride, () => ( (isEdit ? t("common.edit.update.description", { type: entityType, name: _nullishCoalesce(entityName, () => ( "")) }) : t("common.edit.create.description", { type: entityType })))) })
9097
- ] }),
9122
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetHeader, { className: "border-b px-6 py-4", children: actions ? (
9123
+ // pr-10 clears the SheetContent close button (absolute top-4 right-4).
9124
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-start justify-between gap-x-4 pr-10", children: [
9125
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex min-w-0 flex-col gap-y-1.5", children: [
9126
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetTitle, { children: headerTitle }),
9127
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetDescription, { children: headerDescription })
9128
+ ] }),
9129
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex shrink-0 items-center gap-x-2", children: actions })
9130
+ ] })
9131
+ ) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9132
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetTitle, { children: headerTitle }),
9133
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SheetDescription, { children: headerDescription })
9134
+ ] }) }),
9098
9135
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
9099
9136
  "form",
9100
9137
  {
@@ -9308,7 +9345,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9308
9345
  }, []);
9309
9346
  const [prevRange, setPrevRange] = _react.useState.call(void 0, date);
9310
9347
  _react.useEffect.call(void 0, () => {
9311
- if (_optionalChain([date, 'optionalAccess', _259 => _259.from]) && _optionalChain([date, 'optionalAccess', _260 => _260.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _261 => _261.from, 'optionalAccess', _262 => _262.getTime, 'call', _263 => _263()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _264 => _264.to, 'optionalAccess', _265 => _265.getTime, 'call', _266 => _266()]) !== date.to.getTime())) {
9348
+ if (_optionalChain([date, 'optionalAccess', _260 => _260.from]) && _optionalChain([date, 'optionalAccess', _261 => _261.to]) && date.to > date.from && (_optionalChain([prevRange, 'optionalAccess', _262 => _262.from, 'optionalAccess', _263 => _263.getTime, 'call', _264 => _264()]) !== date.from.getTime() || _optionalChain([prevRange, 'optionalAccess', _265 => _265.to, 'optionalAccess', _266 => _266.getTime, 'call', _267 => _267()]) !== date.to.getTime())) {
9312
9349
  onDateChange(date);
9313
9350
  setPrevRange(date);
9314
9351
  setOpen(false);
@@ -9319,7 +9356,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9319
9356
  setDate(void 0);
9320
9357
  return;
9321
9358
  }
9322
- if (range.from && (!_optionalChain([date, 'optionalAccess', _267 => _267.from]) || range.from.getTime() !== date.from.getTime())) {
9359
+ if (range.from && (!_optionalChain([date, 'optionalAccess', _268 => _268.from]) || range.from.getTime() !== date.from.getTime())) {
9323
9360
  setDate({ from: range.from, to: void 0 });
9324
9361
  } else {
9325
9362
  setDate(range);
@@ -9334,7 +9371,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9334
9371
  className: _chunkPQBKPWBYjs.cn.call(void 0, "w-[300px] justify-start text-left font-normal", !date && "text-muted-foreground"),
9335
9372
  children: [
9336
9373
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
9337
- _optionalChain([date, 'optionalAccess', _268 => _268.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9374
+ _optionalChain([date, 'optionalAccess', _269 => _269.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9338
9375
  _datefns.format.call(void 0, date.from, "LLL dd, y"),
9339
9376
  " - ",
9340
9377
  _datefns.format.call(void 0, date.to, "LLL dd, y")
@@ -9357,7 +9394,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9357
9394
  ),
9358
9395
  children: [
9359
9396
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CalendarIcon, {}),
9360
- _optionalChain([date, 'optionalAccess', _269 => _269.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9397
+ _optionalChain([date, 'optionalAccess', _270 => _270.from]) ? date.to ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
9361
9398
  _datefns.format.call(void 0, date.from, "LLL dd, y"),
9362
9399
  " - ",
9363
9400
  _datefns.format.call(void 0, date.to, "LLL dd, y")
@@ -9370,7 +9407,7 @@ function DateRangeSelector({ onDateChange, avoidSettingDates, showPreviousMonth
9370
9407
  Calendar,
9371
9408
  {
9372
9409
  mode: "range",
9373
- defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _270 => _270.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
9410
+ defaultMonth: _nullishCoalesce(_optionalChain([date, 'optionalAccess', _271 => _271.from]), () => ( (showPreviousMonth ? new Date((/* @__PURE__ */ new Date()).getFullYear(), (/* @__PURE__ */ new Date()).getMonth() - 1, 1) : void 0))),
9374
9411
  selected: date,
9375
9412
  onSelect: handleSelect,
9376
9413
  numberOfMonths: 2
@@ -9458,7 +9495,7 @@ var FileUploader = _react.forwardRef.call(void 0,
9458
9495
  movePrev();
9459
9496
  } else if (e.key === "Enter" || e.key === "Space") {
9460
9497
  if (activeIndex === -1) {
9461
- _optionalChain([dropzoneState, 'access', _271 => _271.inputRef, 'access', _272 => _272.current, 'optionalAccess', _273 => _273.click, 'call', _274 => _274()]);
9498
+ _optionalChain([dropzoneState, 'access', _272 => _272.inputRef, 'access', _273 => _273.current, 'optionalAccess', _274 => _274.click, 'call', _275 => _275()]);
9462
9499
  }
9463
9500
  } else if (e.key === "Delete" || e.key === "Backspace") {
9464
9501
  if (activeIndex !== -1) {
@@ -9496,13 +9533,13 @@ var FileUploader = _react.forwardRef.call(void 0,
9496
9533
  onValueChange(newValues);
9497
9534
  if (rejectedFiles.length > 0) {
9498
9535
  for (let i = 0; i < rejectedFiles.length; i++) {
9499
- if (_optionalChain([rejectedFiles, 'access', _275 => _275[i], 'access', _276 => _276.errors, 'access', _277 => _277[0], 'optionalAccess', _278 => _278.code]) === "file-too-large") {
9536
+ if (_optionalChain([rejectedFiles, 'access', _276 => _276[i], 'access', _277 => _277.errors, 'access', _278 => _278[0], 'optionalAccess', _279 => _279.code]) === "file-too-large") {
9500
9537
  _chunkPQBKPWBYjs.showError.call(void 0, t("common.errors.file"), {
9501
9538
  description: t(`common.errors.file_max`, { size: maxSize / 1024 / 1024 })
9502
9539
  });
9503
9540
  break;
9504
9541
  }
9505
- if (_optionalChain([rejectedFiles, 'access', _279 => _279[i], 'access', _280 => _280.errors, 'access', _281 => _281[0], 'optionalAccess', _282 => _282.message])) {
9542
+ if (_optionalChain([rejectedFiles, 'access', _280 => _280[i], 'access', _281 => _281.errors, 'access', _282 => _282[0], 'optionalAccess', _283 => _283.message])) {
9506
9543
  _chunkPQBKPWBYjs.showError.call(void 0, t(`common.errors.file`), {
9507
9544
  description: rejectedFiles[i].errors[0].message
9508
9545
  });
@@ -9801,7 +9838,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, FormCheckbox, "FormCheckbox");
9801
9838
  var _dynamic = require('next/dynamic'); var _dynamic2 = _interopRequireDefault(_dynamic);
9802
9839
 
9803
9840
 
9804
- var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-OVL376NQ.js"))), {
9841
+ var BlockNoteEditor = _dynamic2.default.call(void 0, () => Promise.resolve().then(() => _interopRequireWildcard(require("./BlockNoteEditor-ZLTCCPY2.js"))), {
9805
9842
  ssr: false
9806
9843
  });
9807
9844
  var BlockNoteEditorContainer = React.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function EditorContainer(props) {
@@ -9866,7 +9903,7 @@ function FormBlockNote({
9866
9903
  onChange: (content, isEmpty) => {
9867
9904
  lastEditorContentRef.current = content;
9868
9905
  field.onChange(content);
9869
- _optionalChain([onEmptyChange, 'optionalCall', _283 => _283(isEmpty)]);
9906
+ _optionalChain([onEmptyChange, 'optionalCall', _284 => _284(isEmpty)]);
9870
9907
  },
9871
9908
  placeholder,
9872
9909
  bordered: true,
@@ -10465,11 +10502,11 @@ function FormPlaceAutocomplete({
10465
10502
  const data = await response.json();
10466
10503
  if (data.suggestions) {
10467
10504
  const formattedSuggestions = data.suggestions.map((suggestion) => ({
10468
- place_id: _optionalChain([suggestion, 'access', _284 => _284.placePrediction, 'optionalAccess', _285 => _285.placeId]) || "",
10469
- description: _optionalChain([suggestion, 'access', _286 => _286.placePrediction, 'optionalAccess', _287 => _287.text, 'optionalAccess', _288 => _288.text]) || "",
10505
+ place_id: _optionalChain([suggestion, 'access', _285 => _285.placePrediction, 'optionalAccess', _286 => _286.placeId]) || "",
10506
+ description: _optionalChain([suggestion, 'access', _287 => _287.placePrediction, 'optionalAccess', _288 => _288.text, 'optionalAccess', _289 => _289.text]) || "",
10470
10507
  structured_formatting: {
10471
- main_text: _optionalChain([suggestion, 'access', _289 => _289.placePrediction, 'optionalAccess', _290 => _290.structuredFormat, 'optionalAccess', _291 => _291.mainText, 'optionalAccess', _292 => _292.text]) || "",
10472
- secondary_text: _optionalChain([suggestion, 'access', _293 => _293.placePrediction, 'optionalAccess', _294 => _294.structuredFormat, 'optionalAccess', _295 => _295.secondaryText, 'optionalAccess', _296 => _296.text]) || ""
10508
+ main_text: _optionalChain([suggestion, 'access', _290 => _290.placePrediction, 'optionalAccess', _291 => _291.structuredFormat, 'optionalAccess', _292 => _292.mainText, 'optionalAccess', _293 => _293.text]) || "",
10509
+ secondary_text: _optionalChain([suggestion, 'access', _294 => _294.placePrediction, 'optionalAccess', _295 => _295.structuredFormat, 'optionalAccess', _296 => _296.secondaryText, 'optionalAccess', _297 => _297.text]) || ""
10473
10510
  }
10474
10511
  }));
10475
10512
  setSuggestions(formattedSuggestions);
@@ -10616,8 +10653,8 @@ function FormPlaceAutocomplete({
10616
10653
  className: "hover:bg-muted cursor-pointer px-3 py-2 text-sm",
10617
10654
  onClick: () => handleSuggestionSelect(suggestion),
10618
10655
  children: [
10619
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _297 => _297.structured_formatting, 'optionalAccess', _298 => _298.main_text]) }),
10620
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _299 => _299.structured_formatting, 'optionalAccess', _300 => _300.secondary_text]) })
10656
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "font-medium", children: _optionalChain([suggestion, 'access', _298 => _298.structured_formatting, 'optionalAccess', _299 => _299.main_text]) }),
10657
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground", children: _optionalChain([suggestion, 'access', _300 => _300.structured_formatting, 'optionalAccess', _301 => _301.secondary_text]) })
10621
10658
  ]
10622
10659
  },
10623
10660
  suggestion.place_id || index
@@ -10661,11 +10698,11 @@ function FormSelect({
10661
10698
  field.onChange(actual);
10662
10699
  if (onChange) onChange(actual);
10663
10700
  },
10664
- value: field.value || (allowEmpty ? EMPTY_VALUE : field.value),
10701
+ value: field.value || (allowEmpty ? EMPTY_VALUE : ""),
10665
10702
  disabled,
10666
10703
  "data-testid": testId,
10667
10704
  children: [
10668
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access', _301 => _301.find, 'call', _302 => _302((v) => v.id === field.value), 'optionalAccess', _303 => _303.text]) : _nullishCoalesce(placeholder, () => ( "")) }) }),
10705
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectValue, { children: field.value ? _optionalChain([values, 'access', _302 => _302.find, 'call', _303 => _303((v) => v.id === field.value), 'optionalAccess', _304 => _304.text]) : _nullishCoalesce(placeholder, () => ( "")) }) }),
10669
10706
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, SelectContent, { children: [
10670
10707
  allowEmpty && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: EMPTY_VALUE, className: "text-muted-foreground", children: _nullishCoalesce(placeholder, () => ( "")) }),
10671
10708
  values.map((type) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, SelectItem, { value: type.id, children: type.text }, type.id))
@@ -10852,7 +10889,7 @@ function UserAvatar({ user, className, showFull, showLink, showTooltip = true })
10852
10889
  }, "getInitials");
10853
10890
  const getAvatar = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
10854
10891
  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: [
10855
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _304 => _304.avatar]) }),
10892
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { className: "object-cover", src: _optionalChain([user, 'optionalAccess', _305 => _305.avatar]) }),
10856
10893
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: getInitials3(user.name) })
10857
10894
  ] }) });
10858
10895
  }, "getAvatar");
@@ -11043,7 +11080,7 @@ var useUserTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
11043
11080
  })
11044
11081
  };
11045
11082
  const columns = _react.useMemo.call(void 0, () => {
11046
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _305 => _305[field], 'optionalCall', _306 => _306()])).filter((col) => col !== void 0);
11083
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _306 => _306[field], 'optionalCall', _307 => _307()])).filter((col) => col !== void 0);
11047
11084
  }, [params.fields, fieldColumnMap, t, generateUrl]);
11048
11085
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
11049
11086
  }, "useUserTableStructure");
@@ -11157,10 +11194,10 @@ function UserSelector({ id, form, label, placeholder, onChange, isRequired = fal
11157
11194
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
11158
11195
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: [
11159
11196
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "*:ring-border *:ring-1", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Avatar, { className: `mr-2 h-4 w-4`, children: [
11160
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _307 => _307.value, 'optionalAccess', _308 => _308.avatar]) }),
11161
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _309 => _309.value, 'optionalAccess', _310 => _310.name]) ? _optionalChain([field, 'access', _311 => _311.value, 'optionalAccess', _312 => _312.name, 'access', _313 => _313.split, 'call', _314 => _314(" "), 'access', _315 => _315.map, 'call', _316 => _316((name) => name.charAt(0).toUpperCase())]) : "X" })
11197
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarImage, { src: _optionalChain([field, 'access', _308 => _308.value, 'optionalAccess', _309 => _309.avatar]) }),
11198
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AvatarFallback, { children: _optionalChain([field, 'access', _310 => _310.value, 'optionalAccess', _311 => _311.name]) ? _optionalChain([field, 'access', _312 => _312.value, 'optionalAccess', _313 => _313.name, 'access', _314 => _314.split, 'call', _315 => _315(" "), 'access', _316 => _316.map, 'call', _317 => _317((name) => name.charAt(0).toUpperCase())]) : "X" })
11162
11199
  ] }) }),
11163
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _317 => _317.value, 'optionalAccess', _318 => _318.name]), () => ( "")) })
11200
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _318 => _318.value, 'optionalAccess', _319 => _319.name]), () => ( "")) })
11164
11201
  ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input text-muted-foreground flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: _nullishCoalesce(placeholder, () => ( t(`ui.search.placeholder`, { type: t(`entities.users`, { count: 1 }) }))) }) }) }),
11165
11202
  field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
11166
11203
  _lucidereact.CircleX,
@@ -11491,7 +11528,7 @@ function CompanyUsersList({ isDeleted, fullWidth }) {
11491
11528
  const data = useDataListRetriever({
11492
11529
  ready: !!company,
11493
11530
  retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkPQBKPWBYjs.UserService.findAllUsers(params), "retriever"),
11494
- retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _319 => _319.id]), isDeleted },
11531
+ retrieverParams: { companyId: _optionalChain([company, 'optionalAccess', _320 => _320.id]), isDeleted },
11495
11532
  module: _chunkPQBKPWBYjs.Modules.User
11496
11533
  });
11497
11534
  _react.useEffect.call(void 0, () => {
@@ -11598,11 +11635,11 @@ function UserListInAdd({ data, existingUsers, setSelectedUser, setLevelOpen }) {
11598
11635
  className: "cursor-pointer hover:bg-muted data-selected:hover:bg-muted bg-transparent data-selected:bg-transparent",
11599
11636
  onClick: (_e) => {
11600
11637
  setSelectedUser(user);
11601
- _optionalChain([setLevelOpen, 'optionalCall', _320 => _320(true)]);
11638
+ _optionalChain([setLevelOpen, 'optionalCall', _321 => _321(true)]);
11602
11639
  },
11603
11640
  onSelect: (_e) => {
11604
11641
  setSelectedUser(user);
11605
- _optionalChain([setLevelOpen, 'optionalCall', _321 => _321(true)]);
11642
+ _optionalChain([setLevelOpen, 'optionalCall', _322 => _322(true)]);
11606
11643
  },
11607
11644
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between px-4 py-1", children: [
11608
11645
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, UserAvatar, { user }),
@@ -11733,7 +11770,7 @@ function CompanyContent({ company, actions }) {
11733
11770
  company.legal_address
11734
11771
  ] }),
11735
11772
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
11736
- _optionalChain([company, 'access', _322 => _322.configurations, 'optionalAccess', _323 => _323.country]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
11773
+ _optionalChain([company, 'access', _323 => _323.configurations, 'optionalAccess', _324 => _324.country]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
11737
11774
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
11738
11775
  t("features.configuration.country"),
11739
11776
  ":"
@@ -11741,7 +11778,7 @@ function CompanyContent({ company, actions }) {
11741
11778
  " ",
11742
11779
  company.configurations.country
11743
11780
  ] }),
11744
- _optionalChain([company, 'access', _324 => _324.configurations, 'optionalAccess', _325 => _325.currency]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
11781
+ _optionalChain([company, 'access', _325 => _325.configurations, 'optionalAccess', _326 => _326.currency]) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-muted-foreground text-sm", children: [
11745
11782
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "font-medium", children: [
11746
11783
  t("features.configuration.currency"),
11747
11784
  ":"
@@ -12151,7 +12188,7 @@ function CompanyEditorInternal({
12151
12188
  const t = _nextintl.useTranslations.call(void 0, );
12152
12189
  const fiscalRef = _react.useRef.call(void 0, null);
12153
12190
  const addressComponentsRef = _react.useRef.call(void 0, {});
12154
- const canAccessFeatures = hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access', _326 => _326.env, 'access', _327 => _327.NEXT_PUBLIC_PRIVATE_INSTALLATION, 'optionalAccess', _328 => _328.toLowerCase, 'call', _329 => _329()]) === "true";
12191
+ const canAccessFeatures = hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator) || hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).CompanyAdministrator) && _optionalChain([process, 'access', _327 => _327.env, 'access', _328 => _328.NEXT_PUBLIC_PRIVATE_INSTALLATION, 'optionalAccess', _329 => _329.toLowerCase, 'call', _330 => _330()]) === "true";
12155
12192
  const handleDialogOpenChange = _react.useCallback.call(void 0,
12156
12193
  (open) => {
12157
12194
  if (open && features.length === 0 && canAccessFeatures) {
@@ -12166,7 +12203,7 @@ function CompanyEditorInternal({
12166
12203
  _chunk7QVYU63Ejs.__name.call(void 0, fetchFeatures, "fetchFeatures");
12167
12204
  fetchFeatures();
12168
12205
  }
12169
- _optionalChain([onDialogOpenChange, 'optionalCall', _330 => _330(open)]);
12206
+ _optionalChain([onDialogOpenChange, 'optionalCall', _331 => _331(open)]);
12170
12207
  },
12171
12208
  [features.length, canAccessFeatures, hasRole, onDialogOpenChange]
12172
12209
  );
@@ -12211,12 +12248,12 @@ function CompanyEditorInternal({
12211
12248
  );
12212
12249
  const getDefaultValues = _react.useCallback.call(void 0, () => {
12213
12250
  return {
12214
- id: _optionalChain([company, 'optionalAccess', _331 => _331.id]) || _uuid.v4.call(void 0, ),
12215
- name: _optionalChain([company, 'optionalAccess', _332 => _332.name]) || "",
12216
- featureIds: _optionalChain([company, 'optionalAccess', _333 => _333.features, 'access', _334 => _334.map, 'call', _335 => _335((feature) => feature.id)]) || [],
12217
- moduleIds: _optionalChain([company, 'optionalAccess', _336 => _336.modules, 'access', _337 => _337.map, 'call', _338 => _338((module) => module.id)]) || [],
12218
- logo: _optionalChain([company, 'optionalAccess', _339 => _339.logo]) || "",
12219
- legal_address: _optionalChain([company, 'optionalAccess', _340 => _340.legal_address]) || ""
12251
+ id: _optionalChain([company, 'optionalAccess', _332 => _332.id]) || _uuid.v4.call(void 0, ),
12252
+ name: _optionalChain([company, 'optionalAccess', _333 => _333.name]) || "",
12253
+ featureIds: _optionalChain([company, 'optionalAccess', _334 => _334.features, 'access', _335 => _335.map, 'call', _336 => _336((feature) => feature.id)]) || [],
12254
+ moduleIds: _optionalChain([company, 'optionalAccess', _337 => _337.modules, 'access', _338 => _338.map, 'call', _339 => _339((module) => module.id)]) || [],
12255
+ logo: _optionalChain([company, 'optionalAccess', _340 => _340.logo]) || "",
12256
+ legal_address: _optionalChain([company, 'optionalAccess', _341 => _341.legal_address]) || ""
12220
12257
  };
12221
12258
  }, [company]);
12222
12259
  const form = _reacthookform.useForm.call(void 0, {
@@ -12228,7 +12265,7 @@ function CompanyEditorInternal({
12228
12265
  {
12229
12266
  form,
12230
12267
  entityType: t(`entities.companies`, { count: 1 }),
12231
- entityName: _optionalChain([company, 'optionalAccess', _341 => _341.name]),
12268
+ entityName: _optionalChain([company, 'optionalAccess', _342 => _342.name]),
12232
12269
  isEdit: !!company,
12233
12270
  module: _chunkPQBKPWBYjs.Modules.Company,
12234
12271
  propagateChanges,
@@ -12253,7 +12290,7 @@ function CompanyEditorInternal({
12253
12290
  throw new Error("Fiscal data validation failed");
12254
12291
  }
12255
12292
  const payload = {
12256
- id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _342 => _342.id]), () => ( _uuid.v4.call(void 0, ))),
12293
+ id: _nullishCoalesce(_optionalChain([company, 'optionalAccess', _343 => _343.id]), () => ( _uuid.v4.call(void 0, ))),
12257
12294
  name: values.name,
12258
12295
  logo: files && contentType ? values.logo : void 0,
12259
12296
  featureIds: values.featureIds,
@@ -12284,10 +12321,10 @@ function CompanyEditorInternal({
12284
12321
  dialogOpen,
12285
12322
  onDialogOpenChange: handleDialogOpenChange,
12286
12323
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full items-start justify-between gap-x-4", children: [
12287
- /* @__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', _343 => _343.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12324
+ /* @__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', _344 => _344.logo]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
12288
12325
  _image2.default,
12289
12326
  {
12290
- src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _344 => _344.logo]) || "",
12327
+ src: file ? URL.createObjectURL(file) : _optionalChain([company, 'optionalAccess', _345 => _345.logo]) || "",
12291
12328
  alt: "Company Logo",
12292
12329
  width: 200,
12293
12330
  height: 200
@@ -12321,7 +12358,7 @@ function CompanyEditorInternal({
12321
12358
  }
12322
12359
  ),
12323
12360
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mt-2 text-sm font-semibold", children: t(`company.sections.fiscal_data`) }),
12324
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess', _345 => _345.fiscal_data])) })
12361
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ItalianFiscalData_default, { ref: fiscalRef, initialData: parseFiscalData(_optionalChain([company, 'optionalAccess', _346 => _346.fiscal_data])) })
12325
12362
  ] }),
12326
12363
  canAccessFeatures && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-96 flex-col justify-start gap-y-4", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ScrollArea, { className: "h-max", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFeatures, { form, name: t(`company.features_and_modules`), features }) }) })
12327
12364
  ] })
@@ -12438,7 +12475,7 @@ function NotificationToast(notification, t, generateUrl, reouter) {
12438
12475
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
12439
12476
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
12440
12477
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
12441
- actor: _nullishCoalesce(_optionalChain([data, 'access', _346 => _346.actor, 'optionalAccess', _347 => _347.name]), () => ( "")),
12478
+ actor: _nullishCoalesce(_optionalChain([data, 'access', _347 => _347.actor, 'optionalAccess', _348 => _348.name]), () => ( "")),
12442
12479
  title: data.title,
12443
12480
  message: _nullishCoalesce(notification.message, () => ( ""))
12444
12481
  }) }),
@@ -12467,7 +12504,7 @@ function NotificationMenuItem({ notification, closePopover }) {
12467
12504
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
12468
12505
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
12469
12506
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
12470
- actor: _nullishCoalesce(_optionalChain([data, 'access', _348 => _348.actor, 'optionalAccess', _349 => _349.name]), () => ( "")),
12507
+ actor: _nullishCoalesce(_optionalChain([data, 'access', _349 => _349.actor, 'optionalAccess', _350 => _350.name]), () => ( "")),
12471
12508
  title: data.title,
12472
12509
  message: _nullishCoalesce(notification.message, () => ( ""))
12473
12510
  }) }),
@@ -12531,7 +12568,7 @@ var NotificationContextProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(v
12531
12568
  _react.useEffect.call(void 0, () => {
12532
12569
  if (hasInitiallyLoaded || !currentUser) return;
12533
12570
  if (_chunkJO5BLONKjs.isRolesConfigured.call(void 0, )) {
12534
- const isAdmin = _optionalChain([currentUser, 'access', _350 => _350.roles, 'optionalAccess', _351 => _351.some, 'call', _352 => _352((role) => role.id === _chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator)]);
12571
+ const isAdmin = _optionalChain([currentUser, 'access', _351 => _351.roles, 'optionalAccess', _352 => _352.some, 'call', _353 => _353((role) => role.id === _chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator)]);
12535
12572
  if (isAdmin) {
12536
12573
  setHasInitiallyLoaded(true);
12537
12574
  return;
@@ -12733,7 +12770,7 @@ function OnboardingProvider({
12733
12770
  let tourSteps = steps;
12734
12771
  if (!tourSteps) {
12735
12772
  const tour2 = tours.find((t) => t.id === tourId);
12736
- tourSteps = _optionalChain([tour2, 'optionalAccess', _353 => _353.steps]);
12773
+ tourSteps = _optionalChain([tour2, 'optionalAccess', _354 => _354.steps]);
12737
12774
  }
12738
12775
  if (!tourSteps || tourSteps.length === 0) {
12739
12776
  console.warn(`No steps found for tour: ${tourId}`);
@@ -12801,10 +12838,10 @@ function OnboardingProvider({
12801
12838
  when: {
12802
12839
  show: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
12803
12840
  setCurrentStepIndex(index);
12804
- _optionalChain([stepConfig, 'access', _354 => _354.onShow, 'optionalCall', _355 => _355()]);
12841
+ _optionalChain([stepConfig, 'access', _355 => _355.onShow, 'optionalCall', _356 => _356()]);
12805
12842
  }, "show"),
12806
12843
  hide: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
12807
- _optionalChain([stepConfig, 'access', _356 => _356.onHide, 'optionalCall', _357 => _357()]);
12844
+ _optionalChain([stepConfig, 'access', _357 => _357.onHide, 'optionalCall', _358 => _358()]);
12808
12845
  }, "hide")
12809
12846
  }
12810
12847
  });
@@ -12970,7 +13007,7 @@ function HowToMultiSelector({
12970
13007
  retriever: (params) => _chunkPQBKPWBYjs.HowToService.findMany(params),
12971
13008
  module: _chunkPQBKPWBYjs.Modules.HowTo,
12972
13009
  getLabel: (howTo) => howTo.name,
12973
- excludeId: _optionalChain([currentHowTo, 'optionalAccess', _358 => _358.id]),
13010
+ excludeId: _optionalChain([currentHowTo, 'optionalAccess', _359 => _359.id]),
12974
13011
  onChange
12975
13012
  }
12976
13013
  );
@@ -13078,17 +13115,17 @@ function HowToEditorInternal({
13078
13115
  );
13079
13116
  const getDefaultValues = _react.useCallback.call(void 0,
13080
13117
  () => ({
13081
- id: _optionalChain([howTo, 'optionalAccess', _359 => _359.id]) || _uuid.v4.call(void 0, ),
13082
- name: _optionalChain([howTo, 'optionalAccess', _360 => _360.name]) || "",
13083
- description: _optionalChain([howTo, 'optionalAccess', _361 => _361.description]) || [],
13084
- pages: _chunkPQBKPWBYjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess', _362 => _362.pages])),
13085
- howToType: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _363 => _363.howToType]), () => ( "how-to")),
13086
- slug: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _364 => _364.slug]), () => ( "")),
13087
- order: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _365 => _365.order]), () => ( 0)),
13088
- summary: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _366 => _366.summary]), () => ( "")),
13089
- tags: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _367 => _367.tags]), () => ( []))).join(", "),
13090
- contextualKeys: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _368 => _368.contextualKeys]), () => ( []))).join(", "),
13091
- draft: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _369 => _369.draft]), () => ( false)),
13118
+ id: _optionalChain([howTo, 'optionalAccess', _360 => _360.id]) || _uuid.v4.call(void 0, ),
13119
+ name: _optionalChain([howTo, 'optionalAccess', _361 => _361.name]) || "",
13120
+ description: _optionalChain([howTo, 'optionalAccess', _362 => _362.description]) || [],
13121
+ pages: _chunkPQBKPWBYjs.HowTo.parsePagesFromString(_optionalChain([howTo, 'optionalAccess', _363 => _363.pages])),
13122
+ howToType: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _364 => _364.howToType]), () => ( "how-to")),
13123
+ slug: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _365 => _365.slug]), () => ( "")),
13124
+ order: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _366 => _366.order]), () => ( 0)),
13125
+ summary: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _367 => _367.summary]), () => ( "")),
13126
+ tags: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _368 => _368.tags]), () => ( []))).join(", "),
13127
+ contextualKeys: (_nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _369 => _369.contextualKeys]), () => ( []))).join(", "),
13128
+ draft: _nullishCoalesce(_optionalChain([howTo, 'optionalAccess', _370 => _370.draft]), () => ( false)),
13092
13129
  relatedArticles: []
13093
13130
  }),
13094
13131
  [howTo]
@@ -13099,7 +13136,7 @@ function HowToEditorInternal({
13099
13136
  });
13100
13137
  const initialRelatedIds = _react.useRef.call(void 0, []);
13101
13138
  _react.useEffect.call(void 0, () => {
13102
- if (!_optionalChain([howTo, 'optionalAccess', _370 => _370.howToType]) || !_optionalChain([howTo, 'optionalAccess', _371 => _371.slug])) return;
13139
+ if (!_optionalChain([howTo, 'optionalAccess', _371 => _371.howToType]) || !_optionalChain([howTo, 'optionalAccess', _372 => _372.slug])) return;
13103
13140
  let active = true;
13104
13141
  _chunkPQBKPWBYjs.HowToService.findRelated({ howToType: howTo.howToType, slug: howTo.slug }).then((list) => {
13105
13142
  if (!active) return;
@@ -13138,7 +13175,7 @@ function HowToEditorInternal({
13138
13175
  {
13139
13176
  form,
13140
13177
  entityType: t(`entities.howtos`, { count: 1 }),
13141
- entityName: _optionalChain([howTo, 'optionalAccess', _372 => _372.name]),
13178
+ entityName: _optionalChain([howTo, 'optionalAccess', _373 => _373.name]),
13142
13179
  isEdit: !!howTo,
13143
13180
  module: _chunkPQBKPWBYjs.Modules.HowTo,
13144
13181
  propagateChanges,
@@ -13519,7 +13556,7 @@ function withPatchedTitle(source, title) {
13519
13556
  return _chunkPQBKPWBYjs.rehydrate.call(void 0, _chunkPQBKPWBYjs.Modules.Assistant, {
13520
13557
  jsonApi: {
13521
13558
  ...dehydrated.jsonApi,
13522
- attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _373 => _373.jsonApi, 'optionalAccess', _374 => _374.attributes]), () => ( {})), title }
13559
+ attributes: { ..._nullishCoalesce(_optionalChain([dehydrated, 'access', _374 => _374.jsonApi, 'optionalAccess', _375 => _375.attributes]), () => ( {})), title }
13523
13560
  },
13524
13561
  included: dehydrated.included
13525
13562
  });
@@ -13540,7 +13577,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
13540
13577
  const [status, setStatus] = _react.useState.call(void 0, void 0);
13541
13578
  const [failedMessageIds, setFailedMessageIds] = _react.useState.call(void 0, () => /* @__PURE__ */ new Set());
13542
13579
  const [operatorMode, setOperatorMode] = _react.useState.call(void 0,
13543
- () => _optionalChain([dehydratedAssistant, 'optionalAccess', _375 => _375.jsonApi, 'optionalAccess', _376 => _376.attributes, 'optionalAccess', _377 => _377.engine]) === "operator"
13580
+ () => _optionalChain([dehydratedAssistant, 'optionalAccess', _376 => _376.jsonApi, 'optionalAccess', _377 => _377.attributes, 'optionalAccess', _378 => _378.engine]) === "operator"
13544
13581
  );
13545
13582
  const { socket } = useSocketContext();
13546
13583
  const sendMessage = _react.useCallback.call(void 0,
@@ -13549,7 +13586,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
13549
13586
  if (!trimmed) return;
13550
13587
  const optimistic = _chunkPQBKPWBYjs.AssistantMessage.buildOptimistic({
13551
13588
  content: trimmed,
13552
- assistantId: _optionalChain([assistant, 'optionalAccess', _378 => _378.id]),
13589
+ assistantId: _optionalChain([assistant, 'optionalAccess', _379 => _379.id]),
13553
13590
  position: nextPosition(messages)
13554
13591
  });
13555
13592
  setMessages((prev) => [...prev, optimistic]);
@@ -13559,13 +13596,13 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
13559
13596
  if (assistant && payload.assistantId && payload.assistantId !== assistant.id) return;
13560
13597
  if (typeof payload.status === "string") setStatus(payload.status);
13561
13598
  }, "handler");
13562
- _optionalChain([socket, 'optionalAccess', _379 => _379.on, 'call', _380 => _380("assistant:status", handler)]);
13599
+ _optionalChain([socket, 'optionalAccess', _380 => _380.on, 'call', _381 => _381("assistant:status", handler)]);
13563
13600
  try {
13564
13601
  if (!assistant) {
13565
13602
  const input = {
13566
13603
  firstMessage: trimmed,
13567
- howToMode: _optionalChain([opts, 'optionalAccess', _381 => _381.howToMode]),
13568
- limitToHowToId: _optionalChain([opts, 'optionalAccess', _382 => _382.limitToHowToId])
13604
+ howToMode: _optionalChain([opts, 'optionalAccess', _382 => _382.howToMode]),
13605
+ limitToHowToId: _optionalChain([opts, 'optionalAccess', _383 => _383.limitToHowToId])
13569
13606
  };
13570
13607
  const created = operatorMode ? await _chunkPQBKPWBYjs.AssistantService.createOperator(input) : await _chunkPQBKPWBYjs.AssistantService.create(input);
13571
13608
  const msgs = await _chunkPQBKPWBYjs.AssistantMessageService.findByAssistant({ assistantId: created.id });
@@ -13582,8 +13619,8 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
13582
13619
  }) : await _chunkPQBKPWBYjs.AssistantService.appendMessage({
13583
13620
  assistantId: assistant.id,
13584
13621
  content: trimmed,
13585
- howToMode: _optionalChain([opts, 'optionalAccess', _383 => _383.howToMode]),
13586
- limitToHowToId: _optionalChain([opts, 'optionalAccess', _384 => _384.limitToHowToId])
13622
+ howToMode: _optionalChain([opts, 'optionalAccess', _384 => _384.howToMode]),
13623
+ limitToHowToId: _optionalChain([opts, 'optionalAccess', _385 => _385.limitToHowToId])
13587
13624
  });
13588
13625
  setMessages((prev) => [...stripOptimistic(prev), ...result]);
13589
13626
  }
@@ -13594,7 +13631,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
13594
13631
  return next;
13595
13632
  });
13596
13633
  } finally {
13597
- _optionalChain([socket, 'optionalAccess', _385 => _385.off, 'call', _386 => _386("assistant:status", handler)]);
13634
+ _optionalChain([socket, 'optionalAccess', _386 => _386.off, 'call', _387 => _387("assistant:status", handler)]);
13598
13635
  setSending(false);
13599
13636
  setStatus(void 0);
13600
13637
  }
@@ -13652,7 +13689,7 @@ function AssistantProvider({ children, dehydratedAssistant, dehydratedMessages,
13652
13689
  await _chunkPQBKPWBYjs.AssistantService.delete({ id });
13653
13690
  setThreads((prev) => prev.filter((t2) => t2.id !== id));
13654
13691
  setAssistant((prev) => {
13655
- if (_optionalChain([prev, 'optionalAccess', _387 => _387.id]) === id) {
13692
+ if (_optionalChain([prev, 'optionalAccess', _388 => _388.id]) === id) {
13656
13693
  setMessages([]);
13657
13694
  return void 0;
13658
13695
  }
@@ -13872,7 +13909,7 @@ function EditableAvatar({
13872
13909
  }, [image, isUploading, patchImage, t]);
13873
13910
  const handleFileInputChange = _react.useCallback.call(void 0,
13874
13911
  (e) => {
13875
- const file = _optionalChain([e, 'access', _388 => _388.target, 'access', _389 => _389.files, 'optionalAccess', _390 => _390[0]]);
13912
+ const file = _optionalChain([e, 'access', _389 => _389.target, 'access', _390 => _390.files, 'optionalAccess', _391 => _391[0]]);
13876
13913
  if (file) handleFile(file);
13877
13914
  e.target.value = "";
13878
13915
  },
@@ -13881,7 +13918,7 @@ function EditableAvatar({
13881
13918
  const handleDrop = _react.useCallback.call(void 0,
13882
13919
  (e) => {
13883
13920
  e.preventDefault();
13884
- const file = _optionalChain([e, 'access', _391 => _391.dataTransfer, 'access', _392 => _392.files, 'optionalAccess', _393 => _393[0]]);
13921
+ const file = _optionalChain([e, 'access', _392 => _392.dataTransfer, 'access', _393 => _393.files, 'optionalAccess', _394 => _394[0]]);
13885
13922
  if (file && file.type.startsWith("image/")) {
13886
13923
  handleFile(file);
13887
13924
  }
@@ -13908,7 +13945,7 @@ function EditableAvatar({
13908
13945
  "button",
13909
13946
  {
13910
13947
  type: "button",
13911
- onClick: () => _optionalChain([fileInputRef, 'access', _394 => _394.current, 'optionalAccess', _395 => _395.click, 'call', _396 => _396()]),
13948
+ onClick: () => _optionalChain([fileInputRef, 'access', _395 => _395.current, 'optionalAccess', _396 => _396.click, 'call', _397 => _397()]),
13912
13949
  disabled: isUploading,
13913
13950
  className: "rounded-full p-2 text-white hover:bg-white/20 disabled:opacity-50",
13914
13951
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.PencilIcon, { className: "h-4 w-4" })
@@ -13989,7 +14026,7 @@ function BreadcrumbMobile({
13989
14026
  }
13990
14027
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenu, { open, onOpenChange: setOpen, children: [
13991
14028
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, DropdownMenuTrigger, { className: "text-foreground text-xs/relaxed font-normal hover:bg-accent flex items-center gap-1 rounded-md px-1.5 py-0.5 transition-colors outline-none", children: [
13992
- _optionalChain([lastItem, 'optionalAccess', _397 => _397.name]),
14029
+ _optionalChain([lastItem, 'optionalAccess', _398 => _398.name]),
13993
14030
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronDownIcon, { className: "text-muted-foreground size-3.5" })
13994
14031
  ] }),
13995
14032
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuContent, { align: "start", children: allItems.map((item, index) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DropdownMenuItem, { children: item.href ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Link, { href: item.href, onClick: item.onClick, children: item.name }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: item.name }) }, index)) })
@@ -14310,7 +14347,7 @@ var railTriggerClass = _chunkPQBKPWBYjs.cn.call(void 0,
14310
14347
  "data-[state=active]:bg-foreground data-[state=active]:text-background",
14311
14348
  "data-[state=active]:font-semibold data-[state=active]:shadow-none"
14312
14349
  );
14313
- var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access', _398 => _398.key, 'optionalAccess', _399 => _399.name]))), () => ( tab.label)), "tabValue");
14350
+ var tabValue = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (tab) => _nullishCoalesce(_nullishCoalesce(tab.sectionKey, () => ( _optionalChain([tab, 'access', _399 => _399.key, 'optionalAccess', _400 => _400.name]))), () => ( tab.label)), "tabValue");
14314
14351
  function RoundPageContainer({
14315
14352
  module,
14316
14353
  id,
@@ -14329,7 +14366,7 @@ function RoundPageContainer({
14329
14366
  const [mounted, setMounted] = _react.useState.call(void 0, false);
14330
14367
  _react.useEffect.call(void 0, () => {
14331
14368
  const match = document.cookie.split("; ").find((row) => row.startsWith(`${DETAILS_COOKIE_NAME}=`));
14332
- if (_optionalChain([match, 'optionalAccess', _400 => _400.split, 'call', _401 => _401("="), 'access', _402 => _402[1]]) === "true") setShowDetailsState(true);
14369
+ if (_optionalChain([match, 'optionalAccess', _401 => _401.split, 'call', _402 => _402("="), 'access', _403 => _403[1]]) === "true") setShowDetailsState(true);
14333
14370
  }, []);
14334
14371
  _react.useEffect.call(void 0, () => {
14335
14372
  setMounted(true);
@@ -14358,7 +14395,7 @@ function RoundPageContainer({
14358
14395
  },
14359
14396
  [module, id, rewriteUrl]
14360
14397
  );
14361
- const activeFillHeight = _optionalChain([tabs, 'optionalAccess', _403 => _403.find, 'call', _404 => _404((t) => tabValue(t) === activeTab), 'optionalAccess', _405 => _405.fillHeight]) === true;
14398
+ const activeFillHeight = _optionalChain([tabs, 'optionalAccess', _404 => _404.find, 'call', _405 => _405((t) => tabValue(t) === activeTab), 'optionalAccess', _406 => _406.fillHeight]) === true;
14362
14399
  const { ungrouped, groups } = _react.useMemo.call(void 0, () => partitionTabs(_nullishCoalesce(tabs, () => ( []))), [tabs]);
14363
14400
  const isReady = mounted && isMobile !== void 0;
14364
14401
  if (!isReady) {
@@ -14640,14 +14677,14 @@ function BlockNoteEditorMentionHoverCard({
14640
14677
  const entityType = target.dataset.mentionType;
14641
14678
  const alias = target.dataset.mentionAlias;
14642
14679
  setHovered((prev) => {
14643
- if (_optionalChain([prev, 'optionalAccess', _406 => _406.id]) === id && _optionalChain([prev, 'optionalAccess', _407 => _407.element]) === target) return prev;
14680
+ if (_optionalChain([prev, 'optionalAccess', _407 => _407.id]) === id && _optionalChain([prev, 'optionalAccess', _408 => _408.element]) === target) return prev;
14644
14681
  return { id, entityType, alias, element: target };
14645
14682
  });
14646
14683
  }, "handleMouseOver");
14647
14684
  const handleMouseOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
14648
14685
  const target = e.target.closest("[data-mention-id]");
14649
14686
  if (!target) return;
14650
- const related = _optionalChain([e, 'access', _408 => _408.relatedTarget, 'optionalAccess', _409 => _409.closest, 'call', _410 => _410("[data-mention-id]")]);
14687
+ const related = _optionalChain([e, 'access', _409 => _409.relatedTarget, 'optionalAccess', _410 => _410.closest, 'call', _411 => _411("[data-mention-id]")]);
14651
14688
  if (related) return;
14652
14689
  scheduleClose();
14653
14690
  }, "handleMouseOut");
@@ -14661,7 +14698,7 @@ function BlockNoteEditorMentionHoverCard({
14661
14698
  }, [containerRef, mentionResolveFn, cancelClose, scheduleClose]);
14662
14699
  if (!hovered || !mentionResolveFn) return null;
14663
14700
  const resolved = mentionResolveFn(hovered.id, hovered.entityType, hovered.alias);
14664
- if (!_optionalChain([resolved, 'optionalAccess', _411 => _411.HoverContent])) return null;
14701
+ if (!_optionalChain([resolved, 'optionalAccess', _412 => _412.HoverContent])) return null;
14665
14702
  const ContentComponent = resolved.HoverContent;
14666
14703
  const rect = hovered.element.getBoundingClientRect();
14667
14704
  return _reactdom.createPortal.call(void 0,
@@ -14704,28 +14741,28 @@ var parseMentionElement = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (
14704
14741
  }, "parseMentionElement");
14705
14742
  var createMentionInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (resolveFn, disableMention, nameResolver) => {
14706
14743
  const MentionExternalHTML = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
14707
- const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _412 => _412(props.id, props.entityType, props.alias)]), () => ( props.alias));
14744
+ const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _413 => _413(props.id, props.entityType, props.alias)]), () => ( props.alias));
14708
14745
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { "data-mention-id": props.id, "data-mention-type": props.entityType, "data-mention-alias": props.alias, children: [
14709
14746
  "@",
14710
14747
  displayName
14711
14748
  ] });
14712
14749
  }, "MentionExternalHTML");
14713
14750
  const Mention = React.default.memo(/* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, function Mention2(props) {
14714
- const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _413 => _413(props.id, props.entityType, props.alias)]), () => ( props.alias));
14751
+ const displayName = _nullishCoalesce(_optionalChain([nameResolver, 'optionalCall', _414 => _414(props.id, props.entityType, props.alias)]), () => ( props.alias));
14715
14752
  if (disableMention) {
14716
- const resolved2 = _optionalChain([resolveFn, 'optionalCall', _414 => _414(props.id, props.entityType, displayName)]);
14717
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _415 => _415.url]), () => ( "#")), className: "text-primary", children: [
14753
+ const resolved2 = _optionalChain([resolveFn, 'optionalCall', _415 => _415(props.id, props.entityType, displayName)]);
14754
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _link2.default, { href: _nullishCoalesce(_optionalChain([resolved2, 'optionalAccess', _416 => _416.url]), () => ( "#")), className: "text-primary", children: [
14718
14755
  "@",
14719
14756
  displayName
14720
14757
  ] });
14721
14758
  }
14722
- const resolved = _optionalChain([resolveFn, 'optionalCall', _416 => _416(props.id, props.entityType, displayName)]);
14723
- if (_optionalChain([resolved, 'optionalAccess', _417 => _417.Inline])) {
14759
+ const resolved = _optionalChain([resolveFn, 'optionalCall', _417 => _417(props.id, props.entityType, displayName)]);
14760
+ if (_optionalChain([resolved, 'optionalAccess', _418 => _418.Inline])) {
14724
14761
  const Custom = resolved.Inline;
14725
14762
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Custom, { ...props, alias: displayName });
14726
14763
  }
14727
- const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _418 => _418.url]), () => ( "#"));
14728
- const handleClick = _optionalChain([resolved, 'optionalAccess', _419 => _419.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
14764
+ const href = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _419 => _419.url]), () => ( "#"));
14765
+ const handleClick = _optionalChain([resolved, 'optionalAccess', _420 => _420.onActivate]) ? (e) => resolved.onActivate(e, props) : void 0;
14729
14766
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
14730
14767
  _link2.default,
14731
14768
  {
@@ -14831,7 +14868,7 @@ function BlockNoteEditorMentionSuggestionMenu({
14831
14868
  if (!suggestionMenuComponent) return void 0;
14832
14869
  const Component2 = suggestionMenuComponent;
14833
14870
  const Wrapped = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (props) => {
14834
- const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _420 => _420.items, 'access', _421 => _421[0], 'optionalAccess', _422 => _422.title]) === KEEP_OPEN_SENTINEL_TITLE;
14871
+ const isSentinelOnly = props.items.length === 1 && _optionalChain([props, 'access', _421 => _421.items, 'access', _422 => _422[0], 'optionalAccess', _423 => _423.title]) === KEEP_OPEN_SENTINEL_TITLE;
14835
14872
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
14836
14873
  Component2,
14837
14874
  {
@@ -14840,7 +14877,7 @@ function BlockNoteEditorMentionSuggestionMenu({
14840
14877
  selectedIndex: isSentinelOnly ? void 0 : props.selectedIndex,
14841
14878
  onItemClick: (item) => {
14842
14879
  if (item.title === KEEP_OPEN_SENTINEL_TITLE) return;
14843
- _optionalChain([props, 'access', _423 => _423.onItemClick, 'optionalCall', _424 => _424(item)]);
14880
+ _optionalChain([props, 'access', _424 => _424.onItemClick, 'optionalCall', _425 => _425(item)]);
14844
14881
  }
14845
14882
  }
14846
14883
  );
@@ -15034,10 +15071,10 @@ var cellId = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => {
15034
15071
  cell: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ row }) => params.toggleId ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15035
15072
  Checkbox,
15036
15073
  {
15037
- checked: _optionalChain([params, 'access', _425 => _425.checkedIds, 'optionalAccess', _426 => _426.includes, 'call', _427 => _427(row.getValue(params.name))]) || false,
15074
+ checked: _optionalChain([params, 'access', _426 => _426.checkedIds, 'optionalAccess', _427 => _427.includes, 'call', _428 => _428(row.getValue(params.name))]) || false,
15038
15075
  onCheckedChange: (value) => {
15039
15076
  row.toggleSelected(!!value);
15040
- _optionalChain([params, 'access', _428 => _428.toggleId, 'optionalCall', _429 => _429(row.getValue(params.name))]);
15077
+ _optionalChain([params, 'access', _429 => _429.toggleId, 'optionalCall', _430 => _430(row.getValue(params.name))]);
15041
15078
  },
15042
15079
  "aria-label": "Select row"
15043
15080
  }
@@ -15096,7 +15133,7 @@ function useJsonApiGet(params) {
15096
15133
  const [response, setResponse] = _react.useState.call(void 0, null);
15097
15134
  const isMounted = _react.useRef.call(void 0, true);
15098
15135
  const fetchData = _react.useCallback.call(void 0, async () => {
15099
- if (_optionalChain([params, 'access', _430 => _430.options, 'optionalAccess', _431 => _431.enabled]) === false) return;
15136
+ if (_optionalChain([params, 'access', _431 => _431.options, 'optionalAccess', _432 => _432.enabled]) === false) return;
15100
15137
  setLoading(true);
15101
15138
  setError(null);
15102
15139
  try {
@@ -15123,9 +15160,9 @@ function useJsonApiGet(params) {
15123
15160
  setLoading(false);
15124
15161
  }
15125
15162
  }
15126
- }, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _432 => _432.options, 'optionalAccess', _433 => _433.enabled])]);
15163
+ }, [params.classKey, params.endpoint, params.companyId, _optionalChain([params, 'access', _433 => _433.options, 'optionalAccess', _434 => _434.enabled])]);
15127
15164
  const fetchNextPage = _react.useCallback.call(void 0, async () => {
15128
- if (!_optionalChain([response, 'optionalAccess', _434 => _434.nextPage])) return;
15165
+ if (!_optionalChain([response, 'optionalAccess', _435 => _435.nextPage])) return;
15129
15166
  setLoading(true);
15130
15167
  try {
15131
15168
  const nextResponse = await response.nextPage();
@@ -15146,7 +15183,7 @@ function useJsonApiGet(params) {
15146
15183
  }
15147
15184
  }, [response]);
15148
15185
  const fetchPreviousPage = _react.useCallback.call(void 0, async () => {
15149
- if (!_optionalChain([response, 'optionalAccess', _435 => _435.prevPage])) return;
15186
+ if (!_optionalChain([response, 'optionalAccess', _436 => _436.prevPage])) return;
15150
15187
  setLoading(true);
15151
15188
  try {
15152
15189
  const prevResponse = await response.prevPage();
@@ -15172,15 +15209,15 @@ function useJsonApiGet(params) {
15172
15209
  return () => {
15173
15210
  isMounted.current = false;
15174
15211
  };
15175
- }, [fetchData, ..._optionalChain([params, 'access', _436 => _436.options, 'optionalAccess', _437 => _437.deps]) || []]);
15212
+ }, [fetchData, ..._optionalChain([params, 'access', _437 => _437.options, 'optionalAccess', _438 => _438.deps]) || []]);
15176
15213
  return {
15177
15214
  data,
15178
15215
  loading,
15179
15216
  error,
15180
15217
  response,
15181
15218
  refetch: fetchData,
15182
- hasNextPage: !!_optionalChain([response, 'optionalAccess', _438 => _438.next]),
15183
- hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _439 => _439.prev]),
15219
+ hasNextPage: !!_optionalChain([response, 'optionalAccess', _439 => _439.next]),
15220
+ hasPreviousPage: !!_optionalChain([response, 'optionalAccess', _440 => _440.prev]),
15184
15221
  fetchNextPage,
15185
15222
  fetchPreviousPage
15186
15223
  };
@@ -15258,17 +15295,17 @@ function useJsonApiMutation(config) {
15258
15295
  if (apiResponse.ok) {
15259
15296
  const resultData = apiResponse.data;
15260
15297
  setData(resultData);
15261
- _optionalChain([config, 'access', _440 => _440.onSuccess, 'optionalCall', _441 => _441(resultData)]);
15298
+ _optionalChain([config, 'access', _441 => _441.onSuccess, 'optionalCall', _442 => _442(resultData)]);
15262
15299
  return resultData;
15263
15300
  } else {
15264
15301
  setError(apiResponse.error);
15265
- _optionalChain([config, 'access', _442 => _442.onError, 'optionalCall', _443 => _443(apiResponse.error)]);
15302
+ _optionalChain([config, 'access', _443 => _443.onError, 'optionalCall', _444 => _444(apiResponse.error)]);
15266
15303
  return null;
15267
15304
  }
15268
15305
  } catch (err) {
15269
15306
  const errorMessage = err instanceof Error ? err.message : "Unknown error";
15270
15307
  setError(errorMessage);
15271
- _optionalChain([config, 'access', _444 => _444.onError, 'optionalCall', _445 => _445(errorMessage)]);
15308
+ _optionalChain([config, 'access', _445 => _445.onError, 'optionalCall', _446 => _446(errorMessage)]);
15272
15309
  return null;
15273
15310
  } finally {
15274
15311
  setLoading(false);
@@ -15341,7 +15378,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
15341
15378
  {
15342
15379
  href: hasRole(_chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator) ? generateUrl({
15343
15380
  page: "/administration",
15344
- id: _optionalChain([_chunkPQBKPWBYjs.Modules, 'access', _446 => _446.Company, 'access', _447 => _447.pageUrl, 'optionalAccess', _448 => _448.substring, 'call', _449 => _449(1)]),
15381
+ id: _optionalChain([_chunkPQBKPWBYjs.Modules, 'access', _447 => _447.Company, 'access', _448 => _448.pageUrl, 'optionalAccess', _449 => _449.substring, 'call', _450 => _450(1)]),
15345
15382
  childPage: company.id
15346
15383
  }) : generateUrl({ page: _chunkPQBKPWBYjs.Modules.Company, id: company.id }),
15347
15384
  children: row.getValue("name")
@@ -15357,7 +15394,7 @@ var useCompanyTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
15357
15394
  })
15358
15395
  };
15359
15396
  const columns = _react.useMemo.call(void 0, () => {
15360
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _450 => _450[field], 'optionalCall', _451 => _451()])).filter((col) => col !== void 0);
15397
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _451 => _451[field], 'optionalCall', _452 => _452()])).filter((col) => col !== void 0);
15361
15398
  }, [params.fields, fieldColumnMap, t, generateUrl, hasRole]);
15362
15399
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
15363
15400
  }, "useCompanyTableStructure");
@@ -15369,7 +15406,7 @@ var GRACE_DAYS = 3;
15369
15406
  var isAdministrator = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (currentUser) => {
15370
15407
  if (!currentUser || !_chunkJO5BLONKjs.isRolesConfigured.call(void 0, )) return false;
15371
15408
  const adminRoleId = _chunkJO5BLONKjs.getRoleId.call(void 0, ).Administrator;
15372
- return !!_optionalChain([currentUser, 'access', _452 => _452.roles, 'optionalAccess', _453 => _453.some, 'call', _454 => _454((role) => role.id === adminRoleId)]);
15409
+ return !!_optionalChain([currentUser, 'access', _453 => _453.roles, 'optionalAccess', _454 => _454.some, 'call', _455 => _455((role) => role.id === adminRoleId)]);
15373
15410
  }, "isAdministrator");
15374
15411
  function useSubscriptionStatus() {
15375
15412
  const { company, currentUser } = useCurrentUserContext();
@@ -15486,7 +15523,7 @@ var useRoleTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0,
15486
15523
  })
15487
15524
  };
15488
15525
  const columns = _react.useMemo.call(void 0, () => {
15489
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _455 => _455[field], 'optionalCall', _456 => _456()])).filter((col) => col !== void 0);
15526
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _456 => _456[field], 'optionalCall', _457 => _457()])).filter((col) => col !== void 0);
15490
15527
  }, [params.fields, fieldColumnMap, t, generateUrl]);
15491
15528
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
15492
15529
  }, "useRoleTableStructure");
@@ -15587,11 +15624,11 @@ var useContentTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void
15587
15624
  return params.fields.map((field) => {
15588
15625
  const localHandler = fieldColumnMap[field];
15589
15626
  if (localHandler) return localHandler();
15590
- const customHandler = _optionalChain([params, 'access', _457 => _457.context, 'optionalAccess', _458 => _458.customCells, 'optionalAccess', _459 => _459[field]]);
15627
+ const customHandler = _optionalChain([params, 'access', _458 => _458.context, 'optionalAccess', _459 => _459.customCells, 'optionalAccess', _460 => _460[field]]);
15591
15628
  if (customHandler) return customHandler({ t });
15592
15629
  return void 0;
15593
15630
  }).filter((col) => col !== void 0);
15594
- }, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _460 => _460.context, 'optionalAccess', _461 => _461.customCells])]);
15631
+ }, [params.fields, fieldColumnMap, t, generateUrl, _optionalChain([params, 'access', _461 => _461.context, 'optionalAccess', _462 => _462.customCells])]);
15595
15632
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
15596
15633
  }, "useContentTableStructure");
15597
15634
 
@@ -15926,7 +15963,7 @@ function ContentTableSearch({ data }) {
15926
15963
  const handleSearchIconClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
15927
15964
  if (!isExpanded) {
15928
15965
  setIsFocused(true);
15929
- setTimeout(() => _optionalChain([inputRef, 'access', _462 => _462.current, 'optionalAccess', _463 => _463.focus, 'call', _464 => _464()]), 50);
15966
+ setTimeout(() => _optionalChain([inputRef, 'access', _463 => _463.current, 'optionalAccess', _464 => _464.focus, 'call', _465 => _465()]), 50);
15930
15967
  }
15931
15968
  }, "handleSearchIconClick");
15932
15969
  const handleBlur = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
@@ -16003,7 +16040,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
16003
16040
  props.defaultExpanded === true ? true : typeof props.defaultExpanded === "object" ? props.defaultExpanded : {}
16004
16041
  );
16005
16042
  const { data: tableData, columns: tableColumns } = useTableGenerator(props.tableGeneratorType, {
16006
- data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _465 => _465.data]), () => ( EMPTY_ARRAY)),
16043
+ data: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _466 => _466.data]), () => ( EMPTY_ARRAY)),
16007
16044
  fields,
16008
16045
  checkedIds,
16009
16046
  toggleId,
@@ -16036,7 +16073,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
16036
16073
  });
16037
16074
  const rowModel = tableData ? table.getRowModel() : null;
16038
16075
  const groupedRows = _react.useMemo.call(void 0, () => {
16039
- if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _466 => _466.rows, 'optionalAccess', _467 => _467.length])) return null;
16076
+ if (!props.groupBy || !_optionalChain([rowModel, 'optionalAccess', _467 => _467.rows, 'optionalAccess', _468 => _468.length])) return null;
16040
16077
  const groupMap = /* @__PURE__ */ new Map();
16041
16078
  for (const row of rowModel.rows) {
16042
16079
  const keys = getGroupKeys(row.original, props.groupBy);
@@ -16092,10 +16129,10 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
16092
16129
  ) }),
16093
16130
  table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: headerGroup.headers.map((header) => {
16094
16131
  const meta = header.column.columnDef.meta;
16095
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _468 => _468.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
16132
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableHead, { className: _optionalChain([meta, 'optionalAccess', _469 => _469.className]), children: header.isPlaceholder ? null : _reacttable.flexRender.call(void 0, header.column.columnDef.header, header.getContext()) }, header.id);
16096
16133
  }) }, headerGroup.id))
16097
16134
  ] }),
16098
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _469 => _469.rows, 'optionalAccess', _470 => _470.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React.default.Fragment, { children: [
16135
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: rowModel && _optionalChain([rowModel, 'access', _470 => _470.rows, 'optionalAccess', _471 => _471.length]) ? groupedRows ? groupedRows.map((group) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, React.default.Fragment, { children: [
16099
16136
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16100
16137
  TableCell,
16101
16138
  {
@@ -16106,11 +16143,11 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
16106
16143
  ) }),
16107
16144
  group.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: row.getVisibleCells().map((cell) => {
16108
16145
  const meta = cell.column.columnDef.meta;
16109
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _471 => _471.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
16146
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _472 => _472.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
16110
16147
  }) }, row.id))
16111
16148
  ] }, group.groupKey)) : rowModel.rows.map((row) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableRow, { children: row.getVisibleCells().map((cell) => {
16112
16149
  const meta = cell.column.columnDef.meta;
16113
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _472 => _472.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
16150
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { className: _optionalChain([meta, 'optionalAccess', _473 => _473.className]), children: _reacttable.flexRender.call(void 0, cell.column.columnDef.cell, cell.getContext()) }, cell.id);
16114
16151
  }) }, 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: _nullishCoalesce(props.emptyState, () => ( "No results.")) }) }) }),
16115
16152
  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: [
16116
16153
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -16120,7 +16157,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
16120
16157
  size: "sm",
16121
16158
  onClick: (e) => {
16122
16159
  e.preventDefault();
16123
- _optionalChain([data, 'access', _473 => _473.previous, 'optionalCall', _474 => _474(true)]);
16160
+ _optionalChain([data, 'access', _474 => _474.previous, 'optionalCall', _475 => _475(true)]);
16124
16161
  },
16125
16162
  disabled: !data.previous,
16126
16163
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronLeft, { className: "h-4 w-4" })
@@ -16134,7 +16171,7 @@ var ContentListTable = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs
16134
16171
  size: "sm",
16135
16172
  onClick: (e) => {
16136
16173
  e.preventDefault();
16137
- _optionalChain([data, 'access', _475 => _475.next, 'optionalCall', _476 => _476(true)]);
16174
+ _optionalChain([data, 'access', _476 => _476.next, 'optionalCall', _477 => _477(true)]);
16138
16175
  },
16139
16176
  disabled: !data.next,
16140
16177
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight, { className: "h-4 w-4" })
@@ -16155,7 +16192,7 @@ function ContentListGrid(props) {
16155
16192
  if (!data.next || !sentinelRef.current) return;
16156
16193
  const observer = new IntersectionObserver(
16157
16194
  (entries) => {
16158
- if (_optionalChain([entries, 'access', _477 => _477[0], 'optionalAccess', _478 => _478.isIntersecting])) _optionalChain([data, 'access', _479 => _479.next, 'optionalCall', _480 => _480()]);
16195
+ if (_optionalChain([entries, 'access', _478 => _478[0], 'optionalAccess', _479 => _479.isIntersecting])) _optionalChain([data, 'access', _480 => _480.next, 'optionalCall', _481 => _481()]);
16159
16196
  },
16160
16197
  { threshold: 0.1, rootMargin: "200px" }
16161
16198
  );
@@ -16905,7 +16942,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
16905
16942
  newDigits[index] = digit;
16906
16943
  setDigits(newDigits);
16907
16944
  if (digit && index < 5) {
16908
- _optionalChain([inputRefs, 'access', _481 => _481.current, 'access', _482 => _482[index + 1], 'optionalAccess', _483 => _483.focus, 'call', _484 => _484()]);
16945
+ _optionalChain([inputRefs, 'access', _482 => _482.current, 'access', _483 => _483[index + 1], 'optionalAccess', _484 => _484.focus, 'call', _485 => _485()]);
16909
16946
  }
16910
16947
  const code = newDigits.join("");
16911
16948
  if (code.length === 6 && newDigits.every((d) => d !== "")) {
@@ -16914,7 +16951,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
16914
16951
  }, "handleChange");
16915
16952
  const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (index, e) => {
16916
16953
  if (e.key === "Backspace" && !digits[index] && index > 0) {
16917
- _optionalChain([inputRefs, 'access', _485 => _485.current, 'access', _486 => _486[index - 1], 'optionalAccess', _487 => _487.focus, 'call', _488 => _488()]);
16954
+ _optionalChain([inputRefs, 'access', _486 => _486.current, 'access', _487 => _487[index - 1], 'optionalAccess', _488 => _488.focus, 'call', _489 => _489()]);
16918
16955
  }
16919
16956
  }, "handleKeyDown");
16920
16957
  const handlePaste = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
@@ -16923,7 +16960,7 @@ function TotpInput({ onComplete, disabled = false, autoFocus = true, error }) {
16923
16960
  if (pastedData.length === 6) {
16924
16961
  const newDigits = pastedData.split("");
16925
16962
  setDigits(newDigits);
16926
- _optionalChain([inputRefs, 'access', _489 => _489.current, 'access', _490 => _490[5], 'optionalAccess', _491 => _491.focus, 'call', _492 => _492()]);
16963
+ _optionalChain([inputRefs, 'access', _490 => _490.current, 'access', _491 => _491[5], 'optionalAccess', _492 => _492.focus, 'call', _493 => _493()]);
16927
16964
  onComplete(pastedData);
16928
16965
  }
16929
16966
  }, "handlePaste");
@@ -17134,8 +17171,8 @@ function PasskeySetupDialog({ open, onOpenChange, onSuccess }) {
17134
17171
  try {
17135
17172
  const registrationData = await _chunkPQBKPWBYjs.TwoFactorService.getPasskeyRegistrationOptions({
17136
17173
  id: _uuid.v4.call(void 0, ),
17137
- userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _493 => _493.email]), () => ( "")),
17138
- userDisplayName: _optionalChain([currentUser, 'optionalAccess', _494 => _494.name])
17174
+ userName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _494 => _494.email]), () => ( "")),
17175
+ userDisplayName: _optionalChain([currentUser, 'optionalAccess', _495 => _495.name])
17139
17176
  });
17140
17177
  const credential = await _browser.startRegistration.call(void 0, { optionsJSON: registrationData.options });
17141
17178
  await _chunkPQBKPWBYjs.TwoFactorService.verifyPasskeyRegistration({
@@ -17286,7 +17323,7 @@ function TotpSetupDialog({ onSuccess, trigger }) {
17286
17323
  const setup = await _chunkPQBKPWBYjs.TwoFactorService.setupTotp({
17287
17324
  id: _uuid.v4.call(void 0, ),
17288
17325
  name: name.trim(),
17289
- accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _495 => _495.email]), () => ( ""))
17326
+ accountName: _nullishCoalesce(_optionalChain([currentUser, 'optionalAccess', _496 => _496.email]), () => ( ""))
17290
17327
  });
17291
17328
  setQrCodeUri(setup.qrCodeUri);
17292
17329
  setAuthenticatorId(setup.authenticatorId);
@@ -17420,7 +17457,7 @@ function TwoFactorSettings() {
17420
17457
  if (isLoading) {
17421
17458
  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") }) }) });
17422
17459
  }
17423
- const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _496 => _496.isEnabled]), () => ( false));
17460
+ const isEnabled = _nullishCoalesce(_optionalChain([status, 'optionalAccess', _497 => _497.isEnabled]), () => ( false));
17424
17461
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Card, { children: [
17425
17462
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardHeader, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
17426
17463
  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" }),
@@ -17458,7 +17495,7 @@ function TwoFactorSettings() {
17458
17495
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "font-medium", children: t("auth.two_factor.backup_codes") }),
17459
17496
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("auth.two_factor.backup_codes_description") })
17460
17497
  ] }),
17461
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _497 => _497.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
17498
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BackupCodesDialog, { remainingCodes: _nullishCoalesce(_optionalChain([status, 'optionalAccess', _498 => _498.backupCodesCount]), () => ( 0)), onRegenerate: handleRefresh })
17462
17499
  ] }) }),
17463
17500
  !isEnabled && (authenticators.length > 0 || passkeys.length > 0) && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
17464
17501
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Separator, {}),
@@ -17636,9 +17673,9 @@ function AcceptInvitation() {
17636
17673
  });
17637
17674
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
17638
17675
  try {
17639
- if (!_optionalChain([params, 'optionalAccess', _498 => _498.code])) return;
17676
+ if (!_optionalChain([params, 'optionalAccess', _499 => _499.code])) return;
17640
17677
  const payload = {
17641
- code: _optionalChain([params, 'optionalAccess', _499 => _499.code]),
17678
+ code: _optionalChain([params, 'optionalAccess', _500 => _500.code]),
17642
17679
  password: values.password
17643
17680
  };
17644
17681
  await _chunkPQBKPWBYjs.AuthService.acceptInvitation(payload);
@@ -17988,7 +18025,7 @@ function Logout({ storageKeys }) {
17988
18025
  const generateUrl = usePageUrlGenerator();
17989
18026
  _react.useEffect.call(void 0, () => {
17990
18027
  const logOut = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
17991
- if (_optionalChain([storageKeys, 'optionalAccess', _500 => _500.length])) {
18028
+ if (_optionalChain([storageKeys, 'optionalAccess', _501 => _501.length])) {
17992
18029
  clearClientStorage(storageKeys);
17993
18030
  }
17994
18031
  await _chunkPQBKPWBYjs.AuthService.logout();
@@ -18011,14 +18048,14 @@ function RefreshUser() {
18011
18048
  setUser(fullUser);
18012
18049
  const token = {
18013
18050
  userId: fullUser.id,
18014
- companyId: _optionalChain([fullUser, 'access', _501 => _501.company, 'optionalAccess', _502 => _502.id]),
18051
+ companyId: _optionalChain([fullUser, 'access', _502 => _502.company, 'optionalAccess', _503 => _503.id]),
18015
18052
  roles: fullUser.roles.map((role) => role.id),
18016
- features: _nullishCoalesce(_optionalChain([fullUser, 'access', _503 => _503.company, 'optionalAccess', _504 => _504.features, 'optionalAccess', _505 => _505.map, 'call', _506 => _506((feature) => feature.id)]), () => ( [])),
18053
+ features: _nullishCoalesce(_optionalChain([fullUser, 'access', _504 => _504.company, 'optionalAccess', _505 => _505.features, 'optionalAccess', _506 => _506.map, 'call', _507 => _507((feature) => feature.id)]), () => ( [])),
18017
18054
  modules: fullUser.modules.map((module) => {
18018
18055
  return { id: module.id, permissions: module.permissions };
18019
18056
  })
18020
18057
  };
18021
- await _optionalChain([_chunkPQBKPWBYjs.getTokenHandler.call(void 0, ), 'optionalAccess', _507 => _507.updateToken, 'call', _508 => _508(token)]);
18058
+ await _optionalChain([_chunkPQBKPWBYjs.getTokenHandler.call(void 0, ), 'optionalAccess', _508 => _508.updateToken, 'call', _509 => _509(token)]);
18022
18059
  _cookiesnext.deleteCookie.call(void 0, "reloadData");
18023
18060
  }
18024
18061
  }, "loadFullUser");
@@ -18082,9 +18119,9 @@ function ResetPassword() {
18082
18119
  });
18083
18120
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (values) => {
18084
18121
  try {
18085
- if (!_optionalChain([params, 'optionalAccess', _509 => _509.code])) return;
18122
+ if (!_optionalChain([params, 'optionalAccess', _510 => _510.code])) return;
18086
18123
  const payload = {
18087
- code: _optionalChain([params, 'optionalAccess', _510 => _510.code]),
18124
+ code: _optionalChain([params, 'optionalAccess', _511 => _511.code]),
18088
18125
  password: values.password
18089
18126
  };
18090
18127
  await _chunkPQBKPWBYjs.AuthService.resetPassword(payload);
@@ -18433,7 +18470,7 @@ function extractHeadings(blocks) {
18433
18470
  function processBlocks(blockArray) {
18434
18471
  for (const block of blockArray) {
18435
18472
  if (block.type === "heading") {
18436
- const level = _optionalChain([block, 'access', _511 => _511.props, 'optionalAccess', _512 => _512.level]) || 1;
18473
+ const level = _optionalChain([block, 'access', _512 => _512.props, 'optionalAccess', _513 => _513.level]) || 1;
18437
18474
  const text = extractTextFromContent(block.content);
18438
18475
  if (text.trim()) {
18439
18476
  headings.push({
@@ -18776,7 +18813,7 @@ var useHowToTableStructure = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0
18776
18813
  })
18777
18814
  };
18778
18815
  const columns = _react.useMemo.call(void 0, () => {
18779
- return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _513 => _513[field], 'optionalCall', _514 => _514()])).filter((col) => col !== void 0);
18816
+ return params.fields.map((field) => _optionalChain([fieldColumnMap, 'access', _514 => _514[field], 'optionalCall', _515 => _515()])).filter((col) => col !== void 0);
18780
18817
  }, [params.fields, fieldColumnMap, t, generateUrl]);
18781
18818
  return _react.useMemo.call(void 0, () => ({ data: tableData, columns }), [tableData, columns]);
18782
18819
  }, "useHowToTableStructure");
@@ -18875,7 +18912,7 @@ function HowToSelector({
18875
18912
  }, "setHowTo");
18876
18913
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FormFieldWrapper, { form, name: id, label, isRequired, children: (field) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Popover, { open, onOpenChange: setOpen, modal: true, children: [
18877
18914
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-row items-center justify-between", children: [
18878
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _515 => _515.value, 'optionalAccess', _516 => _516.name]), () => ( "")) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input text-muted-foreground flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: _nullishCoalesce(placeholder, () => ( t(`generic.search.placeholder`, { type: t(`entities.howtos`, { count: 1 }) }))) }) }) }),
18915
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PopoverTrigger, { className: "w-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-row items-center justify-start rounded-md", children: field.value ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _nullishCoalesce(_optionalChain([field, 'access', _516 => _516.value, 'optionalAccess', _517 => _517.name]), () => ( "")) }) }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-input/20 dark:bg-input/30 border-input text-muted-foreground flex h-7 w-full flex-row items-center justify-start rounded-md border px-2 py-0.5 text-sm md:text-xs/relaxed", children: _nullishCoalesce(placeholder, () => ( t(`generic.search.placeholder`, { type: t(`entities.howtos`, { count: 1 }) }))) }) }) }),
18879
18916
  field.value && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
18880
18917
  _lucidereact.CircleX,
18881
18918
  {
@@ -19244,9 +19281,9 @@ function CitationsTab({ citations, sources }) {
19244
19281
  ] }) }),
19245
19282
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableBody, { children: sorted.map((chunk) => {
19246
19283
  const isOpen = expanded.has(chunk.id);
19247
- const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _517 => _517.get, 'call', _518 => _518(chunk.nodeId)]) : void 0;
19284
+ const resolved = chunk.nodeId ? _optionalChain([sources, 'optionalAccess', _518 => _518.get, 'call', _519 => _519(chunk.nodeId)]) : void 0;
19248
19285
  const fallbackName = chunk.nodeId ? `${_nullishCoalesce(chunk.nodeType, () => ( t("features.assistant.message.sources.source")))} ${chunk.nodeId.slice(0, 8)}` : _nullishCoalesce(chunk.nodeType, () => ( t("features.assistant.message.sources.source")));
19249
- const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _519 => _519.name]), () => ( fallbackName));
19286
+ const sourceName = _nullishCoalesce(_optionalChain([resolved, 'optionalAccess', _520 => _520.name]), () => ( fallbackName));
19250
19287
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
19251
19288
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, TableRow, { children: [
19252
19289
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, TableCell, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
@@ -19293,7 +19330,7 @@ function ContentsTab({ citations, sources }) {
19293
19330
  for (const c of citations) {
19294
19331
  const id = c.nodeId;
19295
19332
  if (!id) continue;
19296
- const source = _optionalChain([sources, 'optionalAccess', _520 => _520.get, 'call', _521 => _521(id)]);
19333
+ const source = _optionalChain([sources, 'optionalAccess', _521 => _521.get, 'call', _522 => _522(id)]);
19297
19334
  if (!source) continue;
19298
19335
  const existing = map.get(id);
19299
19336
  if (existing) {
@@ -19360,7 +19397,7 @@ function UsersTab({ users, citations, sources }) {
19360
19397
  const generate = usePageUrlGenerator();
19361
19398
  const userMap = /* @__PURE__ */ new Map();
19362
19399
  for (const u of users) {
19363
- if (!_optionalChain([u, 'optionalAccess', _522 => _522.id])) continue;
19400
+ if (!_optionalChain([u, 'optionalAccess', _523 => _523.id])) continue;
19364
19401
  userMap.set(u.id, { user: u, contentCount: 0, citationCount: 0 });
19365
19402
  }
19366
19403
  if (citations && sources) {
@@ -19465,7 +19502,7 @@ function MessageSourcesPanel({ message, isLatestAssistant, onSelectFollowUp, sou
19465
19502
  }
19466
19503
  return ids.size;
19467
19504
  }, [message.citations, sources]);
19468
- const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _523 => _523.length]), () => ( 0));
19505
+ const usersCount = _nullishCoalesce(_optionalChain([users, 'optionalAccess', _524 => _524.length]), () => ( 0));
19469
19506
  const total = refsCount + citationsCount + contentsCount + usersCount + suggestionsCount;
19470
19507
  const visibleTabs = [];
19471
19508
  if (suggestionsCount > 0) visibleTabs.push("suggested");
@@ -19525,8 +19562,8 @@ var SourcesFetcher = class extends _chunkPQBKPWBYjs.ClientAbstractService {
19525
19562
  const endpoint = new (0, _chunkPQBKPWBYjs.EndpointCreator)({ endpoint: params.module });
19526
19563
  endpoint.addAdditionalParam(params.idsParam, params.ids.join(","));
19527
19564
  endpoint.addAdditionalParam("fetchAll", "true");
19528
- if (_optionalChain([params, 'access', _524 => _524.module, 'access', _525 => _525.inclusions, 'optionalAccess', _526 => _526.lists, 'optionalAccess', _527 => _527.fields])) endpoint.limitToFields(params.module.inclusions.lists.fields);
19529
- if (_optionalChain([params, 'access', _528 => _528.module, 'access', _529 => _529.inclusions, 'optionalAccess', _530 => _530.lists, 'optionalAccess', _531 => _531.types])) endpoint.limitToType(params.module.inclusions.lists.types);
19565
+ if (_optionalChain([params, 'access', _525 => _525.module, 'access', _526 => _526.inclusions, 'optionalAccess', _527 => _527.lists, 'optionalAccess', _528 => _528.fields])) endpoint.limitToFields(params.module.inclusions.lists.fields);
19566
+ if (_optionalChain([params, 'access', _529 => _529.module, 'access', _530 => _530.inclusions, 'optionalAccess', _531 => _531.lists, 'optionalAccess', _532 => _532.types])) endpoint.limitToType(params.module.inclusions.lists.types);
19530
19567
  return this.callApi({
19531
19568
  type: params.module,
19532
19569
  method: "GET" /* GET */,
@@ -19605,7 +19642,7 @@ function MessageSourcesContainer({ message, isLatestAssistant, onSelectFollowUp
19605
19642
  return void 0;
19606
19643
  }
19607
19644
  })()));
19608
- if (_optionalChain([author, 'optionalAccess', _532 => _532.id])) userMap.set(author.id, author);
19645
+ if (_optionalChain([author, 'optionalAccess', _533 => _533.id])) userMap.set(author.id, author);
19609
19646
  }
19610
19647
  return Array.from(userMap.values());
19611
19648
  }, [resolved]);
@@ -19634,14 +19671,14 @@ function MessageItem({
19634
19671
  }) {
19635
19672
  const t = _nextintl.useTranslations.call(void 0, );
19636
19673
  const isUser = message.role === "user";
19637
- const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _533 => _533.has, 'call', _534 => _534(message.id)]);
19674
+ const isFailed = isUser && !!_optionalChain([failedMessageIds, 'optionalAccess', _534 => _534.has, 'call', _535 => _535(message.id)]);
19638
19675
  if (isUser) {
19639
19676
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-end gap-1", children: [
19640
19677
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-primary text-primary-foreground max-w-[72%] rounded-2xl rounded-br-sm px-3.5 py-2 text-sm", children: message.content }),
19641
19678
  isFailed && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-destructive flex items-center gap-2 text-xs", children: [
19642
19679
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-3.5 w-3.5" }),
19643
19680
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("features.assistant.send_failed") }),
19644
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "underline", onClick: () => _optionalChain([onRetry, 'optionalCall', _535 => _535(message.id)]), children: t("features.assistant.retry") })
19681
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "button", { type: "button", className: "underline", onClick: () => _optionalChain([onRetry, 'optionalCall', _536 => _536(message.id)]), children: t("features.assistant.retry") })
19645
19682
  ] })
19646
19683
  ] });
19647
19684
  }
@@ -19717,7 +19754,7 @@ function AssistantThread({
19717
19754
  }) {
19718
19755
  const endRef = _react.useRef.call(void 0, null);
19719
19756
  _react.useEffect.call(void 0, () => {
19720
- _optionalChain([endRef, 'access', _536 => _536.current, 'optionalAccess', _537 => _537.scrollIntoView, 'call', _538 => _538({ behavior: "smooth" })]);
19757
+ _optionalChain([endRef, 'access', _537 => _537.current, 'optionalAccess', _538 => _538.scrollIntoView, 'call', _539 => _539({ behavior: "smooth" })]);
19721
19758
  }, [messages.length, sending]);
19722
19759
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex-1 min-w-0 overflow-x-hidden overflow-y-auto px-6 py-5", children: [
19723
19760
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -19746,7 +19783,7 @@ function AssistantContainer({ renderApprovalAction } = {}) {
19746
19783
  AssistantSidebar,
19747
19784
  {
19748
19785
  threads: ctx.threads,
19749
- activeId: _optionalChain([ctx, 'access', _539 => _539.assistant, 'optionalAccess', _540 => _540.id]),
19786
+ activeId: _optionalChain([ctx, 'access', _540 => _540.assistant, 'optionalAccess', _541 => _541.id]),
19750
19787
  onSelect: ctx.selectThread,
19751
19788
  onNew: ctx.startNew
19752
19789
  }
@@ -19847,14 +19884,14 @@ function NotificationsList({ archived }) {
19847
19884
  ] }),
19848
19885
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Skeleton, { className: "h-8 w-20" })
19849
19886
  ] }) }) }, i)) }), "LoadingSkeleton");
19850
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access', _541 => _541.data, 'optionalAccess', _542 => _542.map, 'call', _543 => _543((notification) => {
19887
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-4", children: data.isLoaded ? _optionalChain([data, 'access', _542 => _542.data, 'optionalAccess', _543 => _543.map, 'call', _544 => _544((notification) => {
19851
19888
  const notificationData = generateNotificationData({ notification, generateUrl });
19852
19889
  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: [
19853
19890
  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: _chunkPQBKPWBYjs.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" }),
19854
19891
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col", children: [
19855
19892
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: t.rich(`notification.${notification.notificationType}.description`, {
19856
19893
  strong: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (chunks) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "strong", { children: chunks }), "strong"),
19857
- actor: _nullishCoalesce(_optionalChain([notificationData, 'access', _544 => _544.actor, 'optionalAccess', _545 => _545.name]), () => ( "")),
19894
+ actor: _nullishCoalesce(_optionalChain([notificationData, 'access', _545 => _545.actor, 'optionalAccess', _546 => _546.name]), () => ( "")),
19858
19895
  title: notificationData.title
19859
19896
  }) }),
19860
19897
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground mt-1 w-full text-xs", children: new Date(notification.createdAt).toLocaleString() })
@@ -20200,7 +20237,7 @@ var DEFAULT_TRANSLATIONS = {
20200
20237
  invalidEmail: "Please enter a valid email address"
20201
20238
  };
20202
20239
  async function copyToClipboard(text) {
20203
- if (_optionalChain([navigator, 'access', _546 => _546.clipboard, 'optionalAccess', _547 => _547.writeText])) {
20240
+ if (_optionalChain([navigator, 'access', _547 => _547.clipboard, 'optionalAccess', _548 => _548.writeText])) {
20204
20241
  try {
20205
20242
  await navigator.clipboard.writeText(text);
20206
20243
  return true;
@@ -20242,7 +20279,7 @@ function ReferralWidget({
20242
20279
  const linkInputRef = _react.useRef.call(void 0, null);
20243
20280
  const config = _chunkJO5BLONKjs.getReferralConfig.call(void 0, );
20244
20281
  const baseUrl = config.referralUrlBase || (typeof window !== "undefined" ? window.location.origin : "");
20245
- const referralUrl = _optionalChain([stats, 'optionalAccess', _548 => _548.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
20282
+ const referralUrl = _optionalChain([stats, 'optionalAccess', _549 => _549.referralCode]) ? `${baseUrl}${config.referralPath}?${config.urlParamName}=${stats.referralCode}` : "";
20246
20283
  if (!_chunkJO5BLONKjs.isReferralEnabled.call(void 0, )) {
20247
20284
  return null;
20248
20285
  }
@@ -20252,7 +20289,7 @@ function ReferralWidget({
20252
20289
  if (success) {
20253
20290
  setCopied(true);
20254
20291
  _chunkPQBKPWBYjs.showToast.call(void 0, t.copiedMessage);
20255
- _optionalChain([onLinkCopied, 'optionalCall', _549 => _549()]);
20292
+ _optionalChain([onLinkCopied, 'optionalCall', _550 => _550()]);
20256
20293
  setTimeout(() => setCopied(false), 2e3);
20257
20294
  } else {
20258
20295
  _chunkPQBKPWBYjs.showError.call(void 0, t.copyError);
@@ -20266,12 +20303,12 @@ function ReferralWidget({
20266
20303
  try {
20267
20304
  await sendInvite(email);
20268
20305
  _chunkPQBKPWBYjs.showToast.call(void 0, t.inviteSent);
20269
- _optionalChain([onInviteSent, 'optionalCall', _550 => _550(email)]);
20306
+ _optionalChain([onInviteSent, 'optionalCall', _551 => _551(email)]);
20270
20307
  setEmail("");
20271
20308
  } catch (err) {
20272
20309
  const error2 = err instanceof Error ? err : new Error(t.inviteError);
20273
20310
  _chunkPQBKPWBYjs.showError.call(void 0, error2.message);
20274
- _optionalChain([onInviteError, 'optionalCall', _551 => _551(error2)]);
20311
+ _optionalChain([onInviteError, 'optionalCall', _552 => _552(error2)]);
20275
20312
  }
20276
20313
  }, [email, sendInvite, t.inviteSent, t.inviteError, t.invalidEmail, onInviteSent, onInviteError]);
20277
20314
  const handleEmailKeyDown = _react.useCallback.call(void 0,
@@ -21025,7 +21062,7 @@ function OAuthClientList({
21025
21062
  OAuthClientCard,
21026
21063
  {
21027
21064
  client,
21028
- onClick: () => _optionalChain([onClientClick, 'optionalCall', _552 => _552(client)]),
21065
+ onClick: () => _optionalChain([onClientClick, 'optionalCall', _553 => _553(client)]),
21029
21066
  onEdit: onEditClick ? () => onEditClick(client) : void 0,
21030
21067
  onDelete: onDeleteClick ? () => onDeleteClick(client) : void 0
21031
21068
  },
@@ -21041,11 +21078,11 @@ _chunk7QVYU63Ejs.__name.call(void 0, OAuthClientList, "OAuthClientList");
21041
21078
  function OAuthClientForm({ client, onSubmit, onCancel, isLoading = false }) {
21042
21079
  const isEditMode = !!client;
21043
21080
  const [formState, setFormState] = _react.useState.call(void 0, {
21044
- name: _optionalChain([client, 'optionalAccess', _553 => _553.name]) || "",
21045
- description: _optionalChain([client, 'optionalAccess', _554 => _554.description]) || "",
21046
- redirectUris: _optionalChain([client, 'optionalAccess', _555 => _555.redirectUris, 'optionalAccess', _556 => _556.length]) ? client.redirectUris : [""],
21047
- allowedScopes: _optionalChain([client, 'optionalAccess', _557 => _557.allowedScopes]) || [],
21048
- isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _558 => _558.isConfidential]), () => ( true))
21081
+ name: _optionalChain([client, 'optionalAccess', _554 => _554.name]) || "",
21082
+ description: _optionalChain([client, 'optionalAccess', _555 => _555.description]) || "",
21083
+ redirectUris: _optionalChain([client, 'optionalAccess', _556 => _556.redirectUris, 'optionalAccess', _557 => _557.length]) ? client.redirectUris : [""],
21084
+ allowedScopes: _optionalChain([client, 'optionalAccess', _558 => _558.allowedScopes]) || [],
21085
+ isConfidential: _nullishCoalesce(_optionalChain([client, 'optionalAccess', _559 => _559.isConfidential]), () => ( true))
21049
21086
  });
21050
21087
  const [errors, setErrors] = _react.useState.call(void 0, {});
21051
21088
  const validate = _react.useCallback.call(void 0, () => {
@@ -21273,7 +21310,7 @@ function OAuthClientDetail({
21273
21310
  ] }),
21274
21311
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
21275
21312
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Allowed Scopes" }),
21276
- /* @__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([_chunkPQBKPWBYjs.OAUTH_SCOPE_DISPLAY, 'access', _559 => _559[scope], 'optionalAccess', _560 => _560.name]) || scope }, scope)) })
21313
+ /* @__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([_chunkPQBKPWBYjs.OAUTH_SCOPE_DISPLAY, 'access', _560 => _560[scope], 'optionalAccess', _561 => _561.name]) || scope }, scope)) })
21277
21314
  ] }),
21278
21315
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
21279
21316
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, Label, { children: "Grant Types" }),
@@ -21417,7 +21454,7 @@ function OAuthConsentScreen({
21417
21454
  if (error || !clientInfo) {
21418
21455
  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: [
21419
21456
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertTriangle, { className: "h-4 w-4" }),
21420
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _561 => _561.message]) || "Invalid authorization request. Please try again." })
21457
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, AlertDescription, { children: _optionalChain([error, 'optionalAccess', _562 => _562.message]) || "Invalid authorization request. Please try again." })
21421
21458
  ] }) }) }) });
21422
21459
  }
21423
21460
  const { client, scopes } = clientInfo;
@@ -21633,7 +21670,7 @@ function WaitlistForm({ onSuccess }) {
21633
21670
  questionnaire: values.questionnaire
21634
21671
  });
21635
21672
  setIsSuccess(true);
21636
- _optionalChain([onSuccess, 'optionalCall', _562 => _562()]);
21673
+ _optionalChain([onSuccess, 'optionalCall', _563 => _563()]);
21637
21674
  } catch (e) {
21638
21675
  errorToast({ error: e });
21639
21676
  } finally {
@@ -22271,7 +22308,7 @@ var ModuleEditor = _react.memo.call(void 0, /* @__PURE__ */ _chunk7QVYU63Ejs.__n
22271
22308
  ] }),
22272
22309
  roleIds.map((roleId) => {
22273
22310
  const roleTokens = block[roleId];
22274
- const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _563 => _563[roleId]]), () => ( roleId));
22311
+ const roleLabel = _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _564 => _564[roleId]]), () => ( roleId));
22275
22312
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
22276
22313
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: roleLabel }),
22277
22314
  _chunkJO5BLONKjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -22308,7 +22345,7 @@ function RbacContainer() {
22308
22345
  }, []);
22309
22346
  const sortedModuleIds = _react.useMemo.call(void 0, () => {
22310
22347
  if (!matrix) return [];
22311
- return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _564 => _564[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _565 => _565[b]]), () => ( b))));
22348
+ return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _565 => _565[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _566 => _566[b]]), () => ( b))));
22312
22349
  }, [matrix, moduleNames]);
22313
22350
  const roleIds = _react.useMemo.call(void 0, () => {
22314
22351
  if (roleNames) {
@@ -22371,7 +22408,7 @@ function RbacContainer() {
22371
22408
  id === selectedModuleId && "bg-muted font-medium text-foreground",
22372
22409
  id !== selectedModuleId && "text-muted-foreground"
22373
22410
  ),
22374
- children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _566 => _566[id]]), () => ( id))
22411
+ children: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _567 => _567[id]]), () => ( id))
22375
22412
  }
22376
22413
  ) }, id)) }) }),
22377
22414
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: selectedModuleId && selectedBlock ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -22379,7 +22416,7 @@ function RbacContainer() {
22379
22416
  {
22380
22417
  moduleId: selectedModuleId,
22381
22418
  block: selectedBlock,
22382
- moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _567 => _567[selectedModuleId]]), () => ( selectedModuleId)),
22419
+ moduleLabel: _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _568 => _568[selectedModuleId]]), () => ( selectedModuleId)),
22383
22420
  roleIds,
22384
22421
  roleNames,
22385
22422
  onOpenPicker: openPicker
@@ -22390,12 +22427,12 @@ function RbacContainer() {
22390
22427
  RbacPermissionPicker,
22391
22428
  {
22392
22429
  open: !!activePicker,
22393
- anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _568 => _568.anchor]), () => ( null)),
22430
+ anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _569 => _569.anchor]), () => ( null)),
22394
22431
  value: activeValue,
22395
- isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _569 => _569.isRoleColumn]), () => ( false)),
22432
+ isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _570 => _570.isRoleColumn]), () => ( false)),
22396
22433
  knownSegments: activeSegments,
22397
22434
  onSetValue: handleSetValue,
22398
- onClear: _optionalChain([activePicker, 'optionalAccess', _570 => _570.isRoleColumn]) ? handleClear : void 0,
22435
+ onClear: _optionalChain([activePicker, 'optionalAccess', _571 => _571.isRoleColumn]) ? handleClear : void 0,
22399
22436
  onClose: closePicker
22400
22437
  }
22401
22438
  )
@@ -22462,7 +22499,7 @@ function RbacByRoleContainer() {
22462
22499
  }, [roleNames]);
22463
22500
  const sortedModuleIds = _react.useMemo.call(void 0, () => {
22464
22501
  if (!matrix) return [];
22465
- return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _571 => _571[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _572 => _572[b]]), () => ( b))));
22502
+ return Object.keys(matrix).sort((a, b) => (_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _572 => _572[a]]), () => ( a))).localeCompare(_nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _573 => _573[b]]), () => ( b))));
22466
22503
  }, [matrix, moduleNames]);
22467
22504
  _react.useEffect.call(void 0, () => {
22468
22505
  if (!selectedRoleId && sortedRoleIds.length > 0) {
@@ -22511,7 +22548,7 @@ function RbacByRoleContainer() {
22511
22548
  id === selectedRoleId && "bg-muted font-medium text-foreground",
22512
22549
  id !== selectedRoleId && "text-muted-foreground"
22513
22550
  ),
22514
- children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _573 => _573[id]]), () => ( id))
22551
+ children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _574 => _574[id]]), () => ( id))
22515
22552
  }
22516
22553
  ) }, id)) }) }),
22517
22554
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "section", { className: "flex-1 overflow-y-auto p-4", children: sortedModuleIds.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-lg border border-accent bg-card", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-x-auto", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "table", { className: "w-full text-sm", children: [
@@ -22531,7 +22568,7 @@ function RbacByRoleContainer() {
22531
22568
  if (!block) return null;
22532
22569
  const defaultTokens = _nullishCoalesce(block.default, () => ( []));
22533
22570
  const roleTokens = block[selectedRoleId];
22534
- const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _574 => _574[moduleId]]), () => ( moduleId));
22571
+ const moduleLabel = _nullishCoalesce(_optionalChain([moduleNames, 'optionalAccess', _575 => _575[moduleId]]), () => ( moduleId));
22535
22572
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
22536
22573
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { className: "border-b bg-muted/40", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
22537
22574
  "td",
@@ -22546,7 +22583,7 @@ function RbacByRoleContainer() {
22546
22583
  _chunkJO5BLONKjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, RbacPermissionCell, { value: cellValue2(defaultTokens, action) }) }, action))
22547
22584
  ] }),
22548
22585
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-b last:border-b-0", children: [
22549
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _575 => _575[selectedRoleId]]), () => ( selectedRoleId)) }),
22586
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-4 py-1 text-xs font-medium text-muted-foreground", children: _nullishCoalesce(_optionalChain([roleNames, 'optionalAccess', _576 => _576[selectedRoleId]]), () => ( selectedRoleId)) }),
22550
22587
  _chunkJO5BLONKjs.ACTION_TYPES.map((action) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "px-2 py-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
22551
22588
  CellButton3,
22552
22589
  {
@@ -22567,12 +22604,12 @@ function RbacByRoleContainer() {
22567
22604
  RbacPermissionPicker,
22568
22605
  {
22569
22606
  open: !!activePicker,
22570
- anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _576 => _576.anchor]), () => ( null)),
22607
+ anchor: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _577 => _577.anchor]), () => ( null)),
22571
22608
  value: activeValue,
22572
- isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _577 => _577.isRoleColumn]), () => ( false)),
22609
+ isRoleColumn: _nullishCoalesce(_optionalChain([activePicker, 'optionalAccess', _578 => _578.isRoleColumn]), () => ( false)),
22573
22610
  knownSegments: activeSegments,
22574
22611
  onSetValue: handleSetValue,
22575
- onClear: _optionalChain([activePicker, 'optionalAccess', _578 => _578.isRoleColumn]) ? handleClear : void 0,
22612
+ onClear: _optionalChain([activePicker, 'optionalAccess', _579 => _579.isRoleColumn]) ? handleClear : void 0,
22576
22613
  onClose: closePicker
22577
22614
  }
22578
22615
  )
@@ -23107,4 +23144,4 @@ _chunk7QVYU63Ejs.__name.call(void 0, RbacByRoleContainer, "RbacByRoleContainer")
23107
23144
 
23108
23145
 
23109
23146
  exports.JsonApiProvider = JsonApiProvider; exports.useJsonApiGet = useJsonApiGet; exports.useJsonApiMutation = useJsonApiMutation; exports.useRehydration = useRehydration; exports.useRehydrationList = useRehydrationList; exports.TableGeneratorRegistry = TableGeneratorRegistry; exports.tableGeneratorRegistry = tableGeneratorRegistry; exports.usePageUrlGenerator = usePageUrlGenerator; exports.useUrlRewriter = useUrlRewriter; exports.useDataListRetriever = useDataListRetriever; exports.useDebounce = useDebounce2; exports.registerTableGenerator = registerTableGenerator; exports.useTableGenerator = useTableGenerator; exports.computeLayeredLayout = computeLayeredLayout; exports.fitLayeredLayoutToAspectRatio = fitLayeredLayoutToAspectRatio; exports.useCustomD3Graph = useCustomD3Graph; exports.SocketContext = SocketContext; exports.SocketProvider = SocketProvider; exports.useSocketContext = useSocketContext; exports.CurrentUserProvider = CurrentUserProvider; exports.useCurrentUserContext = useCurrentUserContext; exports.Accordion = Accordion; exports.AccordionItem = AccordionItem; exports.AccordionTrigger = AccordionTrigger; exports.AccordionContent = AccordionContent; exports.Alert = Alert; exports.AlertTitle = AlertTitle; exports.AlertDescription = AlertDescription; exports.AlertAction = AlertAction; exports.buttonVariants = buttonVariants; exports.Button = Button; exports.AlertDialog = AlertDialog; exports.AlertDialogTrigger = AlertDialogTrigger; exports.AlertDialogPortal = AlertDialogPortal; exports.AlertDialogOverlay = AlertDialogOverlay; exports.AlertDialogContent = AlertDialogContent; exports.AlertDialogHeader = AlertDialogHeader; exports.AlertDialogFooter = AlertDialogFooter; exports.AlertDialogMedia = AlertDialogMedia; exports.AlertDialogTitle = AlertDialogTitle; exports.AlertDialogDescription = AlertDialogDescription; exports.AlertDialogAction = AlertDialogAction; exports.AlertDialogCancel = AlertDialogCancel; exports.Avatar = Avatar; exports.AvatarImage = AvatarImage; exports.AvatarFallback = AvatarFallback; exports.AvatarBadge = AvatarBadge; exports.AvatarGroup = AvatarGroup; exports.AvatarGroupCount = AvatarGroupCount; exports.badgeVariants = badgeVariants; exports.Badge = Badge; exports.Breadcrumb = Breadcrumb; exports.BreadcrumbList = BreadcrumbList; exports.BreadcrumbItem = BreadcrumbItem; exports.BreadcrumbLink = BreadcrumbLink; exports.BreadcrumbPage = BreadcrumbPage; exports.BreadcrumbSeparator = BreadcrumbSeparator; exports.BreadcrumbEllipsis = BreadcrumbEllipsis; exports.Calendar = Calendar; exports.CalendarDayButton = CalendarDayButton; exports.Card = Card; exports.CardHeader = CardHeader; exports.CardTitle = CardTitle; exports.CardDescription = CardDescription; exports.CardAction = CardAction; exports.CardContent = CardContent; exports.CardFooter = CardFooter; exports.useCarousel = useCarousel; exports.Carousel = Carousel; exports.CarouselContent = CarouselContent; exports.CarouselItem = CarouselItem; exports.CarouselPrevious = CarouselPrevious; exports.CarouselNext = CarouselNext; exports.ChartContainer = ChartContainer; exports.ChartStyle = ChartStyle; exports.ChartTooltip = ChartTooltip; exports.ChartTooltipContent = ChartTooltipContent; exports.ChartLegend = ChartLegend; exports.ChartLegendContent = ChartLegendContent; exports.Checkbox = Checkbox; exports.Collapsible = Collapsible; exports.CollapsibleTrigger = CollapsibleTrigger; exports.CollapsibleContent = CollapsibleContent; exports.Input = Input; exports.Textarea = Textarea; exports.InputGroup = InputGroup; exports.InputGroupAddon = InputGroupAddon; exports.InputGroupButton = InputGroupButton; exports.InputGroupText = InputGroupText; exports.InputGroupInput = InputGroupInput; exports.InputGroupTextarea = InputGroupTextarea; exports.Combobox = Combobox; exports.ComboboxValue = ComboboxValue; exports.ComboboxTrigger = ComboboxTrigger; exports.ComboboxInput = ComboboxInput; exports.ComboboxContent = ComboboxContent; exports.ComboboxList = ComboboxList; exports.ComboboxItem = ComboboxItem; exports.ComboboxGroup = ComboboxGroup; exports.ComboboxLabel = ComboboxLabel; exports.ComboboxCollection = ComboboxCollection; exports.ComboboxEmpty = ComboboxEmpty; exports.ComboboxSeparator = ComboboxSeparator; exports.ComboboxChips = ComboboxChips; exports.ComboboxChip = ComboboxChip; exports.ComboboxChipsInput = ComboboxChipsInput; exports.useComboboxAnchor = useComboboxAnchor; exports.Dialog = Dialog; exports.DialogTrigger = DialogTrigger; exports.DialogPortal = DialogPortal; exports.DialogClose = DialogClose; exports.DialogOverlay = DialogOverlay; exports.DialogContent = DialogContent; exports.DialogHeader = DialogHeader; exports.DialogFooter = DialogFooter; exports.DialogTitle = DialogTitle; exports.DialogDescription = DialogDescription; exports.Command = Command; exports.CommandDialog = CommandDialog; exports.CommandInput = CommandInput; exports.CommandList = CommandList; exports.CommandEmpty = CommandEmpty; exports.CommandGroup = CommandGroup; exports.CommandSeparator = CommandSeparator; exports.CommandItem = CommandItem; exports.CommandShortcut = CommandShortcut; exports.ConfirmDialog = ConfirmDialog; exports.ContextMenu = ContextMenu; exports.ContextMenuPortal = ContextMenuPortal; exports.ContextMenuTrigger = ContextMenuTrigger; exports.ContextMenuContent = ContextMenuContent; exports.ContextMenuGroup = ContextMenuGroup; exports.ContextMenuLabel = ContextMenuLabel; exports.ContextMenuItem = ContextMenuItem; exports.ContextMenuSub = ContextMenuSub; exports.ContextMenuSubTrigger = ContextMenuSubTrigger; exports.ContextMenuSubContent = ContextMenuSubContent; exports.ContextMenuCheckboxItem = ContextMenuCheckboxItem; exports.ContextMenuRadioGroup = ContextMenuRadioGroup; exports.ContextMenuRadioItem = ContextMenuRadioItem; exports.ContextMenuSeparator = ContextMenuSeparator; exports.ContextMenuShortcut = ContextMenuShortcut; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerPortal = DrawerPortal; exports.DrawerClose = DrawerClose; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerFooter = DrawerFooter; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DropdownMenu = DropdownMenu; exports.DropdownMenuPortal = DropdownMenuPortal; exports.DropdownMenuTrigger = DropdownMenuTrigger; exports.DropdownMenuContent = DropdownMenuContent; exports.DropdownMenuGroup = DropdownMenuGroup; exports.DropdownMenuLabel = DropdownMenuLabel; exports.DropdownMenuItem = DropdownMenuItem; exports.DropdownMenuSub = DropdownMenuSub; exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger; exports.DropdownMenuSubContent = DropdownMenuSubContent; exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem; exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup; exports.DropdownMenuRadioItem = DropdownMenuRadioItem; exports.DropdownMenuSeparator = DropdownMenuSeparator; exports.DropdownMenuShortcut = DropdownMenuShortcut; exports.EmptyState = EmptyState; exports.Label = Label; exports.Separator = Separator; exports.FieldSet = FieldSet; exports.FieldLegend = FieldLegend; exports.FieldGroup = FieldGroup; exports.Field = Field; exports.FieldContent = FieldContent; exports.FieldLabel = FieldLabel; exports.FieldTitle = FieldTitle; exports.FieldDescription = FieldDescription; exports.FieldSeparator = FieldSeparator; exports.FieldError = FieldError; exports.Form = Form; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.InputOTP = InputOTP; exports.InputOTPGroup = InputOTPGroup; exports.InputOTPSlot = InputOTPSlot; exports.InputOTPSeparator = InputOTPSeparator; exports.NavigationMenu = NavigationMenu; exports.NavigationMenuList = NavigationMenuList; exports.NavigationMenuItem = NavigationMenuItem; exports.navigationMenuTriggerStyle = navigationMenuTriggerStyle; exports.NavigationMenuTrigger = NavigationMenuTrigger; exports.NavigationMenuContent = NavigationMenuContent; exports.NavigationMenuPositioner = NavigationMenuPositioner; exports.NavigationMenuLink = NavigationMenuLink; exports.NavigationMenuIndicator = NavigationMenuIndicator; exports.Popover = Popover; exports.PopoverTrigger = PopoverTrigger; exports.PopoverContent = PopoverContent; exports.PopoverHeader = PopoverHeader; exports.PopoverTitle = PopoverTitle; exports.PopoverDescription = PopoverDescription; exports.Progress = Progress; exports.ProgressTrack = ProgressTrack; exports.ProgressIndicator = ProgressIndicator; exports.ProgressLabel = ProgressLabel; exports.ProgressValue = ProgressValue; exports.RadioGroup = RadioGroup; exports.RadioGroupItem = RadioGroupItem; exports.ResizablePanelGroup = ResizablePanelGroup; exports.ResizablePanel = ResizablePanel; exports.ResizableHandle = ResizableHandle; exports.ScrollArea = ScrollArea; exports.ScrollBar = ScrollBar; exports.Select = Select; exports.SelectGroup = SelectGroup; exports.SelectValue = SelectValue; exports.SelectTrigger = SelectTrigger; exports.SelectContent = SelectContent; exports.SelectLabel = SelectLabel; exports.SelectItem = SelectItem; exports.SelectSeparator = SelectSeparator; exports.SelectScrollUpButton = SelectScrollUpButton; exports.SelectScrollDownButton = SelectScrollDownButton; exports.Sheet = Sheet; exports.SheetTrigger = SheetTrigger; exports.SheetClose = SheetClose; exports.SheetContent = SheetContent; exports.SheetHeader = SheetHeader; exports.SheetFooter = SheetFooter; exports.SheetTitle = SheetTitle; exports.SheetDescription = SheetDescription; exports.Skeleton = Skeleton; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip2; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.useSidebar = useSidebar; exports.SidebarProvider = SidebarProvider; exports.Sidebar = Sidebar; exports.SidebarTrigger = SidebarTrigger; exports.SidebarRail = SidebarRail; exports.SidebarInset = SidebarInset; exports.SidebarInput = SidebarInput; exports.SidebarHeader = SidebarHeader; exports.SidebarFooter = SidebarFooter; exports.SidebarSeparator = SidebarSeparator; exports.SidebarContent = SidebarContent; exports.SidebarGroup = SidebarGroup; exports.SidebarGroupLabel = SidebarGroupLabel; exports.SidebarGroupAction = SidebarGroupAction; exports.SidebarGroupContent = SidebarGroupContent; exports.SidebarMenu = SidebarMenu; exports.SidebarMenuItem = SidebarMenuItem; exports.SidebarMenuButton = SidebarMenuButton; exports.SidebarMenuAction = SidebarMenuAction; exports.SidebarMenuBadge = SidebarMenuBadge; exports.SidebarMenuSkeleton = SidebarMenuSkeleton; exports.SidebarMenuSub = SidebarMenuSub; exports.SidebarMenuSubItem = SidebarMenuSubItem; exports.SidebarMenuSubButton = SidebarMenuSubButton; exports.Slider = Slider; exports.Toaster = Toaster; exports.spinnerVariants = spinnerVariants; exports.Spinner = Spinner; exports.Switch = Switch; exports.Table = Table; exports.TableHeader = TableHeader; exports.TableBody = TableBody; exports.TableFooter = TableFooter; exports.TableRow = TableRow; exports.TableHead = TableHead; exports.TableCell = TableCell; exports.TableCaption = TableCaption; exports.Tabs = Tabs; exports.tabsListVariants = tabsListVariants; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.toggleVariants = toggleVariants; exports.Toggle = Toggle; exports.KanbanRoot = KanbanRoot; exports.KanbanBoard = KanbanBoard; exports.KanbanColumn = KanbanColumn; exports.KanbanColumnHandle = KanbanColumnHandle; exports.KanbanItem = KanbanItem; exports.KanbanItemHandle = KanbanItemHandle; exports.KanbanOverlay = KanbanOverlay; exports.Link = Link; exports.MultiSelect = MultiSelect; exports.useDebounce2 = useDebounce; exports.MultipleSelector = MultipleSelector; exports.EntityAvatar = EntityAvatar; exports.errorToast = errorToast; exports.EditableAvatar = EditableAvatar; exports.TableCellAvatar = TableCellAvatar; exports.HeaderChildrenProvider = HeaderChildrenProvider; exports.useHeaderChildren = useHeaderChildren; exports.HeaderLeftContentProvider = HeaderLeftContentProvider; exports.useHeaderLeftContent = useHeaderLeftContent; exports.BreadcrumbNavigation = BreadcrumbNavigation; exports.ContentTitle = ContentTitle; exports.SharedProvider = SharedProvider; exports.useSharedContext = useSharedContext; exports.Header = Header; exports.ModeToggleSwitch = ModeToggleSwitch; exports.PageSection = PageSection; exports.recentPagesAtom = recentPagesAtom; exports.RecentPagesNavigator = RecentPagesNavigator; exports.PageContainer = PageContainer; exports.partitionTabs = partitionTabs; exports.ReactMarkdownContainer = ReactMarkdownContainer; exports.RoundPageContainerTitle = RoundPageContainerTitle; exports.RoundPageContainer = RoundPageContainer; exports.TabsContainer = TabsContainer; exports.AttributeElement = AttributeElement; exports.AllUsersListContainer = AllUsersListContainer; exports.UserContent = UserContent; exports.UserAvatar = UserAvatar; exports.UserAvatarList = UserAvatarList; exports.useUserSearch = useUserSearch; exports.useUserTableStructure = useUserTableStructure; exports.UserSearchPopover = UserSearchPopover; exports.UserIndexDetails = UserIndexDetails; exports.UserStanadaloneDetails = UserStanadaloneDetails; exports.UserContainer = UserContainer; exports.UserIndexContainer = UserIndexContainer; exports.UsersListContainer = UsersListContainer; exports.AdminUsersList = AdminUsersList; exports.CompanyUsersList = CompanyUsersList; exports.ContributorsList = ContributorsList; exports.RelevantUsersList = RelevantUsersList; exports.RoleUsersList = RoleUsersList; exports.UserListInAdd = UserListInAdd; exports.UsersList = UsersList; exports.UsersListByContentIds = UsersListByContentIds; exports.AllowedUsersDetails = AllowedUsersDetails; exports.ErrorDetails = ErrorDetails; exports.BlockNoteEditorMentionHoverCard = BlockNoteEditorMentionHoverCard; exports.mentionDataAttrs = mentionDataAttrs; exports.parseMentionElement = parseMentionElement; exports.createMentionInlineContentSpec = createMentionInlineContentSpec; exports.useMentionInsert = useMentionInsert; exports.BlockNoteEditorMentionSuggestionMenu = BlockNoteEditorMentionSuggestionMenu; exports.BlockNoteEditorContainer = BlockNoteEditorContainer; exports.BlockNoteViewerContainer = BlockNoteViewerContainer; exports.CommonAssociationTrigger = CommonAssociationTrigger; exports.CommonAssociationCommandDialog = CommonAssociationCommandDialog; exports.triggerAssociationToast = triggerAssociationToast; exports.FormFieldWrapper = FormFieldWrapper; exports.EntityMultiSelector = EntityMultiSelector; exports.CommonDeleter = CommonDeleter; exports.CommonEditorButtons = CommonEditorButtons; exports.CommonEditorHeader = CommonEditorHeader; exports.CommonEditorDiscardDialog = CommonEditorDiscardDialog; exports.CommonEditorTrigger = CommonEditorTrigger; exports.CommonAddTrigger = CommonAddTrigger; exports.useEditorDialog = useEditorDialog; exports.EditorSheet = EditorSheet; exports.DatePickerPopover = DatePickerPopover; exports.DateRangeSelector = DateRangeSelector; exports.useFileUpload = useFileUpload; exports.FileUploader = FileUploader; exports.FileUploaderContent = FileUploaderContent; exports.FileUploaderItem = FileUploaderItem; exports.FileInput = FileInput; exports.CurrencyInput = CurrencyInput; exports.FormCheckbox = FormCheckbox; exports.FormBlockNote = FormBlockNote; 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.cellDateTime = cellDateTime; exports.cellId = cellId; exports.cellLink = cellLink; exports.cellUrl = cellUrl; exports.ContentTableSearch = ContentTableSearch; exports.ContentListTable = ContentListTable; exports.ContentListGrid = ContentListGrid; exports.ItalianFiscalData_default = ItalianFiscalData_default; exports.ItalianFiscalDataDisplay = ItalianFiscalDataDisplay; exports.parseFiscalData = parseFiscalData; exports.FiscalDataDisplay = FiscalDataDisplay; exports.GdprConsentSection = GdprConsentSection; exports.AuthContainer = AuthContainer; exports.BackupCodesDialog = BackupCodesDialog; exports.TotpInput = TotpInput; exports.DisableTwoFactorDialog = DisableTwoFactorDialog; exports.PasskeyList = PasskeyList; exports.PasskeySetupDialog = PasskeySetupDialog; exports.TotpAuthenticatorList = TotpAuthenticatorList; exports.TotpSetupDialog = TotpSetupDialog; exports.TwoFactorSettings = TwoFactorSettings; exports.SecurityContainer = SecurityContainer; exports.LandingComponent = LandingComponent; exports.AcceptInvitation = AcceptInvitation; exports.ActivateAccount = ActivateAccount; exports.Cookies = Cookies; exports.ForgotPassword = ForgotPassword; exports.Login = Login; exports.Logout = Logout; exports.RefreshUser = RefreshUser; exports.ResetPassword = ResetPassword; exports.PasskeyButton = PasskeyButton; exports.TwoFactorChallenge = TwoFactorChallenge; exports.CompanyContent = CompanyContent; exports.TokenStatusIndicator = TokenStatusIndicator; exports.CompanyDetails = CompanyDetails; exports.AdminCompanyContainer = AdminCompanyContainer; exports.CompanyContainer = CompanyContainer; exports.CompanyConfigurationEditor = CompanyConfigurationEditor; exports.CompanyDeleter = CompanyDeleter; exports.CompanyEditor = CompanyEditor; exports.CompaniesList = CompaniesList; exports.ContentsList = ContentsList; exports.ContentsListById = ContentsListById; exports.RelevantContentsList = RelevantContentsList; exports.HowToCommandViewer = HowToCommandViewer; exports.HowToCommand = HowToCommand; exports.HowToDeleter = HowToDeleter; exports.HowToMultiSelector = HowToMultiSelector; exports.HowToEditor = HowToEditor; exports.HowToProvider = HowToProvider; exports.useHowToContext = useHowToContext; exports.HowToContent = HowToContent; exports.HowToDetails = HowToDetails; exports.HowToContainer = HowToContainer; exports.HowToList = HowToList; exports.HowToListContainer = HowToListContainer; exports.HowToSelector = HowToSelector; exports.AssistantProvider = AssistantProvider; exports.useAssistantContext = useAssistantContext; exports.AssistantComposer = AssistantComposer; exports.AssistantEmptyState = AssistantEmptyState; exports.MessageSourcesPanel = MessageSourcesPanel; exports.MessageItem = MessageItem; exports.MessageList = MessageList; exports.AssistantThread = AssistantThread; exports.AssistantContainer = AssistantContainer; exports.NotificationErrorBoundary = NotificationErrorBoundary; exports.generateNotificationData = generateNotificationData; exports.NotificationToast = NotificationToast; exports.NotificationMenuItem = NotificationMenuItem; exports.NotificationContextProvider = NotificationContextProvider; exports.useNotificationContext = useNotificationContext; exports.NotificationsList = NotificationsList; exports.NotificationsListContainer = NotificationsListContainer; exports.NotificationModal = NotificationModal; exports.PushNotificationProvider = PushNotificationProvider; exports.OnboardingCard = OnboardingCard; exports.ReferralCodeCapture = ReferralCodeCapture; exports.ReferralWidget = ReferralWidget; exports.ReferralDialog = ReferralDialog; exports.RoleProvider = RoleProvider; exports.useRoleContext = useRoleContext; exports.RoleDetails = RoleDetails; exports.RoleContainer = RoleContainer; exports.FormRoles = FormRoles; exports.RemoveUserFromRole = RemoveUserFromRole; exports.UserRoleAdd = UserRoleAdd; exports.useRoleTableStructure = useRoleTableStructure; exports.RolesList = RolesList; exports.UserRolesList = UserRolesList; exports.OAuthRedirectUriInput = OAuthRedirectUriInput; exports.OAuthScopeSelector = OAuthScopeSelector; exports.OAuthClientSecretDisplay = OAuthClientSecretDisplay; exports.OAuthClientCard = OAuthClientCard; exports.OAuthClientList = OAuthClientList; exports.OAuthClientForm = OAuthClientForm; exports.OAuthClientDetail = OAuthClientDetail; exports.OAuthConsentHeader = OAuthConsentHeader; exports.OAuthScopeList = OAuthScopeList; exports.OAuthConsentActions = OAuthConsentActions; exports.useOAuthConsent = useOAuthConsent; exports.OAuthConsentScreen = OAuthConsentScreen; exports.WaitlistQuestionnaireRenderer = WaitlistQuestionnaireRenderer; exports.WaitlistForm = WaitlistForm; exports.WaitlistHeroSection = WaitlistHeroSection; exports.WaitlistSuccessState = WaitlistSuccessState; exports.WaitlistConfirmation = WaitlistConfirmation; exports.WaitlistList = WaitlistList; exports.RbacProvider = RbacProvider; exports.useRbacContext = useRbacContext; exports.RbacPermissionCell = RbacPermissionCell; exports.RbacPermissionPicker = RbacPermissionPicker; exports.RbacContainer = RbacContainer; exports.RbacByRoleContainer = RbacByRoleContainer; exports.AddUserToRole = AddUserToRole; exports.UserAvatarEditor = UserAvatarEditor; exports.UserDeleter = UserDeleter; exports.UserEditor = UserEditor; exports.UserMultiSelect = UserMultiSelect; exports.UserReactivator = UserReactivator; exports.UserResentInvitationEmail = UserResentInvitationEmail; exports.UserSelector = UserSelector; exports.UserProvider = UserProvider; exports.useUserContext = useUserContext; exports.CompanyProvider = CompanyProvider; exports.useCompanyContext = useCompanyContext; exports.DEFAULT_ONBOARDING_LABELS = DEFAULT_ONBOARDING_LABELS; exports.OnboardingProvider = OnboardingProvider; exports.useOnboarding = useOnboarding; exports.CommonProvider = CommonProvider; exports.useCommonContext = useCommonContext; exports.useNotificationSync = useNotificationSync; exports.usePageTracker = usePageTracker; exports.useSocket = useSocket; exports.useSubscriptionStatus = useSubscriptionStatus; exports.useContentTableStructure = useContentTableStructure; exports.useOAuthClients = useOAuthClients; exports.useOAuthClient = useOAuthClient;
23110
- //# sourceMappingURL=chunk-BOECS3K2.js.map
23147
+ //# sourceMappingURL=chunk-ZQPFEQC6.js.map