@gisce/react-ooui 1.4.1-rc.0 → 1.4.1

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.
@@ -1,8 +1,8 @@
1
- import Je, { useContext as Y, useState as T, useEffect as pe, useRef as ue, useCallback as Le, forwardRef as bt, useImperativeHandle as xt } from "react";
2
- import { Tooltip as ht, theme as Pe, Typography as an, Form as ot, Row as Ce, Col as le, Modal as Ge, Button as Ie, Dropdown as Bt, Menu as He, Spin as Me, Divider as ln, Space as Ye, Input as nt, Select as Ct, Checkbox as Nt, Alert as Ze, Timeline as tr, Statistic as ei, Card as ti, Tag as Dr, message as xn, DatePicker as Mn, TimePicker as Vr, InputNumber as En, Progress as ni, Avatar as ri, Badge as oi, Pagination as ii, Tabs as Ar, Popover as si, Radio as nr, Switch as ai, Steps as rr, Layout as li } from "antd";
3
- import { Label as At, Field as In, Tree as Rr, Reference as ci, Selection as $n, Many2one as kr, Boolean as di, Container as ui, parseContext as wt, Form as Mr, Integer as _n, SearchFieldTypes as ft, SearchFilter as fi, transformDomainForChildWidget as Er, graphProcessor as $r, parseGraph as Ln, graphFieldUtils as mi } from "@gisce/ooui";
1
+ import Je, { useContext as Y, useState as T, useEffect as pe, useRef as de, useCallback as $e, forwardRef as wt, useImperativeHandle as bt } from "react";
2
+ import { Tooltip as ht, theme as Pe, Typography as an, Form as ot, Row as Ce, Col as le, Modal as Ge, Button as Ie, Dropdown as Bt, Menu as He, Spin as Le, Divider as ln, Space as Ye, Input as nt, Select as xt, Checkbox as Nt, Alert as Ze, Timeline as tr, Statistic as ei, Card as ti, Tag as Dr, message as xn, DatePicker as Mn, TimePicker as Vr, InputNumber as En, Progress as ni, Avatar as ri, Badge as oi, Pagination as ii, Tabs as Ar, Popover as si, Radio as nr, Switch as ai, Steps as rr, Layout as li } from "antd";
3
+ import { Label as Vt, Field as In, Tree as Rr, Reference as ci, Selection as $n, Many2one as kr, Boolean as di, Container as ui, parseContext as vt, Form as Mr, Integer as _n, SearchFieldTypes as ft, SearchFilter as fi, transformDomainForChildWidget as Er, graphProcessor as $r, parseGraph as Ln, graphFieldUtils as mi } from "@gisce/ooui";
4
4
  import * as or from "@ant-design/icons";
5
- import Lr, { QuestionCircleOutlined as Nr, ExclamationCircleOutlined as pt, LoadingOutlined as rt, DownOutlined as Rt, WarningOutlined as Pr, CloseOutlined as jt, CheckOutlined as kt, TranslationOutlined as Hr, FolderOpenOutlined as Nn, DownloadOutlined as Pn, ClearOutlined as Hn, StarFilled as Br, StarOutlined as jr, UpOutlined as hi, SearchOutlined as Bn, RightCircleOutlined as pi, ThunderboltOutlined as jn, PrinterOutlined as Kn, EnterOutlined as Kr, PlusSquareOutlined as gi, MinusSquareOutlined as yi, FileAddOutlined as cn, AlignLeftOutlined as vi, ApiOutlined as wi, DeleteOutlined as Yn, LeftOutlined as Yr, RightOutlined as Wr, EyeOutlined as bi, FormOutlined as Pt, TableOutlined as Wn, AreaChartOutlined as xi, CalendarOutlined as Ci, LinkOutlined as Ur, SaveOutlined as Si, CopyOutlined as Un, InfoCircleOutlined as Gr, ReloadOutlined as dn, EditOutlined as qr, FilterOutlined as zr, CloseCircleFilled as Ti, BorderOuterOutlined as Fi, SettingOutlined as Oi, ExportOutlined as Ii } from "@ant-design/icons";
5
+ import Lr, { QuestionCircleOutlined as Nr, ExclamationCircleOutlined as pt, LoadingOutlined as rt, DownOutlined as At, WarningOutlined as Pr, CloseOutlined as jt, CheckOutlined as Rt, TranslationOutlined as Hr, FolderOpenOutlined as Nn, DownloadOutlined as Pn, ClearOutlined as Hn, StarFilled as Br, StarOutlined as jr, UpOutlined as hi, SearchOutlined as Bn, RightCircleOutlined as pi, ThunderboltOutlined as jn, PrinterOutlined as Kn, EnterOutlined as Kr, PlusSquareOutlined as gi, MinusSquareOutlined as yi, FileAddOutlined as cn, AlignLeftOutlined as vi, ApiOutlined as wi, DeleteOutlined as Yn, LeftOutlined as Yr, RightOutlined as Wr, EyeOutlined as bi, FormOutlined as Pt, TableOutlined as Wn, AreaChartOutlined as xi, CalendarOutlined as Ci, LinkOutlined as Ur, SaveOutlined as Si, CopyOutlined as Un, InfoCircleOutlined as Gr, ReloadOutlined as dn, EditOutlined as qr, FilterOutlined as zr, CloseCircleFilled as Ti, BorderOuterOutlined as Fi, SettingOutlined as Oi, ExportOutlined as Ii } from "@ant-design/icons";
6
6
  import { Interweave as Gn } from "interweave";
7
7
  import { jsxs as P, jsx as n, Fragment as ne } from "react/jsx-runtime";
8
8
  import * as ir from "@tabler/icons-react";
@@ -11,7 +11,7 @@ import Kt from "styled-components";
11
11
  import qn from "react-measure";
12
12
  import Dn from "antd/lib/typography/Title";
13
13
  import { Line as Di, Column as Vi, Pie as Ai } from "@ant-design/plots";
14
- import St from "use-deep-compare-effect";
14
+ import Ct from "use-deep-compare-effect";
15
15
  import { Table as Ri } from "@gisce/react-formiga-table";
16
16
  import { fileTypeFromBuffer as ki } from "file-type-buffer-browser";
17
17
  import { isPresetStatusColor as Mi } from "antd/lib/_util/colors";
@@ -44,7 +44,7 @@ const {
44
44
  tooltip: s,
45
45
  fieldForLabel: a,
46
46
  labelSize: l,
47
- labelType: u
47
+ labelType: d
48
48
  } = t, f = a !== null && o.length > 1 ? o + " :" : o, m = r || (a ? i ? "left" : "right" : "left"), {
49
49
  token: v
50
50
  } = Gi(), p = l === void 0 ? Wi : Ui;
