@gisce/react-ooui 2.7.0-alpha.6 → 2.7.0-alpha.7

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.
@@ -32,6 +32,7 @@ import { useDeepCompareCallback as Yt, useDeepCompareMemo as xr } from "use-deep
32
32
  import { Table as fs, InfiniteTable as ms } from "@gisce/react-formiga-table";
33
33
  import { fileTypeFromBuffer as hs } from "file-type-buffer-browser";
34
34
  import { isPresetStatusColor as ps, isPresetColor as gs } from "antd/lib/_util/colors";
35
+ import "@gisce/react-formiga-table/style.css";
35
36
  import ys from "antd/es/typography/Link";
36
37
  import co from "antd/es/alert/ErrorBoundary";
37
38
  import { GridUi as ws } from "@gisce/fiber-diagram";
@@ -49,7 +50,7 @@ const { Text: Os, Title: Vs } = Mt, { useToken: _s } = Ke, As = {
49
50
  center: "justify-center",
50
51
  right: "justify-end"
51
52
  }, pn = (e) => {
52
- const { ooui: t, align: n, responsiveBehaviour: o } = e, { label: r, tooltip: s, fieldForLabel: a, labelSize: l, labelType: d } = t, u = a !== null && r.length > 1 ? r + " :" : r, h = n || (a ? o ? "left" : "right" : "left"), { token: p } = _s(), m = l === void 0 ? Os : Vs;
53
+ const { ooui: t, align: n, responsiveBehaviour: o } = e, { label: r, tooltip: s, fieldForLabel: a, labelSize: l, labelType: d } = t, f = a !== null && r.length > 1 ? r + " :" : r, h = n || (a ? o ? "left" : "right" : "left"), { token: p } = _s(), m = l === void 0 ? Os : Vs;
53
54
  return /* @__PURE__ */ D(
54
55
  "div",
55
56
  {
@@ -64,7 +65,7 @@ const { Text: Os, Title: Vs } = Mt, { useToken: _s } = Ke, As = {
64
65
  }
65
66
  }
66
67
  ) }),
67
- /* @__PURE__ */ i("span", { className: "pr-2", children: /* @__PURE__ */ i(m, { level: l, type: d, children: /* @__PURE__ */ i(nr, { content: u }) }) })
68
+ /* @__PURE__ */ i("span", { className: "pr-2", children: /* @__PURE__ */ i(m, { level: l, type: d, children: /* @__PURE__ */ i(nr, { content: f }) }) })
68
69
  ]
69
70
  }
70
71
  );
