@gisce/react-ooui 2.98.0 → 2.98.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@ import Xc from "dayjs/plugin/duration";
17
17
  import Qc from "dayjs/plugin/relativeTime";
18
18
  import Zc from "dayjs/plugin/weekday";
19
19
  import ed from "dayjs/plugin/localeData";
20
- import { useLocale as we, Icon as Mo, iconMapper as Pt, useNotificationContext as td, FormigaConfigProvider as nd, mergeStrings as rd, Dropdown as ca, ToggleDropdownButton as od, getTablerIcon as da, DropdownButton as Zt, useDatePickerLocale as sd, SkeletonPill as id, Many2OneSuffix as ad, Many2OneSuffixModal as Ls, DateValue as ld, DateTimeValue as cd, PaginationHeader as dd, FieldSet as ud, ExportModal as fd, DateInput as pd, HTMLPreview as md, FavouriteButton as hd } from "@gisce/react-formiga-components";
20
+ import { useLocale as xe, Icon as Mo, iconMapper as Pt, useNotificationContext as td, FormigaConfigProvider as nd, mergeStrings as rd, Dropdown as ca, ToggleDropdownButton as od, getTablerIcon as da, DropdownButton as Zt, useDatePickerLocale as sd, SkeletonPill as id, Many2OneSuffix as ad, Many2OneSuffixModal as Ls, DateValue as ld, DateTimeValue as cd, PaginationHeader as dd, FieldSet as ud, ExportModal as fd, DateInput as pd, HTMLPreview as md, FavouriteButton as hd } from "@gisce/react-formiga-components";
21
21
  import gd from "antd/lib/input/TextArea";
22
22
  import St from "styled-components";
23
23
  import os from "react-measure";