@@ -62,7 +62,7 @@ const {
62
62
  className: "pr-2",
63
63
  children: /* @__PURE__ */ n(p, {
64
64
  level: l,
65
- type: u,
65
+ type: d,
66
66
  children: /* @__PURE__ */ n(Gn, {
67
67
  content: f
68
68
  })
@@ -359,19 +359,19 @@ function ve({
359
359
  alignLabel: s = "left",
360
360
  required: a = !1,
361
361
  type: l,
362
- validator: u
362
+ validator: d
363
363
  }) {
364
364
  const {
365
365
  id: c,
366
366
  label: f,
367
- tooltip: d
367
+ tooltip: u
368
368
  } = e, {
369
369
  t: m
370
370
  } = Y(we), v = a ? [{
371
371
  required: !0,
372
372
  message: m("fillRequiredField"),
373
373
  type: l,
374
- validator: u
374
+ validator: d
375
375
  }] : void 0, p = () => /* @__PURE__ */ n(ot.Item, {
376
376
  className: "mb-0",
377
377
  name: c,
@@ -382,10 +382,10 @@ function ve({
382
382
  if (!o)
383
383
  return p();
384
384
  const h = /* @__PURE__ */ n(un, {
385
- ooui: new At({
385
+ ooui: new Vt({
386
386
  name: c + "_label",
387
387
  string: f,
388
- help: d,
388
+ help: u,
389
389
  fieldForLabel: c
390
390
  }),
391
391
  align: s
@@ -433,10 +433,10 @@ const {
433
433
  getFieldValue: s,
434
434
  executeButtonAction: a,
435
435
  getContext: l,
436
- getValues: u,
436
+ getValues: d,
437
437
  getPlainValues: c,
438
438
  domain: f,
439
- submitForm: d,
439
+ submitForm: u,
440
440
  fetchValues: m,
441
441
  formHasChanges: v,
442
442
  elementHasLostFocus: p,
@@ -445,7 +445,7 @@ const {
445
445
  return /* @__PURE__ */ n(Ne.Provider, {
446
446
  value: {
447
447
  domain: f,
448
- getValues: u,
448
+ getValues: d,
449
449
  getPlainValues: c,
450
450
  getFields: h,
451
451
  activeId: r,
@@ -454,7 +454,7 @@ const {
454
454
  getFieldValue: s,
455
455
  executeButtonAction: a,
456
456
  getContext: l,
457
- submitForm: d,
457
+ submitForm: u,
458
458
  fetchValues: m,
459
459
  formHasChanges: v,
460
460
  elementHasLostFocus: p
@@ -593,18 +593,18 @@ const Zr = (e) => {
593
593
  buttonType: s,
594
594
  confirmMessage: a,
595
595
  icon: l,
596
- context: u,
596
+ context: d,
597
597
  readOnly: c
598
598
  } = t, f = Y(Ne), {
599
- executeButtonAction: d
599
+ executeButtonAction: u
600
600
  } = f || {}, [m, v] = T(!1), {
601
601
  lang: p
602
602
  } = Y(we);
603
603
  async function h() {
604
- v(!0), await d({
604
+ v(!0), await u({
605
605
  type: s,
606
606
  action: r,
607
- context: u
607
+ context: d
608
608
  }), v(!1);
609
609
  }
610
610
  function g() {
@@ -655,10 +655,10 @@ const Zr = (e) => {
655
655
  caption: s,
656
656
  activated: a,
657
657
  buttonType: l,
658
- confirmMessage: u,
658
+ confirmMessage: d,
659
659
  icon: c,
660
660
  primary: f,
661
- danger: d,
661
+ danger: u,
662
662
  context: m,
663
663
  readOnly: v
664
664
  } = r || {}, p = Y(Ne), {
@@ -682,9 +682,9 @@ const Zr = (e) => {
682
682
  }), y(!1));
683
683
  }
684
684
  function V() {
685
- if (u) {
685
+ if (d) {
686
686
  Yt({
687
- confirmMessage: u,
687
+ confirmMessage: d,
688
688
  lang: O,
689
689
  onOk: () => {
690
690
  w();
@@ -704,7 +704,7 @@ const Zr = (e) => {
704
704
  children: /* @__PURE__ */ P(Bt.Button, {
705
705
  disabled: !a || v,
706
706
  onClick: V,
707
- icon: /* @__PURE__ */ n(Rt, {}),
707
+ icon: /* @__PURE__ */ n(At, {}),
708
708
  type: f ? "primary" : void 0,
709
709
  overlay: /* @__PURE__ */ n(os, {
710
710
  ooui: i,
@@ -730,10 +730,10 @@ const Zr = (e) => {
730
730
  const {
731
731
  id: a,
732
732
  caption: l,
733
- activated: u,
733
+ activated: d,
734
734
  buttonType: c,
735
735
  confirmMessage: f,
736
- icon: d,
736
+ icon: u,
737
737
  context: m,
738
738
  readOnly: v,
739
739
  danger: p
@@ -761,13 +761,13 @@ const Zr = (e) => {
761
761
  function _() {
762
762
  if (h)
763
763
  return /* @__PURE__ */ n(rt, {});
764
- if (d) {
765
- const w = it(d);
764
+ if (u) {
765
+ const w = it(u);
766
766
  return w && /* @__PURE__ */ n(w, {});
767
767
  }
768
768
  }
769
769
  return /* @__PURE__ */ n(He.Item, {
770
- disabled: !u || v,
770
+ disabled: !d || v,
771
771
  onClick: O,
772
772
  icon: _(),
773
773
  danger: p,
@@ -855,8 +855,8 @@ const Xr = (e) => {
855
855
  } = e, {
856
856
  modalWidth: l
857
857
  } = fn(), {
858
- t: u
859
- } = Y(we), [c, f] = T([]), [d, m] = T(!1), [v, p] = T(!1), [h, g] = T({}), y = ue();
858
+ t: d
859
+ } = Y(we), [c, f] = T([]), [u, m] = T(!1), [v, p] = T(!1), [h, g] = T({}), y = de();
860
860
  pe(() => {
861
861
  t ? O() : g({});
862
862
  }, [t]);
@@ -944,7 +944,7 @@ const Xr = (e) => {
944
944
  p(!1), a();
945
945
  }
946
946
  function E() {
947
- return d ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ P(ne, {
947
+ return u ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ P(ne, {
948
948
  children: [V(), /* @__PURE__ */ n(ln, {}), /* @__PURE__ */ n(Ce, {
949
949
  justify: "end",
950
950
  children: /* @__PURE__ */ P(Ye, {
@@ -952,23 +952,23 @@ const Xr = (e) => {
952
952
  icon: /* @__PURE__ */ n(jt, {}),
953
953
  onClick: r,
954
954
  disabled: v,
955
- children: u("cancel")
955
+ children: d("cancel")
956
956
  }), /* @__PURE__ */ n(Ie, {
957
- icon: v ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n(kt, {}),
957
+ icon: v ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n(Rt, {}),
958
958
  disabled: v,
959
959
  onClick: D,
960
960
  style: {
961
961
  marginLeft: 15
962
962
  },
963
963
  type: "primary",
964
- children: u("ok")
964
+ children: d("ok")
965
965
  })]
966
966
  })
967
967
  })]
968
968
  });
969
969
  }
970
970
  return /* @__PURE__ */ n(Ge, {
971
- title: u("translate"),
971
+ title: d("translate"),
972
972
  centered: !0,
973
973
  width: l,
974
974
  open: t,
@@ -1013,23 +1013,23 @@ const {
1013
1013
  required: a,
1014
1014
  translatable: l
1015
1015
  } = t, {
1016
- token: u
1016
+ token: d
1017
1017
  } = cs(), c = a && !o ? {
1018
- backgroundColor: u.colorPrimaryBg
1018
+ backgroundColor: d.colorPrimaryBg
1019
1019
  } : void 0, f = Y(Ne), {
1020
- elementHasLostFocus: d
1020
+ elementHasLostFocus: u
1021
1021
  } = f || {};
1022
1022
  let m = /* @__PURE__ */ n(nt, {
1023
1023
  disabled: o || l && !r,
1024
1024
  id: i,
1025
1025
  style: c,
1026
1026
  maxLength: t.size,
1027
- onBlur: d
1027
+ onBlur: u
1028
1028
  });
1029
1029
  return s && (m = /* @__PURE__ */ n(nt.Password, {
1030
1030
  disabled: o,
1031
1031
  id: i,
1032
- onBlur: d
1032
+ onBlur: u
1033
1033
  })), l && !o && !r && (m = /* @__PURE__ */ n(ds, {
1034
1034
  field: i,
1035
1035
  requiredStyle: c
@@ -1048,19 +1048,19 @@ const {
1048
1048
  activeId: s,
1049
1049
  activeModel: a,
1050
1050
  fetchValues: l,
1051
- formHasChanges: u,
1051
+ formHasChanges: d,
1052
1052
  elementHasLostFocus: c
1053
- } = o || {}, [f, d] = T(!1), {
1053
+ } = o || {}, [f, u] = T(!1), {
1054
1054
  t: m
1055
1055
  } = Y(we);
1056
1056
  return s ? /* @__PURE__ */ P(ne, {
1057
1057
  children: [/* @__PURE__ */ n("div", {
1058
1058
  onClick: () => {
1059
- if (u != null && u()) {
1059
+ if (d != null && d()) {
1060
1060
  ct(m("saveBeforeTranslate"));
1061
1061
  return;
1062
1062
  }
1063
- f || d(!0);
1063
+ f || u(!0);
1064
1064
  },
1065
1065
  children: /* @__PURE__ */ n(nt, {
1066
1066
  value: e,
@@ -1082,10 +1082,10 @@ const {
1082
1082
  field: t,
1083
1083
  visible: f,
1084
1084
  onCloseModal: () => {
1085
- d(!1);
1085
+ u(!1);
1086
1086
  },
1087
1087
  onSubmitSucceed: () => {
1088
- d(!1), l == null || l();
1088
+ u(!1), l == null || l();
1089
1089
  }
1090
1090
  })]
1091
1091
  }) : /* @__PURE__ */ n(ne, {
@@ -1109,7 +1109,7 @@ const {
1109
1109
  tooltip: m("translate"),
1110
1110
  icon: /* @__PURE__ */ n(Hr, {}),
1111
1111
  onClick: async () => {
1112
- u != null && u() ? ct(m("saveBeforeTranslate")) : ct(m("enterTextBeforeTranslate"));
1112
+ d != null && d() ? ct(m("saveBeforeTranslate")) : ct(m("enterTextBeforeTranslate"));
1113
1113
  },
1114
1114
  children: m("translate")
1115
1115
  })
@@ -1121,7 +1121,7 @@ const {
1121
1121
  defaultSeed: fs
1122
1122
  } = Pe, ms = us(fs), {
1123
1123
  Option: hs
1124
- } = Ct, to = (e) => {
1124
+ } = xt, to = (e) => {
1125
1125
  const {
1126
1126
  ooui: t
1127
1127
  } = e, {
@@ -1144,23 +1144,23 @@ const {
1144
1144
  selectionValues: o,
1145
1145
  readOnly: s,
1146
1146
  required: a
1147
- } = t, l = Array.from(o.entries()), u = l && l.length && l.map((f) => {
1148
- const [d, m] = f;
1147
+ } = t, l = Array.from(o.entries()), d = l && l.length && l.map((f) => {
1148
+ const [u, m] = f;
1149
1149
  return /* @__PURE__ */ n(hs, {
1150
- value: d,
1150
+ value: u,
1151
1151
  children: m
1152
- }, d);
1152
+ }, u);
1153
1153
  });
1154
- return /* @__PURE__ */ n(a && !s ? ps : Ct, {
1154
+ return /* @__PURE__ */ n(a && !s ? ps : xt, {
1155
1155
  disabled: s,
1156
1156
  onChange: r,
1157
1157
  value: i,
1158
1158
  optionFilterProp: "children",
1159
- filterOption: (f, d) => d.children.toLowerCase().indexOf(f.toLowerCase()) >= 0,
1159
+ filterOption: (f, u) => u.children.toLowerCase().indexOf(f.toLowerCase()) >= 0,
1160
1160
  showSearch: !0,
1161
- children: u
1161
+ children: d
1162
1162
  });
1163
- }, ps = Kt(Ct)`
1163
+ }, ps = Kt(xt)`
1164
1164
  &.ant-select:not(.ant-select-customize-input) .ant-select-selector {
1165
1165
  background-color: ${ms.colorPrimaryBg};
1166
1166
  }
@@ -1223,16 +1223,16 @@ var Rs = As, ks = Rs, Ms = /^\s+/;
1223
1223
  function Es(e) {
1224
1224
  return e && e.slice(0, ks(e) + 1).replace(Ms, "");
1225
1225
  }
1226
- var $s = Es, Ls = oo, Ns = Ls.Symbol, io = Ns, dr = io, so = Object.prototype, Ps = so.hasOwnProperty, Hs = so.toString, $t = dr ? dr.toStringTag : void 0;
1226
+ var $s = Es, Ls = oo, Ns = Ls.Symbol, io = Ns, dr = io, so = Object.prototype, Ps = so.hasOwnProperty, Hs = so.toString, Et = dr ? dr.toStringTag : void 0;
1227
1227
  function Bs(e) {
1228
- var t = Ps.call(e, $t), r = e[$t];
1228
+ var t = Ps.call(e, Et), r = e[Et];
1229
1229
  try {
1230
- e[$t] = void 0;
1230
+ e[Et] = void 0;
1231
1231
  var i = !0;
1232
1232
  } catch {
1233
1233
  }
1234
1234
  var o = Hs.call(e);
1235
- return i && (t ? e[$t] = r : delete e[$t]), o;
1235
+ return i && (t ? e[Et] = r : delete e[Et]), o;
1236
1236
  }
1237
1237
  var js = Bs, Ks = Object.prototype, Ys = Ks.toString;
1238
1238
  function Ws(e) {
@@ -1268,10 +1268,10 @@ function fa(e) {
1268
1268
  }
1269
1269
  var ma = fa, ha = ro, Cn = Ds, pr = ma, pa = "Expected a function", ga = Math.max, ya = Math.min;
1270
1270
  function va(e, t, r) {
1271
- var i, o, s, a, l, u, c = 0, f = !1, d = !1, m = !0;
1271
+ var i, o, s, a, l, d, c = 0, f = !1, u = !1, m = !0;
1272
1272
  if (typeof e != "function")
1273
1273
  throw new TypeError(pa);
1274
- t = pr(t) || 0, ha(r) && (f = !!r.leading, d = "maxWait" in r, s = d ? ga(pr(r.maxWait) || 0, t) : s, m = "trailing" in r ? !!r.trailing : m);
1274
+ t = pr(t) || 0, ha(r) && (f = !!r.leading, u = "maxWait" in r, s = u ? ga(pr(r.maxWait) || 0, t) : s, m = "trailing" in r ? !!r.trailing : m);
1275
1275
  function v(D) {
1276
1276
  var E = i, b = o;
1277
1277
  return i = o = void 0, c = D, a = e.apply(b, E), a;
@@ -1280,12 +1280,12 @@ function va(e, t, r) {
1280
1280
  return c = D, l = setTimeout(y, t), f ? v(D) : a;
1281
1281
  }
1282
1282
  function h(D) {
1283
- var E = D - u, b = D - c, C = t - E;
1284
- return d ? ya(C, s - b) : C;
1283
+ var E = D - d, b = D - c, C = t - E;
1284
+ return u ? ya(C, s - b) : C;
1285
1285
  }
1286
1286
  function g(D) {
1287
- var E = D - u, b = D - c;
1288
- return u === void 0 || E >= t || E < 0 || d && b >= s;
1287
+ var E = D - d, b = D - c;
1288
+ return d === void 0 || E >= t || E < 0 || u && b >= s;
1289
1289
  }
1290
1290
  function y() {
1291
1291
  var D = Cn();
@@ -1297,18 +1297,18 @@ function va(e, t, r) {
1297
1297
  return l = void 0, m && i ? v(D) : (i = o = void 0, a);
1298
1298
  }
1299
1299
  function _() {
1300
- l !== void 0 && clearTimeout(l), c = 0, i = u = o = l = void 0;
1300
+ l !== void 0 && clearTimeout(l), c = 0, i = d = o = l = void 0;
1301
1301
  }
1302
1302
  function w() {
1303
1303
  return l === void 0 ? a : O(Cn());
1304
1304
  }
1305
1305
  function V() {
1306
1306
  var D = Cn(), E = g(D);
1307
- if (i = arguments, o = this, u = D, E) {
1307
+ if (i = arguments, o = this, d = D, E) {
1308
1308
  if (l === void 0)
1309
- return p(u);
1310
- if (d)
1311
- return clearTimeout(l), l = setTimeout(y, t), v(u);
1309
+ return p(d);
1310
+ if (u)
1311
+ return clearTimeout(l), l = setTimeout(y, t), v(d);
1312
1312
  }
1313
1313
  return l === void 0 && (l = setTimeout(y, t)), a;
1314
1314
  }
@@ -1319,7 +1319,7 @@ function ba(e) {
1319
1319
  const r = Buffer.from(e, "base64").length / 1e3;
1320
1320
  return `${Math.round((r + Number.EPSILON) * 100) / 100} KB`;
1321
1321
  }
1322
- async function Vt(e) {
1322
+ async function Dt(e) {
1323
1323
  const t = await ki(
1324
1324
  Buffer.from(e, "base64")
1325
1325
  );
@@ -1359,18 +1359,18 @@ const xa = (e) => {
1359
1359
  onChange: i
1360
1360
  } = e, {
1361
1361
  readOnly: o
1362
- } = t, s = ue(null), {
1362
+ } = t, s = de(null), {
1363
1363
  t: a
1364
- } = Y(we), l = (d) => {
1365
- i == null || i(d);
1364
+ } = Y(we), l = (u) => {
1365
+ i == null || i(u);
1366
1366
  };
1367
- async function u() {
1368
- const d = await Vt(r), m = `data:${d == null ? void 0 : d.mime};base64,${r}`, v = document.createElement("a");
1369
- v.href = m, v.download = `image.${d == null ? void 0 : d.ext}`, v.click();
1367
+ async function d() {
1368
+ const u = await Dt(r), m = `data:${u == null ? void 0 : u.mime};base64,${r}`, v = document.createElement("a");
1369
+ v.href = m, v.download = `image.${u == null ? void 0 : u.ext}`, v.click();
1370
1370
  }
1371
- async function c(d) {
1372
- d.stopPropagation(), d.preventDefault();
1373
- const m = d.target.files[0], v = await ao(m);
1371
+ async function c(u) {
1372
+ u.stopPropagation(), u.preventDefault();
1373
+ const m = u.target.files[0], v = await ao(m);
1374
1374
  l(v);
1375
1375
  }
1376
1376
  function f() {
@@ -1412,7 +1412,7 @@ const xa = (e) => {
1412
1412
  }), /* @__PURE__ */ n(ze, {
1413
1413
  tooltip: a("download"),
1414
1414
  disabled: !r,
1415
- onClick: u,
1415
+ onClick: d,
1416
1416
  icon: /* @__PURE__ */ n(Pn, {})
1417
1417
  }), /* @__PURE__ */ n(ze, {
1418
1418
  tooltip: a("clear"),
@@ -1452,21 +1452,21 @@ const xa = (e) => {
1452
1452
  r && r(i);
1453
1453
  }
1454
1454
  });
1455
- }, It = (e) => {
1455
+ }, Ot = (e) => {
1456
1456
  const t = e.arch, r = e.fields, i = new Rr(r);
1457
1457
  return i.parse(t), i;
1458
1458
  }, Fa = (e, t, r) => e.columns.map((o) => {
1459
1459
  const s = o.type, a = o.id, l = t == null ? void 0 : t[s];
1460
- let u;
1461
- return l && (u = (c) => l(c, a, o, r)), {
1460
+ let d;
1461
+ return l && (d = (c) => l(c, a, o, r)), {
1462
1462
  key: a,
1463
1463
  dataIndex: a,
1464
1464
  title: o.label,
1465
- render: u,
1465
+ render: d,
1466
1466
  sorter: (c, f) => {
1467
1467
  var v, p;
1468
- let d = c[a] || "", m = f[a] || "";
1469
- return s === "many2one" && (d = ((v = c[a]) == null ? void 0 : v.value) || "", m = ((p = f[a]) == null ? void 0 : p.value) || ""), d < m ? -1 : d > m ? 1 : 0;
1468
+ let u = c[a] || "", m = f[a] || "";
1469
+ return s === "many2one" && (u = ((v = c[a]) == null ? void 0 : v.value) || "", m = ((p = f[a]) == null ? void 0 : p.value) || ""), u < m ? -1 : u > m ? 1 : 0;
1470
1470
  }
1471
1471
  };
1472
1472
  }), lo = (e, t) => t.map((i) => {
@@ -1498,17 +1498,17 @@ function co(e, t) {
1498
1498
  r[i.id] = i[t];
1499
1499
  }), r;
1500
1500
  }
1501
- function _t({
1501
+ function It({
1502
1502
  resultsToSort: e,
1503
1503
  sorter: t,
1504
1504
  fields: r
1505
1505
  }) {
1506
1506
  if (!t)
1507
1507
  return e;
1508
- const { id: i, desc: o } = t, s = o === !1 ? "ascend" : "descend", a = r[i].type, l = (u, c) => {
1508
+ const { id: i, desc: o } = t, s = o === !1 ? "ascend" : "descend", a = r[i].type, l = (d, c) => {
1509
1509
  var m, v;
1510
- let f = u[i] || "", d = c[i] || "";
1511
- return a === "many2one" && (f = ((m = u[i]) == null ? void 0 : m[1]) || "", d = ((v = c[i]) == null ? void 0 : v[1]) || ""), f === d ? 0 : s === "ascend" ? f > d ? 1 : -1 : f < d ? 1 : -1;
1510
+ let f = d[i] || "", u = c[i] || "";
1511
+ return a === "many2one" && (f = ((m = d[i]) == null ? void 0 : m[1]) || "", u = ((v = c[i]) == null ? void 0 : v[1]) || ""), f === u ? 0 : s === "ascend" ? f > u ? 1 : -1 : f < u ? 1 : -1;
1512
1512
  };
1513
1513
  return e.sort(l);
1514
1514
  }
@@ -1523,15 +1523,15 @@ const zn = async (e) => {
1523
1523
  currentView: a = {}
1524
1524
  } = e, l = t.filter(
1525
1525
  (h) => h.operation !== "original"
1526
- ), u = t.filter((h) => h.operation === "original").map((h) => h.id), c = {
1526
+ ), d = t.filter((h) => h.operation === "original").map((h) => h.id), c = {
1527
1527
  form: i.fields,
1528
1528
  tree: o.fields
1529
1529
  };
1530
- let f = [], d;
1530
+ let f = [], u;
1531
1531
  if (a === "tree" && (o == null ? void 0 : o.arch)) {
1532
- const h = (p = It(o)) == null ? void 0 : p.colors, g = await H.getHandler().readEvalUiObjects({
1532
+ const h = (p = Ot(o)) == null ? void 0 : p.colors, g = await H.getHandler().readEvalUiObjects({
1533
1533
  model: r,
1534
- ids: u,
1534
+ ids: d,
1535
1535
  arch: o == null ? void 0 : o.arch,
1536
1536
  fields: o.fields,
1537
1537
  context: s,
@@ -1539,11 +1539,11 @@ const zn = async (e) => {
1539
1539
  colors: h
1540
1540
  }
1541
1541
  });
1542
- f = g[0], d = Qt(g[1]);
1542
+ f = g[0], u = Qt(g[1]);
1543
1543
  } else
1544
1544
  f = await H.getHandler().readObjects({
1545
1545
  model: r,
1546
- ids: u,
1546
+ ids: d,
1547
1547
  fields: c[a],
1548
1548
  context: s
1549
1549
  });
@@ -1562,7 +1562,7 @@ const zn = async (e) => {
1562
1562
  };
1563
1563
  return a === "form" ? y.values = g : a === "tree" && (y.treeValues = g), y;
1564
1564
  }).concat(l),
1565
- d
1565
+ u
1566
1566
  ];
1567
1567
  }, Oa = (e) => {
1568
1568
  const t = e.filter((r) => r.id && r.id < 0).map((r) => r.id);
@@ -1582,10 +1582,10 @@ const zn = async (e) => {
1582
1582
  relation: r,
1583
1583
  context: i,
1584
1584
  views: o
1585
- } = t, [s, a] = T(!0), [l, u] = T(), [c, f] = T(/* @__PURE__ */ new Map()), d = Y(Ne), {
1585
+ } = t, [s, a] = T(!0), [l, d] = T(), [c, f] = T(/* @__PURE__ */ new Map()), u = Y(Ne), {
1586
1586
  getContext: m
1587
- } = d || {};
1588
- St(() => {
1587
+ } = u || {};
1588
+ Ct(() => {
1589
1589
  p();
1590
1590
  }, [t]);
1591
1591
  const v = async (h) => o && o[h] ? o[h] : await H.getHandler().getView({
@@ -1596,17 +1596,17 @@ const zn = async (e) => {
1596
1596
  ...i
1597
1597
  }
1598
1598
  }), p = async () => {
1599
- a(!0), u(void 0);
1599
+ a(!0), d(void 0);
1600
1600
  try {
1601
1601
  const h = await v("form"), g = await v("tree");
1602
1602
  c.set("form", h), c.set("tree", g), f(c);
1603
1603
  } catch (h) {
1604
- u(h);
1604
+ d(h);
1605
1605
  } finally {
1606
1606
  a(!1);
1607
1607
  }
1608
1608
  };
1609
- return s ? /* @__PURE__ */ n(Me, {}) : l ? /* @__PURE__ */ n(Ze, {
1609
+ return s ? /* @__PURE__ */ n(Le, {}) : l ? /* @__PURE__ */ n(Ze, {
1610
1610
  className: "mt-10",
1611
1611
  message: l,
1612
1612
  type: "error",
@@ -1627,7 +1627,7 @@ const zn = async (e) => {
1627
1627
  onChange: o
1628
1628
  } = e, {
1629
1629
  items: s = []
1630
- } = t || {}, [a, l] = T(!1), [u, c] = T(), [f, d] = T(!1), [m, v] = T(), {
1630
+ } = t || {}, [a, l] = T(!1), [d, c] = T(), [f, u] = T(!1), [m, v] = T(), {
1631
1631
  relation: p,
1632
1632
  context: h,
1633
1633
  readOnly: g,
@@ -1636,7 +1636,7 @@ const zn = async (e) => {
1636
1636
  } = i, _ = s.filter((b) => b.values), w = Y(Ne), {
1637
1637
  getContext: V
1638
1638
  } = w || {};
1639
- St(() => {
1639
+ Ct(() => {
1640
1640
  E();
1641
1641
  }, [s]);
1642
1642
  const D = (b) => {
@@ -1670,12 +1670,12 @@ const zn = async (e) => {
1670
1670
  l(!1);
1671
1671
  }
1672
1672
  }
1673
- return u ? /* @__PURE__ */ n(Ze, {
1673
+ return d ? /* @__PURE__ */ n(Ze, {
1674
1674
  className: "mt-10",
1675
- message: u,
1675
+ message: d,
1676
1676
  type: "error",
1677
1677
  banner: !0
1678
- }) : a ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ P(ne, {
1678
+ }) : a ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ P(ne, {
1679
1679
  children: [/* @__PURE__ */ n(tr, {
1680
1680
  style: {
1681
1681
  padding: "1rem"
@@ -1690,7 +1690,7 @@ const zn = async (e) => {
1690
1690
  cursor: "pointer"
1691
1691
  },
1692
1692
  onClick: () => {
1693
- v(_.find(($) => b.id === $.id)), d(!0);
1693
+ v(_.find(($) => b.id === $.id)), u(!0);
1694
1694
  },
1695
1695
  children: /* @__PURE__ */ n("strong", {
1696
1696
  children: (S = b.values) == null ? void 0 : S[O]
@@ -1701,7 +1701,7 @@ const zn = async (e) => {
1701
1701
  cursor: "pointer"
1702
1702
  },
1703
1703
  onClick: () => {
1704
- v(_.find(($) => b.id === $.id)), d(!0);
1704
+ v(_.find(($) => b.id === $.id)), u(!0);
1705
1705
  },
1706
1706
  children: (x = b.values) == null ? void 0 : x[y]
1707
1707
  })]
@@ -1716,14 +1716,14 @@ const zn = async (e) => {
1716
1716
  defaultValues: m == null ? void 0 : m.defaultValues,
1717
1717
  visible: f,
1718
1718
  onSubmitSucceed: () => {
1719
- d(!1);
1719
+ u(!1);
1720
1720
  },
1721
1721
  parentContext: {
1722
1722
  ...V == null ? void 0 : V(),
1723
1723
  ...h
1724
1724
  },
1725
1725
  onCancel: () => {
1726
- d(!1);
1726
+ u(!1);
1727
1727
  },
1728
1728
  readOnly: g,
1729
1729
  postSaveAction: E
@@ -1785,7 +1785,7 @@ const zn = async (e) => {
1785
1785
  } else
1786
1786
  r[i] = e[i];
1787
1787
  }), r;
1788
- }, Ot = (e, t) => ka(e, t), Sn = ({
1788
+ }, Ft = (e, t) => ka(e, t), Sn = ({
1789
1789
  source: e,
1790
1790
  target: t,
1791
1791
  fields: r
@@ -1794,26 +1794,26 @@ const zn = async (e) => {
1794
1794
  return Object.keys(t).forEach((o) => {
1795
1795
  var a, l;
1796
1796
  if (r[o] ? r[o].type === "one2many" || r[o].type === "many2many" : !1) {
1797
- const u = JSON.stringify(e[o]), c = JSON.stringify(t[o]);
1798
- if (u === c)
1797
+ const d = JSON.stringify(e[o]), c = JSON.stringify(t[o]);
1798
+ if (d === c)
1799
1799
  return;
1800
1800
  (((l = (a = t[o]) == null ? void 0 : a.items) == null ? void 0 : l.filter(
1801
- (d) => d.operation !== "original"
1801
+ (u) => u.operation !== "original"
1802
1802
  )) || []).length > 0 && (i[o] = t[o]);
1803
1803
  } else if (Array.isArray(t[o]))
1804
1804
  if (e[o] === void 0)
1805
1805
  i[o] = t[o];
1806
1806
  else if (r[o].type === "many2one")
1807
1807
  if (Array.isArray(e[o])) {
1808
- const u = JSON.stringify(e[o]), c = JSON.stringify(t[o]);
1809
- u !== c && (i[o] = t[o]);
1808
+ const d = JSON.stringify(e[o]), c = JSON.stringify(t[o]);
1809
+ d !== c && (i[o] = t[o]);
1810
1810
  } else {
1811
- const u = e[o], [c] = t[o];
1812
- u !== c && (i[o] = t[o]);
1811
+ const d = e[o], [c] = t[o];
1812
+ d !== c && (i[o] = t[o]);
1813
1813
  }
1814
1814
  else {
1815
- const u = JSON.stringify(e[o]), c = JSON.stringify(t[o]);
1816
- u !== c && (i[o] = t[o]);
1815
+ const d = JSON.stringify(e[o]), c = JSON.stringify(t[o]);
1816
+ d !== c && (i[o] = t[o]);
1817
1817
  }
1818
1818
  else
1819
1819
  e[o] !== t[o] && (t[o] === void 0 ? i[o] = null : i[o] = t[o]);
@@ -1880,7 +1880,7 @@ const zn = async (e) => {
1880
1880
  function yr(e, t, r) {
1881
1881
  return r.indexOf(e) === t;
1882
1882
  }
1883
- const Mt = ({
1883
+ const kt = ({
1884
1884
  values: e,
1885
1885
  fields: t
1886
1886
  }) => {
@@ -1911,12 +1911,12 @@ const Mt = ({
1911
1911
  return 0.2126 * r(a.substr(1, 2)) + 0.7152 * r(a.substr(3, 2)) + 0.0722 * r(a.substr(-2));
1912
1912
  }
1913
1913
  function o(a, l) {
1914
- const u = i(a), c = i(l);
1915
- return (Math.max(u, c) + 0.05) / (Math.min(u, c) + 0.05);
1914
+ const d = i(a), c = i(l);
1915
+ return (Math.max(d, c) + 0.05) / (Math.min(d, c) + 0.05);
1916
1916
  }
1917
1917
  function s(a) {
1918
- const l = o(a, "#ffffff"), u = o(a, "#000000");
1919
- return l > u ? "#ffffff" : "#000000";
1918
+ const l = o(a, "#ffffff"), d = o(a, "#000000");
1919
+ return l > d ? "#ffffff" : "#000000";
1920
1920
  }
1921
1921
  return s(e);
1922
1922
  }, Na = (e) => {
@@ -1943,7 +1943,7 @@ const Mt = ({
1943
1943
  onChange: i
1944
1944
  } = e, {
1945
1945
  items: o = []
1946
- } = t || {}, s = o.filter((D) => D.operation !== "pendingRemove").map((D) => D.id), [a, l] = T([]), [u, c] = T(), [f, d] = T(!1), {
1946
+ } = t || {}, s = o.filter((D) => D.operation !== "pendingRemove").map((D) => D.id), [a, l] = T([]), [d, c] = T(), [f, u] = T(!1), {
1947
1947
  relation: m,
1948
1948
  context: v,
1949
1949
  readOnly: p,
@@ -1951,7 +1951,7 @@ const Mt = ({
1951
1951
  } = r, g = Y(Ne), {
1952
1952
  getContext: y
1953
1953
  } = g || {};
1954
- St(() => {
1954
+ Ct(() => {
1955
1955
  _();
1956
1956
  }, [o]);
1957
1957
  const O = (D) => {
@@ -1960,13 +1960,13 @@ const Mt = ({
1960
1960
  });
1961
1961
  };
1962
1962
  async function _() {
1963
- d(!0);
1963
+ u(!0);
1964
1964
  let D = [];
1965
1965
  try {
1966
1966
  if (p && (D = [["id", "in", s]]), r.domain) {
1967
1967
  const C = await H.getHandler().evalDomain({
1968
1968
  domain: r.domain,
1969
- values: Mt({
1969
+ values: kt({
1970
1970
  fields: g == null ? void 0 : g.getFields(),
1971
1971
  values: g.getPlainValues()
1972
1972
  }),
@@ -1995,7 +1995,7 @@ const Mt = ({
1995
1995
  } catch (E) {
1996
1996
  c(E);
1997
1997
  } finally {
1998
- d(!1);
1998
+ u(!1);
1999
1999
  }
2000
2000
  }
2001
2001
  const w = (D) => {
@@ -2032,15 +2032,15 @@ const Mt = ({
2032
2032
  children: E
2033
2033
  });
2034
2034
  };
2035
- return u ? /* @__PURE__ */ n(Ze, {
2035
+ return d ? /* @__PURE__ */ n(Ze, {
2036
2036
  className: "mt-10",
2037
- message: u,
2037
+ message: d,
2038
2038
  type: "error",
2039
2039
  banner: !0
2040
2040
  }) : /* @__PURE__ */ n(ne, {
2041
2041
  children: /* @__PURE__ */ n("div", {
2042
2042
  className: "flex flex-row",
2043
- children: /* @__PURE__ */ n(Ct, {
2043
+ children: /* @__PURE__ */ n(xt, {
2044
2044
  mode: "multiple",
2045
2045
  value: a.length ? s : [],
2046
2046
  tagRender: V,
@@ -2155,20 +2155,20 @@ const Mt = ({
2155
2155
  const s = (a) => a + 1 === e.length && o < r && !t;
2156
2156
  return e.map((a, l) => {
2157
2157
  if (o += a.colspan, s(l)) {
2158
- const u = r - o;
2159
- a.colspan = a.colspan + u, o += u;
2158
+ const d = r - o;
2159
+ a.colspan = a.colspan + d, o += d;
2160
2160
  }
2161
2161
  if (i.push(a), s(l)) {
2162
- const u = r - o;
2163
- for (let c = 0; c < u; c += 1)
2164
- i.push(new At({ string: "" }));
2162
+ const d = r - o;
2163
+ for (let c = 0; c < d; c += 1)
2164
+ i.push(new Vt({ string: "" }));
2165
2165
  }
2166
2166
  }), i;
2167
2167
  }, Wa = ({
2168
2168
  row: e,
2169
2169
  numberOfColumns: t
2170
2170
  }) => e.map((r) => (r._mustExpand && (r.colspan = t), r)), Ua = (e, t) => {
2171
- const r = e.map((i) => i instanceof At && i.fieldForLabel || i instanceof ui ? "auto" : "1fr");
2171
+ const r = e.map((i) => i instanceof Vt && i.fieldForLabel || i instanceof ui ? "auto" : "1fr");
2172
2172
  if (r.length < t) {
2173
2173
  const i = t - r.length;
2174
2174
  for (let o = 0; o < i; o++)
@@ -2194,17 +2194,17 @@ const Mt = ({
2194
2194
  const s = qa(i);
2195
2195
  s < o && (o = s);
2196
2196
  let a = !1, l = [];
2197
- const u = i.map((d, m) => {
2198
- const v = d.filter((g) => !g.invisible), p = Wa({
2197
+ const d = i.map((u, m) => {
2198
+ const v = u.filter((g) => !g.invisible), p = Wa({
2199
2199
  row: v,
2200
2200
  numberOfColumns: o
2201
2201
  });
2202
2202
  let h = p;
2203
- return (m === 0 || !(d.length === 1 && d.some((g) => g.type === "group"))) && (h = Ya({
2203
+ return (m === 0 || !(u.length === 1 && u.some((g) => g.type === "group"))) && (h = Ya({
2204
2204
  row: p,
2205
2205
  numberOfColumns: o,
2206
2206
  mustFillWithEmpties: r
2207
- }), l = l.concat(h)), h.map((g) => (g instanceof At && g.fieldForLabel && (a = !0), /* @__PURE__ */ n("div", {
2207
+ }), l = l.concat(h)), h.map((g) => (g instanceof Vt && g.fieldForLabel && (a = !0), /* @__PURE__ */ n("div", {
2208
2208
  style: {
2209
2209
  ...Ka({
2210
2210
  item: g,
@@ -2226,7 +2226,7 @@ const Mt = ({
2226
2226
  minHeight: 0,
2227
2227
  minWidth: 0
2228
2228
  },
2229
- children: u
2229
+ children: d
2230
2230
  });
2231
2231
  }, {
2232
2232
  confirm: za
@@ -2279,7 +2279,7 @@ const Mt = ({
2279
2279
  const r = sl(e), i = ol(r), o = il(i, t);
2280
2280
  return [
2281
2281
  ...Object.keys(o).map((l) => tl(l, o[l], t))
2282
- ].reduce((l, u) => Array.isArray(u[0]) ? l.concat(u) : [...l, u], []);
2282
+ ].reduce((l, d) => Array.isArray(d[0]) ? l.concat(d) : [...l, d], []);
2283
2283
  }, tl = (e, t, r) => {
2284
2284
  var s;
2285
2285
  const i = e.split("#")[0], o = (s = r.findById(i)) == null ? void 0 : s.type;
@@ -2311,16 +2311,16 @@ const Mt = ({
2311
2311
  const t = { ...rl(e) };
2312
2312
  return nl(e).forEach((i) => {
2313
2313
  const o = e[i], s = i.split("#")[0], a = s + "#time", l = e[a];
2314
- let u, c;
2315
- if (o[0] !== null && (u = o[0].format("YYYY-MM-DD"), l && l[0] !== null)) {
2316
- const d = l[0].format("HH:mm:ss");
2317
- u = u + " " + d;
2314
+ let d, c;
2315
+ if (o[0] !== null && (d = o[0].format("YYYY-MM-DD"), l && l[0] !== null)) {
2316
+ const u = l[0].format("HH:mm:ss");
2317
+ d = d + " " + u;
2318
2318
  }
2319
2319
  if (o[1] !== null && (c = o[1].format("YYYY-MM-DD"), l && l[1] !== null)) {
2320
- const d = l[1].format("HH:mm:ss");
2321
- c = c + " " + d;
2320
+ const u = l[1].format("HH:mm:ss");
2321
+ c = c + " " + u;
2322
2322
  }
2323
- t[s + "#datetime"] = [u, c];
2323
+ t[s + "#datetime"] = [d, c];
2324
2324
  }), t;
2325
2325
  }, il = (e, t) => {
2326
2326
  const r = Object.keys(e).filter((o) => {
@@ -2355,10 +2355,10 @@ const Mt = ({
2355
2355
  setSearchVisible: s,
2356
2356
  setTreeIsLoading: a,
2357
2357
  nameSearch: l,
2358
- searchNameGetDoneRef: u,
2358
+ searchNameGetDoneRef: d,
2359
2359
  context: c,
2360
2360
  setActionViewTotalItems: f,
2361
- treeView: d,
2361
+ treeView: u,
2362
2362
  formView: m,
2363
2363
  sorter: v,
2364
2364
  setSorter: p,
@@ -2371,9 +2371,9 @@ const Mt = ({
2371
2371
  setLimit: V,
2372
2372
  searchParams: D = [],
2373
2373
  setSearchValues: E
2374
- } = e, [b, C] = T(!1), [S, x] = T(!1), [$, R] = T(), [F, A] = T(1), [M, I] = T(0), [N, k] = T(), [j, q] = T([]), [W, z] = T(void 0), [U, L] = T(void 0), B = ue(w || Ht), ee = ue([]), Z = Le((se) => {
2374
+ } = e, [b, C] = T(!1), [S, x] = T(!1), [$, R] = T(), [F, A] = T(1), [M, I] = T(0), [N, k] = T(), [j, q] = T([]), [W, z] = T(void 0), [U, L] = T(void 0), B = de(w || Ht), ee = de([]), Z = $e((se) => {
2375
2375
  g == null || g([...se]), q([...se]);
2376
- }, []), ie = Le(() => y || j, [y, j]), Q = Le(async () => {
2376
+ }, []), ie = $e(() => y || j, [y, j]), Q = $e(async () => {
2377
2377
  const se = await H.getHandler().nameSearch({
2378
2378
  model: t,
2379
2379
  payload: l,
@@ -2382,62 +2382,62 @@ const Mt = ({
2382
2382
  context: c
2383
2383
  });
2384
2384
  if (k(se.length), f == null || f(se.length), se.length > 0) {
2385
- const Se = se.map((ce) => ce == null ? void 0 : ce[0]), { colors: De, status: Ve } = It(d), je = {};
2385
+ const Se = se.map((ce) => ce == null ? void 0 : ce[0]), { colors: De, status: Ve } = Ot(u), je = {};
2386
2386
  De && (je.colors = De), Ve && (je.status = Ve);
2387
2387
  const We = await H.getHandler().readEvalUiObjects({
2388
2388
  model: t,
2389
2389
  ids: Se,
2390
- arch: d == null ? void 0 : d.arch,
2391
- fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
2390
+ arch: u == null ? void 0 : u.arch,
2391
+ fields: u.field_parent ? { ...u.fields, [u.field_parent]: {} } : u.fields,
2392
2392
  context: c,
2393
2393
  attrs: je
2394
2394
  }), te = We[0];
2395
2395
  ee.current = [...te], z(Qt(We[1])), L(gr(We[1]));
2396
- const Fe = te.map((ce) => ce.id), Ee = v !== void 0 ? _t({
2396
+ const Fe = te.map((ce) => ce.id), Me = v !== void 0 ? It({
2397
2397
  resultsToSort: te,
2398
2398
  sorter: v,
2399
- fields: { ...d.fields, ...m.fields }
2399
+ fields: { ...u.fields, ...m.fields }
2400
2400
  }) : [...ee.current];
2401
- Z(Ee), Fe.length > 0 ? h == null || h(0) : h == null || h(void 0);
2401
+ Z(Me), Fe.length > 0 ? h == null || h(0) : h == null || h(void 0);
2402
2402
  } else
2403
2403
  Z([]), h == null || h(void 0);
2404
- C(!1), u.current = !0;
2404
+ C(!1), d.current = !0;
2405
2405
  }, [
2406
2406
  Z,
2407
- u,
2407
+ d,
2408
2408
  l,
2409
2409
  t,
2410
2410
  c,
2411
2411
  O,
2412
- d,
2412
+ u,
2413
2413
  m,
2414
2414
  v,
2415
2415
  h,
2416
2416
  f
2417
- ]), J = Le(
2417
+ ]), J = $e(
2418
2418
  async (se) => {
2419
- const { params: Se, newOffset: De } = se || {}, Ve = hn(Se || D, O), { colors: je, status: We } = It(d), te = {};
2419
+ const { params: Se, newOffset: De } = se || {}, Ve = hn(Se || D, O), { colors: je, status: We } = Ot(u), te = {};
2420
2420
  je && (te.colors = je), We && (te.status = We);
2421
- const { totalItems: Fe, results: Ee, attrsEvaluated: ce } = await H.getHandler().searchForTree({
2421
+ const { totalItems: Fe, results: Me, attrsEvaluated: ce } = await H.getHandler().searchForTree({
2422
2422
  params: Ve,
2423
2423
  limit: B.current,
2424
2424
  offset: De || M,
2425
2425
  model: t,
2426
- fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
2426
+ fields: u.field_parent ? { ...u.fields, [u.field_parent]: {} } : u.fields,
2427
2427
  context: c,
2428
2428
  attrs: te
2429
2429
  });
2430
- z(Qt(ce)), L(gr(ce)), ee.current = [...Ee];
2431
- const me = v !== void 0 ? _t({
2432
- resultsToSort: Ee,
2430
+ z(Qt(ce)), L(gr(ce)), ee.current = [...Me];
2431
+ const me = v !== void 0 ? It({
2432
+ resultsToSort: Me,
2433
2433
  sorter: v,
2434
- fields: { ...d.fields, ...m.fields }
2434
+ fields: { ...u.fields, ...m.fields }
2435
2435
  }) : [...ee.current];
2436
2436
  if (Z(me), y && me.length > 0) {
2437
- const de = me.findIndex(
2437
+ const ue = me.findIndex(
2438
2438
  (Xe) => _ === Xe.id
2439
2439
  );
2440
- de === -1 ? h == null || h(0) : h == null || h(de);
2440
+ ue === -1 ? h == null || h(0) : h == null || h(ue);
2441
2441
  } else
2442
2442
  h == null || h(void 0);
2443
2443
  C(!1);
@@ -2452,7 +2452,7 @@ const Mt = ({
2452
2452
  t,
2453
2453
  c,
2454
2454
  O,
2455
- d,
2455
+ u,
2456
2456
  m,
2457
2457
  v,
2458
2458
  f,
@@ -2460,10 +2460,10 @@ const Mt = ({
2460
2460
  M,
2461
2461
  D
2462
2462
  ]
2463
- ), fe = Le(
2463
+ ), fe = $e(
2464
2464
  async (se) => {
2465
2465
  try {
2466
- C(!0), a == null || a(!0), l && !u.current ? await Q() : await J(se);
2466
+ C(!0), a == null || a(!0), l && !d.current ? await Q() : await J(se);
2467
2467
  } catch (Se) {
2468
2468
  R(Se.message);
2469
2469
  } finally {
@@ -2480,7 +2480,7 @@ const Mt = ({
2480
2480
  l,
2481
2481
  M,
2482
2482
  y,
2483
- u,
2483
+ d,
2484
2484
  f,
2485
2485
  h,
2486
2486
  Z,
@@ -2489,22 +2489,20 @@ const Mt = ({
2489
2489
  C,
2490
2490
  a,
2491
2491
  v,
2492
- d
2492
+ u
2493
2493
  ]
2494
- ), be = Le(
2494
+ ), be = $e(
2495
2495
  (se) => {
2496
- if (JSON.stringify(se) === JSON.stringify(v))
2497
- return;
2498
2496
  p == null || p(se);
2499
- const Se = se !== void 0 ? _t({
2497
+ const Se = se !== void 0 ? It({
2500
2498
  resultsToSort: ie(),
2501
2499
  sorter: se,
2502
- fields: { ...d.fields, ...m.fields }
2500
+ fields: { ...u.fields, ...m.fields }
2503
2501
  }) : [...ee.current];
2504
2502
  Z(Se);
2505
2503
  },
2506
- [p, ie, d, m, Z]
2507
- ), $e = Le(
2504
+ [p, ie, u, m, Z]
2505
+ ), Ee = $e(
2508
2506
  (se) => {
2509
2507
  const { params: Se, searchValues: De, limit: Ve, offset: je } = se;
2510
2508
  b || (r == null || r(void 0), i == null || i([]), E == null || E(De), o == null || o(Se), s == null || s(!1), x(!0), R(void 0), A(1), Ve && (B.current = Ve, V == null || V(Ve)), je && I(je), fe({
@@ -2525,12 +2523,12 @@ const Mt = ({
2525
2523
  I,
2526
2524
  fe
2527
2525
  ]
2528
- ), _e = Le(
2526
+ ), _e = $e(
2529
2527
  (se) => {
2530
2528
  C(!0), A(se), I((se - 1) * w);
2531
2529
  },
2532
2530
  [C, w, I, A]
2533
- ), Be = Le(() => {
2531
+ ), Be = $e(() => {
2534
2532
  b || (r == null || r(void 0), o == null || o([]), E == null || E({}), R(void 0), I(0), A(1), V == null || V(w || Ht));
2535
2533
  }, [
2536
2534
  b,
@@ -2541,20 +2539,20 @@ const Mt = ({
2541
2539
  A,
2542
2540
  V,
2543
2541
  w
2544
- ]), ge = Le(
2542
+ ]), ge = $e(
2545
2543
  async (se) => {
2546
- const Se = se[(d == null ? void 0 : d.field_parent) || "child_id"], De = await H.getHandler().readObjects({
2544
+ const Se = se[(u == null ? void 0 : u.field_parent) || "child_id"], De = await H.getHandler().readObjects({
2547
2545
  model: t,
2548
2546
  ids: Se,
2549
- fields: d.field_parent ? { ...d.fields, [d.field_parent]: {} } : d.fields,
2547
+ fields: u.field_parent ? { ...u.fields, [u.field_parent]: {} } : u.fields,
2550
2548
  context: c
2551
2549
  });
2552
- return Z([...ie(), ...De]), lo(It(d), De);
2550
+ return Z([...ie(), ...De]), lo(Ot(u), De);
2553
2551
  },
2554
- [d, t, c, ie, Z]
2552
+ [u, t, c, ie, Z]
2555
2553
  );
2556
2554
  return {
2557
- submit: $e,
2555
+ submit: Ee,
2558
2556
  clear: Be,
2559
2557
  fetchResults: fe,
2560
2558
  tableRefreshing: b,
@@ -2580,10 +2578,10 @@ const Mt = ({
2580
2578
  availableViews: s,
2581
2579
  formRef: a,
2582
2580
  searchTreeRef: l,
2583
- onNewClicked: u,
2581
+ onNewClicked: d,
2584
2582
  currentId: c,
2585
2583
  setCurrentId: f,
2586
- setResults: d,
2584
+ setResults: u,
2587
2585
  results: m,
2588
2586
  currentItemIndex: v,
2589
2587
  setCurrentItemIndex: p,
@@ -2598,7 +2596,7 @@ const Mt = ({
2598
2596
  setSearchTreeNameSearch: E,
2599
2597
  goToResourceId: b,
2600
2598
  limit: C
2601
- } = e, [S, x] = T(!1), [$, R] = T(!1), [F, A] = T(!1), [M, I] = T(!0), [N, k] = T(!0), [j, q] = T([]), [W, z] = T(!1), [U, L] = T([]), [B, ee] = T(!1), [Z, ie] = T(!0), [Q, J] = T(), [fe, be] = T({}), [$e, _e] = T(C !== void 0 ? C : Ht), [Be, ge] = T(i);
2599
+ } = e, [S, x] = T(!1), [$, R] = T(!1), [F, A] = T(!1), [M, I] = T(!0), [N, k] = T(!0), [j, q] = T([]), [W, z] = T(!1), [U, L] = T([]), [B, ee] = T(!1), [Z, ie] = T(!0), [Q, J] = T(), [fe, be] = T({}), [Ee, _e] = T(C !== void 0 ? C : Ht), [Be, ge] = T(i);
2602
2600
  pe(() => {
2603
2601
  m && m.length > 0 && !v && (p == null || p(0), f == null || f(m[0].id));
2604
2602
  }, [m]), pe(() => {
@@ -2625,13 +2623,13 @@ const Mt = ({
2625
2623
  formRef: a,
2626
2624
  searchTreeRef: l,
2627
2625
  onFormSave: se,
2628
- onNewClicked: u,
2626
+ onNewClicked: d,
2629
2627
  currentId: c,
2630
2628
  setCurrentId: f,
2631
2629
  currentItemIndex: v,
2632
2630
  setCurrentItemIndex: p,
2633
2631
  results: m,
2634
- setResults: d,
2632
+ setResults: u,
2635
2633
  currentModel: h,
2636
2634
  removingItem: F,
2637
2635
  setRemovingItem: A,
@@ -2662,7 +2660,7 @@ const Mt = ({
2662
2660
  goToResourceId: b,
2663
2661
  searchValues: fe,
2664
2662
  setSearchValues: be,
2665
- limit: $e,
2663
+ limit: Ee,
2666
2664
  setLimit: _e,
2667
2665
  setTitle: ge
2668
2666
  },
@@ -2677,9 +2675,9 @@ const Mt = ({
2677
2675
  openShortcut: s,
2678
2676
  activeKey: a,
2679
2677
  onChangeTab: l,
2680
- onRemoveTab: u,
2678
+ onRemoveTab: d,
2681
2679
  tabs: c
2682
- } = e, [f, d] = T(), [m, v] = T();
2680
+ } = e, [f, u] = T(), [m, v] = T();
2683
2681
  return /* @__PURE__ */ n(st.Provider, {
2684
2682
  value: {
2685
2683
  openAction: r,
@@ -2688,16 +2686,16 @@ const Mt = ({
2688
2686
  activeKey: a,
2689
2687
  openShortcut: s,
2690
2688
  onChangeTab: l,
2691
- onRemoveTab: u,
2689
+ onRemoveTab: d,
2692
2690
  tabs: c,
2693
2691
  currentId: m,
2694
2692
  currentView: f,
2695
2693
  setCurrentId: v,
2696
- setCurrentView: d
2694
+ setCurrentView: u
2697
2695
  },
2698
2696
  children: t
2699
2697
  });
2700
- }, Et = Je.createContext(null), br = async (e) => {
2698
+ }, Mt = Je.createContext(null), br = async (e) => {
2701
2699
  var t;
2702
2700
  for (let r = 0; r < e.length; r++)
2703
2701
  await ((t = e == null ? void 0 : e[r]) == null ? void 0 : t.call(e));
@@ -2705,12 +2703,12 @@ const Mt = ({
2705
2703
  const {
2706
2704
  children: r,
2707
2705
  globalValues: i = {}
2708
- } = e, o = ue(), s = ue(), [a, l] = T(!1), u = Y(st), {
2706
+ } = e, o = de(), s = de(), [a, l] = T(!1), d = Y(st), {
2709
2707
  openAction: c
2710
- } = u || {}, f = ue([]), {
2711
- t: d
2708
+ } = d || {}, f = de([]), {
2709
+ t: u
2712
2710
  } = Y(we);
2713
- xt(t, () => ({
2711
+ bt(t, () => ({
2714
2712
  openActionModal: w
2715
2713
  }));
2716
2714
  const [m, v] = T(!1), [p, h] = T({
@@ -2737,7 +2735,7 @@ const Mt = ({
2737
2735
  ids: I
2738
2736
  } = F || {};
2739
2737
  let N = I || [];
2740
- const k = typeof $ == "string" ? wt({
2738
+ const k = typeof $ == "string" ? vt({
2741
2739
  context: $,
2742
2740
  fields: C,
2743
2741
  values: S
@@ -2767,7 +2765,7 @@ const Mt = ({
2767
2765
  id: E
2768
2766
  }), b.state && s.current === !0) {
2769
2767
  s.current = !1, clearInterval(o.current), l(!1);
2770
- const C = await Vt(b.result);
2768
+ const C = await Dt(b.result);
2771
2769
  mn(b.result, C.mime);
2772
2770
  }
2773
2771
  } catch (C) {
@@ -2810,7 +2808,7 @@ const Mt = ({
2810
2808
  context: S
2811
2809
  }))[0]);
2812
2810
  const R = {
2813
- ...typeof (x == null ? void 0 : x.context) == "string" ? wt({
2811
+ ...typeof (x == null ? void 0 : x.context) == "string" ? vt({
2814
2812
  context: x.context,
2815
2813
  fields: b,
2816
2814
  values: {
@@ -2823,7 +2821,7 @@ const Mt = ({
2823
2821
  let F = [];
2824
2822
  if (x.domain && (F = await H.getHandler().evalDomain({
2825
2823
  domain: x.domain,
2826
- values: Mt({
2824
+ values: kt({
2827
2825
  fields: b,
2828
2826
  values: {
2829
2827
  ...C,
@@ -2922,20 +2920,20 @@ const Mt = ({
2922
2920
  });
2923
2921
  }
2924
2922
  return /* @__PURE__ */ n(ne, {
2925
- children: /* @__PURE__ */ n(Et.Provider, {
2923
+ children: /* @__PURE__ */ n(Mt.Provider, {
2926
2924
  value: {
2927
2925
  processAction: O,
2928
2926
  globalValues: i
2929
2927
  },
2930
2928
  children: /* @__PURE__ */ P(ne, {
2931
2929
  children: [r, /* @__PURE__ */ n(Ge, {
2932
- title: d("generatingReport"),
2930
+ title: u("generatingReport"),
2933
2931
  open: a,
2934
2932
  footer: null,
2935
2933
  closable: !1,
2936
2934
  centered: !0,
2937
2935
  maskClosable: !1,
2938
- children: /* @__PURE__ */ n(Me, {})
2936
+ children: /* @__PURE__ */ n(Le, {})
2939
2937
  }), /* @__PURE__ */ n(Gt, {
2940
2938
  buttonModal: !0,
2941
2939
  parentContext: p.context,
@@ -2972,30 +2970,30 @@ async function ul({
2972
2970
  let a;
2973
2971
  if (e)
2974
2972
  for (const l of e) {
2975
- const u = await H.getHandler().getView({
2973
+ const d = await H.getHandler().getView({
2976
2974
  model: r,
2977
2975
  type: l[1],
2978
2976
  id: l[0],
2979
2977
  context: i
2980
2978
  });
2981
- s.push([u.view_id, l[1]]);
2979
+ s.push([d.view_id, l[1]]);
2982
2980
  }
2983
2981
  else {
2984
2982
  const l = t.split(",");
2985
- for (const u of l) {
2983
+ for (const d of l) {
2986
2984
  const c = await H.getHandler().getView({
2987
2985
  model: r,
2988
- type: u,
2986
+ type: d,
2989
2987
  context: i
2990
2988
  });
2991
- s.push([c.view_id, u]);
2989
+ s.push([c.view_id, d]);
2992
2990
  }
2993
2991
  }
2994
2992
  if (e && e.length > 0) {
2995
- const [l, u] = e[0];
2993
+ const [l, d] = e[0];
2996
2994
  a = {
2997
2995
  id: l,
2998
- type: u
2996
+ type: d
2999
2997
  };
3000
2998
  } else if (o)
3001
2999
  a = {
@@ -3003,9 +3001,9 @@ async function ul({
3003
3001
  type: t.split(",")[0]
3004
3002
  };
3005
3003
  else {
3006
- const l = t.split(",")[0], [u] = s.find(([c, f]) => f === l);
3004
+ const l = t.split(",")[0], [d] = s.find(([c, f]) => f === l);
3007
3005
  a = {
3008
- id: u,
3006
+ id: d,
3009
3007
  type: l
3010
3008
  };
3011
3009
  }
@@ -3014,7 +3012,7 @@ async function ul({
3014
3012
  initialView: a
3015
3013
  };
3016
3014
  }
3017
- const fl = bt(dl), ml = ({
3015
+ const fl = wt(dl), ml = ({
3018
3016
  error: e,
3019
3017
  className: t
3020
3018
  }) => {
@@ -3047,10 +3045,10 @@ function pl(e, t) {
3047
3045
  onSubmitSucceed: s,
3048
3046
  showFooter: a = !1,
3049
3047
  getDataFromAction: l = !1,
3050
- onFieldsChange: u,
3048
+ onFieldsChange: d,
3051
3049
  onSubmitError: c,
3052
3050
  readOnly: f = !1,
3053
- mustClearAfterSave: d = !1,
3051
+ mustClearAfterSave: u = !1,
3054
3052
  submitMode: m = "api",
3055
3053
  values: v,
3056
3054
  formView: p,
@@ -3066,8 +3064,8 @@ function pl(e, t) {
3066
3064
  } = e, {
3067
3065
  t: b,
3068
3066
  lang: C
3069
- } = Y(we), [S, x] = T(!1), [$, R] = T(), [F, A] = T(), [M] = ot.useForm(), [I, N] = T(), [k, j] = T(), q = Y(mo), [W, z] = T(), [U, L] = T(!1), B = ue(), ee = ue({}), Z = ue({}), ie = ue(!1), Q = ue(!1), fe = (E !== void 0 ? E : W) < hl, be = Y(Ne), {
3070
- activeId: $e,
3067
+ } = Y(we), [S, x] = T(!1), [$, R] = T(), [F, A] = T(), [M] = ot.useForm(), [I, N] = T(), [k, j] = T(), q = Y(mo), [W, z] = T(), [U, L] = T(!1), B = de(), ee = de({}), Z = de({}), ie = de(!1), Q = de(!1), fe = (E !== void 0 ? E : W) < hl, be = Y(Ne), {
3068
+ activeId: Ee,
3071
3069
  getPlainValues: _e
3072
3070
  } = be || {}, Be = Y(Qe), {
3073
3071
  setFormIsSaving: ge = void 0,
@@ -3077,11 +3075,11 @@ function pl(e, t) {
3077
3075
  setAttachments: Ve = void 0,
3078
3076
  title: je = void 0,
3079
3077
  setTitle: We = void 0
3080
- } = (w ? Be : {}) || {}, te = Y(Et), {
3078
+ } = (w ? Be : {}) || {}, te = Y(Mt), {
3081
3079
  processAction: Fe,
3082
- globalValues: Ee
3080
+ globalValues: Me
3083
3081
  } = te || {};
3084
- xt(t, () => ({
3082
+ bt(t, () => ({
3085
3083
  submitForm: zt,
3086
3084
  getFields: Xe,
3087
3085
  getValues: Ke,
@@ -3112,7 +3110,7 @@ function pl(e, t) {
3112
3110
  }, Te = (K) => {
3113
3111
  ge == null || ge(!1), c == null || c(K);
3114
3112
  };
3115
- function de() {
3113
+ function ue() {
3116
3114
  return i || B.current;
3117
3115
  }
3118
3116
  function Xe() {
@@ -3151,15 +3149,15 @@ function pl(e, t) {
3151
3149
  }
3152
3150
  function Ae() {
3153
3151
  return {
3154
- id: de(),
3155
- active_id: de(),
3156
- active_ids: [de()],
3157
- parent_id: $e,
3158
- ...Ee
3152
+ id: ue(),
3153
+ active_id: ue(),
3154
+ active_ids: [ue()],
3155
+ parent_id: Ee,
3156
+ ...Me
3159
3157
  };
3160
3158
  }
3161
3159
  const he = async (K) => {
3162
- const G = de() ? F == null ? void 0 : F.context : {};
3160
+ const G = ue() ? F == null ? void 0 : F.context : {};
3163
3161
  return await H.getHandler().defaultGet({
3164
3162
  model: r,
3165
3163
  fields: K,
@@ -3175,11 +3173,11 @@ function pl(e, t) {
3175
3173
  fields: k
3176
3174
  })).length !== 0, xe = (K) => {
3177
3175
  const G = M.getFieldsValue(!0);
3178
- return Ot(G, K);
3176
+ return Ft(G, K);
3179
3177
  }, ke = (K, G) => {
3180
3178
  qt({
3181
3179
  values: {
3182
- ...Ot(M.getFieldsValue(!0), k),
3180
+ ...Ft(M.getFieldsValue(!0), k),
3183
3181
  [K]: G
3184
3182
  },
3185
3183
  fields: k,
@@ -3223,7 +3221,7 @@ function pl(e, t) {
3223
3221
  }), O && (G = {
3224
3222
  ...$a(O),
3225
3223
  ...G
3226
- }), ee.current = Ot(G, re), qt({
3224
+ }), ee.current = Ft(G, re), qt({
3227
3225
  values: G,
3228
3226
  fields: re,
3229
3227
  reset: !0,
@@ -3265,7 +3263,7 @@ function pl(e, t) {
3265
3263
  const yt = {
3266
3264
  ...re ? {} : M.getFieldsValue(!0),
3267
3265
  ...K
3268
- }, wn = Ot(yt, G), Xo = Object.keys(G).map((bn) => {
3266
+ }, wn = Ft(yt, G), Xo = Object.keys(G).map((bn) => {
3269
3267
  const Qo = wn[bn] !== void 0 ? wn[bn] : void 0;
3270
3268
  return {
3271
3269
  name: bn,
@@ -3279,15 +3277,15 @@ function pl(e, t) {
3279
3277
  arch: G
3280
3278
  }) => {
3281
3279
  let re = {}, oe = !1;
3282
- if (de()) {
3280
+ if (ue()) {
3283
3281
  re = (await H.getHandler().readObjects({
3284
3282
  model: r,
3285
- ids: [de()],
3283
+ ids: [ue()],
3286
3284
  fields: K,
3287
3285
  context: y
3288
3286
  }))[0];
3289
3287
  const Re = await H.getHandler().search({
3290
- params: [["res_model", "=", r], ["res_id", "=", de()]],
3288
+ params: [["res_model", "=", r], ["res_id", "=", ue()]],
3291
3289
  fields: ["id", "name"],
3292
3290
  context: ae(),
3293
3291
  model: "ir.attachment"
@@ -3303,7 +3301,7 @@ function pl(e, t) {
3303
3301
  const {
3304
3302
  callOnSubmitSucceed: G = !0
3305
3303
  } = K || {};
3306
- if (de()) {
3304
+ if (ue()) {
3307
3305
  const re = Sn({
3308
3306
  source: ee.current,
3309
3307
  target: xe(k),
@@ -3311,7 +3309,7 @@ function pl(e, t) {
3311
3309
  });
3312
3310
  await H.getHandler().update({
3313
3311
  model: r,
3314
- id: de(),
3312
+ id: ue(),
3315
3313
  values: {
3316
3314
  ...re,
3317
3315
  ...D
@@ -3337,30 +3335,30 @@ function pl(e, t) {
3337
3335
  });
3338
3336
  B.current = oe, ee.current = re;
3339
3337
  }
3340
- h && await h([de()]), !g && G && (ce == null || ce(de(), Ke(), X()));
3338
+ h && await h([ue()]), !g && G && (ce == null || ce(ue(), Ke(), X()));
3341
3339
  }, Bo = async (K) => {
3342
3340
  const {
3343
3341
  callOnSubmitSucceed: G = !0
3344
3342
  } = K || {};
3345
- !g && G && (ce == null || ce(de(), Ke(), X()));
3343
+ !g && G && (ce == null || ce(ue(), Ke(), X()));
3346
3344
  }, zt = async (K) => {
3347
3345
  let G = !1;
3348
3346
  const {
3349
3347
  callOnSubmitSucceed: re = !0
3350
3348
  } = K || {};
3351
- if (Q.current = !0, R(void 0), !ye() && de() && re)
3349
+ if (Q.current = !0, R(void 0), !ye() && ue() && re)
3352
3350
  return Q.current = !1, se == null || se(!1), me == null || me(), {
3353
3351
  succeed: !0,
3354
- id: de()
3352
+ id: ue()
3355
3353
  };
3356
3354
  if (await tt())
3357
3355
  return Q.current = !1, vr(C), {
3358
3356
  succeed: !1,
3359
- id: de()
3357
+ id: ue()
3360
3358
  };
3361
3359
  x(!0), ge == null || ge(!0);
3362
3360
  try {
3363
- m === "api" ? await Ho(K) : await Bo(K), d && (B.current = void 0, qt({
3361
+ m === "api" ? await Ho(K) : await Bo(K), u && (B.current = void 0, qt({
3364
3362
  values: {},
3365
3363
  fields: k,
3366
3364
  reset: !0
@@ -3374,7 +3372,7 @@ function pl(e, t) {
3374
3372
  }
3375
3373
  return {
3376
3374
  succeed: G,
3377
- id: de()
3375
+ id: ue()
3378
3376
  };
3379
3377
  }, Jt = ({
3380
3378
  fields: K,
@@ -3408,8 +3406,8 @@ function pl(e, t) {
3408
3406
  }) && K !== !0)
3409
3407
  return;
3410
3408
  {
3411
- const oe = Ot(M.getFieldsValue(!0), k);
3412
- Z.current = oe, u == null || u(oe), se == null || se(!0), Ko(re);
3409
+ const oe = Ft(M.getFieldsValue(!0), k);
3410
+ Z.current = oe, d == null || d(oe), se == null || se(!0), Ko(re);
3413
3411
  }
3414
3412
  }
3415
3413
  }, jo = wa(vn, 100), Ko = async (K) => {
@@ -3444,7 +3442,7 @@ function pl(e, t) {
3444
3442
  }), oe = await H.getHandler().executeOnChange({
3445
3443
  model: r,
3446
3444
  action: G.method,
3447
- ids: de() ? [de()] : [],
3445
+ ids: ue() ? [ue()] : [],
3448
3446
  payload: re,
3449
3447
  fields: k
3450
3448
  });
@@ -3491,7 +3489,7 @@ function pl(e, t) {
3491
3489
  const re = await H.getHandler().execute({
3492
3490
  model: r,
3493
3491
  action: K,
3494
- payload: [de()],
3492
+ payload: [ue()],
3495
3493
  context: {
3496
3494
  ...G,
3497
3495
  ...F == null ? void 0 : F.context,
@@ -3499,12 +3497,12 @@ function pl(e, t) {
3499
3497
  }
3500
3498
  });
3501
3499
  if (typeof re == "object" && re !== null && Object.keys(re).length === 0 && g)
3502
- ce == null || ce(de(), Ke(), X());
3500
+ ce == null || ce(ue(), Ke(), X());
3503
3501
  else if (re.type && re.type === "ir.actions.act_window_close")
3504
- ce == null || ce(de(), Ke(), X());
3502
+ ce == null || ce(ue(), Ke(), X());
3505
3503
  else if (re.type) {
3506
3504
  let oe = {};
3507
- re.context && (oe = wt({
3505
+ re.context && (oe = vt({
3508
3506
  context: re.context,
3509
3507
  fields: k,
3510
3508
  values: Ke()
@@ -3526,9 +3524,9 @@ function pl(e, t) {
3526
3524
  const G = await H.getHandler().executeWorkflow({
3527
3525
  model: r,
3528
3526
  action: K,
3529
- payload: de()
3527
+ payload: ue()
3530
3528
  });
3531
- G.type && G.type === "ir.actions.act_window_close" ? ce == null || ce(de(), Ke(), X()) : await gt({
3529
+ G.type && G.type === "ir.actions.act_window_close" ? ce == null || ce(ue(), Ke(), X()) : await gt({
3532
3530
  forceRefresh: !0
3533
3531
  });
3534
3532
  }
@@ -3567,7 +3565,7 @@ function pl(e, t) {
3567
3565
  });
3568
3566
  }
3569
3567
  })) || {};
3570
- !w && re && (ce == null || ce(de(), Ke(), X()));
3568
+ !w && re && (ce == null || ce(ue(), Ke(), X()));
3571
3569
  }
3572
3570
  function qo() {
3573
3571
  vn({
@@ -3588,7 +3586,7 @@ function pl(e, t) {
3588
3586
  return;
3589
3587
  }
3590
3588
  try {
3591
- (ye() || de() === void 0) && await zt({
3589
+ (ye() || ue() === void 0) && await zt({
3592
3590
  callOnSubmitSucceed: !1
3593
3591
  }), K === "object" ? await Wo({
3594
3592
  action: G,
@@ -3603,7 +3601,7 @@ function pl(e, t) {
3603
3601
  Ue(oe);
3604
3602
  }
3605
3603
  }
3606
- const Jo = () => !F && !$ ? /* @__PURE__ */ n(Me, {}) : !r && !p || !_ ? null : /* @__PURE__ */ n(ne, {
3604
+ const Jo = () => !F && !$ ? /* @__PURE__ */ n(Le, {}) : !r && !p || !_ ? null : /* @__PURE__ */ n(ne, {
3607
3605
  children: /* @__PURE__ */ n(ts, {
3608
3606
  getValues: Ke,
3609
3607
  getPlainValues: at,
@@ -3647,7 +3645,7 @@ function pl(e, t) {
3647
3645
  }), /* @__PURE__ */ n(Ie, {
3648
3646
  disabled: S || f,
3649
3647
  loading: S,
3650
- icon: /* @__PURE__ */ n(kt, {}),
3648
+ icon: /* @__PURE__ */ n(Rt, {}),
3651
3649
  onClick: async () => {
3652
3650
  await zt();
3653
3651
  },
@@ -3675,7 +3673,7 @@ function pl(e, t) {
3675
3673
  })
3676
3674
  }) : null;
3677
3675
  }
3678
- const Ut = bt(pl), Gt = (e) => {
3676
+ const Ut = wt(pl), Gt = (e) => {
3679
3677
  const {
3680
3678
  visible: t,
3681
3679
  id: r,
@@ -3684,10 +3682,10 @@ const Ut = bt(pl), Gt = (e) => {
3684
3682
  onCancel: s,
3685
3683
  isMenuAction: a = !1,
3686
3684
  actionData: l,
3687
- ...u
3685
+ ...d
3688
3686
  } = e, {
3689
3687
  modalWidth: c
3690
- } = fn(), [f, d] = T(i), [m, v] = T(!1), [p, h] = T();
3688
+ } = fn(), [f, u] = T(i), [m, v] = T(!1), [p, h] = T();
3691
3689
  pe(() => {
3692
3690
  a && g();
3693
3691
  }, [l, a]);
@@ -3752,7 +3750,7 @@ const Ut = bt(pl), Gt = (e) => {
3752
3750
  }
3753
3751
  const _ = c * 0.95;
3754
3752
  return /* @__PURE__ */ n(Qa, {
3755
- setTitle: d,
3753
+ setTitle: u,
3756
3754
  children: /* @__PURE__ */ n(Ge, {
3757
3755
  title: a ? O() : f,
3758
3756
  centered: !0,
@@ -3768,7 +3766,7 @@ const Ut = bt(pl), Gt = (e) => {
3768
3766
  insideButtonModal: o,
3769
3767
  onCancel: s,
3770
3768
  parentWidth: _,
3771
- ...u
3769
+ ...d
3772
3770
  })
3773
3771
  })
3774
3772
  });
@@ -3795,7 +3793,7 @@ const Ut = bt(pl), Gt = (e) => {
3795
3793
  })];
3796
3794
  return /* @__PURE__ */ P(ne, {
3797
3795
  children: [r && /* @__PURE__ */ n(un, {
3798
- ooui: new At({
3796
+ ooui: new Vt({
3799
3797
  name: o + "_label",
3800
3798
  string: i,
3801
3799
  help: t.tooltip,
@@ -3845,9 +3843,9 @@ const Ut = bt(pl), Gt = (e) => {
3845
3843
  token: a
3846
3844
  } = vl(), l = s && !o ? {
3847
3845
  backgroundColor: a.colorPrimaryBg
3848
- } : void 0, u = Y(Ne), {
3846
+ } : void 0, d = Y(Ne), {
3849
3847
  elementHasLostFocus: c
3850
- } = u || {};
3848
+ } = d || {};
3851
3849
  return /* @__PURE__ */ n(ve, {
3852
3850
  required: s,
3853
3851
  type: "number",
@@ -3878,9 +3876,9 @@ const Ut = bt(pl), Gt = (e) => {
3878
3876
  token: a
3879
3877
  } = wl(), l = s && !o ? {
3880
3878
  backgroundColor: a.colorPrimaryBg
3881
- } : void 0, u = Y(Ne), {
3879
+ } : void 0, d = Y(Ne), {
3882
3880
  elementHasLostFocus: c
3883
- } = u || {};
3881
+ } = d || {};
3884
3882
  return /* @__PURE__ */ n(ve, {
3885
3883
  required: s,
3886
3884
  type: "number",
@@ -3891,8 +3889,8 @@ const Ut = bt(pl), Gt = (e) => {
3891
3889
  disabled: o,
3892
3890
  formatter: (f) => `${f}`.replace(/[^0-9\-]+/g, ""),
3893
3891
  onChange: (f) => {
3894
- const d = f;
3895
- r == null || r(d);
3892
+ const u = f;
3893
+ r == null || r(u);
3896
3894
  },
3897
3895
  defaultValue: 0,
3898
3896
  onBlur: c,
@@ -3909,10 +3907,10 @@ function bl(e) {
3909
3907
  id: i,
3910
3908
  label: o,
3911
3909
  tooltip: s
3912
- } = t, a = t instanceof _n ? tn : po, l = (u) => /* @__PURE__ */ n(a, {
3910
+ } = t, a = t instanceof _n ? tn : po, l = (d) => /* @__PURE__ */ n(a, {
3913
3911
  ooui: {
3914
3912
  ...t,
3915
- id: i + u,
3913
+ id: i + d,
3916
3914
  label: "",
3917
3915
  tooltip: void 0
3918
3916
  },
@@ -3920,7 +3918,7 @@ function bl(e) {
3920
3918
  });
3921
3919
  return /* @__PURE__ */ P(ne, {
3922
3920
  children: [r && /* @__PURE__ */ n(un, {
3923
- ooui: new At({
3921
+ ooui: new Vt({
3924
3922
  name: i + "_label",
3925
3923
  string: o,
3926
3924
  help: s,
@@ -3950,7 +3948,7 @@ const {
3950
3948
  defaultSeed: Cl
3951
3949
  } = Pe, Sl = xl(Cl), {
3952
3950
  Option: Tl
3953
- } = Ct, Fl = (e) => {
3951
+ } = xt, Fl = (e) => {
3954
3952
  const {
3955
3953
  ooui: t
3956
3954
  } = e, {
@@ -3973,18 +3971,18 @@ const {
3973
3971
  selectionValues: o,
3974
3972
  readOnly: s,
3975
3973
  required: a
3976
- } = t, l = Array.from(o.entries()), u = l && l.length && l.filter((d) => {
3977
- const [m] = d;
3974
+ } = t, l = Array.from(o.entries()), d = l && l.length && l.filter((u) => {
3975
+ const [m] = u;
3978
3976
  return i ? !i.includes(m) : !0;
3979
- }).map((d) => {
3980
- const [m, v] = d;
3977
+ }).map((u) => {
3978
+ const [m, v] = u;
3981
3979
  return /* @__PURE__ */ n(Tl, {
3982
3980
  value: v,
3983
3981
  children: v
3984
3982
  }, m);
3985
- }), c = a && !s ? Il : Ct;
3986
- function f(d) {
3987
- const m = d.map((v) => {
3983
+ }), c = a && !s ? Il : xt;
3984
+ function f(u) {
3985
+ const m = u.map((v) => {
3988
3986
  const p = l.find(([h, g]) => v === g);
3989
3987
  return p && p[0];
3990
3988
  });
@@ -3997,12 +3995,12 @@ const {
3997
3995
  return /* @__PURE__ */ n(c, {
3998
3996
  disabled: s,
3999
3997
  onChange: f,
4000
- value: i == null ? void 0 : i.map((d) => o.get(d)),
3998
+ value: i == null ? void 0 : i.map((u) => o.get(u)),
4001
3999
  mode: "multiple",
4002
4000
  showArrow: !0,
4003
- children: u
4001
+ children: d
4004
4002
  });
4005
- }, Il = Kt(Ct)`
4003
+ }, Il = Kt(xt)`
4006
4004
  &.ant-select:not(.ant-select-customize-input) .ant-select-selector {
4007
4005
  background-color: ${Sl.colorPrimaryBg};
4008
4006
  }
@@ -4081,7 +4079,7 @@ function Dl(e) {
4081
4079
  onClick: t,
4082
4080
  children: [r ? /* @__PURE__ */ n(hi, {
4083
4081
  className: "pr-1"
4084
- }) : /* @__PURE__ */ n(Rt, {
4082
+ }) : /* @__PURE__ */ n(At, {
4085
4083
  className: "pr-1"
4086
4084
  }), s(r ? "simple_search" : "advanced_search")]
4087
4085
  })
@@ -4146,14 +4144,14 @@ function go(e) {
4146
4144
  isSearching: s,
4147
4145
  offset: a,
4148
4146
  limit: l,
4149
- onLimitChange: u,
4147
+ onLimitChange: d,
4150
4148
  searchVisible: c,
4151
4149
  setSearchFilterHeight: f,
4152
- searchError: d,
4150
+ searchError: u,
4153
4151
  searchValues: m,
4154
4152
  showLimitOptions: v = !0,
4155
4153
  formXml: p
4156
- } = e, [h, g] = T(), [y, O] = T(), [_, w] = T(!1), V = ue(), {
4154
+ } = e, [h, g] = T(), [y, O] = T(), [_, w] = T(!1), V = de(), {
4157
4155
  token: D
4158
4156
  } = Al(), [E] = ot.useForm();
4159
4157
  pe(() => {
@@ -4174,7 +4172,7 @@ function go(e) {
4174
4172
  }, M))
4175
4173
  }, F));
4176
4174
  };
4177
- St(() => {
4175
+ Ct(() => {
4178
4176
  w(!1), V.current = new fi(r, t, p), V.current.parse(), g(V.current._simpleSearchContainer), O(V.current._advancedSearchContainer);
4179
4177
  }, [t, r]);
4180
4178
  const C = b(), S = (x) => {
@@ -4218,7 +4216,7 @@ function go(e) {
4218
4216
  limit: l
4219
4217
  },
4220
4218
  children: [C, _ && v && /* @__PURE__ */ n(Vl, {
4221
- onLimitChange: u
4219
+ onLimitChange: d
4222
4220
  }), /* @__PURE__ */ n(Dl, {
4223
4221
  advancedFilter: _,
4224
4222
  onAdvancedFilterToggle: () => {
@@ -4229,9 +4227,9 @@ function go(e) {
4229
4227
  },
4230
4228
  isSearching: s
4231
4229
  })]
4232
- }), d && /* @__PURE__ */ n(Ze, {
4230
+ }), u && /* @__PURE__ */ n(Ze, {
4233
4231
  className: "mt-10",
4234
- message: d,
4232
+ message: u,
4235
4233
  type: "error",
4236
4234
  banner: !0
4237
4235
  }), /* @__PURE__ */ n("div", {
@@ -4256,9 +4254,9 @@ const xr = (e, t = "14px -apple-system") => {
4256
4254
  );
4257
4255
  t.map((s) => {
4258
4256
  i.map((a, l) => {
4259
- const u = a.width, c = s[a.key] || "";
4257
+ const d = a.width, c = s[a.key] || "";
4260
4258
  let f = xr(c);
4261
- f < u && (f = u), f > r && (f = r), i[l].width = f;
4259
+ f < d && (f = d), f > r && (f = r), i[l].width = f;
4262
4260
  });
4263
4261
  });
4264
4262
  const o = i.map((s) => s.width).reduce((s, a) => s + a);
@@ -4368,11 +4366,11 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
4368
4366
  id: t,
4369
4367
  model: r,
4370
4368
  context: i = {}
4371
- } = e, [o, s] = T(!1), [a, l] = T(!1), [u, c] = T(!1), [f, d] = T(), [m, v] = T(), {
4369
+ } = e, [o, s] = T(!1), [a, l] = T(!1), [d, c] = T(!1), [f, u] = T(), [m, v] = T(), {
4372
4370
  t: p
4373
4371
  } = Y(we), h = Y(st), {
4374
4372
  openRelate: g
4375
- } = h || {}, y = Y(Et), {
4373
+ } = h || {}, y = Y(Mt), {
4376
4374
  processAction: O
4377
4375
  } = y || {};
4378
4376
  if (!t)
@@ -4385,7 +4383,7 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
4385
4383
  type: "form",
4386
4384
  context: i
4387
4385
  });
4388
- d(S);
4386
+ u(S);
4389
4387
  const {
4390
4388
  fields: x,
4391
4389
  arch: $
@@ -4396,7 +4394,7 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
4396
4394
  context: i
4397
4395
  }))[0];
4398
4396
  v({
4399
- ...Ot(R, x),
4397
+ ...Ft(R, x),
4400
4398
  active_id: t
4401
4399
  }), c(!1);
4402
4400
  } catch (S) {
@@ -4406,13 +4404,13 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
4406
4404
  }
4407
4405
  function w() {
4408
4406
  var x;
4409
- if (u)
4407
+ if (d)
4410
4408
  return /* @__PURE__ */ n(He, {
4411
4409
  children: /* @__PURE__ */ n("div", {
4412
4410
  style: {
4413
4411
  padding: 15
4414
4412
  },
4415
- children: /* @__PURE__ */ n(Me, {})
4413
+ children: /* @__PURE__ */ n(Le, {})
4416
4414
  })
4417
4415
  });
4418
4416
  if (!f || !f.toolbar)
@@ -4523,25 +4521,25 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
4523
4521
  value: t,
4524
4522
  context: r,
4525
4523
  selectionValues: i
4526
- } = e, [o, s] = T(), [a, l] = T(!1), [u, c] = t ? t.split(",") : [], f = parseInt(c), d = Le(async () => {
4524
+ } = e, [o, s] = T(), [a, l] = T(!1), [d, c] = t ? t.split(",") : [], f = parseInt(c), u = $e(async () => {
4527
4525
  if (!t || t && o)
4528
4526
  return;
4529
4527
  l(!0);
4530
4528
  const v = await H.getHandler().execute({
4531
4529
  action: "name_get",
4532
4530
  payload: [f],
4533
- model: u,
4531
+ model: d,
4534
4532
  context: r
4535
4533
  });
4536
4534
  s(v[0][1]), l(!1);
4537
4535
  }, [t, o]);
4538
4536
  if (pe(() => {
4539
- d();
4537
+ u();
4540
4538
  }, [t]), !t && !a)
4541
4539
  return /* @__PURE__ */ n(ne, {});
4542
4540
  if (a)
4543
4541
  return /* @__PURE__ */ n(rt, {});
4544
- const m = i.get(u);
4542
+ const m = i.get(d);
4545
4543
  return /* @__PURE__ */ P(Ye, {
4546
4544
  children: [/* @__PURE__ */ n(ne, {
4547
4545
  children: `${m}:`
@@ -4549,7 +4547,7 @@ const Ml = (e) => /* @__PURE__ */ n(ve, {
4549
4547
  children: o
4550
4548
  }), /* @__PURE__ */ n(Jn, {
4551
4549
  id: f,
4552
- model: u
4550
+ model: d
4553
4551
  })]
4554
4552
  });
4555
4553
  };
@@ -4558,7 +4556,7 @@ var wo = { exports: {} };
4558
4556
  (function(r, i) {
4559
4557
  e.exports = i();
4560
4558
  })(mt, function() {
4561
- var r = 1e3, i = 6e4, o = 36e5, s = "millisecond", a = "second", l = "minute", u = "hour", c = "day", f = "week", d = "month", m = "quarter", v = "year", p = "date", h = "Invalid Date", g = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, O = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(R) {
4559
+ var r = 1e3, i = 6e4, o = 36e5, s = "millisecond", a = "second", l = "minute", d = "hour", c = "day", f = "week", u = "month", m = "quarter", v = "year", p = "date", h = "Invalid Date", g = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, y = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, O = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(R) {
4562
4560
  var F = ["th", "st", "nd", "rd"], A = R % 100;
4563
4561
  return "[" + R + (F[(A - 20) % 10] || F[A] || F[0]) + "]";
4564
4562
  } }, _ = function(R, F, A) {
@@ -4570,12 +4568,12 @@ var wo = { exports: {} };
4570
4568
  }, m: function R(F, A) {
4571
4569
  if (F.date() < A.date())
4572
4570
  return -R(A, F);
4573
- var M = 12 * (A.year() - F.year()) + (A.month() - F.month()), I = F.clone().add(M, d), N = A - I < 0, k = F.clone().add(M + (N ? -1 : 1), d);
4571
+ var M = 12 * (A.year() - F.year()) + (A.month() - F.month()), I = F.clone().add(M, u), N = A - I < 0, k = F.clone().add(M + (N ? -1 : 1), u);
4574
4572
  return +(-(M + (A - I) / (N ? I - k : k - I)) || 0);
4575
4573
  }, a: function(R) {
4576
4574
  return R < 0 ? Math.ceil(R) || 0 : Math.floor(R);
4577
4575
  }, p: function(R) {
4578
- return { M: d, y: v, w: f, d: c, D: p, h: u, m: l, s: a, ms: s, Q: m }[R] || String(R || "").toLowerCase().replace(/s$/, "");
4576
+ return { M: u, y: v, w: f, d: c, D: p, h: d, m: l, s: a, ms: s, Q: m }[R] || String(R || "").toLowerCase().replace(/s$/, "");
4579
4577
  }, u: function(R) {
4580
4578
  return R === void 0;
4581
4579
  } }, V = "en", D = {};
@@ -4659,7 +4657,7 @@ var wo = { exports: {} };
4659
4657
  switch (k) {
4660
4658
  case v:
4661
4659
  return N ? j(1, 0) : j(31, 11);
4662
- case d:
4660
+ case u:
4663
4661
  return N ? j(1, z) : j(0, z + 1);
4664
4662
  case f:
4665
4663
  var B = this.$locale().weekStart || 0, ee = (W < B ? W + 7 : W) - B;
@@ -4667,7 +4665,7 @@ var wo = { exports: {} };
4667
4665
  case c:
4668
4666
  case p:
4669
4667
  return q(L + "Hours", 0);
4670
- case u:
4668
+ case d:
4671
4669
  return q(L + "Minutes", 1);
4672
4670
  case l:
4673
4671
  return q(L + "Seconds", 2);
@@ -4679,8 +4677,8 @@ var wo = { exports: {} };
4679
4677
  }, F.endOf = function(A) {
4680
4678
  return this.startOf(A, !1);
4681
4679
  }, F.$set = function(A, M) {
4682
- var I, N = S.p(A), k = "set" + (this.$u ? "UTC" : ""), j = (I = {}, I[c] = k + "Date", I[p] = k + "Date", I[d] = k + "Month", I[v] = k + "FullYear", I[u] = k + "Hours", I[l] = k + "Minutes", I[a] = k + "Seconds", I[s] = k + "Milliseconds", I)[N], q = N === c ? this.$D + (M - this.$W) : M;
4683
- if (N === d || N === v) {
4680
+ var I, N = S.p(A), k = "set" + (this.$u ? "UTC" : ""), j = (I = {}, I[c] = k + "Date", I[p] = k + "Date", I[u] = k + "Month", I[v] = k + "FullYear", I[d] = k + "Hours", I[l] = k + "Minutes", I[a] = k + "Seconds", I[s] = k + "Milliseconds", I)[N], q = N === c ? this.$D + (M - this.$W) : M;
4681
+ if (N === u || N === v) {
4684
4682
  var W = this.clone().set(p, 1);
4685
4683
  W.$d[j](q), W.init(), this.$d = W.set(p, Math.min(this.$D, W.daysInMonth())).$d;
4686
4684
  } else
@@ -4697,15 +4695,15 @@ var wo = { exports: {} };
4697
4695
  var U = C(N);
4698
4696
  return S.w(U.date(U.date() + Math.round(z * A)), N);
4699
4697
  };
4700
- if (k === d)
4701
- return this.set(d, this.$M + A);
4698
+ if (k === u)
4699
+ return this.set(u, this.$M + A);
4702
4700
  if (k === v)
4703
4701
  return this.set(v, this.$y + A);
4704
4702
  if (k === c)
4705
4703
  return j(1);
4706
4704
  if (k === f)
4707
4705
  return j(7);
4708
- var q = (I = {}, I[l] = i, I[u] = o, I[a] = r, I)[k] || 1, W = this.$d.getTime() + A * q;
4706
+ var q = (I = {}, I[l] = i, I[d] = o, I[a] = r, I)[k] || 1, W = this.$d.getTime() + A * q;
4709
4707
  return S.w(W, this);
4710
4708
  }, F.subtract = function(A, M) {
4711
4709
  return this.add(-1 * A, M);
@@ -4728,9 +4726,9 @@ var wo = { exports: {} };
4728
4726
  return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
4729
4727
  }, F.diff = function(A, M, I) {
4730
4728
  var N, k = S.p(M), j = C(A), q = (j.utcOffset() - this.utcOffset()) * i, W = this - j, z = S.m(this, j);
4731
- return z = (N = {}, N[v] = z / 12, N[d] = z, N[m] = z / 3, N[f] = (W - q) / 6048e5, N[c] = (W - q) / 864e5, N[u] = W / o, N[l] = W / i, N[a] = W / r, N)[k] || W, I ? z : S.a(z);
4729
+ return z = (N = {}, N[v] = z / 12, N[u] = z, N[m] = z / 3, N[f] = (W - q) / 6048e5, N[c] = (W - q) / 864e5, N[d] = W / o, N[l] = W / i, N[a] = W / r, N)[k] || W, I ? z : S.a(z);
4732
4730
  }, F.daysInMonth = function() {
4733
- return this.endOf(d).$D;
4731
+ return this.endOf(u).$D;
4734
4732
  }, F.$locale = function() {
4735
4733
  return D[this.$L];
4736
4734
  }, F.locale = function(A, M) {
@@ -4750,7 +4748,7 @@ var wo = { exports: {} };
4750
4748
  return this.$d.toUTCString();
4751
4749
  }, R;
4752
4750
  }(), $ = x.prototype;
4753
- return C.prototype = $, [["$ms", s], ["$s", a], ["$m", l], ["$H", u], ["$W", c], ["$M", d], ["$y", v], ["$D", p]].forEach(function(R) {
4751
+ return C.prototype = $, [["$ms", s], ["$s", a], ["$m", l], ["$H", d], ["$W", c], ["$M", u], ["$y", v], ["$D", p]].forEach(function(R) {
4754
4752
  $[R[1]] = function(F) {
4755
4753
  return this.$g(F, R[0], R[1]);
4756
4754
  };
@@ -4824,10 +4822,10 @@ var Co = { exports: {} };
4824
4822
  e.exports = i();
4825
4823
  })(mt, function() {
4826
4824
  return function(r, i, o) {
4827
- var s = i.prototype, a = function(d) {
4828
- return d && (d.indexOf ? d : d.s);
4829
- }, l = function(d, m, v, p, h) {
4830
- var g = d.name ? d : d.$locale(), y = a(g[m]), O = a(g[v]), _ = y || O.map(function(V) {
4825
+ var s = i.prototype, a = function(u) {
4826
+ return u && (u.indexOf ? u : u.s);
4827
+ }, l = function(u, m, v, p, h) {
4828
+ var g = u.name ? u : u.$locale(), y = a(g[m]), O = a(g[v]), _ = y || O.map(function(V) {
4831
4829
  return V.slice(0, p);
4832
4830
  });
4833
4831
  if (!h)
@@ -4836,38 +4834,38 @@ var Co = { exports: {} };
4836
4834
  return _.map(function(V, D) {
4837
4835
  return _[(D + (w || 0)) % 7];
4838
4836
  });
4839
- }, u = function() {
4837
+ }, d = function() {
4840
4838
  return o.Ls[o.locale()];
4841
- }, c = function(d, m) {
4842
- return d.formats[m] || function(v) {
4839
+ }, c = function(u, m) {
4840
+ return u.formats[m] || function(v) {
4843
4841
  return v.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g, function(p, h, g) {
4844
4842
  return h || g.slice(1);
4845
4843
  });
4846
- }(d.formats[m.toUpperCase()]);
4844
+ }(u.formats[m.toUpperCase()]);
4847
4845
  }, f = function() {
4848
- var d = this;
4846
+ var u = this;
4849
4847
  return { months: function(m) {
4850
- return m ? m.format("MMMM") : l(d, "months");
4848
+ return m ? m.format("MMMM") : l(u, "months");
4851
4849
  }, monthsShort: function(m) {
4852
- return m ? m.format("MMM") : l(d, "monthsShort", "months", 3);
4850
+ return m ? m.format("MMM") : l(u, "monthsShort", "months", 3);
4853
4851
  }, firstDayOfWeek: function() {
4854
- return d.$locale().weekStart || 0;
4852
+ return u.$locale().weekStart || 0;
4855
4853
  }, weekdays: function(m) {
4856
- return m ? m.format("dddd") : l(d, "weekdays");
4854
+ return m ? m.format("dddd") : l(u, "weekdays");
4857
4855
  }, weekdaysMin: function(m) {
4858
- return m ? m.format("dd") : l(d, "weekdaysMin", "weekdays", 2);
4856
+ return m ? m.format("dd") : l(u, "weekdaysMin", "weekdays", 2);
4859
4857
  }, weekdaysShort: function(m) {
4860
- return m ? m.format("ddd") : l(d, "weekdaysShort", "weekdays", 3);
4858
+ return m ? m.format("ddd") : l(u, "weekdaysShort", "weekdays", 3);
4861
4859
  }, longDateFormat: function(m) {
4862
- return c(d.$locale(), m);
4860
+ return c(u.$locale(), m);
4863
4861
  }, meridiem: this.$locale().meridiem, ordinal: this.$locale().ordinal };
4864
4862
  };
4865
4863
  s.localeData = function() {
4866
4864
  return f.bind(this)();
4867
4865
  }, o.localeData = function() {
4868
- var d = u();
4866
+ var u = d();
4869
4867
  return { firstDayOfWeek: function() {
4870
- return d.weekStart || 0;
4868
+ return u.weekStart || 0;
4871
4869
  }, weekdays: function() {
4872
4870
  return o.weekdays();
4873
4871
  }, weekdaysShort: function() {
@@ -4879,18 +4877,18 @@ var Co = { exports: {} };
4879
4877
  }, monthsShort: function() {
4880
4878
  return o.monthsShort();
4881
4879
  }, longDateFormat: function(m) {
4882
- return c(d, m);
4883
- }, meridiem: d.meridiem, ordinal: d.ordinal };
4880
+ return c(u, m);
4881
+ }, meridiem: u.meridiem, ordinal: u.ordinal };
4884
4882
  }, o.months = function() {
4885
- return l(u(), "months");
4883
+ return l(d(), "months");
4886
4884
  }, o.monthsShort = function() {
4887
- return l(u(), "monthsShort", "months", 3);
4888
- }, o.weekdays = function(d) {
4889
- return l(u(), "weekdays", null, null, d);
4890
- }, o.weekdaysShort = function(d) {
4891
- return l(u(), "weekdaysShort", "weekdays", 3, d);
4892
- }, o.weekdaysMin = function(d) {
4893
- return l(u(), "weekdaysMin", "weekdays", 2, d);
4885
+ return l(d(), "monthsShort", "months", 3);
4886
+ }, o.weekdays = function(u) {
4887
+ return l(d(), "weekdays", null, null, u);
4888
+ }, o.weekdaysShort = function(u) {
4889
+ return l(d(), "weekdaysShort", "weekdays", 3, u);
4890
+ }, o.weekdaysMin = function(u) {
4891
+ return l(d(), "weekdaysMin", "weekdays", 2, u);
4894
4892
  };
4895
4893
  };
4896
4894
  });
@@ -4937,17 +4935,17 @@ const lt = {
4937
4935
  readOnly: a,
4938
4936
  required: l
4939
4937
  } = i, {
4940
- token: u
4938
+ token: d
4941
4939
  } = jl(), c = l && !a ? {
4942
- backgroundColor: u.colorPrimaryBg
4943
- } : void 0, f = o ? "time" : "date", d = (p) => {
4940
+ backgroundColor: d.colorPrimaryBg
4941
+ } : void 0, f = o ? "time" : "date", u = (p) => {
4944
4942
  r == null || r(p);
4945
4943
  }, m = (p) => {
4946
4944
  if (p === null) {
4947
- d(void 0);
4945
+ u(void 0);
4948
4946
  return;
4949
4947
  }
4950
- d(p.format(lt[f].dateInternalFormat));
4948
+ u(p.format(lt[f].dateInternalFormat));
4951
4949
  }, v = t ? dt(t, lt[f].dateInternalFormat) : void 0;
4952
4950
  return /* @__PURE__ */ n(Mn, {
4953
4951
  style: {
@@ -5035,10 +5033,10 @@ function pn(e) {
5035
5033
  results: s,
5036
5034
  onRequestPageChange: a,
5037
5035
  loading: l,
5038
- onRowClicked: u,
5036
+ onRowClicked: d,
5039
5037
  showPagination: c = !0,
5040
5038
  rowSelection: f,
5041
- scrollY: d,
5039
+ scrollY: u,
5042
5040
  colorsForResults: m = {},
5043
5041
  statusForResults: v = {},
5044
5042
  onChangeSort: p,
@@ -5048,14 +5046,14 @@ function pn(e) {
5048
5046
  rootTree: O = !1,
5049
5047
  context: _,
5050
5048
  readonly: w
5051
- } = e, [V, D] = T([]), [E, b] = T([]), C = ue(!1), S = ue(null), {
5049
+ } = e, [V, D] = T([]), [E, b] = T([]), C = de(!1), S = de(null), {
5052
5050
  t: x
5053
- } = Y(we), $ = ue(r), R = Y(Qe), {
5051
+ } = Y(we), $ = de(r), R = Y(Qe), {
5054
5052
  title: F = void 0,
5055
5053
  setTitle: A = void 0
5056
5054
  } = (O ? R : {}) || {};
5057
5055
  pe(() => {
5058
- S.current = It(o);
5056
+ S.current = Ot(o);
5059
5057
  const z = Fa(S.current, {
5060
5058
  boolean: Yl,
5061
5059
  many2one: Wl,
@@ -5080,7 +5078,7 @@ function pn(e) {
5080
5078
  const z = lo(S.current, s);
5081
5079
  D(z), $.current = r;
5082
5080
  }, [s]);
5083
- const M = (t - 1) * $.current + 1, I = M - 1 + V.length, N = i === void 0 ? null : i === 0 ? x("no_results") : x("summary").replace("{from}", M == null ? void 0 : M.toString()).replace("{to}", I == null ? void 0 : I.toString()).replace("{total}", i == null ? void 0 : i.toString()), k = () => !c || o.isExpandable || l ? null : i === void 0 ? /* @__PURE__ */ n(Me, {
5081
+ const M = (t - 1) * $.current + 1, I = M - 1 + V.length, N = i === void 0 ? null : i === 0 ? x("no_results") : x("summary").replace("{from}", M == null ? void 0 : M.toString()).replace("{to}", I == null ? void 0 : I.toString()).replace("{total}", i == null ? void 0 : i.toString()), k = () => !c || o.isExpandable || l ? null : i === void 0 ? /* @__PURE__ */ n(Le, {
5084
5082
  className: "pb-4"
5085
5083
  }) : /* @__PURE__ */ P(Ce, {
5086
5084
  align: "bottom",
@@ -5117,25 +5115,23 @@ function pn(e) {
5117
5115
  children: L.join(", ")
5118
5116
  });
5119
5117
  }
5120
- let q, W = d;
5118
+ let q, W = u;
5121
5119
  if (S.current !== null) {
5122
5120
  q = Rl(E, V, 600);
5123
5121
  const U = S.current;
5124
- d && U.columns.some((L) => L.sum !== void 0) && (W = d - 30);
5122
+ u && U.columns.some((L) => L.sum !== void 0) && (W = u - 30);
5125
5123
  }
5126
- return S.current === null ? /* @__PURE__ */ n(Me, {
5124
+ return S.current === null ? /* @__PURE__ */ n(Le, {
5127
5125
  style: {
5128
5126
  padding: "2rem"
5129
5127
  }
5130
5128
  }) : /* @__PURE__ */ P("div", {
5131
- children: [k(), l && /* @__PURE__ */ n(Me, {
5132
- className: "pb-4"
5133
- }), /* @__PURE__ */ n(Ri, {
5129
+ children: [k(), /* @__PURE__ */ n(Ri, {
5134
5130
  height: W,
5135
5131
  columns: q.columns,
5136
5132
  dataSource: V,
5137
- loading: !1,
5138
- loadingComponent: /* @__PURE__ */ n(Me, {}),
5133
+ loading: l,
5134
+ loadingComponent: /* @__PURE__ */ n(Le, {}),
5139
5135
  onRowStyle: (z) => {
5140
5136
  if (m[z.id])
5141
5137
  return {
@@ -5148,7 +5144,7 @@ function pn(e) {
5148
5144
  color: v[z.id]
5149
5145
  });
5150
5146
  },
5151
- onRowDoubleClick: u,
5147
+ onRowDoubleClick: d,
5152
5148
  onRowSelectionChange: f == null ? void 0 : f.onChange,
5153
5149
  onChangeSort: p,
5154
5150
  sorter: h,
@@ -5171,14 +5167,14 @@ function nc(e, t) {
5171
5167
  onRowClicked: s,
5172
5168
  nameSearch: a,
5173
5169
  treeScrollY: l,
5174
- domain: u = [],
5170
+ domain: d = [],
5175
5171
  visible: c = !0,
5176
5172
  rootTree: f = !1,
5177
- parentContext: d = {},
5173
+ parentContext: u = {},
5178
5174
  onChangeSelectedRowKeys: m
5179
- } = e, [v, p] = T(!1), [h, g] = T(!1), y = ue(!1), [O, _] = T(), [w, V] = T(), [D, E] = T(), [b, C] = T(), [S, x] = T(200), $ = ue(), {
5175
+ } = e, [v, p] = T(!1), [h, g] = T(!1), y = de(!1), [O, _] = T(), [w, V] = T(), [D, E] = T(), [b, C] = T(), [S, x] = T(200), $ = de(), {
5180
5176
  height: R
5181
- } = fn(), F = Y(Et), {
5177
+ } = fn(), F = Y(Mt), {
5182
5178
  processAction: A
5183
5179
  } = F || {}, M = Y(Qe), {
5184
5180
  setResults: I = void 0,
@@ -5198,7 +5194,7 @@ function nc(e, t) {
5198
5194
  setTreeIsLoading: J = void 0,
5199
5195
  searchValues: fe = {},
5200
5196
  setSearchValues: be = void 0,
5201
- limit: $e = Ht,
5197
+ limit: Ee = Ht,
5202
5198
  setLimit: _e = void 0
5203
5199
  } = (f ? M : {}) || {}, {
5204
5200
  submit: Be,
@@ -5211,11 +5207,11 @@ function nc(e, t) {
5211
5207
  offset: We,
5212
5208
  getResults: te,
5213
5209
  requestPageChange: Fe,
5214
- changeSort: Ee,
5210
+ changeSort: Me,
5215
5211
  fetchChildrenForRecord: ce,
5216
5212
  colorsForResults: me,
5217
5213
  statusForResults: Te,
5218
- totalItems: de
5214
+ totalItems: ue
5219
5215
  } = ho({
5220
5216
  model: O,
5221
5217
  setSearchTreeNameSearch: Q,
@@ -5227,7 +5223,7 @@ function nc(e, t) {
5227
5223
  setTreeIsLoading: J,
5228
5224
  nameSearch: a,
5229
5225
  searchNameGetDoneRef: y,
5230
- context: d,
5226
+ context: u,
5231
5227
  formView: D,
5232
5228
  treeView: w,
5233
5229
  sorter: ee,
@@ -5235,18 +5231,18 @@ function nc(e, t) {
5235
5231
  setCurrentItemIndex: N,
5236
5232
  setResultsActionView: I,
5237
5233
  resultsActionView: j,
5238
- domain: u,
5234
+ domain: d,
5239
5235
  currentId: k,
5240
5236
  setActionViewTotalItems: ie,
5241
- limit: $e,
5237
+ limit: Ee,
5242
5238
  setLimit: _e
5243
5239
  });
5244
- xt(t, () => ({
5240
+ bt(t, () => ({
5245
5241
  refreshResults: () => {
5246
5242
  y.current = !1, se();
5247
5243
  },
5248
5244
  getFields: () => w == null ? void 0 : w.fields,
5249
- getDomain: () => u
5245
+ getDomain: () => d
5250
5246
  })), pe(() => {
5251
5247
  !h || c && (y.current = !1, se());
5252
5248
  }, [je, We, h, c, a]);
@@ -5255,9 +5251,9 @@ function nc(e, t) {
5255
5251
  try {
5256
5252
  await Ke(), g(!0);
5257
5253
  } catch (ke) {
5258
- C(ke), J == null || J(!1);
5254
+ C(ke);
5259
5255
  } finally {
5260
- p(!1);
5256
+ p(!1), J == null || J(!1);
5261
5257
  }
5262
5258
  }, Ke = async () => {
5263
5259
  _(r);
@@ -5265,13 +5261,13 @@ function nc(e, t) {
5265
5261
  i || (ke = await H.getHandler().getView({
5266
5262
  model: r,
5267
5263
  type: "form",
5268
- context: d
5264
+ context: u
5269
5265
  }));
5270
5266
  let et = o;
5271
5267
  o || (et = await H.getHandler().getView({
5272
5268
  model: r,
5273
5269
  type: "tree",
5274
- context: d
5270
+ context: u
5275
5271
  })), E(ke), V(et);
5276
5272
  };
5277
5273
  pe(() => {
@@ -5286,7 +5282,7 @@ function nc(e, t) {
5286
5282
  $.current || ($.current = await H.getHandler().treeButOpen({
5287
5283
  id: w.view_id,
5288
5284
  model: O,
5289
- context: d
5285
+ context: u
5290
5286
  }));
5291
5287
  const tt = $.current[0][2];
5292
5288
  await (A == null ? void 0 : A({
@@ -5296,7 +5292,7 @@ function nc(e, t) {
5296
5292
  active_id: et,
5297
5293
  ...ke
5298
5294
  },
5299
- context: d
5295
+ context: u
5300
5296
  }));
5301
5297
  }, ae = async (ke) => {
5302
5298
  const {
@@ -5333,7 +5329,7 @@ function nc(e, t) {
5333
5329
  searchFields: uo([D.search_fields, w.search_fields]),
5334
5330
  formXml: D.arch,
5335
5331
  onClear: ge,
5336
- limit: $e,
5332
+ limit: Ee,
5337
5333
  offset: We,
5338
5334
  isSearching: De,
5339
5335
  onSubmit: Be,
@@ -5343,9 +5339,9 @@ function nc(e, t) {
5343
5339
  searchVisible: L,
5344
5340
  searchValues: fe
5345
5341
  }), /* @__PURE__ */ n(pn, {
5346
- context: d,
5347
- total: de,
5348
- limit: $e,
5342
+ context: u,
5343
+ total: ue,
5344
+ limit: Ee,
5349
5345
  page: je,
5350
5346
  treeView: w,
5351
5347
  results: te(),
@@ -5360,7 +5356,7 @@ function nc(e, t) {
5360
5356
  onChange: Ae
5361
5357
  },
5362
5358
  sorter: ee,
5363
- onChangeSort: Ee,
5359
+ onChangeSort: Me,
5364
5360
  onFetchChildrenForRecord: w.isExpandable ? ce : void 0,
5365
5361
  childField: w.field_parent,
5366
5362
  rootTree: f
@@ -5375,10 +5371,10 @@ function nc(e, t) {
5375
5371
  style: c ? {} : {
5376
5372
  display: "none"
5377
5373
  },
5378
- children: v ? /* @__PURE__ */ n(Me, {}) : ye()
5374
+ children: v ? /* @__PURE__ */ n(Le, {}) : ye()
5379
5375
  });
5380
5376
  }
5381
- const To = bt(nc), Fo = (e) => {
5377
+ const To = wt(nc), Fo = (e) => {
5382
5378
  const {
5383
5379
  visible: t,
5384
5380
  onCloseModal: r,
@@ -5387,9 +5383,9 @@ const To = bt(nc), Fo = (e) => {
5387
5383
  nameSearch: s,
5388
5384
  domain: a,
5389
5385
  context: l = {}
5390
- } = e, [u, c] = T(!1), {
5386
+ } = e, [d, c] = T(!1), {
5391
5387
  modalWidth: f,
5392
- modalHeight: d
5388
+ modalHeight: u
5393
5389
  } = fn(), {
5394
5390
  t: m
5395
5391
  } = Y(we), [v, p] = T([]), h = async () => {
@@ -5412,7 +5408,7 @@ const To = bt(nc), Fo = (e) => {
5412
5408
  model: o,
5413
5409
  nameSearch: s,
5414
5410
  onRowClicked: g,
5415
- treeScrollY: d * 0.3,
5411
+ treeScrollY: u * 0.3,
5416
5412
  domain: a,
5417
5413
  parentContext: l,
5418
5414
  onChangeSelectedRowKeys: (_) => {
@@ -5428,7 +5424,7 @@ const To = bt(nc), Fo = (e) => {
5428
5424
  },
5429
5425
  children: m("new")
5430
5426
  }), /* @__PURE__ */ n(Ie, {
5431
- icon: /* @__PURE__ */ n(kt, {}),
5427
+ icon: /* @__PURE__ */ n(Rt, {}),
5432
5428
  onClick: () => {
5433
5429
  y();
5434
5430
  },
@@ -5447,7 +5443,7 @@ const To = bt(nc), Fo = (e) => {
5447
5443
  title: m("search"),
5448
5444
  centered: !0,
5449
5445
  width: f,
5450
- open: t && !u,
5446
+ open: t && !d,
5451
5447
  closable: !0,
5452
5448
  onCancel: h,
5453
5449
  footer: null,
@@ -5456,7 +5452,7 @@ const To = bt(nc), Fo = (e) => {
5456
5452
  children: O()
5457
5453
  }), /* @__PURE__ */ n(Gt, {
5458
5454
  model: o,
5459
- visible: u,
5455
+ visible: d,
5460
5456
  parentContext: l,
5461
5457
  onSubmitSucceed: (_) => {
5462
5458
  c(!1), h(), i([_]);
@@ -5510,17 +5506,17 @@ const To = bt(nc), Fo = (e) => {
5510
5506
  relation: s,
5511
5507
  readOnly: a,
5512
5508
  context: l,
5513
- id: u,
5509
+ id: d,
5514
5510
  domain: c
5515
5511
  } = i, f = o && !a ? {
5516
5512
  backgroundColor: Oo.colorPrimaryBg
5517
- } : void 0, [d, m] = T(!1), [v, p] = T(!1), [h, g] = T(!1), [y, O] = T(), _ = ue(!1), [w, V] = T(""), D = ue(), E = Y(Ne), {
5513
+ } : void 0, [u, m] = T(!1), [v, p] = T(!1), [h, g] = T(!1), [y, O] = T(), _ = de(!1), [w, V] = T(""), D = de(), E = Y(Ne), {
5518
5514
  domain: b,
5519
5515
  getValues: C,
5520
5516
  getFields: S,
5521
5517
  getContext: x,
5522
5518
  elementHasLostFocus: $
5523
- } = E || {}, R = ue([]), [F, A] = T([]), M = t && t[0] || void 0, I = t && t[1] || "";
5519
+ } = E || {}, R = de([]), [F, A] = T([]), M = t && t[0] || void 0, I = t && t[1] || "";
5524
5520
  pe(() => {
5525
5521
  !Array.isArray(t) && t && W(t);
5526
5522
  }, [t]), pe(() => {
@@ -5594,7 +5590,7 @@ const To = bt(nc), Fo = (e) => {
5594
5590
  async function z() {
5595
5591
  c && (R.current = await H.getHandler().evalDomain({
5596
5592
  domain: c,
5597
- values: Mt({
5593
+ values: kt({
5598
5594
  fields: S(),
5599
5595
  values: C()
5600
5596
  }),
@@ -5602,7 +5598,7 @@ const To = bt(nc), Fo = (e) => {
5602
5598
  context: x()
5603
5599
  })), b && b.length > 0 && (R.current = R.current.concat(Er({
5604
5600
  domain: b,
5605
- widgetFieldName: u
5601
+ widgetFieldName: d
5606
5602
  }))), A(R.current);
5607
5603
  }
5608
5604
  async function U(B) {
@@ -5671,7 +5667,7 @@ const To = bt(nc), Fo = (e) => {
5671
5667
  ...x == null ? void 0 : x(),
5672
5668
  ...l
5673
5669
  },
5674
- visible: d,
5670
+ visible: u,
5675
5671
  nameSearch: M ? void 0 : y,
5676
5672
  onSelectValues: (B) => {
5677
5673
  m(!1), W(B[0]), _.current = !1, D.current = void 0;
@@ -5728,10 +5724,10 @@ const To = bt(nc), Fo = (e) => {
5728
5724
  totalDomain: s,
5729
5725
  showPercent: a = !1,
5730
5726
  icon: l,
5731
- suffix: u,
5727
+ suffix: d,
5732
5728
  field: c,
5733
5729
  operator: f,
5734
- manualIds: d
5730
+ manualIds: u
5735
5731
  } = e, [m, v] = T(!1), [p, h] = T(), [g, y] = T(), [O, _] = T(), [w, V] = T(0), [D, E] = T(0), [b, C] = T(), [S, x] = T(), [$, R] = T();
5736
5732
  pe(() => {
5737
5733
  M();
@@ -5745,7 +5741,7 @@ const To = bt(nc), Fo = (e) => {
5745
5741
  domain: I
5746
5742
  });
5747
5743
  if (c && f) {
5748
- const k = d || await H.getHandler().searchAllIds({
5744
+ const k = u || await H.getHandler().searchAllIds({
5749
5745
  params: I,
5750
5746
  model: t,
5751
5747
  context: i
@@ -5760,7 +5756,7 @@ const To = bt(nc), Fo = (e) => {
5760
5756
  operator: f
5761
5757
  });
5762
5758
  } else
5763
- return d ? d.length : await H.getHandler().searchCount({
5759
+ return u ? u.length : await H.getHandler().searchCount({
5764
5760
  model: t,
5765
5761
  params: I,
5766
5762
  context: i
@@ -5870,7 +5866,7 @@ const To = bt(nc), Fo = (e) => {
5870
5866
  width: D,
5871
5867
  color: b,
5872
5868
  icon: S,
5873
- suffix: u
5869
+ suffix: d
5874
5870
  }) : /* @__PURE__ */ n(dc, {
5875
5871
  value: p,
5876
5872
  total: O,
@@ -5879,7 +5875,7 @@ const To = bt(nc), Fo = (e) => {
5879
5875
  width: D,
5880
5876
  color: b,
5881
5877
  icon: S,
5882
- suffix: u
5878
+ suffix: d
5883
5879
  })
5884
5880
  });
5885
5881
  };
@@ -5897,14 +5893,14 @@ function dc({
5897
5893
  icon: a,
5898
5894
  suffix: l
5899
5895
  }) {
5900
- let u = r * rn < on ? on : r * rn;
5896
+ let d = r * rn < on ? on : r * rn;
5901
5897
  const c = o == null ? void 0 : o.toLocaleString("es-ES", {
5902
5898
  useGrouping: !0
5903
5899
  });
5904
5900
  let f = i ? `${c}/${i}` : `${c}`;
5905
5901
  l && (f += " " + l);
5906
- let d = Do(f, `bold ${Math.floor(u * 1.03)}px sans-serif`);
5907
- a && (d = d * 2), d >= t * 0.85 && (u = t * 0.85 / d * u);
5902
+ let u = Do(f, `bold ${Math.floor(d * 1.03)}px sans-serif`);
5903
+ a && (u = u * 2), u >= t * 0.85 && (d = t * 0.85 / u * d);
5908
5904
  const m = a && it(a);
5909
5905
  return /* @__PURE__ */ n("div", {
5910
5906
  ref: e,
@@ -5918,13 +5914,13 @@ function dc({
5918
5914
  },
5919
5915
  children: /* @__PURE__ */ P(Dn, {
5920
5916
  style: {
5921
- fontSize: u,
5917
+ fontSize: d,
5922
5918
  margin: 0,
5923
5919
  color: s
5924
5920
  },
5925
5921
  children: [m && /* @__PURE__ */ n(m, {
5926
5922
  style: {
5927
- fontSize: u * 0.7
5923
+ fontSize: d * 0.7
5928
5924
  }
5929
5925
  }), m ? ` ${f}` : f]
5930
5926
  })
@@ -5939,17 +5935,17 @@ function uc({
5939
5935
  value: s,
5940
5936
  color: a,
5941
5937
  icon: l,
5942
- suffix: u
5938
+ suffix: d
5943
5939
  }) {
5944
5940
  const c = t * 0.65;
5945
5941
  let f = c * rn < on ? on : c * rn;
5946
- const d = s == null ? void 0 : s.toLocaleString("es-ES", {
5942
+ const u = s == null ? void 0 : s.toLocaleString("es-ES", {
5947
5943
  useGrouping: !0
5948
5944
  });
5949
- let m = o ? `${d}/${o == null ? void 0 : o.toLocaleString("es-ES", {
5945
+ let m = o ? `${u}/${o == null ? void 0 : o.toLocaleString("es-ES", {
5950
5946
  useGrouping: !0
5951
- })}` : `${d}`;
5952
- u && (m += " " + u);
5947
+ })}` : `${u}`;
5948
+ d && (m += " " + d);
5953
5949
  const v = `${i == null ? void 0 : i.toLocaleString("es-ES", {
5954
5950
  useGrouping: !0
5955
5951
  })}%`;
@@ -6143,10 +6139,10 @@ const {
6143
6139
  limit: s,
6144
6140
  uninformedString: a,
6145
6141
  manualIds: l
6146
- } = e, [u, c] = T(!1), [f, d] = T(), [m, v] = T(), [p, h] = T(), [g, y] = T("line");
6147
- return St(() => {
6142
+ } = e, [d, c] = T(!1), [f, u] = T(), [m, v] = T(), [p, h] = T(), [g, y] = T("line");
6143
+ return Ct(() => {
6148
6144
  (async () => {
6149
- c(!0), d(void 0);
6145
+ c(!0), u(void 0);
6150
6146
  const O = Ln(o);
6151
6147
  y(O.type || "line");
6152
6148
  const _ = yc({
@@ -6167,12 +6163,12 @@ const {
6167
6163
  manualIds: l
6168
6164
  }));
6169
6165
  } catch (D) {
6170
- d("Error fetching graph data values: " + JSON.stringify(D)), c(!1);
6166
+ u("Error fetching graph data values: " + JSON.stringify(D)), c(!1);
6171
6167
  return;
6172
6168
  }
6173
6169
  try {
6174
6170
  if (!w || !V) {
6175
- d("No values or fields returned"), c(!1);
6171
+ u("No values or fields returned"), c(!1);
6176
6172
  return;
6177
6173
  }
6178
6174
  h(w);
@@ -6186,13 +6182,13 @@ const {
6186
6182
  });
6187
6183
  v(D);
6188
6184
  } catch (D) {
6189
- d("Error processing graph data: " + D), c(!1);
6185
+ u("Error processing graph data: " + D), c(!1);
6190
6186
  return;
6191
6187
  }
6192
6188
  c(!1);
6193
6189
  })();
6194
6190
  }, [o, t, s, i, r]), {
6195
- loading: u,
6191
+ loading: d,
6196
6192
  error: f,
6197
6193
  type: g,
6198
6194
  values: m,
@@ -6231,7 +6227,7 @@ async function bc({
6231
6227
  fieldsToRetrieve: e,
6232
6228
  context: i
6233
6229
  });
6234
- return o && (c = [...c].sort((f, d) => f[o] - d[o])), {
6230
+ return o && (c = [...c].sort((f, u) => f[o] - u[o])), {
6235
6231
  values: c,
6236
6232
  fields: l
6237
6233
  };
@@ -6264,10 +6260,10 @@ const xc = {
6264
6260
  } = e, {
6265
6261
  t: l
6266
6262
  } = Y(we), {
6267
- error: u,
6263
+ error: d,
6268
6264
  loading: c,
6269
6265
  values: f,
6270
- type: d,
6266
+ type: u,
6271
6267
  evaluatedEntries: m
6272
6268
  } = vc({
6273
6269
  model: t,
@@ -6278,14 +6274,14 @@ const xc = {
6278
6274
  uninformedString: l("uninformed"),
6279
6275
  manualIds: a
6280
6276
  });
6281
- if (u)
6277
+ if (d)
6282
6278
  return /* @__PURE__ */ n(Ze, {
6283
- message: u,
6279
+ message: d,
6284
6280
  type: "error",
6285
6281
  banner: !0
6286
6282
  });
6287
6283
  if (c)
6288
- return /* @__PURE__ */ n(Me, {});
6284
+ return /* @__PURE__ */ n(Le, {});
6289
6285
  if (!f)
6290
6286
  return /* @__PURE__ */ n(Ze, {
6291
6287
  message: "No data to display",
@@ -6295,7 +6291,7 @@ const xc = {
6295
6291
  data: v,
6296
6292
  isGroup: p,
6297
6293
  isStack: h
6298
- } = f, g = xc[d];
6294
+ } = f, g = xc[u];
6299
6295
  return g ? /* @__PURE__ */ P("div", {
6300
6296
  style: {
6301
6297
  padding: "1rem"
@@ -6309,14 +6305,14 @@ const xc = {
6309
6305
  })}`
6310
6306
  }), /* @__PURE__ */ n(g, {
6311
6307
  ...Sc({
6312
- type: d,
6308
+ type: u,
6313
6309
  data: v,
6314
6310
  isGroup: p,
6315
6311
  isStack: h
6316
6312
  })
6317
6313
  })]
6318
6314
  }) : /* @__PURE__ */ n(ne, {
6319
- children: `Unknown graph type: ${d}`
6315
+ children: `Unknown graph type: ${u}`
6320
6316
  });
6321
6317
  };
6322
6318
  function Sc(e) {
@@ -6337,10 +6333,10 @@ const Tc = (e, t) => {
6337
6333
  domain: s,
6338
6334
  limit: a,
6339
6335
  manualIds: l
6340
- } = e, [u, c] = T(!1), [f, d] = T(), [m, v] = T(), p = Y(Qe), {
6336
+ } = e, [d, c] = T(!1), [f, u] = T(), [m, v] = T(), p = Y(Qe), {
6341
6337
  setGraphIsLoading: h = void 0
6342
6338
  } = p || {};
6343
- xt(t, () => ({
6339
+ bt(t, () => ({
6344
6340
  refresh: () => {
6345
6341
  g();
6346
6342
  }
@@ -6358,7 +6354,7 @@ const Tc = (e, t) => {
6358
6354
  });
6359
6355
  v(y.arch);
6360
6356
  const O = Ln(y.arch);
6361
- d(O);
6357
+ u(O);
6362
6358
  } catch (y) {
6363
6359
  return console.error(y), /* @__PURE__ */ n(ne, {
6364
6360
  children: JSON.stringify(y)
@@ -6366,7 +6362,7 @@ const Tc = (e, t) => {
6366
6362
  }
6367
6363
  c(!1), h == null || h(!1);
6368
6364
  }
6369
- if (u)
6365
+ if (d)
6370
6366
  return /* @__PURE__ */ n("div", {
6371
6367
  style: {
6372
6368
  width: "100%",
@@ -6420,7 +6416,7 @@ const Tc = (e, t) => {
6420
6416
  children: `Graph ${f.type} not implemented`
6421
6417
  });
6422
6418
  }
6423
- }, gn = bt(Tc), {
6419
+ }, gn = wt(Tc), {
6424
6420
  confirm: Fc
6425
6421
  } = Ge, Oc = ({
6426
6422
  onOk: e,
@@ -6461,10 +6457,10 @@ const Tc = (e, t) => {
6461
6457
  mode: s,
6462
6458
  onDelete: a,
6463
6459
  totalItems: l,
6464
- currentItemIndex: u,
6460
+ currentItemIndex: d,
6465
6461
  onPreviousItem: c,
6466
6462
  onNextItem: f,
6467
- isMany2Many: d,
6463
+ isMany2Many: u,
6468
6464
  onSearchItem: m,
6469
6465
  selectedRowKeys: v,
6470
6466
  showCreateButton: p,
@@ -6495,15 +6491,15 @@ const Tc = (e, t) => {
6495
6491
  }
6496
6492
  function _() {
6497
6493
  return /* @__PURE__ */ n(ze, {
6498
- tooltip: d ? "Unlink" : "Delete",
6499
- icon: d ? /* @__PURE__ */ n(wi, {}) : /* @__PURE__ */ n(Yn, {}),
6494
+ tooltip: u ? "Unlink" : "Delete",
6495
+ icon: u ? /* @__PURE__ */ n(wi, {}) : /* @__PURE__ */ n(Yn, {}),
6500
6496
  onClick: a,
6501
6497
  disabled: l === 0 || r || s !== "form" && v.length === 0
6502
6498
  });
6503
6499
  }
6504
6500
  function w() {
6505
6501
  let D = "_";
6506
- return l === 0 ? D = "_" : D = (u + 1).toString(), /* @__PURE__ */ P("span", {
6502
+ return l === 0 ? D = "_" : D = (d + 1).toString(), /* @__PURE__ */ P("span", {
6507
6503
  className: "pl-1 pr-1",
6508
6504
  children: ["(", D, "/", l, ")"]
6509
6505
  });
@@ -6530,7 +6526,7 @@ const Tc = (e, t) => {
6530
6526
  icon: /* @__PURE__ */ n(cn, {}),
6531
6527
  disabled: r,
6532
6528
  onClick: i
6533
- }), d && p && /* @__PURE__ */ n(ze, {
6529
+ }), u && p && /* @__PURE__ */ n(ze, {
6534
6530
  tooltip: "Search existing item",
6535
6531
  icon: /* @__PURE__ */ n(Bn, {}),
6536
6532
  disabled: r,
@@ -6568,10 +6564,10 @@ const kc = (e) => {
6568
6564
  } = t || {}, {
6569
6565
  currentView: a,
6570
6566
  setCurrentView: l,
6571
- itemIndex: u,
6567
+ itemIndex: d,
6572
6568
  setItemIndex: c
6573
6569
  } = Y(_o), f = Y(Ne), {
6574
- activeId: d,
6570
+ activeId: u,
6575
6571
  getFields: m,
6576
6572
  getValues: v,
6577
6573
  getContext: p,
@@ -6579,14 +6575,14 @@ const kc = (e) => {
6579
6575
  } = f || {}, {
6580
6576
  lang: g,
6581
6577
  t: y
6582
- } = Y(we), [O, _] = T(!1), [w, V] = T(!1), [D, E] = T(), [b, C] = T(!1), [S, x] = T(!1), [$, R] = T(), [F, A] = T([]), [M, I] = T(!1), N = ue([]), [k, j] = T(), q = ue(), [W, z] = T(void 0), {
6578
+ } = Y(we), [O, _] = T(!1), [w, V] = T(!1), [D, E] = T(), [b, C] = T(!1), [S, x] = T(!1), [$, R] = T(), [F, A] = T([]), [M, I] = T(!1), N = de([]), [k, j] = T(), q = de(), [W, z] = T(void 0), {
6583
6579
  readOnly: U,
6584
6580
  relation: L,
6585
6581
  context: B,
6586
6582
  domain: ee
6587
6583
  } = i, Z = i.type === "many2many", {
6588
6584
  id: ie
6589
- } = i, Q = s.filter((X) => (X.values || X.treeValues) && X.operation !== "pendingRemove"), J = ue();
6585
+ } = i, Q = s.filter((X) => (X.values || X.treeValues) && X.operation !== "pendingRemove"), J = de();
6590
6586
  pe(() => {
6591
6587
  if (J.current !== a) {
6592
6588
  J.current = a, fe();
@@ -6594,8 +6590,8 @@ const kc = (e) => {
6594
6590
  }
6595
6591
  fe();
6596
6592
  }, [s, a]);
6597
- const fe = Le(() => {
6598
- (a === "form" && s.some((X) => !X.values) || a === "tree" && s.some((X) => !X.treeValues)) && $e();
6593
+ const fe = $e(() => {
6594
+ (a === "form" && s.some((X) => !X.values) || a === "tree" && s.some((X) => !X.treeValues)) && Ee();
6599
6595
  }, [s, a]);
6600
6596
  pe(() => {
6601
6597
  Be();
@@ -6606,8 +6602,8 @@ const kc = (e) => {
6606
6602
  fields: ((ae = o.get("form")) == null ? void 0 : ae.fields) || ((Ae = o.get("tree")) == null ? void 0 : Ae.fields),
6607
6603
  items: Rc(X)
6608
6604
  });
6609
- }, $e = async () => {
6610
- await _e(), u > Q.length - 1 && u !== 0 && c(0);
6605
+ }, Ee = async () => {
6606
+ await _e(), d > Q.length - 1 && d !== 0 && c(0);
6611
6607
  }, _e = async (X) => {
6612
6608
  var ae, Ae, he;
6613
6609
  V(!0), _(!1), E(void 0);
@@ -6638,7 +6634,7 @@ const kc = (e) => {
6638
6634
  async function Be() {
6639
6635
  ee && (N.current = await H.getHandler().evalDomain({
6640
6636
  domain: ee,
6641
- values: Mt({
6637
+ values: kt({
6642
6638
  fields: m(),
6643
6639
  values: v()
6644
6640
  }),
@@ -6655,16 +6651,16 @@ const kc = (e) => {
6655
6651
  l(ae);
6656
6652
  }) : l(ae);
6657
6653
  }, se = () => {
6658
- u > 0 && (a === "form" ? Ve(() => {
6659
- c(u - 1);
6660
- }) : c(u - 1));
6654
+ d > 0 && (a === "form" ? Ve(() => {
6655
+ c(d - 1);
6656
+ }) : c(d - 1));
6661
6657
  }, Se = () => {
6662
6658
  const X = Q.length;
6663
- u < X - 1 && (a === "form" ? Ve(() => {
6664
- c(u + 1);
6665
- }) : c(u + 1));
6659
+ d < X - 1 && (a === "form" ? Ve(() => {
6660
+ c(d + 1);
6661
+ }) : c(d + 1));
6666
6662
  }, De = async () => {
6667
- const X = Q[u].id, ae = (await H.getHandler().readObjects({
6663
+ const X = Q[d].id, ae = (await H.getHandler().readObjects({
6668
6664
  model: L,
6669
6665
  ids: [X],
6670
6666
  fields: o.get("form").fields,
@@ -6699,7 +6695,7 @@ const kc = (e) => {
6699
6695
  _c({
6700
6696
  lang: g,
6701
6697
  onOk: () => {
6702
- a === "form" ? Fe() : Ee();
6698
+ a === "form" ? Fe() : Me();
6703
6699
  }
6704
6700
  });
6705
6701
  return;
@@ -6707,7 +6703,7 @@ const kc = (e) => {
6707
6703
  Oc({
6708
6704
  lang: g,
6709
6705
  onOk: () => {
6710
- a === "form" ? Fe() : Ee();
6706
+ a === "form" ? Fe() : Me();
6711
6707
  }
6712
6708
  });
6713
6709
  }, We = async () => {
@@ -6715,8 +6711,8 @@ const kc = (e) => {
6715
6711
  inv_field: X
6716
6712
  } = i;
6717
6713
  let ae;
6718
- X && d && (ae = {
6719
- [X]: d
6714
+ X && u && (ae = {
6715
+ [X]: u
6720
6716
  }), a === "form" ? Ve(() => {
6721
6717
  I(!0), R({
6722
6718
  defaultValues: ae
@@ -6731,19 +6727,19 @@ const kc = (e) => {
6731
6727
  }, Fe = async () => {
6732
6728
  V(!0), _(!1), E(void 0);
6733
6729
  try {
6734
- if (Q[u].id > 0) {
6735
- const X = s.map((ae) => ae.id === Q[u].id ? {
6730
+ if (Q[d].id > 0) {
6731
+ const X = s.map((ae) => ae.id === Q[d].id ? {
6736
6732
  ...ae,
6737
6733
  operation: "pendingRemove"
6738
6734
  } : ae);
6739
6735
  be(X);
6740
6736
  } else
6741
- be(s.filter((X) => X.id !== Q[u].id));
6737
+ be(s.filter((X) => X.id !== Q[d].id));
6742
6738
  } catch (X) {
6743
6739
  E(X);
6744
6740
  }
6745
6741
  c(0), V(!1);
6746
- }, Ee = async () => {
6742
+ }, Me = async () => {
6747
6743
  const X = Q.filter((ae) => F.includes(ae.id));
6748
6744
  V(!0), _(!1), E(void 0);
6749
6745
  try {
@@ -6831,7 +6827,7 @@ const kc = (e) => {
6831
6827
  V(!1);
6832
6828
  }
6833
6829
  };
6834
- function de() {
6830
+ function ue() {
6835
6831
  const X = Ac[a];
6836
6832
  if (a === "graph")
6837
6833
  return Ln(o.get("graph").arch).string;
@@ -6843,19 +6839,19 @@ const kc = (e) => {
6843
6839
  const Xe = () => {
6844
6840
  var ae, Ae, he, ye;
6845
6841
  if (a === "form")
6846
- return Q.length === 0 ? y("noCurrentEntries") : a !== J.current && s.some((xe) => !xe.values) ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ n(Ut, {
6842
+ return Q.length === 0 ? y("noCurrentEntries") : a !== J.current && s.some((xe) => !xe.values) ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ n(Ut, {
6847
6843
  formView: o.get("form"),
6848
- values: (ae = Q[u]) == null ? void 0 : ae.values,
6844
+ values: (ae = Q[d]) == null ? void 0 : ae.values,
6849
6845
  parentContext: {
6850
6846
  ...p == null ? void 0 : p(),
6851
6847
  ...B
6852
6848
  },
6853
6849
  model: L,
6854
- id: (Ae = Q[u]) == null ? void 0 : Ae.id,
6850
+ id: (Ae = Q[d]) == null ? void 0 : Ae.id,
6855
6851
  submitMode: "values",
6856
6852
  onFieldsChange: (xe) => {
6857
6853
  var tt;
6858
- const ke = (tt = Q[u]) == null ? void 0 : tt.id, et = s.map((ut) => ut.id === ke ? {
6854
+ const ke = (tt = Q[d]) == null ? void 0 : tt.id, et = s.map((ut) => ut.id === ke ? {
6859
6855
  ...ut,
6860
6856
  operation: ut.operation === "original" ? "pendingUpdate" : ut.operation,
6861
6857
  values: {
@@ -6872,7 +6868,7 @@ const kc = (e) => {
6872
6868
  readOnly: U
6873
6869
  });
6874
6870
  let X = [];
6875
- if (Q.some((xe) => xe.treeValues) && (X = k ? _t({
6871
+ if (Q.some((xe) => xe.treeValues) && (X = k ? It({
6876
6872
  resultsToSort: Q.map((xe) => xe.treeValues),
6877
6873
  sorter: k,
6878
6874
  fields: {
@@ -6902,7 +6898,7 @@ const kc = (e) => {
6902
6898
  readonly: U
6903
6899
  });
6904
6900
  if (a === "graph") {
6905
- const xe = [[`${i.inv_field}`, "=", d]];
6901
+ const xe = [[`${i.inv_field}`, "=", u]];
6906
6902
  return /* @__PURE__ */ n(gn, {
6907
6903
  view_id: o.get("graph").view_id,
6908
6904
  model: i.relation,
@@ -6923,15 +6919,15 @@ const kc = (e) => {
6923
6919
  banner: !0
6924
6920
  });
6925
6921
  const Ke = M;
6926
- return w ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ P(ne, {
6922
+ return w ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ P(ne, {
6927
6923
  children: [/* @__PURE__ */ n(Vc, {
6928
6924
  mode: a,
6929
- title: de(),
6925
+ title: ue(),
6930
6926
  readOnly: U,
6931
6927
  isMany2Many: Z,
6932
6928
  formHasChanges: O,
6933
6929
  totalItems: Q.length,
6934
- currentItemIndex: u,
6930
+ currentItemIndex: d,
6935
6931
  onDelete: je,
6936
6932
  onCreateItem: We,
6937
6933
  onToggleViewMode: ge,
@@ -6986,10 +6982,10 @@ const kc = (e) => {
6986
6982
  context: a
6987
6983
  } = t;
6988
6984
  let l;
6989
- const [u, c] = T(!0), [f, d] = T(), [m, v] = T(/* @__PURE__ */ new Map()), p = Y(Ne), {
6985
+ const [d, c] = T(!0), [f, u] = T(), [m, v] = T(/* @__PURE__ */ new Map()), p = Y(Ne), {
6990
6986
  getContext: h
6991
6987
  } = p || {};
6992
- St(() => {
6988
+ Ct(() => {
6993
6989
  y();
6994
6990
  }, [t]);
6995
6991
  const g = async (_) => o && o[_] ? o[_] : await H.getHandler().getView({
@@ -7000,7 +6996,7 @@ const kc = (e) => {
7000
6996
  ...a
7001
6997
  }
7002
6998
  }), y = async () => {
7003
- c(!0), d(void 0);
6999
+ c(!0), u(void 0);
7004
7000
  try {
7005
7001
  if (r && r.length > 0) {
7006
7002
  for (const _ of r) {
@@ -7013,12 +7009,12 @@ const kc = (e) => {
7013
7009
  m.set("form", _), m.set("tree", w), v(m);
7014
7010
  }
7015
7011
  } catch (_) {
7016
- d(JSON.stringify(_));
7012
+ u(JSON.stringify(_));
7017
7013
  } finally {
7018
7014
  c(!1);
7019
7015
  }
7020
7016
  };
7021
- return r && r.length > 0 ? l = r[0] : l = "tree", u ? /* @__PURE__ */ n(Me, {}) : f ? /* @__PURE__ */ n(Ze, {
7017
+ return r && r.length > 0 ? l = r[0] : l = "tree", d ? /* @__PURE__ */ n(Le, {}) : f ? /* @__PURE__ */ n(Ze, {
7022
7018
  className: "mt-10",
7023
7019
  message: f,
7024
7020
  type: "error",
@@ -7072,19 +7068,19 @@ const kc = (e) => {
7072
7068
  required: a
7073
7069
  } = t, {
7074
7070
  token: l
7075
- } = Ec(), u = a && !s ? {
7071
+ } = Ec(), d = a && !s ? {
7076
7072
  backgroundColor: l.colorPrimaryBg
7077
- } : void 0, c = ue(), [f, d] = T(), m = Y(Ne), {
7073
+ } : void 0, c = de(), [f, u] = T(), m = Y(Ne), {
7078
7074
  elementHasLostFocus: v
7079
7075
  } = m || {};
7080
7076
  pe(() => {
7081
- d(yo(r));
7077
+ u(yo(r));
7082
7078
  }, [r]);
7083
7079
  const p = (y) => {
7084
7080
  i == null || i(y);
7085
7081
  };
7086
7082
  function h(y) {
7087
- c.current = y.target.value, d(y.target.value);
7083
+ c.current = y.target.value, u(y.target.value);
7088
7084
  }
7089
7085
  async function g() {
7090
7086
  p(kl(f)), await new Promise((y) => setTimeout(y, 300)), v == null || v();
@@ -7093,7 +7089,7 @@ const kc = (e) => {
7093
7089
  value: f,
7094
7090
  disabled: s,
7095
7091
  className: "w-full",
7096
- style: u,
7092
+ style: d,
7097
7093
  id: o,
7098
7094
  placeholder: "00:00",
7099
7095
  onChange: h,
@@ -7164,7 +7160,7 @@ const {
7164
7160
  translatable: a
7165
7161
  } = t, {
7166
7162
  token: l
7167
- } = Hc(), u = o && !i ? {
7163
+ } = Hc(), d = o && !i ? {
7168
7164
  backgroundColor: l.colorPrimaryBg
7169
7165
  } : void 0, c = Y(Ne), {
7170
7166
  elementHasLostFocus: f
@@ -7175,12 +7171,12 @@ const {
7175
7171
  children: a ? /* @__PURE__ */ n(jc, {
7176
7172
  field: r,
7177
7173
  height: s,
7178
- requiredStyle: u
7174
+ requiredStyle: d
7179
7175
  }) : /* @__PURE__ */ n(An, {
7180
7176
  disabled: i || a,
7181
7177
  style: {
7182
7178
  minHeight: s ? s + "px" : "100%",
7183
- ...u
7179
+ ...d
7184
7180
  },
7185
7181
  rows: 4,
7186
7182
  onBlur: f
@@ -7196,10 +7192,10 @@ const {
7196
7192
  const s = Y(Ne), {
7197
7193
  activeId: a,
7198
7194
  activeModel: l,
7199
- fetchValues: u,
7195
+ fetchValues: d,
7200
7196
  formHasChanges: c,
7201
7197
  elementHasLostFocus: f
7202
- } = s || {}, [d, m] = T(!1), {
7198
+ } = s || {}, [u, m] = T(!1), {
7203
7199
  t: v
7204
7200
  } = Y(we);
7205
7201
  return a ? /* @__PURE__ */ P(ne, {
@@ -7209,7 +7205,7 @@ const {
7209
7205
  ct(v("saveBeforeTranslate"));
7210
7206
  return;
7211
7207
  }
7212
- d || m(!0);
7208
+ u || m(!0);
7213
7209
  },
7214
7210
  children: /* @__PURE__ */ n(An, {
7215
7211
  value: e,
@@ -7231,12 +7227,12 @@ const {
7231
7227
  id: a,
7232
7228
  model: l,
7233
7229
  field: t,
7234
- visible: d,
7230
+ visible: u,
7235
7231
  onCloseModal: () => {
7236
7232
  m(!1);
7237
7233
  },
7238
7234
  onSubmitSucceed: () => {
7239
- m(!1), u == null || u();
7235
+ m(!1), d == null || d();
7240
7236
  }
7241
7237
  })]
7242
7238
  }) : /* @__PURE__ */ P(ne, {
@@ -7294,7 +7290,7 @@ const {
7294
7290
  limit: s,
7295
7291
  onClose: a
7296
7292
  }) => {
7297
- const l = ue({}), u = ue(/* @__PURE__ */ new Map()), c = Le(
7293
+ const l = de({}), d = de(/* @__PURE__ */ new Map()), c = $e(
7298
7294
  async (g) => {
7299
7295
  if (g.selectedKeys === void 0 || g.selectedKeys.length === 0) {
7300
7296
  ct(Oe("selectAtLeastOneField", r));
@@ -7316,18 +7312,18 @@ const {
7316
7312
  format: g.exportType
7317
7313
  });
7318
7314
  a(), await new Promise((w) => setTimeout(w, 200));
7319
- const _ = await Vt(O);
7315
+ const _ = await Dt(O);
7320
7316
  mn(O, _.mime);
7321
7317
  },
7322
7318
  [r, e, o, s, t, a]
7323
- ), f = Le(async () => {
7319
+ ), f = $e(async () => {
7324
7320
  const g = await H.getHandler().getFields({
7325
7321
  model: e,
7326
7322
  context: t,
7327
7323
  fields: []
7328
7324
  });
7329
7325
  return l.current["/"] = g, Ir({ fields: g });
7330
- }, [e, t, l]), d = Le(
7326
+ }, [e, t, l]), u = $e(
7331
7327
  async (g) => {
7332
7328
  const O = kn(g, l.current)[Rn(g)], _ = O.relation, w = await H.getHandler().getFields({
7333
7329
  model: _,
@@ -7345,11 +7341,11 @@ const {
7345
7341
  });
7346
7342
  },
7347
7343
  [l.current, e, t]
7348
- ), m = Le(async () => {
7344
+ ), m = $e(async () => {
7349
7345
  const g = await Gc({ model: e, context: t }), y = await zc({
7350
7346
  predefinedExports: g,
7351
7347
  fields: l.current,
7352
- onGetFieldChilds: d
7348
+ onGetFieldChilds: u
7353
7349
  });
7354
7350
  return {
7355
7351
  predefinedExports: g.map((_) => ({
@@ -7364,7 +7360,7 @@ const {
7364
7360
  })),
7365
7361
  keysWithChilds: y
7366
7362
  };
7367
- }, [l.current]), v = Le(
7363
+ }, [l.current]), v = $e(
7368
7364
  async (g) => {
7369
7365
  const y = await h("ir.exports"), O = await h("ir.exports.line"), _ = await H.getHandler().create({
7370
7366
  model: "ir.exports",
@@ -7388,7 +7384,7 @@ const {
7388
7384
  ), { ...g, id: _ };
7389
7385
  },
7390
7386
  []
7391
- ), p = Le(
7387
+ ), p = $e(
7392
7388
  async (g) => {
7393
7389
  await H.getHandler().delete({
7394
7390
  model: "ir.exports",
@@ -7396,22 +7392,22 @@ const {
7396
7392
  });
7397
7393
  },
7398
7394
  []
7399
- ), h = Le(
7395
+ ), h = $e(
7400
7396
  async (g) => {
7401
- if (u.current.has(g))
7402
- return u.current.get(g);
7397
+ if (d.current.has(g))
7398
+ return d.current.get(g);
7403
7399
  const y = H.getHandler().getFields({
7404
7400
  model: g,
7405
7401
  context: t,
7406
7402
  fields: []
7407
7403
  });
7408
- u.current.set(g, y);
7404
+ d.current.set(g, y);
7409
7405
  },
7410
- [u, t]
7406
+ [d, t]
7411
7407
  );
7412
7408
  return {
7413
7409
  onGetFields: f,
7414
- onGetFieldChilds: d,
7410
+ onGetFieldChilds: u,
7415
7411
  onExport: c,
7416
7412
  onGetPredefinedExports: m,
7417
7413
  onSavePredefinedExport: v,
@@ -7464,7 +7460,7 @@ const {
7464
7460
  id: s.id,
7465
7461
  name: s.name,
7466
7462
  fields: s.export_fields.map((a) => ({
7467
- key: o.find((u) => u.id === a).name
7463
+ key: o.find((d) => d.id === a).name
7468
7464
  }))
7469
7465
  }));
7470
7466
  }, qc = ({
@@ -7527,11 +7523,11 @@ const {
7527
7523
  context: s,
7528
7524
  selectedRegistersToExport: a,
7529
7525
  totalRegisters: l,
7530
- domain: u,
7526
+ domain: d,
7531
7527
  limit: c,
7532
7528
  visibleRegisters: f
7533
7529
  } = e, {
7534
- onExport: d,
7530
+ onExport: u,
7535
7531
  onGetFieldChilds: m,
7536
7532
  onGetFields: v,
7537
7533
  onGetPredefinedExports: p,
@@ -7540,7 +7536,7 @@ const {
7540
7536
  } = Yc({
7541
7537
  model: o,
7542
7538
  context: s,
7543
- domain: u,
7539
+ domain: d,
7544
7540
  limit: c,
7545
7541
  selectedRegistersToExport: a,
7546
7542
  onClose: i,
@@ -7549,7 +7545,7 @@ const {
7549
7545
  return /* @__PURE__ */ n(Li, {
7550
7546
  visible: t,
7551
7547
  locale: r,
7552
- onSucceed: d,
7548
+ onSucceed: u,
7553
7549
  onCancel: i,
7554
7550
  selectedRegistersToExport: a && a.length && a.length > 0 ? a.length : void 0,
7555
7551
  totalRegisters: l,
@@ -7581,7 +7577,7 @@ var Ro = { exports: {} };
7581
7577
  (function(r, i) {
7582
7578
  e.exports = i();
7583
7579
  })(mt, function() {
7584
- var r = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, i = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, o = /\d\d/, s = /\d\d?/, a = /\d*[^-_:/,()\s\d]+/, l = {}, u = function(h) {
7580
+ var r = { LTS: "h:mm:ss A", LT: "h:mm A", L: "MM/DD/YYYY", LL: "MMMM D, YYYY", LLL: "MMMM D, YYYY h:mm A", LLLL: "dddd, MMMM D, YYYY h:mm A" }, i = /(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g, o = /\d\d/, s = /\d\d?/, a = /\d*[^-_:/,()\s\d]+/, l = {}, d = function(h) {
7585
7581
  return (h = +h) + (h > 68 ? 1900 : 2e3);
7586
7582
  }, c = function(h) {
7587
7583
  return function(g) {
@@ -7594,7 +7590,7 @@ var Ro = { exports: {} };
7594
7590
  var y = g.match(/([+-]|\d\d)/g), O = 60 * y[1] + (+y[2] || 0);
7595
7591
  return O === 0 ? 0 : y[0] === "+" ? -O : O;
7596
7592
  }(h);
7597
- }], d = function(h) {
7593
+ }], u = function(h) {
7598
7594
  var g = l[h];
7599
7595
  return g && (g.indexOf ? g : g.s.concat(g.f));
7600
7596
  }, m = function(h, g) {
@@ -7624,19 +7620,19 @@ var Ro = { exports: {} };
7624
7620
  for (var O = 1; O <= 31; O += 1)
7625
7621
  g(O).replace(/\[|\]/g, "") === h && (this.day = O);
7626
7622
  }], M: [s, c("month")], MM: [o, c("month")], MMM: [a, function(h) {
7627
- var g = d("months"), y = (d("monthsShort") || g.map(function(O) {
7623
+ var g = u("months"), y = (u("monthsShort") || g.map(function(O) {
7628
7624
  return O.slice(0, 3);
7629
7625
  })).indexOf(h) + 1;
7630
7626
  if (y < 1)
7631
7627
  throw new Error();
7632
7628
  this.month = y % 12 || y;
7633
7629
  }], MMMM: [a, function(h) {
7634
- var g = d("months").indexOf(h) + 1;
7630
+ var g = u("months").indexOf(h) + 1;
7635
7631
  if (g < 1)
7636
7632
  throw new Error();
7637
7633
  this.month = g % 12 || g;
7638
7634
  }], Y: [/[+-]?\d+/, c("year")], YY: [o, function(h) {
7639
- this.year = u(h);
7635
+ this.year = d(h);
7640
7636
  }], YYYY: [/\d{4}/, c("year")], Z: f, ZZ: f };
7641
7637
  function p(h) {
7642
7638
  var g, y;
@@ -7670,7 +7666,7 @@ var Ro = { exports: {} };
7670
7666
  };
7671
7667
  }
7672
7668
  return function(h, g, y) {
7673
- y.p.customParseFormat = !0, h && h.parseTwoDigitYear && (u = h.parseTwoDigitYear);
7669
+ y.p.customParseFormat = !0, h && h.parseTwoDigitYear && (d = h.parseTwoDigitYear);
7674
7670
  var O = g.prototype, _ = O.parse;
7675
7671
  O.parse = function(w) {
7676
7672
  var V = w.date, D = w.utc, E = w.args;
@@ -7684,8 +7680,8 @@ var Ro = { exports: {} };
7684
7680
  return new Date((I === "X" ? 1e3 : 1) * M);
7685
7681
  var k = p(I)(M), j = k.year, q = k.month, W = k.day, z = k.hours, U = k.minutes, L = k.seconds, B = k.milliseconds, ee = k.zone, Z = new Date(), ie = W || (j || q ? 1 : Z.getDate()), Q = j || Z.getFullYear(), J = 0;
7686
7682
  j && !q || (J = q > 0 ? q - 1 : Z.getMonth());
7687
- var fe = z || 0, be = U || 0, $e = L || 0, _e = B || 0;
7688
- return ee ? new Date(Date.UTC(Q, J, ie, fe, be, $e, _e + 60 * ee.offset * 1e3)) : N ? new Date(Date.UTC(Q, J, ie, fe, be, $e, _e)) : new Date(Q, J, ie, fe, be, $e, _e);
7683
+ var fe = z || 0, be = U || 0, Ee = L || 0, _e = B || 0;
7684
+ return ee ? new Date(Date.UTC(Q, J, ie, fe, be, Ee, _e + 60 * ee.offset * 1e3)) : N ? new Date(Date.UTC(Q, J, ie, fe, be, Ee, _e)) : new Date(Q, J, ie, fe, be, Ee, _e);
7689
7685
  } catch {
7690
7686
  return new Date("");
7691
7687
  }
@@ -7745,14 +7741,14 @@ const nd = (e) => {
7745
7741
  required: o,
7746
7742
  selectionValues: s,
7747
7743
  readOnly: a
7748
- } = i, l = t == null ? void 0 : t.split(","), [u, c] = T([]), [f, d] = T();
7744
+ } = i, l = t == null ? void 0 : t.split(","), [d, c] = T([]), [f, u] = T();
7749
7745
  return pe(() => {
7750
7746
  if (!t) {
7751
- d(void 0), c([]);
7747
+ u(void 0), c([]);
7752
7748
  return;
7753
7749
  }
7754
7750
  const m = t && l && l[0], v = t && l && l[1] && parseInt(l[1]);
7755
- c([v, void 0]), d(m);
7751
+ c([v, void 0]), u(m);
7756
7752
  }, [t]), /* @__PURE__ */ P(Ce, {
7757
7753
  gutter: 8,
7758
7754
  wrap: !1,
@@ -7766,8 +7762,8 @@ const nd = (e) => {
7766
7762
  required: o
7767
7763
  }),
7768
7764
  onChange: (m) => {
7769
- d(m);
7770
- let v = u[0] || 0;
7765
+ u(m);
7766
+ let v = d[0] || 0;
7771
7767
  m !== f && (c([]), v = 0);
7772
7768
  const p = `${m},${v}`;
7773
7769
  p !== t && (r == null || r(p));
@@ -7783,7 +7779,7 @@ const nd = (e) => {
7783
7779
  readonly: a,
7784
7780
  required: o
7785
7781
  }),
7786
- value: u,
7782
+ value: d,
7787
7783
  onChange: (m) => {
7788
7784
  c(m);
7789
7785
  const v = `${f},${m[0] || 0}`;
@@ -7818,22 +7814,22 @@ const nd = (e) => {
7818
7814
  filenameField: a
7819
7815
  } = t, {
7820
7816
  token: l
7821
- } = sd(), u = s && !o ? {
7817
+ } = sd(), d = s && !o ? {
7822
7818
  backgroundColor: l.colorPrimaryBg
7823
- } : void 0, c = ue(null), {
7819
+ } : void 0, c = de(null), {
7824
7820
  setFieldValue: f,
7825
- getFieldValue: d
7821
+ getFieldValue: u
7826
7822
  } = Y(Ne) || {}, {
7827
7823
  t: m
7828
7824
  } = Y(we), v = r ? ba(r) : "", p = (_) => {
7829
7825
  i == null || i(_);
7830
7826
  };
7831
7827
  async function h() {
7832
- const _ = await Vt(r), w = `data:${_ == null ? void 0 : _.mime};base64,${r}`, V = document.createElement("a"), D = d(a), E = d("name");
7828
+ const _ = await Dt(r), w = `data:${_ == null ? void 0 : _.mime};base64,${r}`, V = document.createElement("a"), D = u(a), E = u("name");
7833
7829
  V.href = w, V.download = D || E, V.click();
7834
7830
  }
7835
7831
  async function g() {
7836
- const _ = await Vt(r);
7832
+ const _ = await Dt(r);
7837
7833
  mn(r, _.mime);
7838
7834
  }
7839
7835
  async function y(_) {
@@ -7861,7 +7857,7 @@ const nd = (e) => {
7861
7857
  }), /* @__PURE__ */ n(nt, {
7862
7858
  type: "text",
7863
7859
  disabled: !0,
7864
- style: u,
7860
+ style: d,
7865
7861
  value: v
7866
7862
  })]
7867
7863
  }), /* @__PURE__ */ n(le, {
@@ -7911,7 +7907,7 @@ function Zn(e) {
7911
7907
  previousView: a
7912
7908
  } = e, {
7913
7909
  t: l,
7914
- lang: u
7910
+ lang: d
7915
7911
  } = Y(we);
7916
7912
  function c() {
7917
7913
  const m = r.map((v, p) => /* @__PURE__ */ n(He.Item, {
@@ -7931,7 +7927,7 @@ function Zn(e) {
7931
7927
  children: v.type.charAt(0).toUpperCase() + v.type.slice(1)
7932
7928
  }), /* @__PURE__ */ n(le, {
7933
7929
  flex: "none",
7934
- children: /* @__PURE__ */ n(kt, {
7930
+ children: /* @__PURE__ */ n(Rt, {
7935
7931
  style: {
7936
7932
  opacity: t.view_id === v.view_id ? 1 : 0
7937
7933
  }
@@ -7940,7 +7936,7 @@ function Zn(e) {
7940
7936
  })
7941
7937
  }, v.view_id || p));
7942
7938
  return /* @__PURE__ */ n(He, {
7943
- onClick: d,
7939
+ onClick: u,
7944
7940
  children: /* @__PURE__ */ n(He.ItemGroup, {
7945
7941
  title: l("viewAs"),
7946
7942
  children: m
@@ -7950,7 +7946,7 @@ function Zn(e) {
7950
7946
  function f(m) {
7951
7947
  if (s) {
7952
7948
  Wt({
7953
- lang: u,
7949
+ lang: d,
7954
7950
  onOk: () => {
7955
7951
  m();
7956
7952
  }
@@ -7959,7 +7955,7 @@ function Zn(e) {
7959
7955
  }
7960
7956
  m();
7961
7957
  }
7962
- function d(m) {
7958
+ function u(m) {
7963
7959
  f(() => {
7964
7960
  const v = r.find((p) => p.view_id === parseInt(m.key));
7965
7961
  i(v);
@@ -7978,7 +7974,7 @@ function Zn(e) {
7978
7974
  borderBottomRightRadius: 0
7979
7975
  },
7980
7976
  onClick: () => {
7981
- d({
7977
+ u({
7982
7978
  key: a == null ? void 0 : a.view_id
7983
7979
  });
7984
7980
  },
@@ -7992,7 +7988,7 @@ function Zn(e) {
7992
7988
  borderTopLeftRadius: 0,
7993
7989
  borderBottomLeftRadius: 0
7994
7990
  },
7995
- icon: /* @__PURE__ */ n(Rt, {
7991
+ icon: /* @__PURE__ */ n(At, {
7996
7992
  style: {
7997
7993
  fontSize: "0.5em"
7998
7994
  }
@@ -8002,7 +7998,7 @@ function Zn(e) {
8002
7998
  })]
8003
7999
  });
8004
8000
  }
8005
- function Dt(e) {
8001
+ function _t(e) {
8006
8002
  const {
8007
8003
  icon: t,
8008
8004
  tooltip: r,
@@ -8012,26 +8008,26 @@ function Dt(e) {
8012
8008
  disabled: a = !1
8013
8009
  } = e;
8014
8010
  function l() {
8015
- const c = i == null ? void 0 : i.map((f, d) => f.name === "divider" ? /* @__PURE__ */ n(He.Divider, {}, "divider" + d) : /* @__PURE__ */ n(He.Item, {
8011
+ const c = i == null ? void 0 : i.map((f, u) => f.name === "divider" ? /* @__PURE__ */ n(He.Divider, {}, "divider" + u) : /* @__PURE__ */ n(He.Item, {
8016
8012
  children: f.name
8017
8013
  }, f.id));
8018
8014
  return /* @__PURE__ */ n(He, {
8019
- onClick: u,
8015
+ onClick: d,
8020
8016
  children: /* @__PURE__ */ n(He.ItemGroup, {
8021
8017
  title: r,
8022
8018
  children: c
8023
8019
  })
8024
8020
  });
8025
8021
  }
8026
- function u(c) {
8027
- const f = i.find((d) => isNaN(c.key) ? d.id === c.key : d.id === parseInt(c.key));
8022
+ function d(c) {
8023
+ const f = i.find((u) => isNaN(c.key) ? u.id === c.key : u.id === parseInt(c.key));
8028
8024
  o(f);
8029
8025
  }
8030
8026
  return /* @__PURE__ */ n(Bt, {
8031
8027
  overlay: l(),
8032
8028
  disabled: a || !i || i.length === 0,
8033
8029
  children: /* @__PURE__ */ P(Ie, {
8034
- children: [t, " ", s, " ", /* @__PURE__ */ n(Rt, {})]
8030
+ children: [t, " ", s, " ", /* @__PURE__ */ n(At, {})]
8035
8031
  })
8036
8032
  });
8037
8033
  }
@@ -8108,10 +8104,10 @@ async function Mo(e, t, r) {
8108
8104
  create_uid: s,
8109
8105
  id: a,
8110
8106
  write_date: l,
8111
- write_uid: u
8107
+ write_uid: d
8112
8108
  } = i;
8113
8109
  ct(/* @__PURE__ */ P("div", {
8114
- children: ["ID: " + a, " ", /* @__PURE__ */ n("br", {}), r("createdBy") + ": " + s[1], " ", /* @__PURE__ */ n("br", {}), r("creationDate") + ": " + o, " ", /* @__PURE__ */ n("br", {}), r("lastUpdatedBy") + ": " + u[1], " ", /* @__PURE__ */ n("br", {}), r("lastUpdatedDate") + ": " + l]
8110
+ children: ["ID: " + a, " ", /* @__PURE__ */ n("br", {}), r("createdBy") + ": " + s[1], " ", /* @__PURE__ */ n("br", {}), r("creationDate") + ": " + o, " ", /* @__PURE__ */ n("br", {}), r("lastUpdatedBy") + ": " + d[1], " ", /* @__PURE__ */ n("br", {}), r("lastUpdatedDate") + ": " + l]
8115
8111
  }));
8116
8112
  }
8117
8113
  const ud = (e) => {
@@ -8123,14 +8119,14 @@ const ud = (e) => {
8123
8119
  lang: o
8124
8120
  } = Y(we), [s, a] = T(!1), l = /* @__PURE__ */ P(Ie, {
8125
8121
  disabled: r,
8126
- children: [/* @__PURE__ */ n(Ur, {}), `(${t})`, /* @__PURE__ */ n(Rt, {
8122
+ children: [/* @__PURE__ */ n(Ur, {}), `(${t})`, /* @__PURE__ */ n(At, {
8127
8123
  style: {
8128
8124
  fontSize: 12
8129
8125
  }
8130
8126
  })]
8131
8127
  });
8132
8128
  return r ? l : /* @__PURE__ */ n(si, {
8133
- onVisibleChange: (u) => a(u),
8129
+ onVisibleChange: (d) => a(d),
8134
8130
  visible: s,
8135
8131
  placement: "bottom",
8136
8132
  content: fd(e, a, o),
@@ -8145,9 +8141,9 @@ const ud = (e) => {
8145
8141
  onAddNewAttachment: s,
8146
8142
  onopenAttachmentLink: a,
8147
8143
  onOpenAttachmentDetail: l,
8148
- onListAllAttachments: u
8144
+ onListAllAttachments: d
8149
8145
  } = e;
8150
- return o ? /* @__PURE__ */ n(Me, {
8146
+ return o ? /* @__PURE__ */ n(Le, {
8151
8147
  style: {
8152
8148
  padding: 20
8153
8149
  }
@@ -8159,7 +8155,7 @@ const ud = (e) => {
8159
8155
  },
8160
8156
  href: "#",
8161
8157
  onClick: () => {
8162
- t(!1), u();
8158
+ t(!1), d();
8163
8159
  },
8164
8160
  children: [/* @__PURE__ */ n(Wn, {}), " ", Oe("listAllAttachments", r)]
8165
8161
  }), /* @__PURE__ */ P("a", {
@@ -8233,10 +8229,10 @@ function md(e) {
8233
8229
  onViewAttachmentDetails: s
8234
8230
  } = e, {
8235
8231
  formRef: a
8236
- } = Y(Qe), [l, u] = T(!1), [c, f] = T([]), [d, m] = T(!1), {
8232
+ } = Y(Qe), [l, d] = T(!1), [c, f] = T([]), [u, m] = T(!1), {
8237
8233
  t: v
8238
- } = Y(we), p = Le(async () => {
8239
- u(!0);
8234
+ } = Y(we), p = $e(async () => {
8235
+ d(!0);
8240
8236
  try {
8241
8237
  const y = await H.getHandler().readObjects({
8242
8238
  model: "ir.attachment",
@@ -8253,8 +8249,8 @@ function md(e) {
8253
8249
  } catch (y) {
8254
8250
  Ue(y);
8255
8251
  }
8256
- u(!1);
8257
- }, t), h = Le(async (y) => {
8252
+ d(!1);
8253
+ }, t), h = $e(async (y) => {
8258
8254
  if (y.link) {
8259
8255
  window.open(y.link);
8260
8256
  return;
@@ -8272,11 +8268,11 @@ function md(e) {
8272
8268
  }
8273
8269
  if (m(!1), !!O)
8274
8270
  if (O.datas) {
8275
- const _ = await Vt(O.datas);
8271
+ const _ = await Dt(O.datas);
8276
8272
  mn(O.datas, _.mime);
8277
8273
  } else
8278
8274
  s(O);
8279
- }, []), g = Le(async (y) => {
8275
+ }, []), g = $e(async (y) => {
8280
8276
  s(y);
8281
8277
  }, []);
8282
8278
  return pe(() => {
@@ -8293,12 +8289,12 @@ function md(e) {
8293
8289
  onOpenAttachmentDetail: g
8294
8290
  }), /* @__PURE__ */ n(Ge, {
8295
8291
  title: v("downloadingAttachment"),
8296
- open: d,
8292
+ open: u,
8297
8293
  footer: null,
8298
8294
  closable: !1,
8299
8295
  centered: !0,
8300
8296
  maskClosable: !1,
8301
- children: /* @__PURE__ */ n(Me, {})
8297
+ children: /* @__PURE__ */ n(Le, {})
8302
8298
  })]
8303
8299
  });
8304
8300
  }
@@ -8313,10 +8309,10 @@ function hd({
8313
8309
  formHasChanges: s,
8314
8310
  formIsSaving: a,
8315
8311
  currentId: l,
8316
- results: u,
8312
+ results: d,
8317
8313
  setCurrentItemIndex: c,
8318
8314
  currentItemIndex: f,
8319
- setCurrentId: d,
8315
+ setCurrentId: u,
8320
8316
  currentModel: m,
8321
8317
  setRemovingItem: v,
8322
8318
  removingItem: p,
@@ -8333,7 +8329,7 @@ function hd({
8333
8329
  } = Y(Qe), {
8334
8330
  t: C,
8335
8331
  lang: S
8336
- } = Y(we), x = Y(Et), {
8332
+ } = Y(we), x = Y(Mt), {
8337
8333
  processAction: $
8338
8334
  } = x || {}, R = Y(st), {
8339
8335
  openRelate: F,
@@ -8364,10 +8360,10 @@ function hd({
8364
8360
  L();
8365
8361
  }
8366
8362
  function N() {
8367
- u && u.length > f + 1 ? (c == null || c(f + 1), d == null || d(u[f + 1].id)) : u && f + 1 === u.length && (c == null || c(0), d == null || d(u[0].id));
8363
+ d && d.length > f + 1 ? (c == null || c(f + 1), u == null || u(d[f + 1].id)) : d && f + 1 === d.length && (c == null || c(0), u == null || u(d[0].id));
8368
8364
  }
8369
8365
  function k() {
8370
- u && f > 0 ? (c == null || c(f - 1), d == null || d(u[f - 1].id)) : u && f === 0 && (c == null || c(u.length - 1), d == null || d(u[u.length - 1].id));
8366
+ d && f > 0 ? (c == null || c(f - 1), u == null || u(d[f - 1].id)) : d && f === 0 && (c == null || c(d.length - 1), u == null || u(d[d.length - 1].id));
8371
8367
  }
8372
8368
  function j() {
8373
8369
  Yt({
@@ -8384,10 +8380,10 @@ function hd({
8384
8380
  model: m,
8385
8381
  ids: [l]
8386
8382
  });
8387
- const L = u == null ? void 0 : u.filter((ee) => ee.id !== l);
8383
+ const L = d == null ? void 0 : d.filter((ee) => ee.id !== l);
8388
8384
  y == null || y(L);
8389
8385
  let B = 0;
8390
- f > 0 && f <= u.length - 1 && (B = f - 1), L != null && L[B] ? (d == null || d(L == null ? void 0 : L[B].id), c == null || c(B)) : (d == null || d(void 0), c == null || c(void 0));
8386
+ f > 0 && f <= d.length - 1 && (B = f - 1), L != null && L[B] ? (u == null || u(L == null ? void 0 : L[B].id), c == null || c(B)) : (u == null || u(void 0), c == null || c(void 0));
8391
8387
  } catch (L) {
8392
8388
  nn(JSON.stringify(L));
8393
8389
  } finally {
@@ -8424,7 +8420,7 @@ function hd({
8424
8420
  return r ? /* @__PURE__ */ P(Ye, {
8425
8421
  wrap: !0,
8426
8422
  children: [O && /* @__PURE__ */ P(ne, {
8427
- children: [/* @__PURE__ */ n(Me, {}), Tt(), Tt()]
8423
+ children: [/* @__PURE__ */ n(Le, {}), St(), St()]
8428
8424
  }), /* @__PURE__ */ n(ko, {
8429
8425
  disabled: a || O || p || h
8430
8426
  }), /* @__PURE__ */ n(qe, {
@@ -8445,7 +8441,7 @@ function hd({
8445
8441
  disabled: a || l === void 0 || p || h || O,
8446
8442
  loading: p,
8447
8443
  onClick: j
8448
- }), Tt(), /* @__PURE__ */ n(qe, {
8444
+ }), St(), /* @__PURE__ */ n(qe, {
8449
8445
  icon: /* @__PURE__ */ n(Gr, {}),
8450
8446
  tooltip: C("showLogs"),
8451
8447
  disabled: a || l === void 0 || p || h || O,
@@ -8463,7 +8459,7 @@ function hd({
8463
8459
  w.current.fetchValues();
8464
8460
  });
8465
8461
  }
8466
- }), Tt(), /* @__PURE__ */ n(Zn, {
8462
+ }), St(), /* @__PURE__ */ n(Zn, {
8467
8463
  currentView: r,
8468
8464
  previousView: D,
8469
8465
  availableViews: t,
@@ -8472,7 +8468,7 @@ function hd({
8472
8468
  },
8473
8469
  disabled: z,
8474
8470
  formHasChanges: s
8475
- }), Tt(), /* @__PURE__ */ P(Ye, {
8471
+ }), St(), /* @__PURE__ */ P(Ye, {
8476
8472
  children: [/* @__PURE__ */ n(qe, {
8477
8473
  icon: /* @__PURE__ */ n(Yr, {}),
8478
8474
  tooltip: C("previous"),
@@ -8490,17 +8486,17 @@ function hd({
8490
8486
  I(N);
8491
8487
  }
8492
8488
  })]
8493
- }), Tt(), /* @__PURE__ */ n(Dt, {
8489
+ }), St(), /* @__PURE__ */ n(_t, {
8494
8490
  icon: /* @__PURE__ */ n(jn, {}),
8495
8491
  disabled: z,
8496
8492
  tooltip: C("actions"),
8497
8493
  items: e == null ? void 0 : e.action,
8498
8494
  onItemClick: async (L) => {
8499
- !L || !(await Ft({
8495
+ !L || !(await Tt({
8500
8496
  onFormSave: o
8501
8497
  })).succeed || U(L);
8502
8498
  }
8503
- }), /* @__PURE__ */ n(Dt, {
8499
+ }), /* @__PURE__ */ n(_t, {
8504
8500
  icon: /* @__PURE__ */ n(Kn, {}),
8505
8501
  disabled: z,
8506
8502
  tooltip: C("reports"),
@@ -8508,7 +8504,7 @@ function hd({
8508
8504
  onItemClick: async (L) => {
8509
8505
  if (!L)
8510
8506
  return;
8511
- const B = await Ft({
8507
+ const B = await Tt({
8512
8508
  onFormSave: o
8513
8509
  });
8514
8510
  !B.succeed || U({
@@ -8519,13 +8515,13 @@ function hd({
8519
8515
  }
8520
8516
  });
8521
8517
  }
8522
- }), /* @__PURE__ */ n(Dt, {
8518
+ }), /* @__PURE__ */ n(_t, {
8523
8519
  icon: /* @__PURE__ */ n(Kr, {}),
8524
8520
  disabled: z,
8525
8521
  tooltip: C("related"),
8526
8522
  items: e == null ? void 0 : e.relate,
8527
8523
  onItemClick: async (L) => {
8528
- !L || !(await Ft({
8524
+ !L || !(await Tt({
8529
8525
  onFormSave: o
8530
8526
  })).succeed || F({
8531
8527
  relateData: L,
@@ -8539,7 +8535,7 @@ function hd({
8539
8535
  disabled: z,
8540
8536
  attachments: _,
8541
8537
  onAddNewAttachment: async () => {
8542
- const L = await Ft({
8538
+ const L = await Tt({
8543
8539
  onFormSave: o
8544
8540
  });
8545
8541
  if (!L.succeed)
@@ -8558,7 +8554,7 @@ function hd({
8558
8554
  });
8559
8555
  },
8560
8556
  onListAllAttachments: async () => {
8561
- const L = await Ft({
8557
+ const L = await Tt({
8562
8558
  onFormSave: o
8563
8559
  });
8564
8560
  if (!L.succeed)
@@ -8571,7 +8567,7 @@ function hd({
8571
8567
  });
8572
8568
  },
8573
8569
  onViewAttachmentDetails: async (L) => {
8574
- !(await Ft({
8570
+ !(await Tt({
8575
8571
  onFormSave: o
8576
8572
  })).succeed || A({
8577
8573
  model: "ir.attachment",
@@ -8582,12 +8578,12 @@ function hd({
8582
8578
  })]
8583
8579
  }) : null;
8584
8580
  }
8585
- function Tt() {
8581
+ function St() {
8586
8582
  return /* @__PURE__ */ n("div", {
8587
8583
  className: "inline-block w-2"
8588
8584
  });
8589
8585
  }
8590
- async function Ft({
8586
+ async function Tt({
8591
8587
  onFormSave: e
8592
8588
  }) {
8593
8589
  const t = await (e == null ? void 0 : e());
@@ -8611,14 +8607,14 @@ const {
8611
8607
  } = e, {
8612
8608
  id: a,
8613
8609
  readOnly: l,
8614
- required: u
8610
+ required: d
8615
8611
  } = t, {
8616
8612
  token: c
8617
- } = pd(), f = u && !l ? {
8613
+ } = pd(), f = d && !l ? {
8618
8614
  backgroundColor: c.colorPrimaryBg
8619
- } : void 0, d = Y(Ne), {
8615
+ } : void 0, u = Y(Ne), {
8620
8616
  elementHasLostFocus: m
8621
- } = d || {}, [v, p] = T(!1), [h, g] = T(!1);
8617
+ } = u || {}, [v, p] = T(!1), [h, g] = T(!1);
8622
8618
  pe(() => {
8623
8619
  l && !v && g(!1), !r && !l && (p(!0), g(!0));
8624
8620
  }, [v, l]);
@@ -8632,7 +8628,7 @@ const {
8632
8628
  children: [l ? null : /* @__PURE__ */ n(le, {
8633
8629
  flex: "32px",
8634
8630
  children: v ? /* @__PURE__ */ n(Ie, {
8635
- icon: /* @__PURE__ */ n(kt, {}),
8631
+ icon: /* @__PURE__ */ n(Rt, {}),
8636
8632
  onClick: () => {
8637
8633
  o(r) && (p(!1), g(!1));
8638
8634
  },
@@ -8714,9 +8710,9 @@ const {
8714
8710
  isSearching: o
8715
8711
  } = e, {
8716
8712
  t: s
8717
- } = Y(we);
8718
- function a(l) {
8719
- r(l.id);
8713
+ } = Y(we), a = de();
8714
+ function l(d) {
8715
+ r(d.id);
8720
8716
  }
8721
8717
  return /* @__PURE__ */ n(Ge, {
8722
8718
  title: s("goToResourceId"),
@@ -8726,9 +8722,13 @@ const {
8726
8722
  destroyOnClose: !0,
8727
8723
  onCancel: i,
8728
8724
  maskClosable: !1,
8725
+ afterOpenChange: (d) => {
8726
+ var c;
8727
+ return d && ((c = a.current) == null ? void 0 : c.focus());
8728
+ },
8729
8729
  children: /* @__PURE__ */ P(ot, {
8730
8730
  layout: "vertical",
8731
- onFinish: a,
8731
+ onFinish: l,
8732
8732
  autoComplete: "off",
8733
8733
  children: [/* @__PURE__ */ n(ot.Item, {
8734
8734
  name: "id",
@@ -8741,7 +8741,8 @@ const {
8741
8741
  style: {
8742
8742
  width: "100%"
8743
8743
  },
8744
- autoFocus: !0
8744
+ autoFocus: !0,
8745
+ ref: a
8745
8746
  })
8746
8747
  }), /* @__PURE__ */ n(Ce, {
8747
8748
  align: "middle",
@@ -8759,7 +8760,7 @@ const {
8759
8760
  style: {
8760
8761
  marginLeft: 15
8761
8762
  },
8762
- icon: /* @__PURE__ */ n(kt, {}),
8763
+ icon: /* @__PURE__ */ n(Rt, {}),
8763
8764
  htmlType: "submit",
8764
8765
  type: "primary",
8765
8766
  disabled: o,
@@ -8825,7 +8826,7 @@ function bd({
8825
8826
  searchParams: s,
8826
8827
  searchVisible: a,
8827
8828
  setSearchVisible: l,
8828
- graphIsLoading: u,
8829
+ graphIsLoading: d,
8829
8830
  previousView: c,
8830
8831
  setPreviousView: f
8831
8832
  } = Y(Qe);
@@ -8842,12 +8843,12 @@ function bd({
8842
8843
  onClick: () => {
8843
8844
  l == null || l(!a);
8844
8845
  },
8845
- disabled: u,
8846
+ disabled: d,
8846
8847
  badgeNumber: s == null ? void 0 : s.length
8847
8848
  }), /* @__PURE__ */ n(qe, {
8848
8849
  icon: /* @__PURE__ */ n(dn, {}),
8849
8850
  tooltip: t("refresh"),
8850
- disabled: u,
8851
+ disabled: d,
8851
8852
  loading: !1,
8852
8853
  onClick: () => {
8853
8854
  e();
@@ -8855,8 +8856,8 @@ function bd({
8855
8856
  }), /* @__PURE__ */ n(Zn, {
8856
8857
  currentView: i,
8857
8858
  availableViews: r,
8858
- onChangeView: (d) => {
8859
- f == null || f(i), o == null || o(d);
8859
+ onChangeView: (u) => {
8860
+ f == null || f(i), o == null || o(u);
8860
8861
  },
8861
8862
  disabled: !1,
8862
8863
  previousView: c
@@ -8879,16 +8880,16 @@ function yn(e) {
8879
8880
  currentId: s,
8880
8881
  currentItemIndex: a,
8881
8882
  results: l,
8882
- totalItems: u,
8883
+ totalItems: d,
8883
8884
  selectedRowItems: c
8884
8885
  } = Y(Qe), {
8885
8886
  t: f
8886
8887
  } = Y(we), {
8887
- token: d
8888
+ token: u
8888
8889
  } = xd();
8889
8890
  function m() {
8890
8891
  if ((o == null ? void 0 : o.type) === "form")
8891
- return s ? u === 0 ? /* @__PURE__ */ P(ne, {
8892
+ return s ? d === 0 ? /* @__PURE__ */ P(ne, {
8892
8893
  children: [f("editingDocument"), " (id:", " ", /* @__PURE__ */ n(Xt, {
8893
8894
  copyable: {
8894
8895
  icon: /* @__PURE__ */ n(Un, {
@@ -8900,7 +8901,7 @@ function yn(e) {
8900
8901
  children: s
8901
8902
  }), ")"]
8902
8903
  }) : /* @__PURE__ */ P(ne, {
8903
- children: [f("register"), " ", a === void 0 ? 1 : a + 1, " /", " ", l.length, " ", f("of"), " ", u, " - ", f("editingDocument"), " (id:", " ", /* @__PURE__ */ n(Xt, {
8904
+ children: [f("register"), " ", a === void 0 ? 1 : a + 1, " /", " ", l.length, " ", f("of"), " ", d, " - ", f("editingDocument"), " (id:", " ", /* @__PURE__ */ n(Xt, {
8904
8905
  copyable: !0,
8905
8906
  children: s
8906
8907
  }), ")"]
@@ -8934,8 +8935,8 @@ function yn(e) {
8934
8935
  className: "shadow-md",
8935
8936
  style: {
8936
8937
  padding: "1em",
8937
- borderRadius: d.borderRadius,
8938
- backgroundColor: d.colorPrimaryBg
8938
+ borderRadius: u.borderRadius,
8939
+ backgroundColor: u.colorPrimaryBg
8939
8940
  },
8940
8941
  align: "middle",
8941
8942
  children: [/* @__PURE__ */ P(le, {
@@ -8968,9 +8969,9 @@ const Sd = (e) => {
8968
8969
  domain: s,
8969
8970
  formView: a,
8970
8971
  treeView: l
8971
- } = e, u = ue(), c = Y(Qe), {
8972
+ } = e, d = de(), c = Y(Qe), {
8972
8973
  setResults: f = void 0,
8973
- setCurrentItemIndex: d = void 0,
8974
+ setCurrentItemIndex: u = void 0,
8974
8975
  currentId: m = void 0,
8975
8976
  results: v = void 0,
8976
8977
  setSelectedRowItems: p = void 0,
@@ -8991,7 +8992,7 @@ const Sd = (e) => {
8991
8992
  } = c || {}, [R, F] = T(!0);
8992
8993
  pe(() => {
8993
8994
  var j;
8994
- (j = u.current) == null || j.refresh();
8995
+ (j = d.current) == null || j.refresh();
8995
8996
  }, [C]), pe(() => {
8996
8997
  t.view_id !== $.view_id && F(!0);
8997
8998
  }, [$]);
@@ -9015,7 +9016,7 @@ const Sd = (e) => {
9015
9016
  treeView: l,
9016
9017
  sorter: O,
9017
9018
  setSorter: _,
9018
- setCurrentItemIndex: d,
9019
+ setCurrentItemIndex: u,
9019
9020
  setResultsActionView: f,
9020
9021
  resultsActionView: v,
9021
9022
  domain: s,
@@ -9029,7 +9030,7 @@ const Sd = (e) => {
9029
9030
  title: t.name,
9030
9031
  children: /* @__PURE__ */ n(bd, {
9031
9032
  refreshGraph: () => {
9032
- u.current.refresh();
9033
+ d.current.refresh();
9033
9034
  }
9034
9035
  })
9035
9036
  }), /* @__PURE__ */ n(go, {
@@ -9050,8 +9051,8 @@ const Sd = (e) => {
9050
9051
  searchVisible: g,
9051
9052
  searchValues: S,
9052
9053
  showLimitOptions: !1
9053
- }), k ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ n(gn, {
9054
- ref: u,
9054
+ }), k ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ n(gn, {
9055
+ ref: d,
9055
9056
  view_id: t.view_id,
9056
9057
  model: i,
9057
9058
  context: o,
@@ -9069,10 +9070,10 @@ const Sd = (e) => {
9069
9070
  domain: s,
9070
9071
  formView: a,
9071
9072
  context: l,
9072
- defaultValues: u,
9073
+ defaultValues: d,
9073
9074
  forcedValues: c,
9074
9075
  results: f,
9075
- setResults: d,
9076
+ setResults: u,
9076
9077
  setCurrentItemIndex: m
9077
9078
  } = e;
9078
9079
  return t ? /* @__PURE__ */ P(ne, {
@@ -9084,14 +9085,14 @@ const Sd = (e) => {
9084
9085
  rootForm: !0,
9085
9086
  ref: r,
9086
9087
  model: i,
9087
- defaultValues: u,
9088
+ defaultValues: d,
9088
9089
  forcedValues: c,
9089
9090
  formView: a,
9090
9091
  actionDomain: s,
9091
9092
  id: o,
9092
9093
  parentContext: l,
9093
9094
  onSubmitSucceed: (v, p) => {
9094
- f.findIndex((g) => g.id === v) === -1 && (f.push(p), d(f), m(f.length - 1));
9095
+ f.findIndex((g) => g.id === v) === -1 && (f.push(p), u(f), m(f.length - 1));
9095
9096
  }
9096
9097
  })]
9097
9098
  }) : null;
@@ -9104,7 +9105,7 @@ function Fd(e) {
9104
9105
  } = e, {
9105
9106
  t: o
9106
9107
  } = Y(we), [s] = ot.useForm(), [a, l] = T(!1);
9107
- function u(f) {
9108
+ function d(f) {
9108
9109
  t(f.search);
9109
9110
  }
9110
9111
  pe(() => {
@@ -9119,7 +9120,7 @@ function Fd(e) {
9119
9120
  }
9120
9121
  return /* @__PURE__ */ n(ot, {
9121
9122
  form: s,
9122
- onFinish: u,
9123
+ onFinish: d,
9123
9124
  autoComplete: "off",
9124
9125
  children: /* @__PURE__ */ P(Ce, {
9125
9126
  align: "middle",
@@ -9176,10 +9177,10 @@ function Id(e) {
9176
9177
  setRemovingItem: s,
9177
9178
  removingItem: a,
9178
9179
  duplicatingItem: l,
9179
- setDuplicatingItem: u,
9180
+ setDuplicatingItem: d,
9180
9181
  currentModel: c,
9181
9182
  searchTreeRef: f,
9182
- setCurrentId: d,
9183
+ setCurrentId: u,
9183
9184
  setCurrentItemIndex: m,
9184
9185
  searchParams: v,
9185
9186
  searchVisible: p,
@@ -9201,7 +9202,7 @@ function Id(e) {
9201
9202
  } = Y(Od), {
9202
9203
  t: $,
9203
9204
  lang: R
9204
- } = Y(we), F = Y(Et), {
9205
+ } = Y(we), F = Y(Mt), {
9205
9206
  processAction: A
9206
9207
  } = F || {}, [M, I] = T(!1), N = y !== void 0 && y.trim().length > 0;
9207
9208
  function k() {
@@ -9219,7 +9220,7 @@ function Id(e) {
9219
9220
  s == null || s(!0), await H.getHandler().delete({
9220
9221
  model: c,
9221
9222
  ids: o.map((L) => L.id)
9222
- }), d == null || d(void 0), m == null || m(void 0), (U = f == null ? void 0 : f.current) == null || U.refreshResults();
9223
+ }), u == null || u(void 0), m == null || m(void 0), (U = f == null ? void 0 : f.current) == null || U.refreshResults();
9223
9224
  } catch (L) {
9224
9225
  Ue(L);
9225
9226
  } finally {
@@ -9229,7 +9230,7 @@ function Id(e) {
9229
9230
  async function q() {
9230
9231
  var U;
9231
9232
  try {
9232
- u == null || u(!0);
9233
+ d == null || d(!0);
9233
9234
  const L = o[0].id;
9234
9235
  await H.getHandler().duplicate({
9235
9236
  id: L,
@@ -9241,7 +9242,7 @@ function Id(e) {
9241
9242
  } catch (L) {
9242
9243
  Ue(L);
9243
9244
  } finally {
9244
- u == null || u(!1);
9245
+ d == null || d(!1);
9245
9246
  }
9246
9247
  }
9247
9248
  function W(U) {
@@ -9265,9 +9266,7 @@ function Id(e) {
9265
9266
  }
9266
9267
  return /* @__PURE__ */ P(Ye, {
9267
9268
  wrap: !0,
9268
- children: [O && /* @__PURE__ */ P(ne, {
9269
- children: [/* @__PURE__ */ n(Me, {}), vt(), vt()]
9270
- }), C ? null : /* @__PURE__ */ P(ne, {
9269
+ children: [C ? null : /* @__PURE__ */ P(ne, {
9271
9270
  children: [/* @__PURE__ */ n(Fd, {
9272
9271
  disabled: l || a || O,
9273
9272
  searchText: y,
@@ -9287,7 +9286,7 @@ function Id(e) {
9287
9286
  },
9288
9287
  disabled: l || a || O,
9289
9288
  badgeNumber: v == null ? void 0 : v.length
9290
- }), vt(), /* @__PURE__ */ n(ko, {
9289
+ }), $t(), /* @__PURE__ */ n(ko, {
9291
9290
  disabled: O
9292
9291
  }), /* @__PURE__ */ n(qe, {
9293
9292
  icon: /* @__PURE__ */ n(Un, {}),
@@ -9301,7 +9300,7 @@ function Id(e) {
9301
9300
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || O,
9302
9301
  loading: a,
9303
9302
  onClick: k
9304
- }), vt()]
9303
+ }), $t()]
9305
9304
  }), /* @__PURE__ */ n(qe, {
9306
9305
  icon: /* @__PURE__ */ n(Gr, {}),
9307
9306
  tooltip: $("showLogs"),
@@ -9320,7 +9319,7 @@ function Id(e) {
9320
9319
  (U = f == null ? void 0 : f.current) == null || U.refreshResults();
9321
9320
  }
9322
9321
  }), !C && /* @__PURE__ */ P(ne, {
9323
- children: [vt(), /* @__PURE__ */ n(Zn, {
9322
+ children: [$t(), /* @__PURE__ */ n(Zn, {
9324
9323
  currentView: r,
9325
9324
  availableViews: t,
9326
9325
  onChangeView: (U) => {
@@ -9329,7 +9328,7 @@ function Id(e) {
9329
9328
  previousView: w,
9330
9329
  disabled: O
9331
9330
  })]
9332
- }), vt(), /* @__PURE__ */ n(Dt, {
9331
+ }), $t(), /* @__PURE__ */ n(_t, {
9333
9332
  icon: /* @__PURE__ */ n(jn, {}),
9334
9333
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || O,
9335
9334
  tooltip: $("actions"),
@@ -9337,7 +9336,7 @@ function Id(e) {
9337
9336
  onItemClick: (U) => {
9338
9337
  !U || W(U);
9339
9338
  }
9340
- }), /* @__PURE__ */ n(Dt, {
9339
+ }), /* @__PURE__ */ n(_t, {
9341
9340
  icon: /* @__PURE__ */ n(Kn, {}),
9342
9341
  disabled: !(o && (o == null ? void 0 : o.length) > 0) || O,
9343
9342
  tooltip: $("reports"),
@@ -9352,7 +9351,7 @@ function Id(e) {
9352
9351
  });
9353
9352
  }
9354
9353
  }), x && /* @__PURE__ */ P(ne, {
9355
- children: [vt(), /* @__PURE__ */ n(Dt, {
9354
+ children: [$t(), /* @__PURE__ */ n(_t, {
9356
9355
  icon: /* @__PURE__ */ n(Lr, {
9357
9356
  component: () => /* @__PURE__ */ P("svg", {
9358
9357
  xmlns: "http://www.w3.org/2000/svg",
@@ -9422,7 +9421,7 @@ function Id(e) {
9422
9421
  })]
9423
9422
  });
9424
9423
  }
9425
- function vt() {
9424
+ function $t() {
9426
9425
  return /* @__PURE__ */ n("div", {
9427
9426
  className: "inline-block w-2"
9428
9427
  });
@@ -9436,10 +9435,10 @@ const _d = (e) => {
9436
9435
  formView: s,
9437
9436
  treeView: a,
9438
9437
  domain: l,
9439
- setCurrentItemIndex: u,
9438
+ setCurrentItemIndex: d,
9440
9439
  results: c,
9441
9440
  setCurrentId: f,
9442
- setCurrentView: d,
9441
+ setCurrentView: u,
9443
9442
  availableViews: m,
9444
9443
  searchTreeNameSearch: v
9445
9444
  } = e, {
@@ -9468,9 +9467,9 @@ const _d = (e) => {
9468
9467
  } = g;
9469
9468
  f(y);
9470
9469
  const O = c.findIndex((w) => w.id === y);
9471
- h == null || h(p), u(O);
9470
+ h == null || h(p), d(O);
9472
9471
  const _ = m.find((w) => w.type === "form");
9473
- d(_);
9472
+ u(_);
9474
9473
  }
9475
9474
  })]
9476
9475
  }) : null;
@@ -9543,7 +9542,7 @@ function Ad() {
9543
9542
  const Rd = (e) => {
9544
9543
  const {
9545
9544
  dashboardData: t
9546
- } = e, r = ue(), i = Y(st), {
9545
+ } = e, r = de(), i = Y(st), {
9547
9546
  openShortcut: o
9548
9547
  } = i || {};
9549
9548
  return t ? /* @__PURE__ */ P(Dd, {
@@ -9585,10 +9584,10 @@ function Md(e, t) {
9585
9584
  views: s,
9586
9585
  title: a,
9587
9586
  setCanWeClose: l,
9588
- tabKey: u,
9587
+ tabKey: d,
9589
9588
  initialView: c,
9590
9589
  formDefaultValues: f,
9591
- formForcedValues: d = {},
9590
+ formForcedValues: u = {},
9592
9591
  res_id: m = !1,
9593
9592
  action_id: v,
9594
9593
  action_type: p,
@@ -9596,12 +9595,12 @@ function Md(e, t) {
9596
9595
  limit: g
9597
9596
  } = e, [y, O] = T(), [_, w] = T([]), [V, D] = T(!0), E = m || void 0, [b, C] = T(E), [S, x] = T([]), [$, R] = T(), [F, A] = T([]), [M, I] = T(), [N, k] = T(0), [j, q] = T(!1), [W, z] = T(!1), [U, L] = T(), {
9598
9597
  t: B
9599
- } = Y(we), ee = ue(), Z = ue(), ie = Y(st), {
9598
+ } = Y(we), ee = de(), Z = de(), ie = Y(st), {
9600
9599
  setCurrentView: Q,
9601
9600
  setCurrentId: J,
9602
9601
  tabs: fe,
9603
9602
  activeKey: be,
9604
- openAction: $e,
9603
+ openAction: Ee,
9605
9604
  onRemoveTab: _e
9606
9605
  } = ie || {};
9607
9606
  Hi("ctrl+g,command+g", (te) => {
@@ -9613,19 +9612,19 @@ function Md(e, t) {
9613
9612
  function ge(te) {
9614
9613
  O(te), Q == null || Q(te);
9615
9614
  }
9616
- xt(t, () => ({
9615
+ bt(t, () => ({
9617
9616
  canWeClose: Se
9618
9617
  }));
9619
9618
  const se = async () => {
9620
9619
  D(!0);
9621
9620
  const te = [], Fe = [];
9622
9621
  for (const me of s) {
9623
- const [Te, de] = me;
9624
- de !== "dashboard" ? Fe.push({
9622
+ const [Te, ue] = me;
9623
+ ue !== "dashboard" ? Fe.push({
9625
9624
  viewTuple: me,
9626
9625
  promise: H.getHandler().getView({
9627
9626
  model: i,
9628
- type: de,
9627
+ type: ue,
9629
9628
  id: Te,
9630
9629
  context: o
9631
9630
  })
@@ -9633,12 +9632,12 @@ function Md(e, t) {
9633
9632
  viewTuple: me
9634
9633
  });
9635
9634
  }
9636
- const Ee = await kd(Fe);
9637
- for (const me of Ee) {
9635
+ const Me = await kd(Fe);
9636
+ for (const me of Me) {
9638
9637
  if (!me)
9639
9638
  continue;
9640
9639
  const [, Te] = me.viewTuple;
9641
- let de = me.info;
9640
+ let ue = me.info;
9642
9641
  switch (Te) {
9643
9642
  case "dashboard": {
9644
9643
  const Xe = s.find((at) => {
@@ -9665,14 +9664,14 @@ function Md(e, t) {
9665
9664
  }
9666
9665
  case "form": {
9667
9666
  te.push({
9668
- ...de,
9667
+ ...ue,
9669
9668
  type: Te
9670
9669
  });
9671
9670
  break;
9672
9671
  }
9673
9672
  case "tree": {
9674
9673
  te.push({
9675
- ...de,
9674
+ ...ue,
9676
9675
  isExpandable: h,
9677
9676
  type: Te
9678
9677
  });
@@ -9680,7 +9679,7 @@ function Md(e, t) {
9680
9679
  }
9681
9680
  case "graph": {
9682
9681
  te.push({
9683
- ...de,
9682
+ ...ue,
9684
9683
  type: Te
9685
9684
  });
9686
9685
  break;
@@ -9689,46 +9688,46 @@ function Md(e, t) {
9689
9688
  }
9690
9689
  let ce;
9691
9690
  !c && te.find((me) => me.type === "tree") ? ce = te.find((Te) => Te.type === "tree") : c ? ce = te.find((Te) => c.id ? Te.type === c.type && Te.view_id === c.id : Te.type === c.type) : ce = te.find((Te) => Te.type === "form"), ce || (Ue(`Error determining the first view to show for model ${i}.
9692
- Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`), _e == null || _e(u)), ge(ce), w(te), D(!1);
9691
+ Please, make sure the view ids on the fields_view_get responses are the same as the ones defined in the action`), _e == null || _e(d)), ge(ce), w(te), D(!1);
9693
9692
  };
9694
9693
  l({
9695
- tabKey: u,
9694
+ tabKey: d,
9696
9695
  canWeClose: Se
9697
9696
  }), pe(() => {
9698
- const te = _.find((Ee) => Ee.type === "tree"), Fe = _.find((Ee) => c.id ? Ee.type === c.type && Ee.view_id === c.id : Ee.type === c.type);
9697
+ const te = _.find((Me) => Me.type === "tree"), Fe = _.find((Me) => c.id ? Me.type === c.type && Me.view_id === c.id : Me.type === c.type);
9699
9698
  ge(Fe || te), m ? J == null || J(E) : (Be(void 0), R(void 0)), se();
9700
9699
  }, [i, s, m]), pe(() => {
9701
- be === u && (J == null || J(b), Q == null || Q(y));
9700
+ be === d && (J == null || J(b), Q == null || Q(y));
9702
9701
  }, [fe, be]);
9703
9702
  async function Se() {
9704
9703
  return y && y.type === "form" ? await ee.current.cancelUnsavedChanges() : !0;
9705
9704
  }
9706
9705
  async function De() {
9707
- be === u && (y.type === "form" && !await ee.current.cancelUnsavedChanges() || q(!0));
9706
+ be === d && (y.type === "form" && !await ee.current.cancelUnsavedChanges() || q(!0));
9708
9707
  }
9709
9708
  async function Ve(te) {
9710
9709
  var me;
9711
9710
  z(!0);
9712
9711
  const Fe = F.findIndex((Te) => Te.id === te);
9713
- let Ee;
9712
+ let Me;
9714
9713
  if (Fe === -1) {
9715
9714
  try {
9716
- Ee = (me = await H.getHandler().readObjects({
9715
+ Me = (me = await H.getHandler().readObjects({
9717
9716
  model: i,
9718
9717
  ids: [te],
9719
9718
  context: o
9720
9719
  })) == null ? void 0 : me[0];
9721
9720
  } catch {
9722
9721
  }
9723
- if (!Ee) {
9722
+ if (!Me) {
9724
9723
  z(!1), q(!1), ct(B("idNotFound"));
9725
9724
  return;
9726
9725
  }
9727
9726
  } else
9728
- Ee = F[Fe];
9727
+ Me = F[Fe];
9729
9728
  z(!1), q(!1);
9730
9729
  const ce = s.find((Te) => Te[1] === "form");
9731
- $e({
9730
+ Ee({
9732
9731
  domain: [],
9733
9732
  context: o,
9734
9733
  model: i,
@@ -9757,7 +9756,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9757
9756
  context: o,
9758
9757
  domain: r,
9759
9758
  defaultValues: f,
9760
- forcedValues: d,
9759
+ forcedValues: u,
9761
9760
  results: F,
9762
9761
  setResults: A,
9763
9762
  setCurrentItemIndex: R
@@ -9805,7 +9804,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9805
9804
  ge(te);
9806
9805
  }
9807
9806
  }
9808
- return V ? /* @__PURE__ */ n(Me, {}) : y ? /* @__PURE__ */ P(ll, {
9807
+ return V ? /* @__PURE__ */ n(Le, {}) : y ? /* @__PURE__ */ P(ll, {
9809
9808
  title: a,
9810
9809
  currentView: y,
9811
9810
  setCurrentView: ge,
@@ -9840,7 +9839,7 @@ Please, make sure the view ids on the fields_view_get responses are the same as
9840
9839
  })]
9841
9840
  }) : null;
9842
9841
  }
9843
- const Lo = bt(Md);
9842
+ const Lo = wt(Md);
9844
9843
  async function Ed({
9845
9844
  actionId: e,
9846
9845
  rootContext: t = {},
@@ -9849,7 +9848,7 @@ async function Ed({
9849
9848
  const i = "ir.actions.act_window", o = `${i},${e}`, s = await H.getHandler().getActionData({
9850
9849
  action: o,
9851
9850
  context: t
9852
- }), a = wt({
9851
+ }), a = vt({
9853
9852
  context: s.context,
9854
9853
  values: r,
9855
9854
  fields: {}
@@ -9858,10 +9857,10 @@ async function Ed({
9858
9857
  values: r,
9859
9858
  context: { ...t, ...a }
9860
9859
  }) : [], {
9861
- res_model: u,
9860
+ res_model: d,
9862
9861
  views: c,
9863
9862
  name: f,
9864
- limit: d,
9863
+ limit: u,
9865
9864
  view_type: m
9866
9865
  } = s, v = m === "tree", p = [];
9867
9866
  for (const O of c) {
@@ -9870,7 +9869,7 @@ async function Ed({
9870
9869
  p.push(O);
9871
9870
  else {
9872
9871
  const { view_id: V } = await H.getHandler().getView({
9873
- model: u,
9872
+ model: d,
9874
9873
  type: w,
9875
9874
  id: _,
9876
9875
  context: { ...t, ...a }
@@ -9885,11 +9884,11 @@ async function Ed({
9885
9884
  actionType: i,
9886
9885
  key: Jr(),
9887
9886
  views: c,
9888
- model: u,
9887
+ model: d,
9889
9888
  context: { ...t, ...a },
9890
9889
  domain: l,
9891
9890
  initialView: y,
9892
- limit: d,
9891
+ limit: u,
9893
9892
  treeExpandable: v
9894
9893
  };
9895
9894
  }
@@ -10003,13 +10002,13 @@ function jd(e) {
10003
10002
  domain: s = [],
10004
10003
  visible: a = !0,
10005
10004
  parentContext: l = {}
10006
- } = e, [u, c] = T(!1), [f, d] = T(!1), [m, v] = T(), [p, h] = T(), [g, y] = T(), [O, _] = T(1), [w, V] = T(0), D = ue(Bd), E = ue([]), [b, C] = T(0), [S, x] = T([]), [$, R] = T(void 0), [F, A] = T(), [M, I] = T(), [N, k] = T(), [j, q] = T(!1), W = ue([]), z = (J) => {
10005
+ } = e, [d, c] = T(!1), [f, u] = T(!1), [m, v] = T(), [p, h] = T(), [g, y] = T(), [O, _] = T(1), [w, V] = T(0), D = de(Bd), E = de([]), [b, C] = T(0), [S, x] = T([]), [$, R] = T(void 0), [F, A] = T(), [M, I] = T(), [N, k] = T(), [j, q] = T(!1), W = de([]), z = (J) => {
10007
10006
  q(!0), _(J), V((J - 1) * D.current);
10008
10007
  }, U = async () => {
10009
10008
  const J = W.current.length > 0 ? W.current : s, fe = hn(E.current, J), {
10010
10009
  colors: be
10011
- } = It(p), {
10012
- totalItems: $e,
10010
+ } = Ot(p), {
10011
+ totalItems: Ee,
10013
10012
  results: _e,
10014
10013
  attrsEvaluated: Be
10015
10014
  } = await H.getHandler().searchForTree({
@@ -10024,7 +10023,7 @@ function jd(e) {
10024
10023
  }
10025
10024
  });
10026
10025
  R(Qt(Be));
10027
- const ge = _t({
10026
+ const ge = It({
10028
10027
  resultsToSort: _e,
10029
10028
  sorter: F,
10030
10029
  fields: {
@@ -10033,7 +10032,7 @@ function jd(e) {
10033
10032
  }
10034
10033
  });
10035
10034
  q(!1), x(ge);
10036
- const se = await $e;
10035
+ const se = await Ee;
10037
10036
  C(se);
10038
10037
  }, L = async () => {
10039
10038
  try {
@@ -10046,9 +10045,9 @@ function jd(e) {
10046
10045
  !f || a && L();
10047
10046
  }, [O, w, f, a]);
10048
10047
  const B = async (J) => {
10049
- d(!1), c(!0), k(void 0);
10048
+ u(!1), c(!0), k(void 0);
10050
10049
  try {
10051
- J === "action" ? await ee() : await Z(), d(!0);
10050
+ J === "action" ? await ee() : await Z(), u(!0);
10052
10051
  } catch (fe) {
10053
10052
  k(fe);
10054
10053
  } finally {
@@ -10111,7 +10110,7 @@ function jd(e) {
10111
10110
  sorter: F,
10112
10111
  onChangeSort: (J) => {
10113
10112
  A == null || A(J);
10114
- const fe = _t({
10113
+ const fe = It({
10115
10114
  resultsToSort: S,
10116
10115
  sorter: J,
10117
10116
  fields: {
@@ -10129,7 +10128,7 @@ function jd(e) {
10129
10128
  message: N,
10130
10129
  type: "error",
10131
10130
  banner: !0
10132
- }) : u ? /* @__PURE__ */ n(Me, {
10131
+ }) : d ? /* @__PURE__ */ n(Le, {
10133
10132
  style: {
10134
10133
  padding: "2rem"
10135
10134
  }
@@ -10169,21 +10168,21 @@ function Yd(e, t) {
10169
10168
  context: i = {},
10170
10169
  id: o,
10171
10170
  configAction: s
10172
- } = e, [a, l] = T([]), [u, c] = T(!1), [f, d] = T(), {
10171
+ } = e, [a, l] = T([]), [d, c] = T(!1), [f, u] = T(), {
10173
10172
  setIsLoading: m,
10174
10173
  openAction: v,
10175
10174
  moveItemsEnabled: p
10176
- } = Y(Xn), h = ue(), g = ue();
10175
+ } = Y(Xn), h = de(), g = de();
10177
10176
  pe(() => {
10178
10177
  y();
10179
- }, [r, o, i]), xt(t, () => ({
10178
+ }, [r, o, i]), bt(t, () => ({
10180
10179
  refresh: () => {
10181
10180
  y();
10182
10181
  },
10183
10182
  configDashboard: E
10184
10183
  }));
10185
10184
  async function y() {
10186
- c(!0), m(!0), d(void 0);
10185
+ c(!0), m(!0), u(void 0);
10187
10186
  try {
10188
10187
  const b = await O(), C = await w(b), S = b.fields[On].relation, x = C[On].items;
10189
10188
  g.current = b.fields;
@@ -10194,7 +10193,7 @@ function Yd(e, t) {
10194
10193
  }), R = await V($);
10195
10194
  l(R), c(!1), m(!1);
10196
10195
  } catch (b) {
10197
- d(JSON.stringify(b));
10196
+ u(JSON.stringify(b));
10198
10197
  }
10199
10198
  }
10200
10199
  async function O() {
@@ -10308,7 +10307,7 @@ function Yd(e, t) {
10308
10307
  message: f,
10309
10308
  type: "error",
10310
10309
  banner: !0
10311
- })) : u ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n(Ld, {
10310
+ })) : d ? /* @__PURE__ */ n(rt, {}) : /* @__PURE__ */ n(Ld, {
10312
10311
  onPositionItemsChanged: D,
10313
10312
  children: a.map((b, C) => {
10314
10313
  const {
@@ -10368,12 +10367,12 @@ function Yd(e, t) {
10368
10367
  const [Q, J] = ie, {
10369
10368
  actionId: fe,
10370
10369
  actionType: be,
10371
- title: $e,
10370
+ title: Ee,
10372
10371
  model: _e
10373
10372
  } = S, Be = {
10374
10373
  action_id: fe,
10375
10374
  action_type: be,
10376
- name: $e,
10375
+ name: Ee,
10377
10376
  res_id: Z.id,
10378
10377
  res_model: _e,
10379
10378
  view_id: Q,
@@ -10436,7 +10435,7 @@ function Yd(e, t) {
10436
10435
  })
10437
10436
  });
10438
10437
  }
10439
- const Wd = bt(Yd), Ud = (e) => {
10438
+ const Wd = wt(Yd), Ud = (e) => {
10440
10439
  const {
10441
10440
  ooui: t
10442
10441
  } = e;
@@ -10454,7 +10453,7 @@ const Wd = bt(Yd), Ud = (e) => {
10454
10453
  onChange: i
10455
10454
  } = e, {
10456
10455
  items: o = []
10457
- } = t || {}, s = o.filter((b) => b.operation !== "pendingRemove").map((b) => b.id), [a, l] = T([]), [u, c] = T(), [f, d] = T(!1), {
10456
+ } = t || {}, s = o.filter((b) => b.operation !== "pendingRemove").map((b) => b.id), [a, l] = T([]), [d, c] = T(), [f, u] = T(!1), {
10458
10457
  relation: m,
10459
10458
  context: v,
10460
10459
  readOnly: p,
@@ -10463,7 +10462,7 @@ const Wd = bt(Yd), Ud = (e) => {
10463
10462
  } = r, y = Y(Ne), {
10464
10463
  getContext: O
10465
10464
  } = y || {};
10466
- St(() => {
10465
+ Ct(() => {
10467
10466
  w();
10468
10467
  }, [o]);
10469
10468
  const _ = (b) => {
@@ -10472,12 +10471,12 @@ const Wd = bt(Yd), Ud = (e) => {
10472
10471
  });
10473
10472
  };
10474
10473
  async function w() {
10475
- d(!0);
10474
+ u(!0);
10476
10475
  let b = [];
10477
10476
  if (r.domain) {
10478
10477
  const C = await H.getHandler().evalDomain({
10479
10478
  domain: r.domain,
10480
- values: Mt({
10479
+ values: kt({
10481
10480
  fields: y == null ? void 0 : y.getFields(),
10482
10481
  values: y.getPlainValues()
10483
10482
  }),
@@ -10507,12 +10506,12 @@ const Wd = bt(Yd), Ud = (e) => {
10507
10506
  } catch (C) {
10508
10507
  c(C);
10509
10508
  } finally {
10510
- d(!1);
10509
+ u(!1);
10511
10510
  }
10512
- if (u)
10511
+ if (d)
10513
10512
  return /* @__PURE__ */ n(Ze, {
10514
10513
  className: "mt-10",
10515
- message: u,
10514
+ message: d,
10516
10515
  type: "error",
10517
10516
  banner: !0
10518
10517
  });
@@ -10536,7 +10535,7 @@ const Wd = bt(Yd), Ud = (e) => {
10536
10535
  });
10537
10536
  }), _(C);
10538
10537
  };
10539
- return f && a.length === 0 ? /* @__PURE__ */ n(Me, {}) : /* @__PURE__ */ n(ne, {
10538
+ return f && a.length === 0 ? /* @__PURE__ */ n(Le, {}) : /* @__PURE__ */ n(ne, {
10540
10539
  children: /* @__PURE__ */ P("div", {
10541
10540
  className: "flex flex-row",
10542
10541
  children: [/* @__PURE__ */ n(Nt.Group, {
@@ -10611,11 +10610,11 @@ const Wd = bt(Yd), Ud = (e) => {
10611
10610
  selectionValues: o,
10612
10611
  readOnly: s,
10613
10612
  direction: a
10614
- } = t, l = Array.from(o.entries()), u = l && l.length && l.map((c) => {
10615
- const [f, d] = c;
10613
+ } = t, l = Array.from(o.entries()), d = l && l.length && l.map((c) => {
10614
+ const [f, u] = c;
10616
10615
  return /* @__PURE__ */ n(nr, {
10617
10616
  value: f,
10618
- children: d
10617
+ children: u
10619
10618
  }, f);
10620
10619
  });
10621
10620
  return /* @__PURE__ */ n(nr.Group, {
@@ -10624,7 +10623,7 @@ const Wd = bt(Yd), Ud = (e) => {
10624
10623
  value: i,
10625
10624
  children: /* @__PURE__ */ n(Ye, {
10626
10625
  direction: a,
10627
- children: u
10626
+ children: d
10628
10627
  })
10629
10628
  });
10630
10629
  }, Xd = (e) => {
@@ -10679,13 +10678,13 @@ const Wd = bt(Yd), Ud = (e) => {
10679
10678
  selectionValues: i,
10680
10679
  errorField: o
10681
10680
  } = t, s = Y(Ne), a = Array.from(i.entries()), l = a.map((f) => f[0]).indexOf(r);
10682
- let u = "process", c = "";
10683
- return o && (c = s.getFieldValue(o), c && (u = "error")), /* @__PURE__ */ n(rr, {
10681
+ let d = "process", c = "";
10682
+ return o && (c = s.getFieldValue(o), c && (d = "error")), /* @__PURE__ */ n(rr, {
10684
10683
  current: l,
10685
- status: u,
10686
- children: a.map((f, d) => /* @__PURE__ */ n(rr.Step, {
10684
+ status: d,
10685
+ children: a.map((f, u) => /* @__PURE__ */ n(rr.Step, {
10687
10686
  title: f[1],
10688
- description: d === l && u === "error" ? c : null
10687
+ description: u === l && d === "error" ? c : null
10689
10688
  }))
10690
10689
  });
10691
10690
  }, nu = (e) => {
@@ -10730,22 +10729,22 @@ function su(e, t) {
10730
10729
  globalValues: i = {},
10731
10730
  rootContext: o = {},
10732
10731
  lang: s
10733
- } = e, [a, l] = T("welcome"), [u, c] = T([{
10732
+ } = e, [a, l] = T("welcome"), [d, c] = T([{
10734
10733
  title: Oe("welcome", s),
10735
10734
  key: "welcome",
10736
10735
  closable: !0,
10737
10736
  content: /* @__PURE__ */ n(iu, {})
10738
- }]), f = ue(/* @__PURE__ */ new Map()), d = ue();
10739
- xt(t, () => ({
10737
+ }]), f = de(/* @__PURE__ */ new Map()), u = de();
10738
+ bt(t, () => ({
10740
10739
  retrieveAndOpenAction: p,
10741
10740
  openShortcut: y
10742
10741
  }));
10743
10742
  function m(w) {
10744
10743
  if (w === a) {
10745
- const V = u.findIndex((D) => D.key === w);
10746
- u[V - 1] && l(u[V - 1].key), u[V + 1] && l(u[V + 1].key);
10744
+ const V = d.findIndex((D) => D.key === w);
10745
+ d[V - 1] && l(d[V - 1].key), d[V + 1] && l(d[V + 1].key);
10747
10746
  }
10748
- c(u.filter((V) => V.key !== w)), f.current.delete(w);
10747
+ c(d.filter((V) => V.key !== w)), f.current.delete(w);
10749
10748
  }
10750
10749
  function v({
10751
10750
  tabKey: w,
@@ -10769,7 +10768,7 @@ function su(e, t) {
10769
10768
  Ue("Action type not supported");
10770
10769
  return;
10771
10770
  }
10772
- const [x, $] = w.split(","), R = parseInt($), F = wt({
10771
+ const [x, $] = w.split(","), R = parseInt($), F = vt({
10773
10772
  context: S.context,
10774
10773
  values: i,
10775
10774
  fields: {}
@@ -10849,8 +10848,8 @@ function su(e, t) {
10849
10848
  key: D,
10850
10849
  action: E
10851
10850
  }) {
10852
- let b = [...u];
10853
- u.length === 1 && u[0].key === "welcome" && (b = [...u.filter((C) => C.key !== "welcome")]), c([...b, {
10851
+ let b = [...d];
10852
+ d.length === 1 && d[0].key === "welcome" && (b = [...d.filter((C) => C.key !== "welcome")]), c([...b, {
10854
10853
  title: w,
10855
10854
  key: D,
10856
10855
  closable: !0,
@@ -10876,7 +10875,7 @@ function su(e, t) {
10876
10875
  } = w, [M, I] = $[0], N = {
10877
10876
  id: M,
10878
10877
  type: I
10879
- }, k = wt({
10878
+ }, k = vt({
10880
10879
  context: S,
10881
10880
  values: {
10882
10881
  ...D,
@@ -10885,7 +10884,7 @@ function su(e, t) {
10885
10884
  fields: V
10886
10885
  }), j = x ? await H.getHandler().evalDomain({
10887
10886
  domain: x,
10888
- values: Mt({
10887
+ values: kt({
10889
10888
  fields: V,
10890
10889
  values: {
10891
10890
  ...D,
@@ -10923,7 +10922,7 @@ function su(e, t) {
10923
10922
  } = w, C = `${D},${V}`, S = await H.getHandler().getActionData({
10924
10923
  action: C,
10925
10924
  context: o
10926
- }), x = wt({
10925
+ }), x = vt({
10927
10926
  context: S.context,
10928
10927
  values: i,
10929
10928
  fields: {}
@@ -11036,7 +11035,7 @@ function su(e, t) {
11036
11035
  ...V
11037
11036
  }
11038
11037
  });
11039
- d.current.openActionModal({
11038
+ u.current.openActionModal({
11040
11039
  domain: w,
11041
11040
  model: D,
11042
11041
  formView: k,
@@ -11093,7 +11092,7 @@ function su(e, t) {
11093
11092
  openAction: _,
11094
11093
  openRelate: g,
11095
11094
  openDefaultActionForModel: O,
11096
- tabs: u,
11095
+ tabs: d,
11097
11096
  activeKey: a,
11098
11097
  onRemoveTab: async (w) => {
11099
11098
  const V = f.current.get(w);
@@ -11103,14 +11102,14 @@ function su(e, t) {
11103
11102
  l(w);
11104
11103
  },
11105
11104
  children: /* @__PURE__ */ n(fl, {
11106
- ref: d,
11105
+ ref: u,
11107
11106
  globalValues: i,
11108
11107
  children: r
11109
11108
  })
11110
11109
  })
11111
11110
  });
11112
11111
  }
11113
- const Lu = bt(su), {
11112
+ const Lu = wt(su), {
11114
11113
  useToken: au
11115
11114
  } = Pe;
11116
11115
  function lu(e) {
@@ -11170,8 +11169,8 @@ function lu(e) {
11170
11169
  style: {
11171
11170
  color: a.colorPrimaryActive
11172
11171
  },
11173
- onClick: (u) => {
11174
- u.stopPropagation(), r(i);
11172
+ onClick: (d) => {
11173
+ d.stopPropagation(), r(i);
11175
11174
  }
11176
11175
  })
11177
11176
  })]
@@ -11226,7 +11225,7 @@ const {
11226
11225
  onCheckIsFavourite: r,
11227
11226
  onAddFavourite: i,
11228
11227
  onRemoveFavourite: o
11229
- } = e, [s, a] = T(!1), [l, u] = T(!1), [c, f] = T([]), [d, m] = T(!0), [v, p] = T(), {
11228
+ } = e, [s, a] = T(!1), [l, d] = T(!1), [c, f] = T([]), [u, m] = T(!0), [v, p] = T(), {
11230
11229
  t: h
11231
11230
  } = Y(we) || {}, {
11232
11231
  token: g
@@ -11258,10 +11257,10 @@ const {
11258
11257
  const {
11259
11258
  key: I
11260
11259
  } = M, N = c.find((k) => k.id === Number(I));
11261
- (N == null ? void 0 : N.action_type) !== "ir.actions.wizard" && (N && O(N), u(!1));
11260
+ (N == null ? void 0 : N.action_type) !== "ir.actions.wizard" && (N && O(N), d(!1));
11262
11261
  }
11263
11262
  function S(M) {
11264
- M && b(), u(M);
11263
+ M && b(), d(M);
11265
11264
  }
11266
11265
  async function x() {
11267
11266
  if (!V)
@@ -11286,7 +11285,7 @@ const {
11286
11285
  q !== !1 && p(q), a(q !== !1);
11287
11286
  }
11288
11287
  async function $() {
11289
- u(!1), E == null || E({
11288
+ d(!1), E == null || E({
11290
11289
  model: "ir.ui.view_sc"
11291
11290
  });
11292
11291
  }
@@ -11320,7 +11319,7 @@ const {
11320
11319
  })
11321
11320
  })
11322
11321
  })]
11323
- }), /* @__PURE__ */ n(He.Divider, {}), d ? /* @__PURE__ */ n(Me, {
11322
+ }), /* @__PURE__ */ n(He.Divider, {}), u ? /* @__PURE__ */ n(Le, {
11324
11323
  style: {
11325
11324
  padding: "1rem"
11326
11325
  }
@@ -11406,7 +11405,7 @@ const {
11406
11405
  borderTopLeftRadius: 0,
11407
11406
  borderBottomLeftRadius: 0
11408
11407
  },
11409
- icon: /* @__PURE__ */ n(Rt, {
11408
+ icon: /* @__PURE__ */ n(At, {
11410
11409
  style: {
11411
11410
  fontSize: "0.5em"
11412
11411
  }