@@ -80,7 +81,7 @@ function Ce({
80
81
  type: l,
81
82
  validator: d
82
83
  }) {
83
- const { id: f, label: u, tooltip: c } = e, { t: h } = he(), p = a ? [
84
+ const { id: u, label: f, tooltip: c } = e, { t: h } = he(), p = a ? [
84
85
  {
85
86
  required: !0,
86
87
  message: h("fillRequiredField"),
@@ -91,7 +92,7 @@ function Ce({
91
92
  lt.Item,
92
93
  {
93
94
  className: "mb-0",
94
- name: f,
95
+ name: u,
95
96
  valuePropName: o,
96
97
  rules: p,
97
98
  help: e.tooltipInline ? e.tooltip : null,
@@ -100,23 +101,23 @@ function Ce({
100
101
  );
101
102
  if (!r)
102
103
  return m();
103
- const g = /* @__PURE__ */ i(
104
+ const y = /* @__PURE__ */ i(
104
105
  pn,
105
106
  {
106
107
  ooui: new Pt({
107
- name: f + "_label",
108
- string: u,
108
+ name: u + "_label",
109
+ string: f,
109
110
  help: e.tooltipInline ? !1 : c,
110
- fieldForLabel: f
111
+ fieldForLabel: u
111
112
  }),
112
113
  align: s
113
114
  }
114
115
  );
115
116
  return n === "horizontal" ? (() => /* @__PURE__ */ D(Ve, { align: "middle", className: "pb-1 pt-1", children: [
116
- /* @__PURE__ */ i(ge, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-end", children: g }) }),
117
+ /* @__PURE__ */ i(ge, { className: "ml-2", flex: "7rem", children: /* @__PURE__ */ i("div", { className: "flex flex-col items-end", children: y }) }),
117
118
  /* @__PURE__ */ i(ge, { flex: "auto", children: m() })
118
119
  ] }))() : (() => /* @__PURE__ */ D(oe, { children: [
119
- g,
120
+ y,
120
121
  m()
121
122
  ] }))();
122
123
  }
@@ -144,22 +145,22 @@ const { confirm: Ds } = Ze, Zt = ({
144
145
  executeButtonAction: a,
145
146
  getContext: l,
146
147
  getValues: d,
147
- getPlainValues: f,
148
- domain: u,
148
+ getPlainValues: u,
149
+ domain: f,
149
150
  submitForm: c,
150
151
  fetchValues: h,
151
152
  formHasChanges: p,
152
153
  elementHasLostFocus: m,
153
- getFields: g
154
+ getFields: y
154
155
  } = e;
155
156
  return /* @__PURE__ */ i(
156
157
  $e.Provider,
157
158
  {
158
159
  value: {
159
- domain: u,
160
+ domain: f,
160
161
  getValues: d,
161
- getPlainValues: f,
162
- getFields: g,
162
+ getPlainValues: u,
163
+ getFields: y,
163
164
  activeId: n,
164
165
  activeModel: o,
165
166
  setFieldValue: r,
@@ -307,23 +308,23 @@ const uo = (e) => {
307
308
  confirmMessage: a,
308
309
  icon: l,
309
310
  context: d,
310
- readOnly: f
311
- } = t, u = ee($e), { executeButtonAction: c } = u || {}, [h, p] = v(!1), { t: m } = he();
312
- async function g() {
311
+ readOnly: u
312
+ } = t, f = ee($e), { executeButtonAction: c } = f || {}, [h, p] = v(!1), { t: m } = he();
313
+ async function y() {
313
314
  p(!0), await c({ type: s, action: n, context: d }), p(!1);
314
315
  }
315
- function y() {
316
+ function g() {
316
317
  if (a) {
317
318
  Zt({
318
319
  confirmMessage: a,
319
320
  t: m,
320
321
  onOk: () => {
321
- g();
322
+ y();
322
323
  }
323
324
  });
324
325
  return;
325
326
  }
326
- g();
327
+ y();
327
328
  }
328
329
  function w() {
329
330
  if (h)
@@ -337,8 +338,8 @@ const uo = (e) => {
337
338
  Ne,
338
339
  {
339
340
  block: !0,
340
- disabled: !r || f || h,
341
- onClick: y,
341
+ disabled: !r || u || h,
342
+ onClick: g,
342
343
  icon: w(),
343
344
  type: t.primary ? "primary" : "default",
344
345
  danger: t.danger,
@@ -353,21 +354,21 @@ const uo = (e) => {
353
354
  activated: a,
354
355
  buttonType: l,
355
356
  confirmMessage: d,
356
- icon: f,
357
- primary: u,
357
+ icon: u,
358
+ primary: f,
358
359
  context: c,
359
360
  readOnly: h
360
- } = n || {}, p = ee($e), { executeButtonAction: m } = p || {}, [g, y] = v(!1), { t: w } = he();
361
+ } = n || {}, p = ee($e), { executeButtonAction: m } = p || {}, [y, g] = v(!1), { t: w } = he();
361
362
  function C() {
362
- if (g)
363
+ if (y)
363
364
  return /* @__PURE__ */ i(gt, {});
364
- if (f) {
365
- const b = ct(f);
365
+ if (u) {
366
+ const b = ct(u);
366
367
  return b && /* @__PURE__ */ i(b, {});
367
368
  }
368
369
  }
369
370
  async function I() {
370
- l && r && (y(!0), await m({ type: l, action: r, context: c }), y(!1));
371
+ l && r && (g(!0), await m({ type: l, action: r, context: c }), g(!1));
371
372
  }
372
373
  function T() {
373
374
  if (d) {
@@ -391,7 +392,7 @@ const uo = (e) => {
391
392
  disabled: !a || h,
392
393
  onClick: T,
393
394
  icon: /* @__PURE__ */ i(fn, {}),
394
- type: u ? "primary" : void 0,
395
+ type: f ? "primary" : void 0,
395
396
  overlay: /* @__PURE__ */ i(
396
397
  Ps,
397
398
  {
@@ -416,20 +417,20 @@ const uo = (e) => {
416
417
  id: a,
417
418
  caption: l,
418
419
  activated: d,
419
- buttonType: f,
420
- confirmMessage: u,
420
+ buttonType: u,
421
+ confirmMessage: f,
421
422
  icon: c,
422
423
  context: h,
423
424
  readOnly: p,
424
425
  danger: m
425
- } = s, [g, y] = v(!1);
426
+ } = s, [y, g] = v(!1);
426
427
  async function w() {
427
- y(!0), await o({ type: f, action: a, context: h }), y(!1);
428
+ g(!0), await o({ type: u, action: a, context: h }), g(!1);
428
429
  }
429
430
  function C() {
430
- if (u) {
431
+ if (f) {
431
432
  Zt({
432
- confirmMessage: u,
433
+ confirmMessage: f,
433
434
  t,
434
435
  onOk: () => {
435
436
  w();
@@ -440,7 +441,7 @@ const uo = (e) => {
440
441
  w();
441
442
  }
442
443
  function I() {
443
- if (g)
444
+ if (y)
444
445
  return /* @__PURE__ */ i(gt, {});
445
446
  if (c) {
446
447
  const T = ct(c);
@@ -523,9 +524,9 @@ const fo = (e) => {
523
524
  content: t
524
525
  });
525
526
  }, mo = (e) => {
526
- const { visible: t, onCloseModal: n, model: o, id: r, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = gn(), { t: d } = he(), [f, u] = v([]), [c, h] = v(!1), [p, m] = v(!1), [g, y] = v({}), w = re();
527
+ const { visible: t, onCloseModal: n, model: o, id: r, field: s, onSubmitSucceed: a } = e, { modalWidth: l } = gn(), { t: d } = he(), [u, f] = v([]), [c, h] = v(!1), [p, m] = v(!1), [y, g] = v({}), w = re();
527
528
  ue(() => {
528
- t ? C() : y({});
529
+ t ? C() : g({});
529
530
  }, [t]);
530
531
  async function C() {
531
532
  h(!0);
@@ -546,7 +547,7 @@ const fo = (e) => {
546
547
  code: R.code,
547
548
  name: R.name
548
549
  }));
549
- return u == null || u(S), S;
550
+ return f == null || f(S), S;
550
551
  }
551
552
  async function T(F) {
552
553
  const S = {};
@@ -559,19 +560,19 @@ const fo = (e) => {
559
560
  }))[0];
560
561
  S[R.code] = x[s] || "";
561
562
  }
562
- w.current = S, y(S);
563
+ w.current = S, g(S);
563
564
  }
564
565
  function b() {
565
- return f.map((F, S) => /* @__PURE__ */ D(Ve, { style: { paddingBottom: 20 }, children: [
566
+ return u.map((F, S) => /* @__PURE__ */ D(Ve, { style: { paddingBottom: 20 }, children: [
566
567
  /* @__PURE__ */ i(ge, { flex: "8rem", style: { paddingRight: 10 }, children: F.name }),
567
568
  /* @__PURE__ */ i(ge, { flex: "auto", children: /* @__PURE__ */ i(
568
569
  Zi,
569
570
  {
570
571
  rows: 4,
571
- value: g[F.code] || "",
572
+ value: y[F.code] || "",
572
573
  onChange: (R) => {
573
- y({
574
- ...g,
574
+ g({
575
+ ...y,
575
576
  [F.code]: R.target.value
576
577
  });
577
578
  },
@@ -583,11 +584,11 @@ const fo = (e) => {
583
584
  async function V() {
584
585
  m(!0);
585
586
  try {
586
- for (const F of Object.keys(g))
587
- g[F] !== w.current[F] && await E.getHandler().update({
587
+ for (const F of Object.keys(y))
588
+ y[F] !== w.current[F] && await E.getHandler().update({
588
589
  model: o,
589
590
  id: r,
590
- values: { [s]: g[F] },
591
+ values: { [s]: y[F] },
591
592
  context: {
592
593
  lang: F
593
594
  },
@@ -653,13 +654,13 @@ const { info: Hs } = Ze, mt = (e) => {
653
654
  content: e
654
655
  });
655
656
  }, { useToken: Bs } = Ke, ho = (e) => {
656
- const { ooui: t, isSearchField: n = !1 } = e, { id: o, readOnly: r, isPassword: s, required: a, translatable: l } = t, { token: d } = Bs(), f = a && !r ? { backgroundColor: d.colorPrimaryBg } : void 0, u = ee($e), { elementHasLostFocus: c } = u || {};
657
+ const { ooui: t, isSearchField: n = !1 } = e, { id: o, readOnly: r, isPassword: s, required: a, translatable: l } = t, { token: d } = Bs(), u = a && !r ? { backgroundColor: d.colorPrimaryBg } : void 0, f = ee($e), { elementHasLostFocus: c } = f || {};
657
658
  let h = /* @__PURE__ */ i(
658
659
  it,
659
660
  {
660
661
  disabled: r || l && !n,
661
662
  id: o,
662
- style: f,
663
+ style: u,
663
664
  maxLength: t.size,
664
665
  onBlur: c
665
666
  }
@@ -671,7 +672,7 @@ const { info: Hs } = Ze, mt = (e) => {
671
672
  id: o,
672
673
  onBlur: c
673
674
  }
674
- )), l && !r && !n && (h = /* @__PURE__ */ i(js, { field: o, requiredStyle: f })), /* @__PURE__ */ i(Ce, { required: a, ...e, children: h });
675
+ )), l && !r && !n && (h = /* @__PURE__ */ i(js, { field: o, requiredStyle: u })), /* @__PURE__ */ i(Ce, { required: a, ...e, children: h });
675
676
  }, js = ({
676
677
  value: e,
677
678
  field: t,
@@ -683,8 +684,8 @@ const { info: Hs } = Ze, mt = (e) => {
683
684
  activeModel: a,
684
685
  fetchValues: l,
685
686
  formHasChanges: d,
686
- elementHasLostFocus: f
687
- } = r || {}, [u, c] = v(!1), { t: h } = he();
687
+ elementHasLostFocus: u
688
+ } = r || {}, [f, c] = v(!1), { t: h } = he();
688
689
  return s ? /* @__PURE__ */ D(oe, { children: [
689
690
  /* @__PURE__ */ i(
690
691
  "div",
@@ -694,7 +695,7 @@ const { info: Hs } = Ze, mt = (e) => {
694
695
  mt(h("saveBeforeTranslate"));
695
696
  return;
696
697
  }
697
- u || c(!0);
698
+ f || c(!0);
698
699
  },
699
700
  children: /* @__PURE__ */ i(
700
701
  it,
@@ -705,7 +706,7 @@ const { info: Hs } = Ze, mt = (e) => {
705
706
  onChange: (p) => {
706
707
  o == null || o(p.target.value);
707
708
  },
708
- onBlur: f,
709
+ onBlur: u,
709
710
  style: { cursor: "pointer", pointerEvents: "none", ...n }
710
711
  }
711
712
  )
@@ -717,7 +718,7 @@ const { info: Hs } = Ze, mt = (e) => {
717
718
  id: s,
718
719
  model: a,
719
720
  field: t,
720
- visible: u,
721
+ visible: f,
721
722
  onCloseModal: () => {
722
723
  c(!1);
723
724
  },
@@ -736,7 +737,7 @@ const { info: Hs } = Ze, mt = (e) => {
736
737
  onChange: (p) => {
737
738
  o == null || o(p.target.value);
738
739
  },
739
- onBlur: f
740
+ onBlur: u
740
741
  }
741
742
  ) }),
742
743
  /* @__PURE__ */ i(ge, { flex: "none", children: /* @__PURE__ */ i(
@@ -755,8 +756,8 @@ const { info: Hs } = Ze, mt = (e) => {
755
756
  const { ooui: t } = e, { required: n } = t;
756
757
  return /* @__PURE__ */ i(Ce, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(go, { ...e }) });
757
758
  }, go = (e) => {
758
- const { ooui: t, onChange: n, value: o } = e, { selectionValues: r, readOnly: s, required: a } = t, l = Array.from(r.entries()), d = l && l.length && l.map((u) => {
759
- const [c, h] = u;
759
+ const { ooui: t, onChange: n, value: o } = e, { selectionValues: r, readOnly: s, required: a } = t, l = Array.from(r.entries()), d = l && l.length && l.map((f) => {
760
+ const [c, h] = f;
760
761
  return /* @__PURE__ */ i(Gs, { value: c, children: h }, c);
761
762
  });
762
763
  return /* @__PURE__ */ i(
@@ -766,7 +767,7 @@ const { info: Hs } = Ze, mt = (e) => {
766
767
  onChange: n,
767
768
  value: o,
768
769
  optionFilterProp: "children",
769
- filterOption: (u, c) => c.children.toLowerCase().indexOf(u.toLowerCase()) >= 0,
770
+ filterOption: (f, c) => c.children.toLowerCase().indexOf(f.toLowerCase()) >= 0,
770
771
  showSearch: !0,
771
772
  children: d
772
773
  }
@@ -825,12 +826,12 @@ const ea = (e) => {
825
826
  const c = await kt(n), h = `data:${c == null ? void 0 : c.mime};base64,${n}`, p = document.createElement("a");
826
827
  p.href = h, p.download = `image.${c == null ? void 0 : c.ext}`, p.click();
827
828
  }
828
- async function f(c) {
829
+ async function u(c) {
829
830
  c.stopPropagation(), c.preventDefault();
830
831
  const h = c.target.files[0], p = await yo(h);
831
832
  l(p);
832
833
  }
833
- function u() {
834
+ function f() {
834
835
  l(void 0);
835
836
  }
836
837
  return /* @__PURE__ */ D(oe, { children: [
@@ -850,7 +851,7 @@ const ea = (e) => {
850
851
  ref: s,
851
852
  accept: "image/*",
852
853
  style: { display: "none" },
853
- onChange: f
854
+ onChange: u
854
855
  }
855
856
  )
856
857
  ] }),
@@ -880,7 +881,7 @@ const ea = (e) => {
880
881
  {
881
882
  tooltip: a("clear"),
882
883
  disabled: r || !n,
883
- onClick: u,
884
+ onClick: f,
884
885
  icon: /* @__PURE__ */ i(zn, {})
885
886
  }
886
887
  )
@@ -917,23 +918,23 @@ function oa(e) {
917
918
  const wo = (e, t, n) => e.columns.map((r) => {
918
919
  const s = r.type, a = r.id, l = t == null ? void 0 : t[s];
919
920
  let d;
920
- return l ? d = (f) => l({ value: f, key: a, ooui: r, context: n }) : d = (f) => oa(f) ? f : /* @__PURE__ */ D("p", { style: { color: "red" }, children: [
921
+ return l ? d = (u) => l({ value: u, key: a, ooui: r, context: n }) : d = (u) => oa(u) ? u : /* @__PURE__ */ D("p", { style: { color: "red" }, children: [
921
922
  "Unsupported widget value for a Tree cell:",
922
923
  /* @__PURE__ */ i("pre", { children: /* @__PURE__ */ D("strong", { children: [
923
924
  "Type: ",
924
925
  s,
925
926
  " - Value: ",
926
- JSON.stringify(f)
927
+ JSON.stringify(u)
927
928
  ] }) })
928
929
  ] }), {
929
930
  key: a,
930
931
  dataIndex: a,
931
932
  title: r.label,
932
933
  render: d,
933
- sorter: (f, u) => {
934
+ sorter: (u, f) => {
934
935
  var p, m;
935
- let c = f[a] || "", h = u[a] || "";
936
- return s === "many2one" && (c = ((p = f[a]) == null ? void 0 : p.value) || "", h = ((m = u[a]) == null ? void 0 : m.value) || ""), c < h ? -1 : c > h ? 1 : 0;
936
+ let c = u[a] || "", h = f[a] || "";
937
+ return s === "many2one" && (c = ((p = u[a]) == null ? void 0 : p.value) || "", h = ((m = f[a]) == null ? void 0 : m.value) || ""), c < h ? -1 : c > h ? 1 : 0;
937
938
  }
938
939
  };
939
940
  }), ir = (e, t) => t.map((o) => {
@@ -972,10 +973,10 @@ function Et({
972
973
  }) {
973
974
  if (!t)
974
975
  return e;
975
- const { id: o, desc: r } = t, s = r === !1 ? "ascend" : "descend", a = n[o].type, l = (d, f) => {
976
+ const { id: o, desc: r } = t, s = r === !1 ? "ascend" : "descend", a = n[o].type, l = (d, u) => {
976
977
  var h, p;
977
- let u = d[o] || "", c = f[o] || "";
978
- return a === "many2one" && (u = ((h = d[o]) == null ? void 0 : h[1]) || "", c = ((p = f[o]) == null ? void 0 : p[1]) || ""), u === c ? 0 : s === "ascend" ? u > c ? 1 : -1 : u < c ? 1 : -1;
978
+ let f = d[o] || "", c = u[o] || "";
979
+ return a === "many2one" && (f = ((h = d[o]) == null ? void 0 : h[1]) || "", c = ((p = u[o]) == null ? void 0 : p[1]) || ""), f === c ? 0 : s === "ascend" ? f > c ? 1 : -1 : f < c ? 1 : -1;
979
980
  };
980
981
  return e.sort(l);
981
982
  }
@@ -986,7 +987,7 @@ function ia(e) {
986
987
  return !1;
987
988
  }
988
989
  const sr = async (e) => {
989
- var g;
990
+ var y;
990
991
  const {
991
992
  items: t,
992
993
  model: n,
@@ -995,43 +996,43 @@ const sr = async (e) => {
995
996
  context: s,
996
997
  currentView: a = {}
997
998
  } = e, l = ["original", "pendingLink"], d = t.filter(
998
- (y) => !l.includes(y.operation)
999
- ), f = t.filter((y) => l.includes(y.operation)).map((y) => y.id), u = {
999
+ (g) => !l.includes(g.operation)
1000
+ ), u = t.filter((g) => l.includes(g.operation)).map((g) => g.id), f = {
1000
1001
  form: o.fields,
1001
1002
  tree: r.fields
1002
1003
  };
1003
1004
  let c = [], h;
1004
1005
  if (a === "tree" && (r != null && r.arch)) {
1005
- const y = (g = Tt(r)) == null ? void 0 : g.colors, w = await E.getHandler().readEvalUiObjects({
1006
+ const g = (y = Tt(r)) == null ? void 0 : y.colors, w = await E.getHandler().readEvalUiObjects({
1006
1007
  model: n,
1007
- ids: f,
1008
+ ids: u,
1008
1009
  arch: r == null ? void 0 : r.arch,
1009
1010
  fields: r.fields,
1010
1011
  context: s,
1011
- attrs: y && {
1012
- colors: y
1012
+ attrs: g && {
1013
+ colors: g
1013
1014
  }
1014
1015
  });
1015
1016
  c = w[0], h = qt(w[1]);
1016
1017
  } else
1017
1018
  c = await E.getHandler().readObjects({
1018
1019
  model: n,
1019
- ids: f,
1020
- fields: u[a],
1020
+ ids: u,
1021
+ fields: f[a],
1021
1022
  context: s
1022
1023
  });
1023
- const p = c.map((y) => {
1024
+ const p = c.map((g) => {
1024
1025
  const w = {};
1025
- return Object.keys(y).forEach((C) => {
1026
- (u[a].hasOwnProperty(C) || C === "id") && (w[C] = y[C]);
1026
+ return Object.keys(g).forEach((C) => {
1027
+ (f[a].hasOwnProperty(C) || C === "id") && (w[C] = g[C]);
1027
1028
  }), w;
1028
1029
  });
1029
1030
  return [
1030
- t.map((y) => {
1031
+ t.map((g) => {
1031
1032
  const w = p.find(
1032
- (I) => I.id === y.id
1033
+ (I) => I.id === g.id
1033
1034
  ), C = {
1034
- ...y
1035
+ ...g
1035
1036
  };
1036
1037
  return a === "form" ? C.values = w : a === "tree" && (C.treeValues = w), C;
1037
1038
  }).concat(d),
@@ -1075,28 +1076,28 @@ function la(e) {
1075
1076
  });
1076
1077
  }
1077
1078
  const ca = (e) => {
1078
- const { ooui: t } = e, { relation: n, context: o, views: r } = t, [s, a] = v(!0), [l, d] = v(), [f, u] = v(/* @__PURE__ */ new Map()), c = ee($e), { getContext: h } = c || {};
1079
+ const { ooui: t } = e, { relation: n, context: o, views: r } = t, [s, a] = v(!0), [l, d] = v(), [u, f] = v(/* @__PURE__ */ new Map()), c = ee($e), { getContext: h } = c || {};
1079
1080
  bt(() => {
1080
1081
  m();
1081
1082
  }, [t]);
1082
- const p = async (g) => r && r[g] ? r[g] : await E.getHandler().getView({
1083
+ const p = async (y) => r && r[y] ? r[y] : await E.getHandler().getView({
1083
1084
  model: n,
1084
- type: g,
1085
+ type: y,
1085
1086
  context: { ...h == null ? void 0 : h(), ...o }
1086
1087
  }), m = async () => {
1087
1088
  a(!0), d(void 0);
1088
1089
  try {
1089
- const g = await p("form"), y = await p("tree");
1090
- f.set("form", g), f.set("tree", y), u(f);
1091
- } catch (g) {
1092
- d(g);
1090
+ const y = await p("form"), g = await p("tree");
1091
+ u.set("form", y), u.set("tree", g), f(u);
1092
+ } catch (y) {
1093
+ d(y);
1093
1094
  } finally {
1094
1095
  a(!1);
1095
1096
  }
1096
1097
  };
1097
- return s ? /* @__PURE__ */ i(je, {}) : l ? /* @__PURE__ */ i(Qe, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ i(Ce, { type: "array", ...e, children: /* @__PURE__ */ i(da, { ooui: t, views: f }) });
1098
+ return s ? /* @__PURE__ */ i(je, {}) : l ? /* @__PURE__ */ i(Qe, { className: "mt-10", message: l, type: "error", banner: !0 }) : /* @__PURE__ */ i(Ce, { type: "array", ...e, children: /* @__PURE__ */ i(da, { ooui: t, views: u }) });
1098
1099
  }, da = (e) => {
1099
- const { value: t, views: n, ooui: o, onChange: r } = e, { items: s = [] } = t || {}, [a, l] = v(!1), [d, f] = v(), [u, c] = v(!1), [h, p] = v(), { relation: m, context: g, readOnly: y, summaryField: w, titleField: C } = o, I = s.filter((F) => F.values), T = ee($e), { getContext: b } = T || {};
1100
+ const { value: t, views: n, ooui: o, onChange: r } = e, { items: s = [] } = t || {}, [a, l] = v(!1), [d, u] = v(), [f, c] = v(!1), [h, p] = v(), { relation: m, context: y, readOnly: g, summaryField: w, titleField: C } = o, I = s.filter((F) => F.values), T = ee($e), { getContext: b } = T || {};
1100
1101
  bt(() => {
1101
1102
  _();
1102
1103
  }, [s]);
@@ -1106,7 +1107,7 @@ const ca = (e) => {
1106
1107
  });
1107
1108
  };
1108
1109
  async function _() {
1109
- l(!0), f(void 0);
1110
+ l(!0), u(void 0);
1110
1111
  try {
1111
1112
  const [F] = await sr({
1112
1113
  treeView: {
@@ -1118,12 +1119,12 @@ const ca = (e) => {
1118
1119
  },
1119
1120
  model: m,
1120
1121
  items: s,
1121
- context: { ...b == null ? void 0 : b(), ...g },
1122
+ context: { ...b == null ? void 0 : b(), ...y },
1122
1123
  currentView: "form"
1123
1124
  });
1124
1125
  V(F);
1125
1126
  } catch (F) {
1126
- f(F);
1127
+ u(F);
1127
1128
  } finally {
1128
1129
  l(!1);
1129
1130
  }
@@ -1171,15 +1172,15 @@ const ca = (e) => {
1171
1172
  id: h == null ? void 0 : h.id,
1172
1173
  values: h == null ? void 0 : h.values,
1173
1174
  defaultValues: h == null ? void 0 : h.defaultValues,
1174
- visible: u,
1175
+ visible: f,
1175
1176
  onSubmitSucceed: () => {
1176
1177
  c(!1);
1177
1178
  },
1178
- parentContext: { ...b == null ? void 0 : b(), ...g },
1179
+ parentContext: { ...b == null ? void 0 : b(), ...y },
1179
1180
  onCancel: () => {
1180
1181
  c(!1);
1181
1182
  },
1182
- readOnly: y,
1183
+ readOnly: g,
1183
1184
  postSaveAction: _
1184
1185
  }
1185
1186
  )
@@ -1236,8 +1237,8 @@ const ca = (e) => {
1236
1237
  return Object.keys(t).forEach((r) => {
1237
1238
  var a, l;
1238
1239
  if (n[r] ? n[r].type === "one2many" || n[r].type === "many2many" : !1) {
1239
- const d = JSON.stringify(e[r]), f = JSON.stringify(t[r]);
1240
- if (d === f)
1240
+ const d = JSON.stringify(e[r]), u = JSON.stringify(t[r]);
1241
+ if (d === u)
1241
1242
  return;
1242
1243
  (((l = (a = t[r]) == null ? void 0 : a.items) == null ? void 0 : l.filter(
1243
1244
  (c) => c.operation !== "original"
@@ -1247,15 +1248,15 @@ const ca = (e) => {
1247
1248
  if (!Vr(e[r]) && !Vr(t[r]))
1248
1249
  return;
1249
1250
  if (Array.isArray(e[r])) {
1250
- const d = JSON.stringify(e[r]), f = JSON.stringify(t[r]);
1251
- d !== f && (o[r] = t[r]);
1251
+ const d = JSON.stringify(e[r]), u = JSON.stringify(t[r]);
1252
+ d !== u && (o[r] = t[r]);
1252
1253
  } else {
1253
- const d = e[r], [f] = t[r];
1254
- d !== f && (o[r] = t[r]);
1254
+ const d = e[r], [u] = t[r];
1255
+ d !== u && (o[r] = t[r]);
1255
1256
  }
1256
1257
  } else {
1257
- const d = JSON.stringify(e[r]), f = JSON.stringify(t[r]);
1258
- d !== f && (o[r] = t[r]);
1258
+ const d = JSON.stringify(e[r]), u = JSON.stringify(t[r]);
1259
+ d !== u && (o[r] = t[r]);
1259
1260
  }
1260
1261
  else
1261
1262
  e[r] === void 0 && t[r] !== void 0 ? o[r] = t[r] : e[r] !== t[r] && (t[r] === void 0 ? o[r] = null : o[r] = t[r]);
@@ -1364,7 +1365,7 @@ const Rt = ({
1364
1365
  const { ooui: t } = e;
1365
1366
  return /* @__PURE__ */ i(Ce, { type: "array", ...e, children: /* @__PURE__ */ i(xa, { ooui: t }) });
1366
1367
  }, xa = (e) => {
1367
- const { value: t, ooui: n, onChange: o } = e, { items: r = [] } = t || {}, s = r.filter((V) => V.operation !== "pendingRemove").map((V) => V.id), [a, l] = v([]), [d, f] = v(), [u, c] = v(!1), { relation: h, context: p, readOnly: m, field: g } = n, y = ee($e), { getContext: w } = y || {};
1368
+ const { value: t, ooui: n, onChange: o } = e, { items: r = [] } = t || {}, s = r.filter((V) => V.operation !== "pendingRemove").map((V) => V.id), [a, l] = v([]), [d, u] = v(), [f, c] = v(!1), { relation: h, context: p, readOnly: m, field: y } = n, g = ee($e), { getContext: w } = g || {};
1368
1369
  bt(() => {
1369
1370
  I();
1370
1371
  }, [r]);
@@ -1381,27 +1382,27 @@ const Rt = ({
1381
1382
  const S = await E.getHandler().evalDomain({
1382
1383
  domain: n.domain,
1383
1384
  values: Rt({
1384
- fields: y == null ? void 0 : y.getFields(),
1385
- values: y.getPlainValues()
1385
+ fields: g == null ? void 0 : g.getFields(),
1386
+ values: g.getPlainValues()
1386
1387
  }),
1387
- fields: y == null ? void 0 : y.getFields(),
1388
- context: y.getContext()
1388
+ fields: g == null ? void 0 : g.getFields(),
1389
+ context: g.getContext()
1389
1390
  });
1390
1391
  V = [...V, ...S];
1391
1392
  }
1392
1393
  const F = (await E.getHandler().search({
1393
1394
  model: h,
1394
1395
  params: V,
1395
- fieldsToRetrieve: [g],
1396
+ fieldsToRetrieve: [y],
1396
1397
  context: { ...w == null ? void 0 : w(), ...p }
1397
1398
  })).map((S) => {
1398
- const R = S[g];
1399
+ const R = S[y];
1399
1400
  let x = R;
1400
1401
  return Array.isArray(R) && (x = R[1]), { label: x, value: S.id };
1401
1402
  });
1402
1403
  l(F);
1403
1404
  } catch (_) {
1404
- f(_);
1405
+ u(_);
1405
1406
  } finally {
1406
1407
  c(!1);
1407
1408
  }
@@ -1440,7 +1441,7 @@ const Rt = ({
1440
1441
  disabled: m,
1441
1442
  options: a,
1442
1443
  onChange: T,
1443
- loading: u,
1444
+ loading: f,
1444
1445
  filterOption: (V, _) => _.label.toLowerCase().includes(V.toString())
1445
1446
  }
1446
1447
  ) }) });
@@ -1552,7 +1553,7 @@ const Rt = ({
1552
1553
  }
1553
1554
  if (o.push(a), s(l)) {
1554
1555
  const d = n - r;
1555
- for (let f = 0; f < d; f += 1)
1556
+ for (let u = 0; u < d; u += 1)
1556
1557
  o.push(new Pt({ string: "" }));
1557
1558
  }
1558
1559
  }), o;
@@ -1580,33 +1581,33 @@ const Rt = ({
1580
1581
  s < r && (r = s);
1581
1582
  let a = !1, l = [];
1582
1583
  const d = o.map((c, h) => {
1583
- const p = c.filter((y) => !y.invisible), m = Ra({
1584
+ const p = c.filter((g) => !g.invisible), m = Ra({
1584
1585
  row: p,
1585
1586
  numberOfColumns: r
1586
1587
  });
1587
- let g = m;
1588
- return (h === 0 || !(c.length === 1 && c.some((y) => y.type === "group"))) && (g = Ia({
1588
+ let y = m;
1589
+ return (h === 0 || !(c.length === 1 && c.some((g) => g.type === "group"))) && (y = Ia({
1589
1590
  row: m,
1590
1591
  numberOfColumns: r,
1591
1592
  mustFillWithEmpties: n
1592
- }), l = l.concat(g)), g.map((y) => (y instanceof Pt && y.fieldForLabel && (a = !0), /* @__PURE__ */ i(
1593
+ }), l = l.concat(y)), y.map((g) => (g instanceof Pt && g.fieldForLabel && (a = !0), /* @__PURE__ */ i(
1593
1594
  "div",
1594
1595
  {
1595
1596
  style: {
1596
- ...Fa({ item: y, responsiveBehaviour: n }),
1597
+ ...Fa({ item: g, responsiveBehaviour: n }),
1597
1598
  minWidth: 0
1598
1599
  },
1599
1600
  children: Ta({
1600
- ooui: y,
1601
+ ooui: g,
1601
1602
  responsiveBehaviour: n
1602
1603
  })
1603
1604
  },
1604
- y.key
1605
+ g.key
1605
1606
  )));
1606
- }), f = o.length === 1 ? Oa(l, r) : Va(r, a);
1607
+ }), u = o.length === 1 ? Oa(l, r) : Va(r, a);
1607
1608
  return /* @__PURE__ */ i("div", { style: {
1608
1609
  display: "grid",
1609
- gridTemplateColumns: n ? "auto" : f,
1610
+ gridTemplateColumns: n ? "auto" : u,
1610
1611
  gap: "1rem",
1611
1612
  minHeight: 0,
1612
1613
  minWidth: 0
@@ -1664,14 +1665,14 @@ const Rt = ({
1664
1665
  formRef: a,
1665
1666
  searchTreeRef: l,
1666
1667
  onNewClicked: d,
1667
- currentId: f,
1668
- setCurrentId: u,
1668
+ currentId: u,
1669
+ setCurrentId: f,
1669
1670
  setResults: c,
1670
1671
  results: h,
1671
1672
  currentItemIndex: p,
1672
1673
  setCurrentItemIndex: m,
1673
- currentModel: g,
1674
- sorter: y,
1674
+ currentModel: y,
1675
+ sorter: g,
1675
1676
  setSorter: w,
1676
1677
  totalItems: C,
1677
1678
  setTotalItems: I,
@@ -1685,7 +1686,7 @@ const Rt = ({
1685
1686
  S !== void 0 ? S : Ft
1686
1687
  ), [Pe, fe] = v(o);
1687
1688
  ue(() => {
1688
- h && h.length > 0 && !p && (m == null || m(0), u == null || u(h[0].id));
1689
+ h && h.length > 0 && !p && (m == null || m(0), f == null || f(h[0].id));
1689
1690
  }, [h]), ue(() => {
1690
1691
  De(S !== void 0 ? S : Ft);
1691
1692
  }, [S]), ue(() => {
@@ -1721,13 +1722,13 @@ const Rt = ({
1721
1722
  searchTreeRef: l,
1722
1723
  onFormSave: Ie,
1723
1724
  onNewClicked: d,
1724
- currentId: f,
1725
- setCurrentId: u,
1725
+ currentId: u,
1726
+ setCurrentId: f,
1726
1727
  currentItemIndex: p,
1727
1728
  setCurrentItemIndex: m,
1728
1729
  results: h,
1729
1730
  setResults: c,
1730
- currentModel: g,
1731
+ currentModel: y,
1731
1732
  removingItem: P,
1732
1733
  setRemovingItem: K,
1733
1734
  formIsLoading: j,
@@ -1744,7 +1745,7 @@ const Rt = ({
1744
1745
  searchParams: M,
1745
1746
  searchVisible: $,
1746
1747
  setSearchVisible: de,
1747
- sorter: y,
1748
+ sorter: g,
1748
1749
  setSorter: w,
1749
1750
  totalItems: C,
1750
1751
  setTotalItems: I,
@@ -1774,8 +1775,8 @@ const Rt = ({
1774
1775
  activeKey: a,
1775
1776
  onChangeTab: l,
1776
1777
  onRemoveTab: d,
1777
- tabs: f
1778
- } = e, [u, c] = v(), [h, p] = v();
1778
+ tabs: u
1779
+ } = e, [f, c] = v(), [h, p] = v();
1779
1780
  return /* @__PURE__ */ i(
1780
1781
  dt.Provider,
1781
1782
  {
@@ -1787,9 +1788,9 @@ const Rt = ({
1787
1788
  openShortcut: s,
1788
1789
  onChangeTab: l,
1789
1790
  onRemoveTab: d,
1790
- tabs: f,
1791
+ tabs: u,
1791
1792
  currentId: h,
1792
- currentView: u,
1793
+ currentView: f,
1793
1794
  setCurrentId: p,
1794
1795
  setCurrentView: c
1795
1796
  },
@@ -1803,16 +1804,16 @@ const Rt = ({
1803
1804
  }, La = (e, t) => {
1804
1805
  const { children: n, globalValues: o = {} } = e, r = re(), s = re(), [a, l] = v(!1), d = ee(
1805
1806
  dt
1806
- ), { openAction: f } = d || {}, u = re([]), { t: c } = he();
1807
+ ), { openAction: u } = d || {}, f = re([]), { t: c } = he();
1807
1808
  pt(t, () => ({
1808
1809
  openActionModal: T
1809
1810
  }));
1810
- const [h, p] = v(!1), [m, g] = v(
1811
+ const [h, p] = v(!1), [m, y] = v(
1811
1812
  {
1812
1813
  context: {}
1813
1814
  }
1814
1815
  );
1815
- async function y(_) {
1816
+ async function g(_) {
1816
1817
  const { reportData: F, fields: S, values: R, context: x = {} } = _, {
1817
1818
  context: O,
1818
1819
  model: A,
@@ -1866,8 +1867,8 @@ const Rt = ({
1866
1867
  onRefreshParentValues: x
1867
1868
  }) {
1868
1869
  const { type: O } = _;
1869
- if (u.current.push(x), O === "ir.actions.report.xml")
1870
- return await y({
1870
+ if (f.current.push(x), O === "ir.actions.report.xml")
1871
+ return await g({
1871
1872
  reportData: _,
1872
1873
  fields: F,
1873
1874
  values: S,
@@ -1933,7 +1934,7 @@ const Rt = ({
1933
1934
  view_mode: x.view_mode,
1934
1935
  views: x.views
1935
1936
  });
1936
- return f == null || f({
1937
+ return u == null || u({
1937
1938
  target: "current",
1938
1939
  context: A,
1939
1940
  domain: P,
@@ -1953,7 +1954,7 @@ const Rt = ({
1953
1954
  context: R,
1954
1955
  actionData: x
1955
1956
  }) {
1956
- h ? b({ domain: _, model: F, formView: S, context: R, actionData: x }) : (g({ domain: _, model: F, context: R, formView: S, actionData: x }), p(!0));
1957
+ h ? b({ domain: _, model: F, formView: S, context: R, actionData: x }) : (y({ domain: _, model: F, context: R, formView: S, actionData: x }), p(!0));
1957
1958
  }
1958
1959
  async function b({
1959
1960
  domain: _,
@@ -1962,16 +1963,16 @@ const Rt = ({
1962
1963
  context: R,
1963
1964
  actionData: x
1964
1965
  }) {
1965
- g({
1966
+ y({
1966
1967
  domain: void 0,
1967
1968
  model: void 0,
1968
1969
  context: {},
1969
1970
  formView: void 0,
1970
1971
  actionData: void 0
1971
- }), p(!1), await new Promise((O) => setTimeout(O, 300)), g({ domain: _, model: F, context: R, formView: S, actionData: x }), p(!0);
1972
+ }), p(!1), await new Promise((O) => setTimeout(O, 300)), y({ domain: _, model: F, context: R, formView: S, actionData: x }), p(!0);
1972
1973
  }
1973
1974
  async function V() {
1974
- Ar(u.current), u.current = [], p(!1), g({
1975
+ Ar(f.current), f.current = [], p(!1), y({
1975
1976
  domain: void 0,
1976
1977
  model: void 0,
1977
1978
  context: {},
@@ -2010,7 +2011,7 @@ const Rt = ({
2010
2011
  visible: h,
2011
2012
  onSubmitSucceed: V,
2012
2013
  onCancel: () => {
2013
- Ar(u.current), u.current = [], p(!1), g({
2014
+ Ar(f.current), f.current = [], p(!1), y({
2014
2015
  domain: void 0,
2015
2016
  model: void 0,
2016
2017
  context: {},
@@ -2050,12 +2051,12 @@ async function $a({
2050
2051
  else {
2051
2052
  const l = t.split(",");
2052
2053
  for (const d of l) {
2053
- const f = await E.getHandler().getView({
2054
+ const u = await E.getHandler().getView({
2054
2055
  model: n,
2055
2056
  type: d,
2056
2057
  context: o
2057
2058
  });
2058
- s.push([f.view_id, d]);
2059
+ s.push([u.view_id, d]);
2059
2060
  }
2060
2061
  }
2061
2062
  if (e && e.length > 0) {
@@ -2071,7 +2072,7 @@ async function $a({
2071
2072
  };
2072
2073
  else {
2073
2074
  const l = t.split(",")[0], [d] = s.find(
2074
- ([f, u]) => u === l
2075
+ ([u, f]) => f === l
2075
2076
  );
2076
2077
  a = { id: d, type: l };
2077
2078
  }
@@ -2108,14 +2109,14 @@ function Ka(e, t) {
2108
2109
  showFooter: a = !1,
2109
2110
  getDataFromAction: l = !1,
2110
2111
  onFieldsChange: d,
2111
- onSubmitError: f,
2112
- readOnly: u = !1,
2112
+ onSubmitError: u,
2113
+ readOnly: f = !1,
2113
2114
  mustClearAfterSave: c = !1,
2114
2115
  submitMode: h = "api",
2115
2116
  values: p,
2116
2117
  formView: m,
2117
- postSaveAction: g,
2118
- insideButtonModal: y = !1,
2118
+ postSaveAction: y,
2119
+ insideButtonModal: g = !1,
2119
2120
  parentContext: w = {},
2120
2121
  actionDomain: C,
2121
2122
  visible: I = !0,
@@ -2165,7 +2166,7 @@ function Ka(e, t) {
2165
2166
  }, we = () => {
2166
2167
  fe == null || fe(!1), r == null || r();
2167
2168
  }, be = (N) => {
2168
- fe == null || fe(!1), f == null || f(N);
2169
+ fe == null || fe(!1), u == null || u(N);
2169
2170
  };
2170
2171
  function ce() {
2171
2172
  return o || L.current;
@@ -2319,7 +2320,7 @@ function Ka(e, t) {
2319
2320
  ids: [ce()],
2320
2321
  fields: N,
2321
2322
  context: w
2322
- }))[0], y)
2323
+ }))[0], g)
2323
2324
  return { values: te, defaultGetCalled: ie };
2324
2325
  const Se = await E.getHandler().search({
2325
2326
  params: [
@@ -2364,10 +2365,10 @@ function Ka(e, t) {
2364
2365
  });
2365
2366
  L.current = ie, $.current = te;
2366
2367
  }
2367
- g && await g([ce()]), !y && B && (pe == null || pe(ce(), Me(), le()));
2368
+ y && await y([ce()]), !g && B && (pe == null || pe(ce(), Me(), le()));
2368
2369
  }, ei = async (N) => {
2369
2370
  const { callOnSubmitSucceed: B = !0 } = N || {};
2370
- !y && B && (pe == null || pe(ce(), Me(), le()));
2371
+ !g && B && (pe == null || pe(ce(), Me(), le()));
2371
2372
  }, nn = async (N) => {
2372
2373
  let B = !1;
2373
2374
  const { callOnSubmitSucceed: te = !0 } = N || {};
@@ -2403,7 +2404,7 @@ function Ka(e, t) {
2403
2404
  var Ye;
2404
2405
  const Se = new zr(N);
2405
2406
  Se.parse(B, {
2406
- readOnly: u || ie,
2407
+ readOnly: f || ie,
2407
2408
  values: sa(
2408
2409
  {
2409
2410
  ...te,
@@ -2526,7 +2527,7 @@ function Ka(e, t) {
2526
2527
  ...B
2527
2528
  }
2528
2529
  });
2529
- if (typeof te == "object" && te !== null && Object.keys(te).length === 0 && y)
2530
+ if (typeof te == "object" && te !== null && Object.keys(te).length === 0 && g)
2530
2531
  pe == null || pe(ce(), Me(), le());
2531
2532
  else if (te.type && te.type === "ir.actions.act_window_close")
2532
2533
  pe == null || pe(ce(), Me(), le());
@@ -2607,7 +2608,7 @@ function Ka(e, t) {
2607
2608
  }
2608
2609
  let ie = !1;
2609
2610
  try {
2610
- !u && (tt() || ce() === void 0) && (ie = !0, Sn(!0), h === "2many" ? (await fr({ callOnSubmitSucceed: !1 }), ye.current = !0) : await nn({ callOnSubmitSucceed: !1 }));
2611
+ !f && (tt() || ce() === void 0) && (ie = !0, Sn(!0), h === "2many" ? (await fr({ callOnSubmitSucceed: !1 }), ye.current = !0) : await nn({ callOnSubmitSucceed: !1 }));
2611
2612
  const Se = ye.current ? Te() : {}, Ye = { ...te, ...Se };
2612
2613
  N === "object" ? await oi({ action: B, context: Ye }) : N === "workflow" ? await ii({ action: B }) : N === "action" && await si({ action: B, context: Ye }), ie && Sn(!1);
2613
2614
  } catch (Se) {
@@ -2666,7 +2667,7 @@ function Ka(e, t) {
2666
2667
  /* @__PURE__ */ i(
2667
2668
  Ne,
2668
2669
  {
2669
- disabled: S || u,
2670
+ disabled: S || f,
2670
2671
  loading: S,
2671
2672
  icon: /* @__PURE__ */ i(Qt, {}),
2672
2673
  onClick: async () => {
@@ -2704,7 +2705,7 @@ const Ht = ht(Ka), Bt = (e) => {
2704
2705
  isMenuAction: a = !1,
2705
2706
  actionData: l,
2706
2707
  ...d
2707
- } = e, { model: f } = d, { modalWidth: u } = gn(), [c, h] = v(o), [p, m] = v(!1), [g, y] = v(), { action_id: w, res_id: C, action_type: I, view_id: T } = l || {};
2708
+ } = e, { model: u } = d, { modalWidth: f } = gn(), [c, h] = v(o), [p, m] = v(!1), [y, g] = v(), { action_id: w, res_id: C, action_type: I, view_id: T } = l || {};
2708
2709
  ue(() => {
2709
2710
  a && b();
2710
2711
  }, [l, a]);
@@ -2715,12 +2716,12 @@ const Ht = ht(Ka), Bt = (e) => {
2715
2716
  view_id: T,
2716
2717
  res_id: C || !1
2717
2718
  });
2718
- m(S !== !1), S !== !1 && y(S);
2719
+ m(S !== !1), S !== !1 && g(S);
2719
2720
  }
2720
2721
  async function V() {
2721
- if (p && g)
2722
+ if (p && y)
2722
2723
  await E.getHandler().removeFavourite({
2723
- shortcut_id: g
2724
+ shortcut_id: y
2724
2725
  });
2725
2726
  else {
2726
2727
  const { action_id: S, res_id: R, action_type: x, view_id: O } = l;
@@ -2747,13 +2748,13 @@ const Ht = ht(Ka), Bt = (e) => {
2747
2748
  /* @__PURE__ */ i(ge, { style: { paddingLeft: 10 }, children: c })
2748
2749
  ] });
2749
2750
  }
2750
- const F = u * 0.95;
2751
+ const F = f * 0.95;
2751
2752
  return /* @__PURE__ */ i(Ma, { setTitle: h, children: /* @__PURE__ */ i(
2752
2753
  Ze,
2753
2754
  {
2754
2755
  title: a ? _() : c,
2755
2756
  centered: !0,
2756
- width: u,
2757
+ width: f,
2757
2758
  open: t,
2758
2759
  footer: null,
2759
2760
  destroyOnClose: !0,
@@ -2769,7 +2770,7 @@ const Ht = ht(Ka), Bt = (e) => {
2769
2770
  parentWidth: F,
2770
2771
  ...d
2771
2772
  },
2772
- `${f}-${n}-${w}-${C}-${I}-${T}-${o}`
2773
+ `${u}-${n}-${w}-${C}-${I}-${T}-${o}`
2773
2774
  )
2774
2775
  }
2775
2776
  ) });
@@ -2866,7 +2867,7 @@ const Ht = ht(Ka), Bt = (e) => {
2866
2867
  }
2867
2868
  )
2868
2869
  ] }), { useToken: Ya } = Ke, To = (e) => {
2869
- const { ooui: t } = e, { id: n, decimalDigits: o, readOnly: r, required: s } = t, { token: a } = Ya(), l = s && !r ? { backgroundColor: a.colorPrimaryBg } : void 0, d = ee($e), { elementHasLostFocus: f } = d || {};
2870
+ const { ooui: t } = e, { id: n, decimalDigits: o, readOnly: r, required: s } = t, { token: a } = Ya(), l = s && !r ? { backgroundColor: a.colorPrimaryBg } : void 0, d = ee($e), { elementHasLostFocus: u } = d || {};
2870
2871
  return /* @__PURE__ */ i(Ce, { required: s, type: "number", ...e, children: /* @__PURE__ */ i(
2871
2872
  Wr,
2872
2873
  {
@@ -2875,26 +2876,26 @@ const Ht = ht(Ka), Bt = (e) => {
2875
2876
  style: l,
2876
2877
  id: n,
2877
2878
  precision: o,
2878
- formatter: (u) => `${u}`.replace(/[^0-9.-]+/g, ""),
2879
+ formatter: (f) => `${f}`.replace(/[^0-9.-]+/g, ""),
2879
2880
  decimalSeparator: ".",
2880
- onBlur: f,
2881
+ onBlur: u,
2881
2882
  wheel: !1
2882
2883
  }
2883
2884
  ) });
2884
2885
  }, { useToken: qa } = Ke, sn = (e) => {
2885
- const { ooui: t, onChange: n } = e, { id: o, readOnly: r, required: s } = t, { token: a } = qa(), l = s && !r ? { backgroundColor: a.colorPrimaryBg } : void 0, d = ee($e), { elementHasLostFocus: f } = d || {};
2886
+ const { ooui: t, onChange: n } = e, { id: o, readOnly: r, required: s } = t, { token: a } = qa(), l = s && !r ? { backgroundColor: a.colorPrimaryBg } : void 0, d = ee($e), { elementHasLostFocus: u } = d || {};
2886
2887
  return /* @__PURE__ */ i(Ce, { required: s, type: "number", ...e, children: /* @__PURE__ */ i(
2887
2888
  Wr,
2888
2889
  {
2889
2890
  id: o,
2890
2891
  className: "w-full ",
2891
2892
  disabled: r,
2892
- formatter: (u) => u === void 0 ? "" : typeof u == "string" && !isNaN(parseFloat(u)) ? `${Math.trunc(parseFloat(u))}`.replace(/[^0-9\-]+/g, "") : typeof u == "number" ? `${Math.trunc(u)}`.replace(/[^0-9\-]+/g, "") : "",
2893
- onChange: (u) => {
2894
- const c = u;
2893
+ formatter: (f) => f === void 0 ? "" : typeof f == "string" && !isNaN(parseFloat(f)) ? `${Math.trunc(parseFloat(f))}`.replace(/[^0-9\-]+/g, "") : typeof f == "number" ? `${Math.trunc(f)}`.replace(/[^0-9\-]+/g, "") : "",
2894
+ onChange: (f) => {
2895
+ const c = f;
2895
2896
  n == null || n(c);
2896
2897
  },
2897
- onBlur: f,
2898
+ onBlur: u,
2898
2899
  precision: 0,
2899
2900
  style: l,
2900
2901
  wheel: !1
@@ -2944,10 +2945,10 @@ const { defaultAlgorithm: Ja, defaultSeed: Xa } = Ke, Qa = Ja(Xa), { Option: Za
2944
2945
  }).map((c) => {
2945
2946
  const [h, p] = c;
2946
2947
  return /* @__PURE__ */ i(Za, { value: p, children: p }, h);
2947
- }), f = a && !s ? nl : It;
2948
- function u(c) {
2948
+ }), u = a && !s ? nl : It;
2949
+ function f(c) {
2949
2950
  const h = c.map((p) => {
2950
- const m = l.find(([g, y]) => p === y);
2951
+ const m = l.find(([y, g]) => p === g);
2951
2952
  return m && m[0];
2952
2953
  });
2953
2954
  if (h.length === 0) {
@@ -2957,10 +2958,10 @@ const { defaultAlgorithm: Ja, defaultSeed: Xa } = Ke, Qa = Ja(Xa), { Option: Za
2957
2958
  n == null || n(h);
2958
2959
  }
2959
2960
  return /* @__PURE__ */ i(
2960
- f,
2961
+ u,
2961
2962
  {
2962
2963
  disabled: s,
2963
- onChange: u,
2964
+ onChange: f,
2964
2965
  value: o == null ? void 0 : o.map((c) => r.get(c)),
2965
2966
  mode: "multiple",
2966
2967
  showArrow: !0,
@@ -3085,16 +3086,16 @@ const Dr = (e) => typeof e == "string" && e === "true" || e === "false" ? e ===
3085
3086
  const t = { ...cl(e) };
3086
3087
  return ll(e).forEach((o) => {
3087
3088
  const r = e[o], s = o.split("#")[0], a = s + "#time", l = e[a];
3088
- let d, f;
3089
+ let d, u;
3089
3090
  if (r[0] !== null && (d = r[0].format("YYYY-MM-DD"), l && l[0] !== null)) {
3090
3091
  const c = l[0].format("HH:mm:ss");
3091
3092
  d = d + " " + c;
3092
3093
  }
3093
- if (r[1] !== null && (f = r[1].format("YYYY-MM-DD"), l && l[1] !== null)) {
3094
+ if (r[1] !== null && (u = r[1].format("YYYY-MM-DD"), l && l[1] !== null)) {
3094
3095
  const c = l[1].format("HH:mm:ss");
3095
- f = f + " " + c;
3096
+ u = u + " " + c;
3096
3097
  }
3097
- t[s + "#datetime"] = [d, f];
3098
+ t[s + "#datetime"] = [d, u];
3098
3099
  }), t;
3099
3100
  }, ul = (e, t) => {
3100
3101
  const n = Object.keys(e).filter((r) => {
@@ -3130,23 +3131,23 @@ function Fo(e) {
3130
3131
  offset: a,
3131
3132
  limit: l,
3132
3133
  onLimitChange: d,
3133
- searchVisible: f,
3134
- setSearchFilterHeight: u,
3134
+ searchVisible: u,
3135
+ setSearchFilterHeight: f,
3135
3136
  searchError: c,
3136
3137
  searchValues: h,
3137
3138
  showLimitOptions: p = !0
3138
- } = e, [m, g] = v(), [y, w] = v(), [C, I] = v(!1), T = re(), { token: b } = hl(), [V] = lt.useForm();
3139
+ } = e, [m, y] = v(), [g, w] = v(), [C, I] = v(!1), T = re(), { token: b } = hl(), [V] = lt.useForm();
3139
3140
  ue(() => {
3140
3141
  V.setFieldsValue(h);
3141
3142
  }, [h]);
3142
3143
  const _ = () => {
3143
- if (!y)
3144
+ if (!g)
3144
3145
  return;
3145
- const R = C ? y : m, x = R == null ? void 0 : R.rows;
3146
+ const R = C ? g : m, x = R == null ? void 0 : R.rows;
3146
3147
  return x == null ? void 0 : x.map((O, A) => /* @__PURE__ */ i(Ve, { children: O.map((P, K) => /* @__PURE__ */ i(ge, { xs: 24, className: "p-2", xl: 6, children: /* @__PURE__ */ i(rl, { field: P }) }, K)) }, A));
3147
3148
  };
3148
3149
  bt(() => {
3149
- I(!1), T.current = new Ri(n, t), T.current.parse(), g(T.current._simpleSearchContainer), w(T.current._advancedSearchContainer);
3150
+ I(!1), T.current = new Ri(n, t), T.current.parse(), y(T.current._simpleSearchContainer), w(T.current._advancedSearchContainer);
3150
3151
  }, [t, n]);
3151
3152
  const F = _(), S = (R) => {
3152
3153
  var P;
@@ -3164,9 +3165,9 @@ function Fo(e) {
3164
3165
  bounds: !0,
3165
3166
  onResize: (R) => {
3166
3167
  var x;
3167
- u == null || u((x = R.bounds) == null ? void 0 : x.height);
3168
+ f == null || f((x = R.bounds) == null ? void 0 : x.height);
3168
3169
  },
3169
- children: ({ measureRef: R }) => /* @__PURE__ */ i("div", { ref: R, children: /* @__PURE__ */ D("div", { style: { display: f ? "block" : "none" }, children: [
3170
+ children: ({ measureRef: R }) => /* @__PURE__ */ i("div", { ref: R, children: /* @__PURE__ */ D("div", { style: { display: u ? "block" : "none" }, children: [
3170
3171
  /* @__PURE__ */ D(
3171
3172
  lt,
3172
3173
  {
@@ -3223,9 +3224,9 @@ const Er = (e, t = "14px -apple-system") => {
3223
3224
  );
3224
3225
  t.map((s) => {
3225
3226
  o.map((a, l) => {
3226
- const d = a.width, f = s[a.key] || "";
3227
- let u = Er(f);
3228
- u < d && (u = d), u > n && (u = n), o[l].width = u;
3227
+ const d = a.width, u = s[a.key] || "";
3228
+ let f = Er(u);
3229
+ f < d && (f = d), f > n && (f = n), o[l].width = f;
3229
3230
  });
3230
3231
  });
3231
3232
  const r = o.map((s) => s.width).reduce((s, a) => s + a);
@@ -3252,14 +3253,14 @@ const Er = (e, t = "14px -apple-system") => {
3252
3253
  };
3253
3254
  if (n === 0 || e < n && r <= n || t === e)
3254
3255
  return null;
3255
- const f = async (h) => {
3256
+ const u = async (h) => {
3256
3257
  h.preventDefault(), h.stopPropagation(), a(!0), await o(), a(!1);
3257
- }, u = /* @__PURE__ */ D("span", { children: [
3258
+ }, f = /* @__PURE__ */ D("span", { children: [
3258
3259
  d.recordsSelected.replace(
3259
3260
  "{numberOfSelectedRows}",
3260
3261
  e.toString()
3261
3262
  ) + " ",
3262
- s ? /* @__PURE__ */ i(je, {}) : /* @__PURE__ */ i(ys, { onClick: f, style: { fontWeight: 600 }, children: d.selectAllRecords.replace(
3263
+ s ? /* @__PURE__ */ i(je, {}) : /* @__PURE__ */ i(ys, { onClick: u, style: { fontWeight: 600 }, children: d.selectAllRecords.replace(
3263
3264
  "{totalRecords}",
3264
3265
  t.toString()
3265
3266
  ) })
@@ -3267,7 +3268,7 @@ const Er = (e, t = "14px -apple-system") => {
3267
3268
  "{totalRecords}",
3268
3269
  r.toString()
3269
3270
  ) + " " });
3270
- return /* @__PURE__ */ i(gl, { children: r > n ? c : u });
3271
+ return /* @__PURE__ */ i(gl, { children: r > n ? c : f });
3271
3272
  };
3272
3273
  function wl(e) {
3273
3274
  if (e)
@@ -3322,13 +3323,13 @@ const vl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ro,
3322
3323
  onItemClick: t,
3323
3324
  onOpenChange: n
3324
3325
  }) => {
3325
- const [o, r] = v(!1), [s, a] = v(!1), { t: l } = he(), [d, f] = v(), u = J(async () => {
3326
+ const [o, r] = v(!1), [s, a] = v(!1), { t: l } = he(), [d, u] = v(), f = J(async () => {
3326
3327
  const {
3327
3328
  actionItems: c = [],
3328
3329
  relateItems: h = [],
3329
3330
  printItems: p = []
3330
3331
  } = await e() || {};
3331
- return f({ actionItems: c, relateItems: h, printItems: p }), [
3332
+ return u({ actionItems: c, relateItems: h, printItems: p }), [
3332
3333
  {
3333
3334
  sticky: !0,
3334
3335
  items: [
@@ -3361,7 +3362,7 @@ const vl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ro,
3361
3362
  /* @__PURE__ */ i(
3362
3363
  Gi,
3363
3364
  {
3364
- onRetrieveData: u,
3365
+ onRetrieveData: f,
3365
3366
  onItemClick: (c) => {
3366
3367
  c.id === "action" ? r(!0) : c.id === "print" ? a(!0) : t == null || t({ item: c, type: "relate" });
3367
3368
  },
@@ -3422,15 +3423,15 @@ const vl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ro,
3422
3423
  }, lr = (e) => {
3423
3424
  const { id: t, model: n, context: o = {} } = e, [r, s] = v(), [a, l] = v(), d = ee(
3424
3425
  dt
3425
- ), { openRelate: f } = d || {}, u = ee(
3426
+ ), { openRelate: u } = d || {}, f = ee(
3426
3427
  $t
3427
- ), { processAction: c } = u || {}, [h, p] = Je(
3428
+ ), { processAction: c } = f || {}, [h, p] = Je(
3428
3429
  E.getHandler().getView
3429
- ), [m, g] = Je(
3430
+ ), [m, y] = Je(
3430
3431
  E.getHandler().readObjects
3431
- ), y = J(() => {
3432
- p(), g();
3433
- }, [p, g]), w = J(async () => {
3432
+ ), g = J(() => {
3433
+ p(), y();
3434
+ }, [p, y]), w = J(async () => {
3434
3435
  var V;
3435
3436
  const I = await h({
3436
3437
  model: n,
@@ -3477,7 +3478,7 @@ const vl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ro,
3477
3478
  });
3478
3479
  break;
3479
3480
  case "relate":
3480
- f({
3481
+ u({
3481
3482
  relateData: I,
3482
3483
  action_id: I.id,
3483
3484
  action_type: I.type,
@@ -3492,7 +3493,7 @@ const vl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ro,
3492
3493
  onRetrieveData: w,
3493
3494
  onItemClick: C,
3494
3495
  onOpenChange: (I) => {
3495
- I || y();
3496
+ I || g();
3496
3497
  }
3497
3498
  }
3498
3499
  );
@@ -3514,13 +3515,13 @@ const vl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ro,
3514
3515
  /* @__PURE__ */ i(lr, { id: t.id, model: t.model })
3515
3516
  ] }) : /* @__PURE__ */ i(oe, {});
3516
3517
  }, Tl = (e) => {
3517
- const { value: t, context: n, selectionValues: o } = e, [r, s] = v(), [a, l] = v(!1), [d, f] = t ? t.split(",") : [], u = parseInt(f), c = J(async () => {
3518
+ const { value: t, context: n, selectionValues: o } = e, [r, s] = v(), [a, l] = v(!1), [d, u] = t ? t.split(",") : [], f = parseInt(u), c = J(async () => {
3518
3519
  if (!t || t && r)
3519
3520
  return;
3520
3521
  l(!0);
3521
3522
  const p = await E.getHandler().execute({
3522
3523
  action: "name_get",
3523
- payload: [u],
3524
+ payload: [f],
3524
3525
  model: d,
3525
3526
  context: n
3526
3527
  });
@@ -3536,7 +3537,7 @@ const vl = (e) => /* @__PURE__ */ i(Ce, { ...e, children: /* @__PURE__ */ i(Ro,
3536
3537
  return /* @__PURE__ */ D(Ue, { children: [
3537
3538
  /* @__PURE__ */ i(oe, { children: `${h}:` }),
3538
3539
  /* @__PURE__ */ i(oe, { children: r }),
3539
- /* @__PURE__ */ i(lr, { id: u, model: d })
3540
+ /* @__PURE__ */ i(lr, { id: f, model: d })
3540
3541
  ] });
3541
3542
  };
3542
3543
  et.extend(os);
@@ -3570,25 +3571,25 @@ const Fl = (e) => {
3570
3571
  const { ooui: t, showTime: n = !1 } = e, { required: o } = t;
3571
3572
  return /* @__PURE__ */ i(Ce, { required: o, ...e, children: /* @__PURE__ */ i(Rl, { ooui: t, showTime: n }) });
3572
3573
  }, Rl = (e) => {
3573
- const { value: t, onChange: n, ooui: o, showTime: r } = e, { id: s, readOnly: a, required: l } = o, { token: d } = Il(), f = l && !a ? { backgroundColor: d.colorPrimaryBg } : void 0, u = r ? "time" : "date", c = (m) => {
3574
+ const { value: t, onChange: n, ooui: o, showTime: r } = e, { id: s, readOnly: a, required: l } = o, { token: d } = Il(), u = l && !a ? { backgroundColor: d.colorPrimaryBg } : void 0, f = r ? "time" : "date", c = (m) => {
3574
3575
  n == null || n(m);
3575
3576
  }, h = (m) => {
3576
3577
  if (m == null) {
3577
3578
  c(m);
3578
3579
  return;
3579
3580
  }
3580
- c(m.format(ft[u].dateInternalFormat));
3581
- }, p = t ? et(t, ft[u].dateInternalFormat) : void 0;
3581
+ c(m.format(ft[f].dateInternalFormat));
3582
+ }, p = t ? et(t, ft[f].dateInternalFormat) : void 0;
3582
3583
  return /* @__PURE__ */ i(
3583
3584
  Kn,
3584
3585
  {
3585
- style: { width: "100%", ...f },
3586
+ style: { width: "100%", ...u },
3586
3587
  placeholder: r ? ft.time.placeholder : ft.date.placeholder,
3587
3588
  disabled: a,
3588
3589
  id: s,
3589
3590
  picker: "date",
3590
3591
  showTime: r,
3591
- format: ft[u].dateDisplayFormat,
3592
+ format: ft[f].dateDisplayFormat,
3592
3593
  value: p,
3593
3594
  onChange: h,
3594
3595
  showNow: !1,
@@ -3693,34 +3694,31 @@ const Fl = (e) => {
3693
3694
  ooui: n,
3694
3695
  context: o
3695
3696
  }) => {
3696
- const [r, s] = v([]), [a, l] = v(!1), { relation: d, field: f } = n, u = J(async () => {
3697
+ const [r, s] = v([]), [a, l] = v(!1), { relation: d, field: u } = n, f = J(async () => {
3697
3698
  try {
3698
3699
  l(!0);
3699
3700
  const h = await E.getHandler().search({
3700
3701
  model: d,
3701
3702
  params: [["id", "in", e.items.map((p) => p.id)]],
3702
- fields: [f],
3703
+ fields: [u],
3703
3704
  context: o
3704
3705
  });
3705
3706
  s(
3706
- h.map((p) => {
3707
- const { id: m, name: g } = p;
3708
- return { id: m, name: g };
3709
- })
3707
+ h.map((p) => ({ id: p.id, name: p[u] }))
3710
3708
  );
3711
3709
  } catch (h) {
3712
3710
  console.error("Error loading data", h);
3713
3711
  } finally {
3714
3712
  l(!1);
3715
3713
  }
3716
- }, [o, f, d, e.items]);
3714
+ }, [o, u, d, e.items]);
3717
3715
  ue(() => {
3718
- e != null && e.items && (e == null ? void 0 : e.items.length) > 0 && u();
3716
+ e != null && e.items && (e == null ? void 0 : e.items.length) > 0 && f();
3719
3717
  }, [e == null ? void 0 : e.items]);
3720
3718
  const c = Fe(
3721
3719
  () => r.map((h) => {
3722
- const { id: p, name: m } = h, g = zt(m);
3723
- return /* @__PURE__ */ i(ar, { color: g, children: m }, `${p}`);
3720
+ const { id: p, name: m } = h, y = zt(m);
3721
+ return /* @__PURE__ */ i(ar, { color: y, children: m }, `${p}`);
3724
3722
  }),
3725
3723
  [r]
3726
3724
  );
@@ -3764,14 +3762,14 @@ const Fl = (e) => {
3764
3762
  results: a,
3765
3763
  onRequestPageChange: l,
3766
3764
  loading: d,
3767
- onRowClicked: f,
3768
- showPagination: u = !0,
3765
+ onRowClicked: u,
3766
+ showPagination: f = !0,
3769
3767
  selectedRowKeys: c = [],
3770
3768
  onRowSelectionChange: h,
3771
3769
  scrollY: p,
3772
3770
  colorsForResults: m = {},
3773
- statusForResults: g = {},
3774
- onChangeSort: y,
3771
+ statusForResults: y = {},
3772
+ onChangeSort: g,
3775
3773
  sorter: w,
3776
3774
  onFetchChildrenForRecord: C,
3777
3775
  childField: I,
@@ -3809,7 +3807,7 @@ const Fl = (e) => {
3809
3807
  K.current = o;
3810
3808
  }, [o]);
3811
3809
  const U = (n - 1) * K.current + 1, X = U - 1 + S.length, z = r === void 0 ? null : r === 0 ? P("no_results") : P("summary").replace("{from}", U == null ? void 0 : U.toString()).replace("{to}", X == null ? void 0 : X.toString()).replace("{total}", r == null ? void 0 : r.toString()), H = Fe(() => {
3812
- if (!u || s.isExpandable)
3810
+ if (!f || s.isExpandable)
3813
3811
  return null;
3814
3812
  const Z = S == null ? void 0 : S.filter(
3815
3813
  (ne) => c && c.includes(ne.id)
@@ -3844,7 +3842,7 @@ const Fl = (e) => {
3844
3842
  _,
3845
3843
  n,
3846
3844
  c,
3847
- u,
3845
+ f,
3848
3846
  z,
3849
3847
  r,
3850
3848
  s.isExpandable
@@ -3878,13 +3876,13 @@ const Fl = (e) => {
3878
3876
  if (m[Z.id])
3879
3877
  return { color: m[Z.id] };
3880
3878
  },
3881
- onRowStatus: ia(g) ? (Z) => {
3882
- if (g[Z.id])
3883
- return /* @__PURE__ */ i(Ci, { color: g[Z.id] });
3879
+ onRowStatus: ia(y) ? (Z) => {
3880
+ if (y[Z.id])
3881
+ return /* @__PURE__ */ i(Ci, { color: y[Z.id] });
3884
3882
  } : void 0,
3885
- onRowDoubleClick: f,
3883
+ onRowDoubleClick: u,
3886
3884
  onRowSelectionChange: h,
3887
- onChangeSort: y,
3885
+ onChangeSort: g,
3888
3886
  sorter: w,
3889
3887
  readonly: V,
3890
3888
  expandableOpts: C ? {
@@ -3912,14 +3910,14 @@ const Ao = (e) => {
3912
3910
  setTreeIsLoading: a,
3913
3911
  nameSearch: l,
3914
3912
  searchNameGetDoneRef: d,
3915
- context: f,
3916
- setActionViewTotalItems: u,
3913
+ context: u,
3914
+ setActionViewTotalItems: f,
3917
3915
  treeView: c,
3918
3916
  formView: h,
3919
3917
  sorter: p,
3920
3918
  setSorter: m,
3921
- setCurrentItemIndex: g,
3922
- setResultsActionView: y,
3919
+ setCurrentItemIndex: y,
3920
+ setResultsActionView: g,
3923
3921
  resultsActionView: w,
3924
3922
  domain: C,
3925
3923
  currentId: I,
@@ -3930,18 +3928,18 @@ const Ao = (e) => {
3930
3928
  clearSelection: F
3931
3929
  } = e, [S, R] = v(!1), [x, O] = v(!1), [A, P] = v(), [K, j] = v(1), [W, k] = v(0), [Y, U] = v(), [X, z] = v([]), [H, M] = v(void 0), [L, $] = v(void 0), de = re(T || Ft), Z = re([]), ne = J(
3932
3930
  (ae) => {
3933
- y == null || y([...ae]), z([...ae]);
3931
+ g == null || g([...ae]), z([...ae]);
3934
3932
  },
3935
- [y]
3933
+ [g]
3936
3934
  ), ye = J(() => w || X, [w, X]), Q = J(async () => {
3937
3935
  const ae = await E.getHandler().nameSearch({
3938
3936
  model: t,
3939
3937
  payload: l,
3940
3938
  limit: de.current,
3941
3939
  attrs: C,
3942
- context: f
3940
+ context: u
3943
3941
  });
3944
- if (U(ae.length), u == null || u(ae.length), ae.length > 0) {
3942
+ if (U(ae.length), f == null || f(ae.length), ae.length > 0) {
3945
3943
  const me = ae.map((be) => be == null ? void 0 : be[0]), { colors: Ee, status: He } = Tt(c), G = {};
3946
3944
  Ee && (G.colors = Ee), He && (G.status = He);
3947
3945
  const ve = await E.getHandler().readEvalUiObjects({
@@ -3949,7 +3947,7 @@ const Ao = (e) => {
3949
3947
  ids: me,
3950
3948
  arch: c == null ? void 0 : c.arch,
3951
3949
  fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
3952
- context: f,
3950
+ context: u,
3953
3951
  attrs: G
3954
3952
  }), ke = ve[0];
3955
3953
  Z.current = [...ke], M(qt(ve[1])), $(Rr(ve[1]));
@@ -3958,22 +3956,22 @@ const Ao = (e) => {
3958
3956
  sorter: p,
3959
3957
  fields: { ...c.fields, ...h.fields }
3960
3958
  }) : [...Z.current];
3961
- ne(we), pe.length > 0 ? g == null || g(0) : g == null || g(void 0);
3959
+ ne(we), pe.length > 0 ? y == null || y(0) : y == null || y(void 0);
3962
3960
  } else
3963
- ne([]), g == null || g(void 0);
3961
+ ne([]), y == null || y(void 0);
3964
3962
  R(!1), d.current = !0;
3965
3963
  }, [
3966
3964
  ne,
3967
3965
  d,
3968
3966
  l,
3969
3967
  t,
3970
- f,
3968
+ u,
3971
3969
  C,
3972
3970
  c,
3973
3971
  h,
3974
3972
  p,
3975
- g,
3976
- u
3973
+ y,
3974
+ f
3977
3975
  ]), se = J(
3978
3976
  async (ae) => {
3979
3977
  const { params: me, newOffset: Ee } = ae || {}, He = Jt(me || V, C), { colors: G, status: ve } = Tt(c), ke = {};
@@ -3984,7 +3982,7 @@ const Ao = (e) => {
3984
3982
  offset: Ee || W,
3985
3983
  model: t,
3986
3984
  fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
3987
- context: f,
3985
+ context: u,
3988
3986
  attrs: ke
3989
3987
  });
3990
3988
  M(qt(be)), $(Rr(be)), Z.current = [...we];
@@ -3997,25 +3995,25 @@ const Ao = (e) => {
3997
3995
  const Me = ce.findIndex(
3998
3996
  (q) => I === q.id
3999
3997
  );
4000
- Me === -1 ? g == null || g(0) : g == null || g(Me);
3998
+ Me === -1 ? y == null || y(0) : y == null || y(Me);
4001
3999
  } else
4002
- g == null || g(void 0);
4000
+ y == null || y(void 0);
4003
4001
  R(!1);
4004
4002
  const We = await pe;
4005
- U(We), u == null || u(We);
4003
+ U(We), f == null || f(We);
4006
4004
  },
4007
4005
  [
4008
- g,
4006
+ y,
4009
4007
  w,
4010
4008
  ne,
4011
4009
  I,
4012
4010
  t,
4013
- f,
4011
+ u,
4014
4012
  C,
4015
4013
  c,
4016
4014
  h,
4017
4015
  p,
4018
- u,
4016
+ f,
4019
4017
  W,
4020
4018
  V
4021
4019
  ]
@@ -4096,17 +4094,17 @@ const Ao = (e) => {
4096
4094
  model: t,
4097
4095
  ids: me,
4098
4096
  fields: c.field_parent ? { ...c.fields, [c.field_parent]: {} } : c.fields,
4099
- context: f
4097
+ context: u
4100
4098
  });
4101
4099
  return ne([...ye(), ...Ee]), ir(Tt(c), Ee);
4102
4100
  },
4103
- [c, t, f, ye, ne]
4101
+ [c, t, u, ye, ne]
4104
4102
  ), Le = J(async () => await E.getHandler().searchAllIds({
4105
4103
  params: Jt(V, C),
4106
4104
  model: t,
4107
- context: f,
4105
+ context: u,
4108
4106
  totalItems: Y
4109
- }), [t, f, Y, V, C]);
4107
+ }), [t, u, Y, V, C]);
4110
4108
  return {
4111
4109
  submit: De,
4112
4110
  clear: fe,
@@ -4137,11 +4135,11 @@ function Bl(e, t) {
4137
4135
  nameSearch: a,
4138
4136
  treeScrollY: l,
4139
4137
  domain: d = [],
4140
- visible: f = !0,
4141
- rootTree: u = !1,
4138
+ visible: u = !0,
4139
+ rootTree: f = !1,
4142
4140
  parentContext: c = {},
4143
4141
  onChangeSelectedRowKeys: h
4144
- } = e, [p, m] = v(!1), [g, y] = v(!1), w = re(!1), C = re(null), [I, T] = v(), [b, V] = v(), [_, F] = v(), [S, R] = v(), [x, O] = v(200), A = re(), { height: P } = gn(), K = ee(
4142
+ } = e, [p, m] = v(!1), [y, g] = v(!1), w = re(!1), C = re(null), [I, T] = v(), [b, V] = v(), [_, F] = v(), [S, R] = v(), [x, O] = v(200), A = re(), { height: P } = gn(), K = ee(
4145
4143
  $t
4146
4144
  ), { processAction: j } = K || {}, W = ee(
4147
4145
  nt
@@ -4165,7 +4163,7 @@ function Bl(e, t) {
4165
4163
  setSearchValues: Ae = void 0,
4166
4164
  limit: De = Ft,
4167
4165
  setLimit: Pe = void 0
4168
- } = (u ? W : {}) || {}, fe = J(
4166
+ } = (f ? W : {}) || {}, fe = J(
4169
4167
  (Be) => {
4170
4168
  H == null || H(Be.map((ot) => ({ id: ot }))), h == null || h(Be);
4171
4169
  },
@@ -4221,12 +4219,12 @@ function Bl(e, t) {
4221
4219
  getFields: () => b == null ? void 0 : b.fields,
4222
4220
  getDomain: () => d
4223
4221
  })), ue(() => {
4224
- g && f && b && (w.current = !1, ae());
4225
- }, [G, ke, g, f, a, b]);
4222
+ y && u && b && (w.current = !1, ae());
4223
+ }, [G, ke, y, u, a, b]);
4226
4224
  const Oe = async () => {
4227
- y(!1), m(!0), R(void 0), se == null || se(!0);
4225
+ g(!1), m(!0), R(void 0), se == null || se(!0);
4228
4226
  try {
4229
- await Te(), y(!0);
4227
+ await Te(), g(!0);
4230
4228
  } catch (Be) {
4231
4229
  R(Be), se == null || se(!1);
4232
4230
  } finally {
@@ -4343,7 +4341,7 @@ function Bl(e, t) {
4343
4341
  onChangeSort: be,
4344
4342
  onFetchChildrenForRecord: b.isExpandable ? ce : void 0,
4345
4343
  childField: b.field_parent,
4346
- rootTree: u,
4344
+ rootTree: f,
4347
4345
  onSelectAllRecords: Ge
4348
4346
  }
4349
4347
  )
@@ -4364,7 +4362,7 @@ function Bl(e, t) {
4364
4362
  G,
4365
4363
  c,
4366
4364
  we,
4367
- u,
4365
+ f,
4368
4366
  He,
4369
4367
  Ee,
4370
4368
  xe,
@@ -4379,7 +4377,7 @@ function Bl(e, t) {
4379
4377
  l,
4380
4378
  b
4381
4379
  ]), Kt = S || He;
4382
- return Kt ? /* @__PURE__ */ i(Qe, { className: "mt-10", message: Kt, type: "error", banner: !0 }) : /* @__PURE__ */ i("div", { style: f ? {} : { display: "none" }, children: p ? /* @__PURE__ */ i(je, {}) : tn() });
4380
+ return Kt ? /* @__PURE__ */ i(Qe, { className: "mt-10", message: Kt, type: "error", banner: !0 }) : /* @__PURE__ */ i("div", { style: u ? {} : { display: "none" }, children: p ? /* @__PURE__ */ i(je, {}) : tn() });
4383
4381
  }
4384
4382
  const Do = ht(Bl), cr = (e) => {
4385
4383
  const {
@@ -4390,15 +4388,15 @@ const Do = ht(Bl), cr = (e) => {
4390
4388
  nameSearch: s,
4391
4389
  domain: a,
4392
4390
  context: l = {}
4393
- } = e, [d, f] = v(!1), { modalWidth: u, modalHeight: c } = gn(), { t: h } = he(), [p, m] = v([]), g = async () => {
4391
+ } = e, [d, u] = v(!1), { modalWidth: f, modalHeight: c } = gn(), { t: h } = he(), [p, m] = v([]), y = async () => {
4394
4392
  await new Promise((I) => setTimeout(I, 5)), n();
4395
- }, y = async (I) => {
4393
+ }, g = async (I) => {
4396
4394
  const { id: T } = I;
4397
4395
  o([T]);
4398
4396
  };
4399
4397
  function w() {
4400
4398
  if (p.length === 0) {
4401
- g();
4399
+ y();
4402
4400
  return;
4403
4401
  }
4404
4402
  o(p);
@@ -4409,7 +4407,7 @@ const Do = ht(Bl), cr = (e) => {
4409
4407
  {
4410
4408
  model: r,
4411
4409
  nameSearch: s,
4412
- onRowClicked: y,
4410
+ onRowClicked: g,
4413
4411
  treeScrollY: c * 0.3,
4414
4412
  domain: a,
4415
4413
  parentContext: l,
@@ -4423,7 +4421,7 @@ const Do = ht(Bl), cr = (e) => {
4423
4421
  {
4424
4422
  icon: /* @__PURE__ */ i(mn, {}),
4425
4423
  onClick: () => {
4426
- f(!0);
4424
+ u(!0);
4427
4425
  },
4428
4426
  children: h("new")
4429
4427
  }
@@ -4439,7 +4437,7 @@ const Do = ht(Bl), cr = (e) => {
4439
4437
  children: h("ok")
4440
4438
  }
4441
4439
  ),
4442
- /* @__PURE__ */ i(Ne, { icon: /* @__PURE__ */ i(Xt, {}), onClick: g, children: h("cancel") })
4440
+ /* @__PURE__ */ i(Ne, { icon: /* @__PURE__ */ i(Xt, {}), onClick: y, children: h("cancel") })
4443
4441
  ] }) })
4444
4442
  ] });
4445
4443
  return /* @__PURE__ */ D(oe, { children: [
@@ -4448,10 +4446,10 @@ const Do = ht(Bl), cr = (e) => {
4448
4446
  {
4449
4447
  title: h("search"),
4450
4448
  centered: !0,
4451
- width: u,
4449
+ width: f,
4452
4450
  open: t && !d,
4453
4451
  closable: !0,
4454
- onCancel: g,
4452
+ onCancel: y,
4455
4453
  footer: null,
4456
4454
  destroyOnClose: !0,
4457
4455
  maskClosable: !1,
@@ -4465,10 +4463,10 @@ const Do = ht(Bl), cr = (e) => {
4465
4463
  visible: d,
4466
4464
  parentContext: l,
4467
4465
  onSubmitSucceed: (I) => {
4468
- f(!1), g(), o([I]);
4466
+ u(!1), y(), o([I]);
4469
4467
  },
4470
4468
  onCancel: () => {
4471
- f(!1), g();
4469
+ u(!1), y();
4472
4470
  }
4473
4471
  }
4474
4472
  )
@@ -4497,8 +4495,8 @@ const Do = ht(Bl), cr = (e) => {
4497
4495
  readOnly: a,
4498
4496
  context: l,
4499
4497
  id: d,
4500
- domain: f
4501
- } = o, u = r && !a ? { backgroundColor: Eo.colorPrimaryBg } : void 0, [c, h] = v(!1), [p, m] = v(!1), [g, y] = v(!1), [w, C] = v(), I = re(!1), [T, b] = v(""), V = re(), _ = ee($e), { domain: F, getValues: S, getFields: R, getContext: x, elementHasLostFocus: O } = _ || {}, A = re([]), [P, K] = v([]), j = t && t[0] || void 0, W = t && t[1] || "";
4498
+ domain: u
4499
+ } = o, f = r && !a ? { backgroundColor: Eo.colorPrimaryBg } : void 0, [c, h] = v(!1), [p, m] = v(!1), [y, g] = v(!1), [w, C] = v(), I = re(!1), [T, b] = v(""), V = re(), _ = ee($e), { domain: F, getValues: S, getFields: R, getContext: x, elementHasLostFocus: O } = _ || {}, A = re([]), [P, K] = v([]), j = t && t[0] || void 0, W = t && t[1] || "";
4502
4500
  ue(() => {
4503
4501
  !Array.isArray(t) && t && z(t);
4504
4502
  }, [t]), ue(() => {
@@ -4509,12 +4507,12 @@ const Do = ht(Bl), cr = (e) => {
4509
4507
  }, Y = ($) => {
4510
4508
  V.current = $.target.value, k([void 0, ""]);
4511
4509
  }, U = async () => {
4512
- if (!g && T !== W) {
4510
+ if (!y && T !== W) {
4513
4511
  if (await new Promise(($) => setTimeout($, 100)), I.current) {
4514
4512
  k([void 0, ""]);
4515
4513
  return;
4516
4514
  }
4517
- y(!0);
4515
+ g(!0);
4518
4516
  try {
4519
4517
  if (A.current && A.current.length > 0)
4520
4518
  X(V.current);
@@ -4529,7 +4527,7 @@ const Do = ht(Bl), cr = (e) => {
4529
4527
  } catch ($) {
4530
4528
  an($);
4531
4529
  } finally {
4532
- y(!1);
4530
+ g(!1);
4533
4531
  }
4534
4532
  }
4535
4533
  }, X = async ($) => {
@@ -4545,7 +4543,7 @@ const Do = ht(Bl), cr = (e) => {
4545
4543
  }
4546
4544
  C($), h(!0);
4547
4545
  }, z = async ($) => {
4548
- y(!0);
4546
+ g(!0);
4549
4547
  try {
4550
4548
  const de = await E.getHandler().execute({
4551
4549
  action: "name_get",
@@ -4557,12 +4555,12 @@ const Do = ht(Bl), cr = (e) => {
4557
4555
  } catch (de) {
4558
4556
  an(de);
4559
4557
  } finally {
4560
- y(!1);
4558
+ g(!1);
4561
4559
  }
4562
4560
  };
4563
4561
  async function H() {
4564
- f && (A.current = await E.getHandler().evalDomain({
4565
- domain: f,
4562
+ u && (A.current = await E.getHandler().evalDomain({
4563
+ domain: u,
4566
4564
  values: Rt({
4567
4565
  fields: R(),
4568
4566
  values: S()
@@ -4588,7 +4586,7 @@ const Do = ht(Bl), cr = (e) => {
4588
4586
  disabled: a,
4589
4587
  onChange: Y,
4590
4588
  style: {
4591
- ...u,
4589
+ ...f,
4592
4590
  borderTopRightRadius: 0,
4593
4591
  borderBottomRightRadius: 0
4594
4592
  },
@@ -4619,8 +4617,8 @@ const Do = ht(Bl), cr = (e) => {
4619
4617
  /* @__PURE__ */ i(ge, { flex: "none", style: { paddingLeft: 0 }, children: /* @__PURE__ */ i(
4620
4618
  Ne,
4621
4619
  {
4622
- icon: g ? /* @__PURE__ */ i(gt, {}) : /* @__PURE__ */ i(Jn, {}),
4623
- disabled: a || g,
4620
+ icon: y ? /* @__PURE__ */ i(gt, {}) : /* @__PURE__ */ i(Jn, {}),
4621
+ disabled: a || y,
4624
4622
  onClick: () => {
4625
4623
  I.current = !0, X(W);
4626
4624
  },
@@ -4688,7 +4686,7 @@ const Do = ht(Bl), cr = (e) => {
4688
4686
  }
4689
4687
  );
4690
4688
  }, ln = 0.7, cn = 30, Mo = (e) => {
4691
- const [t, n] = v(0), [o, r] = v(0), { value: s, totalValue: a, percent: l, color: d, icon: f, suffix: u, showPercent: c } = e;
4689
+ const [t, n] = v(0), [o, r] = v(0), { value: s, totalValue: a, percent: l, color: d, icon: u, suffix: f, showPercent: c } = e;
4692
4690
  return /* @__PURE__ */ i(
4693
4691
  rr,
4694
4692
  {
@@ -4707,8 +4705,8 @@ const Do = ht(Bl), cr = (e) => {
4707
4705
  height: t,
4708
4706
  width: o,
4709
4707
  color: d,
4710
- icon: f,
4711
- suffix: u
4708
+ icon: u,
4709
+ suffix: f
4712
4710
  }
4713
4711
  ) : /* @__PURE__ */ i(
4714
4712
  ql,
@@ -4719,8 +4717,8 @@ const Do = ht(Bl), cr = (e) => {
4719
4717
  height: t,
4720
4718
  width: o,
4721
4719
  color: d,
4722
- icon: f,
4723
- suffix: u
4720
+ icon: u,
4721
+ suffix: f
4724
4722
  }
4725
4723
  )
4726
4724
  }
@@ -4741,12 +4739,12 @@ function ql({
4741
4739
  suffix: l
4742
4740
  }) {
4743
4741
  let d = n * ln < cn ? cn : n * ln;
4744
- const f = r == null ? void 0 : r.toLocaleString("es-ES", {
4742
+ const u = r == null ? void 0 : r.toLocaleString("es-ES", {
4745
4743
  useGrouping: !0
4746
- }), u = o == null ? void 0 : o.toLocaleString("es-ES", {
4744
+ }), f = o == null ? void 0 : o.toLocaleString("es-ES", {
4747
4745
  useGrouping: !0
4748
4746
  });
4749
- let c = o ? `${f}/${u}` : `${f}`;
4747
+ let c = o ? `${u}/${f}` : `${u}`;
4750
4748
  l && (c += " " + l);
4751
4749
  let h = Po(
4752
4750
  c,
@@ -4784,8 +4782,8 @@ function zl({
4784
4782
  icon: l,
4785
4783
  suffix: d
4786
4784
  }) {
4787
- const f = t * 0.65;
4788
- let u = f * ln < cn ? cn : f * ln;
4785
+ const u = t * 0.65;
4786
+ let f = u * ln < cn ? cn : u * ln;
4789
4787
  const c = s == null ? void 0 : s.toLocaleString("es-ES", {
4790
4788
  useGrouping: !0
4791
4789
  });
@@ -4798,10 +4796,10 @@ function zl({
4798
4796
  })}%`;
4799
4797
  let m = Po(
4800
4798
  p,
4801
- `bold ${Math.floor(u * 1.03)}px sans-serif`
4799
+ `bold ${Math.floor(f * 1.03)}px sans-serif`
4802
4800
  );
4803
- l && (m = m * 1.5), (m >= n * 0.85 || u * 2 < f) && (u = n * 0.85 / m * u);
4804
- const g = l && ct(l, { style: { fontSize: u } });
4801
+ l && (m = m * 1.5), (m >= n * 0.85 || f * 2 < u) && (f = n * 0.85 / m * f);
4802
+ const y = l && ct(l, { style: { fontSize: f } });
4805
4803
  return /* @__PURE__ */ i(
4806
4804
  "div",
4807
4805
  {
@@ -4817,14 +4815,14 @@ function zl({
4817
4815
  padding: "0.2rem"
4818
4816
  },
4819
4817
  children: /* @__PURE__ */ D(Ve, { align: "middle", children: [
4820
- g && /* @__PURE__ */ i(ge, { style: { fontSize: u * 1, color: a, paddingRight: "10px" }, children: /* @__PURE__ */ i(g, {}) }),
4818
+ y && /* @__PURE__ */ i(ge, { style: { fontSize: f * 1, color: a, paddingRight: "10px" }, children: /* @__PURE__ */ i(y, {}) }),
4821
4819
  /* @__PURE__ */ D(ge, { children: [
4822
- /* @__PURE__ */ i(kn, { style: { fontSize: u * 0.8, margin: 0, color: a }, children: g ? ` ${o}%` : `${o}%` }),
4820
+ /* @__PURE__ */ i(kn, { style: { fontSize: f * 0.8, margin: 0, color: a }, children: y ? ` ${o}%` : `${o}%` }),
4823
4821
  /* @__PURE__ */ i(
4824
4822
  kn,
4825
4823
  {
4826
4824
  style: {
4827
- fontSize: u * 0.4,
4825
+ fontSize: f * 0.4,
4828
4826
  margin: 0,
4829
4827
  color: a,
4830
4828
  textAlign: "center"
@@ -4859,10 +4857,10 @@ const wn = () => /* @__PURE__ */ i(
4859
4857
  showPercent: a = !1,
4860
4858
  icon: l,
4861
4859
  suffix: d,
4862
- field: f,
4863
- operator: u,
4860
+ field: u,
4861
+ operator: f,
4864
4862
  manualIds: c
4865
- } = e, [h, p] = v(!1), [m, g] = v(), [y, w] = v(), [C, I] = v(), [T, b] = v(), [V, _] = v(), [F, S] = v(), [R] = Je(
4863
+ } = e, [h, p] = v(!1), [m, y] = v(), [g, w] = v(), [C, I] = v(), [T, b] = v(), [V, _] = v(), [F, S] = v(), [R] = Je(
4866
4864
  E.getHandler().searchAllIds
4867
4865
  ), [x] = Je(
4868
4866
  E.getHandler().readObjects
@@ -4882,7 +4880,7 @@ const wn = () => /* @__PURE__ */ i(
4882
4880
  }) {
4883
4881
  if (Y)
4884
4882
  return await j({ domain: k });
4885
- if (f && u) {
4883
+ if (u && f) {
4886
4884
  const U = c || await R({
4887
4885
  params: k,
4888
4886
  model: t,
@@ -4890,12 +4888,12 @@ const wn = () => /* @__PURE__ */ i(
4890
4888
  }), X = await x({
4891
4889
  model: t,
4892
4890
  ids: U,
4893
- fieldsToRetrieve: [f],
4891
+ fieldsToRetrieve: [u],
4894
4892
  context: o
4895
4893
  });
4896
4894
  return Pr({
4897
- values: X.map((z) => z[f]),
4898
- operator: u
4895
+ values: X.map((z) => z[u]),
4896
+ operator: f
4899
4897
  });
4900
4898
  } else
4901
4899
  return c ? c.length : await O({
@@ -4905,7 +4903,7 @@ const wn = () => /* @__PURE__ */ i(
4905
4903
  });
4906
4904
  }
4907
4905
  async function j({ domain: k }) {
4908
- if (f && u) {
4906
+ if (u && f) {
4909
4907
  const Y = await R({
4910
4908
  params: k,
4911
4909
  model: t,
@@ -4913,12 +4911,12 @@ const wn = () => /* @__PURE__ */ i(
4913
4911
  }), U = await x({
4914
4912
  model: t,
4915
4913
  ids: Y,
4916
- fieldsToRetrieve: [f],
4914
+ fieldsToRetrieve: [u],
4917
4915
  context: o
4918
4916
  });
4919
4917
  return Pr({
4920
- values: U.map((X) => X[f]),
4921
- operator: u
4918
+ values: U.map((X) => X[u]),
4919
+ operator: f
4922
4920
  });
4923
4921
  } else
4924
4922
  return await O({
@@ -4932,7 +4930,7 @@ const wn = () => /* @__PURE__ */ i(
4932
4930
  let k, Y;
4933
4931
  try {
4934
4932
  const U = await K({ domain: n, isTotal: !1 });
4935
- if (g(U), s) {
4933
+ if (y(U), s) {
4936
4934
  const X = await A({
4937
4935
  domain: s,
4938
4936
  values: {},
@@ -4972,7 +4970,7 @@ const wn = () => /* @__PURE__ */ i(
4972
4970
  {
4973
4971
  value: m,
4974
4972
  totalValue: C,
4975
- percent: y,
4973
+ percent: g,
4976
4974
  color: T,
4977
4975
  icon: V,
4978
4976
  suffix: d,
@@ -4988,12 +4986,12 @@ const wn = () => /* @__PURE__ */ i(
4988
4986
  limit: s,
4989
4987
  uninformedString: a,
4990
4988
  manualIds: l
4991
- } = e, [d, f] = v(!1), [u, c] = v(), [h, p] = v(), [m, g] = v(), [y, w] = v("line"), [C] = Je(
4989
+ } = e, [d, u] = v(!1), [f, c] = v(), [h, p] = v(), [m, y] = v(), [g, w] = v("line"), [C] = Je(
4992
4990
  E.getHandler().getFields
4993
4991
  ), [I] = Je(
4994
4992
  E.getHandler().readObjects
4995
4993
  ), [T] = Je(E.getHandler().search), b = J(async () => {
4996
- f(!0), c(void 0);
4994
+ u(!0), c(void 0);
4997
4995
  const V = Gn(r);
4998
4996
  w(V.type || "line");
4999
4997
  const _ = Ql({ ooui: V });
@@ -5014,20 +5012,20 @@ const wn = () => /* @__PURE__ */ i(
5014
5012
  }
5015
5013
  }));
5016
5014
  } catch (R) {
5017
- c("Error fetching graph data values: " + JSON.stringify(R)), f(!1);
5015
+ c("Error fetching graph data values: " + JSON.stringify(R)), u(!1);
5018
5016
  return;
5019
5017
  }
5020
5018
  try {
5021
5019
  if (!F || !S)
5022
- return c("No values or fields returned"), f(!1), {
5020
+ return c("No values or fields returned"), u(!1), {
5023
5021
  loading: d,
5024
- error: u,
5025
- type: y,
5022
+ error: f,
5023
+ type: g,
5026
5024
  values: h,
5027
5025
  evaluatedEntries: m,
5028
5026
  fetchData: b
5029
5027
  };
5030
- g(F);
5028
+ y(F);
5031
5029
  const R = Xl({
5032
5030
  ooui: V,
5033
5031
  values: F,
@@ -5038,14 +5036,14 @@ const wn = () => /* @__PURE__ */ i(
5038
5036
  });
5039
5037
  c(void 0), p(R);
5040
5038
  } catch (R) {
5041
- c("Error processing graph data: " + R), f(!1);
5039
+ c("Error processing graph data: " + R), u(!1);
5042
5040
  return;
5043
5041
  }
5044
- f(!1);
5042
+ u(!1);
5045
5043
  }, [
5046
5044
  o,
5047
5045
  n,
5048
- u,
5046
+ f,
5049
5047
  m,
5050
5048
  C,
5051
5049
  s,
@@ -5055,14 +5053,14 @@ const wn = () => /* @__PURE__ */ i(
5055
5053
  h,
5056
5054
  I,
5057
5055
  T,
5058
- y,
5056
+ g,
5059
5057
  a,
5060
5058
  r
5061
5059
  ]);
5062
5060
  return {
5063
5061
  loading: d,
5064
- error: u,
5065
- type: y,
5062
+ error: f,
5063
+ type: g,
5066
5064
  values: h,
5067
5065
  evaluatedEntries: m,
5068
5066
  fetchData: b
@@ -5090,26 +5088,26 @@ async function tc({
5090
5088
  manualIds: a,
5091
5089
  methods: l
5092
5090
  }) {
5093
- const { getFields: d, readObjects: f, search: u } = l, c = await ec({
5091
+ const { getFields: d, readObjects: u, search: f } = l, c = await ec({
5094
5092
  model: t,
5095
5093
  context: o,
5096
5094
  fields: e,
5097
5095
  getFields: d
5098
5096
  });
5099
5097
  if (a) {
5100
- let p = await f({
5098
+ let p = await u({
5101
5099
  model: t,
5102
5100
  ids: a,
5103
5101
  fieldsToRetrieve: e,
5104
5102
  context: o
5105
5103
  });
5106
- return r && (p = [...p].sort((m, g) => m[r] - g[r])), {
5104
+ return r && (p = [...p].sort((m, y) => m[r] - y[r])), {
5107
5105
  values: p,
5108
5106
  fields: c
5109
5107
  };
5110
5108
  }
5111
5109
  return {
5112
- values: await u({
5110
+ values: await f({
5113
5111
  model: t,
5114
5112
  params: n,
5115
5113
  fieldsToRetrieve: e,
@@ -5294,16 +5292,16 @@ const ic = {
5294
5292
  (h) => {
5295
5293
  if (!l)
5296
5294
  return;
5297
- const p = l.find((y) => y.x === h);
5295
+ const p = l.find((g) => g.x === h);
5298
5296
  return `${`${((p == null ? void 0 : p.percent) || 0).toFixed(0)}%`}`;
5299
5297
  },
5300
5298
  [l]
5301
- ), f = Fe(() => {
5299
+ ), u = Fe(() => {
5302
5300
  if (l !== void 0)
5303
5301
  return {
5304
5302
  formatter: (h, p) => d(p.id)
5305
5303
  };
5306
- }, [l]), u = J(
5304
+ }, [l]), f = J(
5307
5305
  ({ percent: h, x: p }) => h < 0.07 ? "" : d(p),
5308
5306
  [l]
5309
5307
  ), c = ac[e];
@@ -5332,8 +5330,8 @@ const ic = {
5332
5330
  data: t,
5333
5331
  isGroup: n,
5334
5332
  isStack: o,
5335
- pieItemValueFormatter: f,
5336
- pieLabelFormatter: u
5333
+ pieItemValueFormatter: u,
5334
+ pieLabelFormatter: f
5337
5335
  })
5338
5336
  }
5339
5337
  ) })
@@ -5354,7 +5352,7 @@ function lc(e) {
5354
5352
  return l || (l = { ...Nr.default }), l.data = n, t === "pie" ? (l.colorField = "x", l.angleField = "value", l = { ...l, ...ic.inner }, l.legend.itemValue = s, l.label.content = a) : (l.xField = "x", l.yField = "value", l.seriesField = "type", l.isGroup = o, r && (l.isStack = !0, l.groupField = "stacked")), l;
5355
5353
  }
5356
5354
  const cc = (e) => {
5357
- const { model: t, domain: n, context: o, xml: r, limit: s, manualIds: a } = e, { t: l } = he(), { error: d, loading: f, values: u, type: c, evaluatedEntries: h, fetchData: p } = Zl({
5355
+ const { model: t, domain: n, context: o, xml: r, limit: s, manualIds: a } = e, { t: l } = he(), { error: d, loading: u, values: f, type: c, evaluatedEntries: h, fetchData: p } = Zl({
5358
5356
  model: t,
5359
5357
  xml: r,
5360
5358
  limit: s,
@@ -5365,23 +5363,23 @@ const cc = (e) => {
5365
5363
  });
5366
5364
  if (bt(() => {
5367
5365
  p();
5368
- }, [r, t, s, o, n]), f || !u)
5366
+ }, [r, t, s, o, n]), u || !f)
5369
5367
  return /* @__PURE__ */ i(wn, {});
5370
- const { data: m, isGroup: g, isStack: y } = u;
5368
+ const { data: m, isGroup: y, isStack: g } = f;
5371
5369
  return d ? /* @__PURE__ */ i(Qe, { message: d, type: "error", banner: !0 }) : /* @__PURE__ */ i(
5372
5370
  Lo,
5373
5371
  {
5374
5372
  type: c,
5375
5373
  data: m,
5376
- isGroup: g,
5377
- isStack: y,
5374
+ isGroup: y,
5375
+ isStack: g,
5378
5376
  numItems: h.length
5379
5377
  }
5380
5378
  );
5381
5379
  }, dc = (e, t) => {
5382
- const { view_id: n, model: o, context: r, domain: s, limit: a, manualIds: l } = e, [d, f] = v(!1), [u, c] = v(), [h, p] = v(), m = ee(
5380
+ const { view_id: n, model: o, context: r, domain: s, limit: a, manualIds: l } = e, [d, u] = v(!1), [f, c] = v(), [h, p] = v(), m = ee(
5383
5381
  nt
5384
- ), { setGraphIsLoading: g = void 0 } = m || {}, [y] = Je(E.getHandler().getView);
5382
+ ), { setGraphIsLoading: y = void 0 } = m || {}, [g] = Je(E.getHandler().getView);
5385
5383
  pt(t, () => ({
5386
5384
  refresh: () => {
5387
5385
  w();
@@ -5390,9 +5388,9 @@ const cc = (e) => {
5390
5388
  w();
5391
5389
  }, [n]);
5392
5390
  async function w() {
5393
- f(!0), g == null || g(!0);
5391
+ u(!0), y == null || y(!0);
5394
5392
  try {
5395
- const C = await y({
5393
+ const C = await g({
5396
5394
  model: o,
5397
5395
  id: n,
5398
5396
  type: "graph",
@@ -5400,17 +5398,17 @@ const cc = (e) => {
5400
5398
  });
5401
5399
  p(C.arch);
5402
5400
  const I = Gn(C.arch);
5403
- c(I), f(!1), g == null || g(!1);
5401
+ c(I), u(!1), y == null || y(!1);
5404
5402
  } catch (C) {
5405
- return console.error(C), f(!1), g == null || g(!1), /* @__PURE__ */ i(oe, { children: JSON.stringify(C) });
5403
+ return console.error(C), u(!1), y == null || y(!1), /* @__PURE__ */ i(oe, { children: JSON.stringify(C) });
5406
5404
  }
5407
5405
  }
5408
- if (d || !u)
5406
+ if (d || !f)
5409
5407
  return /* @__PURE__ */ i(wn, {});
5410
- switch (u.type) {
5408
+ switch (f.type) {
5411
5409
  case "indicatorField":
5412
5410
  case "indicator": {
5413
- const C = u, I = C.type === "indicatorField" ? {
5411
+ const C = f, I = C.type === "indicatorField" ? {
5414
5412
  field: C.field,
5415
5413
  operator: C.operator
5416
5414
  } : {};
@@ -5445,7 +5443,7 @@ const cc = (e) => {
5445
5443
  }
5446
5444
  );
5447
5445
  default:
5448
- return /* @__PURE__ */ i(oe, { children: `Graph ${u.type} not implemented` });
5446
+ return /* @__PURE__ */ i(oe, { children: `Graph ${f.type} not implemented` });
5449
5447
  }
5450
5448
  }, vn = ht(dc), uc = ({
5451
5449
  title: e,
@@ -5456,7 +5454,7 @@ const cc = (e) => {
5456
5454
  cancelText: s,
5457
5455
  centered: a
5458
5456
  }) => {
5459
- const [l, d] = v(!1), [f, u] = v(!0), c = async () => {
5457
+ const [l, d] = v(!1), [u, f] = v(!0), c = async () => {
5460
5458
  d(!0);
5461
5459
  try {
5462
5460
  await n();
@@ -5466,9 +5464,9 @@ const cc = (e) => {
5466
5464
  }, h = () => {
5467
5465
  p();
5468
5466
  }, p = () => {
5469
- u(!1);
5470
- const g = document.querySelector("#confirm-modal-container");
5471
- g && (lo(g).unmount(), g.remove());
5467
+ f(!1);
5468
+ const y = document.querySelector("#confirm-modal-container");
5469
+ y && (lo(y).unmount(), y.remove());
5472
5470
  };
5473
5471
  return /* @__PURE__ */ i(
5474
5472
  Ze,
@@ -5477,7 +5475,7 @@ const cc = (e) => {
5477
5475
  o && /* @__PURE__ */ i("span", { style: { marginRight: 8 }, children: o }),
5478
5476
  e
5479
5477
  ] }),
5480
- open: f,
5478
+ open: u,
5481
5479
  centered: a || !1,
5482
5480
  onOk: c,
5483
5481
  onCancel: h,
@@ -5546,14 +5544,14 @@ const cc = (e) => {
5546
5544
  onDelete: a,
5547
5545
  totalItems: l,
5548
5546
  currentItemIndex: d,
5549
- onPreviousItem: f,
5550
- onNextItem: u,
5547
+ onPreviousItem: u,
5548
+ onNextItem: f,
5551
5549
  isMany2Many: c,
5552
5550
  onSearchItem: h,
5553
5551
  selectedRowKeys: p,
5554
5552
  showCreateButton: m,
5555
- showToggleButton: g
5556
- } = e, { token: y } = fc();
5553
+ showToggleButton: y
5554
+ } = e, { token: g } = fc();
5557
5555
  function w() {
5558
5556
  return /* @__PURE__ */ i("div", { className: "inline-block w-3" });
5559
5557
  }
@@ -5563,8 +5561,8 @@ const cc = (e) => {
5563
5561
  {
5564
5562
  className: "flex flex-grow h-8 text-white",
5565
5563
  style: {
5566
- borderRadius: y.borderRadius,
5567
- backgroundColor: y.colorPrimaryActive
5564
+ borderRadius: g.borderRadius,
5565
+ backgroundColor: g.colorPrimaryActive
5568
5566
  },
5569
5567
  children: /* @__PURE__ */ i("div", { className: "flex flex-col items-center justify-center h-full", children: /* @__PURE__ */ i("span", { className: "pl-2 font-bold", children: t }) })
5570
5568
  }
@@ -5599,7 +5597,7 @@ const cc = (e) => {
5599
5597
  {
5600
5598
  tooltip: "Previous item",
5601
5599
  icon: /* @__PURE__ */ i(no, {}),
5602
- onClick: f
5600
+ onClick: u
5603
5601
  }
5604
5602
  ),
5605
5603
  T(),
@@ -5608,7 +5606,7 @@ const cc = (e) => {
5608
5606
  {
5609
5607
  tooltip: "Next item",
5610
5608
  icon: /* @__PURE__ */ i(ro, {}),
5611
- onClick: u
5609
+ onClick: f
5612
5610
  }
5613
5611
  )
5614
5612
  ] });
@@ -5638,7 +5636,7 @@ const cc = (e) => {
5638
5636
  s !== "graph" && I(),
5639
5637
  s === "form" && b(),
5640
5638
  w(),
5641
- g && /* @__PURE__ */ i(
5639
+ y && /* @__PURE__ */ i(
5642
5640
  ze,
5643
5641
  {
5644
5642
  tooltip: "Toggle view mode",
@@ -5662,9 +5660,9 @@ function hc(e) {
5662
5660
  }
5663
5661
  const pc = (e) => {
5664
5662
  var Me;
5665
- const { value: t, onChange: n, ooui: o, views: r } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: d, setItemIndex: f } = ee(
5663
+ const { value: t, onChange: n, ooui: o, views: r } = e, { items: s = [] } = t || {}, { currentView: a, setCurrentView: l, itemIndex: d, setItemIndex: u } = ee(
5666
5664
  jt
5667
- ), u = ee($e), { activeId: c, getFields: h, getValues: p, getContext: m, domain: g } = u || {}, { t: y } = he(), [w, C] = v(!1), [I, T] = v(!1), [b, V] = v(), [_, F] = v(!1), [S, R] = v(!1), [x, O] = v(), [A, P] = v([]), [K, j] = v(!1), W = re([]), [k, Y] = v(), U = re(), [X, z] = v(void 0), {
5665
+ ), f = ee($e), { activeId: c, getFields: h, getValues: p, getContext: m, domain: y } = f || {}, { t: g } = he(), [w, C] = v(!1), [I, T] = v(!1), [b, V] = v(), [_, F] = v(!1), [S, R] = v(!1), [x, O] = v(), [A, P] = v([]), [K, j] = v(!1), W = re([]), [k, Y] = v(), U = re(), [X, z] = v(void 0), {
5668
5666
  readOnly: H,
5669
5667
  relation: M,
5670
5668
  context: L,
@@ -5684,7 +5682,7 @@ const pc = (e) => {
5684
5682
  }, [s, a]);
5685
5683
  ue(() => {
5686
5684
  De();
5687
- }, [g]);
5685
+ }, [y]);
5688
5686
  const se = (q) => {
5689
5687
  var le, Oe;
5690
5688
  n == null || n({
@@ -5692,7 +5690,7 @@ const pc = (e) => {
5692
5690
  items: hc(q)
5693
5691
  });
5694
5692
  }, xe = async () => {
5695
- await Ae(), d > ne.length - 1 && d !== 0 && f(0);
5693
+ await Ae(), d > ne.length - 1 && d !== 0 && u(0);
5696
5694
  }, Ae = async (q) => {
5697
5695
  var le, Oe, Te;
5698
5696
  T(!0), C(!1), V(void 0);
@@ -5726,9 +5724,9 @@ const pc = (e) => {
5726
5724
  }),
5727
5725
  fields: h(),
5728
5726
  context: m()
5729
- })), g && g.length > 0 && (W.current = W.current.concat(
5727
+ })), y && y.length > 0 && (W.current = W.current.concat(
5730
5728
  Un({
5731
- domain: g,
5729
+ domain: y,
5732
5730
  widgetFieldName: Z
5733
5731
  })
5734
5732
  ));
@@ -5740,13 +5738,13 @@ const pc = (e) => {
5740
5738
  }) : l(le);
5741
5739
  }, fe = () => {
5742
5740
  d > 0 && (a === "form" ? ae(() => {
5743
- f(d - 1);
5744
- }) : f(d - 1));
5741
+ u(d - 1);
5742
+ }) : u(d - 1));
5745
5743
  }, Ie = () => {
5746
5744
  const q = ne.length;
5747
5745
  d < q - 1 && (a === "form" ? ae(() => {
5748
- f(d + 1);
5749
- }) : f(d + 1));
5746
+ u(d + 1);
5747
+ }) : u(d + 1));
5750
5748
  }, Le = async () => {
5751
5749
  const q = ne[d].id, le = (await E.getHandler().readObjects({
5752
5750
  model: M,
@@ -5767,7 +5765,7 @@ const pc = (e) => {
5767
5765
  se(Te);
5768
5766
  }, ae = (q) => {
5769
5767
  w ? Lt({
5770
- t: y,
5768
+ t: g,
5771
5769
  onOk: () => {
5772
5770
  Le(), q(), C(!1);
5773
5771
  }
@@ -5775,7 +5773,7 @@ const pc = (e) => {
5775
5773
  }, me = () => {
5776
5774
  if (de) {
5777
5775
  Bo({
5778
- t: y,
5776
+ t: g,
5779
5777
  onOk: async () => {
5780
5778
  a === "form" ? G() : ve();
5781
5779
  }
@@ -5783,7 +5781,7 @@ const pc = (e) => {
5783
5781
  return;
5784
5782
  }
5785
5783
  Ho({
5786
- t: y,
5784
+ t: g,
5787
5785
  onOk: async () => {
5788
5786
  a === "form" ? G() : ve();
5789
5787
  }
@@ -5814,7 +5812,7 @@ const pc = (e) => {
5814
5812
  } catch (q) {
5815
5813
  V(q);
5816
5814
  }
5817
- f(0), T(!1);
5815
+ u(0), T(!1);
5818
5816
  }, ve = async () => {
5819
5817
  const q = ne.filter((le) => A.includes(le.id));
5820
5818
  T(!0), C(!1), V(void 0);
@@ -5827,7 +5825,7 @@ const pc = (e) => {
5827
5825
  } catch (le) {
5828
5826
  V(le);
5829
5827
  }
5830
- f(0), T(!1);
5828
+ u(0), T(!1);
5831
5829
  }, ke = (q, le, Oe, Te = !1) => {
5832
5830
  let Re;
5833
5831
  if (Te)
@@ -5901,7 +5899,7 @@ const pc = (e) => {
5901
5899
  const ce = () => {
5902
5900
  var le, Oe, Te, Re;
5903
5901
  if (a === "form")
5904
- return ne.length === 0 ? y("noCurrentEntries") : a !== ye.current && s.some((_e) => !_e.values) ? /* @__PURE__ */ i(je, {}) : /* @__PURE__ */ i(
5902
+ return ne.length === 0 ? g("noCurrentEntries") : a !== ye.current && s.some((_e) => !_e.values) ? /* @__PURE__ */ i(je, {}) : /* @__PURE__ */ i(
5905
5903
  Ht,
5906
5904
  {
5907
5905
  formView: r.get("form"),
@@ -6064,9 +6062,9 @@ const pc = (e) => {
6064
6062
  }) => {
6065
6063
  const [o, r] = v([]), s = re(0), a = re(o), l = re(!1), d = J((m) => {
6066
6064
  l.current = m;
6067
- }, []), f = J((m) => {
6065
+ }, []), u = J((m) => {
6068
6066
  s.current = m;
6069
- }, []), u = J(() => s.current, []);
6067
+ }, []), f = J(() => s.current, []);
6070
6068
  ue(() => {
6071
6069
  a.current = o;
6072
6070
  }, [o]);
@@ -6074,7 +6072,7 @@ const pc = (e) => {
6074
6072
  return {
6075
6073
  onTreeFetchRows: Yt(
6076
6074
  async (m) => {
6077
- const g = await E.getHandler().readEvalUiObjects({
6075
+ const y = await E.getHandler().readEvalUiObjects({
6078
6076
  model: t,
6079
6077
  ids: m,
6080
6078
  arch: e.arch,
@@ -6083,16 +6081,16 @@ const pc = (e) => {
6083
6081
  attrs: h.colors && {
6084
6082
  colors: h.colors
6085
6083
  }
6086
- }), y = g[0], w = qt(g[1]);
6087
- return { results: y, colors: w };
6084
+ }), g = y[0], w = qt(y[1]);
6085
+ return { results: g, colors: w };
6088
6086
  },
6089
6087
  [n, t, h.colors, e]
6090
6088
  ),
6091
6089
  treeOoui: h,
6092
6090
  setSelectedRowKeys: r,
6093
6091
  selectedRowKeys: o,
6094
- onChangeFirstVisibleRowIndex: f,
6095
- onGetFirstVisibileRowIndex: u,
6092
+ onChangeFirstVisibleRowIndex: u,
6093
+ onGetFirstVisibileRowIndex: f,
6096
6094
  onGetSelectedRowKeys: c,
6097
6095
  onChangeAllRowSelectedMode: d,
6098
6096
  allRowSelectedMode: l.current
@@ -6105,19 +6103,19 @@ const pc = (e) => {
6105
6103
  formView: r,
6106
6104
  triggerChange: s
6107
6105
  }) => {
6108
- const [a, l] = v(!1), { itemIndex: d } = ee(jt), { t: f } = he();
6106
+ const [a, l] = v(!1), { itemIndex: d } = ee(jt), { t: u } = he();
6109
6107
  ue(() => {
6110
6108
  const m = e[d];
6111
6109
  (!m || (m == null ? void 0 : m.operation) === "original") && l(!1);
6112
6110
  }, [d, e]);
6113
- const u = J(
6111
+ const f = J(
6114
6112
  async ({ id: m }) => {
6115
- const g = (await E.getHandler().readObjects({
6113
+ const y = (await E.getHandler().readObjects({
6116
6114
  model: t,
6117
6115
  ids: [m],
6118
6116
  fields: r.fields,
6119
6117
  context: n
6120
- }))[0], y = (await E.getHandler().readObjects({
6118
+ }))[0], g = (await E.getHandler().readObjects({
6121
6119
  model: t,
6122
6120
  ids: [m],
6123
6121
  fields: o.fields,
@@ -6126,8 +6124,8 @@ const pc = (e) => {
6126
6124
  return e.map((C) => C.id === m ? {
6127
6125
  ...C,
6128
6126
  operation: "original",
6129
- values: g,
6130
- treeValues: y
6127
+ values: y,
6128
+ treeValues: g
6131
6129
  } : C);
6132
6130
  },
6133
6131
  [n, r.fields, e, t, o.fields]
@@ -6140,24 +6138,24 @@ const pc = (e) => {
6140
6138
  const { id: m } = e[d];
6141
6139
  if (!m)
6142
6140
  return;
6143
- const g = await u({ id: m });
6144
- s(g);
6145
- }, [u, d, e, s]);
6141
+ const y = await f({ id: m });
6142
+ s(y);
6143
+ }, [f, d, e, s]);
6146
6144
  return {
6147
6145
  showFormChangesDialogIfNeeded: J(
6148
6146
  (m) => {
6149
6147
  a ? Lt({
6150
- t: f,
6148
+ t: u,
6151
6149
  onOk: () => {
6152
6150
  h(), m(), l(!1);
6153
6151
  }
6154
6152
  }) : m();
6155
6153
  },
6156
- [a, h, l, f]
6154
+ [a, h, l, u]
6157
6155
  ),
6158
6156
  formHasChanges: a,
6159
6157
  setFormHasChanges: l,
6160
- getOriginalItemsWithRestoredItemId: u,
6158
+ getOriginalItemsWithRestoredItemId: f,
6161
6159
  onFormChanges: c
6162
6160
  };
6163
6161
  }, vc = ({
@@ -6170,7 +6168,7 @@ const pc = (e) => {
6170
6168
  readOnly: r,
6171
6169
  onChange: s
6172
6170
  }) => {
6173
- var d, f;
6171
+ var d, u;
6174
6172
  const { itemIndex: a } = ee(jt), { t: l } = he();
6175
6173
  return t.length === 0 ? l("noCurrentEntries") : /* @__PURE__ */ i(
6176
6174
  Ht,
@@ -6179,15 +6177,15 @@ const pc = (e) => {
6179
6177
  values: (d = t[a]) == null ? void 0 : d.values,
6180
6178
  parentContext: n,
6181
6179
  model: o,
6182
- id: (f = t[a]) == null ? void 0 : f.id,
6180
+ id: (u = t[a]) == null ? void 0 : u.id,
6183
6181
  submitMode: "values",
6184
- onFieldsChange: (u) => {
6182
+ onFieldsChange: (f) => {
6185
6183
  var p;
6186
6184
  const c = (p = t[a]) == null ? void 0 : p.id, h = t.map((m) => m.id === c ? {
6187
6185
  ...m,
6188
6186
  operation: m.operation === "original" ? "pendingUpdate" : m.operation,
6189
- values: { ...u, id: c },
6190
- treeValues: { ...u, id: c }
6187
+ values: { ...f, id: c },
6188
+ treeValues: { ...f, id: c }
6191
6189
  } : m);
6192
6190
  s(la(h));
6193
6191
  },
@@ -6202,45 +6200,45 @@ const pc = (e) => {
6202
6200
  selectedRowKeys: r,
6203
6201
  setSelectedRowKeys: s
6204
6202
  }) => {
6205
- const { t: a } = he(), { currentView: l, itemIndex: d, setItemIndex: f } = ee(
6203
+ const { t: a } = he(), { currentView: l, itemIndex: d, setItemIndex: u } = ee(
6206
6204
  jt
6207
- ), u = J(async () => {
6205
+ ), f = J(async () => {
6208
6206
  const m = xc({
6209
6207
  selectedRowKeys: r,
6210
6208
  items: n
6211
6209
  });
6212
6210
  o(!1);
6213
6211
  try {
6214
- const g = m.map((w) => w.id), y = n.filter((w) => !(g.includes(w.id) && w.id < 0)).map((w) => g.includes(w.id) ? {
6212
+ const y = m.map((w) => w.id), g = n.filter((w) => !(y.includes(w.id) && w.id < 0)).map((w) => y.includes(w.id) ? {
6215
6213
  ...w,
6216
6214
  operation: "pendingRemove"
6217
6215
  } : w);
6218
- t(y), s([]);
6216
+ t(g), s([]);
6219
6217
  } catch {
6220
6218
  }
6221
- f(0);
6219
+ u(0);
6222
6220
  }, [
6223
6221
  n,
6224
6222
  r,
6225
6223
  o,
6226
- f,
6224
+ u,
6227
6225
  s,
6228
6226
  t
6229
6227
  ]), c = J(async () => {
6230
6228
  o(!1);
6231
6229
  try {
6232
6230
  if (n[d].id > 0) {
6233
- const m = n.map((g) => g.id === n[d].id ? {
6234
- ...g,
6231
+ const m = n.map((y) => y.id === n[d].id ? {
6232
+ ...y,
6235
6233
  operation: "pendingRemove"
6236
- } : g);
6234
+ } : y);
6237
6235
  t(m);
6238
6236
  } else
6239
6237
  t(n.filter((m) => m.id !== n[d].id));
6240
6238
  } catch {
6241
6239
  }
6242
- f(0);
6243
- }, [n, d, o, f, t]), h = J(async () => l === "form" ? await c() : await u(), [l, c, u]);
6240
+ u(0);
6241
+ }, [n, d, o, u, t]), h = J(async () => l === "form" ? await c() : await f(), [l, c, f]);
6244
6242
  return { showRemoveConfirm: J(() => {
6245
6243
  if (e) {
6246
6244
  Bo({
@@ -6274,16 +6272,16 @@ const Sc = ({
6274
6272
  setCurrentView: a,
6275
6273
  setItemIndex: l,
6276
6274
  relation: d,
6277
- formView: f,
6278
- context: u
6275
+ formView: u,
6276
+ context: f
6279
6277
  }) => {
6280
- const [c, h] = v(!1), [p, m] = v(), [g, y] = v(!1), w = J(async () => {
6278
+ const [c, h] = v(!1), [p, m] = v(), [y, g] = v(!1), w = J(async () => {
6281
6279
  let b;
6282
6280
  t && n && (b = { [t]: n }), e === "form" ? o(() => {
6283
- y(!0), m({ defaultValues: b }), h(!0);
6284
- }) : (y(!0), m({ defaultValues: b }), h(!0));
6281
+ g(!0), m({ defaultValues: b }), h(!0);
6282
+ }) : (g(!0), m({ defaultValues: b }), h(!0));
6285
6283
  }, [n, e, t, o]), C = J(() => {
6286
- h(!1), y(!1);
6284
+ h(!1), g(!1);
6287
6285
  }, []), I = Yt(
6288
6286
  (b, V, _, F = !1) => {
6289
6287
  let S;
@@ -6310,9 +6308,9 @@ const Sc = ({
6310
6308
  treeValues: { ..._, id: R }
6311
6309
  });
6312
6310
  }
6313
- s(S), g || h(!1);
6311
+ s(S), y || h(!1);
6314
6312
  },
6315
- [g, r, s]
6313
+ [y, r, s]
6316
6314
  ), T = Yt(
6317
6315
  async (b) => {
6318
6316
  const { id: V } = b;
@@ -6321,16 +6319,16 @@ const Sc = ({
6321
6319
  (F == null ? void 0 : F.values) === void 0 && (_ = await E.getHandler().readObjects({
6322
6320
  model: d,
6323
6321
  ids: [b.id],
6324
- fields: f.fields,
6325
- context: u
6326
- })), m(_.find((S) => S.id === V)), y(!1), h(!0);
6322
+ fields: u.fields,
6323
+ context: f
6324
+ })), m(_.find((S) => S.id === V)), g(!1), h(!0);
6327
6325
  },
6328
- [u, f.fields, r, d, a, l]
6326
+ [f, u.fields, r, d, a, l]
6329
6327
  );
6330
6328
  return {
6331
6329
  showFormModal: c,
6332
6330
  modalItem: p,
6333
- continuousEntryMode: g,
6331
+ continuousEntryMode: y,
6334
6332
  createItem: w,
6335
6333
  onCancelFormModal: C,
6336
6334
  onFormModalSubmitSucceed: I,
@@ -6345,30 +6343,30 @@ const Sc = ({
6345
6343
  views: s,
6346
6344
  relation: a
6347
6345
  }) => {
6348
- const [l, d] = v(!1), f = async () => {
6346
+ const [l, d] = v(!1), u = async () => {
6349
6347
  e === "form" ? t(() => {
6350
6348
  d(!0);
6351
6349
  }) : d(!0);
6352
- }, u = J(() => {
6350
+ }, f = J(() => {
6353
6351
  d(!1);
6354
6352
  }, []), c = Yt(
6355
6353
  async (p) => {
6356
- const m = n, g = p.filter((y) => !n.find((w) => w.id === y));
6354
+ const m = n, y = p.filter((g) => !n.find((w) => w.id === g));
6357
6355
  try {
6358
- for (const y of g) {
6356
+ for (const g of y) {
6359
6357
  const w = (await E.getHandler().readObjects({
6360
6358
  model: a,
6361
- ids: [y],
6359
+ ids: [g],
6362
6360
  fields: s.get("form").fields,
6363
6361
  context: r
6364
6362
  }))[0], C = (await E.getHandler().readObjects({
6365
6363
  model: a,
6366
- ids: [y],
6364
+ ids: [g],
6367
6365
  fields: s.get("tree").fields,
6368
6366
  context: r
6369
6367
  }))[0];
6370
6368
  m.push({
6371
- id: y,
6369
+ id: g,
6372
6370
  operation: "pendingLink",
6373
6371
  values: w,
6374
6372
  treeValues: C
@@ -6387,9 +6385,9 @@ const Sc = ({
6387
6385
  [c]
6388
6386
  );
6389
6387
  return {
6390
- searchItem: f,
6388
+ searchItem: u,
6391
6389
  showSearchModal: l,
6392
- onCloseSearchModal: u,
6390
+ onCloseSearchModal: f,
6393
6391
  onSelectSearchValues: h
6394
6392
  };
6395
6393
  }, Fc = ({ model: e }) => {
@@ -6413,21 +6411,21 @@ const Sc = ({
6413
6411
  onFetchRecords: a,
6414
6412
  onRowSelectionChange: l,
6415
6413
  gridRef: d,
6416
- relation: f,
6417
- onChangeFirstVisibleRowIndex: u,
6414
+ relation: u,
6415
+ onChangeFirstVisibleRowIndex: f,
6418
6416
  onGetFirstVisibleRowIndex: c,
6419
6417
  onGetSelectedRowKeys: h,
6420
6418
  onAllRowSelectedModeChange: p,
6421
6419
  allRowSelectedMode: m
6422
6420
  }) => {
6423
- const g = re(), y = d || g, w = re({}), C = re(), I = re(e);
6421
+ const y = re(), g = d || y, w = re({}), C = re(), I = re(e);
6424
6422
  bt(() => {
6425
6423
  var R, x;
6426
6424
  if (I.current = e, C.current === void 0) {
6427
6425
  C.current = e;
6428
6426
  return;
6429
6427
  }
6430
- C.current = e, (R = y == null ? void 0 : y.current) == null || R.refresh(), (x = y == null ? void 0 : y.current) == null || x.unselectAll();
6428
+ C.current = e, (R = g == null ? void 0 : g.current) == null || R.refresh(), (x = g == null ? void 0 : g.current) == null || x.unselectAll();
6431
6429
  }, [e]);
6432
6430
  const T = xr(() => e.length, [e]), b = xr(() => wo(
6433
6431
  r,
@@ -6455,12 +6453,12 @@ const Sc = ({
6455
6453
  if (w.current[R.id])
6456
6454
  return { color: w.current[R.id] };
6457
6455
  }, []), { getColumnState: F, updateColumnState: S } = Fc({
6458
- model: f
6456
+ model: u
6459
6457
  });
6460
6458
  return /* @__PURE__ */ i(
6461
6459
  ms,
6462
6460
  {
6463
- ref: y,
6461
+ ref: g,
6464
6462
  height: t || Ic,
6465
6463
  columns: b,
6466
6464
  onRequestData: V,
@@ -6470,7 +6468,7 @@ const Sc = ({
6470
6468
  onRowSelectionChange: l,
6471
6469
  onColumnChanged: S,
6472
6470
  onGetColumnsState: F,
6473
- onChangeFirstVisibleRowIndex: u,
6471
+ onChangeFirstVisibleRowIndex: f,
6474
6472
  onGetFirstVisibleRowIndex: c,
6475
6473
  onGetSelectedRowKeys: h,
6476
6474
  allRowSelectedMode: m,
@@ -6480,17 +6478,17 @@ const Sc = ({
6480
6478
  );
6481
6479
  }, Oc = ["form", "tree", "graph"], Vc = (e) => {
6482
6480
  var ae;
6483
- const t = re(null), { value: n, onChange: o, ooui: r, views: s } = e, { items: a = [] } = n || {}, l = vc({ one2manyItems: a }), { currentView: d, setCurrentView: f, itemIndex: u, setItemIndex: c } = ee(
6481
+ const t = re(null), { value: n, onChange: o, ooui: r, views: s } = e, { items: a = [] } = n || {}, l = vc({ one2manyItems: a }), { currentView: d, setCurrentView: u, itemIndex: f, setItemIndex: c } = ee(
6484
6482
  jt
6485
6483
  ), {
6486
6484
  readOnly: h,
6487
6485
  relation: p,
6488
6486
  context: m,
6489
- domain: g,
6490
- id: y
6487
+ domain: y,
6488
+ id: g
6491
6489
  } = r, w = ee($e), { activeId: C, getContext: I } = w || {}, T = s.size > 1, b = ((ae = s.get("form")) == null ? void 0 : ae.fields) !== void 0, V = Fe(() => ({ ...I == null ? void 0 : I(), ...m }), [I, m]), _ = gc({
6492
- widgetDomain: g,
6493
- fieldName: y
6490
+ widgetDomain: y,
6491
+ fieldName: g
6494
6492
  }), {
6495
6493
  treeOoui: F,
6496
6494
  onTreeFetchRows: S,
@@ -6544,7 +6542,7 @@ const Sc = ({
6544
6542
  currentView: d,
6545
6543
  triggerChange: Y,
6546
6544
  items: l,
6547
- setCurrentView: f,
6545
+ setCurrentView: u,
6548
6546
  setItemIndex: c,
6549
6547
  context: V,
6550
6548
  relation: p,
@@ -6572,8 +6570,8 @@ const Sc = ({
6572
6570
  }), Pe = () => {
6573
6571
  const me = Array.from(s.keys()), Ee = me[(me.indexOf(d) + 1) % me.length];
6574
6572
  d === "form" ? z(() => {
6575
- f(Ee);
6576
- }) : f(Ee);
6573
+ u(Ee);
6574
+ }) : u(Ee);
6577
6575
  }, fe = Yt(
6578
6576
  (me) => {
6579
6577
  var Ee;
@@ -6582,17 +6580,17 @@ const Sc = ({
6582
6580
  // eslint-disable-next-line react-hooks/exhaustive-deps
6583
6581
  [l]
6584
6582
  ), Ie = J(() => {
6585
- u > 0 && (d === "form" ? z(() => {
6586
- c(u - 1);
6587
- }) : c(u - 1));
6588
- }, [d, u, c, z]), Le = J(() => {
6583
+ f > 0 && (d === "form" ? z(() => {
6584
+ c(f - 1);
6585
+ }) : c(f - 1));
6586
+ }, [d, f, c, z]), Le = J(() => {
6589
6587
  const me = l.length;
6590
- u < me - 1 && (d === "form" ? z(() => {
6591
- c(u + 1);
6592
- }) : c(u + 1));
6588
+ f < me - 1 && (d === "form" ? z(() => {
6589
+ c(f + 1);
6590
+ }) : c(f + 1));
6593
6591
  }, [
6594
6592
  d,
6595
- u,
6593
+ f,
6596
6594
  l.length,
6597
6595
  c,
6598
6596
  z
@@ -6607,7 +6605,7 @@ const Sc = ({
6607
6605
  isMany2Many: k,
6608
6606
  formHasChanges: U,
6609
6607
  totalItems: l.length,
6610
- currentItemIndex: u,
6608
+ currentItemIndex: f,
6611
6609
  onDelete: De,
6612
6610
  onCreateItem: ne,
6613
6611
  onToggleViewMode: Pe,
@@ -6685,37 +6683,37 @@ const Sc = ({
6685
6683
  }, _c = (e) => {
6686
6684
  const { ooui: t } = e, { mode: n, relation: o, views: r, required: s, context: a } = t;
6687
6685
  let l;
6688
- const [d, f] = v(!0), [u, c] = v(), [h, p] = v(/* @__PURE__ */ new Map()), m = ee($e), { getContext: g } = m || {};
6686
+ const [d, u] = v(!0), [f, c] = v(), [h, p] = v(/* @__PURE__ */ new Map()), m = ee($e), { getContext: y } = m || {};
6689
6687
  bt(() => {
6690
6688
  w();
6691
6689
  }, [t]);
6692
- const y = async (T) => r && r[T] ? r[T] : await E.getHandler().getView({
6690
+ const g = async (T) => r && r[T] ? r[T] : await E.getHandler().getView({
6693
6691
  model: o,
6694
6692
  type: T,
6695
- context: { ...g == null ? void 0 : g(), ...a }
6693
+ context: { ...y == null ? void 0 : y(), ...a }
6696
6694
  }), w = async () => {
6697
- f(!0), c(void 0);
6695
+ u(!0), c(void 0);
6698
6696
  try {
6699
6697
  if (n && n.length > 0) {
6700
6698
  for (const T of n) {
6701
- const b = await y(T);
6699
+ const b = await g(T);
6702
6700
  h.set(T, b);
6703
6701
  }
6704
6702
  p(h);
6705
6703
  } else {
6706
- const T = await y("form"), b = await y("tree");
6704
+ const T = await g("form"), b = await g("tree");
6707
6705
  h.set("form", T), h.set("tree", b), p(h);
6708
6706
  }
6709
6707
  } catch (T) {
6710
6708
  c(JSON.stringify(T));
6711
6709
  } finally {
6712
- f(!1);
6710
+ u(!1);
6713
6711
  }
6714
6712
  };
6715
6713
  if (n && n.length > 0 ? l = n[0] : l = "tree", d)
6716
6714
  return /* @__PURE__ */ i(je, {});
6717
- if (u)
6718
- return /* @__PURE__ */ i(Qe, { className: "mt-10", message: u, type: "error", banner: !0 });
6715
+ if (f)
6716
+ return /* @__PURE__ */ i(Qe, { className: "mt-10", message: f, type: "error", banner: !0 });
6719
6717
  const C = async (T, b) => {
6720
6718
  if (!b)
6721
6719
  throw new Error();
@@ -6740,30 +6738,30 @@ const Sc = ({
6740
6738
  const { ooui: t } = e, { required: n } = t;
6741
6739
  return /* @__PURE__ */ i(Ce, { required: n, type: "number", ...e, children: /* @__PURE__ */ i(Ec, { ooui: t }) });
6742
6740
  }, Ec = (e) => {
6743
- const { ooui: t, value: n, onChange: o } = e, { id: r, readOnly: s, required: a } = t, { token: l } = Ac(), d = a && !s ? { backgroundColor: l.colorPrimaryBg } : void 0, f = re(), [u, c] = v(), h = ee($e), { elementHasLostFocus: p } = h || {};
6741
+ const { ooui: t, value: n, onChange: o } = e, { id: r, readOnly: s, required: a } = t, { token: l } = Ac(), d = a && !s ? { backgroundColor: l.colorPrimaryBg } : void 0, u = re(), [f, c] = v(), h = ee($e), { elementHasLostFocus: p } = h || {};
6744
6742
  ue(() => {
6745
6743
  c(Io(n));
6746
6744
  }, [n]);
6747
6745
  const m = (w) => {
6748
6746
  o == null || o(w);
6749
6747
  };
6750
- function g(w) {
6751
- f.current = w.target.value, c(w.target.value);
6748
+ function y(w) {
6749
+ u.current = w.target.value, c(w.target.value);
6752
6750
  }
6753
- async function y() {
6754
- m(wl(u)), await new Promise((w) => setTimeout(w, 300)), p == null || p();
6751
+ async function g() {
6752
+ m(wl(f)), await new Promise((w) => setTimeout(w, 300)), p == null || p();
6755
6753
  }
6756
6754
  return /* @__PURE__ */ i(
6757
6755
  it,
6758
6756
  {
6759
- value: u,
6757
+ value: f,
6760
6758
  disabled: s,
6761
6759
  className: "w-full",
6762
6760
  style: d,
6763
6761
  id: r,
6764
6762
  placeholder: "00:00",
6765
- onChange: g,
6766
- onBlur: y
6763
+ onChange: y,
6764
+ onBlur: g
6767
6765
  }
6768
6766
  );
6769
6767
  };
@@ -6813,7 +6811,7 @@ function Mc(e) {
6813
6811
  )) });
6814
6812
  }
6815
6813
  const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
6816
- const { ooui: t } = e, { id: n, readOnly: o, required: r, height: s, translatable: a } = t, { token: l } = Pc(), d = r && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, f = ee($e), { elementHasLostFocus: u } = f || {};
6814
+ const { ooui: t } = e, { id: n, readOnly: o, required: r, height: s, translatable: a } = t, { token: l } = Pc(), d = r && !o ? { backgroundColor: l.colorPrimaryBg } : void 0, u = ee($e), { elementHasLostFocus: f } = u || {};
6817
6815
  return /* @__PURE__ */ i(Ce, { required: r, ...e, children: a ? /* @__PURE__ */ i(
6818
6816
  Lc,
6819
6817
  {
@@ -6830,7 +6828,7 @@ const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
6830
6828
  ...d
6831
6829
  },
6832
6830
  rows: 4,
6833
- onBlur: u
6831
+ onBlur: f
6834
6832
  }
6835
6833
  ) });
6836
6834
  }, Lc = ({
@@ -6844,15 +6842,15 @@ const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
6844
6842
  activeId: a,
6845
6843
  activeModel: l,
6846
6844
  fetchValues: d,
6847
- formHasChanges: f,
6848
- elementHasLostFocus: u
6845
+ formHasChanges: u,
6846
+ elementHasLostFocus: f
6849
6847
  } = s || {}, [c, h] = v(!1), { t: p } = he();
6850
6848
  return a ? /* @__PURE__ */ D(oe, { children: [
6851
6849
  /* @__PURE__ */ i(
6852
6850
  "div",
6853
6851
  {
6854
6852
  onClick: () => {
6855
- if (f != null && f()) {
6853
+ if (u != null && u()) {
6856
6854
  mt(p("saveBeforeTranslate"));
6857
6855
  return;
6858
6856
  }
@@ -6874,7 +6872,7 @@ const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
6874
6872
  id: t,
6875
6873
  disabled: !0,
6876
6874
  rows: 4,
6877
- onBlur: u
6875
+ onBlur: f
6878
6876
  }
6879
6877
  )
6880
6878
  }
@@ -6908,7 +6906,7 @@ const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
6908
6906
  },
6909
6907
  id: t,
6910
6908
  rows: 4,
6911
- onBlur: u
6909
+ onBlur: f
6912
6910
  }
6913
6911
  ) }),
6914
6912
  /* @__PURE__ */ i(Ve, { justify: "end", style: { paddingTop: 5 }, children: /* @__PURE__ */ i(
@@ -6917,7 +6915,7 @@ const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
6917
6915
  tooltip: p("translate"),
6918
6916
  icon: /* @__PURE__ */ i(eo, {}),
6919
6917
  onClick: async () => {
6920
- f != null && f() ? mt(p("saveBeforeTranslate")) : mt(p("enterTextBeforeTranslate"));
6918
+ u != null && u() ? mt(p("saveBeforeTranslate")) : mt(p("enterTextBeforeTranslate"));
6921
6919
  },
6922
6920
  children: p("translate")
6923
6921
  }
@@ -6937,42 +6935,42 @@ const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
6937
6935
  limit: r,
6938
6936
  onClose: s
6939
6937
  }) => {
6940
- const a = re({}), l = re(/* @__PURE__ */ new Map()), { t: d } = he(), f = J(
6941
- async (y) => {
6942
- if (y.selectedKeys === void 0 || y.selectedKeys.length === 0) {
6938
+ const a = re({}), l = re(/* @__PURE__ */ new Map()), { t: d } = he(), u = J(
6939
+ async (g) => {
6940
+ if (g.selectedKeys === void 0 || g.selectedKeys.length === 0) {
6943
6941
  mt(d("selectAtLeastOneField"));
6944
6942
  return;
6945
6943
  }
6946
6944
  let w = o;
6947
- y.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (w = [
6945
+ g.registersAmount === "selected" && (n == null ? void 0 : n.length) !== 0 && (w = [
6948
6946
  ["id", "in", n == null ? void 0 : n.map((T) => T.id)]
6949
6947
  ]);
6950
6948
  const { datas: C } = await E.getHandler().exportData({
6951
6949
  model: e,
6952
6950
  fields: Gc({
6953
- keys: y.selectedKeys,
6951
+ keys: g.selectedKeys,
6954
6952
  fields: a.current
6955
6953
  }),
6956
6954
  domain: w,
6957
- limit: y.registersAmount === "all" ? 0 : r,
6955
+ limit: g.registersAmount === "all" ? 0 : r,
6958
6956
  context: t,
6959
- format: y.exportType
6957
+ format: g.exportType
6960
6958
  });
6961
6959
  s(), await new Promise((T) => setTimeout(T, 200));
6962
6960
  const I = await kt(C);
6963
6961
  yn(C, I.mime);
6964
6962
  },
6965
6963
  [o, n, e, r, t, s, d]
6966
- ), u = J(async () => {
6967
- const y = await E.getHandler().getFields({
6964
+ ), f = J(async () => {
6965
+ const g = await E.getHandler().getFields({
6968
6966
  model: e,
6969
6967
  context: t,
6970
6968
  fields: []
6971
6969
  });
6972
- return a.current["/"] = y, $r({ fields: y });
6970
+ return a.current["/"] = g, $r({ fields: g });
6973
6971
  }, [e, t, a]), c = J(
6974
- async (y) => {
6975
- const C = Hn(y, a.current)[$n(y)], I = C.relation, T = await E.getHandler().getFields({
6972
+ async (g) => {
6973
+ const C = Hn(g, a.current)[$n(g)], I = C.relation, T = await E.getHandler().getFields({
6976
6974
  model: I,
6977
6975
  context: t,
6978
6976
  fields: []
@@ -6982,20 +6980,20 @@ const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
6982
6980
  parentTitle: C.string,
6983
6981
  title: V.string
6984
6982
  });
6985
- return a.current[y] = T, $r({
6983
+ return a.current[g] = T, $r({
6986
6984
  fields: T,
6987
- parentKey: y
6985
+ parentKey: g
6988
6986
  });
6989
6987
  },
6990
6988
  [t]
6991
6989
  ), h = J(async () => {
6992
- const y = await Kc({ model: e, context: t }), w = await Uc({
6993
- predefinedExports: y,
6990
+ const g = await Kc({ model: e, context: t }), w = await Uc({
6991
+ predefinedExports: g,
6994
6992
  fields: a.current,
6995
6993
  onGetFieldChilds: c
6996
6994
  });
6997
6995
  return {
6998
- predefinedExports: y.map((I) => ({
6996
+ predefinedExports: g.map((I) => ({
6999
6997
  ...I,
7000
6998
  fields: I.fields.map((T) => {
7001
6999
  const b = $n(T.key), _ = Hn(T.key, a.current)[b];
@@ -7010,39 +7008,39 @@ const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
7010
7008
  keysWithChilds: w
7011
7009
  };
7012
7010
  }, [t, e, c]), p = J(
7013
- async (y) => {
7011
+ async (g) => {
7014
7012
  await E.getHandler().deleteObjects({
7015
7013
  model: "ir.exports",
7016
- ids: [y.id],
7014
+ ids: [g.id],
7017
7015
  context: t
7018
7016
  });
7019
7017
  },
7020
7018
  [t]
7021
7019
  ), m = J(
7022
- async (y) => {
7023
- if (l.current.has(y))
7024
- return l.current.get(y);
7020
+ async (g) => {
7021
+ if (l.current.has(g))
7022
+ return l.current.get(g);
7025
7023
  const w = E.getHandler().getFields({
7026
- model: y,
7024
+ model: g,
7027
7025
  context: t,
7028
7026
  fields: []
7029
7027
  });
7030
- l.current.set(y, w);
7028
+ l.current.set(g, w);
7031
7029
  },
7032
7030
  [l, t]
7033
- ), g = J(
7034
- async (y) => {
7031
+ ), y = J(
7032
+ async (g) => {
7035
7033
  const w = await m("ir.exports"), C = await m("ir.exports.line"), I = await E.getHandler().create({
7036
7034
  model: "ir.exports",
7037
7035
  values: {
7038
- name: y.name,
7036
+ name: g.name,
7039
7037
  resource: e
7040
7038
  },
7041
7039
  fields: w,
7042
7040
  context: t
7043
7041
  });
7044
7042
  return await Promise.all(
7045
- y.fields.map(async (T) => await E.getHandler().create({
7043
+ g.fields.map(async (T) => await E.getHandler().create({
7046
7044
  model: "ir.exports.line",
7047
7045
  values: {
7048
7046
  name: T.key,
@@ -7051,16 +7049,16 @@ const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
7051
7049
  fields: C,
7052
7050
  context: t
7053
7051
  }))
7054
- ), { ...y, id: I };
7052
+ ), { ...g, id: I };
7055
7053
  },
7056
7054
  [t, m, e]
7057
7055
  );
7058
7056
  return {
7059
- onGetFields: u,
7057
+ onGetFields: f,
7060
7058
  onGetFieldChilds: c,
7061
- onExport: f,
7059
+ onExport: u,
7062
7060
  onGetPredefinedExports: h,
7063
- onSavePredefinedExport: g,
7061
+ onSavePredefinedExport: y,
7064
7062
  onRemovePredefinedExport: p
7065
7063
  };
7066
7064
  }, $r = ({
@@ -7174,14 +7172,14 @@ const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
7174
7172
  totalRegisters: a,
7175
7173
  domain: l,
7176
7174
  limit: d,
7177
- visibleRegisters: f
7175
+ visibleRegisters: u
7178
7176
  } = e, {
7179
- onExport: u,
7177
+ onExport: f,
7180
7178
  onGetFieldChilds: c,
7181
7179
  onGetFields: h,
7182
7180
  onGetPredefinedExports: p,
7183
7181
  onSavePredefinedExport: m,
7184
- onRemovePredefinedExport: g
7182
+ onRemovePredefinedExport: y
7185
7183
  } = Hc({
7186
7184
  model: o,
7187
7185
  context: r,
@@ -7194,16 +7192,16 @@ const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
7194
7192
  qi,
7195
7193
  {
7196
7194
  visible: t,
7197
- onSucceed: u,
7195
+ onSucceed: f,
7198
7196
  onCancel: n,
7199
7197
  selectedRegistersToExport: s && s.length && s.length > 0 ? s.length : void 0,
7200
7198
  totalRegisters: a,
7201
7199
  onGetFieldChilds: c,
7202
7200
  onGetFields: h,
7203
- visibleRegisters: f,
7201
+ visibleRegisters: u,
7204
7202
  onGetPredefinedExports: p,
7205
7203
  onSavePredefinedExport: m,
7206
- onRemovePredefinedExport: g
7204
+ onRemovePredefinedExport: y
7207
7205
  }
7208
7206
  );
7209
7207
  }, zc = (e) => {
@@ -7228,14 +7226,14 @@ const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
7228
7226
  const { ooui: t } = e, { required: n } = t;
7229
7227
  return /* @__PURE__ */ i(Ce, { required: n, ...e, children: /* @__PURE__ */ i(ed, { ooui: t }) });
7230
7228
  }, ed = (e) => {
7231
- const { value: t, onChange: n, ooui: o } = e, { required: r, selectionValues: s, readOnly: a, domain: l } = o, d = t == null ? void 0 : t.split(","), [f, u] = v([]), [c, h] = v();
7229
+ const { value: t, onChange: n, ooui: o } = e, { required: r, selectionValues: s, readOnly: a, domain: l } = o, d = t == null ? void 0 : t.split(","), [u, f] = v([]), [c, h] = v();
7232
7230
  return ue(() => {
7233
7231
  if (!t) {
7234
- h(void 0), u([]);
7232
+ h(void 0), f([]);
7235
7233
  return;
7236
7234
  }
7237
7235
  const p = t && d && d[0], m = t && d && d[1] && parseInt(d[1]);
7238
- u([m, void 0]), h(p);
7236
+ f([m, void 0]), h(p);
7239
7237
  }, [t]), /* @__PURE__ */ D(Ve, { gutter: 8, wrap: !1, children: [
7240
7238
  /* @__PURE__ */ i(ge, { flex: "1", children: /* @__PURE__ */ i(
7241
7239
  go,
@@ -7248,10 +7246,10 @@ const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
7248
7246
  }),
7249
7247
  onChange: (p) => {
7250
7248
  h(p);
7251
- let m = f[0] || 0;
7252
- p !== c && (u([]), m = 0);
7253
- const g = `${p},${m}`;
7254
- g !== t && (n == null || n(g));
7249
+ let m = u[0] || 0;
7250
+ p !== c && (f([]), m = 0);
7251
+ const y = `${p},${m}`;
7252
+ y !== t && (n == null || n(y));
7255
7253
  },
7256
7254
  value: c
7257
7255
  }
@@ -7266,9 +7264,9 @@ const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
7266
7264
  required: r,
7267
7265
  domain: l
7268
7266
  }),
7269
- value: f,
7267
+ value: u,
7270
7268
  onChange: (p) => {
7271
- u(p);
7269
+ f(p);
7272
7270
  const m = `${c},${p[0] || 0}`;
7273
7271
  m !== t && (n == null || n(m));
7274
7272
  }
@@ -7279,24 +7277,24 @@ const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
7279
7277
  const { ooui: t } = e, { required: n } = t;
7280
7278
  return /* @__PURE__ */ i(Ce, { required: n, ...e, children: /* @__PURE__ */ i(rd, { ooui: t }) });
7281
7279
  }, rd = (e) => {
7282
- const { ooui: t, value: n, onChange: o } = e, { readOnly: r, required: s, filenameField: a } = t, { token: l } = td(), d = s && !r ? { backgroundColor: l.colorPrimaryBg } : void 0, f = re(null), { setFieldValue: u, getFieldValue: c } = ee($e) || {}, { t: h } = he(), p = n ? Zs(n) : "", m = (I) => {
7280
+ const { ooui: t, value: n, onChange: o } = e, { readOnly: r, required: s, filenameField: a } = t, { token: l } = td(), d = s && !r ? { backgroundColor: l.colorPrimaryBg } : void 0, u = re(null), { setFieldValue: f, getFieldValue: c } = ee($e) || {}, { t: h } = he(), p = n ? Zs(n) : "", m = (I) => {
7283
7281
  o == null || o(I);
7284
7282
  };
7285
- async function g() {
7283
+ async function y() {
7286
7284
  const I = await kt(n), T = `data:${I == null ? void 0 : I.mime};base64,${n}`, b = document.createElement("a"), V = c(a), _ = c("name");
7287
7285
  b.href = T, b.download = V || _, b.click();
7288
7286
  }
7289
- async function y() {
7287
+ async function g() {
7290
7288
  const I = await kt(n);
7291
7289
  yn(n, I.mime);
7292
7290
  }
7293
7291
  async function w(I) {
7294
7292
  I.stopPropagation(), I.preventDefault();
7295
7293
  const T = I.target.files[0], b = await yo(T);
7296
- m(b), a && u(a, T.name);
7294
+ m(b), a && f(a, T.name);
7297
7295
  }
7298
7296
  function C() {
7299
- u(a, void 0), m(void 0);
7297
+ f(a, void 0), m(void 0);
7300
7298
  }
7301
7299
  return /* @__PURE__ */ D(Ve, { gutter: 8, children: [
7302
7300
  /* @__PURE__ */ D(ge, { style: { paddingBottom: 5 }, children: [
@@ -7305,7 +7303,7 @@ const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
7305
7303
  {
7306
7304
  type: "file",
7307
7305
  id: "file",
7308
- ref: f,
7306
+ ref: u,
7309
7307
  style: { display: "none" },
7310
7308
  onChange: w
7311
7309
  }
@@ -7327,18 +7325,18 @@ const { useToken: Pc } = Ke, { TextArea: Nn } = it, Nc = (e) => {
7327
7325
  icon: /* @__PURE__ */ i(Yn, {}),
7328
7326
  disabled: r,
7329
7327
  onClick: () => {
7330
- f.current.click();
7328
+ u.current.click();
7331
7329
  },
7332
7330
  children: "Select"
7333
7331
  }
7334
7332
  ),
7335
- /* @__PURE__ */ i(Ne, { icon: /* @__PURE__ */ i(Li, {}), disabled: !n, onClick: y, children: h("open") }),
7333
+ /* @__PURE__ */ i(Ne, { icon: /* @__PURE__ */ i(Li, {}), disabled: !n, onClick: g, children: h("open") }),
7336
7334
  /* @__PURE__ */ i(
7337
7335
  ze,
7338
7336
  {
7339
7337
  tooltip: h("download"),
7340
7338
  disabled: !n,
7341
- onClick: g,
7339
+ onClick: y,
7342
7340
  icon: /* @__PURE__ */ i(qn, {})
7343
7341
  }
7344
7342
  ),
@@ -7384,7 +7382,7 @@ function dr(e) {
7384
7382
  })
7385
7383
  }
7386
7384
  ], [n, t.view_id, l]);
7387
- function f(c) {
7385
+ function u(c) {
7388
7386
  if (s) {
7389
7387
  Lt({
7390
7388
  t: l,
@@ -7396,8 +7394,8 @@ function dr(e) {
7396
7394
  }
7397
7395
  c();
7398
7396
  }
7399
- function u(c) {
7400
- f(() => {
7397
+ function f(c) {
7398
+ u(() => {
7401
7399
  const h = n.find(
7402
7400
  (p) => p.view_id === parseInt(c.id)
7403
7401
  );
@@ -7416,7 +7414,7 @@ function dr(e) {
7416
7414
  borderBottomRightRadius: 0
7417
7415
  },
7418
7416
  onClick: () => {
7419
- u({ id: a == null ? void 0 : a.view_id });
7417
+ f({ id: a == null ? void 0 : a.view_id });
7420
7418
  },
7421
7419
  disabled: r || n.length === 1
7422
7420
  }
@@ -7425,7 +7423,7 @@ function dr(e) {
7425
7423
  ao,
7426
7424
  {
7427
7425
  onRetrieveData: async () => d,
7428
- onItemClick: u,
7426
+ onItemClick: f,
7429
7427
  placement: "bottomRight",
7430
7428
  disabled: r || n.length === 1,
7431
7429
  children: /* @__PURE__ */ i(
@@ -7541,7 +7539,7 @@ const sd = (e) => {
7541
7539
  onOpenAttachmentLink: s,
7542
7540
  onOpenAttachmentDetail: a,
7543
7541
  onListAllAttachments: l
7544
- } = e, { t: d } = he(), f = re(null), u = /* @__PURE__ */ D(Ne, { children: [
7542
+ } = e, { t: d } = he(), u = re(null), f = /* @__PURE__ */ D(Ne, { children: [
7545
7543
  /* @__PURE__ */ i(vr, {}),
7546
7544
  `(${t})`,
7547
7545
  /* @__PURE__ */ i(fn, { style: { fontSize: 12 } })
@@ -7549,7 +7547,7 @@ const sd = (e) => {
7549
7547
  return /* @__PURE__ */ i(
7550
7548
  ao,
7551
7549
  {
7552
- ref: f,
7550
+ ref: u,
7553
7551
  onRetrieveData: async () => [
7554
7552
  {
7555
7553
  items: n.map((c) => {
@@ -7564,7 +7562,7 @@ const sd = (e) => {
7564
7562
  style: { cursor: "pointer" },
7565
7563
  onClick: () => {
7566
7564
  var m;
7567
- (m = f.current) == null || m.close(), s(c);
7565
+ (m = u.current) == null || m.close(), s(c);
7568
7566
  }
7569
7567
  }
7570
7568
  )
@@ -7576,7 +7574,7 @@ const sd = (e) => {
7576
7574
  style: { cursor: "pointer" },
7577
7575
  onClick: () => {
7578
7576
  var m;
7579
- (m = f.current) == null || m.close(), a(c);
7577
+ (m = u.current) == null || m.close(), a(c);
7580
7578
  }
7581
7579
  }
7582
7580
  ) }) })
@@ -7600,7 +7598,7 @@ const sd = (e) => {
7600
7598
  href: "#",
7601
7599
  onClick: () => {
7602
7600
  var c;
7603
- (c = f.current) == null || c.close(), l();
7601
+ (c = u.current) == null || c.close(), l();
7604
7602
  },
7605
7603
  children: [
7606
7604
  /* @__PURE__ */ i(er, {}),
@@ -7616,7 +7614,7 @@ const sd = (e) => {
7616
7614
  href: "#",
7617
7615
  onClick: () => {
7618
7616
  var c;
7619
- (c = f.current) == null || c.close(), r();
7617
+ (c = u.current) == null || c.close(), r();
7620
7618
  },
7621
7619
  children: [
7622
7620
  /* @__PURE__ */ i(mn, {}),
@@ -7626,7 +7624,7 @@ const sd = (e) => {
7626
7624
  }
7627
7625
  )
7628
7626
  ] }),
7629
- children: u
7627
+ children: f
7630
7628
  }
7631
7629
  );
7632
7630
  };
@@ -7637,7 +7635,7 @@ function ad(e) {
7637
7635
  onAddNewAttachment: o,
7638
7636
  onListAllAttachments: r,
7639
7637
  onViewAttachmentDetails: s
7640
- } = e, { formRef: a } = ee(nt), [l, d] = v(!1), [f, u] = v([]), [c, h] = v(!1), { t: p } = he(), m = J(async () => {
7638
+ } = e, { formRef: a } = ee(nt), [l, d] = v(!1), [u, f] = v([]), [c, h] = v(!1), { t: p } = he(), m = J(async () => {
7641
7639
  if (!(!t || t.length === 0)) {
7642
7640
  d(!0);
7643
7641
  try {
@@ -7647,7 +7645,7 @@ function ad(e) {
7647
7645
  fieldsToRetrieve: ["name", "datas_fname", "link"],
7648
7646
  context: a.current.getContext()
7649
7647
  });
7650
- u(
7648
+ f(
7651
7649
  w.map((C) => ({
7652
7650
  id: C.id,
7653
7651
  name: C.name,
@@ -7660,7 +7658,7 @@ function ad(e) {
7660
7658
  }
7661
7659
  d(!1);
7662
7660
  }
7663
- }, [t, a]), g = J(
7661
+ }, [t, a]), y = J(
7664
7662
  async (w) => {
7665
7663
  if (w.link) {
7666
7664
  window.open(w.link);
@@ -7685,7 +7683,7 @@ function ad(e) {
7685
7683
  s(C);
7686
7684
  },
7687
7685
  [a, s]
7688
- ), y = J(
7686
+ ), g = J(
7689
7687
  async (w) => {
7690
7688
  s(w);
7691
7689
  },
@@ -7698,13 +7696,13 @@ function ad(e) {
7698
7696
  sd,
7699
7697
  {
7700
7698
  numberOfAttachments: t.length,
7701
- attachments: f,
7699
+ attachments: u,
7702
7700
  disabled: n,
7703
7701
  loading: l,
7704
7702
  onAddNewAttachment: o,
7705
7703
  onListAllAttachments: r,
7706
- onOpenAttachmentLink: g,
7707
- onOpenAttachmentDetail: y
7704
+ onOpenAttachmentLink: y,
7705
+ onOpenAttachmentDetail: g
7708
7706
  }
7709
7707
  ),
7710
7708
  /* @__PURE__ */ i(
@@ -7731,14 +7729,14 @@ function ld({ toolbar: e }) {
7731
7729
  formIsSaving: a,
7732
7730
  currentId: l,
7733
7731
  results: d,
7734
- setCurrentItemIndex: f,
7735
- currentItemIndex: u,
7732
+ setCurrentItemIndex: u,
7733
+ currentItemIndex: f,
7736
7734
  setCurrentId: c,
7737
7735
  currentModel: h,
7738
7736
  setRemovingItem: p,
7739
7737
  removingItem: m,
7740
- duplicatingItem: g,
7741
- setDuplicatingItem: y,
7738
+ duplicatingItem: y,
7739
+ setDuplicatingItem: g,
7742
7740
  setResults: w,
7743
7741
  formIsLoading: C,
7744
7742
  attachments: I,
@@ -7777,10 +7775,10 @@ function ld({ toolbar: e }) {
7777
7775
  M();
7778
7776
  }
7779
7777
  function W() {
7780
- d && d.length > u + 1 ? (f == null || f(u + 1), c == null || c(d[u + 1].id)) : d && u + 1 === d.length && (f == null || f(0), c == null || c(d[0].id));
7778
+ d && d.length > f + 1 ? (u == null || u(f + 1), c == null || c(d[f + 1].id)) : d && f + 1 === d.length && (u == null || u(0), c == null || c(d[0].id));
7781
7779
  }
7782
7780
  function k() {
7783
- d && u > 0 ? (f == null || f(u - 1), c == null || c(d[u - 1].id)) : d && u === 0 && (f == null || f(d.length - 1), c == null || c(d[d.length - 1].id));
7781
+ d && f > 0 ? (u == null || u(f - 1), c == null || c(d[f - 1].id)) : d && f === 0 && (u == null || u(d.length - 1), c == null || c(d[d.length - 1].id));
7784
7782
  }
7785
7783
  function Y() {
7786
7784
  Zt({
@@ -7801,7 +7799,7 @@ function ld({ toolbar: e }) {
7801
7799
  const M = d == null ? void 0 : d.filter(($) => $.id !== l);
7802
7800
  w == null || w(M);
7803
7801
  let L = 0;
7804
- u > 0 && u <= d.length - 1 && (L = u - 1), M != null && M[L] ? (c == null || c(M == null ? void 0 : M[L].id), f == null || f(L)) : (c == null || c(void 0), f == null || f(void 0));
7802
+ f > 0 && f <= d.length - 1 && (L = f - 1), M != null && M[L] ? (c == null || c(M == null ? void 0 : M[L].id), u == null || u(L)) : (c == null || c(void 0), u == null || u(void 0));
7805
7803
  } catch (M) {
7806
7804
  an(JSON.stringify(M));
7807
7805
  } finally {
@@ -7810,7 +7808,7 @@ function ld({ toolbar: e }) {
7810
7808
  }
7811
7809
  async function X() {
7812
7810
  try {
7813
- y == null || y(!0);
7811
+ g == null || g(!0);
7814
7812
  const M = await E.getHandler().duplicate({
7815
7813
  id: l,
7816
7814
  model: h,
@@ -7820,10 +7818,10 @@ function ld({ toolbar: e }) {
7820
7818
  } catch (M) {
7821
7819
  an(JSON.stringify(M));
7822
7820
  } finally {
7823
- y == null || y(!1);
7821
+ g == null || g(!1);
7824
7822
  }
7825
7823
  }
7826
- const z = a || m || C || g;
7824
+ const z = a || m || C || y;
7827
7825
  function H(M) {
7828
7826
  x == null || x({
7829
7827
  actionData: M,
@@ -7844,7 +7842,7 @@ function ld({ toolbar: e }) {
7844
7842
  /* @__PURE__ */ i(
7845
7843
  Uo,
7846
7844
  {
7847
- disabled: a || C || m || g
7845
+ disabled: a || C || m || y
7848
7846
  }
7849
7847
  ),
7850
7848
  /* @__PURE__ */ i(
@@ -7862,8 +7860,8 @@ function ld({ toolbar: e }) {
7862
7860
  {
7863
7861
  icon: /* @__PURE__ */ i(tr, {}),
7864
7862
  tooltip: S("duplicate"),
7865
- disabled: s || a || l === void 0 || g || C,
7866
- loading: g,
7863
+ disabled: s || a || l === void 0 || y || C,
7864
+ loading: y,
7867
7865
  onClick: X
7868
7866
  }
7869
7867
  ),
@@ -7872,7 +7870,7 @@ function ld({ toolbar: e }) {
7872
7870
  {
7873
7871
  icon: /* @__PURE__ */ i(Zn, {}),
7874
7872
  tooltip: S("delete"),
7875
- disabled: a || l === void 0 || m || g || C,
7873
+ disabled: a || l === void 0 || m || y || C,
7876
7874
  loading: m,
7877
7875
  onClick: Y
7878
7876
  }
@@ -7883,7 +7881,7 @@ function ld({ toolbar: e }) {
7883
7881
  {
7884
7882
  icon: /* @__PURE__ */ i(oo, {}),
7885
7883
  tooltip: S("showLogs"),
7886
- disabled: a || l === void 0 || m || g || C,
7884
+ disabled: a || l === void 0 || m || y || C,
7887
7885
  loading: !1,
7888
7886
  onClick: () => {
7889
7887
  Go(h, l, S);
@@ -7895,7 +7893,7 @@ function ld({ toolbar: e }) {
7895
7893
  {
7896
7894
  icon: /* @__PURE__ */ i(hn, {}),
7897
7895
  tooltip: S("refresh"),
7898
- disabled: a || l === void 0 || m || g || C,
7896
+ disabled: a || l === void 0 || m || y || C,
7899
7897
  loading: !1,
7900
7898
  onClick: () => {
7901
7899
  K(() => {
@@ -8077,9 +8075,9 @@ function Br(e, t) {
8077
8075
  };
8078
8076
  }
8079
8077
  const { useToken: cd } = Ke, Yo = (e) => {
8080
- const { ooui: t, value: n, onChange: o, valueValidator: r, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: d } = t, { token: f } = cd(), u = d && !l ? { backgroundColor: f.colorPrimaryBg } : void 0, c = ee($e), { elementHasLostFocus: h } = c || {}, [p, m] = v(!1), [g, y] = v(!1);
8078
+ const { ooui: t, value: n, onChange: o, valueValidator: r, linkPrefix: s = "" } = e, { id: a, readOnly: l, required: d } = t, { token: u } = cd(), f = d && !l ? { backgroundColor: u.colorPrimaryBg } : void 0, c = ee($e), { elementHasLostFocus: h } = c || {}, [p, m] = v(!1), [y, g] = v(!1);
8081
8079
  ue(() => {
8082
- l && !p && y(!1), !n && !l && (m(!0), y(!0));
8080
+ l && !p && g(!1), !n && !l && (m(!0), g(!0));
8083
8081
  }, [p, l]);
8084
8082
  const w = (C) => {
8085
8083
  o == null || o(C.target.value);
@@ -8090,7 +8088,7 @@ const { useToken: cd } = Ke, Yo = (e) => {
8090
8088
  {
8091
8089
  icon: /* @__PURE__ */ i(Qt, {}),
8092
8090
  onClick: () => {
8093
- r(n) && (m(!1), y(!1));
8091
+ r(n) && (m(!1), g(!1));
8094
8092
  },
8095
8093
  style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
8096
8094
  tabIndex: -1
@@ -8100,32 +8098,32 @@ const { useToken: cd } = Ke, Yo = (e) => {
8100
8098
  {
8101
8099
  icon: /* @__PURE__ */ i(io, {}),
8102
8100
  onClick: () => {
8103
- m(!0), y(!0);
8101
+ m(!0), g(!0);
8104
8102
  },
8105
8103
  style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
8106
8104
  tabIndex: -1
8107
8105
  }
8108
8106
  ) }),
8109
- /* @__PURE__ */ i(ge, { flex: "auto", children: g ? /* @__PURE__ */ i(
8107
+ /* @__PURE__ */ i(ge, { flex: "auto", children: y ? /* @__PURE__ */ i(
8110
8108
  it,
8111
8109
  {
8112
8110
  style: {
8113
8111
  borderTopLeftRadius: 0,
8114
8112
  borderBottomLeftRadius: 0,
8115
- ...u
8113
+ ...f
8116
8114
  },
8117
8115
  id: a,
8118
8116
  onChange: w,
8119
8117
  value: n,
8120
8118
  onBlur: () => {
8121
- r(n) && (m(!1), y(!1), h == null || h());
8119
+ r(n) && (m(!1), g(!1), h == null || h());
8122
8120
  }
8123
8121
  }
8124
8122
  ) : /* @__PURE__ */ i(
8125
8123
  "a",
8126
8124
  {
8127
8125
  href: `${s}${n}`,
8128
- style: { color: f.colorPrimary, paddingRight: 15 },
8126
+ style: { color: u.colorPrimary, paddingRight: 15 },
8129
8127
  target: "_blank",
8130
8128
  rel: "noreferrer",
8131
8129
  children: n
@@ -8154,8 +8152,8 @@ const { useToken: cd } = Ke, Yo = (e) => {
8154
8152
  }, fd = (e) => {
8155
8153
  const { visible: t, onIdSubmitted: n, onCancel: o, isSearching: r } = e, { t: s } = he(), a = re();
8156
8154
  function l(d) {
8157
- const f = d.id.split(",").map((u) => parseInt(u.trim()));
8158
- n(f);
8155
+ const u = d.id.split(",").map((f) => parseInt(f.trim()));
8156
+ n(u);
8159
8157
  }
8160
8158
  return /* @__PURE__ */ i(
8161
8159
  Ze,
@@ -8168,8 +8166,8 @@ const { useToken: cd } = Ke, Yo = (e) => {
8168
8166
  onCancel: o,
8169
8167
  maskClosable: !1,
8170
8168
  afterOpenChange: (d) => {
8171
- var f;
8172
- return d && ((f = a.current) == null ? void 0 : f.focus());
8169
+ var u;
8170
+ return d && ((u = a.current) == null ? void 0 : u.focus());
8173
8171
  },
8174
8172
  children: /* @__PURE__ */ D(lt, { layout: "vertical", onFinish: l, autoComplete: "off", children: [
8175
8173
  /* @__PURE__ */ i(
@@ -8251,8 +8249,8 @@ function hd({ refreshGraph: e }) {
8251
8249
  searchVisible: a,
8252
8250
  setSearchVisible: l,
8253
8251
  graphIsLoading: d,
8254
- previousView: f,
8255
- setPreviousView: u
8252
+ previousView: u,
8253
+ setPreviousView: f
8256
8254
  } = ee(nt);
8257
8255
  return /* @__PURE__ */ D(Ue, { wrap: !0, children: [
8258
8256
  /* @__PURE__ */ i(
@@ -8291,10 +8289,10 @@ function hd({ refreshGraph: e }) {
8291
8289
  currentView: o,
8292
8290
  availableViews: n,
8293
8291
  onChangeView: (c) => {
8294
- u == null || u(o), r == null || r(c);
8292
+ f == null || f(o), r == null || r(c);
8295
8293
  },
8296
8294
  disabled: !1,
8297
- previousView: f
8295
+ previousView: u
8298
8296
  }
8299
8297
  )
8300
8298
  ] });
@@ -8308,12 +8306,12 @@ function bn(e) {
8308
8306
  currentItemIndex: a,
8309
8307
  results: l,
8310
8308
  totalItems: d,
8311
- selectedRowItems: f
8312
- } = ee(nt), { t: u } = he(), { token: c } = pd();
8309
+ selectedRowItems: u
8310
+ } = ee(nt), { t: f } = he(), { token: c } = pd();
8313
8311
  function h() {
8314
8312
  if ((r == null ? void 0 : r.type) === "form")
8315
8313
  return s ? d === 0 ? /* @__PURE__ */ D(oe, { children: [
8316
- u("editingDocument"),
8314
+ f("editingDocument"),
8317
8315
  " (id:",
8318
8316
  " ",
8319
8317
  /* @__PURE__ */ i(
@@ -8325,43 +8323,43 @@ function bn(e) {
8325
8323
  ),
8326
8324
  ")"
8327
8325
  ] }) : /* @__PURE__ */ D(oe, { children: [
8328
- u("register"),
8326
+ f("register"),
8329
8327
  " ",
8330
8328
  a === void 0 ? 1 : a + 1,
8331
8329
  " /",
8332
8330
  " ",
8333
8331
  l.length,
8334
8332
  " ",
8335
- u("of"),
8333
+ f("of"),
8336
8334
  " ",
8337
8335
  d,
8338
8336
  " - ",
8339
- u("editingDocument"),
8337
+ f("editingDocument"),
8340
8338
  " (id:",
8341
8339
  " ",
8342
8340
  /* @__PURE__ */ i(on, { copyable: !0, children: s }),
8343
8341
  ")"
8344
8342
  ] }) : "";
8345
- if ((r == null ? void 0 : r.type) === "tree" && f) {
8346
- if (f.length === 1)
8343
+ if ((r == null ? void 0 : r.type) === "tree" && u) {
8344
+ if (u.length === 1)
8347
8345
  return /* @__PURE__ */ D(oe, { children: [
8348
8346
  "1 ",
8349
- u("selectedRegisters"),
8347
+ f("selectedRegisters"),
8350
8348
  " - (id:",
8351
8349
  " ",
8352
- /* @__PURE__ */ i(on, { copyable: !0, children: f[0].id }),
8350
+ /* @__PURE__ */ i(on, { copyable: !0, children: u[0].id }),
8353
8351
  ")"
8354
8352
  ] });
8355
- if (f.length > 1)
8353
+ if (u.length > 1)
8356
8354
  return /* @__PURE__ */ D(oe, { children: [
8357
- f.length,
8355
+ u.length,
8358
8356
  " ",
8359
- u("selectedRegisters"),
8357
+ f("selectedRegisters"),
8360
8358
  /* @__PURE__ */ i(
8361
8359
  on,
8362
8360
  {
8363
8361
  copyable: {
8364
- text: f.map((p) => p.id).join(", ")
8362
+ text: u.map((p) => p.id).join(", ")
8365
8363
  }
8366
8364
  }
8367
8365
  )
@@ -8404,16 +8402,16 @@ function bn(e) {
8404
8402
  );
8405
8403
  }
8406
8404
  const yd = (e) => {
8407
- const { viewData: t, visible: n, model: o, context: r, domain: s, formView: a, treeView: l } = e, d = re(), f = ee(
8405
+ const { viewData: t, visible: n, model: o, context: r, domain: s, formView: a, treeView: l } = e, d = re(), u = ee(
8408
8406
  nt
8409
8407
  ), {
8410
- setResults: u = void 0,
8408
+ setResults: f = void 0,
8411
8409
  setCurrentItemIndex: c = void 0,
8412
8410
  currentId: h = void 0,
8413
8411
  results: p = void 0,
8414
8412
  setSelectedRowItems: m = void 0,
8415
- setSearchParams: g = void 0,
8416
- searchVisible: y = !0,
8413
+ setSearchParams: y = void 0,
8414
+ searchVisible: g = !0,
8417
8415
  setSearchVisible: w = void 0,
8418
8416
  sorter: C = void 0,
8419
8417
  setSorter: I = void 0,
@@ -8426,7 +8424,7 @@ const yd = (e) => {
8426
8424
  searchValues: R,
8427
8425
  setSearchValues: x,
8428
8426
  currentView: O
8429
- } = f || {}, [A, P] = v(!0);
8427
+ } = u || {}, [A, P] = v(!0);
8430
8428
  ue(() => {
8431
8429
  var U;
8432
8430
  (U = d.current) == null || U.refresh();
@@ -8439,7 +8437,7 @@ const yd = (e) => {
8439
8437
  setSelectedRowItems: m,
8440
8438
  searchParams: S,
8441
8439
  setSearchValues: x,
8442
- setSearchParams: g,
8440
+ setSearchParams: y,
8443
8441
  setSearchVisible: w,
8444
8442
  setTreeIsLoading: V,
8445
8443
  context: r,
@@ -8448,7 +8446,7 @@ const yd = (e) => {
8448
8446
  sorter: C,
8449
8447
  setSorter: I,
8450
8448
  setCurrentItemIndex: c,
8451
- setResultsActionView: u,
8449
+ setResultsActionView: f,
8452
8450
  resultsActionView: p,
8453
8451
  domain: s,
8454
8452
  currentId: h,
@@ -8478,10 +8476,10 @@ const yd = (e) => {
8478
8476
  offset: k,
8479
8477
  isSearching: j,
8480
8478
  onSubmit: (U) => {
8481
- P(!1), g == null || g(U.params), w == null || w(!1);
8479
+ P(!1), y == null || y(U.params), w == null || w(!1);
8482
8480
  },
8483
8481
  searchError: W,
8484
- searchVisible: y,
8482
+ searchVisible: g,
8485
8483
  searchValues: R,
8486
8484
  showLimitOptions: !1
8487
8485
  }
@@ -8509,8 +8507,8 @@ const yd = (e) => {
8509
8507
  formView: a,
8510
8508
  context: l,
8511
8509
  defaultValues: d,
8512
- forcedValues: f,
8513
- results: u,
8510
+ forcedValues: u,
8511
+ results: f,
8514
8512
  setResults: c,
8515
8513
  setCurrentItemIndex: h
8516
8514
  } = e;
@@ -8523,13 +8521,13 @@ const yd = (e) => {
8523
8521
  ref: n,
8524
8522
  model: o,
8525
8523
  defaultValues: d,
8526
- forcedValues: f,
8524
+ forcedValues: u,
8527
8525
  formView: a,
8528
8526
  actionDomain: s,
8529
8527
  id: r,
8530
8528
  parentContext: l,
8531
8529
  onSubmitSucceed: (p, m) => {
8532
- u.findIndex((y) => y.id === p) === -1 && (u.push(m), c(u), h(u.length - 1));
8530
+ f.findIndex((g) => g.id === p) === -1 && (f.push(m), c(f), h(f.length - 1));
8533
8531
  }
8534
8532
  }
8535
8533
  )
@@ -8537,13 +8535,13 @@ const yd = (e) => {
8537
8535
  };
8538
8536
  function vd(e) {
8539
8537
  const { onSearch: t, disabled: n = !1, searchText: o } = e, { t: r } = he(), [s] = lt.useForm(), [a, l] = v(!1);
8540
- function d(u) {
8541
- t(u.search);
8538
+ function d(f) {
8539
+ t(f.search);
8542
8540
  }
8543
8541
  ue(() => {
8544
8542
  s.setFieldsValue({ search: o });
8545
8543
  }, [o]);
8546
- function f() {
8544
+ function u() {
8547
8545
  l(!1), s.setFieldsValue({ search: void 0 }), t(void 0);
8548
8546
  }
8549
8547
  return /* @__PURE__ */ i(lt, { form: s, onFinish: d, autoComplete: "off", children: /* @__PURE__ */ D(Ve, { align: "middle", justify: "end", children: [
@@ -8552,15 +8550,15 @@ function vd(e) {
8552
8550
  {
8553
8551
  autoFocus: !0,
8554
8552
  disabled: n,
8555
- onChange: (u) => {
8556
- l(u.target.value.length > 0);
8553
+ onChange: (f) => {
8554
+ l(f.target.value.length > 0);
8557
8555
  },
8558
8556
  style: { borderTopRightRadius: 0, borderBottomRightRadius: 0 },
8559
8557
  suffix: (a || o && o.length > 0) && /* @__PURE__ */ i(wt, { title: r("clear"), children: /* @__PURE__ */ i(
8560
8558
  ji,
8561
8559
  {
8562
8560
  style: { color: "rgba(0,0,0,.45)" },
8563
- onClick: f
8561
+ onClick: u
8564
8562
  }
8565
8563
  ) })
8566
8564
  }
@@ -8902,7 +8900,7 @@ const bd = {
8902
8900
  );
8903
8901
  Fd.displayName = "ConfigContextProvider";
8904
8902
  var Cn = /* @__PURE__ */ ((e) => (e.FEATURE_VIEW_JSON_ATTRS = "view_json_attrs", e.FEATURE_ADVANCED_EXPORT = "export_data2", e.FEATURE_OMNISEARCH = "omnisearch", e.FEATURE_READFORVIEW = "read_for_view", e))(Cn || {});
8905
- const uf = Object.values(Cn);
8903
+ const ff = Object.values(Cn);
8906
8904
  function Id(e) {
8907
8905
  var z;
8908
8906
  const {
@@ -8914,14 +8912,14 @@ function Id(e) {
8914
8912
  removingItem: a,
8915
8913
  duplicatingItem: l,
8916
8914
  setDuplicatingItem: d,
8917
- currentModel: f,
8918
- searchTreeRef: u,
8915
+ currentModel: u,
8916
+ searchTreeRef: f,
8919
8917
  setCurrentId: c,
8920
8918
  setCurrentItemIndex: h,
8921
8919
  searchParams: p,
8922
8920
  searchVisible: m,
8923
- setSearchVisible: g,
8924
- setSearchTreeNameSearch: y,
8921
+ setSearchVisible: y,
8922
+ setSearchTreeNameSearch: g,
8925
8923
  searchTreeNameSearch: w,
8926
8924
  treeIsLoading: C,
8927
8925
  setPreviousView: I,
@@ -8947,10 +8945,10 @@ function Id(e) {
8947
8945
  var H;
8948
8946
  try {
8949
8947
  s == null || s(!0), await E.getHandler().deleteObjects({
8950
- model: f,
8948
+ model: u,
8951
8949
  ids: r.map((M) => M.id),
8952
8950
  context: { ...F }
8953
- }), c == null || c(void 0), h == null || h(void 0), (H = u == null ? void 0 : u.current) == null || H.refreshResults();
8951
+ }), c == null || c(void 0), h == null || h(void 0), (H = f == null ? void 0 : f.current) == null || H.refreshResults();
8954
8952
  } catch (M) {
8955
8953
  Xe(M);
8956
8954
  } finally {
@@ -8964,9 +8962,9 @@ function Id(e) {
8964
8962
  const M = r[0].id;
8965
8963
  await E.getHandler().duplicate({
8966
8964
  id: M,
8967
- model: f,
8965
+ model: u,
8968
8966
  context: { ...F }
8969
- }) && ((H = u == null ? void 0 : u.current) == null || H.refreshResults());
8967
+ }) && ((H = f == null ? void 0 : f.current) == null || H.refreshResults());
8970
8968
  } catch (M) {
8971
8969
  Xe(M);
8972
8970
  } finally {
@@ -8988,7 +8986,7 @@ function Id(e) {
8988
8986
  },
8989
8987
  onRefreshParentValues: () => {
8990
8988
  var M;
8991
- (M = u == null ? void 0 : u.current) == null || M.refreshResults();
8989
+ (M = f == null ? void 0 : f.current) == null || M.refreshResults();
8992
8990
  }
8993
8991
  });
8994
8992
  }
@@ -9005,7 +9003,7 @@ function Id(e) {
9005
9003
  disabled: l || a,
9006
9004
  searchText: w,
9007
9005
  onSearch: (H) => {
9008
- H && H.trim().length > 0 ? y == null || y(H) : y == null || y(void 0);
9006
+ H && H.trim().length > 0 ? g == null || g(H) : g == null || g(void 0);
9009
9007
  }
9010
9008
  }
9011
9009
  ),
@@ -9021,7 +9019,7 @@ function Id(e) {
9021
9019
  tooltip: O("advanced_search"),
9022
9020
  type: m ? "primary" : "default",
9023
9021
  onClick: () => {
9024
- g == null || g(!m);
9022
+ y == null || y(!m);
9025
9023
  },
9026
9024
  disabled: l || a,
9027
9025
  badgeNumber: p == null ? void 0 : p.length
@@ -9059,7 +9057,7 @@ function Id(e) {
9059
9057
  disabled: !(r && (r == null ? void 0 : r.length) > 0) || C,
9060
9058
  loading: !1,
9061
9059
  onClick: () => {
9062
- Go(f, r[0].id, O);
9060
+ Go(u, r[0].id, O);
9063
9061
  }
9064
9062
  }
9065
9063
  ),
@@ -9072,7 +9070,7 @@ function Id(e) {
9072
9070
  loading: !1,
9073
9071
  onClick: () => {
9074
9072
  var H;
9075
- (H = u == null ? void 0 : u.current) == null || H.refreshResults();
9073
+ (H = f == null ? void 0 : f.current) == null || H.refreshResults();
9076
9074
  }
9077
9075
  }
9078
9076
  ),
@@ -9177,11 +9175,11 @@ function Id(e) {
9177
9175
  let M = (r == null ? void 0 : r.map((L) => L.id)) || [];
9178
9176
  M.length === 0 && (M = (b == null ? void 0 : b.map((L) => L.id)) || []), X({
9179
9177
  id: -1,
9180
- model: f,
9178
+ model: u,
9181
9179
  report_name: "printscreen.list",
9182
9180
  type: "ir.actions.report.xml",
9183
9181
  datas: {
9184
- model: f,
9182
+ model: u,
9185
9183
  ids: M
9186
9184
  }
9187
9185
  });
@@ -9197,9 +9195,9 @@ function Id(e) {
9197
9195
  {
9198
9196
  visible: K,
9199
9197
  onClose: () => j(!1),
9200
- model: f,
9198
+ model: u,
9201
9199
  domain: Jt(
9202
- ((z = u == null ? void 0 : u.current) == null ? void 0 : z.getDomain()) || [],
9200
+ ((z = f == null ? void 0 : f.current) == null ? void 0 : z.getDomain()) || [],
9203
9201
  p || []
9204
9202
  ),
9205
9203
  limit: V,
@@ -9225,12 +9223,12 @@ const Rd = (e) => {
9225
9223
  treeView: a,
9226
9224
  domain: l,
9227
9225
  setCurrentItemIndex: d,
9228
- results: f,
9229
- setCurrentId: u,
9226
+ results: u,
9227
+ setCurrentId: f,
9230
9228
  setCurrentView: c,
9231
9229
  availableViews: h,
9232
9230
  searchTreeNameSearch: p
9233
- } = e, { currentView: m, setPreviousView: g } = ee(
9231
+ } = e, { currentView: m, setPreviousView: y } = ee(
9234
9232
  nt
9235
9233
  );
9236
9234
  return t ? /* @__PURE__ */ D(oe, { children: [
@@ -9253,11 +9251,11 @@ const Rd = (e) => {
9253
9251
  formView: s,
9254
9252
  treeView: a,
9255
9253
  domain: l,
9256
- onRowClicked: (y) => {
9257
- const { id: w } = y;
9258
- u(w);
9259
- const C = f.findIndex((T) => T.id === w);
9260
- g == null || g(m), d(C);
9254
+ onRowClicked: (g) => {
9255
+ const { id: w } = g;
9256
+ f(w);
9257
+ const C = u.findIndex((T) => T.id === w);
9258
+ y == null || y(m), d(C);
9261
9259
  const I = h.find(
9262
9260
  (T) => T.type === "form"
9263
9261
  );
@@ -9385,14 +9383,14 @@ function Ed(e, t) {
9385
9383
  title: a,
9386
9384
  setCanWeClose: l,
9387
9385
  tabKey: d,
9388
- initialView: f,
9389
- formDefaultValues: u,
9386
+ initialView: u,
9387
+ formDefaultValues: f,
9390
9388
  formForcedValues: c = {},
9391
9389
  res_id: h = !1,
9392
9390
  action_id: p,
9393
9391
  action_type: m,
9394
- treeExpandable: g = !1,
9395
- limit: y
9392
+ treeExpandable: y = !1,
9393
+ limit: g
9396
9394
  } = e, [w, C] = v(), [I, T] = v([]), [b, V] = v(!0), _ = h || void 0, [F, S] = v(
9397
9395
  _
9398
9396
  ), [R, x] = v([]), [O, A] = v(), [P, K] = v([]), [j, W] = v(), [k, Y] = v(0), [U, X] = v(!1), [z, H] = v(!1), [M, L] = v(), { t: $ } = he(), de = re(), Z = re(), ne = ee(
@@ -9479,7 +9477,7 @@ function Ed(e, t) {
9479
9477
  case "tree": {
9480
9478
  G.push({
9481
9479
  ...ce,
9482
- isExpandable: g,
9480
+ isExpandable: y,
9483
9481
  type: be
9484
9482
  });
9485
9483
  break;
@@ -9494,9 +9492,9 @@ function Ed(e, t) {
9494
9492
  }
9495
9493
  }
9496
9494
  let pe;
9497
- !f && G.find((we) => we.type === "tree") ? pe = G.find(
9495
+ !u && G.find((we) => we.type === "tree") ? pe = G.find(
9498
9496
  (be) => be.type === "tree"
9499
- ) : f ? pe = G.find((be) => f.id ? be.type === f.type && be.view_id === f.id : be.type === f.type) : pe = G.find(
9497
+ ) : u ? pe = G.find((be) => u.id ? be.type === u.type && be.view_id === u.id : be.type === u.type) : pe = G.find(
9500
9498
  (be) => be.type === "form"
9501
9499
  ), pe || (Xe(
9502
9500
  `Error determining the first view to show for model ${o}.
@@ -9504,7 +9502,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9504
9502
  ), De == null || De(d)), fe(pe), T(G), V(!1);
9505
9503
  };
9506
9504
  l({ tabKey: d, canWeClose: Le }), ue(() => {
9507
- const G = I.find((ke) => ke.type === "tree"), ve = I.find((ke) => f.id ? ke.type === f.type && ke.view_id === f.id : ke.type === f.type);
9505
+ const G = I.find((ke) => ke.type === "tree"), ve = I.find((ke) => u.id ? ke.type === u.type && ke.view_id === u.id : ke.type === u.type);
9508
9506
  fe(ve || G), h ? Q == null || Q(_) : (Pe(void 0), A(void 0)), Ie();
9509
9507
  }, [o, s, h]), ue(() => {
9510
9508
  if (xe === d) {
@@ -9573,7 +9571,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9573
9571
  model: o,
9574
9572
  context: r,
9575
9573
  domain: n,
9576
- defaultValues: u,
9574
+ defaultValues: f,
9577
9575
  forcedValues: c,
9578
9576
  results: P,
9579
9577
  setResults: K,
@@ -9586,7 +9584,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9586
9584
  Rd,
9587
9585
  {
9588
9586
  visible: w.type === G.type && w.view_id === G.view_id,
9589
- limit: y,
9587
+ limit: g,
9590
9588
  model: o,
9591
9589
  context: r,
9592
9590
  domain: n,
@@ -9665,7 +9663,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9665
9663
  setSearchTreeNameSearch: L,
9666
9664
  searchTreeNameSearch: M,
9667
9665
  goToResourceId: me,
9668
- limit: y,
9666
+ limit: g,
9669
9667
  children: [
9670
9668
  Ee(),
9671
9669
  /* @__PURE__ */ i(
@@ -9702,12 +9700,12 @@ async function kd({
9702
9700
  context: { ...t, ...a }
9703
9701
  }) : [], {
9704
9702
  res_model: d,
9705
- views: f,
9706
- name: u,
9703
+ views: u,
9704
+ name: f,
9707
9705
  limit: c,
9708
9706
  view_type: h
9709
9707
  } = s, p = h === "tree", m = [];
9710
- for (const C of f) {
9708
+ for (const C of u) {
9711
9709
  const [I, T] = C;
9712
9710
  if (I)
9713
9711
  m.push(C);
@@ -9721,13 +9719,13 @@ async function kd({
9721
9719
  m.push([b, T]);
9722
9720
  }
9723
9721
  }
9724
- const [g, y] = m[0], w = { id: g, type: y };
9722
+ const [y, g] = m[0], w = { id: y, type: g };
9725
9723
  return {
9726
- title: u,
9724
+ title: f,
9727
9725
  actionId: e,
9728
9726
  actionType: o,
9729
9727
  key: or(),
9730
- views: f,
9728
+ views: u,
9731
9729
  model: d,
9732
9730
  context: { ...t, ...a },
9733
9731
  domain: l,
@@ -9831,7 +9829,7 @@ function Hd(e) {
9831
9829
  domain: s = [],
9832
9830
  visible: a = !0,
9833
9831
  parentContext: l = {}
9834
- } = e, [d, f] = v(!1), [u, c] = v(!1), [h, p] = v(), [m, g] = v(), [y, w] = v(), [C, I] = v(1), [T, b] = v(0), V = re(Ft), _ = re([]), [F, S] = v(0), [R, x] = v([]), [O, A] = v(void 0), [P, K] = v(), [j, W] = v(), [k, Y] = v(), [U, X] = v(!1), z = re([]), H = (Q) => {
9832
+ } = e, [d, u] = v(!1), [f, c] = v(!1), [h, p] = v(), [m, y] = v(), [g, w] = v(), [C, I] = v(1), [T, b] = v(0), V = re(Ft), _ = re([]), [F, S] = v(0), [R, x] = v([]), [O, A] = v(void 0), [P, K] = v(), [j, W] = v(), [k, Y] = v(), [U, X] = v(!1), z = re([]), H = (Q) => {
9835
9833
  X(!0), I(Q), b((Q - 1) * V.current);
9836
9834
  }, M = async () => {
9837
9835
  const Q = z.current.length > 0 ? z.current : s, se = Jt(_.current, Q), { colors: xe } = Tt(m), { totalItems: Ae, results: De, attrsEvaluated: Pe } = await E.getHandler().searchForTree({
@@ -9847,7 +9845,7 @@ function Hd(e) {
9847
9845
  const fe = Et({
9848
9846
  resultsToSort: De,
9849
9847
  sorter: P,
9850
- fields: { ...m.fields, ...y.fields }
9848
+ fields: { ...m.fields, ...g.fields }
9851
9849
  });
9852
9850
  X(!1), x(fe);
9853
9851
  const Ie = await Ae;
@@ -9860,23 +9858,23 @@ function Hd(e) {
9860
9858
  }
9861
9859
  };
9862
9860
  ue(() => {
9863
- u && a && L();
9864
- }, [C, T, u, a]);
9861
+ f && a && L();
9862
+ }, [C, T, f, a]);
9865
9863
  const $ = async (Q) => {
9866
- c(!1), f(!0), Y(void 0);
9864
+ c(!1), u(!0), Y(void 0);
9867
9865
  try {
9868
9866
  Q === "action" ? await de() : await Z(), c(!0);
9869
9867
  } catch (se) {
9870
9868
  Y(se);
9871
9869
  } finally {
9872
- f(!1);
9870
+ u(!1);
9873
9871
  }
9874
9872
  }, de = async () => {
9875
9873
  const Q = await E.getHandler().getViewsForAction({
9876
9874
  action: t,
9877
9875
  context: l
9878
9876
  });
9879
- z.current = Q.domain, w(Q.views.get("form")), g(Q.views.get("tree")), p(Q.model), V.current = Q.limit;
9877
+ z.current = Q.domain, w(Q.views.get("form")), y(Q.views.get("tree")), p(Q.model), V.current = Q.limit;
9880
9878
  }, Z = async () => {
9881
9879
  p(n);
9882
9880
  const Q = await E.getHandler().getView({
@@ -9891,7 +9889,7 @@ function Hd(e) {
9891
9889
  id: o,
9892
9890
  context: l
9893
9891
  });
9894
- g(se);
9892
+ y(se);
9895
9893
  };
9896
9894
  ue(() => {
9897
9895
  t ? $("action") : n && $("model");
@@ -9903,7 +9901,7 @@ function Hd(e) {
9903
9901
  model: h,
9904
9902
  treeView: m
9905
9903
  });
9906
- }, ye = () => !m || !y ? null : /* @__PURE__ */ D("div", { style: { overflowY: "scroll" }, children: [
9904
+ }, ye = () => !m || !g ? null : /* @__PURE__ */ D("div", { style: { overflowY: "scroll" }, children: [
9907
9905
  j && /* @__PURE__ */ i(Qe, { className: "mt-10", message: j, type: "error", banner: !0 }),
9908
9906
  /* @__PURE__ */ i(
9909
9907
  en,
@@ -9924,7 +9922,7 @@ function Hd(e) {
9924
9922
  const se = Et({
9925
9923
  resultsToSort: R,
9926
9924
  sorter: Q,
9927
- fields: { ...m.fields, ...y.fields }
9925
+ fields: { ...m.fields, ...g.fields }
9928
9926
  });
9929
9927
  x(se);
9930
9928
  },
@@ -9949,10 +9947,10 @@ const Bd = Bn(Hd), jd = (e) => {
9949
9947
  }
9950
9948
  return /* @__PURE__ */ i("div", { style: { padding: "0.5rem", overflowY: "scroll" }, children: /* @__PURE__ */ i(Ht, { ...e, model: t, id: n, readOnly: !0 }) });
9951
9949
  }, Kd = (e) => {
9952
- const { model: t, domain: n = [], context: o = {}, view_id: r, manualIds: s } = e, [a, l] = v(!1), [d, f] = v(), [u, c] = v(), [h] = Je(
9950
+ const { model: t, domain: n = [], context: o = {}, view_id: r, manualIds: s } = e, [a, l] = v(!1), [d, u] = v(), [f, c] = v(), [h] = Je(
9953
9951
  E.getHandler().readForView
9954
9952
  ), p = J(async () => {
9955
- l(!0), f(void 0), s && n.push(["id", "in", s]);
9953
+ l(!0), u(void 0), s && n.push(["id", "in", s]);
9956
9954
  try {
9957
9955
  const m = await h({
9958
9956
  model: t,
@@ -9962,7 +9960,7 @@ const Bd = Bn(Hd), jd = (e) => {
9962
9960
  });
9963
9961
  c(m);
9964
9962
  } catch (m) {
9965
- f("Error reading graph data from server: " + m);
9963
+ u("Error reading graph data from server: " + m);
9966
9964
  }
9967
9965
  l(!1);
9968
9966
  }, [o, n, s, t, h, r]);
@@ -9970,12 +9968,12 @@ const Bd = Bn(Hd), jd = (e) => {
9970
9968
  loading: a,
9971
9969
  error: d,
9972
9970
  fetchData: p,
9973
- graphData: u
9971
+ graphData: f
9974
9972
  };
9975
9973
  }, Wd = (e, t) => {
9976
9974
  const { view_id: n, model: o, context: r, domain: s, manualIds: a } = e, l = ee(
9977
9975
  nt
9978
- ), { setGraphIsLoading: d = void 0 } = l || {}, { error: f, loading: u, graphData: c, fetchData: h } = Kd({
9976
+ ), { setGraphIsLoading: d = void 0 } = l || {}, { error: u, loading: f, graphData: c, fetchData: h } = Kd({
9979
9977
  view_id: n,
9980
9978
  model: o,
9981
9979
  domain: s,
@@ -9983,31 +9981,31 @@ const Bd = Bn(Hd), jd = (e) => {
9983
9981
  manualIds: a
9984
9982
  });
9985
9983
  if (ue(() => {
9986
- d == null || d(u);
9987
- }, [u]), pt(t, () => ({
9984
+ d == null || d(f);
9985
+ }, [f]), pt(t, () => ({
9988
9986
  refresh: () => {
9989
9987
  h();
9990
9988
  }
9991
9989
  })), ue(() => {
9992
9990
  h();
9993
- }, [n]), u || !c)
9991
+ }, [n]), f || !c)
9994
9992
  return /* @__PURE__ */ i(wn, {});
9995
- if (f)
9996
- return /* @__PURE__ */ i(Qe, { className: "mt-10", message: f, type: "error", banner: !0 });
9993
+ if (u)
9994
+ return /* @__PURE__ */ i(Qe, { className: "mt-10", message: u, type: "error", banner: !0 });
9997
9995
  switch (c.type) {
9998
9996
  case "indicatorField":
9999
9997
  case "indicator": {
10000
- const { value: p, total: m, percent: g, icon: y, color: w, suffix: C } = c;
9998
+ const { value: p, total: m, percent: y, icon: g, color: w, suffix: C } = c;
10001
9999
  return /* @__PURE__ */ i(
10002
10000
  Mo,
10003
10001
  {
10004
10002
  value: p,
10005
10003
  totalValue: m,
10006
- percent: g,
10004
+ percent: y,
10007
10005
  color: w,
10008
- icon: y,
10006
+ icon: g,
10009
10007
  suffix: C,
10010
- showPercent: No(g)
10008
+ showPercent: No(y)
10011
10009
  }
10012
10010
  );
10013
10011
  }
@@ -10031,11 +10029,11 @@ const Bd = Bn(Hd), jd = (e) => {
10031
10029
  }
10032
10030
  }, Ud = ht(Wd), _n = "line_ids";
10033
10031
  function Gd(e, t) {
10034
- const { model: n, context: o = {}, id: r, configAction: s } = e, [a, l] = v([]), [d, f] = v(!1), [u, c] = v(), {
10032
+ const { model: n, context: o = {}, id: r, configAction: s } = e, [a, l] = v([]), [d, u] = v(!1), [f, c] = v(), {
10035
10033
  setIsLoading: h,
10036
10034
  openAction: p,
10037
10035
  moveItemsEnabled: m
10038
- } = ee(ur), g = re(), y = re(), [w] = Je(E.getHandler().getView), [C] = Je(
10036
+ } = ee(ur), y = re(), g = re(), [w] = Je(E.getHandler().getView), [C] = Je(
10039
10037
  E.getHandler().readObjects
10040
10038
  ), [I] = Je(E.getHandler().update), T = Xo(
10041
10039
  Cn.FEATURE_READFORVIEW
@@ -10049,16 +10047,16 @@ function Gd(e, t) {
10049
10047
  configDashboard: x
10050
10048
  }));
10051
10049
  async function b() {
10052
- f(!0), h(!0), c(void 0);
10050
+ u(!0), h(!0), c(void 0);
10053
10051
  try {
10054
10052
  const O = await V(), A = await F(O), P = O.fields[_n].relation, K = A[_n].items;
10055
- y.current = O.fields;
10053
+ g.current = O.fields;
10056
10054
  const j = await _({
10057
10055
  items: K,
10058
10056
  model: P,
10059
10057
  context: o
10060
10058
  }), W = await S(j);
10061
- c(void 0), l(W), f(!1), h(!1);
10059
+ c(void 0), l(W), u(!1), h(!1);
10062
10060
  } catch (O) {
10063
10061
  c(JSON.stringify(O));
10064
10062
  }
@@ -10075,17 +10073,17 @@ function Gd(e, t) {
10075
10073
  model: A,
10076
10074
  context: P
10077
10075
  }) {
10078
- g.current = (await w({
10076
+ y.current = (await w({
10079
10077
  model: A,
10080
10078
  type: "form",
10081
10079
  context: P
10082
10080
  })).fields;
10083
10081
  const [K] = await sr({
10084
10082
  treeView: {
10085
- fields: g.current
10083
+ fields: y.current
10086
10084
  },
10087
10085
  formView: {
10088
- fields: g.current
10086
+ fields: y.current
10089
10087
  },
10090
10088
  model: A,
10091
10089
  items: O,
@@ -10148,21 +10146,21 @@ function Gd(e, t) {
10148
10146
  }
10149
10147
  };
10150
10148
  }), j = {
10151
- fields: g.current,
10149
+ fields: y.current,
10152
10150
  items: K
10153
10151
  };
10154
10152
  await I({
10155
10153
  model: n,
10156
10154
  id: r,
10157
10155
  values: { [_n]: j },
10158
- fields: y.current,
10156
+ fields: g.current,
10159
10157
  context: o
10160
10158
  });
10161
10159
  }
10162
10160
  async function x() {
10163
10161
  p(s);
10164
10162
  }
10165
- return d ? /* @__PURE__ */ i(gt, {}) : u ? /* @__PURE__ */ i(Qe, { className: "mt-10 mb-20", message: u, type: "error", banner: !0 }) : /* @__PURE__ */ i(Pd, { onPositionItemsChanged: R, children: a.map((O, A) => {
10163
+ return d ? /* @__PURE__ */ i(gt, {}) : f ? /* @__PURE__ */ i(Qe, { className: "mt-10 mb-20", message: f, type: "error", banner: !0 }) : /* @__PURE__ */ i(Pd, { onPositionItemsChanged: R, children: a.map((O, A) => {
10166
10164
  const { actionData: P, values: K } = O, { position: j, id: W } = K, {
10167
10165
  actionId: k,
10168
10166
  actionType: Y,
@@ -10296,7 +10294,7 @@ const Yd = ht(Gd), qd = (e) => {
10296
10294
  const { ooui: t } = e;
10297
10295
  return /* @__PURE__ */ i(Ce, { type: "array", ...e, children: /* @__PURE__ */ i(zd, { ooui: t }) });
10298
10296
  }, zd = (e) => {
10299
- const { value: t, ooui: n, onChange: o } = e, { items: r = [] } = t || {}, s = r.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, l] = v([]), [d, f] = v(), [u, c] = v(!1), { relation: h, context: p, readOnly: m, field: g, columns: y } = n, w = ee($e), { getContext: C } = w || {};
10297
+ const { value: t, ooui: n, onChange: o } = e, { items: r = [] } = t || {}, s = r.filter((F) => F.operation !== "pendingRemove").map((F) => F.id), [a, l] = v([]), [d, u] = v(), [f, c] = v(!1), { relation: h, context: p, readOnly: m, field: y, columns: g } = n, w = ee($e), { getContext: C } = w || {};
10300
10298
  bt(() => {
10301
10299
  T();
10302
10300
  }, [r]);
@@ -10324,16 +10322,16 @@ const Yd = ht(Gd), qd = (e) => {
10324
10322
  const R = (await E.getHandler().search({
10325
10323
  model: h,
10326
10324
  params: F,
10327
- fieldsToRetrieve: [g],
10325
+ fieldsToRetrieve: [y],
10328
10326
  context: { ...C == null ? void 0 : C(), ...p }
10329
10327
  })).map((x) => {
10330
- const O = x[g];
10328
+ const O = x[y];
10331
10329
  let A = O;
10332
10330
  return Array.isArray(O) && (A = O[1]), { label: A, value: x.id };
10333
10331
  });
10334
10332
  l(R);
10335
10333
  } catch (S) {
10336
- f(S);
10334
+ u(S);
10337
10335
  } finally {
10338
10336
  c(!1);
10339
10337
  }
@@ -10353,7 +10351,7 @@ const Yd = ht(Gd), qd = (e) => {
10353
10351
  S.push({ id: x, operation: "pendingLink" });
10354
10352
  }), I(S);
10355
10353
  };
10356
- return u && a.length === 0 ? /* @__PURE__ */ i(je, {}) : /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ D("div", { className: "flex flex-row", children: [
10354
+ return f && a.length === 0 ? /* @__PURE__ */ i(je, {}) : /* @__PURE__ */ i(oe, { children: /* @__PURE__ */ D("div", { className: "flex flex-row", children: [
10357
10355
  /* @__PURE__ */ i(
10358
10356
  Ut.Group,
10359
10357
  {
@@ -10361,7 +10359,7 @@ const Yd = ht(Gd), qd = (e) => {
10361
10359
  disabled: m,
10362
10360
  onChange: _,
10363
10361
  style: { width: "100%" },
10364
- children: /* @__PURE__ */ i(Ve, { children: a.map((F) => /* @__PURE__ */ i(ge, { span: Math.floor(24 / y), children: /* @__PURE__ */ i(Ut, { value: F.value, children: F.label }) })) })
10362
+ children: /* @__PURE__ */ i(Ve, { children: a.map((F) => /* @__PURE__ */ i(ge, { span: Math.floor(24 / g), children: /* @__PURE__ */ i(Ut, { value: F.value, children: F.label }) })) })
10365
10363
  }
10366
10364
  ),
10367
10365
  !m && /* @__PURE__ */ D(Ue, { children: [
@@ -10399,9 +10397,9 @@ const Yd = ht(Gd), qd = (e) => {
10399
10397
  const { ooui: t } = e, { required: n } = t;
10400
10398
  return /* @__PURE__ */ i(Ce, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(Zd, { ...e }) });
10401
10399
  }, Zd = (e) => {
10402
- const { ooui: t, onChange: n, value: o } = e, { selectionValues: r, readOnly: s, direction: a } = t, l = Array.from(r.entries()), d = l && l.length && l.map((f) => {
10403
- const [u, c] = f;
10404
- return /* @__PURE__ */ i(gr, { value: u, children: c }, u);
10400
+ const { ooui: t, onChange: n, value: o } = e, { selectionValues: r, readOnly: s, direction: a } = t, l = Array.from(r.entries()), d = l && l.length && l.map((u) => {
10401
+ const [f, c] = u;
10402
+ return /* @__PURE__ */ i(gr, { value: f, children: c }, f);
10405
10403
  });
10406
10404
  return /* @__PURE__ */ i(gr.Group, { disabled: s, onChange: n, value: o, children: /* @__PURE__ */ i(Ue, { direction: a, children: d }) });
10407
10405
  }, eu = (e) => {
@@ -10414,13 +10412,13 @@ const Yd = ht(Gd), qd = (e) => {
10414
10412
  const { ooui: t } = e, { required: n } = t;
10415
10413
  return /* @__PURE__ */ i(Ce, { required: n, type: "any", ...e, children: /* @__PURE__ */ i(ru, { ...e }) });
10416
10414
  }, ru = (e) => {
10417
- const { ooui: t, value: n } = e, { selectionValues: o, errorField: r } = t, s = ee($e), a = Array.from(o.entries()), l = a.map((u) => u[0]).indexOf(n);
10418
- let d = "process", f = "";
10419
- return r && (f = s.getFieldValue(r), f && (d = "error")), /* @__PURE__ */ i(yr, { current: l, status: d, children: a.map((u, c) => /* @__PURE__ */ i(
10415
+ const { ooui: t, value: n } = e, { selectionValues: o, errorField: r } = t, s = ee($e), a = Array.from(o.entries()), l = a.map((f) => f[0]).indexOf(n);
10416
+ let d = "process", u = "";
10417
+ return r && (u = s.getFieldValue(r), u && (d = "error")), /* @__PURE__ */ i(yr, { current: l, status: d, children: a.map((f, c) => /* @__PURE__ */ i(
10420
10418
  yr.Step,
10421
10419
  {
10422
- title: u[1],
10423
- description: c === l && d === "error" ? f : null
10420
+ title: f[1],
10421
+ description: c === l && d === "error" ? u : null
10424
10422
  }
10425
10423
  )) });
10426
10424
  }, ou = (e) => {
@@ -10490,14 +10488,14 @@ function pu() {
10490
10488
  return /* @__PURE__ */ i(mu, { className: "m-5 select-none", children: /* @__PURE__ */ i(hu, { level: 5, children: e("welcome") }) });
10491
10489
  }
10492
10490
  function gu(e, t) {
10493
- const { children: n } = e, [o, r] = v("welcome"), { t: s } = he(), { globalValues: a, rootContext: l } = Jo(), [d, f] = v([
10491
+ const { children: n } = e, [o, r] = v("welcome"), { t: s } = he(), { globalValues: a, rootContext: l } = Jo(), [d, u] = v([
10494
10492
  {
10495
10493
  title: s("welcome"),
10496
10494
  key: "welcome",
10497
10495
  closable: !0,
10498
10496
  content: /* @__PURE__ */ i(pu, {})
10499
10497
  }
10500
- ]), u = re(/* @__PURE__ */ new Map()), c = re();
10498
+ ]), f = re(/* @__PURE__ */ new Map()), c = re();
10501
10499
  pt(t, () => ({
10502
10500
  retrieveAndOpenAction: m,
10503
10501
  openShortcut: w
@@ -10507,13 +10505,13 @@ function gu(e, t) {
10507
10505
  const b = d.findIndex((V) => V.key === T);
10508
10506
  d[b - 1] && r(d[b - 1].key), d[b + 1] && r(d[b + 1].key);
10509
10507
  }
10510
- f(d.filter((b) => b.key !== T)), u.current.delete(T);
10508
+ u(d.filter((b) => b.key !== T)), f.current.delete(T);
10511
10509
  }
10512
10510
  function p({
10513
10511
  tabKey: T,
10514
10512
  canWeClose: b
10515
10513
  }) {
10516
- u.current.set(T, b);
10514
+ f.current.set(T, b);
10517
10515
  }
10518
10516
  async function m({
10519
10517
  action: T,
@@ -10590,14 +10588,14 @@ function gu(e, t) {
10590
10588
  limit: X
10591
10589
  });
10592
10590
  }
10593
- function g({
10591
+ function y({
10594
10592
  title: T,
10595
10593
  content: b,
10596
10594
  key: V,
10597
10595
  action: _
10598
10596
  }) {
10599
10597
  let F = [...d];
10600
- d.length === 1 && d[0].key === "welcome" && (F = [...d.filter((S) => S.key !== "welcome")]), f([
10598
+ d.length === 1 && d[0].key === "welcome" && (F = [...d.filter((S) => S.key !== "welcome")]), u([
10601
10599
  ...F,
10602
10600
  {
10603
10601
  title: T,
@@ -10608,7 +10606,7 @@ function gu(e, t) {
10608
10606
  }
10609
10607
  ]), r(V);
10610
10608
  }
10611
- async function y({
10609
+ async function g({
10612
10610
  relateData: T,
10613
10611
  fields: b,
10614
10612
  values: V,
@@ -10769,7 +10767,7 @@ function gu(e, t) {
10769
10767
  });
10770
10768
  } else {
10771
10769
  const Y = R && Array.isArray(R.id) ? { ...R, id: R.id[0] } : R;
10772
- g({
10770
+ y({
10773
10771
  title: F,
10774
10772
  action: {
10775
10773
  id: x,
@@ -10804,12 +10802,12 @@ function gu(e, t) {
10804
10802
  {
10805
10803
  openShortcut: w,
10806
10804
  openAction: I,
10807
- openRelate: y,
10805
+ openRelate: g,
10808
10806
  openDefaultActionForModel: C,
10809
10807
  tabs: d,
10810
10808
  activeKey: o,
10811
10809
  onRemoveTab: async (T) => {
10812
- const b = u.current.get(T);
10810
+ const b = f.current.get(T);
10813
10811
  (await (b == null ? void 0 : b()) || o === "welcome") && h(T);
10814
10812
  },
10815
10813
  onChangeTab: (T) => {
@@ -10826,7 +10824,7 @@ function gu(e, t) {
10826
10824
  }
10827
10825
  );
10828
10826
  }
10829
- const ff = ht(gu), { useToken: yu } = Ke;
10827
+ const mf = ht(gu), { useToken: yu } = Ke;
10830
10828
  function wu(e) {
10831
10829
  const { label: t, onClose: n, tabKey: o, isActive: r, onSelected: s } = e, { token: a } = yu(), l = r ? a.colorBgContainer : a.colorPrimaryBg;
10832
10830
  return /* @__PURE__ */ D(
@@ -10898,7 +10896,7 @@ function wu(e) {
10898
10896
  }
10899
10897
  );
10900
10898
  }
10901
- function mf() {
10899
+ function hf() {
10902
10900
  const e = ee(
10903
10901
  dt
10904
10902
  ), { activeKey: t, tabs: n, onRemoveTab: o, onChangeTab: r } = e || {};
@@ -10923,25 +10921,25 @@ function vu(e) {
10923
10921
  return /* @__PURE__ */ i("div", { style: t.key !== o ? r : void 0, children: t.content });
10924
10922
  }
10925
10923
  const bu = rt.memo(vu, () => !0);
10926
- function hf() {
10924
+ function pf() {
10927
10925
  const e = ee(
10928
10926
  dt
10929
10927
  ), { tabs: t } = e || {}, n = (t == null ? void 0 : t.map((o) => /* @__PURE__ */ i(bu, { tab: o }, o.key))) || null;
10930
10928
  return /* @__PURE__ */ i(oe, { children: n });
10931
10929
  }
10932
- const { useToken: Cu } = Ke, pf = (e) => {
10930
+ const { useToken: Cu } = Ke, gf = (e) => {
10933
10931
  const {
10934
10932
  onRetrieveShortcuts: t,
10935
10933
  onCheckIsFavourite: n,
10936
10934
  onAddFavourite: o,
10937
10935
  onRemoveFavourite: r,
10938
10936
  onDropdownClosed: s
10939
- } = e, [a, l] = v(!1), [d, f] = v(), { t: u } = he(), { token: c } = Cu(), h = re(null), p = ee(
10937
+ } = e, [a, l] = v(!1), [d, u] = v(), { t: f } = he(), { token: c } = Cu(), h = re(null), p = ee(
10940
10938
  dt
10941
10939
  ), {
10942
10940
  openShortcut: m,
10943
- tabs: g,
10944
- activeKey: y,
10941
+ tabs: y,
10942
+ activeKey: g,
10945
10943
  currentView: w,
10946
10944
  currentId: C,
10947
10945
  openDefaultActionForModel: I
@@ -10976,7 +10974,7 @@ const { useToken: Cu } = Ke, pf = (e) => {
10976
10974
  if (!T)
10977
10975
  return;
10978
10976
  const x = await n(T);
10979
- x !== !1 && f(x), l(x !== !1);
10977
+ x !== !1 && u(x), l(x !== !1);
10980
10978
  }, [T, n]);
10981
10979
  async function F() {
10982
10980
  var x;
@@ -10986,7 +10984,7 @@ const { useToken: Cu } = Ke, pf = (e) => {
10986
10984
  const x = await t();
10987
10985
  return x.length === 0 ? [
10988
10986
  {
10989
- label: u == null ? void 0 : u("no_favorites"),
10987
+ label: f == null ? void 0 : f("no_favorites"),
10990
10988
  items: []
10991
10989
  }
10992
10990
  ] : [
@@ -10999,13 +10997,13 @@ const { useToken: Cu } = Ke, pf = (e) => {
10999
10997
  }))
11000
10998
  }
11001
10999
  ];
11002
- }, [t, u]), R = J(async () => {
11000
+ }, [t, f]), R = J(async () => {
11003
11001
  if (a && d)
11004
11002
  await r(d);
11005
11003
  else {
11006
11004
  if (!w)
11007
11005
  return;
11008
- const x = g.find((j) => j.key === y), { id: O, type: A } = (x == null ? void 0 : x.action) || {}, P = w.view_id;
11006
+ const x = y.find((j) => j.key === g), { id: O, type: A } = (x == null ? void 0 : x.action) || {}, P = w.view_id;
11009
11007
  let K = !1;
11010
11008
  if (!O || !A) {
11011
11009
  l(!1);
@@ -11020,7 +11018,7 @@ const { useToken: Cu } = Ke, pf = (e) => {
11020
11018
  }
11021
11019
  await S(), l(!a);
11022
11020
  }, [
11023
- y,
11021
+ g,
11024
11022
  C,
11025
11023
  d,
11026
11024
  w,
@@ -11028,7 +11026,7 @@ const { useToken: Cu } = Ke, pf = (e) => {
11028
11026
  a,
11029
11027
  o,
11030
11028
  r,
11031
- g
11029
+ y
11032
11030
  ]);
11033
11031
  return /* @__PURE__ */ i(
11034
11032
  Qi,
@@ -11039,8 +11037,8 @@ const { useToken: Cu } = Ke, pf = (e) => {
11039
11037
  onItemClick: V,
11040
11038
  placement: "bottomRight",
11041
11039
  header: /* @__PURE__ */ D("div", { style: { width: 300, padding: 5, display: "flex" }, children: [
11042
- /* @__PURE__ */ i("div", { style: { paddingLeft: 15, color: "#ccc" }, children: u == null ? void 0 : u("favorites").toUpperCase() }),
11043
- /* @__PURE__ */ i("div", { style: { flexGrow: 1, paddingLeft: 10 }, children: /* @__PURE__ */ i(wt, { title: u == null ? void 0 : u("edit_favorites"), children: /* @__PURE__ */ i(
11040
+ /* @__PURE__ */ i("div", { style: { paddingLeft: 15, color: "#ccc" }, children: f == null ? void 0 : f("favorites").toUpperCase() }),
11041
+ /* @__PURE__ */ i("div", { style: { flexGrow: 1, paddingLeft: 10 }, children: /* @__PURE__ */ i(wt, { title: f == null ? void 0 : f("edit_favorites"), children: /* @__PURE__ */ i(
11044
11042
  io,
11045
11043
  {
11046
11044
  style: { color: c.colorPrimary, cursor: "pointer" },
@@ -11069,17 +11067,17 @@ export {
11069
11067
  Fd as ConfigContextProvider,
11070
11068
  E as ConnectionProvider,
11071
11069
  Ha as ContentRootProvider,
11072
- hf as CurrentTabContent,
11070
+ pf as CurrentTabContent,
11073
11071
  Yd as Dashboard,
11074
11072
  Pd as DashboardGrid,
11075
11073
  $d as DashboardGridItem,
11076
11074
  zc as Date,
11077
11075
  Jc as DateTime,
11078
11076
  ud as Email,
11079
- uf as ErpAllFeatureKeys,
11077
+ ff as ErpAllFeatureKeys,
11080
11078
  Cn as ErpFeatureKeys,
11081
11079
  qc as ExportModal,
11082
- pf as FavouriteButton,
11080
+ gf as FavouriteButton,
11083
11081
  To as Float,
11084
11082
  Dc as FloatTime,
11085
11083
  Ht as Form,
@@ -11098,7 +11096,7 @@ export {
11098
11096
  vl as ProgressBar,
11099
11097
  Qd as Radio,
11100
11098
  Zc as Reference,
11101
- ff as RootView,
11099
+ mf as RootView,
11102
11100
  Fo as SearchFilter,
11103
11101
  cr as SearchModal,
11104
11102
  Do as SearchTree,
@@ -11107,7 +11105,7 @@ export {
11107
11105
  nu as Steps,
11108
11106
  eu as Switch,
11109
11107
  wu as Tab,
11110
- mf as TabSelector,
11108
+ hf as TabSelector,
11111
11109
  ba as Tag,
11112
11110
  Ca as Tags,
11113
11111
  Nc as Text,