@@ -333,7 +333,7 @@ function We({
333
333
  validator: c
334
334
  }) {
335
335
  var $;
336
- const { id: d, label: f, tooltip: u } = t, { t: p } = we(), m = Ot.useFormInstance(), g = a ? [
336
+ const { id: d, label: f, tooltip: u } = t, { t: p } = xe(), m = Ot.useFormInstance(), g = a ? [
337
337
  {
338
338
  required: !0,
339
339
  message: p("fillRequiredField"),
@@ -402,7 +402,7 @@ const { confirm: ou } = Ft, tn = ({
402
402
  icon: l,
403
403
  context: c,
404
404
  readOnly: d
405
- } = e, f = pe(Qe), { executeButtonAction: u } = f || {}, [p, m] = T(!1), { t: g } = we();
405
+ } = e, f = pe(Qe), { executeButtonAction: u } = f || {}, [p, m] = T(!1), { t: g } = xe();
406
406
  async function h() {
407
407
  m(!0), await u({ type: i, action: n, context: c }), m(!1);
408
408
  }
@@ -451,7 +451,7 @@ const { confirm: ou } = Ft, tn = ({
451
451
  primary: f,
452
452
  context: u,
453
453
  readOnly: p
454
- } = n || {}, m = pe(Qe), { executeButtonAction: g } = m || {}, [h, v] = T(!1), { t: y } = we();
454
+ } = n || {}, m = pe(Qe), { executeButtonAction: g } = m || {}, [h, v] = T(!1), { t: y } = xe();
455
455
  function b() {
456
456
  if (h)
457
457
  return /* @__PURE__ */ s(Bt, {});
@@ -502,7 +502,7 @@ const { confirm: ou } = Ft, tn = ({
502
502
  if (n)
503
503
  return /* @__PURE__ */ s(as, { ooui: n });
504
504
  }, iu = (t) => {
505
- const { t: e } = we(), { ooui: n, executeButtonAction: r } = t;
505
+ const { t: e } = xe(), { ooui: n, executeButtonAction: r } = t;
506
506
  if (!n)
507
507
  return null;
508
508
  const o = n.map((i) => {
@@ -704,7 +704,7 @@ const va = (t) => {
704
704
  destroyErrorNotification: n
705
705
  };
706
706
  }, ba = (t) => {
707
- const { visible: e, onCloseModal: n, model: r, id: o, field: i, onSubmitSucceed: a } = t, { modalWidth: l } = Jr(), { t: c } = we(), [d, f] = T([]), [u, p] = T(!1), [m, g] = T(!1), [h, v] = T({}), y = Z(), { showErrorNotification: b } = yt();
707
+ const { visible: e, onCloseModal: n, model: r, id: o, field: i, onSubmitSucceed: a } = t, { modalWidth: l } = Jr(), { t: c } = xe(), [d, f] = T([]), [u, p] = T(!1), [m, g] = T(!1), [h, v] = T({}), y = Z(), { showErrorNotification: b } = yt();
708
708
  ce(() => {
709
709
  e ? w() : v({});
710
710
  }, [e]);
@@ -732,13 +732,13 @@ const va = (t) => {
732
732
  async function x(F) {
733
733
  const $ = {};
734
734
  for (const R of F) {
735
- const _ = (await H.getHandler().readObjects({
735
+ const E = (await H.getHandler().readObjects({
736
736
  model: r,
737
737
  ids: [o],
738
738
  fieldsToRetrieve: [i],
739
739
  context: { lang: R.code }
740
740
  }))[0];
741
- $[R.code] = _[i] || "";
741
+ $[R.code] = E[i] || "";
742
742
  }
743
743
  y.current = $, v($);
744
744
  }
@@ -931,7 +931,7 @@ const Ca = it(
931
931
  fetchValues: l,
932
932
  formHasChanges: c,
933
933
  elementHasLostFocus: d
934
- } = o || {}, [f, u] = T(!1), { t: p } = we(), { required: m, readOnly: g } = t, h = re(
934
+ } = o || {}, [f, u] = T(!1), { t: p } = xe(), { required: m, readOnly: g } = t, h = re(
935
935
  () => m && !g,
936
936
  [m, g]
937
937
  ), v = O(
@@ -1100,7 +1100,7 @@ const cs = (t) => {
1100
1100
  const { ooui: e } = t, { required: n, id: r } = e;
1101
1101
  return Pt(r) ? /* @__PURE__ */ s(cs, { value: r }) : /* @__PURE__ */ s(We, { required: n, ...t, children: /* @__PURE__ */ s(Ru, { ooui: e }) });
1102
1102
  }, Ru = (t) => {
1103
- const { ooui: e, value: n, onChange: r } = t, { readOnly: o } = e, i = Z(null), { t: a } = we(), l = (u) => {
1103
+ const { ooui: e, value: n, onChange: r } = t, { readOnly: o } = e, i = Z(null), { t: a } = xe(), l = (u) => {
1104
1104
  r == null || r(u);
1105
1105
  };
1106
1106
  async function c() {
@@ -1621,19 +1621,19 @@ const Cn = ({
1621
1621
  titleField: b,
1622
1622
  iconField: w,
1623
1623
  colorField: C
1624
- } = r, x = i.filter((_) => _.values), D = pe(Qe), { getContext: S } = D || {};
1624
+ } = r, x = i.filter((E) => E.values), D = pe(Qe), { getContext: S } = D || {};
1625
1625
  Ue(() => {
1626
1626
  F();
1627
1627
  }, [i]);
1628
- const P = (_) => {
1628
+ const P = (E) => {
1629
1629
  o == null || o({
1630
- items: _
1630
+ items: E
1631
1631
  });
1632
1632
  };
1633
1633
  async function F() {
1634
1634
  l(!0), d(void 0);
1635
1635
  try {
1636
- const [_] = await us({
1636
+ const [E] = await us({
1637
1637
  treeView: {
1638
1638
  fields: n.get("tree").fields,
1639
1639
  arch: n.get("tree").arch
@@ -1646,9 +1646,9 @@ const Cn = ({
1646
1646
  context: { ...S == null ? void 0 : S(), ...h },
1647
1647
  currentView: "form"
1648
1648
  });
1649
- P(_);
1650
- } catch (_) {
1651
- d(_);
1649
+ P(E);
1650
+ } catch (E) {
1651
+ d(E);
1652
1652
  } finally {
1653
1653
  l(!1);
1654
1654
  }
@@ -1657,26 +1657,26 @@ const Cn = ({
1657
1657
  return console.error(c), /* @__PURE__ */ s(Rt, { className: "mt-10", message: c, type: "error", banner: !0 });
1658
1658
  if (a)
1659
1659
  return /* @__PURE__ */ s(nt, {});
1660
- const $ = (_) => {
1661
- const I = Pt(_);
1660
+ const $ = (E) => {
1661
+ const I = Pt(E);
1662
1662
  return I && /* @__PURE__ */ s(I, {});
1663
- }, R = x.map((_) => {
1664
- var A, k, E, M;
1663
+ }, R = x.map((E) => {
1664
+ var A, k, _, M;
1665
1665
  const I = {
1666
1666
  children: /* @__PURE__ */ s(
1667
1667
  Yu,
1668
1668
  {
1669
- title: (A = _.values) == null ? void 0 : A[b],
1670
- summary: (k = _.values) == null ? void 0 : k[y],
1669
+ title: (A = E.values) == null ? void 0 : A[b],
1670
+ summary: (k = E.values) == null ? void 0 : k[y],
1671
1671
  onClick: () => {
1672
1672
  m(
1673
- x.find((W) => _.id === W.id)
1673
+ x.find((W) => E.id === W.id)
1674
1674
  ), u(!0);
1675
1675
  }
1676
1676
  }
1677
1677
  )
1678
1678
  };
1679
- return (E = _.values) != null && E[w] && (I.dot = $(_.values[w])), (M = _.values) != null && M[C] && (I.color = !ma(_.values[C]) && !ha(_.values[C]) && !_.values[C].toString().startsWith("#") ? mr(_.values[C]) : _.values[C]), I;
1679
+ return (_ = E.values) != null && _[w] && (I.dot = $(E.values[w])), (M = E.values) != null && M[C] && (I.color = !ma(E.values[C]) && !ha(E.values[C]) && !E.values[C].toString().startsWith("#") ? mr(E.values[C]) : E.values[C]), I;
1680
1680
  });
1681
1681
  return /* @__PURE__ */ L(he, { children: [
1682
1682
  /* @__PURE__ */ s(Wi, { style: { padding: "1rem" }, items: R }),
@@ -2495,7 +2495,7 @@ const { getValueForOperator: Ys } = Qi, sf = (t) => {
2495
2495
  fixedHeight: p
2496
2496
  } = t, [m, g] = T(!1), [h, v] = T(), [y, b] = T(0), [w, C] = T(), [x, D] = T(), [S, P] = T(), [F, $] = T(), [R] = Re(
2497
2497
  H.getHandler().searchAllIds
2498
- ), [_] = Re(
2498
+ ), [E] = Re(
2499
2499
  H.getHandler().readObjects
2500
2500
  ), [I] = Re(
2501
2501
  H.getHandler().searchCount
@@ -2507,7 +2507,7 @@ const { getValueForOperator: Ys } = Qi, sf = (t) => {
2507
2507
  ce(() => {
2508
2508
  W();
2509
2509
  }, [e, o]);
2510
- async function E({
2510
+ async function _({
2511
2511
  domain: V,
2512
2512
  isTotal: N
2513
2513
  }) {
@@ -2518,7 +2518,7 @@ const { getValueForOperator: Ys } = Qi, sf = (t) => {
2518
2518
  params: V,
2519
2519
  model: e,
2520
2520
  context: r
2521
- }), j = await _({
2521
+ }), j = await E({
2522
2522
  model: e,
2523
2523
  ids: U,
2524
2524
  fieldsToRetrieve: [d],
@@ -2541,7 +2541,7 @@ const { getValueForOperator: Ys } = Qi, sf = (t) => {
2541
2541
  params: V,
2542
2542
  model: e,
2543
2543
  context: r
2544
- }), U = await _({
2544
+ }), U = await E({
2545
2545
  model: e,
2546
2546
  ids: N,
2547
2547
  fieldsToRetrieve: [d],
@@ -2562,14 +2562,14 @@ const { getValueForOperator: Ys } = Qi, sf = (t) => {
2562
2562
  g(!0), $(void 0);
2563
2563
  let V, N;
2564
2564
  try {
2565
- const U = await E({ domain: n, isTotal: !1 });
2565
+ const U = await _({ domain: n, isTotal: !1 });
2566
2566
  if (v(U), i) {
2567
2567
  const j = await A({
2568
2568
  domain: i,
2569
2569
  values: {},
2570
2570
  context: r
2571
2571
  });
2572
- V = await E({
2572
+ V = await _({
2573
2573
  domain: j,
2574
2574
  isTotal: !0
2575
2575
  }), C(V);
@@ -2976,7 +2976,7 @@ const hf = {
2976
2976
  yAxisOpts: i,
2977
2977
  fixedHeight: a
2978
2978
  }) => {
2979
- const { t: l } = we(), c = re(() => {
2979
+ const { t: l } = xe(), c = re(() => {
2980
2980
  if (!(t !== "pie" || e.reduce(
2981
2981
  (v, y) => y.operator === "+" ? v + y.value : 0,
2982
2982
  0
@@ -3075,7 +3075,7 @@ const Sf = ({
3075
3075
  manualIds: i,
3076
3076
  fixedHeight: a
3077
3077
  }) => {
3078
- const { t: l } = we(), { error: c, loading: d, values: f, type: u, evaluatedEntries: p, fetchData: m } = cf({
3078
+ const { t: l } = xe(), { error: c, loading: d, values: f, type: u, evaluatedEntries: p, fetchData: m } = cf({
3079
3079
  model: e,
3080
3080
  ooui: t,
3081
3081
  limit: o,
@@ -3218,7 +3218,7 @@ function fs(t) {
3218
3218
  disabled: o = !1,
3219
3219
  formHasChanges: i = !1,
3220
3220
  previousView: a
3221
- } = t, { t: l } = we(), c = re(() => [
3221
+ } = t, { t: l } = xe(), c = re(() => [
3222
3222
  {
3223
3223
  label: l("viewAs"),
3224
3224
  items: n.map((u, p) => {
@@ -3322,7 +3322,7 @@ const Ba = (t) => /* @__PURE__ */ s(At, { ...t, type: "primary", danger: !0 });
3322
3322
  function ja(t) {
3323
3323
  const { disabled: e = !1 } = t, { formHasChanges: n, onNewClicked: r } = pe(
3324
3324
  It
3325
- ), { t: o } = we(), i = () => {
3325
+ ), { t: o } = xe(), i = () => {
3326
3326
  if (n) {
3327
3327
  Yn({
3328
3328
  t: o,
@@ -3398,7 +3398,7 @@ async function ps(t, e, n) {
3398
3398
  );
3399
3399
  }
3400
3400
  function Df(t) {
3401
- const { onSearch: e, disabled: n = !1, searchText: r } = t, { t: o } = we(), [i] = Ot.useForm(), [a, l] = T(!1), c = Z(!1), d = Z(r);
3401
+ const { onSearch: e, disabled: n = !1, searchText: r } = t, { t: o } = xe(), [i] = Ot.useForm(), [a, l] = T(!1), c = Z(!1), d = Z(r);
3402
3402
  function f(m) {
3403
3403
  const g = m.search;
3404
3404
  d.current = g, e(g);
@@ -3507,7 +3507,7 @@ const { useToken: Pf } = Xe, Mf = (t) => {
3507
3507
  onApplySearch: a,
3508
3508
  onRefetchSavedSearches: l,
3509
3509
  onClearSavedSearch: c
3510
- } = t, { t: d } = we(), { token: f } = Pf(), u = Z(null), p = pe(
3510
+ } = t, { t: d } = xe(), { token: f } = Pf(), u = Z(null), p = pe(
3511
3511
  Nt
3512
3512
  ), { openDefaultActionForModel: m } = p || {}, g = pe(
3513
3513
  It
@@ -3531,6 +3531,7 @@ const { useToken: Pf } = Xe, Mf = (t) => {
3531
3531
  return {
3532
3532
  icon: /* @__PURE__ */ s(Dn, {}),
3533
3533
  ...W,
3534
+ originalData: W,
3534
3535
  name: V ? /* @__PURE__ */ L(
3535
3536
  "div",
3536
3537
  {
@@ -3550,14 +3551,14 @@ const { useToken: Pf } = Xe, Mf = (t) => {
3550
3551
  }
3551
3552
  )
3552
3553
  }
3553
- ], [l, C, f.colorPrimary]), F = re(() => !w || w.length === 0 ? (b == null ? void 0 : b.fields) || {} : w.reduce((E, M) => ({ ...E, ...M.fields || {} }), {}), [w, b]), $ = O(
3554
- async (E) => {
3554
+ ], [l, C, f.colorPrimary]), F = re(() => !w || w.length === 0 ? (b == null ? void 0 : b.fields) || {} : w.reduce((_, M) => ({ ..._, ...M.fields || {} }), {}), [w, b]), $ = O(
3555
+ async (_) => {
3555
3556
  var M;
3556
3557
  if (D != null && D.isEnabled && (((M = D == null ? void 0 : D.params) == null ? void 0 : M.types) || []).includes("ir.search"))
3557
3558
  try {
3558
3559
  await S({
3559
3560
  action_type: "ir.search",
3560
- action_id: E,
3561
+ action_id: _,
3561
3562
  context: i
3562
3563
  });
3563
3564
  } catch (W) {
@@ -3566,8 +3567,8 @@ const { useToken: Pf } = Xe, Mf = (t) => {
3566
3567
  },
3567
3568
  [i, S, D]
3568
3569
  ), R = O(
3569
- (E) => {
3570
- const M = E;
3570
+ (_) => {
3571
+ const M = _.originalData || _;
3571
3572
  if (M != null && M.domain) {
3572
3573
  x == null || x(M), v == null || v(M.domain);
3573
3574
  const W = Ha(
@@ -3587,17 +3588,17 @@ const { useToken: Pf } = Xe, Mf = (t) => {
3587
3588
  F,
3588
3589
  x
3589
3590
  ]
3590
- ), _ = O(async () => {
3591
- var E;
3592
- (E = u == null ? void 0 : u.current) == null || E.close(), m == null || m({
3591
+ ), E = O(async () => {
3592
+ var _;
3593
+ (_ = u == null ? void 0 : u.current) == null || _.close(), m == null || m({
3593
3594
  model: "ir.search",
3594
3595
  context: {
3595
3596
  model: h
3596
3597
  }
3597
3598
  });
3598
3599
  }, [h, m]), I = O(() => {
3599
- var E;
3600
- (E = u == null ? void 0 : u.current) == null || E.close(), c == null || c();
3600
+ var _;
3601
+ (_ = u == null ? void 0 : u.current) == null || _.close(), c == null || c();
3601
3602
  }, [c]);
3602
3603
  return /* @__PURE__ */ s(
3603
3604
  Un,
@@ -3660,7 +3661,7 @@ const { useToken: Pf } = Xe, Mf = (t) => {
3660
3661
  ns,
3661
3662
  {
3662
3663
  style: { color: f.colorPrimary, cursor: "pointer" },
3663
- onClick: _
3664
+ onClick: E
3664
3665
  }
3665
3666
  ) }) })
3666
3667
  ] })
@@ -3677,7 +3678,7 @@ const { useToken: Pf } = Xe, Mf = (t) => {
3677
3678
  }, $f = (t, e) => {
3678
3679
  const { children: n, globalValues: r = {} } = t, o = Z(), i = Z(), [a, l] = T(!1), c = pe(
3679
3680
  Nt
3680
- ), { openAction: d } = c || {}, f = Z([]), { t: u } = we(), { showErrorNotification: p } = yt(), m = Zr(
3681
+ ), { openAction: d } = c || {}, f = Z([]), { t: u } = xe(), { showErrorNotification: p } = yt(), m = Zr(
3681
3682
  wt.FEATURE_LOGGABLE_ACTIONS
3682
3683
  ), [g, h] = Re(
3683
3684
  H.getHandler().logAction
@@ -3695,14 +3696,14 @@ const { useToken: Pf } = Xe, Mf = (t) => {
3695
3696
  );
3696
3697
  async function C(R) {
3697
3698
  var z;
3698
- const { reportData: _, fields: I, values: A, context: k = {} } = R, {
3699
- context: E,
3699
+ const { reportData: E, fields: I, values: A, context: k = {} } = R, {
3700
+ context: _,
3700
3701
  model: M,
3701
3702
  datas: W = {},
3702
3703
  report_name: V,
3703
3704
  type: N,
3704
3705
  id: U
3705
- } = _;
3706
+ } = E;
3706
3707
  if (N !== "ir.actions.report.xml") {
3707
3708
  p({
3708
3709
  type: "error",
@@ -3711,11 +3712,11 @@ const { useToken: Pf } = Xe, Mf = (t) => {
3711
3712
  });
3712
3713
  return;
3713
3714
  }
3714
- const { ids: j } = W || {}, ee = j || [], B = typeof E == "string" ? ln({
3715
- context: E,
3715
+ const { ids: j } = W || {}, ee = j || [], B = typeof _ == "string" ? ln({
3716
+ context: _,
3716
3717
  fields: I,
3717
3718
  values: A
3718
- }) : E;
3719
+ }) : _;
3719
3720
  try {
3720
3721
  if (m != null && m.isEnabled && (((z = m == null ? void 0 : m.params) == null ? void 0 : z.types) || []).includes(N))
3721
3722
  try {
@@ -3742,14 +3743,14 @@ const { useToken: Pf } = Xe, Mf = (t) => {
3742
3743
  }
3743
3744
  }
3744
3745
  async function x(R) {
3745
- let _;
3746
+ let E;
3746
3747
  try {
3747
- if (_ = await H.getHandler().getReport({
3748
+ if (E = await H.getHandler().getReport({
3748
3749
  id: R
3749
- }), _.state && i.current === !0) {
3750
+ }), E.state && i.current === !0) {
3750
3751
  i.current = !1, clearInterval(o.current), l(!1);
3751
- const I = await Nn(_.result);
3752
- Qr(_.result, I.mime);
3752
+ const I = await Nn(E.result);
3753
+ Qr(E.result, I.mime);
3753
3754
  }
3754
3755
  } catch (I) {
3755
3756
  i.current = !1, clearInterval(o.current), l(!1), p(I.exception || I);
@@ -3757,22 +3758,22 @@ const { useToken: Pf } = Xe, Mf = (t) => {
3757
3758
  }
3758
3759
  async function D({
3759
3760
  actionData: R,
3760
- fields: _,
3761
+ fields: E,
3761
3762
  values: I,
3762
3763
  context: A,
3763
3764
  onRefreshParentValues: k
3764
3765
  }) {
3765
- const { type: E } = R;
3766
- if (k && f.current.push(k), E === "ir.actions.report.xml")
3766
+ const { type: _ } = R;
3767
+ if (k && f.current.push(k), _ === "ir.actions.report.xml")
3767
3768
  return await C({
3768
3769
  reportData: R,
3769
- fields: _,
3770
+ fields: E,
3770
3771
  values: I,
3771
3772
  context: A
3772
3773
  });
3773
- if (E === "ir.actions.act_window")
3774
- return await S({ actionData: R, fields: _, values: I, context: A });
3775
- if (E === "ir.actions.act_url")
3774
+ if (_ === "ir.actions.act_window")
3775
+ return await S({ actionData: R, fields: E, values: I, context: A });
3776
+ if (_ === "ir.actions.act_url")
3776
3777
  window.open(
3777
3778
  Gu(R.url, { ...I, context: A }),
3778
3779
  "_blank"
@@ -3781,12 +3782,12 @@ const { useToken: Pf } = Xe, Mf = (t) => {
3781
3782
  return p({
3782
3783
  type: "error",
3783
3784
  title: "Error",
3784
- body: `${E} action not supported`
3785
+ body: `${_} action not supported`
3785
3786
  }), {};
3786
3787
  }
3787
3788
  async function S({
3788
3789
  actionData: R,
3789
- fields: _ = {},
3790
+ fields: E = {},
3790
3791
  values: I = {},
3791
3792
  context: A = {}
3792
3793
  }) {
@@ -3797,9 +3798,9 @@ const { useToken: Pf } = Xe, Mf = (t) => {
3797
3798
  ids: [parseInt(R.id)],
3798
3799
  context: A
3799
3800
  }))[0]);
3800
- const E = k.context, M = typeof (k == null ? void 0 : k.context) == "string" ? ln({
3801
+ const _ = k.context, M = typeof (k == null ? void 0 : k.context) == "string" ? ln({
3801
3802
  context: k.context,
3802
- fields: _,
3803
+ fields: E,
3803
3804
  values: { ...I, ...r }
3804
3805
  }) : (k == null ? void 0 : k.context) || {}, W = {
3805
3806
  ...A,
@@ -3810,10 +3811,10 @@ const { useToken: Pf } = Xe, Mf = (t) => {
3810
3811
  if (k.domain && (V = await H.getHandler().evalDomain({
3811
3812
  domain: k.domain,
3812
3813
  values: Cn({
3813
- fields: _,
3814
+ fields: E,
3814
3815
  values: { ...I, ...r }
3815
3816
  }),
3816
- fields: _,
3817
+ fields: E,
3817
3818
  context: W
3818
3819
  })), k.target === "new") {
3819
3820
  const j = await H.getHandler().getView({
@@ -3848,9 +3849,9 @@ const { useToken: Pf } = Xe, Mf = (t) => {
3848
3849
  action_type: k.type,
3849
3850
  res_id: k.res_id,
3850
3851
  actionRawData: {
3851
- context: E,
3852
+ context: _,
3852
3853
  domain: N,
3853
- fields: _,
3854
+ fields: E,
3854
3855
  values: I
3855
3856
  }
3856
3857
  }), { closeParent: !0 };
@@ -3858,28 +3859,28 @@ const { useToken: Pf } = Xe, Mf = (t) => {
3858
3859
  }
3859
3860
  function P({
3860
3861
  domain: R,
3861
- model: _,
3862
+ model: E,
3862
3863
  formView: I,
3863
3864
  context: A,
3864
3865
  actionData: k
3865
3866
  }) {
3866
3867
  var W;
3867
- const { type: E, id: M } = k || {};
3868
- if (m != null && m.isEnabled && (((W = m == null ? void 0 : m.params) == null ? void 0 : W.types) || []).includes(E))
3868
+ const { type: _, id: M } = k || {};
3869
+ if (m != null && m.isEnabled && (((W = m == null ? void 0 : m.params) == null ? void 0 : W.types) || []).includes(_))
3869
3870
  try {
3870
3871
  g({
3871
- action_type: E,
3872
+ action_type: _,
3872
3873
  action_id: M,
3873
3874
  context: A
3874
3875
  });
3875
3876
  } catch (V) {
3876
3877
  console.error(V);
3877
3878
  }
3878
- v ? F({ domain: R, model: _, formView: I, context: A, actionData: k }) : (w({ domain: R, model: _, context: A, formView: I, actionData: k }), y(!0));
3879
+ v ? F({ domain: R, model: E, formView: I, context: A, actionData: k }) : (w({ domain: R, model: E, context: A, formView: I, actionData: k }), y(!0));
3879
3880
  }
3880
3881
  async function F({
3881
3882
  domain: R,
3882
- model: _,
3883
+ model: E,
3883
3884
  formView: I,
3884
3885
  context: A,
3885
3886
  actionData: k
@@ -3890,7 +3891,7 @@ const { useToken: Pf } = Xe, Mf = (t) => {
3890
3891
  context: {},
3891
3892
  formView: void 0,
3892
3893
  actionData: void 0
3893
- }), y(!1), await new Promise((E) => setTimeout(E, 300)), w({ domain: R, model: _, context: A, formView: I, actionData: k }), y(!0);
3894
+ }), y(!1), await new Promise((_) => setTimeout(_, 300)), w({ domain: R, model: E, context: A, formView: I, actionData: k }), y(!0);
3894
3895
  }
3895
3896
  async function $() {
3896
3897
  Zs(f.current), f.current = [], y(!1), w({
@@ -4034,7 +4035,7 @@ const Vf = $t($f), Wa = ({
4034
4035
  model: o,
4035
4036
  toolbar: i
4036
4037
  }) => {
4037
- const { t: a } = we(), l = Wa({
4038
+ const { t: a } = xe(), l = Wa({
4038
4039
  selectedRowItems: n,
4039
4040
  onRefreshParentValues: r
4040
4041
  }), [c, d] = T(null), [f, u] = T(!1), [p] = Re(
@@ -4141,7 +4142,7 @@ function eo({ res_id: t, searchParams: e }) {
4141
4142
  const n = Z(null), { currentView: r, limit: o, currentPage: i, order: a } = jt(), l = {
4142
4143
  id: r.view_id,
4143
4144
  type: r.type
4144
- }, { token: c } = Xe.useToken(), { t: d } = we(), [f, u] = T(!1), { currentTab: p } = gr(), m = O(
4145
+ }, { token: c } = Xe.useToken(), { t: d } = xe(), [f, u] = T(!1), { currentTab: p } = gr(), m = O(
4145
4146
  (C) => {
4146
4147
  try {
4147
4148
  const x = document.createElement("textarea");
@@ -4248,17 +4249,17 @@ function Gf({
4248
4249
  previousView: F,
4249
4250
  results: $,
4250
4251
  limit: R,
4251
- totalItems: _,
4252
+ totalItems: E,
4252
4253
  isActive: I,
4253
4254
  treeType: A,
4254
4255
  setSearchParams: k,
4255
- setSearchValues: E,
4256
+ setSearchValues: _,
4256
4257
  permissions: M
4257
4258
  } = pe(It), W = Lt(
4258
4259
  wt.FEATURE_ADVANCED_EXPORT
4259
4260
  ), V = Lt(
4260
4261
  wt.FEATURE_SAVED_SEARCHES
4261
- ), { t: N } = we(), [U, j] = T(!1), ee = Z(!0), { showErrorNotification: B } = yt(), z = O(() => {
4262
+ ), { t: N } = xe(), [U, j] = T(!1), ee = Z(!0), { showErrorNotification: B } = yt(), z = O(() => {
4262
4263
  var ne;
4263
4264
  (ne = h == null ? void 0 : h.current) == null || ne.refreshResults();
4264
4265
  }, [h]), K = O(() => {
@@ -4327,7 +4328,7 @@ function Gf({
4327
4328
  [l, P, c]
4328
4329
  ), Y = O(
4329
4330
  (ne) => {
4330
- ne !== D && (ne && ne.trim().length > 0 && !D && (k == null || k([]), E == null || E({})), x == null || x(ne), D !== void 0 && setTimeout(() => {
4331
+ ne !== D && (ne && ne.trim().length > 0 && !D && (k == null || k([]), _ == null || _({})), x == null || x(ne), D !== void 0 && setTimeout(() => {
4331
4332
  var ie;
4332
4333
  (ie = h == null ? void 0 : h.current) == null || ie.refreshResults();
4333
4334
  }, 50));
@@ -4336,7 +4337,7 @@ function Gf({
4336
4337
  D,
4337
4338
  x,
4338
4339
  k,
4339
- E,
4340
+ _,
4340
4341
  h
4341
4342
  ]
4342
4343
  ), ge = O(
@@ -4388,7 +4389,7 @@ function Gf({
4388
4389
  { enableOnFormTags: !0, preventDefault: !0 },
4389
4390
  [w, I, C]
4390
4391
  );
4391
- const be = O(() => {
4392
+ const we = O(() => {
4392
4393
  tn({
4393
4394
  confirmMessage: N("confirmDuplicate"),
4394
4395
  t: N,
@@ -4453,7 +4454,7 @@ function Gf({
4453
4454
  tooltip: N("duplicate"),
4454
4455
  disabled: !d || (d == null ? void 0 : d.length) !== 1 || p || S || !(M != null && M.create),
4455
4456
  loading: p,
4456
- onClick: be
4457
+ onClick: we
4457
4458
  }
4458
4459
  ),
4459
4460
  /* @__PURE__ */ s(
@@ -4536,7 +4537,7 @@ function Gf({
4536
4537
  model: g,
4537
4538
  domain: se,
4538
4539
  limit: R,
4539
- totalRegisters: _ || 0,
4540
+ totalRegisters: E || 0,
4540
4541
  selectedRegistersToExport: d,
4541
4542
  visibleRegisters: ($ == null ? void 0 : $.length) || 0,
4542
4543
  context: t
@@ -4589,7 +4590,7 @@ const { useToken: zf } = Xe, { Title: Kf, Text: Tr } = on, to = ({
4589
4590
  totalItems: d,
4590
4591
  selectedRowItems: f,
4591
4592
  treeType: u
4592
- } = pe(It), { t: p } = we(), { token: m } = zf(), g = re(() => {
4593
+ } = pe(It), { t: p } = xe(), { token: m } = zf(), g = re(() => {
4593
4594
  if (!n)
4594
4595
  return null;
4595
4596
  if ((i == null ? void 0 : i.type) === "form" && a) {
@@ -5278,7 +5279,7 @@ const { defaultAlgorithm: hp, defaultSeed: gp } = Xe, yp = hp(gp), { Option: vp
5278
5279
  function Qa(t) {
5279
5280
  const { field: e } = t;
5280
5281
  e.readOnly = !1, e.required = !1;
5281
- const { t: n } = we();
5282
+ const { t: n } = xe();
5282
5283
  switch (e.type) {
5283
5284
  case an.boolean: {
5284
5285
  const o = new Xo({
@@ -6379,7 +6380,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
6379
6380
  i
6380
6381
  ]), R = O(() => {
6381
6382
  l && (x(!0), S(p || ""), w(!0));
6382
- }, [l, p]), _ = ut(async () => {
6383
+ }, [l, p]), E = ut(async () => {
6383
6384
  if (!l || !t || !(n != null && n.length))
6384
6385
  return;
6385
6386
  const B = (D || p || "Unnamed Search").trim();
@@ -6496,7 +6497,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
6496
6497
  f,
6497
6498
  u,
6498
6499
  i
6499
- ]), E = O(
6500
+ ]), _ = O(
6500
6501
  (B) => {
6501
6502
  B.key === "Enter" ? (h(!1), k()) : B.key === "Escape" && (m((o == null ? void 0 : o.name) || ""), h(!1));
6502
6503
  },
@@ -6515,7 +6516,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
6515
6516
  {
6516
6517
  value: p,
6517
6518
  onChange: A,
6518
- onKeyDown: E,
6519
+ onKeyDown: _,
6519
6520
  onBlur: M,
6520
6521
  size: "small",
6521
6522
  style: { width: "200px", fontSize: "14px" },
@@ -6542,7 +6543,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
6542
6543
  v,
6543
6544
  g,
6544
6545
  A,
6545
- E,
6546
+ _,
6546
6547
  M,
6547
6548
  I,
6548
6549
  l
@@ -6575,7 +6576,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
6575
6576
  setModalInputValue: S,
6576
6577
  handleSave: $,
6577
6578
  handleSaveAsNew: R,
6578
- handleModalSave: _,
6579
+ handleModalSave: E,
6579
6580
  handleClear: ee,
6580
6581
  renderSavedSearchTitle: W,
6581
6582
  shouldShowSaveButtons: V,
@@ -6585,7 +6586,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
6585
6586
  };
6586
6587
  }, _l = $t(
6587
6588
  (t, e) => {
6588
- const { onSubmit: n, searchValues: r, searchFields: o, onChange: i, onClear: a } = t, [l] = Ot.useForm(), [c, d] = T({}), [f, u] = T(""), { t: p } = we(), [m, g] = T(0), h = Z(null), [v, y] = T([]);
6589
+ const { onSubmit: n, searchValues: r, searchFields: o, onChange: i, onClear: a } = t, [l] = Ot.useForm(), [c, d] = T({}), [f, u] = T(""), { t: p } = xe(), [m, g] = T(0), h = Z(null), [v, y] = T([]);
6589
6590
  Ue(() => {
6590
6591
  l.setFieldsValue(r);
6591
6592
  const x = Pn(r || {});
@@ -6622,25 +6623,25 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
6622
6623
  }) => {
6623
6624
  if (!o)
6624
6625
  return;
6625
- const P = o == null ? void 0 : o.rows, F = P == null ? void 0 : P.flatMap((_) => _), $ = Object.keys(c).reduce((_, I) => {
6626
+ const P = o == null ? void 0 : o.rows, F = P == null ? void 0 : P.flatMap((E) => E), $ = Object.keys(c).reduce((E, I) => {
6626
6627
  const A = I.replace(/#.*$/, "");
6627
- return _[A] === void 0 && (_[A] = c[I] !== void 0), _;
6628
- }, {}), R = D ? F.reduce((_, I) => (_[I.id] = $[I.id], _), {}) : $;
6629
- return F.filter((_) => D ? R[_.id] === !0 : !0).sort((_, I) => {
6630
- const A = _, k = I;
6628
+ return E[A] === void 0 && (E[A] = c[I] !== void 0), E;
6629
+ }, {}), R = D ? F.reduce((E, I) => (E[I.id] = $[I.id], E), {}) : $;
6630
+ return F.filter((E) => D ? R[E.id] === !0 : !0).sort((E, I) => {
6631
+ const A = E, k = I;
6631
6632
  if (D) {
6632
- const E = v.indexOf(A.id), M = v.indexOf(k.id);
6633
- return E - M;
6633
+ const _ = v.indexOf(A.id), M = v.indexOf(k.id);
6634
+ return _ - M;
6634
6635
  }
6635
6636
  return Nr(A.label).localeCompare(
6636
6637
  Nr(k.label)
6637
6638
  );
6638
- }).map((_) => {
6639
- const I = _, A = R[I.id] === !0, k = D ? !1 : x && !qh(x, I), E = S ? `${I.id}-top` : `${I.id}-bottom`;
6639
+ }).map((E) => {
6640
+ const I = E, A = R[I.id] === !0, k = D ? !1 : x && !qh(x, I), _ = S ? `${I.id}-top` : `${I.id}-bottom`;
6640
6641
  return /* @__PURE__ */ s(
6641
6642
  "div",
6642
6643
  {
6643
- id: `field-container-${E}`,
6644
+ id: `field-container-${_}`,
6644
6645
  style: {
6645
6646
  display: k ? "none" : "block",
6646
6647
  paddingTop: 5,
@@ -6656,9 +6657,9 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
6656
6657
  alignItems: "flex-end",
6657
6658
  gap: "8px"
6658
6659
  },
6659
- "data-field-id": E,
6660
+ "data-field-id": _,
6660
6661
  children: [
6661
- /* @__PURE__ */ s("div", { style: { flex: 1 }, children: /* @__PURE__ */ s(Qa, { field: I }, `sf-${E}`) }),
6662
+ /* @__PURE__ */ s("div", { style: { flex: 1 }, children: /* @__PURE__ */ s(Qa, { field: I }, `sf-${_}`) }),
6662
6663
  A && /* @__PURE__ */ s(
6663
6664
  je,
6664
6665
  {
@@ -6677,7 +6678,7 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
6677
6678
  }
6678
6679
  ) })
6679
6680
  },
6680
- E
6681
+ _
6681
6682
  );
6682
6683
  });
6683
6684
  }, w = ut(() => {
@@ -6689,20 +6690,20 @@ const zn = /* @__PURE__ */ ga(Bh), { Text: jh } = on, Uh = ({
6689
6690
  (R) => D[R] !== void 0
6690
6691
  );
6691
6692
  if (F.length > P.length) {
6692
- const R = F.find((_) => !P.includes(_));
6693
+ const R = F.find((E) => !P.includes(E));
6693
6694
  if (R) {
6694
- const _ = R.replace(/#.*$/, "");
6695
- y((I) => I.includes(_) ? I : [...I, _]), h.current && setTimeout(() => {
6695
+ const E = R.replace(/#.*$/, "");
6696
+ y((I) => I.includes(E) ? I : [...I, E]), h.current && setTimeout(() => {
6696
6697
  h.current && (h.current.scrollTop = h.current.scrollHeight);
6697
6698
  }, 150);
6698
6699
  }
6699
6700
  }
6700
6701
  const $ = P.filter((R) => !F.includes(R));
6701
6702
  $.length > 0 && y((R) => {
6702
- const _ = $.map(
6703
+ const E = $.map(
6703
6704
  (I) => I.replace(/#.*$/, "")
6704
6705
  );
6705
- return R.filter((I) => !_.includes(I));
6706
+ return R.filter((I) => !E.includes(I));
6706
6707
  });
6707
6708
  }, [l, i, c]), C = O(
6708
6709
  (x) => {
@@ -6833,7 +6834,7 @@ const El = (t) => {
6833
6834
  searchValues: l,
6834
6835
  currentModel: c,
6835
6836
  context: d
6836
- } = t, f = Z(), { t: u } = we(), p = Z(), m = Z(null), {
6837
+ } = t, f = Z(), { t: u } = xe(), p = Z(), m = Z(null), {
6837
6838
  currentSavedSearch: g,
6838
6839
  searchParams: h
6839
6840
  } = jt(), [v, y] = T([]), [b, w] = T({}), C = Jt(() => v, [v]), x = Jt(() => `${u("filter")} (${(C == null ? void 0 : C.length) || 0})`, [u, C]), D = Jt(() => {
@@ -6855,11 +6856,11 @@ const El = (t) => {
6855
6856
  savedSearchName: F,
6856
6857
  hasChanges: $,
6857
6858
  showSaveModal: R,
6858
- isModalSaveAsNew: _,
6859
+ isModalSaveAsNew: E,
6859
6860
  modalInputValue: I,
6860
6861
  setShowSaveModal: A,
6861
6862
  setModalInputValue: k,
6862
- handleSave: E,
6863
+ handleSave: _,
6863
6864
  handleSaveAsNew: M,
6864
6865
  handleModalSave: W,
6865
6866
  handleClear: V,
@@ -6946,7 +6947,7 @@ const El = (t) => {
6946
6947
  [b]
6947
6948
  ), q = ut(
6948
6949
  (G, le = {}) => {
6949
- var te, Y, ge, be, ve;
6950
+ var te, Y, ge, we, ve;
6950
6951
  if (G) {
6951
6952
  const ne = { ...le };
6952
6953
  Object.entries(le).forEach(([Te]) => {
@@ -6958,7 +6959,7 @@ const El = (t) => {
6958
6959
  y(ie);
6959
6960
  return;
6960
6961
  }
6961
- (Y = m.current) == null || Y.resetFields(), (ge = m.current) == null || ge.setFieldsValue({}), (ve = (be = m.current) == null ? void 0 : be.resetInitialValues) == null || ve.call(be), y([]), w({}), V(), o && o();
6962
+ (Y = m.current) == null || Y.resetFields(), (ge = m.current) == null || ge.setFieldsValue({}), (ve = (we = m.current) == null ? void 0 : we.resetInitialValues) == null || ve.call(we), y([]), w({}), V(), o && o();
6962
6963
  },
6963
6964
  [v, o, V]
6964
6965
  ), oe = Jt(() => U ? ee ? /* @__PURE__ */ L(ct.Compact, { size: "small", children: [
@@ -6967,7 +6968,7 @@ const El = (t) => {
6967
6968
  {
6968
6969
  size: "small",
6969
6970
  icon: /* @__PURE__ */ s(ko, {}),
6970
- onClick: E,
6971
+ onClick: _,
6971
6972
  style: { height: "24px" },
6972
6973
  children: u("saveSearchFilter")
6973
6974
  }
@@ -7003,7 +7004,7 @@ const El = (t) => {
7003
7004
  {
7004
7005
  size: "small",
7005
7006
  icon: B ? /* @__PURE__ */ s(Po, {}) : /* @__PURE__ */ s(ko, {}),
7006
- onClick: B ? M : E,
7007
+ onClick: B ? M : _,
7007
7008
  style: { height: "24px" },
7008
7009
  children: u(B ? "saveAsNewSearchFilter" : "saveSearchFilter")
7009
7010
  }
@@ -7014,7 +7015,7 @@ const El = (t) => {
7014
7015
  B,
7015
7016
  $,
7016
7017
  u,
7017
- E,
7018
+ _,
7018
7019
  M
7019
7020
  ]);
7020
7021
  return /* @__PURE__ */ L(he, { children: [
@@ -7050,7 +7051,7 @@ const El = (t) => {
7050
7051
  /* @__PURE__ */ s(
7051
7052
  Ft,
7052
7053
  {
7053
- title: u(_ ? "saveAsNewSearchFilter" : "saveSearchFilter"),
7054
+ title: u(E ? "saveAsNewSearchFilter" : "saveSearchFilter"),
7054
7055
  open: R,
7055
7056
  onOk: W,
7056
7057
  okButtonProps: {
@@ -7106,7 +7107,7 @@ const El = (t) => {
7106
7107
  onSubmit: e,
7107
7108
  searchParams: n
7108
7109
  }) => {
7109
- const { t: r } = we();
7110
+ const { t: r } = xe();
7110
7111
  return /* @__PURE__ */ L(
7111
7112
  "div",
7112
7113
  {
@@ -7158,7 +7159,7 @@ function Gh(t) {
7158
7159
  onClear: r,
7159
7160
  isSearching: o,
7160
7161
  hideAdvancedFilter: i
7161
- } = t, { t: a } = we();
7162
+ } = t, { t: a } = xe();
7162
7163
  return /* @__PURE__ */ L(Ge, { children: [
7163
7164
  !i && /* @__PURE__ */ s(Oe, { span: 12, className: "text-left pt-4 pb-2 pl-2", children: /* @__PURE__ */ L("a", { className: "text-xs", onClick: e, children: [
7164
7165
  n ? /* @__PURE__ */ s(Lc, { className: "pr-1" }) : /* @__PURE__ */ s(ur, { className: "pr-1" }),
@@ -7181,7 +7182,7 @@ function Gh(t) {
7181
7182
  ] });
7182
7183
  }
7183
7184
  function Yh(t) {
7184
- const { onLimitChange: e } = t, { t: n } = we(), r = new Do({ name: "limit" }), o = new Do({ name: "offset" });
7185
+ const { onLimitChange: e } = t, { t: n } = xe(), r = new Do({ name: "limit" }), o = new Do({ name: "offset" });
7185
7186
  return /* @__PURE__ */ L("div", { className: "pl-2 pt-2", children: [
7186
7187
  /* @__PURE__ */ s(Ge, { children: n("parameters") }, "count_params"),
7187
7188
  /* @__PURE__ */ L(ct, { align: "center", children: [
@@ -7225,40 +7226,40 @@ function oo(t) {
7225
7226
  const S = () => {
7226
7227
  if (!v)
7227
7228
  return;
7228
- const R = b ? v : g, _ = R == null ? void 0 : R.rows;
7229
- return _ == null ? void 0 : _.map((I, A) => /* @__PURE__ */ s(Ge, { children: I.map((k, E) => /* @__PURE__ */ s(Oe, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ s(Qa, { field: k }) }, E)) }, A));
7229
+ const R = b ? v : g, E = R == null ? void 0 : R.rows;
7230
+ return E == null ? void 0 : E.map((I, A) => /* @__PURE__ */ s(Ge, { children: I.map((k, _) => /* @__PURE__ */ s(Oe, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ s(Qa, { field: k }) }, _)) }, A));
7230
7231
  };
7231
7232
  Ue(() => {
7232
7233
  w(!1), C.current = new Zi(n, e), C.current.parse(), h(C.current._simpleSearchContainer), y(C.current._advancedSearchContainer);
7233
7234
  }, [e, n]);
7234
7235
  const P = S(), F = (R) => {
7235
7236
  var k;
7236
- const { limit: _, offset: I } = R;
7237
+ const { limit: E, offset: I } = R;
7237
7238
  delete R.offset, delete R.limit;
7238
7239
  const A = er(
7239
7240
  R,
7240
7241
  (k = C.current) == null ? void 0 : k._advancedSearchContainer
7241
7242
  );
7242
- o({ params: A, offset: I, limit: _, searchValues: R });
7243
+ o({ params: A, offset: I, limit: E, searchValues: R });
7243
7244
  }, $ = O(() => {
7244
7245
  if (!g || !v)
7245
7246
  return !1;
7246
7247
  const R = g.rows.reduce(
7247
7248
  (I, A) => I + A.length,
7248
7249
  0
7249
- ), _ = v.rows.reduce(
7250
+ ), E = v.rows.reduce(
7250
7251
  (I, A) => I + A.length,
7251
7252
  0
7252
7253
  );
7253
- return R === _;
7254
+ return R === E;
7254
7255
  }, [g, v]);
7255
7256
  return /* @__PURE__ */ s(
7256
7257
  os,
7257
7258
  {
7258
7259
  bounds: !0,
7259
7260
  onResize: (R) => {
7260
- var _;
7261
- f == null || f((_ = R.bounds) == null ? void 0 : _.height);
7261
+ var E;
7262
+ f == null || f((E = R.bounds) == null ? void 0 : E.height);
7262
7263
  },
7263
7264
  children: ({ measureRef: R }) => /* @__PURE__ */ s("div", { ref: R, children: /* @__PURE__ */ L("div", { style: { display: d ? "block" : "none" }, children: [
7264
7265
  /* @__PURE__ */ L(
@@ -7306,7 +7307,7 @@ function oo(t) {
7306
7307
  function Ol({
7307
7308
  useLocalState: t = !1
7308
7309
  }) {
7309
- const e = Yg() && !t, n = jt(), [r, o] = T(!1), [i, a] = T(!1), [l, c] = T([]), [d, f] = T(0), [u, p] = T(void 0), [m, g] = T([]), [h, v] = T({}), [y, b] = T(), [w, C] = T([]), [x, D] = T(), [S, P] = T(0), [F, $] = T(), [R, _] = T(1), [I, A] = T(Bn), [k, E] = T(Ct);
7310
+ const e = Yg() && !t, n = jt(), [r, o] = T(!1), [i, a] = T(!1), [l, c] = T([]), [d, f] = T(0), [u, p] = T(void 0), [m, g] = T([]), [h, v] = T({}), [y, b] = T(), [w, C] = T([]), [x, D] = T(), [S, P] = T(0), [F, $] = T(), [R, E] = T(1), [I, A] = T(Bn), [k, _] = T(Ct);
7310
7311
  return e ? {
7311
7312
  treeIsLoading: n.treeIsLoading ?? !1,
7312
7313
  setTreeIsLoading: n.setTreeIsLoading ?? (() => {
@@ -7381,11 +7382,11 @@ function Ol({
7381
7382
  order: F,
7382
7383
  setOrder: $,
7383
7384
  currentPage: R,
7384
- setCurrentPage: _,
7385
+ setCurrentPage: E,
7385
7386
  treeType: I,
7386
7387
  setTreeType: A,
7387
7388
  limit: k,
7388
- setLimit: E
7389
+ setLimit: _
7389
7390
  };
7390
7391
  }
7391
7392
  const Fs = () => {
@@ -7455,8 +7456,8 @@ const dr = ({
7455
7456
  ), [b, w] = Re(
7456
7457
  H.getHandler().parseConditions
7457
7458
  ), C = Fs(), x = Z({}), D = O(
7458
- (_, I) => I ? o == null ? void 0 : o.some(
7459
- (A) => JSON.stringify(_[A]) !== JSON.stringify(I[A])
7459
+ (E, I) => I ? o == null ? void 0 : o.some(
7460
+ (A) => JSON.stringify(E[A]) !== JSON.stringify(I[A])
7460
7461
  ) : !0,
7461
7462
  [o]
7462
7463
  );
@@ -7467,22 +7468,22 @@ const dr = ({
7467
7468
  var A, k;
7468
7469
  if (!c)
7469
7470
  return !1;
7470
- const _ = ((A = c.fields_in_conditions) == null ? void 0 : A.colors) || [], I = ((k = c.fields_in_conditions) == null ? void 0 : k.status) || [];
7471
- return _.some((E) => o == null ? void 0 : o.includes(E)) || I.some((E) => o == null ? void 0 : o.includes(E));
7471
+ const E = ((A = c.fields_in_conditions) == null ? void 0 : A.colors) || [], I = ((k = c.fields_in_conditions) == null ? void 0 : k.status) || [];
7472
+ return E.some((_) => o == null ? void 0 : o.includes(_)) || I.some((_) => o == null ? void 0 : o.includes(_));
7472
7473
  }, [c, o]), P = O(async () => {
7473
7474
  var I, A;
7474
7475
  if (!(o != null && o.length) || !g)
7475
7476
  return;
7476
- const _ = (I = e.current) == null ? void 0 : I.getVisibleRowIds().filter((k) => k != null);
7477
- if (!(!_ || _.length === 0) && a)
7477
+ const E = (I = e.current) == null ? void 0 : I.getVisibleRowIds().filter((k) => k != null);
7478
+ if (!(!E || E.length === 0) && a)
7478
7479
  try {
7479
7480
  const k = await v({
7480
7481
  model: n,
7481
- ids: _,
7482
+ ids: E,
7482
7483
  fields: u,
7483
7484
  fieldsToRetrieve: o,
7484
7485
  context: r
7485
- }), E = cn(a, k), M = E.filter((W) => {
7486
+ }), _ = cn(a, k), M = _.filter((W) => {
7486
7487
  const V = x.current[W.id];
7487
7488
  return D(W, V);
7488
7489
  });
@@ -7505,7 +7506,7 @@ const dr = ({
7505
7506
  N.name !== "AbortError" && console.error("Error parsing conditions:", N);
7506
7507
  }
7507
7508
  }
7508
- (A = e.current) == null || A.updateRows(E), f == null || f(M);
7509
+ (A = e.current) == null || A.updateRows(_), f == null || f(M);
7509
7510
  } catch (k) {
7510
7511
  console.error(k);
7511
7512
  }
@@ -7595,7 +7596,7 @@ const dr = ({
7595
7596
  return !1;
7596
7597
  const N = ((j = e.fields_in_conditions) == null ? void 0 : j.colors) || [], U = ((ee = e.fields_in_conditions) == null ? void 0 : ee.status) || [];
7597
7598
  return N.some((B) => p.current.includes(B)) || U.some((B) => p.current.includes(B));
7598
- }, [e]), _ = O(async () => {
7599
+ }, [e]), E = O(async () => {
7599
7600
  if (!f || h.size === 0 || !o || !p.current.length || !a)
7600
7601
  return;
7601
7602
  const N = Array.from(h).filter(
@@ -7625,18 +7626,18 @@ const dr = ({
7625
7626
  D
7626
7627
  ]);
7627
7628
  Ue(() => {
7628
- h.size !== 0 && _();
7629
- }, [h, _]);
7629
+ h.size !== 0 && E();
7630
+ }, [h, E]);
7630
7631
  const I = O(
7631
7632
  (N) => {
7632
7633
  !N || N.length === 0 || (v((U) => {
7633
7634
  const j = new Set(U);
7634
7635
  return N.forEach((ee) => j.add(ee)), j;
7635
7636
  }), f && o && a && setTimeout(() => {
7636
- _();
7637
+ E();
7637
7638
  }, 100));
7638
7639
  },
7639
- [f, o, a, _]
7640
+ [f, o, a, E]
7640
7641
  ), A = O(
7641
7642
  async (N) => {
7642
7643
  var ee;
@@ -7682,7 +7683,7 @@ const dr = ({
7682
7683
  ) : !1;
7683
7684
  }).filter(Boolean);
7684
7685
  U.length > 0 && (U.forEach((B) => y.current.delete(B.id)), A(U), (ee = n == null ? void 0 : n.current) == null || ee.updateRows(U));
7685
- }, [n, A]), E = O((N, U) => p.current.includes(U) ? !b.current.find((j) => j.id === (N == null ? void 0 : N.id)) : !1, []);
7686
+ }, [n, A]), _ = O((N, U) => p.current.includes(U) ? !b.current.find((j) => j.id === (N == null ? void 0 : N.id)) : !1, []);
7686
7687
  Ue(() => (f && C && (k(), w.current = setInterval(
7687
7688
  k,
7688
7689
  Jh
@@ -7719,7 +7720,7 @@ const dr = ({
7719
7720
  v(/* @__PURE__ */ new Set()), b.current = [], y.current.clear();
7720
7721
  },
7721
7722
  addRecordsToCheckFunctionFields: I,
7722
- isFieldLoading: E,
7723
+ isFieldLoading: _,
7723
7724
  hasFunctionFields: f,
7724
7725
  pause: M,
7725
7726
  resume: W,
@@ -7729,7 +7730,7 @@ const dr = ({
7729
7730
  }, Ml = ({
7730
7731
  onFilterSearchClick: t
7731
7732
  }) => {
7732
- const { t: e } = we(), n = (a) => {
7733
+ const { t: e } = xe(), n = (a) => {
7733
7734
  a.preventDefault(), t();
7734
7735
  }, r = e("nameSearchLimitNote"), o = e("filterSearchLink"), i = r.split(o);
7735
7736
  return i.length > 1 ? /* @__PURE__ */ L("span", { style: { fontSize: "12px", color: "#666" }, children: [
@@ -7753,7 +7754,7 @@ const dr = ({
7753
7754
  selectedRowKeys: e,
7754
7755
  customMiddleComponent: n
7755
7756
  }) => {
7756
- const { t: r } = we(), o = n ? 6 : 12;
7757
+ const { t: r } = xe(), o = n ? 6 : 12;
7757
7758
  return /* @__PURE__ */ L(
7758
7759
  Ge,
7759
7760
  {
@@ -7781,7 +7782,7 @@ const dr = ({
7781
7782
  }, Qh = ({
7782
7783
  selectedRowKeys: t
7783
7784
  }) => {
7784
- const { t: e } = we();
7785
+ const { t: e } = xe();
7785
7786
  if (t.length === 1)
7786
7787
  return /* @__PURE__ */ L(he, { children: [
7787
7788
  "1 ",
@@ -7877,7 +7878,7 @@ const eg = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(Nl,
7877
7878
  onItemClick: e,
7878
7879
  onOpenChange: n
7879
7880
  }) => {
7880
- const [r, o] = T(!1), [i, a] = T(!1), { t: l } = we(), [c, d] = T(), f = O(async () => {
7881
+ const [r, o] = T(!1), [i, a] = T(!1), { t: l } = xe(), [c, d] = T(), f = O(async () => {
7881
7882
  const {
7882
7883
  actionItems: u = [],
7883
7884
  relateItems: p = [],
@@ -8001,20 +8002,20 @@ const eg = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(Nl,
8001
8002
  });
8002
8003
  i(A), F = A.fields, $ = A.toolbar;
8003
8004
  }
8004
- const _ = sg({ fields: F, toolbar: $ });
8005
+ const E = sg({ fields: F, toolbar: $ });
8005
8006
  let I = {};
8006
- return _.length > 0 && (I = { ...(R = await w({
8007
+ return E.length > 0 && (I = { ...(R = await w({
8007
8008
  model: n,
8008
8009
  ids: [e],
8009
- fieldsToRetrieve: _,
8010
+ fieldsToRetrieve: E,
8010
8011
  context: r
8011
8012
  })) == null ? void 0 : R[0] }), I = { ..._n(I, F), active_id: e }, l(I), $ ? {
8012
8013
  actionItems: $.action,
8013
8014
  relateItems: $.relate,
8014
8015
  printItems: $.print
8015
8016
  } : void 0;
8016
- } catch (_) {
8017
- console.error("Error in Many2oneSuffix fetchData:", _);
8017
+ } catch (E) {
8018
+ console.error("Error in Many2oneSuffix fetchData:", E);
8018
8019
  return;
8019
8020
  }
8020
8021
  }, [
@@ -8153,7 +8154,7 @@ function cg(t) {
8153
8154
  }
8154
8155
  const dg = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(Vl, { ...t }) }), Vl = (t) => {
8155
8156
  var m;
8156
- const { t: e } = we(), [n, r] = Re(
8157
+ const { t: e } = xe(), [n, r] = Re(
8157
8158
  H.getHandler().readObjects
8158
8159
  ), { getFieldValue: o } = pe(Qe) || {}, { ooui: i, value: a } = t, [l, c] = T("default");
8159
8160
  let d = a, f = mr, u = a;
@@ -8537,7 +8538,7 @@ const dg = (t) => /* @__PURE__ */ s(We, { ...t, children: /* @__PURE__ */ s(Vl,
8537
8538
  colorPicker: Sg,
8538
8539
  char: vg
8539
8540
  }, Bl = (t, e) => {
8540
- const { t: n } = we(), r = Lt(
8541
+ const { t: n } = xe(), r = Lt(
8541
8542
  wt.FEATURE_MANY2ONE_SORT
8542
8543
  ), o = Jt(() => {
8543
8544
  if (t)
@@ -8575,12 +8576,12 @@ function Og(t, e) {
8575
8576
  nameSearch: u,
8576
8577
  filterType: p = "side",
8577
8578
  onChangeTreeType: m
8578
- } = t, g = Z(null), h = Z([]), v = Z(!1), { showErrorNotification: y } = yt(), { setCurrentSavedSearch: b } = jt(), [w, C] = T(), [x, D] = T(!1), { t: S } = we(), P = Z(null), F = Ka({
8579
+ } = t, g = Z(null), h = Z([]), v = Z(!1), { showErrorNotification: y } = yt(), { setCurrentSavedSearch: b } = jt(), [w, C] = T(), [x, D] = T(!1), { t: S } = xe(), P = Z(null), F = Ka({
8579
8580
  elementRef: P,
8580
8581
  offset: _g
8581
8582
  }), [$, R] = Re(
8582
8583
  H.getHandler().searchCount
8583
- ), [_, I] = Re(
8584
+ ), [E, I] = Re(
8584
8585
  H.getHandler().searchForTree
8585
8586
  ), [A, k] = Re(
8586
8587
  H.getHandler().searchAllIds
@@ -8588,7 +8589,7 @@ function Og(t, e) {
8588
8589
  ce(() => () => {
8589
8590
  R(), I(), k();
8590
8591
  }, []);
8591
- const { treeView: E, formView: M, loading: W } = ms({
8592
+ const { treeView: _, formView: M, loading: W } = ms({
8592
8593
  model: n,
8593
8594
  formViewProps: r,
8594
8595
  treeViewProps: o,
@@ -8612,7 +8613,7 @@ function Og(t, e) {
8612
8613
  setSearchQuery: te,
8613
8614
  setTotalItems: Y,
8614
8615
  isActive: ge,
8615
- order: be,
8616
+ order: we,
8616
8617
  setOrder: ve
8617
8618
  } = Ol({ useLocalState: !c }), ne = u || oe, ie = Z(ne), Te = Z(!1), Ee = Z(), ke = Z(), $e = Z(!1);
8618
8619
  ce(() => {
@@ -8620,9 +8621,9 @@ function Og(t, e) {
8620
8621
  ne !== void 0 && ie.current === void 0 || typeof ne == "string" && typeof ie.current == "string" && ne !== ie.current ? (Te.current = !!ne, K == null || K([]), q == null || q({}), (fe = g.current) == null || fe.unselectAll()) : ne === void 0 && ie.current !== void 0 && (Te.current = !1, (_e = g.current) == null || _e.unselectAll()), ie.current = ne;
8621
8622
  }, [ne]);
8622
8623
  const me = re(() => {
8623
- if (E)
8624
- return en(E);
8625
- }, [E]), {
8624
+ if (_)
8625
+ return en(_);
8626
+ }, [_]), {
8626
8627
  colorsForResults: qe,
8627
8628
  statusForResults: st,
8628
8629
  updateAttributes: Ze,
@@ -8637,7 +8638,7 @@ function Og(t, e) {
8637
8638
  syncExternalRecordUpdates: ze
8638
8639
  } = Pl({
8639
8640
  model: n,
8640
- treeView: E,
8641
+ treeView: _,
8641
8642
  tableRef: g,
8642
8643
  context: d,
8643
8644
  isActive: ge,
@@ -8648,7 +8649,7 @@ function Og(t, e) {
8648
8649
  model: n,
8649
8650
  tableRef: g,
8650
8651
  autorefreshableFields: me == null ? void 0 : me.autorefreshableFields,
8651
- treeView: E,
8652
+ treeView: _,
8652
8653
  context: d,
8653
8654
  isActive: ge,
8654
8655
  treeOoui: me,
@@ -8672,10 +8673,10 @@ function Og(t, e) {
8672
8673
  }, [Ne, Se]), Ce = re(() => {
8673
8674
  if (!W)
8674
8675
  return Ja({
8675
- treeViewId: E == null ? void 0 : E.view_id,
8676
+ treeViewId: _ == null ? void 0 : _.view_id,
8676
8677
  model: n
8677
8678
  });
8678
- }, [n, E == null ? void 0 : E.view_id, W]), {
8679
+ }, [n, _ == null ? void 0 : _.view_id, W]), {
8679
8680
  loading: ue,
8680
8681
  getColumnState: De,
8681
8682
  updateColumnState: Ve
@@ -8720,31 +8721,31 @@ function Og(t, e) {
8720
8721
  if (!me)
8721
8722
  return [];
8722
8723
  let Je;
8723
- if (!v.current && be) {
8724
+ if (!v.current && we) {
8724
8725
  const X = Er({
8725
- state: be
8726
+ state: we
8726
8727
  });
8727
8728
  Je = Or(X);
8728
8729
  } else {
8729
- const X = ot == null ? void 0 : ot.filter((xe) => xe.sort || xe.sortIndex).map((xe) => ({
8730
- sort: xe.sort || void 0,
8731
- sortIndex: xe.sortIndex || void 0,
8732
- colId: xe.colId
8730
+ const X = ot == null ? void 0 : ot.filter((be) => be.sort || be.sortIndex).map((be) => ({
8731
+ sort: be.sort || void 0,
8732
+ sortIndex: be.sortIndex || void 0,
8733
+ colId: be.colId
8733
8734
  })), ae = X && (X == null ? void 0 : X.length) > 0 ? X : void 0, ye = Er({
8734
8735
  state: ae
8735
8736
  });
8736
8737
  ve == null || ve(ae), Je = Or(ye);
8737
8738
  }
8738
8739
  v.current = !0;
8739
- const Yt = ne ? a : Ae, _t = (E == null ? void 0 : E.fields_in_conditions) !== void 0, Zn = dr({
8740
+ const Yt = ne ? a : Ae, _t = (_ == null ? void 0 : _.fields_in_conditions) !== void 0, Zn = dr({
8740
8741
  treeOoui: me,
8741
8742
  hasFunctionFieldsToParseConditions: _t && Ye()
8742
- }), { results: Mt, attrsEvaluated: io } = await _({
8743
+ }), { results: Mt, attrsEvaluated: io } = await E({
8743
8744
  params: Yt,
8744
8745
  limit: _e - fe,
8745
8746
  offset: fe,
8746
8747
  model: n,
8747
- fields: E.field_parent ? { ...E.fields, [E.field_parent]: {} } : E.fields,
8748
+ fields: _.field_parent ? { ..._.fields, [_.field_parent]: {} } : _.fields,
8748
8749
  context: d,
8749
8750
  attrs: Zn,
8750
8751
  order: Je,
@@ -8773,7 +8774,7 @@ function Og(t, e) {
8773
8774
  },
8774
8775
  [
8775
8776
  le,
8776
- be,
8777
+ we,
8777
8778
  a,
8778
8779
  Ae,
8779
8780
  n,
@@ -8785,12 +8786,12 @@ function Og(t, e) {
8785
8786
  te,
8786
8787
  Y,
8787
8788
  me,
8788
- E,
8789
+ _,
8789
8790
  He,
8790
8791
  Ye,
8791
8792
  D,
8792
8793
  Ze,
8793
- _
8794
+ E
8794
8795
  ]
8795
8796
  ), Ie = O(
8796
8797
  (fe) => {
@@ -8912,7 +8913,7 @@ function Og(t, e) {
8912
8913
  statusComponent: kt,
8913
8914
  onRowStatus: Gt,
8914
8915
  strings: rt,
8915
- initialSortState: be,
8916
+ initialSortState: we,
8916
8917
  cacheBlockSize: fe,
8917
8918
  onChangeTableType: m
8918
8919
  }
@@ -8937,7 +8938,7 @@ function Og(t, e) {
8937
8938
  kt,
8938
8939
  Gt,
8939
8940
  rt,
8940
- be,
8941
+ we,
8941
8942
  m
8942
8943
  ]), Vt = Z(de), fn = Z(N);
8943
8944
  Ue(() => {
@@ -8958,7 +8959,7 @@ function Og(t, e) {
8958
8959
  ]);
8959
8960
  Ht(e, () => ({
8960
8961
  refreshResults: Qt,
8961
- getFields: () => E == null ? void 0 : E.fields
8962
+ getFields: () => _ == null ? void 0 : _.fields
8962
8963
  }));
8963
8964
  const pn = re(
8964
8965
  () => ({
@@ -8969,10 +8970,10 @@ function Og(t, e) {
8969
8970
  [F, l]
8970
8971
  ), sn = re(
8971
8972
  () => ({
8972
- fields: { ...M == null ? void 0 : M.fields, ...E == null ? void 0 : E.fields },
8973
+ fields: { ...M == null ? void 0 : M.fields, ..._ == null ? void 0 : _.fields },
8973
8974
  searchFields: Ln([
8974
8975
  M == null ? void 0 : M.search_fields,
8975
- E == null ? void 0 : E.search_fields
8976
+ _ == null ? void 0 : _.search_fields
8976
8977
  ]),
8977
8978
  showLimitOptions: !1,
8978
8979
  limit: 0,
@@ -8984,8 +8985,8 @@ function Og(t, e) {
8984
8985
  [
8985
8986
  M == null ? void 0 : M.fields,
8986
8987
  M == null ? void 0 : M.search_fields,
8987
- E == null ? void 0 : E.fields,
8988
- E == null ? void 0 : E.search_fields,
8988
+ _ == null ? void 0 : _.fields,
8989
+ _ == null ? void 0 : _.search_fields,
8989
8990
  Q
8990
8991
  ]
8991
8992
  ), mn = O(() => {
@@ -9010,10 +9011,10 @@ function Og(t, e) {
9010
9011
  ), hn = re(
9011
9012
  () => ({
9012
9013
  isOpen: N,
9013
- fields: { ...M == null ? void 0 : M.fields, ...E == null ? void 0 : E.fields },
9014
+ fields: { ...M == null ? void 0 : M.fields, ..._ == null ? void 0 : _.fields },
9014
9015
  searchFields: Ln([
9015
9016
  M == null ? void 0 : M.search_fields,
9016
- E == null ? void 0 : E.search_fields
9017
+ _ == null ? void 0 : _.search_fields
9017
9018
  ]),
9018
9019
  searchValues: Q,
9019
9020
  currentModel: n,
@@ -9024,8 +9025,8 @@ function Og(t, e) {
9024
9025
  N,
9025
9026
  M == null ? void 0 : M.fields,
9026
9027
  M == null ? void 0 : M.search_fields,
9027
- E == null ? void 0 : E.fields,
9028
- E == null ? void 0 : E.search_fields,
9028
+ _ == null ? void 0 : _.fields,
9029
+ _ == null ? void 0 : _.search_fields,
9029
9030
  Q,
9030
9031
  n,
9031
9032
  d,
@@ -9119,7 +9120,7 @@ const jl = $t(Og), Ni = (t, e = "14px -apple-system") => {
9119
9120
  onSelectAllRecords: r,
9120
9121
  numberOfRealSelectedRows: o
9121
9122
  }) => {
9122
- const [i, a] = T(!1), { t: l } = we(), c = {
9123
+ const [i, a] = T(!1), { t: l } = xe(), c = {
9123
9124
  recordsSelected: l("recordsSelected"),
9124
9125
  selectAllRecords: l("selectAllRecords"),
9125
9126
  allRecordsSelected: l("allRecordsSelected")
@@ -9168,21 +9169,21 @@ const jl = $t(Og), Ni = (t, e = "14px -apple-system") => {
9168
9169
  context: x,
9169
9170
  readonly: D,
9170
9171
  onSelectAllRecords: S
9171
- } = t, P = Z(null), [F, $] = T([]), R = Z(!1), [_, I] = T(), { t: A } = we(), k = Z(r), E = pe(
9172
+ } = t, P = Z(null), [F, $] = T([]), R = Z(!1), [E, I] = T(), { t: A } = xe(), k = Z(r), _ = pe(
9172
9173
  It
9173
- ), { title: M = void 0, setTitle: W = void 0 } = (C ? E : {}) || {}, V = Lt(
9174
+ ), { title: M = void 0, setTitle: W = void 0 } = (C ? _ : {}) || {}, V = Lt(
9174
9175
  wt.FEATURE_MANY2ONE_SORT
9175
9176
  ), N = re(() => {
9176
- if (_)
9177
+ if (E)
9177
9178
  return ds(
9178
- _,
9179
+ E,
9179
9180
  {
9180
9181
  ...Is
9181
9182
  },
9182
9183
  x,
9183
9184
  V
9184
9185
  );
9185
- }, [_, x, V]);
9186
+ }, [E, x, V]);
9186
9187
  Ht(e, () => ({
9187
9188
  unselectAll: () => {
9188
9189
  var q;
@@ -9192,10 +9193,10 @@ const jl = $t(Og), Ni = (t, e = "14px -apple-system") => {
9192
9193
  const q = en(i);
9193
9194
  I(q), q.string && M !== q.string && (W == null || W(q.string));
9194
9195
  }, [i, M]), ce(() => {
9195
- if (!_)
9196
+ if (!E)
9196
9197
  return;
9197
9198
  R.current = !1;
9198
- const q = cn(_, a);
9199
+ const q = cn(E, a);
9199
9200
  $(q);
9200
9201
  }, [a]), ce(() => {
9201
9202
  k.current = r;
@@ -9241,9 +9242,9 @@ const jl = $t(Og), Ni = (t, e = "14px -apple-system") => {
9241
9242
  o,
9242
9243
  i.isExpandable
9243
9244
  ]), z = re(() => {
9244
- if (!_)
9245
+ if (!E)
9245
9246
  return null;
9246
- const q = _.columns.filter((G) => G.sum !== void 0).map((G) => ({ label: G.sum, field: G.id }));
9247
+ const q = E.columns.filter((G) => G.sum !== void 0).map((G) => ({ label: G.sum, field: G.id }));
9247
9248
  if (!q || q.length === 0)
9248
9249
  return null;
9249
9250
  const oe = [], se = (u == null ? void 0 : u.length) > 0 ? F.filter((G) => u.includes(G.id)) : F;
@@ -9251,11 +9252,11 @@ const jl = $t(Og), Ni = (t, e = "14px -apple-system") => {
9251
9252
  const le = se.reduce((te, Y) => Y[G.field] && !isNaN(Y[G.field]) ? te + Y[G.field] : te, 0);
9252
9253
  oe.push(`${G.label}: ${Math.round(le * 100) / 100}`);
9253
9254
  }), /* @__PURE__ */ s("div", { className: "p-1 pb-0 pl-2 mt-2 ", children: oe.join(", ") });
9254
- }, [F, u, _]), K = re(() => {
9255
- if (_ !== null && N && N.length > 0)
9255
+ }, [F, u, E]), K = re(() => {
9256
+ if (E !== null && N && N.length > 0)
9256
9257
  return Dg(N, F, 600);
9257
- }, [N, F, _]), Q = re(() => m && (_ != null && _.columns.some((q) => q.sum !== void 0)) ? m - 30 : m, [m, _ == null ? void 0 : _.columns]);
9258
- return _ === null || !K || ((de = K == null ? void 0 : K.columns) == null ? void 0 : de.length) === 0 ? /* @__PURE__ */ s(nt, { style: { padding: "2rem" } }) : /* @__PURE__ */ L(Ir, { children: [
9258
+ }, [N, F, E]), Q = re(() => m && (E != null && E.columns.some((q) => q.sum !== void 0)) ? m - 30 : m, [m, E == null ? void 0 : E.columns]);
9259
+ return E === null || !K || ((de = K == null ? void 0 : K.columns) == null ? void 0 : de.length) === 0 ? /* @__PURE__ */ s(nt, { style: { padding: "2rem" } }) : /* @__PURE__ */ L(Ir, { children: [
9259
9260
  B,
9260
9261
  /* @__PURE__ */ s(
9261
9262
  Sd,
@@ -9320,7 +9321,7 @@ const Wl = (t) => {
9320
9321
  searchParams: D = [],
9321
9322
  setSearchValues: S,
9322
9323
  clearSelection: P
9323
- } = t, [F, $] = T(!1), [R, _] = T(!1), [I, A] = T(), [k, E] = T(1), [M, W] = T(0), [V, N] = T(), [U, j] = T([]), [ee, B] = T(void 0), [z, K] = T(void 0), Q = Z(C || Ct), de = Z([]), q = O(
9324
+ } = t, [F, $] = T(!1), [R, E] = T(!1), [I, A] = T(), [k, _] = T(1), [M, W] = T(0), [V, N] = T(), [U, j] = T([]), [ee, B] = T(void 0), [z, K] = T(void 0), Q = Z(C || Ct), de = Z([]), q = O(
9324
9325
  (ie) => {
9325
9326
  v == null || v([...ie]), j([...ie]);
9326
9327
  },
@@ -9418,7 +9419,7 @@ const Wl = (t) => {
9418
9419
  } catch (Te) {
9419
9420
  A(typeof Te == "string" ? Te : Te.message), $(!1);
9420
9421
  } finally {
9421
- r == null || r([]), _(!1), a == null || a(!1);
9422
+ r == null || r([]), E(!1), a == null || a(!1);
9422
9423
  }
9423
9424
  },
9424
9425
  [
@@ -9453,7 +9454,7 @@ const Wl = (t) => {
9453
9454
  ), Y = O(
9454
9455
  (ie) => {
9455
9456
  const { params: Te, searchValues: Ee, limit: ke, offset: $e } = ie;
9456
- F || (n == null || n(void 0), r == null || r([]), S == null || S(Ee), o == null || o(Te), i == null || i(!1), _(!0), A(void 0), E(1), ke && (Q.current = ke, x == null || x(ke)), $e && W($e), le({
9457
+ F || (n == null || n(void 0), r == null || r([]), S == null || S(Ee), o == null || o(Te), i == null || i(!1), E(!0), A(void 0), _(1), ke && (Q.current = ke, x == null || x(ke)), $e && W($e), le({
9457
9458
  params: Te,
9458
9459
  newOffset: $e
9459
9460
  }));
@@ -9470,11 +9471,11 @@ const Wl = (t) => {
9470
9471
  ]
9471
9472
  ), ge = O(
9472
9473
  (ie) => {
9473
- $(!0), E(ie), W((ie - 1) * C);
9474
+ $(!0), _(ie), W((ie - 1) * C);
9474
9475
  },
9475
- [$, C, W, E]
9476
- ), be = O(() => {
9477
- F || (n == null || n(void 0), o == null || o([]), S == null || S({}), A(void 0), W(0), E(1), x == null || x(C || Ct));
9476
+ [$, C, W, _]
9477
+ ), we = O(() => {
9478
+ F || (n == null || n(void 0), o == null || o([]), S == null || S({}), A(void 0), W(0), _(1), x == null || x(C || Ct));
9478
9479
  }, [
9479
9480
  F,
9480
9481
  n,
@@ -9501,7 +9502,7 @@ const Wl = (t) => {
9501
9502
  }), [e, d, V, D, b]);
9502
9503
  return {
9503
9504
  submit: Y,
9504
- clear: be,
9505
+ clear: we,
9505
9506
  fetchResults: le,
9506
9507
  tableRefreshing: F,
9507
9508
  searchFilterLoading: R,
@@ -9533,9 +9534,9 @@ function Mg(t, e) {
9533
9534
  rootTree: f = !1,
9534
9535
  parentContext: u = {},
9535
9536
  onChangeSelectedRowKeys: p
9536
- } = t, [m, g] = T(!1), [h, v] = T(!1), y = Z(!1), b = Z(null), [w, C] = T(), [x, D] = T(), [S, P] = T(), [F, $] = T(), [R, _] = T(200), I = Z(), { height: A } = Jr(), k = pe(
9537
+ } = t, [m, g] = T(!1), [h, v] = T(!1), y = Z(!1), b = Z(null), [w, C] = T(), [x, D] = T(), [S, P] = T(), [F, $] = T(), [R, E] = T(200), I = Z(), { height: A } = Jr(), k = pe(
9537
9538
  Sn
9538
- ), { processAction: E } = k || {}, M = pe(
9539
+ ), { processAction: _ } = k || {}, M = pe(
9539
9540
  It
9540
9541
  ), {
9541
9542
  setResults: W = void 0,
@@ -9557,7 +9558,7 @@ function Mg(t, e) {
9557
9558
  setSearchValues: te = void 0,
9558
9559
  limit: Y = Ct,
9559
9560
  setLimit: ge = void 0
9560
- } = (f ? M : {}) || {}, { showErrorNotification: be } = yt(), ve = O(
9561
+ } = (f ? M : {}) || {}, { showErrorNotification: we } = yt(), ve = O(
9561
9562
  (Ie) => {
9562
9563
  ee == null || ee(Ie.map((at) => ({ id: at }))), p == null || p(Ie);
9563
9564
  },
@@ -9619,7 +9620,7 @@ function Mg(t, e) {
9619
9620
  try {
9620
9621
  await rt(), v(!0);
9621
9622
  } catch (Ie) {
9622
- be(Ie), G == null || G(!1);
9623
+ we(Ie), G == null || G(!1);
9623
9624
  } finally {
9624
9625
  g(!1);
9625
9626
  }
@@ -9655,7 +9656,7 @@ function Mg(t, e) {
9655
9656
  context: u
9656
9657
  }));
9657
9658
  const Ut = I.current[0][2];
9658
- await (E == null ? void 0 : E({
9659
+ await (_ == null ? void 0 : _({
9659
9660
  actionData: Ut,
9660
9661
  fields: x.fields,
9661
9662
  values: {
@@ -9665,7 +9666,7 @@ function Mg(t, e) {
9665
9666
  context: u
9666
9667
  }));
9667
9668
  },
9668
- [w, u, E, x]
9669
+ [w, u, _, x]
9669
9670
  ), ue = O(
9670
9671
  async (Ie) => {
9671
9672
  const { id: at } = Ie;
@@ -9673,7 +9674,7 @@ function Mg(t, e) {
9673
9674
  try {
9674
9675
  await Ce(Ie);
9675
9676
  } catch (Ut) {
9676
- be(Ut);
9677
+ we(Ut);
9677
9678
  }
9678
9679
  return;
9679
9680
  }
@@ -9688,7 +9689,7 @@ function Mg(t, e) {
9688
9689
  w,
9689
9690
  S,
9690
9691
  i,
9691
- be,
9692
+ we,
9692
9693
  Ce,
9693
9694
  x
9694
9695
  ]
@@ -9713,7 +9714,7 @@ function Mg(t, e) {
9713
9714
  isSearching: ke,
9714
9715
  onSubmit: ne,
9715
9716
  onLimitChange: J,
9716
- setSearchFilterHeight: _,
9717
+ setSearchFilterHeight: E,
9717
9718
  searchError: $e,
9718
9719
  searchVisible: K,
9719
9720
  searchValues: le
@@ -9809,18 +9810,18 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
9809
9810
  setSearchValues: F,
9810
9811
  searchTreeNameSearch: $,
9811
9812
  setSearchTreeNameSearch: R,
9812
- setResults: _,
9813
+ setResults: E,
9813
9814
  results: I,
9814
9815
  setSearchQuery: A,
9815
9816
  setTotalItems: k,
9816
- isActive: E,
9817
+ isActive: _,
9817
9818
  currentPage: M,
9818
9819
  setCurrentPage: W,
9819
9820
  order: V,
9820
9821
  setOrder: N,
9821
9822
  limit: U,
9822
9823
  setLimit: j
9823
- } = Ol({ useLocalState: !i }), { treeMaxLimit: ee } = Xt(), { setCurrentSavedSearch: B } = jt(), z = Math.min(U, ee), [K, Q] = T(!0), [de, q] = T(), [oe, se] = T([]), [G, le] = T(!1), te = a || $, Y = Z(te), ge = Z(P), be = Z(g), ve = Z(), ne = Z([]), ie = Z(!1), Te = (r == null ? void 0 : r.fields_in_conditions) !== void 0, Ee = re(() => Ja({ treeViewId: r == null ? void 0 : r.view_id, model: o }), [r == null ? void 0 : r.view_id, o]), [ke, $e] = Re(
9824
+ } = Ol({ useLocalState: !i }), { treeMaxLimit: ee } = Xt(), { setCurrentSavedSearch: B } = jt(), z = Math.min(U, ee), [K, Q] = T(!0), [de, q] = T(), [oe, se] = T([]), [G, le] = T(!1), te = a || $, Y = Z(te), ge = Z(P), we = Z(g), ve = Z(), ne = Z([]), ie = Z(!1), Te = (r == null ? void 0 : r.fields_in_conditions) !== void 0, Ee = re(() => Ja({ treeViewId: r == null ? void 0 : r.view_id, model: o }), [r == null ? void 0 : r.view_id, o]), [ke, $e] = Re(
9824
9825
  H.getHandler().parseConditions
9825
9826
  ), {
9826
9827
  fetchColumnState: me,
@@ -9856,7 +9857,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
9856
9857
  treeView: r,
9857
9858
  tableRef: l,
9858
9859
  context: d,
9859
- isActive: E,
9860
+ isActive: _,
9860
9861
  onResultsUpdated: et,
9861
9862
  treeOoui: n,
9862
9863
  updateAttributes: He,
@@ -9867,7 +9868,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
9867
9868
  autorefreshableFields: n == null ? void 0 : n.autorefreshableFields,
9868
9869
  treeView: r,
9869
9870
  context: d,
9870
- isActive: E,
9871
+ isActive: _,
9871
9872
  treeOoui: n,
9872
9873
  updateAttributes: He,
9873
9874
  results: I,
@@ -9982,7 +9983,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
9982
9983
  params: Le,
9983
9984
  name_search: te,
9984
9985
  context: d
9985
- }), _ == null || _(fe), te ? (q(fe.length), k(fe.length), le(!0), Q(!1)) : le(!1), fe.length === 0) {
9986
+ }), E == null || E(fe), te ? (q(fe.length), k(fe.length), le(!0), Q(!1)) : le(!1), fe.length === 0) {
9986
9987
  ne.current = [], q(0), k(0), se([]), m(!1);
9987
9988
  return;
9988
9989
  }
@@ -10011,7 +10012,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
10011
10012
  r,
10012
10013
  d,
10013
10014
  A,
10014
- _,
10015
+ E,
10015
10016
  He,
10016
10017
  Wt,
10017
10018
  Ne,
@@ -10074,8 +10075,8 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
10074
10075
  const Fe = !zn(
10075
10076
  P,
10076
10077
  ge.current
10077
- ), Le = be.current && !g;
10078
- Fe && (Le || f === "top") && Gt(), ge.current = P, be.current = g;
10078
+ ), Le = we.current && !g;
10079
+ Fe && (Le || f === "top") && Gt(), ge.current = P, we.current = g;
10079
10080
  }, [P, g]);
10080
10081
  const Vt = O(
10081
10082
  (Fe, Le) => {
@@ -10168,7 +10169,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
10168
10169
  ]
10169
10170
  );
10170
10171
  return {
10171
- isActive: E,
10172
+ isActive: _,
10172
10173
  searchVisible: g,
10173
10174
  searchValues: S,
10174
10175
  selectedRowKeys: at,
@@ -10309,7 +10310,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
10309
10310
  onFetchChildrenForRecord: $,
10310
10311
  childField: R
10311
10312
  }) => {
10312
- const _ = re(() => t.map((I) => ({
10313
+ const E = re(() => t.map((I) => ({
10313
10314
  ...I,
10314
10315
  render: (A, k) => /* @__PURE__ */ s(
10315
10316
  As,
@@ -10328,7 +10329,7 @@ const ql = $t(Mg), $g = Ct, Ng = (t) => {
10328
10329
  strings: n,
10329
10330
  isLoading: r,
10330
10331
  height: o,
10331
- columns: _,
10332
+ columns: E,
10332
10333
  dataSource: i,
10333
10334
  onRowDoubleClick: a,
10334
10335
  onRowSelectionChange: l,
@@ -10443,11 +10444,11 @@ function jg(t, e) {
10443
10444
  searchVisible: F,
10444
10445
  searchValues: $,
10445
10446
  selectedRowKeys: R,
10446
- refresh: _,
10447
+ refresh: E,
10447
10448
  onRowStatus: I,
10448
10449
  onGetFirstVisibleRowIndex: A,
10449
10450
  setTreeFirstVisibleRow: k,
10450
- onRowHasBeenSelected: E,
10451
+ onRowHasBeenSelected: _,
10451
10452
  onSearchFilterClear: M,
10452
10453
  onSearchFilterSubmit: W,
10453
10454
  onSideSearchFilterClose: V,
@@ -10468,7 +10469,7 @@ function jg(t, e) {
10468
10469
  limit: te,
10469
10470
  order: Y,
10470
10471
  setTreeFirstVisibleColumn: ge,
10471
- onGetFirstVisibleColumn: be,
10472
+ onGetFirstVisibleColumn: we,
10472
10473
  onSortChange: ve,
10473
10474
  isFieldLoading: ne,
10474
10475
  setSearchVisible: ie,
@@ -10493,7 +10494,7 @@ function jg(t, e) {
10493
10494
  parentContext: d
10494
10495
  }), me = _o((J) => {
10495
10496
  y != null && y.isExpandable ? $e(J) : h(J);
10496
- }), qe = _o(_), [st, Ze, et] = gs({
10497
+ }), qe = _o(E), [st, Ze, et] = gs({
10497
10498
  ooui: x,
10498
10499
  model: n,
10499
10500
  showEmptyValues: !0,
@@ -10503,7 +10504,7 @@ function jg(t, e) {
10503
10504
  ) : void 0
10504
10505
  });
10505
10506
  Ht(e, () => ({
10506
- refreshResults: _,
10507
+ refreshResults: E,
10507
10508
  getFields: () => y == null ? void 0 : y.fields
10508
10509
  }));
10509
10510
  const Se = re(() => et ? /* @__PURE__ */ s(ys, { aggregates: Ze, isLoading: st }) : null, [Ze, st, et]), tt = O(
@@ -10566,12 +10567,12 @@ function jg(t, e) {
10566
10567
  availableHeight: C,
10567
10568
  results: B,
10568
10569
  handleRowDoubleClick: me,
10569
- onRowHasBeenSelected: E,
10570
+ onRowHasBeenSelected: _,
10570
10571
  updateColumnState: G,
10571
10572
  getColumnState: se,
10572
10573
  setTreeFirstVisibleRow: k,
10573
10574
  onGetFirstVisibleRowIndex: A,
10574
- onGetFirstVisibleColumn: be,
10575
+ onGetFirstVisibleColumn: we,
10575
10576
  setTreeFirstVisibleColumn: ge,
10576
10577
  footerComp: Se,
10577
10578
  statusComp: tt,
@@ -10648,13 +10649,13 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
10648
10649
  currentSavedSearch: F,
10649
10650
  setCurrentSavedSearch: $,
10650
10651
  setSavedSearches: R,
10651
- savedSearches: _,
10652
+ savedSearches: E,
10652
10653
  setSearchVisible: I,
10653
10654
  setSearchParams: A,
10654
10655
  setSearchValues: k,
10655
- searchParams: E,
10656
+ searchParams: _,
10656
10657
  isActive: M
10657
- } = pe(It), { token: W } = Wg(), { t: V } = we(), N = Lt(
10658
+ } = pe(It), { token: W } = Wg(), { t: V } = xe(), N = Lt(
10658
10659
  wt.FEATURE_SAVED_SEARCHES
10659
10660
  ), [U] = Re(
10660
10661
  H.getHandler().searchAllIds
@@ -10704,16 +10705,16 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
10704
10705
  ce(() => {
10705
10706
  M && !B.current && N && ee(), B.current = M;
10706
10707
  }, [M]), ce(() => {
10707
- if (N && _ && _.length > 0 && E && !F) {
10708
- const oe = _.find(
10709
- (se) => zn(se.domain, E)
10708
+ if (N && E && E.length > 0 && _ && !F) {
10709
+ const oe = E.find(
10710
+ (se) => zn(se.domain, _)
10710
10711
  );
10711
10712
  oe && ($ == null || $(oe));
10712
10713
  }
10713
10714
  }, [
10714
10715
  N,
10715
- _,
10716
10716
  E,
10717
+ _,
10717
10718
  F,
10718
10719
  $
10719
10720
  ]);
@@ -10920,21 +10921,21 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
10920
10921
  limit: F,
10921
10922
  isActive: $,
10922
10923
  initialSearchParams: R,
10923
- initialCurrentPage: _,
10924
+ initialCurrentPage: E,
10924
10925
  initialOrder: I,
10925
10926
  permissions: A,
10926
10927
  permissionsLoading: k,
10927
- permissionsError: E
10928
+ permissionsError: _
10928
10929
  } = t, [M, W] = T(!1), [V, N] = T(!1), [U, j] = T(!1), [ee, B] = T(!0), [z, K] = T(!0), [Q, de] = T([]), [q, oe] = T(!1), [se, G] = T(
10929
10930
  R || []
10930
- ), [le, te] = T(!1), [Y, ge] = T(!0), [be, ve] = T(), ne = re(() => !i || i.length === 0 ? (n == null ? void 0 : n.fields) || {} : i.reduce((Ae, Tt) => ({ ...Ae, ...Tt.fields || {} }), {}), [i, n]), [ie, Te] = T(
10931
+ ), [le, te] = T(!1), [Y, ge] = T(!0), [we, ve] = T(), ne = re(() => !i || i.length === 0 ? (n == null ? void 0 : n.fields) || {} : i.reduce((Ae, Tt) => ({ ...Ae, ...Tt.fields || {} }), {}), [i, n]), [ie, Te] = T(
10931
10932
  Ha(R || [], ne)
10932
10933
  ), [Ee, ke] = T(0), [$e, me] = T(void 0), [qe, st] = T(), [Ze, et] = T(Bn), [Se, tt] = T(
10933
10934
  I
10934
10935
  ), [He, Ye] = T(
10935
10936
  F !== void 0 ? F : Ct
10936
10937
  ), [ze, Pe] = T(r), [Ne, rt] = T(
10937
- _ || 1
10938
+ E || 1
10938
10939
  ), [J, Ce] = T(null), [ue, De] = T([]);
10939
10940
  ce(() => {
10940
10941
  p && p.length > 0 && !m && (g == null || g(0), f == null || f(p[0].id));
@@ -10947,7 +10948,7 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
10947
10948
  )[0]
10948
10949
  );
10949
10950
  }, [i]), ce(() => {
10950
- (be == null ? void 0 : be.view_id) === n.view_id && i.length > 1 && ve(
10951
+ (we == null ? void 0 : we.view_id) === n.view_id && i.length > 1 && ve(
10951
10952
  i.filter(
10952
10953
  (Ae) => Ae.view_id !== n.view_id
10953
10954
  )[0]
@@ -11004,7 +11005,7 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
11004
11005
  setSearchTreeNameSearch: S,
11005
11006
  setGraphIsLoading: ge,
11006
11007
  graphIsLoading: Y,
11007
- previousView: be,
11008
+ previousView: we,
11008
11009
  setPreviousView: ve,
11009
11010
  goToResourceId: P,
11010
11011
  searchValues: ie,
@@ -11031,7 +11032,7 @@ const Ug = $t(jg), { useToken: Wg } = Xe, Bn = "legacy", qg = (t) => {
11031
11032
  setSavedSearches: De,
11032
11033
  permissions: A,
11033
11034
  permissionsLoading: k,
11034
- permissionsError: E
11035
+ permissionsError: _
11035
11036
  },
11036
11037
  children: e
11037
11038
  }
@@ -11407,7 +11408,7 @@ function Qg(t) {
11407
11408
  domain: i = [],
11408
11409
  visible: a = !0,
11409
11410
  parentContext: l = {}
11410
- } = t, [c, d] = T(!1), [f, u] = T(!1), [p, m] = T(), [g, h] = T(), [v, y] = T(), [b, w] = T(1), [C, x] = T(0), D = Z(Ct), S = Z([]), [P, F] = T(0), [$, R] = T([]), [_, I] = T(void 0), [A, k] = T(), [E, M] = T(), [W, V] = T(), [N, U] = T(!1), j = Z([]), ee = (se) => {
11411
+ } = t, [c, d] = T(!1), [f, u] = T(!1), [p, m] = T(), [g, h] = T(), [v, y] = T(), [b, w] = T(1), [C, x] = T(0), D = Z(Ct), S = Z([]), [P, F] = T(0), [$, R] = T([]), [E, I] = T(void 0), [A, k] = T(), [_, M] = T(), [W, V] = T(), [N, U] = T(!1), j = Z([]), ee = (se) => {
11411
11412
  U(!0), w(se), x((se - 1) * D.current);
11412
11413
  }, B = async () => {
11413
11414
  const se = j.current.length > 0 ? j.current : i, G = nn(S.current, se), { colors: le } = en(g), { totalItems: te, results: Y, attrsEvaluated: ge } = await H.getHandler().searchForTree({
@@ -11420,12 +11421,12 @@ function Qg(t) {
11420
11421
  attrs: le && { colors: le }
11421
11422
  });
11422
11423
  I(Vn(ge));
11423
- const be = kn({
11424
+ const we = kn({
11424
11425
  resultsToSort: Y,
11425
11426
  sorter: A,
11426
11427
  fields: { ...g.fields, ...v.fields }
11427
11428
  });
11428
- U(!1), R(be);
11429
+ U(!1), R(we);
11429
11430
  const ve = await te();
11430
11431
  F(ve);
11431
11432
  }, z = async () => {
@@ -11479,8 +11480,8 @@ function Qg(t) {
11479
11480
  model: p,
11480
11481
  treeView: g
11481
11482
  });
11482
- }, oe = () => !g || !v ? null : (E && console.error(E), /* @__PURE__ */ L("div", { style: { overflowY: "scroll" }, children: [
11483
- E && /* @__PURE__ */ s(Rt, { className: "mt-10", message: E, type: "error", banner: !0 }),
11483
+ }, oe = () => !g || !v ? null : (_ && console.error(_), /* @__PURE__ */ L("div", { style: { overflowY: "scroll" }, children: [
11484
+ _ && /* @__PURE__ */ s(Rt, { className: "mt-10", message: _, type: "error", banner: !0 }),
11484
11485
  /* @__PURE__ */ s(
11485
11486
  xr,
11486
11487
  {
@@ -11493,7 +11494,7 @@ function Qg(t) {
11493
11494
  onRequestPageChange: ee,
11494
11495
  loading: N,
11495
11496
  onRowClicked: q,
11496
- colorsForResults: _,
11497
+ colorsForResults: E,
11497
11498
  sorter: A,
11498
11499
  onChangeSort: (se) => {
11499
11500
  k == null || k(se);
@@ -11515,7 +11516,7 @@ const Kl = it(Qg), { useToken: Zg } = Xe, ey = (t) => {
11515
11516
  return /* @__PURE__ */ s(We, { ooui: e, children: n || r ? /* @__PURE__ */ s(Ir, { children: /* @__PURE__ */ s(ny, { ooui: e }) }) : /* @__PURE__ */ s(ty, { ooui: e }) });
11516
11517
  }, ty = (t) => {
11517
11518
  var y;
11518
- const { token: e } = Zg(), { ooui: n, value: r } = t, { locale: o } = we(), [i, a] = T(n.icon), [l, c] = T(n.color), [d, f] = Re(
11519
+ const { token: e } = Zg(), { ooui: n, value: r } = t, { locale: o } = xe(), [i, a] = T(n.icon), [l, c] = T(n.color), [d, f] = Re(
11519
11520
  H.getHandler().parseCondition
11520
11521
  ), u = ir(
11521
11522
  bn.FEATURE_MANY2ONE_DISABLE_ARROW_MENU
@@ -11717,7 +11718,7 @@ const Kl = it(Qg), { useToken: Zg } = Xe, ey = (t) => {
11717
11718
  });
11718
11719
  $ = [...$, ...I];
11719
11720
  }
11720
- const _ = (await C({
11721
+ const E = (await C({
11721
11722
  model: p,
11722
11723
  params: $,
11723
11724
  fieldsToRetrieve: [h],
@@ -11727,7 +11728,7 @@ const Kl = it(Qg), { useToken: Zg } = Xe, ey = (t) => {
11727
11728
  let k = A;
11728
11729
  return Array.isArray(A) && (k = A[1]), { label: k, value: I.id };
11729
11730
  });
11730
- l(_);
11731
+ l(E);
11731
11732
  } catch (R) {
11732
11733
  d(R);
11733
11734
  } finally {
@@ -11738,22 +11739,22 @@ const Kl = it(Qg), { useToken: Zg } = Xe, ey = (t) => {
11738
11739
  const R = o.map((I) => $.includes(I.id) ? I.operation === "pendingRemove" ? {
11739
11740
  ...I,
11740
11741
  operation: "pendingLink"
11741
- } : I : { id: I.id, operation: "pendingRemove" }), _ = R.map((I) => I.id);
11742
- $.filter((I) => !_.includes(I)).forEach((I) => {
11742
+ } : I : { id: I.id, operation: "pendingRemove" }), E = R.map((I) => I.id);
11743
+ $.filter((I) => !E.includes(I)).forEach((I) => {
11743
11744
  R.push({ id: I, operation: "pendingLink" });
11744
11745
  }), D(R);
11745
11746
  }, F = ($) => {
11746
- const { label: R, closable: _, onClose: I } = $, A = (M) => {
11747
+ const { label: R, closable: E, onClose: I } = $, A = (M) => {
11747
11748
  M.preventDefault(), M.stopPropagation();
11748
- }, k = mr(R), E = k && Ea(k);
11749
+ }, k = mr(R), _ = k && Ea(k);
11749
11750
  return /* @__PURE__ */ s(
11750
11751
  Rs,
11751
11752
  {
11752
11753
  color: k,
11753
11754
  onMouseDown: A,
11754
- closable: _,
11755
+ closable: E,
11755
11756
  onClose: I,
11756
- closeIcon: /* @__PURE__ */ s("span", { style: { color: E && E.text }, children: "X" }),
11757
+ closeIcon: /* @__PURE__ */ s("span", { style: { color: _ && _.text }, children: "X" }),
11757
11758
  children: R
11758
11759
  }
11759
11760
  );
@@ -12088,7 +12089,7 @@ function xy(t, e) {
12088
12089
  forcedValues: D = {},
12089
12090
  parentWidth: S,
12090
12091
  onMustRefreshParent: P
12091
- } = t, { t: F } = we(), [$, R] = T(!1), [_, I] = T(), [A, k] = T(), [E] = Ot.useForm(), [M, W] = T(), [V, N] = T(), U = pe(Jl), [j, ee] = T(), [B, z] = T(!1), K = Z(), Q = Z({}), de = Z({}), q = Z(!1), oe = Z(!1), se = Z(!1), le = (S !== void 0 ? S : j) < wy, te = pe(Qe), { activeId: Y, getPlainValues: ge } = te || {}, be = Z(!1), ve = pe(
12092
+ } = t, { t: F } = xe(), [$, R] = T(!1), [E, I] = T(), [A, k] = T(), [_] = Ot.useForm(), [M, W] = T(), [V, N] = T(), U = pe(Jl), [j, ee] = T(), [B, z] = T(!1), K = Z(), Q = Z({}), de = Z({}), q = Z(!1), oe = Z(!1), se = Z(!1), le = (S !== void 0 ? S : j) < wy, te = pe(Qe), { activeId: Y, getPlainValues: ge } = te || {}, we = Z(!1), ve = pe(
12092
12093
  It
12093
12094
  ), {
12094
12095
  setFormIsSaving: ne = void 0,
@@ -12139,18 +12140,18 @@ function xy(t, e) {
12139
12140
  }), z(!1));
12140
12141
  }, [B]), Ue(() => {
12141
12142
  var X;
12142
- if (_) {
12143
- const ae = _;
12143
+ if (E) {
12144
+ const ae = E;
12144
12145
  ae.fields && Array.isArray(ae.fields) && rt(
12145
12146
  ((X = ae.fields) == null ? void 0 : X.map((ye) => ({
12146
12147
  ...ye,
12147
12148
  type: ae.type || "error"
12148
12149
  }))) || []
12149
- ), Se(_);
12150
+ ), Se(E);
12150
12151
  }
12151
- }, [_]);
12152
- const J = (X, ae, ye, xe) => {
12153
- ie == null || ie(!1), ne == null || ne(!1), i == null || i(X, ae, ye, xe), Te == null || Te(X), be.current && (P == null || P());
12152
+ }, [E]);
12153
+ const J = (X, ae, ye, be) => {
12154
+ ie == null || ie(!1), ne == null || ne(!1), i == null || i(X, ae, ye, be), Te == null || Te(X), we.current && (P == null || P());
12154
12155
  }, Ce = (X) => {
12155
12156
  ne == null || ne(!1), d == null || d(X);
12156
12157
  }, ue = O(() => r || K.current, [r]), De = r || K.current;
@@ -12159,9 +12160,9 @@ function xy(t, e) {
12159
12160
  }
12160
12161
  function Ae() {
12161
12162
  const X = mt(), ae = Ve(), ye = {};
12162
- return Object.keys(X).forEach((xe) => {
12163
- const Me = X[xe];
12164
- ae[xe] && ae[xe].type === "many2one" && Me && Array.isArray(Me) && Me.length === 2 ? ye[xe] = Me[0] : ae[xe] && (ae[xe].type === "one2many" || ae[xe].type === "many2many") && Me && Me.items ? ye[xe] = Me.items.filter((ht) => ht.operation !== "pendingRemove").map((ht) => ht.id) : ye[xe] = Me;
12163
+ return Object.keys(X).forEach((be) => {
12164
+ const Me = X[be];
12165
+ ae[be] && ae[be].type === "many2one" && Me && Array.isArray(Me) && Me.length === 2 ? ye[be] = Me[0] : ae[be] && (ae[be].type === "one2many" || ae[be].type === "many2many") && Me && Me.items ? ye[be] = Me.items.filter((ht) => ht.operation !== "pendingRemove").map((ht) => ht.id) : ye[be] = Me;
12165
12166
  }), {
12166
12167
  ...at(),
12167
12168
  ...ye
@@ -12211,10 +12212,10 @@ function xy(t, e) {
12211
12212
  })
12212
12213
  ).length !== 0, lt = O(
12213
12214
  (X) => {
12214
- const ae = E.getFieldsValue(!0);
12215
+ const ae = _.getFieldsValue(!0);
12215
12216
  return _n(ae, X);
12216
12217
  },
12217
- [E]
12218
+ [_]
12218
12219
  ), mt = O(() => {
12219
12220
  const X = {
12220
12221
  ...lt(V),
@@ -12224,7 +12225,7 @@ function xy(t, e) {
12224
12225
  X[ae] === void 0 && delete X[ae];
12225
12226
  return X;
12226
12227
  }, [lt, at, V]), xt = O(() => {
12227
- be.current && (P == null || P()), ne == null || ne(!1), o == null || o({ id: ue(), values: mt() });
12228
+ we.current && (P == null || P()), ne == null || ne(!1), o == null || o({ id: ue(), values: mt() });
12228
12229
  }, [
12229
12230
  ue,
12230
12231
  mt,
@@ -12234,16 +12235,16 @@ function xy(t, e) {
12234
12235
  ]), Fn = (X, ae) => {
12235
12236
  Vt({
12236
12237
  values: {
12237
- ..._n(E.getFieldsValue(!0), V),
12238
+ ..._n(_.getFieldsValue(!0), V),
12238
12239
  [X]: ae
12239
12240
  },
12240
12241
  fields: V,
12241
12242
  reset: !1
12242
12243
  });
12243
- }, An = (X) => E.getFieldsValue(!0)[X];
12244
+ }, An = (X) => _.getFieldsValue(!0)[X];
12244
12245
  async function dn() {
12245
12246
  try {
12246
- return await E.validateFields(), !1;
12247
+ return await _.validateFields(), !1;
12247
12248
  } catch {
12248
12249
  return !0;
12249
12250
  }
@@ -12262,16 +12263,16 @@ function xy(t, e) {
12262
12263
  I(ae), Ee == null || Ee(!1);
12263
12264
  }
12264
12265
  }, kt = async (X) => {
12265
- let ae, ye, xe, Me;
12266
- Ee == null || Ee(!0), I(void 0), Ne(), X != null && X.fields ? (ye = X.fields, xe = X.arch) : (ye = V, xe = M), m && (X == null ? void 0 : X.forceRefresh) !== !0 ? ae = m : { values: ae, defaultGetCalled: Me } = await fn({
12266
+ let ae, ye, be, Me;
12267
+ Ee == null || Ee(!0), I(void 0), Ne(), X != null && X.fields ? (ye = X.fields, be = X.arch) : (ye = V, be = M), m && (X == null ? void 0 : X.forceRefresh) !== !0 ? ae = m : { values: ae, defaultGetCalled: Me } = await fn({
12267
12268
  fields: ye,
12268
- arch: xe
12269
+ arch: be
12269
12270
  }), b && (ae = { ...Uu(b), ...ae }), Q.current = _n(ae, ye), Vt({
12270
12271
  values: ae,
12271
12272
  fields: ye,
12272
12273
  reset: !0,
12273
12274
  isDefaultGet: Me
12274
- }), qt({ fields: ye, arch: xe, values: ae }), Ee == null || Ee(!1), ie == null || ie(!1), Me && z(!0);
12275
+ }), qt({ fields: ye, arch: be, values: ae }), Ee == null || Ee(!1), ie == null || ie(!1), Me && z(!0);
12275
12276
  }, Gt = async () => new Promise(async (X) => {
12276
12277
  Wt() ? Yn({
12277
12278
  t: F,
@@ -12300,21 +12301,21 @@ function xy(t, e) {
12300
12301
  values: X,
12301
12302
  fields: ae,
12302
12303
  reset: ye,
12303
- isDefaultGet: xe = !1
12304
+ isDefaultGet: be = !1
12304
12305
  }) => {
12305
- const ht = { ...ye ? {} : E.getFieldsValue(!0), ...X }, ao = _n(ht, ae), hc = Object.keys(ae).map((lo) => ({
12306
+ const ht = { ...ye ? {} : _.getFieldsValue(!0), ...X }, ao = _n(ht, ae), hc = Object.keys(ae).map((lo) => ({
12306
12307
  name: lo,
12307
12308
  touched: !1,
12308
12309
  value: ao[lo] !== void 0 ? ao[lo] : void 0
12309
12310
  }));
12310
- xe || (de.current = ao), E.setFields(hc);
12311
+ be || (de.current = ao), _.setFields(hc);
12311
12312
  },
12312
- [E]
12313
+ [_]
12313
12314
  ), fn = async ({
12314
12315
  fields: X,
12315
12316
  arch: ae
12316
12317
  }) => {
12317
- let ye = {}, xe = !1;
12318
+ let ye = {}, be = !1;
12318
12319
  if (ue()) {
12319
12320
  const Me = A || mn({
12320
12321
  arch: ae,
@@ -12327,7 +12328,7 @@ function xy(t, e) {
12327
12328
  fields: gy(X, Me == null ? void 0 : Me.contextForFields),
12328
12329
  context: y
12329
12330
  }))[0], v)
12330
- return { values: ye, defaultGetCalled: xe };
12331
+ return { values: ye, defaultGetCalled: be };
12331
12332
  const ht = await H.getHandler().search({
12332
12333
  params: [
12333
12334
  ["res_model", "=", n],
@@ -12339,8 +12340,8 @@ function xy(t, e) {
12339
12340
  });
12340
12341
  ke == null || ke(ht);
12341
12342
  } else
12342
- ke == null || ke([]), ye = await Ut(X), ye.id && (K.current = ye.id), xe = !0;
12343
- return { values: ye, defaultGetCalled: xe };
12343
+ ke == null || ke([]), ye = await Ut(X), ye.id && (K.current = ye.id), be = !0;
12344
+ return { values: ye, defaultGetCalled: be };
12344
12345
  }, Qt = async (X) => {
12345
12346
  const { callOnSubmitSucceed: ae = !0 } = X || {};
12346
12347
  if (ue()) {
@@ -12360,7 +12361,7 @@ function xy(t, e) {
12360
12361
  }
12361
12362
  }), Q.current = lt(V);
12362
12363
  } else {
12363
- const ye = lt(V), xe = await H.getHandler().create({
12364
+ const ye = lt(V), be = await H.getHandler().create({
12364
12365
  model: n,
12365
12366
  values: { ...ye, ...D },
12366
12367
  fields: V,
@@ -12369,7 +12370,7 @@ function xy(t, e) {
12369
12370
  ...A == null ? void 0 : A.context
12370
12371
  }
12371
12372
  });
12372
- K.current = xe, Q.current = ye;
12373
+ K.current = be, Q.current = ye;
12373
12374
  }
12374
12375
  h && await h([ue()]), !v && ae && (J == null || J(ue(), mt(), pt()));
12375
12376
  }, pn = async (X) => {
@@ -12385,8 +12386,8 @@ function xy(t, e) {
12385
12386
  pt(),
12386
12387
  se.current
12387
12388
  ), se.current = !1;
12388
- const xe = ue();
12389
- return u && (K.current = void 0, Vt({ values: {}, fields: V, reset: !0 })), { succeed: !0, id: xe };
12389
+ const be = ue();
12390
+ return u && (K.current = void 0, Vt({ values: {}, fields: V, reset: !0 })), { succeed: !0, id: be };
12390
12391
  }
12391
12392
  if (!Wt() && ue() && ye)
12392
12393
  return oe.current = !1, ie == null || ie(!1), xt == null || xt(), { succeed: !0, id: ue() };
@@ -12403,8 +12404,8 @@ function xy(t, e) {
12403
12404
  title: F("savedRegisters"),
12404
12405
  duration: 3
12405
12406
  });
12406
- } catch (xe) {
12407
- oe.current = !1, R(!1), ne == null || ne(!1), Ce == null || Ce(xe), I(xe);
12407
+ } catch (be) {
12408
+ oe.current = !1, R(!1), ne == null || ne(!1), Ce == null || Ce(be), I(be);
12408
12409
  } finally {
12409
12410
  oe.current = !1, ne == null || ne(!1), R(!1);
12410
12411
  }
@@ -12414,11 +12415,11 @@ function xy(t, e) {
12414
12415
  fields: X,
12415
12416
  arch: ae,
12416
12417
  values: ye,
12417
- operationInProgress: xe = !1
12418
+ operationInProgress: be = !1
12418
12419
  }) => {
12419
12420
  const Me = new ta(X);
12420
12421
  return Me.parse(ae, {
12421
- readOnly: f || xe,
12422
+ readOnly: f || be,
12422
12423
  values: Du(
12423
12424
  {
12424
12425
  ...ye,
@@ -12434,14 +12435,14 @@ function xy(t, e) {
12434
12435
  fields: X,
12435
12436
  arch: ae,
12436
12437
  values: ye,
12437
- operationInProgress: xe = !1
12438
+ operationInProgress: be = !1
12438
12439
  }) => {
12439
12440
  var ht;
12440
12441
  const Me = mn({
12441
12442
  arch: ae,
12442
12443
  fields: X,
12443
12444
  values: ye,
12444
- operationInProgress: xe
12445
+ operationInProgress: be
12445
12446
  });
12446
12447
  k(Me), Me.string && Me.string !== $e && (me == null || me(Me.string)), U && Me.string && ((ht = U.setTitle) == null || ht.call(U, Me.string));
12447
12448
  },
@@ -12471,8 +12472,8 @@ function xy(t, e) {
12471
12472
  "many2one"
12472
12473
  ]
12473
12474
  }) && X !== !0)) {
12474
- const xe = _n(E.getFieldsValue(!0), V);
12475
- de.current = xe, c == null || c(xe), ie == null || ie(!0), Object.keys(xe).forEach((Me) => {
12475
+ const be = _n(_.getFieldsValue(!0), V);
12476
+ de.current = be, c == null || c(be), ie == null || ie(!0), Object.keys(be).forEach((Me) => {
12476
12477
  Pe(Me);
12477
12478
  }), Le(ye);
12478
12479
  }
@@ -12505,17 +12506,17 @@ function xy(t, e) {
12505
12506
  },
12506
12507
  parentValues: ge == null ? void 0 : ge(),
12507
12508
  onChangeFieldActionArgs: ae.args
12508
- }), xe = await H.getHandler().executeOnChange({
12509
+ }), be = await H.getHandler().executeOnChange({
12509
12510
  model: n,
12510
12511
  action: ae.method,
12511
12512
  ids: ue() ? [ue()] : [],
12512
12513
  payload: ye,
12513
12514
  fields: V
12514
12515
  });
12515
- if (xe.value) {
12516
+ if (be.value) {
12516
12517
  const Me = {
12517
12518
  ...lt(V),
12518
- ...xe.value
12519
+ ...be.value
12519
12520
  }, ht = ku({
12520
12521
  values: Me,
12521
12522
  fields: V
@@ -12530,26 +12531,26 @@ function xy(t, e) {
12530
12531
  reset: !1
12531
12532
  });
12532
12533
  }
12533
- if (xe.warning && xe.warning.title && xe.warning.message && !q.current) {
12534
- const { title: Me, message: ht } = xe.warning;
12535
- q.current = !0, rt([
12534
+ if (be.warning && be.warning.title && be.warning.message && !q.current) {
12535
+ const { title: Me, message: ht } = be.warning;
12536
+ rt([
12536
12537
  {
12537
12538
  field: X,
12538
12539
  message: ht,
12539
12540
  type: "warning"
12540
12541
  }
12541
- ]), Se({
12542
+ ]), (be.warning.popup === !0 || be.warning.popup === void 0) && (q.current = !0, Se({
12542
12543
  type: "warning",
12543
12544
  title: Me,
12544
12545
  body: ht,
12545
12546
  onOk: () => {
12546
12547
  q.current = !1;
12547
12548
  }
12548
- });
12549
+ }));
12549
12550
  }
12550
- if (xe.domain && Object.keys(xe.domain).length > 0) {
12551
+ if (be.domain && Object.keys(be.domain).length > 0) {
12551
12552
  const Me = ju({
12552
- fieldsDomain: xe.domain,
12553
+ fieldsDomain: be.domain,
12553
12554
  fields: V
12554
12555
  });
12555
12556
  qt({
@@ -12578,14 +12579,14 @@ function xy(t, e) {
12578
12579
  else if (ye.type && ye.type === "ir.actions.act_window_close")
12579
12580
  J == null || J(ue(), mt(), pt());
12580
12581
  else if (ye.type) {
12581
- let xe = {};
12582
- ye.context && (xe = ln({
12582
+ let be = {};
12583
+ ye.context && (be = ln({
12583
12584
  context: ye.context,
12584
12585
  fields: V,
12585
12586
  values: mt()
12586
12587
  })), await Je({
12587
12588
  actionData: ye,
12588
- context: { ...ae, ...xe }
12589
+ context: { ...ae, ...be }
12589
12590
  });
12590
12591
  } else
12591
12592
  await kt({ forceRefresh: !0 });
@@ -12623,7 +12624,7 @@ function xy(t, e) {
12623
12624
  ...ae
12624
12625
  },
12625
12626
  onRefreshParentValues: async () => {
12626
- be.current = !0, await kt({ forceRefresh: !0 });
12627
+ we.current = !0, await kt({ forceRefresh: !0 });
12627
12628
  }
12628
12629
  })) || {};
12629
12630
  !C && ye && (J == null || J(ue(), mt(), pt()));
@@ -12681,16 +12682,16 @@ function xy(t, e) {
12681
12682
  });
12682
12683
  return;
12683
12684
  }
12684
- let xe = !1;
12685
+ let be = !1;
12685
12686
  try {
12686
- !f && (Wt() || ue() === void 0) && (xe = !0, _t(!0), p === "2many" ? (await Qt({ callOnSubmitSucceed: !1 }), se.current = !0) : await sn({ callOnSubmitSucceed: !1 }));
12687
+ !f && (Wt() || ue() === void 0) && (be = !0, _t(!0), p === "2many" ? (await Qt({ callOnSubmitSucceed: !1 }), se.current = !0) : await sn({ callOnSubmitSucceed: !1 }));
12687
12688
  const Me = se.current ? Ie() : {}, ht = { ...ye, ...Me };
12688
- X === "object" ? await fe({ action: ae, context: ht }) : X === "workflow" ? await _e({ action: ae }) : X === "action" && await ot({ action: ae, context: ht }), xe && _t(!1);
12689
+ X === "object" ? await fe({ action: ae, context: ht }) : X === "workflow" ? await _e({ action: ae }) : X === "action" && await ot({ action: ae, context: ht }), be && _t(!1);
12689
12690
  } catch (Me) {
12690
- xe && _t(!1), Se(Me);
12691
+ be && _t(!1), Se(Me);
12691
12692
  }
12692
12693
  }
12693
- const io = () => !A && !_ ? /* @__PURE__ */ s(nt, {}) : !n && !g || !w ? null : /* @__PURE__ */ s(he, { children: /* @__PURE__ */ s(
12694
+ const io = () => !A && !E ? /* @__PURE__ */ s(nt, {}) : !n && !g || !w ? null : /* @__PURE__ */ s(he, { children: /* @__PURE__ */ s(
12694
12695
  zd,
12695
12696
  {
12696
12697
  getValues: mt,
@@ -12718,7 +12719,7 @@ function xy(t, e) {
12718
12719
  children: /* @__PURE__ */ s(
12719
12720
  Ot,
12720
12721
  {
12721
- form: E,
12722
+ form: _,
12722
12723
  onFieldsChange: () => {
12723
12724
  Fe({ elementHasLostFocus: !1 });
12724
12725
  },
@@ -12806,11 +12807,11 @@ const Jn = $t(xy), Xn = (t) => {
12806
12807
  shortcut_id: h
12807
12808
  });
12808
12809
  else {
12809
- const { action_id: F, res_id: $, action_type: R, view_id: _ } = l;
12810
+ const { action_id: F, res_id: $, action_type: R, view_id: E } = l;
12810
12811
  await H.getHandler().addFavourite({
12811
12812
  action_id: F,
12812
12813
  action_type: R,
12813
- view_id: _,
12814
+ view_id: E,
12814
12815
  res_id: $ || !1
12815
12816
  });
12816
12817
  }
@@ -12866,7 +12867,7 @@ const Jn = $t(xy), Xn = (t) => {
12866
12867
  context: a = {},
12867
12868
  canCreate: l = !0
12868
12869
  }) => {
12869
- const [c, d] = T(!1), [f, u] = T([]), [p, m] = T(!1), { modalWidth: g, modalHeight: h } = Jr(), { t: v } = we(), { showErrorNotification: y } = yt(), {
12870
+ const [c, d] = T(!1), [f, u] = T([]), [p, m] = T(!1), { modalWidth: g, modalHeight: h } = Jr(), { t: v } = xe(), { showErrorNotification: y } = yt(), {
12870
12871
  treeView: b,
12871
12872
  formView: w,
12872
12873
  loading: C
@@ -12906,7 +12907,7 @@ const Jn = $t(xy), Xn = (t) => {
12906
12907
  [x]
12907
12908
  ), R = O(() => {
12908
12909
  d(!0);
12909
- }, []), _ = O(() => {
12910
+ }, []), E = O(() => {
12910
12911
  d(!1), S();
12911
12912
  }, [S]), I = O(
12912
12913
  (A) => {
@@ -12976,7 +12977,7 @@ const Jn = $t(xy), Xn = (t) => {
12976
12977
  visible: c,
12977
12978
  parentContext: a,
12978
12979
  onSubmitSucceed: I,
12979
- onCancel: _
12980
+ onCancel: E
12980
12981
  }
12981
12982
  )
12982
12983
  ] });
@@ -13059,8 +13060,8 @@ const Jn = $t(xy), Xn = (t) => {
13059
13060
  getFields: F,
13060
13061
  getContext: $,
13061
13062
  elementHasLostFocus: R,
13062
- getAllHierarchyValues: _
13063
- } = S || {}, I = Z([]), [A, k] = T([]), { showErrorNotification: E } = yt(), { permissions: M } = Vr({
13063
+ getAllHierarchyValues: E
13064
+ } = S || {}, I = Z([]), [A, k] = T([]), { showErrorNotification: _ } = yt(), { permissions: M } = Vr({
13064
13065
  model: i,
13065
13066
  permissions: ["create", "write"],
13066
13067
  enabled: !0
@@ -13093,7 +13094,7 @@ const Jn = $t(xy), Xn = (t) => {
13093
13094
  Y.length === 1 ? (D.current = void 0, ee(Y[0])) : K(D.current);
13094
13095
  }
13095
13096
  } catch (Y) {
13096
- E(Y);
13097
+ _(Y);
13097
13098
  } finally {
13098
13099
  v(!1);
13099
13100
  }
@@ -13121,7 +13122,7 @@ const Jn = $t(xy), Xn = (t) => {
13121
13122
  });
13122
13123
  ee([Y, ge[0][1]]);
13123
13124
  } catch (ge) {
13124
- E(ge);
13125
+ _(ge);
13125
13126
  } finally {
13126
13127
  v(!1);
13127
13128
  }
@@ -13131,7 +13132,7 @@ const Jn = $t(xy), Xn = (t) => {
13131
13132
  domain: d,
13132
13133
  values: Cn({
13133
13134
  fields: F(),
13134
- values: _()
13135
+ values: E()
13135
13136
  }),
13136
13137
  fields: F(),
13137
13138
  context: $()
@@ -13340,7 +13341,7 @@ const Jn = $t(xy), Xn = (t) => {
13340
13341
  model: r,
13341
13342
  toolbar: o
13342
13343
  }) => {
13343
- const { t: i } = we(), a = pe(
13344
+ const { t: i } = xe(), a = pe(
13344
13345
  Sn
13345
13346
  ), l = pe(
13346
13347
  Nt
@@ -13517,7 +13518,7 @@ function Ey(t) {
13517
13518
  formRef: w,
13518
13519
  onRefreshParentValues: C,
13519
13520
  currentId: x
13520
- } = t, { token: D } = _y(), { t: S } = we(), { activeModel: P } = is(), { permissions: F } = Vr({
13521
+ } = t, { token: D } = _y(), { t: S } = xe(), { activeModel: P } = is(), { permissions: F } = Vr({
13521
13522
  model: o,
13522
13523
  permissions: ["create", "write", "unlink"],
13523
13524
  enabled: !0
@@ -13525,7 +13526,7 @@ function Ey(t) {
13525
13526
  model: P,
13526
13527
  permissions: ["write"],
13527
13528
  enabled: !!P
13528
- }), R = (F == null ? void 0 : F.create) ?? !1, _ = (F == null ? void 0 : F.write) ?? !1, I = (F == null ? void 0 : F.unlink) ?? !1, A = ($ == null ? void 0 : $.write) ?? !1, { duplicatingItem: k, duplicate: E } = Iy({
13529
+ }), R = (F == null ? void 0 : F.create) ?? !1, E = (F == null ? void 0 : F.write) ?? !1, I = (F == null ? void 0 : F.unlink) ?? !1, A = ($ == null ? void 0 : $.write) ?? !1, { duplicatingItem: k, duplicate: _ } = Iy({
13529
13530
  currentId: a === "form" ? x : parseInt(g[0]),
13530
13531
  currentModel: o,
13531
13532
  onItemDuplicated: () => {
@@ -13548,7 +13549,7 @@ function Ey(t) {
13548
13549
  parentContext: b,
13549
13550
  selectedRowItems: g.map((oe) => ({ id: oe })),
13550
13551
  onRefreshParentValues: C
13551
- }), j = n || !R || !A, ee = n || !_, B = c === 0 || n || a !== "form" && g.length === 0 || (p ? !_ : !I || !A), z = n || k || a === "tree" && g.length !== 1 || a === "form" && (x === void 0 || x < 0) || !R || !A;
13552
+ }), j = n || !R || !A, ee = n || !E, B = c === 0 || n || a !== "form" && g.length === 0 || (p ? !E : !I || !A), z = n || k || a === "tree" && g.length !== 1 || a === "form" && (x === void 0 || x < 0) || !R || !A;
13552
13553
  return /* @__PURE__ */ L("div", { className: "flex mb-2 pt-3", children: [
13553
13554
  /* @__PURE__ */ s(rc, { title: e, token: D }),
13554
13555
  /* @__PURE__ */ L("div", { className: "flex-none h-8 pl-2", children: [
@@ -13611,7 +13612,7 @@ function Ey(t) {
13611
13612
  onClick: () => tn({
13612
13613
  confirmMessage: S("confirmDuplicate"),
13613
13614
  t: S,
13614
- onOk: async () => E()
13615
+ onOk: async () => _()
13615
13616
  })
13616
13617
  }
13617
13618
  )
@@ -13708,7 +13709,7 @@ const sc = it(
13708
13709
  onPreviousItem: n,
13709
13710
  onNextItem: r
13710
13711
  }) => {
13711
- const { t: o } = we();
13712
+ const { t: o } = xe();
13712
13713
  return /* @__PURE__ */ L(he, { children: [
13713
13714
  /* @__PURE__ */ s(zt, {}),
13714
13715
  /* @__PURE__ */ s(
@@ -13747,7 +13748,7 @@ const ic = it(
13747
13748
  onDelete: n,
13748
13749
  disabled: r
13749
13750
  }) => {
13750
- const { t: o } = we();
13751
+ const { t: o } = xe();
13751
13752
  return /* @__PURE__ */ s(Un, { count: e.length, children: /* @__PURE__ */ s(
13752
13753
  bt,
13753
13754
  {
@@ -13785,7 +13786,7 @@ const ky = (t) => {
13785
13786
  domain: g,
13786
13787
  fetchValues: h,
13787
13788
  getAllHierarchyValues: v
13788
- } = f || {}, { t: y } = we(), [b, w] = T(!1), [C, x] = T(!1), [D, S] = T(), [P, F] = T(!1), [$, R] = T(!1), [_, I] = T(), [A, k] = T([]), [E, M] = T(!1), [W, V] = T([]), [N, U] = T(), j = Z(), [ee, B] = T(void 0), z = Z(), {
13789
+ } = f || {}, { t: y } = xe(), [b, w] = T(!1), [C, x] = T(!1), [D, S] = T(), [P, F] = T(!1), [$, R] = T(!1), [E, I] = T(), [A, k] = T([]), [_, M] = T(!1), [W, V] = T([]), [N, U] = T(), j = Z(), [ee, B] = T(void 0), z = Z(), {
13789
13790
  readOnly: K,
13790
13791
  relation: Q,
13791
13792
  context: de,
@@ -13813,8 +13814,8 @@ const ky = (t) => {
13813
13814
  items: Dy(J)
13814
13815
  });
13815
13816
  }, ge = async () => {
13816
- await be(), c > G.length - 1 && c !== 0 && d(0);
13817
- }, be = async (J) => {
13817
+ await we(), c > G.length - 1 && c !== 0 && d(0);
13818
+ }, we = async (J) => {
13818
13819
  var Ce, ue, De;
13819
13820
  x(!0), w(!1), S(void 0);
13820
13821
  try {
@@ -13984,12 +13985,12 @@ const ky = (t) => {
13984
13985
  treeValues: { ...ue, id: Ae }
13985
13986
  });
13986
13987
  }
13987
- Y(Ve), E || F(!1);
13988
+ Y(Ve), _ || F(!1);
13988
13989
  }, Se = async (J) => {
13989
13990
  const { id: Ce } = J;
13990
13991
  let ue = i;
13991
13992
  const De = i.find((Ve) => Ve.id === Ce);
13992
- (De == null ? void 0 : De.values) === void 0 && (ue = await be("form")), I(ue.find((Ve) => Ve.id === Ce)), M(!1), F(!0);
13993
+ (De == null ? void 0 : De.values) === void 0 && (ue = await we("form")), I(ue.find((Ve) => Ve.id === Ce)), M(!1), F(!0);
13993
13994
  }, tt = async (J) => {
13994
13995
  x(!0);
13995
13996
  const Ce = i, ue = J.filter((De) => !i.find((Ve) => Ve.id === De));
@@ -14101,7 +14102,7 @@ const ky = (t) => {
14101
14102
  };
14102
14103
  if (D)
14103
14104
  return /* @__PURE__ */ s(Rt, { className: "mt-10", message: D, type: "error", banner: !0 });
14104
- const ze = E;
14105
+ const ze = _;
14105
14106
  return C ? /* @__PURE__ */ s(nt, {}) : /* @__PURE__ */ L(he, { children: [
14106
14107
  /* @__PURE__ */ s(
14107
14108
  ac,
@@ -14138,10 +14139,10 @@ const ky = (t) => {
14138
14139
  {
14139
14140
  formView: o.get("form"),
14140
14141
  model: Q,
14141
- id: _ == null ? void 0 : _.id,
14142
+ id: E == null ? void 0 : E.id,
14142
14143
  submitMode: "2many",
14143
- values: _ == null ? void 0 : _.values,
14144
- defaultValues: _ == null ? void 0 : _.defaultValues,
14144
+ values: E == null ? void 0 : E.values,
14145
+ defaultValues: E == null ? void 0 : E.defaultValues,
14145
14146
  visible: P,
14146
14147
  onSubmitSucceed: et,
14147
14148
  parentContext: { ...m == null ? void 0 : m(), ...de },
@@ -14263,7 +14264,7 @@ const ky = (t) => {
14263
14264
  context: n,
14264
14265
  attrs: x,
14265
14266
  treeOoui: u
14266
- }), $ = C.length < h - g && w.length > 0 ? [...C, ...w.map((_) => _.id)] : C;
14267
+ }), $ = C.length < h - g && w.length > 0 ? [...C, ...w.map((E) => E.id)] : C;
14267
14268
  return { results: $u({
14268
14269
  finalResultIds: $,
14269
14270
  fetchedItems: D,
@@ -14287,7 +14288,7 @@ const ky = (t) => {
14287
14288
  formView: o,
14288
14289
  triggerChange: i
14289
14290
  }) => {
14290
- const [a, l] = T(!1), { itemIndex: c } = pe(Tn), { t: d } = we();
14291
+ const [a, l] = T(!1), { itemIndex: c } = pe(Tn), { t: d } = xe();
14291
14292
  ce(() => {
14292
14293
  const g = t[c];
14293
14294
  (!g || (g == null ? void 0 : g.operation) === "original") && l(!1);
@@ -14364,7 +14365,7 @@ const ky = (t) => {
14364
14365
  onChange: i
14365
14366
  }, a) => {
14366
14367
  var d, f;
14367
- const { itemIndex: l } = pe(Tn), { t: c } = we();
14368
+ const { itemIndex: l } = pe(Tn), { t: c } = xe();
14368
14369
  return e.length === 0 ? c("noCurrentEntries") : /* @__PURE__ */ s(
14369
14370
  Jn,
14370
14371
  {
@@ -14399,7 +14400,7 @@ const Vy = ({
14399
14400
  selectedRowKeys: o,
14400
14401
  setSelectedRowKeys: i
14401
14402
  }) => {
14402
- const { t: a } = we(), { currentView: l, itemIndex: c, setItemIndex: d } = pe(
14403
+ const { t: a } = xe(), { currentView: l, itemIndex: c, setItemIndex: d } = pe(
14403
14404
  Tn
14404
14405
  ), { showErrorNotification: f } = yt(), u = O(async () => {
14405
14406
  const h = Ly({
@@ -14633,16 +14634,16 @@ const Hy = ({
14633
14634
  selectedRowKeys: h = [],
14634
14635
  showPointerCursorInRows: v = !0
14635
14636
  }) => {
14636
- const y = Z(), b = c || y, w = Z({}), C = Z(), x = Z(), D = Z(t), { t: S } = we(), P = Lt(
14637
+ const y = Z(), b = c || y, w = Z({}), C = Z(), x = Z(), D = Z(t), { t: S } = xe(), P = Lt(
14637
14638
  wt.FEATURE_MANY2ONE_SORT
14638
14639
  );
14639
14640
  Ue(() => {
14640
- var E, M;
14641
+ var _, M;
14641
14642
  if (D.current = t, x.current === void 0) {
14642
14643
  x.current = t;
14643
14644
  return;
14644
14645
  }
14645
- x.current = t, (E = b == null ? void 0 : b.current) == null || E.refresh(), (M = b == null ? void 0 : b.current) == null || M.unselectAll();
14646
+ x.current = t, (_ = b == null ? void 0 : b.current) == null || _.refresh(), (M = b == null ? void 0 : b.current) == null || M.unselectAll();
14646
14647
  }, [t]);
14647
14648
  const F = Jt(() => t.length, [t]), $ = Jt(() => ds(
14648
14649
  o,
@@ -14653,7 +14654,7 @@ const Hy = ({
14653
14654
  P
14654
14655
  ), [i, o, P]), R = O(
14655
14656
  async ({
14656
- startRow: E,
14657
+ startRow: _,
14657
14658
  endRow: M,
14658
14659
  state: W
14659
14660
  }) => {
@@ -14661,17 +14662,17 @@ const Hy = ({
14661
14662
  state: W
14662
14663
  }), { results: N, colors: U, status: j } = await a({
14663
14664
  allItems: D.current,
14664
- startRow: E,
14665
+ startRow: _,
14665
14666
  endRow: M,
14666
14667
  sortFields: V
14667
14668
  });
14668
14669
  return w.current = { ...w.current, ...U }, !C.current && j && (C.current = {}), j && (C.current = { ...C.current, ...j }), N;
14669
14670
  },
14670
14671
  [a]
14671
- ), _ = O((E) => {
14672
+ ), E = O((_) => {
14672
14673
  var M, W, V, N;
14673
- if (w.current[(W = (M = E.node) == null ? void 0 : M.data) == null ? void 0 : W.id])
14674
- return { color: w.current[(N = (V = E.node) == null ? void 0 : V.data) == null ? void 0 : N.id] };
14674
+ if (w.current[(W = (M = _.node) == null ? void 0 : M.data) == null ? void 0 : W.id])
14675
+ return { color: w.current[(N = (V = _.node) == null ? void 0 : V.data) == null ? void 0 : N.id] };
14675
14676
  }, []), { loading: I, getColumnState: A, updateColumnState: k } = hs({
14676
14677
  key: jy({
14677
14678
  ...m,
@@ -14688,7 +14689,7 @@ const Hy = ({
14688
14689
  onRowDoubleClick: n,
14689
14690
  showPointerCursorInRows: v,
14690
14691
  readonly: r,
14691
- onRowStyle: _,
14692
+ onRowStyle: E,
14692
14693
  onRowSelectionChange: l,
14693
14694
  onColumnChanged: k,
14694
14695
  onGetColumnsState: A,
@@ -14699,10 +14700,10 @@ const Hy = ({
14699
14700
  totalRows: F,
14700
14701
  footer: g && /* @__PURE__ */ s(ys, { aggregates: g, isLoading: !1 }),
14701
14702
  hasStatusColumn: o.status !== null,
14702
- statusComponent: (E) => /* @__PURE__ */ s(Un, { color: E, style: { marginLeft: 7 } }),
14703
- onRowStatus: (E) => {
14703
+ statusComponent: (_) => /* @__PURE__ */ s(Un, { color: _, style: { marginLeft: 7 } }),
14704
+ onRowStatus: (_) => {
14704
14705
  var M;
14705
- return (M = C.current) == null ? void 0 : M[E.id];
14706
+ return (M = C.current) == null ? void 0 : M[_.id];
14706
14707
  },
14707
14708
  strings: {
14708
14709
  resetTableViewLabel: S("resetTableView")
@@ -14742,11 +14743,11 @@ const Hy = ({
14742
14743
  }), {
14743
14744
  treeOoui: $,
14744
14745
  onTreeFetchRows: R,
14745
- selectedRowKeys: _,
14746
+ selectedRowKeys: E,
14746
14747
  setSelectedRowKeys: I,
14747
14748
  onChangeFirstVisibleRowIndex: A,
14748
14749
  onGetFirstVisibileRowIndex: k,
14749
- onSelectionCheckboxClicked: E
14750
+ onSelectionCheckboxClicked: _
14750
14751
  } = My({
14751
14752
  treeView: i.get("tree"),
14752
14753
  relation: m,
@@ -14757,7 +14758,7 @@ const Hy = ({
14757
14758
  ooui: $,
14758
14759
  model: m,
14759
14760
  items: l,
14760
- selectedRowKeys: _
14761
+ selectedRowKeys: E
14761
14762
  }), W = re(() => {
14762
14763
  const { title: me } = i.get(c) || {};
14763
14764
  return me || o.label;
@@ -14820,9 +14821,9 @@ const Hy = ({
14820
14821
  items: l,
14821
14822
  triggerChange: N,
14822
14823
  setFormHasChanges: B,
14823
- selectedRowKeys: _,
14824
+ selectedRowKeys: E,
14824
14825
  setSelectedRowKeys: I
14825
- }), be = () => {
14826
+ }), we = () => {
14826
14827
  const me = Array.from(i.keys()), qe = me[(me.indexOf(c) + 1) % me.length];
14827
14828
  c === "form" ? ee(() => {
14828
14829
  d(qe);
@@ -14868,11 +14869,11 @@ const Hy = ({
14868
14869
  currentItemIndex: f,
14869
14870
  onDelete: ge,
14870
14871
  onCreateItem: oe,
14871
- onToggleViewMode: be,
14872
+ onToggleViewMode: we,
14872
14873
  onPreviousItem: ne,
14873
14874
  onNextItem: ie,
14874
14875
  onSearchItem: Y,
14875
- selectedRowKeys: _,
14876
+ selectedRowKeys: E,
14876
14877
  showCreateButton: S,
14877
14878
  showToggleButton: D,
14878
14879
  toolbar: ($e = i.get(c)) == null ? void 0 : $e.toolbar,
@@ -14900,8 +14901,8 @@ const Hy = ({
14900
14901
  relation: m,
14901
14902
  onChangeFirstVisibleRowIndex: A,
14902
14903
  onGetFirstVisibleRowIndex: k,
14903
- selectedRowKeys: _,
14904
- onSelectionCheckboxClicked: E,
14904
+ selectedRowKeys: E,
14905
+ onSelectionCheckboxClicked: _,
14905
14906
  dataForHash: {
14906
14907
  parentViewId: t.parentViewId,
14907
14908
  treeViewId: t.treeViewId,
@@ -15116,7 +15117,7 @@ const Hy = ({
15116
15117
  ) });
15117
15118
  };
15118
15119
  function cc(t) {
15119
- const { ooui: e, showLabel: n = !0, responsiveBehaviour: r } = t, o = Pt(e.icon || ""), { t: i } = we(), a = e.backgroundColor, l = a ? Rd(a).darken(30).toString() : void 0, c = (e.label || o) && n;
15120
+ const { ooui: e, showLabel: n = !0, responsiveBehaviour: r } = t, o = Pt(e.icon || ""), { t: i } = xe(), a = e.backgroundColor, l = a ? Rd(a).darken(30).toString() : void 0, c = (e.label || o) && n;
15120
15121
  return /* @__PURE__ */ s(
15121
15122
  "div",
15122
15123
  {
@@ -15245,7 +15246,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
15245
15246
  fetchValues: c,
15246
15247
  formHasChanges: d,
15247
15248
  elementHasLostFocus: f
15248
- } = i || {}, [u, p] = T(!1), { t: m } = we();
15249
+ } = i || {}, [u, p] = T(!1), { t: m } = xe();
15249
15250
  return a ? /* @__PURE__ */ L(he, { children: [
15250
15251
  /* @__PURE__ */ s(
15251
15252
  "div",
@@ -15336,7 +15337,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
15336
15337
  limit: o,
15337
15338
  onClose: i
15338
15339
  }) => {
15339
- const a = Z({}), l = Z(/* @__PURE__ */ new Map()), { t: c } = we(), d = O(
15340
+ const a = Z({}), l = Z(/* @__PURE__ */ new Map()), { t: c } = xe(), d = O(
15340
15341
  async (v) => {
15341
15342
  if (v.selectedKeys === void 0 || v.selectedKeys.length === 0) {
15342
15343
  yn(c("selectAtLeastOneField"));
@@ -15696,7 +15697,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
15696
15697
  const { ooui: e } = t, { required: n } = e;
15697
15698
  return /* @__PURE__ */ s(We, { required: n, ...t, children: /* @__PURE__ */ s(Fv, { ooui: e }) });
15698
15699
  }, Fv = (t) => {
15699
- const { ooui: e, value: n, onChange: r } = t, { readOnly: o, required: i, filenameField: a } = e, { token: l } = Sv(), c = i && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, d = Z(null), { setFieldValue: f, getFieldValue: u } = pe(Qe) || {}, { t: p } = we(), m = n ? Fu(n) : "", g = (w) => {
15700
+ const { ooui: e, value: n, onChange: r } = t, { readOnly: o, required: i, filenameField: a } = e, { token: l } = Sv(), c = i && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, d = Z(null), { setFieldValue: f, getFieldValue: u } = pe(Qe) || {}, { t: p } = xe(), m = n ? Fu(n) : "", g = (w) => {
15700
15701
  r == null || r(w);
15701
15702
  };
15702
15703
  async function h() {
@@ -15779,7 +15780,7 @@ const { useToken: rv } = Xe, { TextArea: qo } = ft, ov = (t) => {
15779
15780
  onOpenAttachmentLink: i,
15780
15781
  onOpenAttachmentDetail: a,
15781
15782
  onListAllAttachments: l
15782
- } = t, { t: c } = we(), d = Z(null), f = /* @__PURE__ */ L(je, { children: [
15783
+ } = t, { t: c } = xe(), d = Z(null), f = /* @__PURE__ */ L(je, { children: [
15783
15784
  /* @__PURE__ */ s(Vs, {}),
15784
15785
  `(${e})`,
15785
15786
  /* @__PURE__ */ s(ur, { style: { fontSize: 12 } })
@@ -15875,7 +15876,7 @@ function Rv(t) {
15875
15876
  onAddNewAttachment: r,
15876
15877
  onListAllAttachments: o,
15877
15878
  onViewAttachmentDetails: i
15878
- } = t, { formRef: a } = pe(It), [l, c] = T(!1), [d, f] = T([]), [u, p] = T(!1), { t: m } = we(), { showErrorNotification: g } = yt(), h = O(async () => {
15879
+ } = t, { formRef: a } = pe(It), [l, c] = T(!1), [d, f] = T([]), [u, p] = T(!1), { t: m } = xe(), { showErrorNotification: g } = yt(), h = O(async () => {
15879
15880
  if (!(!e || e.length === 0)) {
15880
15881
  c(!0);
15881
15882
  try {
@@ -16045,7 +16046,7 @@ const Iv = () => {
16045
16046
  function _v({ toolbar: t }) {
16046
16047
  const e = pe(
16047
16048
  Nt
16048
- ), { t: n } = we(), { onNextClick: r, onPreviousClick: o } = Iv(), { showErrorNotification: i } = yt(), {
16049
+ ), { t: n } = xe(), { onNextClick: r, onPreviousClick: o } = Iv(), { showErrorNotification: i } = yt(), {
16049
16050
  availableViews: a,
16050
16051
  currentView: l,
16051
16052
  setCurrentView: c,
@@ -16068,11 +16069,11 @@ function _v({ toolbar: t }) {
16068
16069
  formRef: F,
16069
16070
  setFormHasChanges: $,
16070
16071
  previousView: R,
16071
- setPreviousView: _,
16072
+ setPreviousView: E,
16072
16073
  goToResourceId: I,
16073
16074
  isActive: A,
16074
16075
  permissions: k
16075
- } = jt(), { openDefaultActionForModel: E } = e || {}, M = re(
16076
+ } = jt(), { openDefaultActionForModel: _ } = e || {}, M = re(
16076
16077
  () => u || w || S || C,
16077
16078
  [u, w, S, C]
16078
16079
  ), W = O(
@@ -16140,36 +16141,36 @@ function _v({ toolbar: t }) {
16140
16141
  i
16141
16142
  ]), z = O(
16142
16143
  (q) => {
16143
- _ == null || _(l), $ == null || $(!1), c == null || c(q);
16144
+ E == null || E(l), $ == null || $(!1), c == null || c(q);
16144
16145
  },
16145
- [l, _, $, c]
16146
+ [l, E, $, c]
16146
16147
  ), K = O(async () => {
16147
16148
  const q = await $n({ onFormSave: d });
16148
- q.succeed && (E == null || E({
16149
+ q.succeed && (_ == null || _({
16149
16150
  ...Hi(
16150
16151
  y,
16151
16152
  q.currentId
16152
16153
  ),
16153
16154
  initialViewType: "form"
16154
16155
  }));
16155
- }, [y, d, E]), Q = O(async () => {
16156
+ }, [y, d, _]), Q = O(async () => {
16156
16157
  const q = await $n({ onFormSave: d });
16157
- q.succeed && (E == null || E({
16158
+ q.succeed && (_ == null || _({
16158
16159
  ...Hi(
16159
16160
  y,
16160
16161
  q.currentId
16161
16162
  ),
16162
16163
  initialViewType: "tree"
16163
16164
  }));
16164
- }, [y, d, E]), de = O(
16165
+ }, [y, d, _]), de = O(
16165
16166
  async (q) => {
16166
- (await $n({ onFormSave: d })).succeed && (E == null || E({
16167
+ (await $n({ onFormSave: d })).succeed && (_ == null || _({
16167
16168
  model: "ir.attachment",
16168
16169
  res_id: q.id,
16169
16170
  initialViewType: "form"
16170
16171
  }));
16171
16172
  },
16172
- [d, E]
16173
+ [d, _]
16173
16174
  );
16174
16175
  return gn(
16175
16176
  "pagedown",
@@ -16193,14 +16194,14 @@ function _v({ toolbar: t }) {
16193
16194
  ), gn(
16194
16195
  "ctrl+l,command+l",
16195
16196
  async () => {
16196
- !A || !R || !await F.current.cancelUnsavedChanges() || (_ == null || _(l), c == null || c(R));
16197
+ !A || !R || !await F.current.cancelUnsavedChanges() || (E == null || E(l), c == null || c(R));
16197
16198
  },
16198
16199
  { enableOnFormTags: !0, preventDefault: !0 },
16199
16200
  [
16200
16201
  A,
16201
16202
  R,
16202
16203
  l,
16203
- _,
16204
+ E,
16204
16205
  c,
16205
16206
  F
16206
16207
  ]
@@ -16315,7 +16316,7 @@ const Ev = it(_v), fc = it(
16315
16316
  onNextClick: n,
16316
16317
  tryAction: r
16317
16318
  }) => {
16318
- const { t: o } = we();
16319
+ const { t: o } = xe();
16319
16320
  return /* @__PURE__ */ L(ct, { children: [
16320
16321
  /* @__PURE__ */ s(
16321
16322
  At,
@@ -16423,7 +16424,7 @@ const Hi = (t, e) => ({
16423
16424
  }
16424
16425
  ) });
16425
16426
  }, Pv = (t) => {
16426
- const { visible: e, onIdSubmitted: n, onCancel: r, isSearching: o } = t, { t: i } = we(), a = Z(null), l = Z(!1);
16427
+ const { visible: e, onIdSubmitted: n, onCancel: r, isSearching: o } = t, { t: i } = xe(), a = Z(null), l = Z(!1);
16427
16428
  function c(d) {
16428
16429
  const f = d.id.split(",").map((u) => parseInt(u.trim()));
16429
16430
  n(f, l.current), l.current = !1;
@@ -16506,7 +16507,7 @@ const Hi = (t, e) => ({
16506
16507
  );
16507
16508
  };
16508
16509
  function Mv({ refreshGraph: t }) {
16509
- const { t: e } = we(), {
16510
+ const { t: e } = xe(), {
16510
16511
  availableViews: n,
16511
16512
  currentView: r,
16512
16513
  setCurrentView: o,
@@ -16595,11 +16596,11 @@ const $v = (t) => {
16595
16596
  limit: F,
16596
16597
  setLimit: $,
16597
16598
  searchParams: R,
16598
- searchValues: _,
16599
+ searchValues: E,
16599
16600
  setSearchValues: I,
16600
16601
  currentView: A,
16601
16602
  totalItems: k,
16602
- searchTreeNameSearch: E
16603
+ searchTreeNameSearch: _
16603
16604
  } = u || {}, [M, W] = T(!0), [V, N] = T(!0), [U, j] = T();
16604
16605
  ce(() => {
16605
16606
  n && N(!0);
@@ -16611,7 +16612,7 @@ const $v = (t) => {
16611
16612
  if (!n)
16612
16613
  return;
16613
16614
  const te = await H.getHandler().searchAllIds({
16614
- params: E ? i : ee,
16615
+ params: _ ? i : ee,
16615
16616
  model: r,
16616
16617
  context: o,
16617
16618
  totalItems: k
@@ -16619,7 +16620,7 @@ const $v = (t) => {
16619
16620
  j(te);
16620
16621
  }, [
16621
16622
  n,
16622
- E,
16623
+ _,
16623
16624
  i,
16624
16625
  ee,
16625
16626
  r,
@@ -16640,7 +16641,7 @@ const $v = (t) => {
16640
16641
  z();
16641
16642
  }, [
16642
16643
  n,
16643
- E,
16644
+ _,
16644
16645
  i,
16645
16646
  ee,
16646
16647
  k,
@@ -16714,7 +16715,7 @@ const $v = (t) => {
16714
16715
  },
16715
16716
  searchError: q,
16716
16717
  searchVisible: b,
16717
- searchValues: _,
16718
+ searchValues: E,
16718
16719
  showLimitOptions: !1
16719
16720
  }
16720
16721
  ),
@@ -16786,7 +16787,7 @@ const $v = (t) => {
16786
16787
  );
16787
16788
  };
16788
16789
  function Lv() {
16789
- const { isLoading: t, dashboardRef: e, moveItemsEnabled: n, setMoveItemsEnabled: r } = pe(Ds), { permissions: o } = jt(), { t: i } = we();
16790
+ const { isLoading: t, dashboardRef: e, moveItemsEnabled: n, setMoveItemsEnabled: r } = pe(Ds), { permissions: o } = jt(), { t: i } = xe();
16790
16791
  return /* @__PURE__ */ L(ct, { wrap: !0, children: [
16791
16792
  (o == null ? void 0 : o.write) && /* @__PURE__ */ s(
16792
16793
  At,
@@ -16929,9 +16930,9 @@ function Wv(t, e) {
16929
16930
  initialSearchParams: y = [],
16930
16931
  currentPage: b,
16931
16932
  order: w
16932
- } = t, [C, x] = T(), [D, S] = T([]), [P, F] = T(!0), $ = p || void 0, [R, _] = T(
16933
+ } = t, [C, x] = T(), [D, S] = T([]), [P, F] = T(!0), $ = p || void 0, [R, E] = T(
16933
16934
  $
16934
- ), [I, A] = T([]), [k, E] = T(), [M, W] = T([]), [V, N] = T(), [U, j] = T(), [ee, B] = T(!1), [z, K] = T(!1), [Q, de] = T(), { t: q } = we(), { showErrorNotification: oe } = yt(), {
16935
+ ), [I, A] = T([]), [k, _] = T(), [M, W] = T([]), [V, N] = T(), [U, j] = T(), [ee, B] = T(!1), [z, K] = T(!1), [Q, de] = T(), { t: q } = xe(), { showErrorNotification: oe } = yt(), {
16935
16936
  permissions: se,
16936
16937
  loading: G,
16937
16938
  error: le
@@ -16942,7 +16943,7 @@ function Wv(t, e) {
16942
16943
  }), te = Z(), Y = Z(), ge = pe(
16943
16944
  Nt
16944
16945
  ), {
16945
- setCurrentView: be,
16946
+ setCurrentView: we,
16946
16947
  setCurrentId: ve,
16947
16948
  tabs: ne,
16948
16949
  activeKey: ie,
@@ -16958,13 +16959,13 @@ function Wv(t, e) {
16958
16959
  [ie, ne, C, k, M]
16959
16960
  );
16960
16961
  function ke(Se) {
16961
- _(Se), ve == null || ve(Se);
16962
+ E(Se), ve == null || ve(Se);
16962
16963
  }
16963
16964
  const $e = O(
16964
16965
  (Se) => {
16965
- x(Se), be == null || be(Se);
16966
+ x(Se), we == null || we(Se);
16966
16967
  },
16967
- [be]
16968
+ [we]
16968
16969
  );
16969
16970
  Ht(e, () => ({
16970
16971
  canWeClose: qe
@@ -17081,12 +17082,12 @@ Please, make sure the view ids on the fields_view_get responses are the same as
17081
17082
  ]);
17082
17083
  l({ tabKey: c, canWeClose: qe }), Ue(() => {
17083
17084
  const Se = D.find((He) => He.type === "tree"), tt = D.find((He) => d.id ? He.type === d.type && He.view_id === d.id : He.type === d.type);
17084
- $e(tt || Se), p ? ve == null || ve($) : (ke(void 0), E(void 0)), me();
17085
+ $e(tt || Se), p ? ve == null || ve($) : (ke(void 0), _(void 0)), me();
17085
17086
  }, [r, i, p]), Ue(() => {
17086
17087
  if (ie === c) {
17087
17088
  ve == null || ve(R);
17088
17089
  const Se = { action_id: m, action_type: g };
17089
- be == null || be({ ...C, extra: Se });
17090
+ we == null || we({ ...C, extra: Se });
17090
17091
  }
17091
17092
  }, [ne, ie]), ce(() => {
17092
17093
  le && oe({
@@ -17174,7 +17175,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
17174
17175
  onNewClicked: et,
17175
17176
  currentId: R,
17176
17177
  setCurrentId: ke,
17177
- setCurrentItemIndex: E,
17178
+ setCurrentItemIndex: _,
17178
17179
  currentItemIndex: k,
17179
17180
  results: M,
17180
17181
  setResults: W,
@@ -17210,7 +17211,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
17210
17211
  formDefaultValues: f,
17211
17212
  results: M,
17212
17213
  setResults: W,
17213
- setCurrentItemIndex: E,
17214
+ setCurrentItemIndex: _,
17214
17215
  formForcedValues: u,
17215
17216
  limit: v,
17216
17217
  searchTreeRef: Y,
@@ -17373,16 +17374,16 @@ function zv(t, e) {
17373
17374
  async function x() {
17374
17375
  d(!0), p(!0), u(void 0);
17375
17376
  try {
17376
- const _ = await D(), I = await P(_), A = _.fields[Eo].relation, k = I[Eo].items;
17377
- v.current = _.fields;
17378
- const E = await S({
17377
+ const E = await D(), I = await P(E), A = E.fields[Eo].relation, k = I[Eo].items;
17378
+ v.current = E.fields;
17379
+ const _ = await S({
17379
17380
  items: k,
17380
17381
  model: A,
17381
17382
  context: r
17382
- }), M = await F(E);
17383
+ }), M = await F(_);
17383
17384
  u(void 0), l(M), d(!1), p(!1);
17384
- } catch (_) {
17385
- u(JSON.stringify(_));
17385
+ } catch (E) {
17386
+ u(JSON.stringify(E));
17386
17387
  }
17387
17388
  }
17388
17389
  async function D() {
@@ -17393,7 +17394,7 @@ function zv(t, e) {
17393
17394
  });
17394
17395
  }
17395
17396
  async function S({
17396
- items: _,
17397
+ items: E,
17397
17398
  model: I,
17398
17399
  context: A
17399
17400
  }) {
@@ -17410,26 +17411,26 @@ function zv(t, e) {
17410
17411
  fields: h.current
17411
17412
  },
17412
17413
  model: I,
17413
- items: _,
17414
+ items: E,
17414
17415
  context: A,
17415
17416
  currentView: "form"
17416
17417
  });
17417
17418
  return k;
17418
17419
  }
17419
- async function P(_) {
17420
+ async function P(E) {
17420
17421
  return (await b({
17421
17422
  model: n,
17422
17423
  ids: [o],
17423
- fields: _.fields,
17424
+ fields: E.fields,
17424
17425
  context: r
17425
17426
  }))[0];
17426
17427
  }
17427
- async function F(_) {
17428
+ async function F(E) {
17428
17429
  const I = [];
17429
- for (const k of _) {
17430
- const { values: E } = k;
17431
- if (E.action_id && E.action_id.length > 0) {
17432
- const M = parseInt(E.action_id[0], 10), W = ka({
17430
+ for (const k of E) {
17431
+ const { values: _ } = k;
17432
+ if (_.action_id && _.action_id.length > 0) {
17433
+ const M = parseInt(_.action_id[0], 10), W = ka({
17433
17434
  actionId: M,
17434
17435
  rootContext: r
17435
17436
  }).then((V) => ({ ...k, actionData: V }));
@@ -17438,10 +17439,10 @@ function zv(t, e) {
17438
17439
  }
17439
17440
  return await Promise.all(I);
17440
17441
  }
17441
- async function $(_) {
17442
+ async function $(E) {
17442
17443
  if (!g)
17443
17444
  return;
17444
- const I = _.filter((M) => {
17445
+ const I = E.filter((M) => {
17445
17446
  const W = a.find(
17446
17447
  (N) => N.id === M.id
17447
17448
  );
@@ -17469,14 +17470,14 @@ function zv(t, e) {
17469
17470
  position: JSON.stringify(W).replace(/"/g, "'")
17470
17471
  }
17471
17472
  };
17472
- }), E = {
17473
+ }), _ = {
17473
17474
  fields: h.current,
17474
17475
  items: k
17475
17476
  };
17476
17477
  await w({
17477
17478
  model: n,
17478
17479
  id: o,
17479
- values: { [Eo]: E },
17480
+ values: { [Eo]: _ },
17480
17481
  fields: v.current,
17481
17482
  context: r
17482
17483
  });
@@ -17484,8 +17485,8 @@ function zv(t, e) {
17484
17485
  async function R() {
17485
17486
  m(i);
17486
17487
  }
17487
- return c ? /* @__PURE__ */ s(Bt, {}) : f ? (console.error(f), /* @__PURE__ */ s(Rt, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 })) : /* @__PURE__ */ s(Yv, { onPositionItemsChanged: $, children: a.map((_, I) => {
17488
- const { actionData: A, values: k } = _, { position: E, id: M } = k, {
17488
+ return c ? /* @__PURE__ */ s(Bt, {}) : f ? (console.error(f), /* @__PURE__ */ s(Rt, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 })) : /* @__PURE__ */ s(Yv, { onPositionItemsChanged: $, children: a.map((E, I) => {
17489
+ const { actionData: A, values: k } = E, { position: _, id: M } = k, {
17489
17490
  actionId: W,
17490
17491
  actionType: V,
17491
17492
  key: N,
@@ -17500,7 +17501,7 @@ function zv(t, e) {
17500
17501
  } = A;
17501
17502
  let q = {};
17502
17503
  try {
17503
- q = JSON.parse(E.replace(/'/g, '"'));
17504
+ q = JSON.parse(_.replace(/'/g, '"'));
17504
17505
  } catch {
17505
17506
  q = { x: I * 2, y: 0, w: 2, h: 3 };
17506
17507
  }
@@ -17538,12 +17539,12 @@ function zv(t, e) {
17538
17539
  });
17539
17540
  if (te) {
17540
17541
  const [Y, ge] = te, {
17541
- actionId: be,
17542
+ actionId: we,
17542
17543
  actionType: ve,
17543
17544
  title: ne,
17544
17545
  model: ie
17545
17546
  } = A, Te = {
17546
- action_id: be,
17547
+ action_id: we,
17547
17548
  action_type: ve,
17548
17549
  name: ne,
17549
17550
  res_id: le.id,
@@ -17587,13 +17588,13 @@ function zv(t, e) {
17587
17588
  const [le, te] = G, {
17588
17589
  actionId: Y,
17589
17590
  actionType: ge,
17590
- title: be,
17591
+ title: we,
17591
17592
  model: ve
17592
17593
  } = A;
17593
17594
  se = {
17594
17595
  action_id: Y,
17595
17596
  action_type: ge,
17596
- name: be,
17597
+ name: we,
17597
17598
  res_id: !1,
17598
17599
  res_model: ve,
17599
17600
  view_id: le,
@@ -17651,9 +17652,9 @@ const Kv = $t(zv), Jv = (t) => {
17651
17652
  fieldsToRetrieve: [h],
17652
17653
  context: { ...b == null ? void 0 : b(), ...m }
17653
17654
  })).map((R) => {
17654
- const _ = R[h];
17655
- let I = _;
17656
- return Array.isArray(_) && (I = _[1]), { label: I, value: R.id };
17655
+ const E = R[h];
17656
+ let I = E;
17657
+ return Array.isArray(E) && (I = E[1]), { label: I, value: R.id };
17657
17658
  });
17658
17659
  l($);
17659
17660
  } catch (F) {
@@ -17855,7 +17856,7 @@ function pb({ text: t }) {
17855
17856
  ] }, r)) });
17856
17857
  }
17857
17858
  const mb = (t) => {
17858
- const { data: e, style: n } = t, { t: r } = we();
17859
+ const { data: e, style: n } = t, { t: r } = xe();
17859
17860
  return /* @__PURE__ */ L(Jo, { style: { ...n, textAlign: "start" }, children: [
17860
17861
  /* @__PURE__ */ s(
17861
17862
  db,
@@ -17973,11 +17974,11 @@ const mb = (t) => {
17973
17974
  );
17974
17975
  }, { Content: Fb } = qi, { Title: Ab } = on;
17975
17976
  function Rb() {
17976
- const { t } = we();
17977
+ const { t } = xe();
17977
17978
  return /* @__PURE__ */ s(Fb, { className: "m-5 select-none", children: /* @__PURE__ */ s(Ab, { level: 5, children: t("welcome") }) });
17978
17979
  }
17979
17980
  function Ib(t, e) {
17980
- const { children: n } = t, [r, o] = T("welcome"), { t: i } = we(), { showErrorNotification: a } = yt(), { globalValues: l, rootContext: c } = Xt(), d = Zr(
17981
+ const { children: n } = t, [r, o] = T("welcome"), { t: i } = xe(), { showErrorNotification: a } = yt(), { globalValues: l, rootContext: c } = Xt(), d = Zr(
17981
17982
  wt.FEATURE_LOGGABLE_ACTIONS
17982
17983
  ), [f, u] = Re(
17983
17984
  H.getHandler().logAction
@@ -18000,7 +18001,7 @@ function Ib(t, e) {
18000
18001
  processAction: h.current.processAction,
18001
18002
  handleOpenActionUrl: C,
18002
18003
  handleOpenActionResourceUrl: x,
18003
- handleOpenModelAndViews: _
18004
+ handleOpenModelAndViews: E
18004
18005
  }));
18005
18006
  function v(I) {
18006
18007
  if (I === r) {
@@ -18011,14 +18012,14 @@ function Ib(t, e) {
18011
18012
  }
18012
18013
  const y = O(
18013
18014
  (I, A) => {
18014
- const k = [...p], [E] = k.splice(I, 1);
18015
- k.splice(A, 0, E), m(k);
18015
+ const k = [...p], [_] = k.splice(I, 1);
18016
+ k.splice(A, 0, _), m(k);
18016
18017
  },
18017
18018
  [p]
18018
18019
  ), b = O((I, A) => {
18019
18020
  m(
18020
18021
  (k) => k.map(
18021
- (E) => E.key === I ? { ...E, title: A } : E
18022
+ (_) => _.key === I ? { ..._, title: A } : _
18022
18023
  )
18023
18024
  );
18024
18025
  }, []);
@@ -18029,7 +18030,7 @@ function Ib(t, e) {
18029
18030
  g.current.set(I, A);
18030
18031
  }
18031
18032
  async function C(I) {
18032
- const { actionRawData: A, res_id: k, limit: E } = I, M = await H.getHandler().getFields({
18033
+ const { actionRawData: A, res_id: k, limit: _ } = I, M = await H.getHandler().getFields({
18033
18034
  model: I.model,
18034
18035
  context: c
18035
18036
  });
@@ -18065,7 +18066,7 @@ function Ib(t, e) {
18065
18066
  })();
18066
18067
  R({
18067
18068
  ...I,
18068
- limit: E,
18069
+ limit: _,
18069
18070
  context: { ...c, ...N },
18070
18071
  domain: U,
18071
18072
  actionRawData: {
@@ -18080,7 +18081,7 @@ function Ib(t, e) {
18080
18081
  view_id: A,
18081
18082
  res_id: k
18082
18083
  }) {
18083
- const E = await H.getHandler().getView({
18084
+ const _ = await H.getHandler().getView({
18084
18085
  model: I,
18085
18086
  id: A || void 0,
18086
18087
  type: "form",
@@ -18090,12 +18091,12 @@ function Ib(t, e) {
18090
18091
  action_id: -1,
18091
18092
  action_type: "ir.actions.act_window",
18092
18093
  model: I,
18093
- views: [[E.view_id, "form"]],
18094
+ views: [[_.view_id, "form"]],
18094
18095
  context: c,
18095
18096
  domain: [],
18096
- title: E.title || I,
18097
+ title: _.title || I,
18097
18098
  target: "current",
18098
- initialView: { id: E.view_id, type: "form" },
18099
+ initialView: { id: _.view_id, type: "form" },
18099
18100
  res_id: k
18100
18101
  });
18101
18102
  }
@@ -18103,7 +18104,7 @@ function Ib(t, e) {
18103
18104
  action: I,
18104
18105
  values: A,
18105
18106
  forced_values: k,
18106
- initialViewType: E,
18107
+ initialViewType: _,
18107
18108
  res_id: M,
18108
18109
  domain: W = [],
18109
18110
  context: V = {}
@@ -18130,8 +18131,8 @@ function Ib(t, e) {
18130
18131
  values: l,
18131
18132
  context: { ...c, ...z, ...V }
18132
18133
  }) : [];
18133
- } catch (be) {
18134
- return console.error(be), [];
18134
+ } catch (we) {
18135
+ return console.error(we), [];
18135
18136
  }
18136
18137
  })(), {
18137
18138
  res_model: de,
@@ -18141,10 +18142,10 @@ function Ib(t, e) {
18141
18142
  view_type: G,
18142
18143
  limit: le
18143
18144
  } = N, te = G === "tree", Y = [];
18144
- for (const be of q) {
18145
- const [ve, ne] = be;
18145
+ for (const we of q) {
18146
+ const [ve, ne] = we;
18146
18147
  if (ve)
18147
- Y.push(be);
18148
+ Y.push(we);
18148
18149
  else if (ne === "dashboard")
18149
18150
  Y.push([void 0, "dashboard"]);
18150
18151
  else {
@@ -18158,14 +18159,14 @@ function Ib(t, e) {
18158
18159
  }
18159
18160
  }
18160
18161
  let ge;
18161
- if (E) {
18162
- const [be, ve] = Y.find(
18163
- ([ne, ie]) => ie === E
18162
+ if (_) {
18163
+ const [we, ve] = Y.find(
18164
+ ([ne, ie]) => ie === _
18164
18165
  );
18165
- ge = { id: be, type: ve };
18166
+ ge = { id: we, type: ve };
18166
18167
  } else {
18167
- const [be, ve] = Y[0];
18168
- ge = { id: be, type: ve };
18168
+ const [we, ve] = Y[0];
18169
+ ge = { id: we, type: ve };
18169
18170
  }
18170
18171
  R({
18171
18172
  domain: [...Q, ...W],
@@ -18192,7 +18193,7 @@ function Ib(t, e) {
18192
18193
  title: I,
18193
18194
  content: A,
18194
18195
  key: k,
18195
- action: E
18196
+ action: _
18196
18197
  }) {
18197
18198
  let M = [...p];
18198
18199
  p.length === 1 && p[0].key === "welcome" && (M = [...p.filter((W) => W.key !== "welcome")]), m([
@@ -18202,7 +18203,7 @@ function Ib(t, e) {
18202
18203
  key: k,
18203
18204
  closable: !0,
18204
18205
  content: A,
18205
- action: E
18206
+ action: _
18206
18207
  }
18207
18208
  ]), o(k);
18208
18209
  }
@@ -18210,7 +18211,7 @@ function Ib(t, e) {
18210
18211
  relateData: I,
18211
18212
  fields: A,
18212
18213
  values: k,
18213
- action_id: E,
18214
+ action_id: _,
18214
18215
  action_type: M
18215
18216
  }) {
18216
18217
  const {
@@ -18241,7 +18242,7 @@ function Ib(t, e) {
18241
18242
  domain: se,
18242
18243
  title: ee,
18243
18244
  initialView: Q,
18244
- action_id: E,
18245
+ action_id: _,
18245
18246
  action_type: M,
18246
18247
  limit: B,
18247
18248
  actionRawData: {
@@ -18256,7 +18257,7 @@ function Ib(t, e) {
18256
18257
  const {
18257
18258
  action_id: A,
18258
18259
  action_type: k,
18259
- res_id: E,
18260
+ res_id: _,
18260
18261
  view_id: M,
18261
18262
  overrideUnsettedLimit: W = !1,
18262
18263
  values: V = {},
@@ -18306,7 +18307,7 @@ function Ib(t, e) {
18306
18307
  Y = void 0, ge = ve[1];
18307
18308
  } else
18308
18309
  [Y, ge] = te.find((ve) => ve[0] === void 0 ? !1 : ve[0] === M);
18309
- const be = { id: Y, type: ge };
18310
+ const we = { id: Y, type: ge };
18310
18311
  R({
18311
18312
  domain: z,
18312
18313
  context: { ...c, ...B },
@@ -18314,10 +18315,10 @@ function Ib(t, e) {
18314
18315
  views: te,
18315
18316
  title: q,
18316
18317
  target: oe,
18317
- initialView: be,
18318
+ initialView: we,
18318
18319
  action_id: A,
18319
18320
  action_type: k,
18320
- res_id: E,
18321
+ res_id: _,
18321
18322
  treeExpandable: le,
18322
18323
  limit: W && (G === 0 || G === !1) ? Ct : G,
18323
18324
  actionRawData: {
@@ -18331,7 +18332,7 @@ function Ib(t, e) {
18331
18332
  model: I,
18332
18333
  values: A,
18333
18334
  forced_values: k,
18334
- initialViewType: E,
18335
+ initialViewType: _,
18335
18336
  res_id: M,
18336
18337
  domain: W,
18337
18338
  context: V
@@ -18341,7 +18342,7 @@ function Ib(t, e) {
18341
18342
  action: N,
18342
18343
  values: A,
18343
18344
  forced_values: k,
18344
- initialViewType: E,
18345
+ initialViewType: _,
18345
18346
  res_id: M,
18346
18347
  domain: W,
18347
18348
  context: V
@@ -18352,7 +18353,7 @@ function Ib(t, e) {
18352
18353
  const {
18353
18354
  domain: A,
18354
18355
  context: k,
18355
- model: E,
18356
+ model: _,
18356
18357
  views: M,
18357
18358
  title: W,
18358
18359
  target: V,
@@ -18380,14 +18381,14 @@ function Ib(t, e) {
18380
18381
  }
18381
18382
  if (V !== "current" && V !== void 0) {
18382
18383
  const le = await H.getHandler().getView({
18383
- model: E,
18384
+ model: _,
18384
18385
  type: "form",
18385
18386
  id: N.type === "form" ? N.id : void 0,
18386
18387
  context: { ...c, ...k }
18387
18388
  });
18388
18389
  h.current.openActionModal({
18389
18390
  domain: A,
18390
- model: E,
18391
+ model: _,
18391
18392
  formView: le,
18392
18393
  context: { ...c, ...k },
18393
18394
  actionData: {
@@ -18409,7 +18410,7 @@ function Ib(t, e) {
18409
18410
  tabKey: se,
18410
18411
  title: W,
18411
18412
  views: M,
18412
- model: E,
18413
+ model: _,
18413
18414
  context: { ...k, ...c },
18414
18415
  domain: A,
18415
18416
  setCanWeClose: w,
@@ -18429,14 +18430,14 @@ function Ib(t, e) {
18429
18430
  });
18430
18431
  }
18431
18432
  }
18432
- async function _({
18433
+ async function E({
18433
18434
  model: I,
18434
18435
  domain: A = [],
18435
18436
  title: k,
18436
- viewModes: E = ["tree", "form"]
18437
+ viewModes: _ = ["tree", "form"]
18437
18438
  }) {
18438
18439
  const M = [];
18439
- for (const U of E)
18440
+ for (const U of _)
18440
18441
  if (U === "dashboard")
18441
18442
  M.push([void 0, "dashboard"]);
18442
18443
  else {
@@ -18783,7 +18784,7 @@ const { useToken: kb } = Xe, Mw = (t) => {
18783
18784
  onAddFavourite: r,
18784
18785
  onRemoveFavourite: o,
18785
18786
  onDropdownClosed: i
18786
- } = t, [a, l] = T(!1), [c, d] = T(), { t: f } = we(), { token: u } = kb(), p = Z(null), m = pe(
18787
+ } = t, [a, l] = T(!1), [c, d] = T(), { t: f } = xe(), { token: u } = kb(), p = Z(null), m = pe(
18787
18788
  Nt
18788
18789
  ), {
18789
18790
  openShortcut: g,
@@ -18795,8 +18796,8 @@ const { useToken: kb } = Xe, Mw = (t) => {
18795
18796
  } = m || {}, C = re(() => {
18796
18797
  if (!y || !y.view_id || !y.extra)
18797
18798
  return;
18798
- const { action_id: R, action_type: _ } = y.extra || {};
18799
- if (!R || !_) {
18799
+ const { action_id: R, action_type: E } = y.extra || {};
18800
+ if (!R || !E) {
18800
18801
  l(!1);
18801
18802
  return;
18802
18803
  }
@@ -18804,7 +18805,7 @@ const { useToken: kb } = Xe, Mw = (t) => {
18804
18805
  let A = !1;
18805
18806
  return y.type === "form" && (A = b || !1), {
18806
18807
  action_id: R,
18807
- action_type: _,
18808
+ action_type: E,
18808
18809
  view_id: I,
18809
18810
  res_id: A
18810
18811
  };
@@ -18816,8 +18817,8 @@ const { useToken: kb } = Xe, Mw = (t) => {
18816
18817
  S();
18817
18818
  }, [x]);
18818
18819
  function D(R) {
18819
- const _ = R;
18820
- (_ == null ? void 0 : _.action_type) !== "ir.actions.wizard" && g(_);
18820
+ const E = R;
18821
+ (E == null ? void 0 : E.action_type) !== "ir.actions.wizard" && g(E);
18821
18822
  }
18822
18823
  const S = O(async () => {
18823
18824
  if (!C)
@@ -18852,14 +18853,14 @@ const { useToken: kb } = Xe, Mw = (t) => {
18852
18853
  else {
18853
18854
  if (!y)
18854
18855
  return;
18855
- const R = h.find((E) => E.key === v), { action_id: _, action_type: I } = (R == null ? void 0 : R.action) || {}, A = y.view_id;
18856
+ const R = h.find((_) => _.key === v), { action_id: E, action_type: I } = (R == null ? void 0 : R.action) || {}, A = y.view_id;
18856
18857
  let k = !1;
18857
- if (!_ || !I) {
18858
+ if (!E || !I) {
18858
18859
  l(!1);
18859
18860
  return;
18860
18861
  }
18861
18862
  y.type === "form" && (k = b || !1), await r({
18862
- action_id: _,
18863
+ action_id: E,
18863
18864
  action_type: I,
18864
18865
  view_id: A,
18865
18866
  res_id: k