@anzusystems/common-admin 1.47.0-beta.dev-1782072279 → 1.47.0-beta.dev-1782072299

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.
package/dist/labs.js CHANGED
@@ -1,28 +1,28 @@
1
- import { aG as Ka, aH as Ba, d as Ae, bT as Ra, bU as La, bV as Sn, j as tt, k as Va, a1 as Ma, h as kt, i as Bt, aj as In, ak as Pn, al as Dn, am as En, ag as Rt, a_ as $n, aa as Tn, ab as Fn, ac as Kn, ad as Bn, an as Rn, ao as Ln, ae as Vn, af as Mn, bW as zn, bX as Nn, be as On, bY as za, as as Un, bZ as Qt, ap as Na, aq as Oa, aV as Ua, b2 as ja, ar as qa, E as Ha, a8 as Ga, a2 as Ja, b_ as Wa, q as Xa, p as Ya, x as Qa, a7 as Za, aI as _a, m as jn, b$ as eo, l as to, c0 as no, c1 as qn, c2 as Hn, c3 as Gn, c4 as Jn, c5 as Wn, c6 as Xn, c7 as Yn, c8 as Qn, c9 as Zn, g as Be, ca as ao, cb as oo, _ as _n, cc as lo, cd as io, ce as ro, cf as so, cg as co, aU as uo, ch as fo, ci as vo, cj as mo, z as yo, ck as ho, cl as go } from "./AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-CfOzQkN3.mjs";
2
- import { aE as Gi, cm as Ji, cn as Wi, aA as Xi, aB as Yi, aD as Qi, aF as Zi, aC as _i, aS as er, aJ as tr, bb as nr, aO as ar, aX as or, ay as lr, az as ir, co as rr, cp as sr, cq as dr, cr, cs as ur, ct as fr, ai as vr, ah as mr, cu as yr, cv as hr, cw as gr, cx as pr } from "./AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-CfOzQkN3.mjs";
3
- import { defineComponent as nt, inject as mt, provide as _t, ref as me, openBlock as x, createBlock as ee, withModifiers as ue, withCtx as u, renderSlot as O, useModel as yt, computed as A, watch as Re, createElementBlock as N, createElementVNode as U, toDisplayString as L, unref as y, createVNode as s, createTextVNode as Y, Fragment as we, renderList as dt, normalizeClass as He, mergeModels as Qe, createCommentVNode as Z, onMounted as en, toRaw as pn, resolveComponent as bn, mergeProps as fe, withDirectives as po, vShow as bo, useSlots as ea, useTemplateRef as Lt, isRef as ta, toValue as ko, reactive as wo, normalizeStyle as wt, normalizeProps as Ye, guardReactiveProps as lt, shallowRef as Zt, nextTick as et, onBeforeUnmount as tn, getCurrentInstance as na } from "vue";
1
+ import { aG as Ka, aH as Ba, d as Ie, bT as Ra, bU as La, bV as An, j as Ze, k as Va, a1 as Ma, h as kt, i as Bt, aj as In, ak as Pn, al as En, am as Dn, ag as Rt, a_ as $n, aa as Tn, ab as Fn, ac as Kn, ad as Bn, an as Rn, ao as Ln, ae as Vn, af as Mn, bW as zn, bX as Nn, be as On, bY as za, as as Un, bZ as Qt, ap as Na, aq as Oa, aV as Ua, b2 as ja, ar as qa, E as Ha, a8 as Ga, a2 as Ja, b_ as Wa, q as Xa, p as Ya, x as Qa, a7 as Za, aI as _a, m as jn, b$ as eo, l as to, c0 as no, c1 as qn, c2 as Hn, c3 as Gn, c4 as Jn, c5 as Wn, c6 as Xn, c7 as Yn, c8 as Qn, c9 as Zn, g as Be, ca as ao, cb as oo, _ as _n, cc as lo, cd as io, ce as so, cf as ro, cg as co, aU as uo, ch as fo, ci as vo, cj as mo, z as yo, ck as ho, cl as go } from "./AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-CDFIJFqU.mjs";
2
+ import { aE as Gi, cm as Ji, cn as Wi, aA as Xi, aB as Yi, aD as Qi, aF as Zi, aC as _i, aS as es, aJ as ts, bb as ns, aO as as, aX as os, ay as ls, az as is, co as ss, cp as rs, cq as ds, cr as cs, cs as us, ct as fs, ai as vs, ah as ms, cu as ys, cv as hs, cw as gs, cx as ps } from "./AFormRemoteAutocomplete.vue_vue_type_script_setup_true_lang-CDFIJFqU.mjs";
3
+ import { defineComponent as _e, inject as mt, provide as _t, ref as de, openBlock as x, createBlock as te, withModifiers as fe, withCtx as u, renderSlot as O, useModel as yt, computed as S, watch as $e, createElementBlock as N, createElementVNode as U, toDisplayString as V, unref as y, createVNode as r, createTextVNode as Q, Fragment as xe, renderList as st, normalizeClass as Ue, mergeModels as We, createCommentVNode as _, onMounted as en, toRaw as pn, resolveComponent as bn, mergeProps as ve, withDirectives as po, vShow as bo, useSlots as ea, useTemplateRef as Lt, isRef as ta, toValue as ko, reactive as wo, normalizeStyle as wt, normalizeProps as Je, guardReactiveProps as at, shallowRef as Zt, nextTick as Qe, onBeforeUnmount as tn, getCurrentInstance as na } from "vue";
4
4
  import { VForm as Co } from "vuetify/components/VForm";
5
- import { useI18n as it } from "vue-i18n";
6
- import { VBtn as ie } from "vuetify/components/VBtn";
7
- import { VList as Ct, VListItem as Ge, VListItemTitle as We } from "vuetify/components/VList";
5
+ import { useI18n as lt } from "vue-i18n";
6
+ import { VBtn as se } from "vuetify/components/VBtn";
7
+ import { VList as Ct, VListItem as je, VListItemTitle as He } from "vuetify/components/VList";
8
8
  import { VMenu as Vt } from "vuetify/components/VMenu";
9
- import { useThrottleFn as Et, useDebounceFn as xo } from "@vueuse/core";
10
- import { VBtnToggle as Ao } from "vuetify/components/VBtnToggle";
9
+ import { useThrottleFn as Dt, useDebounceFn as xo } from "@vueuse/core";
10
+ import { VBtnToggle as So } from "vuetify/components/VBtnToggle";
11
11
  import aa from "axios";
12
12
  import { useDisplay as oa } from "vuetify";
13
13
  import { VCard as nn, VCardTitle as la, VCardText as Kt, VCardActions as ia } from "vuetify/components/VCard";
14
14
  import { VDialog as an } from "vuetify/components/VDialog";
15
15
  import { VSpacer as on } from "vuetify/components/VGrid";
16
- import { VIcon as de } from "vuetify/components/VIcon";
17
- import { VToolbar as So } from "vuetify/components/VToolbar";
18
- import { VTooltip as Je } from "vuetify/components/VTooltip";
16
+ import { VIcon as re } from "vuetify/components/VIcon";
17
+ import { VToolbar as Ao } from "vuetify/components/VToolbar";
18
+ import { VTooltip as qe } from "vuetify/components/VTooltip";
19
19
  import { Intersect as Io } from "vuetify/directives";
20
20
  import { VAlert as ln } from "vuetify/components/VAlert";
21
- import { VProgressCircular as ra } from "vuetify/components/VProgressCircular";
21
+ import { VProgressCircular as sa } from "vuetify/components/VProgressCircular";
22
22
  import { VRadio as kn } from "vuetify/components/VRadio";
23
23
  import { VRadioGroup as Po } from "vuetify/components/VRadioGroup";
24
- import { onBeforeRouteLeave as Do } from "vue-router";
25
- const $i = /* @__PURE__ */ nt({
24
+ import { onBeforeRouteLeave as Eo } from "vue-router";
25
+ const $i = /* @__PURE__ */ _e({
26
26
  __name: "AFilterWrapperSidebar",
27
27
  props: {
28
28
  formName: { default: "search" }
@@ -30,15 +30,15 @@ const $i = /* @__PURE__ */ nt({
30
30
  emits: ["submit"],
31
31
  setup(e, { emit: k }) {
32
32
  const l = k, n = mt(Ka), i = mt(Ba);
33
- if (Ae(n) || Ae(i))
33
+ if (Ie(n) || Ie(i))
34
34
  throw new Error("Incorrect provide/inject config.");
35
- _t(Ra, me(0)), _t(La, me(/* @__PURE__ */ new Map()));
36
- const v = () => {
35
+ _t(Ra, de(0)), _t(La, de(/* @__PURE__ */ new Map()));
36
+ const m = () => {
37
37
  l("submit");
38
38
  };
39
- return (w, D) => (x(), ee(Co, {
39
+ return (w, E) => (x(), te(Co, {
40
40
  name: e.formName,
41
- onSubmit: ue(v, ["prevent"])
41
+ onSubmit: fe(m, ["prevent"])
42
42
  }, {
43
43
  default: u(() => [
44
44
  O(w.$slots, "default")
@@ -46,9 +46,9 @@ const $i = /* @__PURE__ */ nt({
46
46
  _: 3
47
47
  }, 8, ["name"]));
48
48
  }
49
- }), Eo = { class: "d-flex align-center justify-center" }, $o = { class: "text-body-small mr-1" }, Ti = /* @__PURE__ */ nt({
49
+ }), Do = { class: "d-flex align-center justify-center" }, $o = { class: "text-body-small mr-1" }, Ti = /* @__PURE__ */ _e({
50
50
  __name: "ADatatableOrdering",
51
- props: /* @__PURE__ */ Qe({
51
+ props: /* @__PURE__ */ We({
52
52
  variant: { default: "id" },
53
53
  customOptions: { default: void 0 },
54
54
  paginationUpdateCustomCb: { type: Function, default: void 0 }
@@ -59,82 +59,82 @@ const $i = /* @__PURE__ */ nt({
59
59
  },
60
60
  modelModifiers: {}
61
61
  }),
62
- emits: /* @__PURE__ */ Qe(["sortByChange"], ["update:modelValue"]),
62
+ emits: /* @__PURE__ */ We(["sortByChange"], ["update:modelValue"]),
63
63
  setup(e, { emit: k }) {
64
- const l = e, n = k, i = yt(e, "modelValue"), v = mt(Sn);
65
- if (Ae(v))
64
+ const l = e, n = k, i = yt(e, "modelValue"), m = mt(An);
65
+ if (Ie(m))
66
66
  throw new Error("Incorrect provide/inject config.");
67
- const { t: w } = it(), D = [
67
+ const { t: w } = lt(), E = [
68
68
  {
69
69
  id: 1,
70
70
  titleT: "common.system.datatable.ordering.mostRecent",
71
- sortBy: { key: "createdAt", order: tt.Desc }
71
+ sortBy: { key: "createdAt", order: Ze.Desc }
72
72
  },
73
73
  {
74
74
  id: 2,
75
75
  titleT: "common.system.datatable.ordering.oldest",
76
- sortBy: { key: "createdAt", order: tt.Asc }
76
+ sortBy: { key: "createdAt", order: Ze.Asc }
77
77
  }
78
- ], g = [
78
+ ], b = [
79
79
  {
80
80
  id: 1,
81
81
  titleT: "common.system.datatable.ordering.mostRecent",
82
- sortBy: { key: "id", order: tt.Desc }
82
+ sortBy: { key: "id", order: Ze.Desc }
83
83
  },
84
84
  {
85
85
  id: 2,
86
86
  titleT: "common.system.datatable.ordering.oldest",
87
- sortBy: { key: "id", order: tt.Asc }
87
+ sortBy: { key: "id", order: Ze.Asc }
88
88
  }
89
89
  ], c = [
90
90
  {
91
91
  id: 3,
92
92
  titleT: "common.system.datatable.ordering.mostRelevant",
93
- sortBy: { key: Va, order: tt.Desc }
93
+ sortBy: { key: Va, order: Ze.Desc }
94
94
  },
95
95
  {
96
96
  id: 1,
97
97
  titleT: "common.system.datatable.ordering.mostRecent",
98
- sortBy: { key: "createdAt", order: tt.Desc }
98
+ sortBy: { key: "createdAt", order: Ze.Desc }
99
99
  },
100
100
  {
101
101
  id: 2,
102
102
  titleT: "common.system.datatable.ordering.oldest",
103
- sortBy: { key: "createdAt", order: tt.Asc }
103
+ sortBy: { key: "createdAt", order: Ze.Asc }
104
104
  }
105
- ], h = A(() => {
106
- const p = S.value.find((z) => z.id === i.value);
107
- return p ? w(p.titleT) : "";
108
- }), S = A(() => l.customOptions ? l.customOptions : l.variant === "most-relevant" ? c : l.variant === "id" ? g : D), j = (p) => {
109
- i.value = p.id;
110
- }, M = (p) => {
111
- p.sortBy || (v.value = {
112
- ...v.value,
105
+ ], h = S(() => {
106
+ const g = I.value.find((z) => z.id === i.value);
107
+ return g ? w(g.titleT) : "";
108
+ }), I = S(() => l.customOptions ? l.customOptions : l.variant === "most-relevant" ? c : l.variant === "id" ? b : E), j = (g) => {
109
+ i.value = g.id;
110
+ }, M = (g) => {
111
+ g.sortBy || (m.value = {
112
+ ...m.value,
113
113
  sortBy: null
114
- }, n("sortByChange", p)), v.value.sortBy = p.sortBy, n("sortByChange", p);
114
+ }, n("sortByChange", g)), m.value.sortBy = g.sortBy, n("sortByChange", g);
115
115
  };
116
- return Re(i, (p, z) => {
117
- if (p === z) return;
118
- const q = S.value.find((K) => K.id === p);
119
- if (!Ae(q)) {
120
- if (Ae(l.paginationUpdateCustomCb)) {
116
+ return $e(i, (g, z) => {
117
+ if (g === z) return;
118
+ const q = I.value.find((B) => B.id === g);
119
+ if (!Ie(q)) {
120
+ if (Ie(l.paginationUpdateCustomCb)) {
121
121
  M(q);
122
122
  return;
123
123
  }
124
- l.paginationUpdateCustomCb(q, v);
124
+ l.paginationUpdateCustomCb(q, m);
125
125
  }
126
- }), Re(
127
- v,
128
- (p, z) => {
129
- if (p.sortBy?.key === z?.sortBy?.key && p.sortBy?.order === z?.sortBy?.order)
126
+ }), $e(
127
+ m,
128
+ (g, z) => {
129
+ if (g.sortBy?.key === z?.sortBy?.key && g.sortBy?.order === z?.sortBy?.order)
130
130
  return;
131
- const q = S.value.find((K) => p.sortBy?.key === K.sortBy?.key && p.sortBy?.order === K.sortBy?.order);
132
- Ae(q) || (i.value = q.id);
131
+ const q = I.value.find((B) => g.sortBy?.key === B.sortBy?.key && g.sortBy?.order === B.sortBy?.order);
132
+ Ie(q) || (i.value = q.id);
133
133
  },
134
134
  { immediate: !0 }
135
- ), (p, z) => (x(), N("div", Eo, [
136
- U("div", $o, L(y(w)("common.system.datatable.ordering.title")) + ": ", 1),
137
- s(ie, {
135
+ ), (g, z) => (x(), N("div", Do, [
136
+ U("div", $o, V(y(w)("common.system.datatable.ordering.title")) + ": ", 1),
137
+ r(se, {
138
138
  variant: "text",
139
139
  rounded: "xl",
140
140
  size: "small",
@@ -142,28 +142,28 @@ const $i = /* @__PURE__ */ nt({
142
142
  "append-icon": "mdi-chevron-down"
143
143
  }, {
144
144
  default: u(() => [
145
- Y(L(h.value) + " ", 1),
146
- s(Vt, {
145
+ Q(V(h.value) + " ", 1),
146
+ r(Vt, {
147
147
  activator: "parent",
148
148
  location: "bottom",
149
149
  "close-on-content-click": ""
150
150
  }, {
151
151
  default: u(() => [
152
- s(Ct, {
152
+ r(Ct, {
153
153
  density: "compact",
154
154
  class: "pa-0"
155
155
  }, {
156
156
  default: u(() => [
157
- (x(!0), N(we, null, dt(S.value, (q) => (x(), ee(Ge, {
157
+ (x(!0), N(xe, null, st(I.value, (q) => (x(), te(je, {
158
158
  key: q.id,
159
- onClick: (K) => j(q)
159
+ onClick: (B) => j(q)
160
160
  }, {
161
161
  default: u(() => [
162
- s(We, {
163
- class: He({ "font-weight-bold": q.id === i.value })
162
+ r(He, {
163
+ class: Ue({ "font-weight-bold": q.id === i.value })
164
164
  }, {
165
165
  default: u(() => [
166
- Y(L(y(w)(q.titleT)), 1)
166
+ Q(V(y(w)(q.titleT)), 1)
167
167
  ]),
168
168
  _: 2
169
169
  }, 1032, ["class"])
@@ -184,7 +184,7 @@ const $i = /* @__PURE__ */ nt({
184
184
  }), To = { class: "anzu-data-footer" }, Fo = {
185
185
  key: 0,
186
186
  class: "anzu-data-footer__page-limit"
187
- }, Ko = { class: "anzu-data-footer__pagination" }, Bo = { class: "anzu-data-footer__icons-before" }, Ro = { class: "current-page" }, Lo = { class: "anzu-data-footer__icons-after" }, Vo = /* @__PURE__ */ nt({
187
+ }, Ko = { class: "anzu-data-footer__pagination" }, Bo = { class: "anzu-data-footer__icons-before" }, Ro = { class: "current-page" }, Lo = { class: "anzu-data-footer__icons-after" }, Vo = /* @__PURE__ */ _e({
188
188
  __name: "ADatatablePagination",
189
189
  props: {
190
190
  itemsPerPageOptions: { default: () => [10, 25, 50] },
@@ -192,52 +192,52 @@ const $i = /* @__PURE__ */ nt({
192
192
  },
193
193
  emits: ["change"],
194
194
  setup(e, { emit: k }) {
195
- const l = k, n = mt(Sn);
196
- if (Ae(n))
195
+ const l = k, n = mt(An);
196
+ if (Ie(n))
197
197
  throw new Error("Incorrect provide/inject config.");
198
- const { t: i } = it(), { setStoredPage: v } = Ma(), w = A(() => Math.ceil(n.value.totalCount / n.value.rowsPerPage)), D = A(() => n.value.page * n.value.rowsPerPage - n.value.rowsPerPage + 1), g = A(() => n.value.page * n.value.rowsPerPage - n.value.rowsPerPage + n.value.currentViewCount), c = A(() => n.value.page === 1), h = A(() => !kt(n.value.hasNextPage) || n.value.page === w.value), S = A(() => kt(n.value.hasNextPage) && n.value.page === w.value || n.value.hasNextPage === !1), j = A(() => kt(n.value.hasNextPage) ? n.value.totalCount : n.value.hasNextPage ? g.value + 1 + "+" : g.value);
199
- Re(
198
+ const { t: i } = lt(), { setStoredPage: m } = Ma(), w = S(() => Math.ceil(n.value.totalCount / n.value.rowsPerPage)), E = S(() => n.value.page * n.value.rowsPerPage - n.value.rowsPerPage + 1), b = S(() => n.value.page * n.value.rowsPerPage - n.value.rowsPerPage + n.value.currentViewCount), c = S(() => n.value.page === 1), h = S(() => !kt(n.value.hasNextPage) || n.value.page === w.value), I = S(() => kt(n.value.hasNextPage) && n.value.page === w.value || n.value.hasNextPage === !1), j = S(() => kt(n.value.hasNextPage) ? n.value.totalCount : n.value.hasNextPage ? b.value + 1 + "+" : b.value);
199
+ $e(
200
200
  () => n.value.rowsPerPage,
201
- (K, G) => {
202
- K !== G && (n.value.page = 1, l("change"));
201
+ (B, X) => {
202
+ B !== X && (n.value.page = 1, l("change"));
203
203
  }
204
- ), Re(
204
+ ), $e(
205
205
  () => n.value.page,
206
- (K, G) => {
207
- K !== G && (v(K), l("change"));
206
+ (B, X) => {
207
+ B !== X && (m(B), l("change"));
208
208
  }
209
209
  );
210
- const M = Et(() => {
210
+ const M = Dt(() => {
211
211
  n.value.page = 1;
212
- }, 300), p = Et(() => {
212
+ }, 300), g = Dt(() => {
213
213
  n.value.page = w.value;
214
- }, 300), z = Et(() => {
214
+ }, 300), z = Dt(() => {
215
215
  n.value.page = n.value.page - 1;
216
- }, 300), q = Et(() => {
216
+ }, 300), q = Dt(() => {
217
217
  n.value.page = n.value.page + 1;
218
218
  }, 300);
219
- return (K, G) => (x(), N("div", To, [
220
- e.hideRecordsPerPage ? Z("", !0) : (x(), N("div", Fo, [
221
- Y(L(y(i)("common.system.datatable.itemsPerPage")) + ": ", 1),
222
- s(Ao, {
219
+ return (B, X) => (x(), N("div", To, [
220
+ e.hideRecordsPerPage ? _("", !0) : (x(), N("div", Fo, [
221
+ Q(V(y(i)("common.system.datatable.itemsPerPage")) + ": ", 1),
222
+ r(So, {
223
223
  modelValue: y(n).rowsPerPage,
224
- "onUpdate:modelValue": G[0] || (G[0] = (E) => y(n).rowsPerPage = E),
224
+ "onUpdate:modelValue": X[0] || (X[0] = (D) => y(n).rowsPerPage = D),
225
225
  class: "ml-2",
226
226
  density: "compact",
227
227
  mandatory: "",
228
228
  "data-cy": "table-size"
229
229
  }, {
230
230
  default: u(() => [
231
- (x(!0), N(we, null, dt(e.itemsPerPageOptions, (E) => (x(), ee(ie, {
232
- key: E,
233
- color: E === y(n).rowsPerPage ? "secondary" : "",
234
- value: E,
231
+ (x(!0), N(xe, null, st(e.itemsPerPageOptions, (D) => (x(), te(se, {
232
+ key: D,
233
+ color: D === y(n).rowsPerPage ? "secondary" : "",
234
+ value: D,
235
235
  density: "compact",
236
236
  size: "small",
237
237
  variant: "text"
238
238
  }, {
239
239
  default: u(() => [
240
- Y(L(E), 1)
240
+ Q(V(D), 1)
241
241
  ]),
242
242
  _: 2
243
243
  }, 1032, ["color", "value"]))), 128))
@@ -245,82 +245,82 @@ const $i = /* @__PURE__ */ nt({
245
245
  _: 1
246
246
  }, 8, ["modelValue"])
247
247
  ])),
248
- U("div", Ko, L(D.value) + " - " + L(g.value) + " " + L(y(i)("common.system.datatable.from")) + " " + L(j.value), 1),
248
+ U("div", Ko, V(E.value) + " - " + V(b.value) + " " + V(y(i)("common.system.datatable.from")) + " " + V(j.value), 1),
249
249
  U("div", Bo, [
250
- s(ie, {
250
+ r(se, {
251
251
  disabled: c.value,
252
252
  icon: "mdi-page-first",
253
253
  size: "small",
254
254
  variant: "text",
255
- onClick: ue(y(M), ["stop"])
255
+ onClick: fe(y(M), ["stop"])
256
256
  }, null, 8, ["disabled", "onClick"]),
257
- s(ie, {
257
+ r(se, {
258
258
  disabled: c.value,
259
259
  icon: "mdi-chevron-left",
260
260
  size: "small",
261
261
  variant: "text",
262
- onClick: ue(y(z), ["stop"])
262
+ onClick: fe(y(z), ["stop"])
263
263
  }, null, 8, ["disabled", "onClick"])
264
264
  ]),
265
265
  U("div", Ro, [
266
- U("span", null, L(y(n).page), 1)
266
+ U("span", null, V(y(n).page), 1)
267
267
  ]),
268
268
  U("div", Lo, [
269
- s(ie, {
270
- disabled: S.value,
269
+ r(se, {
270
+ disabled: I.value,
271
271
  icon: "mdi-chevron-right",
272
272
  size: "small",
273
273
  variant: "text",
274
- onClick: ue(y(q), ["stop"])
274
+ onClick: fe(y(q), ["stop"])
275
275
  }, null, 8, ["disabled", "onClick"]),
276
- s(ie, {
276
+ r(se, {
277
277
  disabled: h.value,
278
278
  icon: "mdi-page-last",
279
279
  size: "small",
280
280
  variant: "text",
281
- onClick: ue(y(p), ["stop"])
281
+ onClick: fe(y(g), ["stop"])
282
282
  }, null, 8, ["disabled", "onClick"])
283
283
  ])
284
284
  ]));
285
285
  }
286
286
  }), Mo = (e, k, l = "id") => {
287
- const { querySetLimit: n, querySetOffset: i, querySetOrder: v, queryBuild: w, queryAddFilter: D, queryAdd: g } = za(), c = e.length;
288
- return n(c), i(1, c), v(l, !1), k ? g(l, e.join(",")) : D("in", l, e.join(",")), w();
287
+ const { querySetLimit: n, querySetOffset: i, querySetOrder: m, queryBuild: w, queryAddFilter: E, queryAdd: b } = za(), c = e.length;
288
+ return n(c), i(1, c), m(l, !1), k ? b(l, e.join(",")) : E("in", l, e.join(",")), w();
289
289
  }, Fi = (e) => {
290
290
  const {
291
291
  client: k,
292
292
  system: l,
293
293
  entity: n,
294
294
  urlTemplate: i,
295
- urlParams: v,
295
+ urlParams: m,
296
296
  options: w = {},
297
- isSearchApi: D = !1,
298
- field: g = "id",
297
+ isSearchApi: E = !1,
298
+ field: b = "id",
299
299
  silentConsoleError: c = !1
300
300
  } = e;
301
301
  let h = null;
302
302
  return {
303
- executeFetch: async (M, p = {}) => {
303
+ executeFetch: async (M, g = {}) => {
304
304
  h = new AbortController();
305
- const { urlTemplate: z, urlParams: q } = p;
305
+ const { urlTemplate: z, urlParams: q } = g;
306
306
  try {
307
- const K = Bt(q) ? q : v, G = Bt(z) ? z : i;
308
- if (Ae(G)) throw new Error("Url template is undefined");
309
- const E = (Ae(K) ? G : In(G, K)) + Mo(M, D, g), r = await k().get(E, {
307
+ const B = Bt(q) ? q : m, X = Bt(z) ? z : i;
308
+ if (Ie(X)) throw new Error("Url template is undefined");
309
+ const D = (Ie(B) ? X : In(X, B)) + Mo(M, E, b), s = await k().get(D, {
310
310
  ...w,
311
311
  signal: h.signal
312
312
  });
313
- if (!Pn(r.status))
314
- throw new Dn(r.status);
315
- if (r.data?.data)
316
- return r.data.data;
317
- if (r.status === En)
313
+ if (!Pn(s.status))
314
+ throw new En(s.status);
315
+ if (s.data?.data)
316
+ return s.data.data;
317
+ if (s.status === Dn)
318
318
  return [];
319
319
  throw new Rt();
320
- } catch (K) {
321
- if (K instanceof DOMException && K.name === "AbortError")
320
+ } catch (B) {
321
+ if (B instanceof DOMException && B.name === "AbortError")
322
322
  return [];
323
- throw $n(K) ? K : Tn(K) ? new Fn(K, K.config?.url) : Kn(K) ? new Bn(K, l, n, K) : Rn(K) ? new Ln(K, l, n, K) : Vn(K) ? new Mn(K, K) : zn(K) ? new Nn(K) : aa.isAxiosError(K) ? (c || console.error("Axios error: " + i, ...K.cause ? [K.cause] : []), new On(K)) : (c || console.error("AnzuFatalError: ", K), new Rt(K));
323
+ throw $n(B) ? B : Tn(B) ? new Fn(B, B.config?.url) : Kn(B) ? new Bn(B, l, n, B) : Rn(B) ? new Ln(B, l, n, B) : Vn(B) ? new Mn(B, B) : zn(B) ? new Nn(B) : aa.isAxiosError(B) ? (c || console.error("Axios error: " + i, ...B.cause ? [B.cause] : []), new On(B)) : (c || console.error("AnzuFatalError: ", B), new Rt(B));
324
324
  } finally {
325
325
  h = null;
326
326
  }
@@ -335,82 +335,82 @@ const $i = /* @__PURE__ */ nt({
335
335
  system: l,
336
336
  entity: n,
337
337
  urlTemplate: i,
338
- urlParams: v,
338
+ urlParams: m,
339
339
  options: w = {},
340
- silentConsoleError: D = !1
340
+ silentConsoleError: E = !1
341
341
  } = e;
342
- let g = null;
342
+ let b = null;
343
343
  return {
344
- executeFetch: async (S, j, M = {}) => {
345
- g = new AbortController();
344
+ executeFetch: async (I, j, M = {}) => {
345
+ b = new AbortController();
346
346
  const {
347
- urlTemplate: p,
347
+ urlTemplate: g,
348
348
  urlParams: z,
349
349
  sortBy: q = "id",
350
- sortDesc: K = !0,
351
- batchSize: G = 100,
352
- forceElastic: E = !1
350
+ sortDesc: B = !0,
351
+ batchSize: X = 100,
352
+ forceElastic: D = !1
353
353
  } = M;
354
354
  try {
355
- const r = j.general.elastic || E ? "/search" : "", f = Bt(z) ? z : v, T = Bt(p) ? p : i;
356
- if (Ae(T)) throw new Error("Url template is undefined");
357
- const { pagination: P } = Un(q, K ? tt.Desc : tt.Asc, {
358
- rowsPerPage: G
359
- }), Q = (Ae(f) ? T : In(T, f)) + r, re = [], oe = await k().get(
360
- Q + Qt(P, S, j),
355
+ const s = j.general.elastic || D ? "/search" : "", f = Bt(z) ? z : m, T = Bt(g) ? g : i;
356
+ if (Ie(T)) throw new Error("Url template is undefined");
357
+ const { pagination: P } = Un(q, B ? Ze.Desc : Ze.Asc, {
358
+ rowsPerPage: X
359
+ }), Y = (Ie(f) ? T : In(T, f)) + s, ce = [], ne = await k().get(
360
+ Y + Qt(P, I, j),
361
361
  {
362
362
  ...w,
363
- signal: g.signal
363
+ signal: b.signal
364
364
  }
365
365
  );
366
- if (!Pn(oe.status))
367
- throw new Dn(oe.status);
368
- if (oe.data) {
369
- const le = oe.data;
370
- if (re.push(...le.data), Na(le))
366
+ if (!Pn(ne.status))
367
+ throw new En(ne.status);
368
+ if (ne.data) {
369
+ const le = ne.data;
370
+ if (ce.push(...le.data), Na(le))
371
371
  for (P.value.hasNextPage = le.hasNextPage; P.value.hasNextPage; ) {
372
372
  P.value.page++;
373
- const Le = (await k().get(
374
- Q + Qt(P, S, j),
373
+ const Re = (await k().get(
374
+ Y + Qt(P, I, j),
375
375
  {
376
376
  ...w,
377
- signal: g.signal
377
+ signal: b.signal
378
378
  }
379
379
  )).data;
380
- re.push(...Le.data), P.value.hasNextPage = Le.hasNextPage;
380
+ ce.push(...Re.data), P.value.hasNextPage = Re.hasNextPage;
381
381
  }
382
382
  else if (Oa(le)) {
383
383
  if (P.value.totalCount = le.totalCount, P.value.totalCount <= P.value.rowsPerPage)
384
- return re;
385
- const te = [], Le = Math.ceil(P.value.totalCount / P.value.rowsPerPage);
386
- for (let m = 1; m < Le; m++) {
387
- const C = { ...P.value, page: m + 1 }, F = me(C);
388
- te.push(
389
- k().get(Q + Qt(F, S, j), {
384
+ return ce;
385
+ const ie = [], Re = Math.ceil(P.value.totalCount / P.value.rowsPerPage);
386
+ for (let v = 1; v < Re; v++) {
387
+ const C = { ...P.value, page: v + 1 }, F = de(C);
388
+ ie.push(
389
+ k().get(Y + Qt(F, I, j), {
390
390
  ...w,
391
- signal: g.signal
391
+ signal: b.signal
392
392
  })
393
393
  );
394
394
  }
395
- (await Promise.all(te)).forEach((m) => {
396
- re.push(...m.data.data);
395
+ (await Promise.all(ie)).forEach((v) => {
396
+ ce.push(...v.data.data);
397
397
  });
398
398
  }
399
- return re;
399
+ return ce;
400
400
  }
401
- if (oe.status === En)
401
+ if (ne.status === Dn)
402
402
  return [];
403
403
  throw new Rt();
404
- } catch (r) {
405
- if (r instanceof DOMException && r.name === "AbortError")
404
+ } catch (s) {
405
+ if (s instanceof DOMException && s.name === "AbortError")
406
406
  return [];
407
- throw $n(r) ? r : Tn(r) ? new Fn(r, r.config?.url) : Kn(r) ? new Bn(r, l, n, r) : Rn(r) ? new Ln(r, l, n, r) : Vn(r) ? new Mn(r, r) : zn(r) ? new Nn(r) : aa.isAxiosError(r) ? (D || console.error("Axios error: " + i, ...r.cause ? [r.cause] : []), new On(r)) : (D || console.error("AnzuFatalError: ", r), new Rt(r));
407
+ throw $n(s) ? s : Tn(s) ? new Fn(s, s.config?.url) : Kn(s) ? new Bn(s, l, n, s) : Rn(s) ? new Ln(s, l, n, s) : Vn(s) ? new Mn(s, s) : zn(s) ? new Nn(s) : aa.isAxiosError(s) ? (E || console.error("Axios error: " + i, ...s.cause ? [s.cause] : []), new On(s)) : (E || console.error("AnzuFatalError: ", s), new Rt(s));
408
408
  } finally {
409
- g = null;
409
+ b = null;
410
410
  }
411
411
  },
412
412
  abortFetch: () => {
413
- g && g.abort();
413
+ b && b.abort();
414
414
  }
415
415
  };
416
416
  }, $t = "/adm/v1/job", Tt = "job";
@@ -419,8 +419,8 @@ function Bi(e, k) {
419
419
  useFetchJobList: () => Ga({ client: e, system: k, entity: Tt, urlTemplate: $t }),
420
420
  fetchJob: (w) => Ha(e, $t + "/:id", { id: w }, k, Tt),
421
421
  createJob: (w) => {
422
- const D = ja(w._resourceName).slice(4).replace("-kind-", "-kind/");
423
- return qa(e, w, $t + "/:type", { type: D }, k, Tt);
422
+ const E = ja(w._resourceName).slice(4).replace("-kind-", "-kind/");
423
+ return qa(e, w, $t + "/:type", { type: E }, k, Tt);
424
424
  },
425
425
  deleteJob: (w) => Ua(e, $t + "/:id", { id: w }, k, Tt)
426
426
  };
@@ -437,29 +437,29 @@ const zo = {
437
437
  showExpand: !1
438
438
  };
439
439
  function Oo(e, k, l, n, i = {}) {
440
- const v = { ...No, ...i }, w = v.customI18n ?? Ja, { t: D } = w.global || w;
441
- let g;
442
- Qa(v.storeColumnsLocalStorage) ? g = v.storeColumnsLocalStorage : Za(v.storeColumnsLocalStorage) && v.storeColumnsLocalStorage === !0 && (g = "table_" + l + "_" + n);
440
+ const m = { ...No, ...i }, w = m.customI18n ?? Ja, { t: E } = w.global || w;
441
+ let b;
442
+ Qa(m.storeColumnsLocalStorage) ? b = m.storeColumnsLocalStorage : Za(m.storeColumnsLocalStorage) && m.storeColumnsLocalStorage === !0 && (b = "table_" + l + "_" + n);
443
443
  const c = e.map((M) => {
444
- const p = { ...zo, ...M };
445
- return Ae(p.title) && (Ae(p.title) && Wa.includes(p.key) ? p.title = D("common.model.tracking." + p.key) : Ae(p.title) && l && n ? p.title = D(l + "." + n + ".model." + p.key) : p.title = ""), p;
446
- }), h = A(() => {
444
+ const g = { ...zo, ...M };
445
+ return Ie(g.title) && (Ie(g.title) && Wa.includes(g.key) ? g.title = E("common.model.tracking." + g.key) : Ie(g.title) && l && n ? g.title = E(l + "." + n + ".model." + g.key) : g.title = ""), g;
446
+ }), h = S(() => {
447
447
  const M = [];
448
- return v.showExpand && M.push({ key: "data-table-expand", sortable: !1 }), c.forEach((p) => {
449
- k.value.includes(p.key) || M.push(p);
450
- }), v.disableActions || M.push({ key: "actions", sortable: !1, fixed: "end" }), M;
451
- }), S = () => {
452
- if (!g || !localStorage) return;
453
- const M = localStorage.getItem(g);
448
+ return m.showExpand && M.push({ key: "data-table-expand", sortable: !1 }), c.forEach((g) => {
449
+ k.value.includes(g.key) || M.push(g);
450
+ }), m.disableActions || M.push({ key: "actions", sortable: !1, fixed: "end" }), M;
451
+ }), I = () => {
452
+ if (!b || !localStorage) return;
453
+ const M = localStorage.getItem(b);
454
454
  if (!M) return;
455
- const p = JSON.parse(M);
456
- Xa(p) && Ya(p.hidden) && (k.value = p.hidden);
455
+ const g = JSON.parse(M);
456
+ Xa(g) && Ya(g.hidden) && (k.value = g.hidden);
457
457
  }, j = (M) => {
458
- !g || !localStorage || localStorage.setItem(g, JSON.stringify({ hidden: M }));
458
+ !b || !localStorage || localStorage.setItem(b, JSON.stringify({ hidden: M }));
459
459
  };
460
460
  return en(() => {
461
- S();
462
- }), Re(k, (M) => {
461
+ I();
462
+ }), $e(k, (M) => {
463
463
  j(M);
464
464
  }), {
465
465
  columnsAll: c,
@@ -467,84 +467,84 @@ function Oo(e, k, l, n, i = {}) {
467
467
  columnsHidden: k
468
468
  };
469
469
  }
470
- function Ri(e, k, l, n, i, v, w, D = null, g = void 0, c = !1) {
471
- const h = me(!1), S = me([]), j = me([]), M = me(!1), { pagination: p, setSortBy: z, incrementPage: q } = Un(
472
- kt(D) ? null : D.key,
473
- D?.order
474
- ), { resetFilter: K, submitFilter: G } = _a(v, w, {
470
+ function Ri(e, k, l, n, i, m, w, E = null, b = void 0, c = !1) {
471
+ const h = de(!1), I = de([]), j = de([]), M = de(!1), { pagination: g, setSortBy: z, incrementPage: q } = Un(
472
+ kt(E) ? null : E.key,
473
+ E?.order
474
+ ), { resetFilter: B, submitFilter: X } = _a(m, w, {
475
475
  storeFiltersLocalStorage: !1,
476
476
  populateUrlParams: !1
477
- }), { showErrorsDefault: E } = jn(), { columnsVisible: r, columnsAll: f, columnsHidden: T } = Oo(
477
+ }), { showErrorsDefault: D } = jn(), { columnsVisible: s, columnsAll: f, columnsHidden: T } = Oo(
478
478
  e,
479
479
  k,
480
480
  l,
481
481
  n,
482
482
  { storeColumnsLocalStorage: !1, disableActions: !c }
483
483
  ), P = () => {
484
- oe(), te();
485
- }, Q = ($) => {
486
- z($.sortBy), te();
487
- }, re = async () => {
484
+ ne(), ie();
485
+ }, Y = ($) => {
486
+ z($.sortBy), ie();
487
+ }, ce = async () => {
488
488
  M.value = !0, q();
489
489
  try {
490
- const $ = await i(p, v, w, g);
491
- S.value.push(...$);
490
+ const $ = await i(g, m, w, b);
491
+ I.value.push(...$);
492
492
  } catch ($) {
493
- E($);
493
+ D($);
494
494
  } finally {
495
495
  M.value = !1;
496
496
  }
497
- }, oe = () => {
498
- S.value = [], j.value = [];
497
+ }, ne = () => {
498
+ I.value = [], j.value = [];
499
499
  }, le = async () => {
500
500
  M.value = !0;
501
501
  try {
502
- S.value = await i(
503
- p,
504
- v,
502
+ I.value = await i(
503
+ g,
504
+ m,
505
505
  w,
506
- g
506
+ b
507
507
  );
508
508
  } catch ($) {
509
- E($);
509
+ D($);
510
510
  } finally {
511
511
  M.value = !1;
512
512
  }
513
- }, te = xo(async () => {
513
+ }, ie = xo(async () => {
514
514
  await le();
515
515
  });
516
516
  return {
517
- items: S,
517
+ items: I,
518
518
  selected: j,
519
- pagination: p,
520
- columnsVisible: r,
519
+ pagination: g,
520
+ columnsVisible: s,
521
521
  columnsHidden: T,
522
522
  columnsAll: f,
523
523
  filterTouched: h,
524
524
  loading: M,
525
525
  onRowClick: ($) => {
526
- const m = $.target;
527
- if (!m || m.tagName === "INPUT" && m.type === "checkbox")
526
+ const v = $.target;
527
+ if (!v || v.tagName === "INPUT" && v.type === "checkbox")
528
528
  return;
529
- const C = m.closest(".v-data-table__tr");
529
+ const C = v.closest(".v-data-table__tr");
530
530
  if (!C || !C.classList.contains("v-data-table__tr")) return;
531
531
  const F = C.firstElementChild;
532
532
  if (!F || !F.classList.contains("v-data-table__td")) return;
533
- const B = F.querySelector("input");
534
- B && B.click();
533
+ const K = F.querySelector("input");
534
+ K && K.click();
535
535
  },
536
- onFetchNextPage: re,
536
+ onFetchNextPage: ce,
537
537
  onOpen: P,
538
- sortByChange: Q,
539
- getList: te,
540
- resetFilter: () => K(p, te),
541
- submitFilter: () => G(p, te)
538
+ sortByChange: Y,
539
+ getList: ie,
540
+ resetFilter: () => B(g, ie),
541
+ submitFilter: () => X(g, ie)
542
542
  };
543
543
  }
544
544
  const Uo = { class: "d-flex flex-column w-100 px-1 align-center" }, jo = { class: "d-flex justify-space-between w-100 align-center" }, qo = { class: "d-flex align-center" }, Ho = { class: "d-flex align-center" }, Go = { class: "subject-select__sidebar system-border-r" }, Jo = { class: "subject-select-filter" }, Wo = { class: "subject-select__content" }, Xo = {
545
545
  key: 0,
546
546
  class: "d-flex w-100 align-center justify-center pa-4"
547
- }, Yo = { class: "subject-select__actions system-border-t" }, Qo = { key: 0 }, Zo = { key: 1 }, Li = /* @__PURE__ */ nt({
547
+ }, Yo = { class: "subject-select__actions system-border-t" }, Qo = { key: 0 }, Zo = { key: 1 }, Li = /* @__PURE__ */ _e({
548
548
  __name: "ASubjectSelect",
549
549
  props: {
550
550
  selectedItems: {},
@@ -559,75 +559,75 @@ const Uo = { class: "d-flex flex-column w-100 px-1 align-center" }, jo = { class
559
559
  },
560
560
  emits: ["update:modelValue", "update:pagination", "onOpen", "onPageChange", "onConfirm", "onFetchNextPage"],
561
561
  setup(e, { expose: k, emit: l }) {
562
- const n = e, i = l, v = me(!1), w = A({
562
+ const n = e, i = l, m = de(!1), w = S({
563
563
  get() {
564
- return Ae(n.modelValue) ? v.value : n.modelValue;
564
+ return Ie(n.modelValue) ? m.value : n.modelValue;
565
565
  },
566
566
  set(P) {
567
- v.value = P, i("update:modelValue", P);
567
+ m.value = P, i("update:modelValue", P);
568
568
  }
569
- }), D = A({
569
+ }), E = S({
570
570
  get: () => n.pagination,
571
571
  set: (P) => {
572
572
  i("update:pagination", { ...pn(P) });
573
573
  }
574
- }), { mdAndDown: g } = oa(), c = me(!g.value), h = () => {
575
- g.value && (c.value = !1);
574
+ }), { mdAndDown: b } = oa(), c = de(!b.value), h = () => {
575
+ b.value && (c.value = !1);
576
576
  };
577
577
  _t(eo, h);
578
- const { t: S } = it(), j = A(() => n.selectedItems.length), M = A(() => j.value < n.minCount || j.value > n.maxCount), p = () => {
579
- i("onOpen"), c.value = !g.value, w.value = !0;
578
+ const { t: I } = lt(), j = S(() => n.selectedItems.length), M = S(() => j.value < n.minCount || j.value > n.maxCount), g = () => {
579
+ i("onOpen"), c.value = !b.value, w.value = !0;
580
580
  }, z = () => {
581
581
  c.value = !c.value;
582
582
  }, q = () => {
583
583
  w.value = !1;
584
- }, K = () => {
584
+ }, B = () => {
585
585
  i(
586
586
  "onConfirm",
587
587
  n.selectedItems.map((P) => pn(P))
588
588
  ), q();
589
- }, G = () => {
589
+ }, X = () => {
590
590
  i("onFetchNextPage");
591
- }, E = () => {
591
+ }, D = () => {
592
592
  i("onPageChange");
593
- }, r = A(() => Math.ceil(D.value.totalCount / D.value.rowsPerPage)), f = A(() => !(kt(D.value.hasNextPage) && D.value.page === r.value || D.value.hasNextPage === !1)), T = (P) => {
594
- P && f.value && !n.loading && G();
593
+ }, s = S(() => Math.ceil(E.value.totalCount / E.value.rowsPerPage)), f = S(() => !(kt(E.value.hasNextPage) && E.value.page === s.value || E.value.hasNextPage === !1)), T = (P) => {
594
+ P && f.value && !n.loading && X();
595
595
  };
596
596
  return en(() => {
597
- n.autoOpen && p();
597
+ n.autoOpen && g();
598
598
  }), k({
599
- open: p,
599
+ open: g,
600
600
  closeSidebarOnMobile: h
601
- }), (P, Q) => {
602
- const re = bn("ABtnSecondary"), oe = bn("ABtnPrimary");
603
- return x(), N(we, null, [
601
+ }), (P, Y) => {
602
+ const ce = bn("ABtnSecondary"), ne = bn("ABtnPrimary");
603
+ return x(), N(xe, null, [
604
604
  O(P.$slots, "activator", {
605
- props: { onClick: ue(() => p(), ["stop"]) }
605
+ props: { onClick: fe(() => g(), ["stop"]) }
606
606
  }),
607
- s(an, fe(P.$attrs, {
607
+ r(an, ve(P.$attrs, {
608
608
  "model-value": w.value,
609
609
  fullscreen: "",
610
610
  class: "subject-select",
611
- "onUpdate:modelValue": Q[1] || (Q[1] = (le) => i("update:modelValue", le))
611
+ "onUpdate:modelValue": Y[1] || (Y[1] = (le) => i("update:modelValue", le))
612
612
  }), {
613
613
  default: u(() => [
614
- w.value ? (x(), ee(nn, {
614
+ w.value ? (x(), te(nn, {
615
615
  key: 0,
616
616
  class: "subject-select__card"
617
617
  }, {
618
618
  default: u(() => [
619
- s(to, {
619
+ r(to, {
620
620
  class: "subject-select__toolbar system-border-b",
621
621
  onOnCancel: q
622
622
  }, {
623
623
  default: u(() => [
624
624
  O(P.$slots, "title", {}, () => [
625
- Y(L(y(S)(e.dialogTitleT)), 1)
625
+ Q(V(y(I)(e.dialogTitleT)), 1)
626
626
  ])
627
627
  ]),
628
628
  _: 3
629
629
  }),
630
- s(So, {
630
+ r(Ao, {
631
631
  density: "compact",
632
632
  color: "transparent",
633
633
  height: 46,
@@ -639,23 +639,23 @@ const Uo = { class: "d-flex flex-column w-100 px-1 align-center" }, jo = { class
639
639
  U("div", Uo, [
640
640
  U("div", jo, [
641
641
  U("div", qo, [
642
- s(ie, {
642
+ r(se, {
643
643
  icon: "",
644
644
  width: 30,
645
645
  height: 30,
646
646
  onClick: z
647
647
  }, {
648
648
  default: u(() => [
649
- s(de, {
649
+ r(re, {
650
650
  icon: "mdi-tune",
651
651
  size: 16
652
652
  }),
653
- s(Je, {
653
+ r(qe, {
654
654
  activator: "parent",
655
655
  location: "bottom"
656
656
  }, {
657
657
  default: u(() => [
658
- Y(L(y(S)("common.subjectSelect.filter.toggle")), 1)
658
+ Q(V(y(I)("common.subjectSelect.filter.toggle")), 1)
659
659
  ]),
660
660
  _: 1
661
661
  })
@@ -674,7 +674,7 @@ const Uo = { class: "d-flex flex-column w-100 px-1 align-center" }, jo = { class
674
674
  _: 3
675
675
  }),
676
676
  U("div", {
677
- class: He(["subject-select__main", { "subject-select__main--sidebar-active": c.value }])
677
+ class: Ue(["subject-select__main", { "subject-select__main--sidebar-active": c.value }])
678
678
  }, [
679
679
  U("div", Go, [
680
680
  U("div", Jo, [
@@ -684,14 +684,14 @@ const Uo = { class: "d-flex flex-column w-100 px-1 align-center" }, jo = { class
684
684
  U("div", Wo, [
685
685
  O(P.$slots, "content"),
686
686
  e.paginationMode === "more" ? (x(), N("div", Xo, [
687
- po((x(), ee(re, {
687
+ po((x(), te(ce, {
688
688
  loading: e.loading,
689
689
  size: "small",
690
- onClick: G
690
+ onClick: X
691
691
  }, {
692
692
  default: u(() => [
693
693
  O(P.$slots, "button-confirm-title", {}, () => [
694
- Y(L(y(S)("common.button.loadMore")), 1)
694
+ Q(V(y(I)("common.button.loadMore")), 1)
695
695
  ])
696
696
  ]),
697
697
  _: 3
@@ -704,31 +704,31 @@ const Uo = { class: "d-flex flex-column w-100 px-1 align-center" }, jo = { class
704
704
  { quiet: !0 }
705
705
  ]
706
706
  ])
707
- ])) : (x(), ee(Vo, {
707
+ ])) : (x(), te(Vo, {
708
708
  key: 1,
709
- modelValue: D.value,
710
- "onUpdate:modelValue": Q[0] || (Q[0] = (le) => D.value = le),
711
- onChange: E
709
+ modelValue: E.value,
710
+ "onUpdate:modelValue": Y[0] || (Y[0] = (le) => E.value = le),
711
+ onChange: D
712
712
  }, null, 8, ["modelValue"]))
713
713
  ])
714
714
  ], 2),
715
715
  U("div", Yo, [
716
- e.minCount === e.maxCount ? (x(), N("div", Qo, L(y(S)("common.subjectSelect.texts.pickExactCount", {
716
+ e.minCount === e.maxCount ? (x(), N("div", Qo, V(y(I)("common.subjectSelect.texts.pickExactCount", {
717
717
  count: e.minCount,
718
718
  selected: j.value
719
- })), 1)) : (x(), N("div", Zo, L(y(S)("common.subjectSelect.texts.pickRangeCount", {
719
+ })), 1)) : (x(), N("div", Zo, V(y(I)("common.subjectSelect.texts.pickRangeCount", {
720
720
  minCount: e.minCount,
721
721
  maxCount: e.maxCount,
722
722
  selected: j.value
723
723
  })), 1)),
724
- s(on),
725
- s(oe, {
724
+ r(on),
725
+ r(ne, {
726
726
  disabled: M.value,
727
- onClick: ue(K, ["stop"])
727
+ onClick: fe(B, ["stop"])
728
728
  }, {
729
729
  default: u(() => [
730
730
  O(P.$slots, "button-confirm-title", {}, () => [
731
- Y(L(y(S)("common.button.confirm")), 1)
731
+ Q(V(y(I)("common.button.confirm")), 1)
732
732
  ])
733
733
  ]),
734
734
  _: 3
@@ -736,7 +736,7 @@ const Uo = { class: "d-flex flex-column w-100 px-1 align-center" }, jo = { class
736
736
  ])
737
737
  ]),
738
738
  _: 3
739
- })) : Z("", !0)
739
+ })) : _("", !0)
740
740
  ]),
741
741
  _: 3
742
742
  }, 16, ["model-value"])
@@ -758,7 +758,7 @@ const Uo = { class: "d-flex flex-column w-100 px-1 align-center" }, jo = { class
758
758
  }, al = {
759
759
  key: 3,
760
760
  class: "a-le-state a-le-state--empty"
761
- }, ol = ["data-id", "tabindex", "onKeydown"], ll = ["onClick"], il = { class: "a-le-row-main" }, rl = { class: "a-le-title" }, sl = {
761
+ }, ol = ["data-id", "tabindex", "onKeydown"], ll = ["onClick"], il = { class: "a-le-row-main" }, sl = { class: "a-le-title" }, rl = {
762
762
  key: 0,
763
763
  class: "a-le-status"
764
764
  }, dl = {
@@ -774,9 +774,9 @@ const Uo = { class: "d-flex flex-column w-100 px-1 align-center" }, jo = { class
774
774
  class: "a-le-sr-only",
775
775
  "aria-live": "polite",
776
776
  role: "status"
777
- }, Vi = /* @__PURE__ */ nt({
777
+ }, Vi = /* @__PURE__ */ _e({
778
778
  __name: "AListEditor",
779
- props: /* @__PURE__ */ Qe({
779
+ props: /* @__PURE__ */ We({
780
780
  factory: { type: Function, default: void 0 },
781
781
  getKey: { type: [String, Function], default: void 0 },
782
782
  position: { type: [String, Boolean, Object], default: void 0 },
@@ -814,207 +814,207 @@ const Uo = { class: "d-flex flex-column w-100 px-1 align-center" }, jo = { class
814
814
  modelValue: { required: !0 },
815
815
  modelModifiers: {}
816
816
  }),
817
- emits: /* @__PURE__ */ Qe(["edit", "deleted", "close", "item-saved", "item-expand"], ["update:modelValue"]),
817
+ emits: /* @__PURE__ */ We(["edit", "deleted", "close", "item-saved", "item-expand"], ["update:modelValue"]),
818
818
  setup(e, { expose: k, emit: l }) {
819
- const n = e, i = l, v = yt(e, "modelValue"), { t: w } = it(), D = ea(), g = oa(), c = Lt("rootEl"), h = A(() => g.platform.value.touch), S = n.editor ?? no({
820
- get: () => v.value,
821
- set: (a) => v.value = a,
819
+ const n = e, i = l, m = yt(e, "modelValue"), { t: w } = lt(), E = ea(), b = oa(), c = Lt("rootEl"), h = S(() => b.platform.value.touch), I = n.editor ?? no({
820
+ get: () => m.value,
821
+ set: (a) => m.value = a,
822
822
  factory: n.factory,
823
823
  getKey: n.getKey,
824
824
  position: n.position,
825
825
  dirtyExclude: () => n.dirtyExclude ?? [],
826
826
  validate: n.validate
827
- }), j = n.getKey ?? "id", M = (a) => typeof j == "function" ? j(a) : a[j], p = A(
827
+ }), j = n.getKey ?? "id", M = (a) => typeof j == "function" ? j(a) : a[j], g = S(
828
828
  () => typeof j == "function" ? "(fn)" : j
829
- ), z = A(() => {
829
+ ), z = S(() => {
830
830
  const a = n.position;
831
831
  return a === void 0 || a === !1 ? "position" : typeof a == "object" ? a.field : a;
832
- }), q = A(
833
- () => v.value.map((a, W) => ({
832
+ }), q = S(
833
+ () => m.value.map((a, H) => ({
834
834
  key: M(a),
835
- index: W,
835
+ index: H,
836
836
  raw: a,
837
837
  position: a[z.value]
838
838
  }))
839
- ), K = /* @__PURE__ */ new Set(), G = (a) => {
840
- const W = /* @__PURE__ */ new Set(), b = /* @__PURE__ */ new Set();
841
- let pe = 0;
842
- for (const Ue of a) {
843
- if (Ue.key === void 0 || Ue.key === null) {
844
- pe++;
839
+ ), B = /* @__PURE__ */ new Set(), X = (a) => {
840
+ const H = /* @__PURE__ */ new Set(), p = /* @__PURE__ */ new Set();
841
+ let he = 0;
842
+ for (const ze of a) {
843
+ if (ze.key === void 0 || ze.key === null) {
844
+ he++;
845
845
  continue;
846
846
  }
847
- W.has(Ue.key) && b.add(String(Ue.key)), W.add(Ue.key);
847
+ H.has(ze.key) && p.add(String(ze.key)), H.add(ze.key);
848
848
  }
849
- if (pe === 0 && b.size === 0) return;
850
- const _e = `${pe}|${[...b].sort().join(",")}`;
851
- K.has(_e) || (K.add(_e), pe > 0 && console.warn(
852
- `[list-editor] ${pe} row(s) resolve to an undefined key (key-field "${p.value}"). Point get-key at a field every item has, or give new items unique temp ids (see nextListEditorTempId).`
853
- ), b.size > 0 && console.warn(
854
- `[list-editor] duplicate row keys (key-field "${p.value}"): ${[...b].join(", ")}. Row keys must be unique — dirty tracking and validation rails target rows by key.`
849
+ if (he === 0 && p.size === 0) return;
850
+ const Ye = `${he}|${[...p].sort().join(",")}`;
851
+ B.has(Ye) || (B.add(Ye), he > 0 && console.warn(
852
+ `[list-editor] ${he} row(s) resolve to an undefined key (key-field "${g.value}"). Point get-key at a field every item has, or give new items unique temp ids (see nextListEditorTempId).`
853
+ ), p.size > 0 && console.warn(
854
+ `[list-editor] duplicate row keys (key-field "${g.value}"): ${[...p].join(", ")}. Row keys must be unique — dirty tracking and validation rails target rows by key.`
855
855
  ));
856
856
  };
857
- Re(q, (a) => G(a), { immediate: !0 });
858
- const E = me(/* @__PURE__ */ new Set()), r = Lt("rowsContainer"), f = A(() => !n.chips && !!D.item), T = A(() => !n.chips && !!D["item-readonly"]), {
857
+ $e(q, (a) => X(a), { immediate: !0 });
858
+ const D = de(/* @__PURE__ */ new Set()), s = Lt("rowsContainer"), f = S(() => !n.chips && !!E.item), T = S(() => !n.chips && !!E["item-readonly"]), {
859
859
  editingKeys: P,
860
- editingSnapshots: Q,
861
- beginEdit: re,
862
- cancelEdit: oe,
860
+ editingSnapshots: Y,
861
+ beginEdit: ce,
862
+ cancelEdit: ne,
863
863
  commitEdit: le,
864
- closeEdit: te,
865
- requestAutoOpen: Le
864
+ closeEdit: ie,
865
+ requestAutoOpen: Re
866
866
  } = qn({
867
- rowsContainer: r,
867
+ rowsContainer: s,
868
868
  rowSelector: ".a-le-row",
869
869
  isInlineEdit: f,
870
- restoreSnapshot: (a, W) => S.updateItem(a, W),
871
- watchKeys: () => v.value.map((a) => M(a)),
870
+ restoreSnapshot: (a, H) => I.updateItem(a, H),
871
+ watchKeys: () => m.value.map((a) => M(a)),
872
872
  findEntry: (a) => {
873
- const W = v.value.find((b) => M(b) === a);
874
- return W ? { data: W } : null;
873
+ const H = m.value.find((p) => M(p) === a);
874
+ return H ? { data: H } : null;
875
875
  },
876
876
  afterAutoOpen: (a) => {
877
- E.value.delete(a);
877
+ D.value.delete(a);
878
878
  }
879
- }), $ = A(
879
+ }), $ = S(
880
880
  () => n.addLabel ? w(n.addLabel) : w("common.sortable.add")
881
- ), m = A(() => n.emptyTitle ?? w("common.sortable.emptyTitle")), C = A(
881
+ ), v = S(() => n.emptyTitle ?? w("common.sortable.emptyTitle")), C = S(
882
882
  () => n.deleteConfirmTitle ?? w("common.sortable.deleteConfirmTitle")
883
- ), F = A(
883
+ ), F = S(
884
884
  () => n.deleteConfirmText ?? w("common.sortable.deleteConfirmText")
885
- ), B = A(() => !n.readonly && !n.disabled && !n.loading), X = A(() => B.value && n.showAddButton), _ = A(() => !!(n.title || D.header)), ce = A(() => !!n.onItemSave), ne = /* @__PURE__ */ new Map(), ve = A(() => {
886
- const a = [], W = /* @__PURE__ */ new Set();
887
- for (const b of q.value) {
888
- W.add(b.key);
889
- const pe = P.value.has(b.key), _e = E.value.has(b.key), Ue = n.loadingKeys?.has(b.key) ?? !1, Te = n.disableUnsaved || n.readonly ? !1 : S.isUnsaved(b.key), xt = Te, ct = S.rowState(b.raw, b.key), Fe = ne.get(b.key);
890
- if (Fe && Fe.raw === b.raw && Fe.index === b.index && Fe.position === b.position && Fe.editing === pe && Fe.expanded === _e && Fe.loading === Ue && Fe.dirty === xt && Fe.unsaved === Te && Fe.validationState === ct) {
885
+ ), K = S(() => !n.readonly && !n.disabled && !n.loading), J = S(() => K.value && n.showAddButton), ee = S(() => !!(n.title || E.header)), ue = S(() => !!n.onItemSave), ae = /* @__PURE__ */ new Map(), me = S(() => {
886
+ const a = [], H = /* @__PURE__ */ new Set();
887
+ for (const p of q.value) {
888
+ H.add(p.key);
889
+ const he = P.value.has(p.key), Ye = D.value.has(p.key), ze = n.loadingKeys?.has(p.key) ?? !1, Te = n.disableUnsaved || n.readonly ? !1 : I.isUnsaved(p.key), xt = Te, ct = I.rowState(p.raw, p.key), Fe = ae.get(p.key);
890
+ if (Fe && Fe.raw === p.raw && Fe.index === p.index && Fe.position === p.position && Fe.editing === he && Fe.expanded === Ye && Fe.loading === ze && Fe.dirty === xt && Fe.unsaved === Te && Fe.validationState === ct) {
891
891
  a.push(Fe);
892
892
  continue;
893
893
  }
894
- const At = {
895
- ...b,
896
- editing: pe,
897
- expanded: _e,
898
- loading: Ue,
894
+ const St = {
895
+ ...p,
896
+ editing: he,
897
+ expanded: Ye,
898
+ loading: ze,
899
899
  dirty: xt,
900
900
  unsaved: Te,
901
901
  validationState: ct
902
902
  };
903
- ne.set(b.key, At), a.push(At);
903
+ ae.set(p.key, St), a.push(St);
904
904
  }
905
- for (const b of ne.keys())
906
- W.has(b) || ne.delete(b);
905
+ for (const p of ae.keys())
906
+ H.has(p) || ae.delete(p);
907
907
  return a;
908
- }), Ce = A(() => ve.value.length === 0), ge = (a) => ve.value.find((W) => W.key === a), Ve = Hn({
909
- viewItems: A(() => ve.value.map((a) => ({ key: a.key }))),
908
+ }), Se = S(() => me.value.length === 0), we = (a) => me.value.find((H) => H.key === a), Le = Hn({
909
+ viewItems: S(() => me.value.map((a) => ({ key: a.key }))),
910
910
  variant: "flat",
911
- isReorderMode: me(!1),
912
- disabled: A(() => !B.value),
911
+ isReorderMode: de(!1),
912
+ disabled: S(() => !K.value),
913
913
  isEditing: (a) => P.value.has(a),
914
914
  onToggleEdit: (a) => {
915
- const W = ge(a);
916
- W && qe(W);
915
+ const H = we(a);
916
+ H && Oe(H);
917
917
  },
918
918
  onCancelEdit: (a) => {
919
- const W = ge(a);
920
- W && Ie(W);
919
+ const H = we(a);
920
+ H && pe(H);
921
921
  }
922
- }), Xe = (a) => Zn(a, { compactField: n.compactField }), Se = () => {
923
- X.value && (Le(), S.addItem(void 0, void 0));
924
- }, xe = (a) => {
925
- B.value && (Le(), S.addItem(void 0, { afterId: a.key }));
926
- }, qe = (a) => {
927
- if (B.value) {
922
+ }), Ge = (a) => Zn(a, { compactField: n.compactField }), Pe = () => {
923
+ J.value && (Re(), I.addItem(void 0, void 0));
924
+ }, Ae = (a) => {
925
+ K.value && (Re(), I.addItem(void 0, { afterId: a.key }));
926
+ }, Oe = (a) => {
927
+ if (K.value) {
928
928
  if (P.value.has(a.key)) {
929
- Ie(a);
929
+ pe(a);
930
930
  return;
931
931
  }
932
- f.value && (re(a), E.value.delete(a.key)), i("edit", a);
932
+ f.value && (ce(a), D.value.delete(a.key)), i("edit", a);
933
933
  }
934
- }, Me = (a) => {
934
+ }, Ve = (a) => {
935
935
  if (n.disabled || n.loading) return;
936
- const W = a.key, b = E.value.has(W);
937
- if (b)
938
- E.value.delete(W);
936
+ const H = a.key, p = D.value.has(H);
937
+ if (p)
938
+ D.value.delete(H);
939
939
  else {
940
- for (const pe of E.value) E.value.delete(pe);
941
- E.value.add(W);
940
+ for (const he of D.value) D.value.delete(he);
941
+ D.value.add(H);
942
942
  }
943
- i("item-expand", a, !b);
944
- }, at = (a) => n.chips || n.disableRowClick || n.defaultExpanded || n.disabled || n.loading ? !1 : !!(a.editing || a.expanded || !n.readonly && n.showEditButton), ze = (a) => {
945
- if (at(a)) {
943
+ i("item-expand", a, !p);
944
+ }, et = (a) => n.chips || n.disableRowClick || n.defaultExpanded || n.disabled || n.loading ? !1 : !!(a.editing || a.expanded || !n.readonly && n.showEditButton), Me = (a) => {
945
+ if (et(a)) {
946
946
  if (a.editing || a.expanded) {
947
- Ie(a);
947
+ pe(a);
948
948
  return;
949
949
  }
950
- n.readonly && T.value ? Me(a) : qe(a);
950
+ n.readonly && T.value ? Ve(a) : Oe(a);
951
951
  }
952
952
  }, {
953
- deleteDialog: Ze,
954
- deleteInFlight: I,
955
- deleteError: V,
956
- onDeleteClick: H,
957
- onDeleteDialogConfirm: J,
958
- onDeleteDialogCancel: se
953
+ deleteDialog: Xe,
954
+ deleteInFlight: tt,
955
+ deleteError: rt,
956
+ onDeleteClick: dt,
957
+ onDeleteDialogConfirm: A,
958
+ onDeleteDialogCancel: L
959
959
  } = Gn({
960
960
  onDeleteConfirm: (a) => n.onDeleteConfirm ? n.onDeleteConfirm(a) : !0,
961
961
  onDelete: (a) => n.onDelete?.(a),
962
962
  onDeleted: (a) => {
963
- P.value.delete(a.key), Q.value.delete(a.key), E.value.delete(a.key), S.deleteItem(a.key), i("deleted", a);
963
+ P.value.delete(a.key), Y.value.delete(a.key), D.value.delete(a.key), I.deleteItem(a.key), i("deleted", a);
964
964
  },
965
965
  disableDeleteConfirm: () => n.disableDeleteConfirm || n.chips
966
- }), ke = async (a) => {
967
- B.value && await H(a);
968
- }, De = async (a) => {
966
+ }), G = async (a) => {
967
+ K.value && await dt(a);
968
+ }, W = async (a) => {
969
969
  n.onItemSave && await n.onItemSave(a.raw), le(a), i("item-saved", a);
970
- }, be = (a) => {
971
- oe(a);
972
- }, Ie = (a) => {
973
- te(a), E.value.delete(a.key), i("close", a);
974
- }, Ne = /* @__PURE__ */ new Map(), Oe = (a) => {
975
- let W = Ne.get(a);
976
- return W || (W = {
970
+ }, Z = (a) => {
971
+ ne(a);
972
+ }, pe = (a) => {
973
+ ie(a), D.value.delete(a.key), i("close", a);
974
+ }, Ce = /* @__PURE__ */ new Map(), ye = (a) => {
975
+ let H = Ce.get(a);
976
+ return H || (H = {
977
977
  edit: () => {
978
- const b = ge(a);
979
- b && qe(b);
978
+ const p = we(a);
979
+ p && Oe(p);
980
980
  },
981
981
  save: () => {
982
- const b = ge(a);
983
- if (b) return De(b);
982
+ const p = we(a);
983
+ if (p) return W(p);
984
984
  },
985
985
  cancel: () => {
986
- const b = ge(a);
987
- b && be(b);
986
+ const p = we(a);
987
+ p && Z(p);
988
988
  },
989
989
  close: () => {
990
- const b = ge(a);
991
- b && Ie(b);
990
+ const p = we(a);
991
+ p && pe(p);
992
992
  },
993
993
  delete: async () => {
994
- const b = ge(a);
995
- b && await ke(b);
994
+ const p = we(a);
995
+ p && await G(p);
996
996
  },
997
997
  addAfter: () => {
998
- const b = ge(a);
999
- b && xe(b);
998
+ const p = we(a);
999
+ p && Ae(p);
1000
1000
  },
1001
1001
  toggleExpand: () => {
1002
- const b = ge(a);
1003
- b && Me(b);
1002
+ const p = we(a);
1003
+ p && Ve(p);
1004
1004
  },
1005
- update: (b) => S.updateItem(a, b)
1006
- }, Ne.set(a, W)), W;
1005
+ update: (p) => I.updateItem(a, p)
1006
+ }, Ce.set(a, H)), H;
1007
1007
  };
1008
- Re(
1009
- () => ve.value,
1008
+ $e(
1009
+ () => me.value,
1010
1010
  (a) => {
1011
- if (Ne.size === 0) return;
1012
- const W = new Set(a.map((b) => b.key));
1013
- for (const b of Ne.keys())
1014
- W.has(b) || Ne.delete(b);
1011
+ if (Ce.size === 0) return;
1012
+ const H = new Set(a.map((p) => p.key));
1013
+ for (const p of Ce.keys())
1014
+ H.has(p) || Ce.delete(p);
1015
1015
  }
1016
1016
  );
1017
- const Ee = (a) => ({
1017
+ const be = (a) => ({
1018
1018
  item: a,
1019
1019
  raw: a.raw,
1020
1020
  index: a.index,
@@ -1026,23 +1026,23 @@ const Uo = { class: "d-flex flex-column w-100 px-1 align-center" }, jo = { class
1026
1026
  dirty: a.dirty,
1027
1027
  unsaved: a.unsaved,
1028
1028
  touch: h.value,
1029
- actions: Oe(a.key)
1029
+ actions: ye(a.key)
1030
1030
  });
1031
1031
  return Jn(
1032
- () => n.unsavedSectionLabel && !n.disableUnsaved ? { label: n.unsavedSectionLabel, dirty: S.hasUnsaved.value } : []
1032
+ () => n.unsavedSectionLabel && !n.disableUnsaved ? { label: n.unsavedSectionLabel, dirty: I.hasUnsaved.value } : []
1033
1033
  ), k({
1034
- ...S,
1034
+ ...I,
1035
1035
  // Opens invalid rows so a blocked save surfaces WHICH rows are wrong instead of a
1036
1036
  // collapsed red rail. The body is gated on `editing` not `expanded`, so drive
1037
1037
  // `beginEdit` not `expandedKeys` (QA 85050 B4-17). Shared via the helper.
1038
- validateAll: () => Wn(S, (a) => {
1039
- const W = q.value.find((b) => b.key === a);
1040
- W && re(W);
1038
+ validateAll: () => Wn(I, (a) => {
1039
+ const H = q.value.find((p) => p.key === a);
1040
+ H && ce(H);
1041
1041
  })
1042
- }), (a, W) => (x(), N("div", {
1042
+ }), (a, H) => (x(), N("div", {
1043
1043
  ref_key: "rootEl",
1044
1044
  ref: c,
1045
- class: He(["a-list-editor", [
1045
+ class: Ue(["a-list-editor", [
1046
1046
  `a-list-editor--two-rows-${e.twoRows}`,
1047
1047
  {
1048
1048
  "a-list-editor--readonly": e.readonly,
@@ -1054,82 +1054,82 @@ const Uo = { class: "d-flex flex-column w-100 px-1 align-center" }, jo = { class
1054
1054
  }, [
1055
1055
  U("div", {
1056
1056
  ref_key: "rowsContainer",
1057
- ref: r,
1057
+ ref: s,
1058
1058
  class: "a-le-card"
1059
1059
  }, [
1060
- _.value ? (x(), N("div", _o, [
1060
+ ee.value ? (x(), N("div", _o, [
1061
1061
  O(a.$slots, "header", { title: e.title }, () => [
1062
- e.title ? (x(), N("h3", el, L(e.title), 1)) : Z("", !0)
1062
+ e.title ? (x(), N("h3", el, V(e.title), 1)) : _("", !0)
1063
1063
  ])
1064
- ])) : Z("", !0),
1064
+ ])) : _("", !0),
1065
1065
  e.loading ? (x(), N("div", tl, [
1066
- s(ra, {
1066
+ r(sa, {
1067
1067
  indeterminate: "",
1068
1068
  color: "primary",
1069
1069
  size: "32"
1070
1070
  })
1071
1071
  ])) : e.error ? (x(), N("div", nl, [
1072
- s(ln, {
1072
+ r(ln, {
1073
1073
  type: "error",
1074
1074
  variant: "tonal",
1075
1075
  density: "compact",
1076
1076
  border: "start"
1077
1077
  }, {
1078
1078
  default: u(() => [
1079
- Y(L(e.error), 1)
1079
+ Q(V(e.error), 1)
1080
1080
  ]),
1081
1081
  _: 1
1082
1082
  })
1083
- ])) : Ce.value ? (x(), N("div", al, [
1083
+ ])) : Se.value ? (x(), N("div", al, [
1084
1084
  O(a.$slots, "empty", {
1085
1085
  readonly: e.readonly,
1086
1086
  disabled: e.disabled,
1087
- actions: { add: Se }
1087
+ actions: { add: Pe }
1088
1088
  }, () => [
1089
- s(Xn, {
1090
- title: m.value,
1089
+ r(Xn, {
1090
+ title: v.value,
1091
1091
  "add-label": $.value,
1092
- "can-add": X.value,
1093
- onAdd: Se
1092
+ "can-add": J.value,
1093
+ onAdd: Pe
1094
1094
  }, null, 8, ["title", "add-label", "can-add"])
1095
1095
  ])
1096
- ])) : (x(!0), N(we, { key: 4 }, dt(ve.value, (b) => (x(), N("div", {
1097
- key: String(b.key),
1098
- "data-id": String(b.key),
1096
+ ])) : (x(!0), N(xe, { key: 4 }, st(me.value, (p) => (x(), N("div", {
1097
+ key: String(p.key),
1098
+ "data-id": String(p.key),
1099
1099
  role: "listitem",
1100
- tabindex: y(Ve).rowTabindex(b.key),
1101
- class: He(["a-le-row", {
1100
+ tabindex: y(Le).rowTabindex(p.key),
1101
+ class: Ue(["a-le-row", {
1102
1102
  "a-le-row--two-rows": e.twoRows === "always",
1103
- "a-le-row--editing": b.editing,
1104
- "a-le-row--expanded": b.expanded,
1105
- "a-le-row--unsaved": b.unsaved,
1106
- "a-le-row--clickable": at(b),
1107
- [`a-le-row--validation-${b.validationState}`]: b.validationState !== null
1103
+ "a-le-row--editing": p.editing,
1104
+ "a-le-row--expanded": p.expanded,
1105
+ "a-le-row--unsaved": p.unsaved,
1106
+ "a-le-row--clickable": et(p),
1107
+ [`a-le-row--validation-${p.validationState}`]: p.validationState !== null
1108
1108
  }]),
1109
- onKeydown: (pe) => y(Ve).handleKeydown(b.key, pe)
1109
+ onKeydown: (he) => y(Le).handleKeydown(p.key, he)
1110
1110
  }, [
1111
- O(a.$slots, "before-item", fe({ ref_for: !0 }, Ee(b))),
1111
+ O(a.$slots, "before-item", ve({ ref_for: !0 }, be(p))),
1112
1112
  U("div", {
1113
1113
  class: "a-le-row-header",
1114
- onClick: (pe) => ze(b)
1114
+ onClick: (he) => Me(p)
1115
1115
  }, [
1116
1116
  U("div", il, [
1117
- O(a.$slots, "item-compact", fe({ ref_for: !0 }, Ee(b)), () => [
1118
- U("span", rl, L(Xe(b.raw)), 1)
1117
+ O(a.$slots, "item-compact", ve({ ref_for: !0 }, be(p)), () => [
1118
+ U("span", sl, V(Ge(p.raw)), 1)
1119
1119
  ]),
1120
- b.unsaved ? (x(), ee(Yn, {
1120
+ p.unsaved ? (x(), te(Yn, {
1121
1121
  key: 0,
1122
1122
  "dot-only": e.chips
1123
- }, null, 8, ["dot-only"])) : Z("", !0)
1123
+ }, null, 8, ["dot-only"])) : _("", !0)
1124
1124
  ]),
1125
- e.chips ? Z("", !0) : (x(), N("div", sl, [
1126
- O(a.$slots, "item-status", fe({ ref_for: !0 }, Ee(b)), () => [
1127
- e.statusField && b.raw[e.statusField] != null && b.raw[e.statusField] !== "" ? (x(), N("span", dl, L(b.raw[e.statusField]), 1)) : Z("", !0)
1125
+ e.chips ? _("", !0) : (x(), N("div", rl, [
1126
+ O(a.$slots, "item-status", ve({ ref_for: !0 }, be(p)), () => [
1127
+ e.statusField && p.raw[e.statusField] != null && p.raw[e.statusField] !== "" ? (x(), N("span", dl, V(p.raw[e.statusField]), 1)) : _("", !0)
1128
1128
  ])
1129
1129
  ])),
1130
1130
  U("div", cl, [
1131
- O(a.$slots, "item-actions", fe({ ref_for: !0 }, Ee(b)), () => [
1132
- e.chips && e.showDeleteButton && B.value ? (x(), ee(ie, {
1131
+ O(a.$slots, "item-actions", ve({ ref_for: !0 }, be(p)), () => [
1132
+ e.chips && e.showDeleteButton && K.value ? (x(), te(se, {
1133
1133
  key: 0,
1134
1134
  icon: "",
1135
1135
  size: "x-small",
@@ -1137,17 +1137,17 @@ const Uo = { class: "d-flex flex-column w-100 px-1 align-center" }, jo = { class
1137
1137
  density: "compact",
1138
1138
  active: !1,
1139
1139
  class: "a-le-action a-le-action--chip-close",
1140
- onClick: ue((pe) => ke(b), ["stop"])
1140
+ onClick: fe((he) => G(p), ["stop"])
1141
1141
  }, {
1142
1142
  default: u(() => [
1143
- s(de, {
1143
+ r(re, {
1144
1144
  icon: "mdi-close",
1145
1145
  size: "14"
1146
1146
  })
1147
1147
  ]),
1148
1148
  _: 1
1149
- }, 8, ["onClick"])) : (x(), N(we, { key: 1 }, [
1150
- e.showEditButton && B.value && !e.defaultExpanded ? (x(), ee(ie, {
1149
+ }, 8, ["onClick"])) : (x(), N(xe, { key: 1 }, [
1150
+ e.showEditButton && K.value && !e.defaultExpanded ? (x(), te(se, {
1151
1151
  key: 0,
1152
1152
  icon: "",
1153
1153
  size: "small",
@@ -1155,44 +1155,44 @@ const Uo = { class: "d-flex flex-column w-100 px-1 align-center" }, jo = { class
1155
1155
  color: "primary",
1156
1156
  density: "comfortable",
1157
1157
  class: "mx-1 a-le-action a-le-action--edit",
1158
- onClick: ue((pe) => qe(b), ["stop"])
1158
+ onClick: fe((he) => Oe(p), ["stop"])
1159
1159
  }, {
1160
1160
  default: u(() => [
1161
- s(de, {
1161
+ r(re, {
1162
1162
  icon: "mdi-pencil-outline",
1163
1163
  size: "18"
1164
1164
  }),
1165
- s(Je, {
1165
+ r(qe, {
1166
1166
  activator: "parent",
1167
1167
  location: "bottom",
1168
1168
  text: y(w)("common.sortable.edit")
1169
1169
  }, null, 8, ["text"])
1170
1170
  ]),
1171
1171
  _: 1
1172
- }, 8, ["onClick"])) : Z("", !0),
1173
- e.showDeleteButton && B.value ? (x(), ee(ie, {
1172
+ }, 8, ["onClick"])) : _("", !0),
1173
+ e.showDeleteButton && K.value ? (x(), te(se, {
1174
1174
  key: 1,
1175
1175
  icon: "",
1176
1176
  size: "small",
1177
1177
  variant: "text",
1178
1178
  density: "comfortable",
1179
1179
  class: "mx-1 a-le-action a-le-action--delete",
1180
- onClick: ue((pe) => ke(b), ["stop"])
1180
+ onClick: fe((he) => G(p), ["stop"])
1181
1181
  }, {
1182
1182
  default: u(() => [
1183
- s(de, {
1183
+ r(re, {
1184
1184
  icon: "mdi-trash-can-outline",
1185
1185
  size: "18"
1186
1186
  }),
1187
- s(Je, {
1187
+ r(qe, {
1188
1188
  activator: "parent",
1189
1189
  location: "bottom",
1190
1190
  text: y(w)("common.sortable.delete")
1191
1191
  }, null, 8, ["text"])
1192
1192
  ]),
1193
1193
  _: 1
1194
- }, 8, ["onClick"])) : Z("", !0),
1195
- e.showAddAfterAction && B.value ? (x(), ee(ie, {
1194
+ }, 8, ["onClick"])) : _("", !0),
1195
+ e.showAddAfterAction && K.value ? (x(), te(se, {
1196
1196
  key: 2,
1197
1197
  icon: "",
1198
1198
  size: "small",
@@ -1202,29 +1202,29 @@ const Uo = { class: "d-flex flex-column w-100 px-1 align-center" }, jo = { class
1202
1202
  class: "mx-1 a-le-action a-le-action--menu"
1203
1203
  }, {
1204
1204
  default: u(() => [
1205
- s(de, {
1205
+ r(re, {
1206
1206
  icon: "mdi-dots-vertical",
1207
1207
  size: "18"
1208
1208
  }),
1209
- s(Je, {
1209
+ r(qe, {
1210
1210
  activator: "parent",
1211
1211
  location: "bottom",
1212
1212
  text: y(w)("common.sortable.more")
1213
1213
  }, null, 8, ["text"]),
1214
- s(Vt, { activator: "parent" }, {
1214
+ r(Vt, { activator: "parent" }, {
1215
1215
  default: u(() => [
1216
- s(Ct, { density: "compact" }, {
1216
+ r(Ct, { density: "compact" }, {
1217
1217
  default: u(() => [
1218
- s(Ge, {
1219
- onClick: (pe) => xe(b)
1218
+ r(je, {
1219
+ onClick: (he) => Ae(p)
1220
1220
  }, {
1221
1221
  prepend: u(() => [
1222
- s(de, { icon: "mdi-plus" })
1222
+ r(re, { icon: "mdi-plus" })
1223
1223
  ]),
1224
1224
  default: u(() => [
1225
- s(We, null, {
1225
+ r(He, null, {
1226
1226
  default: u(() => [
1227
- Y(L(y(w)("common.sortable.addAfter")), 1)
1227
+ Q(V(y(w)("common.sortable.addAfter")), 1)
1228
1228
  ]),
1229
1229
  _: 1
1230
1230
  })
@@ -1239,232 +1239,232 @@ const Uo = { class: "d-flex flex-column w-100 px-1 align-center" }, jo = { class
1239
1239
  }, 1024)
1240
1240
  ]),
1241
1241
  _: 2
1242
- }, 1024)) : Z("", !0)
1242
+ }, 1024)) : _("", !0)
1243
1243
  ], 64))
1244
1244
  ])
1245
1245
  ])
1246
1246
  ], 8, ll),
1247
- (b.editing || e.defaultExpanded) && a.$slots.item ? (x(), N(we, { key: 0 }, [
1247
+ (p.editing || e.defaultExpanded) && a.$slots.item ? (x(), N(xe, { key: 0 }, [
1248
1248
  U("div", ul, [
1249
1249
  U("div", fl, [
1250
- O(a.$slots, "item", fe({ ref_for: !0 }, Ee(b)))
1250
+ O(a.$slots, "item", ve({ ref_for: !0 }, be(p)))
1251
1251
  ])
1252
1252
  ]),
1253
- O(a.$slots, "item-footer", fe({ ref_for: !0 }, Ee(b)), () => [
1254
- ce.value && !e.defaultExpanded ? (x(), N("div", vl, [
1255
- W[1] || (W[1] = U("div", { class: "a-le-row-footer-spacer" }, null, -1)),
1256
- s(ie, {
1253
+ O(a.$slots, "item-footer", ve({ ref_for: !0 }, be(p)), () => [
1254
+ ue.value && !e.defaultExpanded ? (x(), N("div", vl, [
1255
+ H[1] || (H[1] = U("div", { class: "a-le-row-footer-spacer" }, null, -1)),
1256
+ r(se, {
1257
1257
  variant: "text",
1258
- disabled: b.loading,
1259
- onClick: ue((pe) => be(b), ["stop"])
1258
+ disabled: p.loading,
1259
+ onClick: fe((he) => Z(p), ["stop"])
1260
1260
  }, {
1261
1261
  default: u(() => [
1262
- Y(L(y(w)("common.button.cancel")), 1)
1262
+ Q(V(y(w)("common.button.cancel")), 1)
1263
1263
  ]),
1264
1264
  _: 1
1265
1265
  }, 8, ["disabled", "onClick"]),
1266
- s(ie, {
1266
+ r(se, {
1267
1267
  color: "primary",
1268
1268
  variant: "flat",
1269
1269
  "prepend-icon": "mdi-check",
1270
- disabled: b.loading,
1271
- onClick: ue((pe) => De(b), ["stop"])
1270
+ disabled: p.loading,
1271
+ onClick: fe((he) => W(p), ["stop"])
1272
1272
  }, {
1273
1273
  default: u(() => [
1274
- Y(L(y(w)("common.button.save")), 1)
1274
+ Q(V(y(w)("common.button.save")), 1)
1275
1275
  ]),
1276
1276
  _: 1
1277
1277
  }, 8, ["disabled", "onClick"])
1278
- ])) : Z("", !0)
1278
+ ])) : _("", !0)
1279
1279
  ])
1280
- ], 64)) : a.$slots["item-readonly"] && (e.readonly || b.expanded) ? (x(), N("div", ml, [
1280
+ ], 64)) : a.$slots["item-readonly"] && (e.readonly || p.expanded) ? (x(), N("div", ml, [
1281
1281
  U("div", yl, [
1282
- O(a.$slots, "item-readonly", fe({ ref_for: !0 }, Ee(b)))
1282
+ O(a.$slots, "item-readonly", ve({ ref_for: !0 }, be(p)))
1283
1283
  ])
1284
- ])) : Z("", !0),
1285
- O(a.$slots, "after-item", fe({ ref_for: !0 }, Ee(b)))
1284
+ ])) : _("", !0),
1285
+ O(a.$slots, "after-item", ve({ ref_for: !0 }, be(p)))
1286
1286
  ], 42, ol))), 128)),
1287
- X.value && !e.loading && !e.error && !Ce.value ? O(a.$slots, "add-button", {
1287
+ J.value && !e.loading && !e.error && !Se.value ? O(a.$slots, "add-button", {
1288
1288
  key: 5,
1289
1289
  readonly: e.readonly,
1290
1290
  disabled: e.disabled,
1291
- props: { onClick: Se },
1292
- actions: { add: Se }
1291
+ props: { onClick: Pe },
1292
+ actions: { add: Pe }
1293
1293
  }, () => [
1294
1294
  U("button", {
1295
1295
  type: "button",
1296
1296
  class: "a-le-row-add",
1297
- onClick: Se
1297
+ onClick: Pe
1298
1298
  }, [
1299
- s(de, {
1299
+ r(re, {
1300
1300
  icon: "mdi-plus",
1301
1301
  size: "18"
1302
1302
  }),
1303
- U("span", null, L($.value), 1)
1303
+ U("span", null, V($.value), 1)
1304
1304
  ])
1305
- ]) : Z("", !0)
1305
+ ]) : _("", !0)
1306
1306
  ], 512),
1307
- s(Qn, {
1308
- modelValue: y(Ze),
1309
- "onUpdate:modelValue": W[0] || (W[0] = (b) => ta(Ze) ? Ze.value = b : null),
1307
+ r(Qn, {
1308
+ modelValue: y(Xe),
1309
+ "onUpdate:modelValue": H[0] || (H[0] = (p) => ta(Xe) ? Xe.value = p : null),
1310
1310
  title: C.value,
1311
1311
  text: F.value,
1312
1312
  "confirm-label": y(w)("common.sortable.delete"),
1313
1313
  "cancel-label": y(w)("common.button.cancel"),
1314
- error: y(V),
1315
- "in-flight": y(I),
1316
- onConfirm: y(J),
1317
- onCancel: y(se)
1314
+ error: y(rt),
1315
+ "in-flight": y(tt),
1316
+ onConfirm: y(A),
1317
+ onCancel: y(L)
1318
1318
  }, null, 8, ["modelValue", "title", "text", "confirm-label", "cancel-label", "error", "in-flight", "onConfirm", "onCancel"]),
1319
- U("div", hl, L(y(Ve).grabbedKey.value !== null ? y(w)("common.sortable.keyboardGrab.status", {
1320
- n: y(Ve).grabbedIndex.value + 1,
1321
- total: y(Ve).totalCount.value
1319
+ U("div", hl, V(y(Le).grabbedKey.value !== null ? y(w)("common.sortable.keyboardGrab.status", {
1320
+ n: y(Le).grabbedIndex.value + 1,
1321
+ total: y(Le).totalCount.value
1322
1322
  }) : ""), 1)
1323
1323
  ], 2));
1324
1324
  }
1325
1325
  }), gl = "id", pl = "position", bl = "parent";
1326
1326
  function kl(e, k) {
1327
- const l = k.keyField ?? gl, n = k.getKey, i = k.positionField ?? pl, v = k.parentField ?? bl, w = k.positionMultiplier ?? 1, D = k.maxDepth, g = ($) => n ? n($) : $[l], c = ($) => {
1327
+ const l = k.keyField ?? gl, n = k.getKey, i = k.positionField ?? pl, m = k.parentField ?? bl, w = k.positionMultiplier ?? 1, E = k.maxDepth, b = ($) => n ? n($) : $[l], c = ($) => {
1328
1328
  if (!$.children || $.children.length === 0) return 1;
1329
- let m = 0;
1329
+ let v = 0;
1330
1330
  for (const C of $.children) {
1331
1331
  const F = c(C);
1332
- F > m && (m = F);
1332
+ F > v && (v = F);
1333
1333
  }
1334
- return m + 1;
1335
- }, h = ($, m = e.value.children, C = null) => {
1336
- for (const F of m) {
1337
- if (g(F.data) === $) return { node: F, parent: C };
1334
+ return v + 1;
1335
+ }, h = ($, v = e.value.children, C = null) => {
1336
+ for (const F of v) {
1337
+ if (b(F.data) === $) return { node: F, parent: C };
1338
1338
  if (F.children && F.children.length > 0) {
1339
- const B = h($, F.children, F);
1340
- if (B.node) return B;
1339
+ const K = h($, F.children, F);
1340
+ if (K.node) return K;
1341
1341
  }
1342
1342
  }
1343
1343
  return { node: null, parent: null };
1344
- }, S = ($) => {
1345
- let m = 1 * w;
1344
+ }, I = ($) => {
1345
+ let v = 1 * w;
1346
1346
  for (const C of $)
1347
- C.data[i] !== m && (C.data[i] = m, C.meta.dirty = !0), m += w;
1347
+ C.data[i] !== v && (C.data[i] = v, C.meta.dirty = !0), v += w;
1348
1348
  }, j = ($) => {
1349
- const m = (C) => {
1350
- S(C);
1351
- for (const F of C) F.children && F.children.length && m(F.children);
1349
+ const v = (C) => {
1350
+ I(C);
1351
+ for (const F of C) F.children && F.children.length && v(F.children);
1352
1352
  };
1353
- m($.children);
1353
+ v($.children);
1354
1354
  }, M = ($) => {
1355
- const m = Be($);
1356
- return j(m), m;
1357
- }, p = ($) => {
1358
- const m = [], C = k.expandedKeys?.value;
1355
+ const v = Be($);
1356
+ return j(v), v;
1357
+ }, g = ($) => {
1358
+ const v = [], C = k.expandedKeys?.value;
1359
1359
  let F = 0;
1360
- const B = (X, _, ce) => {
1361
- for (let ne = 0; ne < X.length; ne++) {
1362
- const ve = X[ne], Ce = g(ve.data), ge = !Ae(ve.children), Ve = ge && (ve.children?.length ?? 0) > 0, Xe = ve.children?.length ?? 0, Se = C ? C.has(Ce) : !0, xe = D - (_ + 1), qe = ge && xe > 0, Me = _ > 0, at = ne > 0;
1363
- m.push({
1364
- key: Ce,
1360
+ const K = (J, ee, ue) => {
1361
+ for (let ae = 0; ae < J.length; ae++) {
1362
+ const me = J[ae], Se = b(me.data), we = !Ie(me.children), Le = we && (me.children?.length ?? 0) > 0, Ge = me.children?.length ?? 0, Pe = C ? C.has(Se) : !0, Ae = E - (ee + 1), Oe = we && Ae > 0, Ve = ee > 0, et = ae > 0;
1363
+ v.push({
1364
+ key: Se,
1365
1365
  index: F++,
1366
- raw: ve.data,
1367
- position: ve.data[i],
1368
- node: ve,
1369
- depth: _,
1370
- parent: ce?.data ?? null,
1371
- parentKey: ce ? g(ce.data) : null,
1372
- childrenCount: Xe,
1373
- hasChildren: Ve,
1374
- childrenAllowed: ge,
1375
- siblingIndex: ne,
1376
- siblingCount: X.length,
1377
- firstInParent: ne === 0,
1378
- lastInParent: ne === X.length - 1,
1379
- canAddChild: qe,
1380
- canIndent: at,
1381
- canOutdent: Me
1382
- }), Ve && Se && B(ve.children, _ + 1, ve);
1366
+ raw: me.data,
1367
+ position: me.data[i],
1368
+ node: me,
1369
+ depth: ee,
1370
+ parent: ue?.data ?? null,
1371
+ parentKey: ue ? b(ue.data) : null,
1372
+ childrenCount: Ge,
1373
+ hasChildren: Le,
1374
+ childrenAllowed: we,
1375
+ siblingIndex: ae,
1376
+ siblingCount: J.length,
1377
+ firstInParent: ae === 0,
1378
+ lastInParent: ae === J.length - 1,
1379
+ canAddChild: Oe,
1380
+ canIndent: et,
1381
+ canOutdent: Ve
1382
+ }), Le && Pe && K(me.children, ee + 1, me);
1383
1383
  }
1384
1384
  };
1385
- return B($.children, 0, null), m;
1386
- }, z = A(() => p(e.value)), q = ($, m, C) => {
1387
- $.splice(m + 1, 0, C);
1388
- }, K = ($, m) => {
1389
- if (!m) return $.length;
1390
- if (m.afterId !== void 0) {
1391
- const C = $.findIndex((F) => g(F.data) === m.afterId);
1385
+ return K($.children, 0, null), v;
1386
+ }, z = S(() => g(e.value)), q = ($, v, C) => {
1387
+ $.splice(v + 1, 0, C);
1388
+ }, B = ($, v) => {
1389
+ if (!v) return $.length;
1390
+ if (v.afterId !== void 0) {
1391
+ const C = $.findIndex((F) => b(F.data) === v.afterId);
1392
1392
  return C === -1 ? $.length : C + 1;
1393
1393
  }
1394
- return m.afterIndex !== void 0 ? m.afterIndex < 0 ? $.length : Math.min(m.afterIndex + 1, $.length) : m.index !== void 0 ? Math.max(0, Math.min(m.index, $.length)) : $.length;
1395
- }, G = ($, m) => {
1396
- const C = Be(e.value), F = m?.childrenAllowed ?? !0, B = {
1394
+ return v.afterIndex !== void 0 ? v.afterIndex < 0 ? $.length : Math.min(v.afterIndex + 1, $.length) : v.index !== void 0 ? Math.max(0, Math.min(v.index, $.length)) : $.length;
1395
+ }, X = ($, v) => {
1396
+ const C = Be(e.value), F = v?.childrenAllowed ?? !0, K = {
1397
1397
  data: Be($),
1398
1398
  children: F ? [] : void 0,
1399
1399
  meta: { dirty: !1 }
1400
1400
  };
1401
- let X = C.children, _ = null;
1402
- if (m?.parentId !== void 0 && m.parentId !== null) {
1403
- const { node: ne } = h(m.parentId, C.children);
1404
- ne && ne.children && (X = ne.children, _ = ne);
1401
+ let J = C.children, ee = null;
1402
+ if (v?.parentId !== void 0 && v.parentId !== null) {
1403
+ const { node: ae } = h(v.parentId, C.children);
1404
+ ae && ae.children && (J = ae.children, ee = ae);
1405
1405
  }
1406
- if (m?.afterId !== void 0) {
1407
- const { node: ne, parent: ve } = h(m.afterId, C.children);
1408
- if (ne) {
1409
- const Ce = ve ? ve.children : C.children, ge = Ce.indexOf(ne);
1410
- if (ge !== -1)
1411
- return q(Ce, ge, B), B.data[v] = ve ? g(ve.data) : null, S(Ce), e.value = C, C;
1406
+ if (v?.afterId !== void 0) {
1407
+ const { node: ae, parent: me } = h(v.afterId, C.children);
1408
+ if (ae) {
1409
+ const Se = me ? me.children : C.children, we = Se.indexOf(ae);
1410
+ if (we !== -1)
1411
+ return q(Se, we, K), K.data[m] = me ? b(me.data) : null, I(Se), e.value = C, C;
1412
1412
  }
1413
1413
  }
1414
- const ce = m?.asFirstChild ? 0 : K(X, m);
1415
- return X.splice(ce, 0, B), B.data[v] = _ ? g(_.data) : null, S(X), e.value = C, C;
1416
- }, E = ($) => {
1417
- const m = Be(e.value), { node: C, parent: F } = h($, m.children);
1418
- if (!C) return m;
1419
- const B = F ? F.children : m.children, X = B.indexOf(C);
1420
- return X === -1 || (B.splice(X, 1), S(B), e.value = m), m;
1421
- }, r = ($, m, C = !0) => {
1422
- const F = Be(e.value), { node: B } = h($, F.children);
1423
- return B && (B.data = Be(m), C && (B.meta.dirty = !0), e.value = F), F;
1424
- }, f = ($, m, C) => {
1425
- const { node: F, parent: B } = h(m, $.children);
1414
+ const ue = v?.asFirstChild ? 0 : B(J, v);
1415
+ return J.splice(ue, 0, K), K.data[m] = ee ? b(ee.data) : null, I(J), e.value = C, C;
1416
+ }, D = ($) => {
1417
+ const v = Be(e.value), { node: C, parent: F } = h($, v.children);
1418
+ if (!C) return v;
1419
+ const K = F ? F.children : v.children, J = K.indexOf(C);
1420
+ return J === -1 || (K.splice(J, 1), I(K), e.value = v), v;
1421
+ }, s = ($, v, C = !0) => {
1422
+ const F = Be(e.value), { node: K } = h($, F.children);
1423
+ return K && (K.data = Be(v), C && (K.meta.dirty = !0), e.value = F), F;
1424
+ }, f = ($, v, C) => {
1425
+ const { node: F, parent: K } = h(v, $.children);
1426
1426
  if (!F) return null;
1427
- const X = B ? B.children : $.children, _ = X.indexOf(F);
1428
- if (_ === -1) return null;
1429
- const ce = C(X, _);
1430
- if (ce === null || ce === _) return null;
1431
- const [ne] = X.splice(_, 1);
1432
- return X.splice(ce, 0, ne), S(X), $;
1427
+ const J = K ? K.children : $.children, ee = J.indexOf(F);
1428
+ if (ee === -1) return null;
1429
+ const ue = C(J, ee);
1430
+ if (ue === null || ue === ee) return null;
1431
+ const [ae] = J.splice(ee, 1);
1432
+ return J.splice(ue, 0, ae), I(J), $;
1433
1433
  }, T = ($) => {
1434
- const m = Be(e.value), C = f(m, $, (F, B) => B > 0 ? B - 1 : null);
1434
+ const v = Be(e.value), C = f(v, $, (F, K) => K > 0 ? K - 1 : null);
1435
1435
  return C && (e.value = C), C;
1436
1436
  }, P = ($) => {
1437
- const m = Be(e.value), C = f(m, $, (F, B) => B < F.length - 1 ? B + 1 : null);
1437
+ const v = Be(e.value), C = f(v, $, (F, K) => K < F.length - 1 ? K + 1 : null);
1438
1438
  return C && (e.value = C), C;
1439
- }, Q = ($) => {
1440
- const m = Be(e.value), C = f(m, $, (F, B) => B > 0 ? 0 : null);
1439
+ }, Y = ($) => {
1440
+ const v = Be(e.value), C = f(v, $, (F, K) => K > 0 ? 0 : null);
1441
1441
  return C && (e.value = C), C;
1442
- }, re = ($) => {
1443
- const m = Be(e.value), C = f(m, $, (F, B) => B < F.length - 1 ? F.length - 1 : null);
1442
+ }, ce = ($) => {
1443
+ const v = Be(e.value), C = f(v, $, (F, K) => K < F.length - 1 ? F.length - 1 : null);
1444
1444
  return C && (e.value = C), C;
1445
- }, oe = ($) => {
1446
- const m = Be(e.value), { node: C, parent: F } = h($, m.children);
1445
+ }, ne = ($) => {
1446
+ const v = Be(e.value), { node: C, parent: F } = h($, v.children);
1447
1447
  if (!C) return null;
1448
- const B = F ? F.children : m.children, X = B.indexOf(C);
1449
- if (X <= 0) return null;
1450
- const _ = B[X - 1];
1451
- if (Ae(_.children)) return null;
1452
- const ce = c(C);
1453
- return te(m, g(_.data)) + 1 + ce > D ? null : (B.splice(X, 1), _.children.push(C), C.data[v] = g(_.data), C.meta.dirty = !0, S(B), S(_.children), e.value = m, m);
1448
+ const K = F ? F.children : v.children, J = K.indexOf(C);
1449
+ if (J <= 0) return null;
1450
+ const ee = K[J - 1];
1451
+ if (Ie(ee.children)) return null;
1452
+ const ue = c(C);
1453
+ return ie(v, b(ee.data)) + 1 + ue > E ? null : (K.splice(J, 1), ee.children.push(C), C.data[m] = b(ee.data), C.meta.dirty = !0, I(K), I(ee.children), e.value = v, v);
1454
1454
  }, le = ($) => {
1455
- const m = Be(e.value), { node: C, parent: F } = h($, m.children);
1455
+ const v = Be(e.value), { node: C, parent: F } = h($, v.children);
1456
1456
  if (!C || !F) return null;
1457
- const { parent: B } = h(g(F.data), m.children), X = B ? B.children : m.children, _ = X.indexOf(F);
1458
- if (_ === -1) return null;
1459
- const ce = F.children, ne = ce.indexOf(C);
1460
- return ne === -1 ? null : (ce.splice(ne, 1), X.splice(_ + 1, 0, C), C.data[v] = B ? g(B.data) : null, C.meta.dirty = !0, S(ce), S(X), e.value = m, m);
1461
- }, te = ($, m) => {
1462
- const C = (F, B) => {
1463
- for (const X of F) {
1464
- if (g(X.data) === m) return B;
1465
- if (X.children && X.children.length) {
1466
- const _ = C(X.children, B + 1);
1467
- if (_ !== null) return _;
1457
+ const { parent: K } = h(b(F.data), v.children), J = K ? K.children : v.children, ee = J.indexOf(F);
1458
+ if (ee === -1) return null;
1459
+ const ue = F.children, ae = ue.indexOf(C);
1460
+ return ae === -1 ? null : (ue.splice(ae, 1), J.splice(ee + 1, 0, C), C.data[m] = K ? b(K.data) : null, C.meta.dirty = !0, I(ue), I(J), e.value = v, v);
1461
+ }, ie = ($, v) => {
1462
+ const C = (F, K) => {
1463
+ for (const J of F) {
1464
+ if (b(J.data) === v) return K;
1465
+ if (J.children && J.children.length) {
1466
+ const ee = C(J.children, K + 1);
1467
+ if (ee !== null) return ee;
1468
1468
  }
1469
1469
  }
1470
1470
  return null;
@@ -1474,42 +1474,42 @@ function kl(e, k) {
1474
1474
  return {
1475
1475
  viewItems: z,
1476
1476
  findNode: h,
1477
- addItem: G,
1478
- deleteItem: E,
1479
- updateItem: r,
1477
+ addItem: X,
1478
+ deleteItem: D,
1479
+ updateItem: s,
1480
1480
  moveUp: T,
1481
1481
  moveDown: P,
1482
- moveTop: Q,
1483
- moveBottom: re,
1484
- indent: oe,
1482
+ moveTop: Y,
1483
+ moveBottom: ce,
1484
+ indent: ne,
1485
1485
  outdent: le,
1486
- moveTo: ($, m, C) => {
1487
- const F = Be(e.value), { node: B, parent: X } = h($, F.children);
1488
- if (!B) return null;
1489
- if (m !== null) {
1490
- const xe = (qe) => {
1491
- if (!qe.children) return !1;
1492
- for (const Me of qe.children)
1493
- if (g(Me.data) === m || xe(Me)) return !0;
1486
+ moveTo: ($, v, C) => {
1487
+ const F = Be(e.value), { node: K, parent: J } = h($, F.children);
1488
+ if (!K) return null;
1489
+ if (v !== null) {
1490
+ const Ae = (Oe) => {
1491
+ if (!Oe.children) return !1;
1492
+ for (const Ve of Oe.children)
1493
+ if (b(Ve.data) === v || Ae(Ve)) return !0;
1494
1494
  return !1;
1495
1495
  };
1496
- if (g(B.data) === m || xe(B)) return null;
1496
+ if (b(K.data) === v || Ae(K)) return null;
1497
1497
  }
1498
- let _, ce = null, ne = 0;
1499
- if (m === null)
1500
- _ = F.children, ne = 0;
1498
+ let ee, ue = null, ae = 0;
1499
+ if (v === null)
1500
+ ee = F.children, ae = 0;
1501
1501
  else {
1502
- const { node: xe } = h(m, F.children);
1503
- if (!xe || Ae(xe.children)) return null;
1504
- _ = xe.children, ce = xe, ne = te(F, m) + 1;
1502
+ const { node: Ae } = h(v, F.children);
1503
+ if (!Ae || Ie(Ae.children)) return null;
1504
+ ee = Ae.children, ue = Ae, ae = ie(F, v) + 1;
1505
1505
  }
1506
- const ve = c(B);
1507
- if (ne + ve > D) return null;
1508
- const Ce = X ? X.children : F.children, ge = Ce.indexOf(B);
1509
- if (ge === -1) return null;
1510
- const Ve = Ce === _, [Xe] = Ce.splice(ge, 1);
1511
- let Se = C;
1512
- return Ve && ge < C && (Se = C - 1), Se = Math.max(0, Math.min(Se, _.length)), _.splice(Se, 0, Xe), Xe.data[v] = ce ? g(ce.data) : null, Xe.meta.dirty = !0, Ve || S(Ce), S(_), e.value = F, F;
1506
+ const me = c(K);
1507
+ if (ae + me > E) return null;
1508
+ const Se = J ? J.children : F.children, we = Se.indexOf(K);
1509
+ if (we === -1) return null;
1510
+ const Le = Se === ee, [Ge] = Se.splice(we, 1);
1511
+ let Pe = C;
1512
+ return Le && we < C && (Pe = C - 1), Pe = Math.max(0, Math.min(Pe, ee.length)), ee.splice(Pe, 0, Ge), Ge.data[m] = ue ? b(ue.data) : null, Ge.meta.dirty = !0, Le || I(Se), I(ee), e.value = F, F;
1513
1513
  },
1514
1514
  recalculatePositions: M,
1515
1515
  calculateSubtreeDepth: c
@@ -1521,7 +1521,7 @@ const wl = (e) => {
1521
1521
  k.push(i.data), i.children && i.children.length && l(i.children);
1522
1522
  };
1523
1523
  return l(e.children), k;
1524
- }, st = (e, k) => {
1524
+ }, ot = (e, k) => {
1525
1525
  const l = (n) => {
1526
1526
  for (const i of n)
1527
1527
  k(i), i.children && i.children.length && l(i.children);
@@ -1529,160 +1529,178 @@ const wl = (e) => {
1529
1529
  l(e.children);
1530
1530
  };
1531
1531
  function Cl(e) {
1532
- const k = typeof e.getKey == "function" ? null : e.getKey ?? "id", l = (I) => typeof e.getKey == "function" ? e.getKey(I) : I[k], n = k ?? "id", i = e.position ?? "position", v = i !== !1, w = typeof i == "object" ? i.field : i === !1 ? "position" : i, D = typeof i == "object" && i.multiplier ? i.multiplier : 1, g = e.parentField ?? "parent", c = A({
1532
+ const k = typeof e.getKey == "function" ? null : e.getKey ?? "id", l = (A) => typeof e.getKey == "function" ? e.getKey(A) : A[k], n = k ?? "id", i = e.position ?? "position", m = i !== !1, w = typeof i == "object" ? i.field : i === !1 ? "position" : i, E = typeof i == "object" && i.multiplier ? i.multiplier : 1, b = e.parentField ?? "parent", c = S({
1533
1533
  get: () => e.get(),
1534
- set: (I) => e.set(I)
1534
+ set: (A) => e.set(A)
1535
1535
  }), h = kl(c, {
1536
1536
  keyField: n,
1537
1537
  // Pass the controller's keyOf so tree ops resolve keys identically to
1538
1538
  // invalidKeys/dirty tracking — supports a function get-key, not just a field.
1539
1539
  getKey: l,
1540
1540
  positionField: w,
1541
- parentField: g,
1542
- positionMultiplier: D,
1541
+ parentField: b,
1542
+ positionMultiplier: E,
1543
1543
  maxDepth: e.maxDepth
1544
- }), S = A(() => wl(e.get())), j = h.viewItems, M = A(() => ko(e.dirtyExclude) ?? []), p = (I) => {
1545
- const V = { ...I };
1546
- v && delete V[w], delete V[g];
1547
- for (const H of M.value) delete V[H];
1548
- return JSON.stringify(V);
1549
- }, z = me(/* @__PURE__ */ new Map()), q = me(/* @__PURE__ */ new Map()), K = me(null), G = (I) => Be(I), E = (I) => {
1550
- const V = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), J = (se, ke) => {
1551
- for (const De of se) {
1552
- const be = l(De.data);
1553
- V.set(be, p(De.data)), H.set(be, ke), De.children && De.children.length && J(De.children, be);
1544
+ }), I = S(() => wl(e.get())), j = h.viewItems, M = S(() => ko(e.dirtyExclude) ?? []), g = (A) => {
1545
+ const L = { ...A };
1546
+ m && delete L[w], delete L[b];
1547
+ for (const G of M.value) delete L[G];
1548
+ return JSON.stringify(L);
1549
+ }, z = de(/* @__PURE__ */ new Map()), q = de(/* @__PURE__ */ new Map()), B = de(null), X = (A) => Be(A), D = (A) => {
1550
+ const L = /* @__PURE__ */ new Map(), G = /* @__PURE__ */ new Map(), W = (Z, pe) => {
1551
+ for (const Ce of Z) {
1552
+ const ye = l(Ce.data);
1553
+ L.set(ye, g(Ce.data)), G.set(ye, pe), Ce.children && Ce.children.length && W(Ce.children, ye);
1554
1554
  }
1555
1555
  };
1556
- J(I.children, null), z.value = V, q.value = H, K.value = G(I);
1556
+ W(A.children, null), z.value = L, q.value = G, B.value = X(A);
1557
1557
  };
1558
- E(e.get()), Re(
1558
+ D(e.get()), $e(
1559
1559
  M,
1560
1560
  () => {
1561
- if (!K.value) return;
1562
- const I = /* @__PURE__ */ new Map();
1563
- st(K.value, (V) => I.set(l(V.data), p(V.data))), z.value = I;
1561
+ if (!B.value) return;
1562
+ const A = /* @__PURE__ */ new Map();
1563
+ ot(B.value, (L) => A.set(l(L.data), g(L.data))), z.value = A;
1564
1564
  },
1565
1565
  { flush: "sync" }
1566
1566
  );
1567
- const r = me(!1), f = wo(/* @__PURE__ */ new Map()), T = (I, V, H) => {
1567
+ const s = de(!1), f = wo(/* @__PURE__ */ new Map()), T = (A, L, G) => {
1568
1568
  if (e.isDirty) {
1569
- const se = P(V);
1570
- return e.isDirty(I.data, se);
1569
+ const Z = ne(L);
1570
+ return e.isDirty(A.data, Z);
1571
1571
  }
1572
- const J = z.value.get(V);
1573
- return !!(J === void 0 || J !== p(I.data) || q.value.has(V) && (q.value.get(V) ?? null ?? null) !== (H ?? null));
1574
- }, P = (I) => {
1575
- if (!K.value) return;
1576
- let V;
1577
- return st(K.value, (H) => {
1578
- V === void 0 && l(H.data) === I && (V = H.data);
1579
- }), V;
1580
- }, Q = A(() => {
1581
- const I = /* @__PURE__ */ new Set(), V = (H, J) => {
1582
- for (const se of H) {
1583
- const ke = l(se.data);
1584
- T(se, ke, J) && I.add(ke), se.children && se.children.length && V(se.children, ke);
1572
+ const W = z.value.get(L);
1573
+ return !!(W === void 0 || W !== g(A.data) || q.value.has(L) && (q.value.get(L) ?? null ?? null) !== (G ?? null));
1574
+ }, P = de(/* @__PURE__ */ new Map()), Y = de(/* @__PURE__ */ new Set());
1575
+ $e(
1576
+ () => e.get(),
1577
+ (A) => {
1578
+ const L = /* @__PURE__ */ new Set();
1579
+ ot(A, (W) => {
1580
+ const Z = l(W.data);
1581
+ if (L.add(Z), !z.value.has(Z) && !P.value.has(Z) && P.value.set(Z, g(W.data)), !Y.value.has(Z)) {
1582
+ const pe = z.value.get(Z) ?? P.value.get(Z);
1583
+ pe !== void 0 && pe !== g(W.data) && Y.value.add(Z);
1584
+ }
1585
+ });
1586
+ const G = [];
1587
+ for (const W of P.value.keys()) L.has(W) || G.push(W);
1588
+ for (const W of G) P.value.delete(W);
1589
+ },
1590
+ { immediate: !0, deep: !0 }
1591
+ );
1592
+ const ce = (A) => Y.value.has(A), ne = (A) => {
1593
+ if (!B.value) return;
1594
+ let L;
1595
+ return ot(B.value, (G) => {
1596
+ L === void 0 && l(G.data) === A && (L = G.data);
1597
+ }), L;
1598
+ }, le = S(() => {
1599
+ const A = /* @__PURE__ */ new Set(), L = (G, W) => {
1600
+ for (const Z of G) {
1601
+ const pe = l(Z.data);
1602
+ T(Z, pe, W) && A.add(pe), Z.children && Z.children.length && L(Z.children, pe);
1585
1603
  }
1586
1604
  };
1587
- return V(e.get().children, null), I;
1588
- }), re = (I) => Q.value.has(I), oe = A(() => Q.value.size > 0), le = (I, V) => {
1589
- const H = f.get(V);
1590
- if (H) return { invalid: !H(), warning: !1 };
1605
+ return L(e.get().children, null), A;
1606
+ }), ie = (A) => le.value.has(A), Re = S(() => le.value.size > 0), $ = (A, L) => {
1607
+ const G = f.get(L);
1608
+ if (G) return { invalid: !G(), warning: !1 };
1591
1609
  if (!e.validate) return { invalid: !1, warning: !1 };
1592
- const J = e.validate(I);
1593
- return typeof J == "boolean" ? { invalid: !J, warning: !1 } : { invalid: !J.valid, warning: J.valid && J.state === "warning" };
1594
- }, te = A(() => {
1595
- const I = /* @__PURE__ */ new Set();
1596
- return st(e.get(), (V) => {
1597
- const H = l(V.data);
1598
- le(V.data, H).invalid && I.add(H);
1599
- }), I;
1600
- }), Le = A(() => te.value.size > 0), $ = (I, V) => {
1601
- const { invalid: H, warning: J } = le(I, V);
1602
- return H ? re(V) || r.value ? "invalid" : null : J ? "warning" : null;
1603
- }, m = () => (r.value = !0, te.value.size === 0), C = () => {
1604
- const I = [], V = (H, J) => {
1605
- for (const se of H) {
1606
- const ke = { ...se.data };
1607
- ke[g] = J, I.push(ke), se.children && se.children.length && V(se.children, l(se.data));
1610
+ const W = e.validate(A);
1611
+ return typeof W == "boolean" ? { invalid: !W, warning: !1 } : { invalid: !W.valid, warning: W.valid && W.state === "warning" };
1612
+ }, v = S(() => {
1613
+ const A = /* @__PURE__ */ new Set();
1614
+ return ot(e.get(), (L) => {
1615
+ const G = l(L.data);
1616
+ $(L.data, G).invalid && A.add(G);
1617
+ }), A;
1618
+ }), C = S(() => v.value.size > 0), F = (A, L) => {
1619
+ const { invalid: G, warning: W } = $(A, L);
1620
+ return G ? ce(L) || s.value ? "invalid" : null : W ? "warning" : null;
1621
+ }, K = () => (s.value = !0, v.value.size === 0), J = () => {
1622
+ const A = [], L = (G, W) => {
1623
+ for (const Z of G) {
1624
+ const pe = { ...Z.data };
1625
+ pe[b] = W, A.push(pe), Z.children && Z.children.length && L(Z.children, l(Z.data));
1608
1626
  }
1609
1627
  };
1610
- return V(e.get().children, null), I;
1628
+ return L(e.get().children, null), A;
1611
1629
  };
1612
1630
  return {
1613
- items: S,
1631
+ items: I,
1614
1632
  viewItems: j,
1615
- hasUnsaved: oe,
1616
- hasErrors: Le,
1617
- invalidKeys: te,
1618
- isUnsaved: re,
1619
- rowState: $,
1620
- validateAll: m,
1621
- getPayload: () => e.payload ? e.payload(C()) : C(),
1633
+ hasUnsaved: Re,
1634
+ hasErrors: C,
1635
+ invalidKeys: v,
1636
+ isUnsaved: ie,
1637
+ rowState: F,
1638
+ validateAll: K,
1639
+ getPayload: () => e.payload ? e.payload(J()) : J(),
1622
1640
  getChanges: () => {
1623
- const I = [], V = [], H = [], J = [], se = C(), ke = /* @__PURE__ */ new Map();
1624
- for (const be of se) ke.set(l(be), be);
1625
- st(e.get(), (be) => {
1626
- const Ie = l(be.data), Ne = ke.get(Ie) ?? be.data, Oe = z.value.get(Ie);
1627
- if (Oe === void 0 ? I.push(Ne) : Oe !== p(be.data) && V.push(Ne), Oe !== void 0 && be.meta.dirty && Oe === p(be.data) && H.push(Ne), q.value.has(Ie)) {
1628
- const Ee = q.value.get(Ie) ?? null, a = Ne[g];
1629
- (Ee ?? null) !== (a ?? null) && J.push(Ne);
1641
+ const A = [], L = [], G = [], W = [], Z = J(), pe = /* @__PURE__ */ new Map();
1642
+ for (const ye of Z) pe.set(l(ye), ye);
1643
+ ot(e.get(), (ye) => {
1644
+ const be = l(ye.data), a = pe.get(be) ?? ye.data, H = z.value.get(be);
1645
+ if (H === void 0 ? A.push(a) : H !== g(ye.data) && L.push(a), H !== void 0 && ye.meta.dirty && H === g(ye.data) && G.push(a), q.value.has(be)) {
1646
+ const p = q.value.get(be) ?? null, he = a[b];
1647
+ (p ?? null) !== (he ?? null) && W.push(a);
1630
1648
  }
1631
1649
  });
1632
- const De = [];
1633
- if (K.value) {
1634
- const be = /* @__PURE__ */ new Set();
1635
- st(e.get(), (Ie) => be.add(l(Ie.data))), st(K.value, (Ie) => {
1636
- be.has(l(Ie.data)) || De.push(Ie.data);
1650
+ const Ce = [];
1651
+ if (B.value) {
1652
+ const ye = /* @__PURE__ */ new Set();
1653
+ ot(e.get(), (be) => ye.add(l(be.data))), ot(B.value, (be) => {
1654
+ ye.has(l(be.data)) || Ce.push(be.data);
1637
1655
  });
1638
1656
  }
1639
- return { added: I, updated: V, moved: H, deleted: De, reparented: J };
1657
+ return { added: A, updated: L, moved: G, deleted: Ce, reparented: W };
1640
1658
  },
1641
- commit: (I) => {
1642
- const V = I ?? e.get(), H = e.normalizeSaved ? e.normalizeSaved(V) : V, J = G(H);
1643
- st(J, (se) => {
1644
- const ke = P(l(se.data)), De = e.commitKey ? e.commitKey(se.data, ke) : l(se.data);
1645
- De == null && k && (se.data[n] = ao()), se.meta.dirty = !1;
1646
- }), e.set(J), E(J), r.value = !1;
1659
+ commit: (A) => {
1660
+ const L = A ?? e.get(), G = e.normalizeSaved ? e.normalizeSaved(L) : L, W = X(G);
1661
+ ot(W, (Z) => {
1662
+ const pe = ne(l(Z.data)), Ce = e.commitKey ? e.commitKey(Z.data, pe) : l(Z.data);
1663
+ Ce == null && k && (Z.data[n] = ao()), Z.meta.dirty = !1;
1664
+ }), e.set(W), D(W), P.value = /* @__PURE__ */ new Map(), Y.value = /* @__PURE__ */ new Set(), s.value = !1;
1647
1665
  },
1648
- reset: (I) => {
1649
- const V = I ?? (K.value ? G(K.value) : e.get());
1650
- e.set(V), r.value = !1;
1666
+ reset: (A) => {
1667
+ const L = A ?? (B.value ? X(B.value) : e.get());
1668
+ e.set(L), P.value = /* @__PURE__ */ new Map(), Y.value = /* @__PURE__ */ new Set(), s.value = !1;
1651
1669
  },
1652
- addItem: (I, V) => {
1653
- const H = I ?? e.factory?.();
1654
- H !== void 0 && h.addItem(H, V);
1670
+ addItem: (A, L) => {
1671
+ const G = A ?? e.factory?.();
1672
+ G !== void 0 && h.addItem(G, L);
1655
1673
  },
1656
- addAfter: (I, V, H = !0) => {
1657
- const J = V ?? e.factory?.();
1658
- J !== void 0 && h.addItem(J, { afterId: I, childrenAllowed: H });
1674
+ addAfter: (A, L, G = !0) => {
1675
+ const W = L ?? e.factory?.();
1676
+ W !== void 0 && h.addItem(W, { afterId: A, childrenAllowed: G });
1659
1677
  },
1660
- addChild: (I, V, H = !0) => {
1661
- const J = V ?? e.factory?.();
1662
- J !== void 0 && h.addItem(J, { parentId: I, childrenAllowed: H });
1678
+ addChild: (A, L, G = !0) => {
1679
+ const W = L ?? e.factory?.();
1680
+ W !== void 0 && h.addItem(W, { parentId: A, childrenAllowed: G });
1663
1681
  },
1664
- updateItem: (I, V, H = !0) => {
1665
- h.updateItem(I, V, H);
1682
+ updateItem: (A, L, G = !0) => {
1683
+ h.updateItem(A, L, G);
1666
1684
  },
1667
- deleteItem: (I) => {
1668
- h.deleteItem(I);
1685
+ deleteItem: (A) => {
1686
+ h.deleteItem(A);
1669
1687
  },
1670
- moveUp: (I) => h.moveUp(I) !== null,
1671
- moveDown: (I) => h.moveDown(I) !== null,
1672
- moveTop: (I) => h.moveTop(I) !== null,
1673
- moveBottom: (I) => h.moveBottom(I) !== null,
1674
- indent: (I) => h.indent(I) !== null,
1675
- outdent: (I) => h.outdent(I) !== null,
1676
- moveTo: (I, V, H) => h.moveTo(I, V, H) !== null,
1688
+ moveUp: (A) => h.moveUp(A) !== null,
1689
+ moveDown: (A) => h.moveDown(A) !== null,
1690
+ moveTop: (A) => h.moveTop(A) !== null,
1691
+ moveBottom: (A) => h.moveBottom(A) !== null,
1692
+ indent: (A) => h.indent(A) !== null,
1693
+ outdent: (A) => h.outdent(A) !== null,
1694
+ moveTo: (A, L, G) => h.moveTo(A, L, G) !== null,
1677
1695
  recalculatePositions: () => {
1678
1696
  e.set(h.recalculatePositions(e.get()));
1679
1697
  },
1680
- registerValidity: (I, V) => (f.set(I, V), () => f.delete(I)),
1698
+ registerValidity: (A, L) => (f.set(A, L), () => f.delete(A)),
1681
1699
  findNode: h.findNode,
1682
1700
  calculateSubtreeDepth: h.calculateSubtreeDepth
1683
1701
  };
1684
1702
  }
1685
- const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
1703
+ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, ra = (e, k, l) => {
1686
1704
  let n = Mt(e, l);
1687
1705
  for (; n && n.parentKey !== null; ) {
1688
1706
  if (n.parentKey === k) return !0;
@@ -1696,26 +1714,26 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
1696
1714
  n = Mt(e, n.parentKey);
1697
1715
  }
1698
1716
  return n && n.depth === l ? n : null;
1699
- }, Al = (e, k, l) => l === k || sa(e, k, l), Ft = (e, k, l, n) => {
1717
+ }, Sl = (e, k, l) => l === k || ra(e, k, l), Ft = (e, k, l, n) => {
1700
1718
  for (let i = k; i >= 0 && i < e.length; i += l) {
1701
- const v = e[i];
1702
- if (!Al(e, n, v.key)) return v;
1719
+ const m = e[i];
1720
+ if (!Sl(e, n, m.key)) return m;
1703
1721
  }
1704
1722
  return null;
1705
- }, Sl = (e) => {
1723
+ }, Al = (e) => {
1706
1724
  const {
1707
1725
  pointer: k,
1708
1726
  hoveredRow: l,
1709
1727
  sourceKey: n,
1710
1728
  sourceSubtreeDepth: i,
1711
- viewItems: v,
1729
+ viewItems: m,
1712
1730
  maxDepth: w,
1713
- indentPx: D,
1714
- containerLeft: g,
1731
+ indentPx: E,
1732
+ containerLeft: b,
1715
1733
  containerPaddingLeft: c
1716
1734
  } = e;
1717
- if (l.key === n || sa(v, n, l.key)) return null;
1718
- const h = k.y - l.rect.top, S = l.rect.height, j = h < S / 2, M = j ? "top" : "bottom", p = v.findIndex((P) => P.key === l.key), z = j ? Ft(v, p - 1, -1, n) : Ft(v, p, -1, n), q = j ? Ft(v, p, 1, n) : Ft(v, p + 1, 1, n), K = k.x - g - c, G = Math.round(K / D), E = z ? z.depth + 1 : 0, r = q ? q.depth : 0, f = Math.max(r, Math.min(G, E));
1735
+ if (l.key === n || ra(m, n, l.key)) return null;
1736
+ const h = k.y - l.rect.top, I = l.rect.height, j = h < I / 2, M = j ? "top" : "bottom", g = m.findIndex((P) => P.key === l.key), z = j ? Ft(m, g - 1, -1, n) : Ft(m, g, -1, n), q = j ? Ft(m, g, 1, n) : Ft(m, g + 1, 1, n), B = k.x - b - c, X = Math.round(B / E), D = z ? z.depth + 1 : 0, s = q ? q.depth : 0, f = Math.max(s, Math.min(X, D));
1719
1737
  let T;
1720
1738
  if (!z)
1721
1739
  T = {
@@ -1751,7 +1769,7 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
1751
1769
  levelRowKey: z.key
1752
1770
  };
1753
1771
  else {
1754
- const P = xl(v, z.key, f);
1772
+ const P = xl(m, z.key, f);
1755
1773
  P ? T = {
1756
1774
  type: "insert",
1757
1775
  refKey: l.key,
@@ -1773,11 +1791,11 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
1773
1791
  };
1774
1792
  }
1775
1793
  return T.depth + i - 1 >= w ? { type: "blocked", desired: T, reason: "maxDepth" } : T;
1776
- }, Il = ["data-id", "aria-level", "tabindex"], Pl = ["aria-label"], Dl = {
1794
+ }, Il = ["data-id", "aria-level", "tabindex"], Pl = ["aria-label"], El = {
1777
1795
  key: 2,
1778
1796
  class: "a-nested-list-editor__tree-toggle a-nested-list-editor__tree-toggle--spacer",
1779
1797
  "aria-hidden": "true"
1780
- }, El = { class: "a-le-row-main" }, $l = { class: "a-le-title" }, Tl = {
1798
+ }, Dl = { class: "a-le-row-main" }, $l = { class: "a-le-title" }, Tl = {
1781
1799
  key: 0,
1782
1800
  class: "a-nested-list-editor__drag-count",
1783
1801
  "aria-hidden": "true"
@@ -1793,7 +1811,7 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
1793
1811
  }, Ml = {
1794
1812
  key: 1,
1795
1813
  class: "a-le-row-body"
1796
- }, zl = { class: "a-le-form" }, Nl = ["data-parent-id"], Ol = "a-nested-list-editor__group", Ul = "a-le-drag-handle", da = /* @__PURE__ */ nt({
1814
+ }, zl = { class: "a-le-form" }, Nl = ["data-parent-id"], Ol = "a-nested-list-editor__group", Ul = "a-le-drag-handle", da = /* @__PURE__ */ _e({
1797
1815
  __name: "LeNestedRow",
1798
1816
  props: {
1799
1817
  vi: {},
@@ -1803,14 +1821,14 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
1803
1821
  callbacks: {}
1804
1822
  },
1805
1823
  setup(e) {
1806
- const k = e, l = da, { t: n } = it(), i = (g) => `--row-${String(g).replace(/\W/g, "_")}`, v = (g) => {
1824
+ const k = e, l = da, { t: n } = lt(), i = (b) => `--row-${String(b).replace(/\W/g, "_")}`, m = (b) => {
1807
1825
  if (typeof k.context.resolveValidation == "function")
1808
- return k.context.resolveValidation(g, k.vi.key, k.vi.index);
1809
- const c = g.validationState;
1826
+ return k.context.resolveValidation(b, k.vi.key, k.vi.index);
1827
+ const c = b.validationState;
1810
1828
  return c === "valid" || c === "invalid" || c === "warning" ? c : null;
1811
- }, w = () => k.context.buildSlotProps(k.vi), D = () => k.viewItems.filter((g) => g.parentKey === k.vi.key);
1812
- return (g, c) => (x(), N("div", {
1813
- class: He([
1829
+ }, w = () => k.context.buildSlotProps(k.vi), E = () => k.viewItems.filter((b) => b.parentKey === k.vi.key);
1830
+ return (b, c) => (x(), N("div", {
1831
+ class: Ue([
1814
1832
  "a-le-row-wrapper",
1815
1833
  {
1816
1834
  "a-le-row-wrapper--drop-disabled": e.dragState !== null && e.dragState.sourceKey === e.vi.key
@@ -1823,7 +1841,7 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
1823
1841
  onKeydown: c[17] || (c[17] = (h) => e.context.keyboardNav ? e.context.keyboardNav.handleKeydown(e.vi.key, h) : void 0)
1824
1842
  }, [
1825
1843
  U("div", {
1826
- class: He([
1844
+ class: Ue([
1827
1845
  "a-le-row",
1828
1846
  e.vi.depth > 0 ? "a-le-row--child" : null,
1829
1847
  {
@@ -1834,7 +1852,7 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
1834
1852
  "a-le-row--grabbed": e.context.keyboardNav && e.context.keyboardNav.isGrabbed(e.vi.key),
1835
1853
  "a-le-row--clickable": e.context.isRowClickable(e.vi),
1836
1854
  "a-le-row--drop-source": e.dragState !== null && e.dragState.sourceKey === e.vi.key,
1837
- [`a-le-row--validation-${v(e.vi.raw)}`]: v(e.vi.raw) !== null
1855
+ [`a-le-row--validation-${m(e.vi.raw)}`]: m(e.vi.raw) !== null
1838
1856
  }
1839
1857
  ]),
1840
1858
  style: wt({
@@ -1843,19 +1861,19 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
1843
1861
  "--parent-anchor": e.vi.parentKey !== null ? i(e.vi.parentKey) : "none"
1844
1862
  })
1845
1863
  }, [
1846
- O(g.$slots, "before-item", Ye(lt(w()))),
1864
+ O(b.$slots, "before-item", Je(at(w()))),
1847
1865
  U("div", {
1848
1866
  class: "a-le-row-header",
1849
1867
  onClick: c[14] || (c[14] = (h) => e.callbacks.onRowClick(e.vi))
1850
1868
  }, [
1851
- e.context.dragEnabled ? (x(), ee(oo, {
1869
+ e.context.dragEnabled ? (x(), te(oo, {
1852
1870
  key: 0,
1853
- class: He(Ul)
1854
- })) : Z("", !0),
1871
+ class: Ue(Ul)
1872
+ })) : _("", !0),
1855
1873
  e.context.showExpandToggle && e.vi.childrenAllowed ? (x(), N("button", {
1856
1874
  key: 1,
1857
1875
  type: "button",
1858
- class: He([
1876
+ class: Ue([
1859
1877
  "a-nested-list-editor__tree-toggle",
1860
1878
  {
1861
1879
  "a-nested-list-editor__tree-toggle--empty": !e.vi.hasChildren,
@@ -1863,46 +1881,46 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
1863
1881
  }
1864
1882
  ]),
1865
1883
  "aria-label": e.vi.childrenExpanded ? y(n)("common.sortable.close") : y(n)("common.sortable.edit"),
1866
- onClick: c[0] || (c[0] = ue((h) => e.vi.hasChildren && e.callbacks.onChevronClick(e.vi), ["stop"]))
1884
+ onClick: c[0] || (c[0] = fe((h) => e.vi.hasChildren && e.callbacks.onChevronClick(e.vi), ["stop"]))
1867
1885
  }, [...c[18] || (c[18] = [
1868
1886
  U("span", { class: "a-nested-list-editor__tree-toggle-caret" }, null, -1)
1869
- ])], 10, Pl)) : e.context.showExpandToggle ? (x(), N("span", Dl)) : Z("", !0),
1870
- U("div", El, [
1871
- O(g.$slots, "item-compact", Ye(lt(w())), () => [
1872
- U("span", $l, L(e.context.resolveCompactText(e.vi.raw, e.vi.key)), 1)
1887
+ ])], 10, Pl)) : e.context.showExpandToggle ? (x(), N("span", El)) : _("", !0),
1888
+ U("div", Dl, [
1889
+ O(b.$slots, "item-compact", Je(at(w())), () => [
1890
+ U("span", $l, V(e.context.resolveCompactText(e.vi.raw, e.vi.key)), 1)
1873
1891
  ]),
1874
1892
  e.vi.hasChildren ? (x(), N("span", Tl, [
1875
- s(de, {
1893
+ r(re, {
1876
1894
  icon: "mdi-file-tree",
1877
1895
  size: "14"
1878
1896
  }),
1879
- Y(" +" + L(e.vi.childrenCount), 1)
1880
- ])) : Z("", !0),
1881
- e.vi.unsaved ? (x(), ee(Yn, { key: 1 })) : Z("", !0)
1897
+ Q(" +" + V(e.vi.childrenCount), 1)
1898
+ ])) : _("", !0),
1899
+ e.vi.unsaved ? (x(), te(Yn, { key: 1 })) : _("", !0)
1882
1900
  ]),
1883
- e.context.reorderMode ? Z("", !0) : (x(), N("div", Fl, [
1884
- O(g.$slots, "item-status", Ye(lt(w())), () => [
1885
- e.context.statusField && e.vi.raw[e.context.statusField] != null && e.vi.raw[e.context.statusField] !== "" ? (x(), N("span", Kl, L(e.vi.raw[e.context.statusField]), 1)) : Z("", !0)
1901
+ e.context.reorderMode ? _("", !0) : (x(), N("div", Fl, [
1902
+ O(b.$slots, "item-status", Je(at(w())), () => [
1903
+ e.context.statusField && e.vi.raw[e.context.statusField] != null && e.vi.raw[e.context.statusField] !== "" ? (x(), N("span", Kl, V(e.vi.raw[e.context.statusField]), 1)) : _("", !0)
1886
1904
  ])
1887
1905
  ])),
1888
1906
  U("div", Bl, [
1889
- O(g.$slots, "item-actions", Ye(lt(w())), () => [
1890
- e.context.reorderMode ? (x(), N(we, { key: 0 }, [
1891
- s(ie, {
1907
+ O(b.$slots, "item-actions", Je(at(w())), () => [
1908
+ e.context.reorderMode ? (x(), N(xe, { key: 0 }, [
1909
+ r(se, {
1892
1910
  icon: "",
1893
1911
  size: "small",
1894
1912
  variant: "text",
1895
1913
  density: "comfortable",
1896
1914
  disabled: e.vi.firstInParent,
1897
1915
  class: "mx-1 a-le-action a-le-action--up",
1898
- onClick: c[1] || (c[1] = ue((h) => e.callbacks.moveUp(e.vi.key), ["stop"]))
1916
+ onClick: c[1] || (c[1] = fe((h) => e.callbacks.moveUp(e.vi.key), ["stop"]))
1899
1917
  }, {
1900
1918
  default: u(() => [
1901
- s(de, {
1919
+ r(re, {
1902
1920
  icon: "mdi-arrow-up",
1903
1921
  size: "18"
1904
1922
  }),
1905
- s(Je, {
1923
+ r(qe, {
1906
1924
  activator: "parent",
1907
1925
  location: "bottom",
1908
1926
  text: y(n)("common.sortable.moveUp")
@@ -1910,21 +1928,21 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
1910
1928
  ]),
1911
1929
  _: 1
1912
1930
  }, 8, ["disabled"]),
1913
- s(ie, {
1931
+ r(se, {
1914
1932
  icon: "",
1915
1933
  size: "small",
1916
1934
  variant: "text",
1917
1935
  density: "comfortable",
1918
1936
  disabled: e.vi.lastInParent,
1919
1937
  class: "mx-1 a-le-action a-le-action--down",
1920
- onClick: c[2] || (c[2] = ue((h) => e.callbacks.moveDown(e.vi.key), ["stop"]))
1938
+ onClick: c[2] || (c[2] = fe((h) => e.callbacks.moveDown(e.vi.key), ["stop"]))
1921
1939
  }, {
1922
1940
  default: u(() => [
1923
- s(de, {
1941
+ r(re, {
1924
1942
  icon: "mdi-arrow-down",
1925
1943
  size: "18"
1926
1944
  }),
1927
- s(Je, {
1945
+ r(qe, {
1928
1946
  activator: "parent",
1929
1947
  location: "bottom",
1930
1948
  text: y(n)("common.sortable.moveDown")
@@ -1932,7 +1950,7 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
1932
1950
  ]),
1933
1951
  _: 1
1934
1952
  }, 8, ["disabled"]),
1935
- s(ie, {
1953
+ r(se, {
1936
1954
  icon: "",
1937
1955
  size: "small",
1938
1956
  variant: "text",
@@ -1941,141 +1959,141 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
1941
1959
  class: "mx-1 a-le-action a-le-action--menu"
1942
1960
  }, {
1943
1961
  default: u(() => [
1944
- s(de, {
1962
+ r(re, {
1945
1963
  icon: "mdi-dots-vertical",
1946
1964
  size: "18"
1947
1965
  }),
1948
- s(Je, {
1966
+ r(qe, {
1949
1967
  activator: "parent",
1950
1968
  location: "bottom",
1951
1969
  text: y(n)("common.sortable.more")
1952
1970
  }, null, 8, ["text"]),
1953
- s(Vt, { activator: "parent" }, {
1971
+ r(Vt, { activator: "parent" }, {
1954
1972
  default: u(() => [
1955
- s(Ct, { density: "compact" }, {
1973
+ r(Ct, { density: "compact" }, {
1956
1974
  default: u(() => [
1957
- s(Ge, {
1975
+ r(je, {
1958
1976
  disabled: e.vi.firstInParent,
1959
- onClick: c[3] || (c[3] = ue((h) => e.callbacks.moveTop(e.vi.key), ["stop"]))
1977
+ onClick: c[3] || (c[3] = fe((h) => e.callbacks.moveTop(e.vi.key), ["stop"]))
1960
1978
  }, {
1961
1979
  prepend: u(() => [
1962
- s(de, { icon: "mdi-arrow-collapse-up" })
1980
+ r(re, { icon: "mdi-arrow-collapse-up" })
1963
1981
  ]),
1964
1982
  default: u(() => [
1965
- s(We, null, {
1983
+ r(He, null, {
1966
1984
  default: u(() => [
1967
- Y(L(y(n)("common.sortable.moveToTop")), 1)
1985
+ Q(V(y(n)("common.sortable.moveToTop")), 1)
1968
1986
  ]),
1969
1987
  _: 1
1970
1988
  })
1971
1989
  ]),
1972
1990
  _: 1
1973
1991
  }, 8, ["disabled"]),
1974
- s(Ge, {
1992
+ r(je, {
1975
1993
  disabled: e.vi.lastInParent,
1976
- onClick: c[4] || (c[4] = ue((h) => e.callbacks.moveBottom(e.vi.key), ["stop"]))
1994
+ onClick: c[4] || (c[4] = fe((h) => e.callbacks.moveBottom(e.vi.key), ["stop"]))
1977
1995
  }, {
1978
1996
  prepend: u(() => [
1979
- s(de, { icon: "mdi-arrow-collapse-down" })
1997
+ r(re, { icon: "mdi-arrow-collapse-down" })
1980
1998
  ]),
1981
1999
  default: u(() => [
1982
- s(We, null, {
2000
+ r(He, null, {
1983
2001
  default: u(() => [
1984
- Y(L(y(n)("common.sortable.moveToBottom")), 1)
2002
+ Q(V(y(n)("common.sortable.moveToBottom")), 1)
1985
2003
  ]),
1986
2004
  _: 1
1987
2005
  })
1988
2006
  ]),
1989
2007
  _: 1
1990
2008
  }, 8, ["disabled"]),
1991
- e.context.showMoveToPosition && (!e.vi.firstInParent || !e.vi.lastInParent) ? (x(), ee(Ge, {
2009
+ e.context.showMoveToPosition && (!e.vi.firstInParent || !e.vi.lastInParent) ? (x(), te(je, {
1992
2010
  key: 0,
1993
- onClick: c[5] || (c[5] = ue((h) => e.callbacks.openMoveToPosition(e.vi), ["stop"]))
2011
+ onClick: c[5] || (c[5] = fe((h) => e.callbacks.openMoveToPosition(e.vi), ["stop"]))
1994
2012
  }, {
1995
2013
  prepend: u(() => [
1996
- s(de, { icon: "mdi-target" })
2014
+ r(re, { icon: "mdi-target" })
1997
2015
  ]),
1998
2016
  default: u(() => [
1999
- s(We, null, {
2017
+ r(He, null, {
2000
2018
  default: u(() => [
2001
- Y(L(y(n)("common.sortable.moveToPosition.action")), 1)
2019
+ Q(V(y(n)("common.sortable.moveToPosition.action")), 1)
2002
2020
  ]),
2003
2021
  _: 1
2004
2022
  })
2005
2023
  ]),
2006
2024
  _: 1
2007
- })) : Z("", !0),
2008
- e.context.showChangeParent ? (x(), ee(Ge, {
2025
+ })) : _("", !0),
2026
+ e.context.showChangeParent ? (x(), te(je, {
2009
2027
  key: 1,
2010
- onClick: c[6] || (c[6] = ue((h) => e.callbacks.openChangeParent(e.vi), ["stop"]))
2028
+ onClick: c[6] || (c[6] = fe((h) => e.callbacks.openChangeParent(e.vi), ["stop"]))
2011
2029
  }, {
2012
2030
  prepend: u(() => [
2013
- s(de, { icon: "mdi-folder-move-outline" })
2031
+ r(re, { icon: "mdi-folder-move-outline" })
2014
2032
  ]),
2015
2033
  default: u(() => [
2016
- s(We, null, {
2034
+ r(He, null, {
2017
2035
  default: u(() => [
2018
- Y(L(y(n)("common.sortable.changeParent.action")), 1)
2036
+ Q(V(y(n)("common.sortable.changeParent.action")), 1)
2019
2037
  ]),
2020
2038
  _: 1
2021
2039
  })
2022
2040
  ]),
2023
2041
  _: 1
2024
- })) : Z("", !0),
2025
- s(Ge, {
2042
+ })) : _("", !0),
2043
+ r(je, {
2026
2044
  disabled: !e.vi.canIndent,
2027
- onClick: c[7] || (c[7] = ue((h) => e.callbacks.indent(e.vi), ["stop"]))
2045
+ onClick: c[7] || (c[7] = fe((h) => e.callbacks.indent(e.vi), ["stop"]))
2028
2046
  }, {
2029
2047
  prepend: u(() => [
2030
- s(de, { icon: "mdi-format-indent-increase" })
2048
+ r(re, { icon: "mdi-format-indent-increase" })
2031
2049
  ]),
2032
2050
  default: u(() => [
2033
- s(We, null, {
2051
+ r(He, null, {
2034
2052
  default: u(() => [
2035
- Y(L(y(n)("common.sortable.indent")), 1)
2053
+ Q(V(y(n)("common.sortable.indent")), 1)
2036
2054
  ]),
2037
2055
  _: 1
2038
2056
  })
2039
2057
  ]),
2040
2058
  _: 1
2041
2059
  }, 8, ["disabled"]),
2042
- s(Ge, {
2060
+ r(je, {
2043
2061
  disabled: !e.vi.canOutdent,
2044
- onClick: c[8] || (c[8] = ue((h) => e.callbacks.outdent(e.vi), ["stop"]))
2062
+ onClick: c[8] || (c[8] = fe((h) => e.callbacks.outdent(e.vi), ["stop"]))
2045
2063
  }, {
2046
2064
  prepend: u(() => [
2047
- s(de, { icon: "mdi-format-indent-decrease" })
2065
+ r(re, { icon: "mdi-format-indent-decrease" })
2048
2066
  ]),
2049
2067
  default: u(() => [
2050
- s(We, null, {
2068
+ r(He, null, {
2051
2069
  default: u(() => [
2052
- Y(L(y(n)("common.sortable.outdent")), 1)
2070
+ Q(V(y(n)("common.sortable.outdent")), 1)
2053
2071
  ]),
2054
2072
  _: 1
2055
2073
  })
2056
2074
  ]),
2057
2075
  _: 1
2058
2076
  }, 8, ["disabled"]),
2059
- e.context.showDeleteButton && e.context.canInteract ? (x(), ee(Ge, {
2077
+ e.context.showDeleteButton && e.context.canInteract ? (x(), te(je, {
2060
2078
  key: 2,
2061
- onClick: c[9] || (c[9] = ue((h) => e.callbacks.onDeleteClick(e.vi), ["stop"]))
2079
+ onClick: c[9] || (c[9] = fe((h) => e.callbacks.onDeleteClick(e.vi), ["stop"]))
2062
2080
  }, {
2063
2081
  prepend: u(() => [
2064
- s(de, {
2082
+ r(re, {
2065
2083
  icon: "mdi-trash-can-outline",
2066
2084
  color: "error"
2067
2085
  })
2068
2086
  ]),
2069
2087
  default: u(() => [
2070
- s(We, { class: "text-error" }, {
2088
+ r(He, { class: "text-error" }, {
2071
2089
  default: u(() => [
2072
- Y(L(y(n)("common.sortable.delete")), 1)
2090
+ Q(V(y(n)("common.sortable.delete")), 1)
2073
2091
  ]),
2074
2092
  _: 1
2075
2093
  })
2076
2094
  ]),
2077
2095
  _: 1
2078
- })) : Z("", !0)
2096
+ })) : _("", !0)
2079
2097
  ]),
2080
2098
  _: 1
2081
2099
  })
@@ -2085,8 +2103,8 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2085
2103
  ]),
2086
2104
  _: 1
2087
2105
  })
2088
- ], 64)) : (x(), N(we, { key: 1 }, [
2089
- e.context.showEditButton && e.context.canInteract ? (x(), ee(ie, {
2106
+ ], 64)) : (x(), N(xe, { key: 1 }, [
2107
+ e.context.showEditButton && e.context.canInteract ? (x(), te(se, {
2090
2108
  key: 0,
2091
2109
  icon: "",
2092
2110
  size: "small",
@@ -2094,44 +2112,44 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2094
2112
  color: "primary",
2095
2113
  density: "comfortable",
2096
2114
  class: "mx-1 a-le-action a-le-action--edit",
2097
- onClick: c[10] || (c[10] = ue((h) => e.callbacks.onEditClick(e.vi), ["stop"]))
2115
+ onClick: c[10] || (c[10] = fe((h) => e.callbacks.onEditClick(e.vi), ["stop"]))
2098
2116
  }, {
2099
2117
  default: u(() => [
2100
- s(de, {
2118
+ r(re, {
2101
2119
  icon: "mdi-pencil-outline",
2102
2120
  size: "18"
2103
2121
  }),
2104
- s(Je, {
2122
+ r(qe, {
2105
2123
  activator: "parent",
2106
2124
  location: "bottom",
2107
2125
  text: y(n)("common.sortable.edit")
2108
2126
  }, null, 8, ["text"])
2109
2127
  ]),
2110
2128
  _: 1
2111
- })) : Z("", !0),
2112
- e.context.showDeleteButton && e.context.canInteract ? (x(), ee(ie, {
2129
+ })) : _("", !0),
2130
+ e.context.showDeleteButton && e.context.canInteract ? (x(), te(se, {
2113
2131
  key: 1,
2114
2132
  icon: "",
2115
2133
  size: "small",
2116
2134
  variant: "text",
2117
2135
  density: "comfortable",
2118
2136
  class: "mx-1 a-le-action a-le-action--delete",
2119
- onClick: c[11] || (c[11] = ue((h) => e.callbacks.onDeleteClick(e.vi), ["stop"]))
2137
+ onClick: c[11] || (c[11] = fe((h) => e.callbacks.onDeleteClick(e.vi), ["stop"]))
2120
2138
  }, {
2121
2139
  default: u(() => [
2122
- s(de, {
2140
+ r(re, {
2123
2141
  icon: "mdi-trash-can-outline",
2124
2142
  size: "18"
2125
2143
  }),
2126
- s(Je, {
2144
+ r(qe, {
2127
2145
  activator: "parent",
2128
2146
  location: "bottom",
2129
2147
  text: y(n)("common.sortable.delete")
2130
2148
  }, null, 8, ["text"])
2131
2149
  ]),
2132
2150
  _: 1
2133
- })) : Z("", !0),
2134
- e.context.canInteract && (e.context.showAddChildButton && e.vi.canAddChild || e.context.showAddAfterAction) ? (x(), ee(ie, {
2151
+ })) : _("", !0),
2152
+ e.context.canInteract && (e.context.showAddChildButton && e.vi.canAddChild || e.context.showAddAfterAction) ? (x(), te(se, {
2135
2153
  key: 2,
2136
2154
  icon: "",
2137
2155
  size: "small",
@@ -2141,53 +2159,53 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2141
2159
  class: "mx-1 a-le-action a-le-action--menu"
2142
2160
  }, {
2143
2161
  default: u(() => [
2144
- s(de, {
2162
+ r(re, {
2145
2163
  icon: "mdi-dots-vertical",
2146
2164
  size: "18"
2147
2165
  }),
2148
- s(Je, {
2166
+ r(qe, {
2149
2167
  activator: "parent",
2150
2168
  location: "bottom",
2151
2169
  text: y(n)("common.sortable.more")
2152
2170
  }, null, 8, ["text"]),
2153
- s(Vt, { activator: "parent" }, {
2171
+ r(Vt, { activator: "parent" }, {
2154
2172
  default: u(() => [
2155
- s(Ct, { density: "compact" }, {
2173
+ r(Ct, { density: "compact" }, {
2156
2174
  default: u(() => [
2157
- e.context.showAddAfterAction ? (x(), ee(Ge, {
2175
+ e.context.showAddAfterAction ? (x(), te(je, {
2158
2176
  key: 0,
2159
- onClick: c[12] || (c[12] = ue((h) => e.callbacks.onAddAfterClick(e.vi), ["stop"]))
2177
+ onClick: c[12] || (c[12] = fe((h) => e.callbacks.onAddAfterClick(e.vi), ["stop"]))
2160
2178
  }, {
2161
2179
  prepend: u(() => [
2162
- s(de, { icon: "mdi-playlist-plus" })
2180
+ r(re, { icon: "mdi-playlist-plus" })
2163
2181
  ]),
2164
2182
  default: u(() => [
2165
- s(We, null, {
2183
+ r(He, null, {
2166
2184
  default: u(() => [
2167
- Y(L(y(n)("common.sortable.addAfter")), 1)
2185
+ Q(V(y(n)("common.sortable.addAfter")), 1)
2168
2186
  ]),
2169
2187
  _: 1
2170
2188
  })
2171
2189
  ]),
2172
2190
  _: 1
2173
- })) : Z("", !0),
2174
- e.context.showAddChildButton && e.vi.canAddChild ? (x(), ee(Ge, {
2191
+ })) : _("", !0),
2192
+ e.context.showAddChildButton && e.vi.canAddChild ? (x(), te(je, {
2175
2193
  key: 1,
2176
- onClick: c[13] || (c[13] = ue((h) => e.callbacks.onAddChildClick(e.vi), ["stop"]))
2194
+ onClick: c[13] || (c[13] = fe((h) => e.callbacks.onAddChildClick(e.vi), ["stop"]))
2177
2195
  }, {
2178
2196
  prepend: u(() => [
2179
- s(de, { icon: "mdi-subdirectory-arrow-right" })
2197
+ r(re, { icon: "mdi-subdirectory-arrow-right" })
2180
2198
  ]),
2181
2199
  default: u(() => [
2182
- s(We, null, {
2200
+ r(He, null, {
2183
2201
  default: u(() => [
2184
- Y(L(y(n)("common.sortable.addChild")), 1)
2202
+ Q(V(y(n)("common.sortable.addChild")), 1)
2185
2203
  ]),
2186
2204
  _: 1
2187
2205
  })
2188
2206
  ]),
2189
2207
  _: 1
2190
- })) : Z("", !0)
2208
+ })) : _("", !0)
2191
2209
  ]),
2192
2210
  _: 1
2193
2211
  })
@@ -2196,50 +2214,50 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2196
2214
  })
2197
2215
  ]),
2198
2216
  _: 1
2199
- })) : Z("", !0)
2217
+ })) : _("", !0)
2200
2218
  ], 64))
2201
2219
  ])
2202
2220
  ])
2203
2221
  ]),
2204
- e.vi.editing && !e.context.reorderMode && g.$slots.item ? (x(), N(we, { key: 0 }, [
2222
+ e.vi.editing && !e.context.reorderMode && b.$slots.item ? (x(), N(xe, { key: 0 }, [
2205
2223
  U("div", Rl, [
2206
2224
  U("div", Ll, [
2207
- O(g.$slots, "item", Ye(lt(w())))
2225
+ O(b.$slots, "item", Je(at(w())))
2208
2226
  ])
2209
2227
  ]),
2210
- O(g.$slots, "item-footer", Ye(lt(w())), () => [
2228
+ O(b.$slots, "item-footer", Je(at(w())), () => [
2211
2229
  e.context.showInlineSaveFooter ? (x(), N("div", Vl, [
2212
2230
  c[19] || (c[19] = U("div", { class: "a-le-row-footer-spacer" }, null, -1)),
2213
- s(ie, {
2231
+ r(se, {
2214
2232
  variant: "text",
2215
2233
  disabled: e.vi.loading,
2216
- onClick: c[15] || (c[15] = ue((h) => e.callbacks.onCancelClick(e.vi), ["stop"]))
2234
+ onClick: c[15] || (c[15] = fe((h) => e.callbacks.onCancelClick(e.vi), ["stop"]))
2217
2235
  }, {
2218
2236
  default: u(() => [
2219
- Y(L(y(n)("common.button.cancel")), 1)
2237
+ Q(V(y(n)("common.button.cancel")), 1)
2220
2238
  ]),
2221
2239
  _: 1
2222
2240
  }, 8, ["disabled"]),
2223
- s(ie, {
2241
+ r(se, {
2224
2242
  color: "primary",
2225
2243
  variant: "flat",
2226
2244
  "prepend-icon": "mdi-check",
2227
2245
  disabled: e.vi.loading,
2228
- onClick: c[16] || (c[16] = ue((h) => e.callbacks.onSaveClick(e.vi), ["stop"]))
2246
+ onClick: c[16] || (c[16] = fe((h) => e.callbacks.onSaveClick(e.vi), ["stop"]))
2229
2247
  }, {
2230
2248
  default: u(() => [
2231
- Y(L(y(n)("common.button.save")), 1)
2249
+ Q(V(y(n)("common.button.save")), 1)
2232
2250
  ]),
2233
2251
  _: 1
2234
2252
  }, 8, ["disabled"])
2235
- ])) : Z("", !0)
2253
+ ])) : _("", !0)
2236
2254
  ])
2237
- ], 64)) : g.$slots["item-readonly"] && (e.context.readonly || e.vi.expanded) && !e.context.reorderMode ? (x(), N("div", Ml, [
2255
+ ], 64)) : b.$slots["item-readonly"] && (e.context.readonly || e.vi.expanded) && !e.context.reorderMode ? (x(), N("div", Ml, [
2238
2256
  U("div", zl, [
2239
- O(g.$slots, "item-readonly", Ye(lt(w())))
2257
+ O(b.$slots, "item-readonly", Je(at(w())))
2240
2258
  ])
2241
- ])) : Z("", !0),
2242
- O(g.$slots, "after-item", Ye(lt(w())))
2259
+ ])) : _("", !0),
2260
+ O(b.$slots, "after-item", Je(at(w())))
2243
2261
  ], 6),
2244
2262
  e.vi.hasChildren && e.vi.childrenExpanded ? (x(), N("div", {
2245
2263
  key: 0,
@@ -2247,10 +2265,10 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2247
2265
  style: wt({ "--parent-depth": e.vi.depth })
2248
2266
  }, [
2249
2267
  U("div", {
2250
- class: He([Ol]),
2268
+ class: Ue([Ol]),
2251
2269
  "data-parent-id": String(e.vi.key)
2252
2270
  }, [
2253
- (x(!0), N(we, null, dt(D(), (h) => (x(), ee(y(l), {
2271
+ (x(!0), N(xe, null, st(E(), (h) => (x(), te(y(l), {
2254
2272
  key: String(h.key),
2255
2273
  vi: h,
2256
2274
  "view-items": e.viewItems,
@@ -2258,39 +2276,39 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2258
2276
  context: e.context,
2259
2277
  callbacks: e.callbacks
2260
2278
  }, {
2261
- item: u((S) => [
2262
- O(g.$slots, "item", fe({ ref_for: !0 }, S))
2279
+ item: u((I) => [
2280
+ O(b.$slots, "item", ve({ ref_for: !0 }, I))
2263
2281
  ]),
2264
- "item-compact": u((S) => [
2265
- O(g.$slots, "item-compact", fe({ ref_for: !0 }, S))
2282
+ "item-compact": u((I) => [
2283
+ O(b.$slots, "item-compact", ve({ ref_for: !0 }, I))
2266
2284
  ]),
2267
- "item-readonly": u((S) => [
2268
- O(g.$slots, "item-readonly", fe({ ref_for: !0 }, S))
2285
+ "item-readonly": u((I) => [
2286
+ O(b.$slots, "item-readonly", ve({ ref_for: !0 }, I))
2269
2287
  ]),
2270
- "item-status": u((S) => [
2271
- O(g.$slots, "item-status", fe({ ref_for: !0 }, S))
2288
+ "item-status": u((I) => [
2289
+ O(b.$slots, "item-status", ve({ ref_for: !0 }, I))
2272
2290
  ]),
2273
- "item-footer": u((S) => [
2274
- O(g.$slots, "item-footer", fe({ ref_for: !0 }, S))
2291
+ "item-footer": u((I) => [
2292
+ O(b.$slots, "item-footer", ve({ ref_for: !0 }, I))
2275
2293
  ]),
2276
- "item-actions": u((S) => [
2277
- O(g.$slots, "item-actions", fe({ ref_for: !0 }, S))
2294
+ "item-actions": u((I) => [
2295
+ O(b.$slots, "item-actions", ve({ ref_for: !0 }, I))
2278
2296
  ]),
2279
- "before-item": u((S) => [
2280
- O(g.$slots, "before-item", fe({ ref_for: !0 }, S))
2297
+ "before-item": u((I) => [
2298
+ O(b.$slots, "before-item", ve({ ref_for: !0 }, I))
2281
2299
  ]),
2282
- "after-item": u((S) => [
2283
- O(g.$slots, "after-item", fe({ ref_for: !0 }, S))
2300
+ "after-item": u((I) => [
2301
+ O(b.$slots, "after-item", ve({ ref_for: !0 }, I))
2284
2302
  ]),
2285
2303
  _: 3
2286
2304
  }, 8, ["vi", "view-items", "drag-state", "context", "callbacks"]))), 128))
2287
2305
  ], 10, Nl)
2288
- ], 4)) : Z("", !0)
2306
+ ], 4)) : _("", !0)
2289
2307
  ], 42, Il));
2290
2308
  }
2291
- }), jl = { class: "text-body-medium mb-2" }, ql = /* @__PURE__ */ nt({
2309
+ }), jl = { class: "text-body-medium mb-2" }, ql = /* @__PURE__ */ _e({
2292
2310
  __name: "LeChangeParentDialog",
2293
- props: /* @__PURE__ */ Qe({
2311
+ props: /* @__PURE__ */ We({
2294
2312
  tree: {},
2295
2313
  sourceKey: {},
2296
2314
  keyField: {},
@@ -2301,152 +2319,152 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2301
2319
  modelValue: { type: Boolean, required: !0 },
2302
2320
  modelModifiers: {}
2303
2321
  }),
2304
- emits: /* @__PURE__ */ Qe(["confirm"], ["update:modelValue"]),
2322
+ emits: /* @__PURE__ */ We(["confirm"], ["update:modelValue"]),
2305
2323
  setup(e, { emit: k }) {
2306
- const l = e, n = k, i = yt(e, "modelValue"), { t: v } = it(), w = me(void 0), D = me("last");
2307
- Re(i, (r) => {
2308
- r && (w.value = void 0, D.value = "last");
2324
+ const l = e, n = k, i = yt(e, "modelValue"), { t: m } = lt(), w = de(void 0), E = de("last");
2325
+ $e(i, (s) => {
2326
+ s && (w.value = void 0, E.value = "last");
2309
2327
  });
2310
- const g = A(() => {
2311
- const r = /* @__PURE__ */ new Set();
2312
- if (l.sourceKey === null) return r;
2328
+ const b = S(() => {
2329
+ const s = /* @__PURE__ */ new Set();
2330
+ if (l.sourceKey === null) return s;
2313
2331
  const f = (T) => {
2314
2332
  for (const P of T) {
2315
2333
  if (P.data[l.keyField] === l.sourceKey) {
2316
- const re = (oe) => {
2317
- for (const le of oe)
2318
- r.add(le.data[l.keyField]), le.children?.length && re(le.children);
2334
+ const ce = (ne) => {
2335
+ for (const le of ne)
2336
+ s.add(le.data[l.keyField]), le.children?.length && ce(le.children);
2319
2337
  };
2320
- return P.children?.length && re(P.children), !0;
2338
+ return P.children?.length && ce(P.children), !0;
2321
2339
  }
2322
2340
  if (P.children?.length && f(P.children)) return !0;
2323
2341
  }
2324
2342
  return !1;
2325
2343
  };
2326
- return f(l.tree.children), r;
2327
- }), c = A(() => {
2344
+ return f(l.tree.children), s;
2345
+ }), c = S(() => {
2328
2346
  if (l.sourceKey === null) return null;
2329
- const r = (f) => {
2347
+ const s = (f) => {
2330
2348
  for (const T of f) {
2331
2349
  if (T.data[l.keyField] === l.sourceKey) return T;
2332
2350
  if (T.children?.length) {
2333
- const P = r(T.children);
2351
+ const P = s(T.children);
2334
2352
  if (P) return P;
2335
2353
  }
2336
2354
  }
2337
2355
  return null;
2338
2356
  };
2339
- return r(l.tree.children);
2340
- }), h = A(() => {
2357
+ return s(l.tree.children);
2358
+ }), h = S(() => {
2341
2359
  if (l.sourceKey === null) return;
2342
- const r = (f, T) => {
2360
+ const s = (f, T) => {
2343
2361
  for (const P of f) {
2344
2362
  if (P.data[l.keyField] === l.sourceKey) return T;
2345
2363
  if (P.children?.length) {
2346
- const Q = r(P.children, P.data[l.keyField]);
2347
- if (Q !== void 0) return Q;
2364
+ const Y = s(P.children, P.data[l.keyField]);
2365
+ if (Y !== void 0) return Y;
2348
2366
  }
2349
2367
  }
2350
2368
  };
2351
- return r(l.tree.children, null);
2352
- }), S = A(() => {
2353
- const r = [], f = c.value ? l.calculateSubtreeDepth(c.value) : 1;
2354
- r.push({
2369
+ return s(l.tree.children, null);
2370
+ }), I = S(() => {
2371
+ const s = [], f = c.value ? l.calculateSubtreeDepth(c.value) : 1;
2372
+ s.push({
2355
2373
  key: null,
2356
2374
  depth: 0,
2357
- label: v("common.sortable.changeParent.rootLabel"),
2375
+ label: m("common.sortable.changeParent.rootLabel"),
2358
2376
  hasChildren: l.tree.children.length > 0,
2359
2377
  disallowed: h.value === null,
2360
2378
  reason: h.value === null ? "currentParent" : null
2361
2379
  });
2362
- const T = (P, Q) => {
2363
- for (const re of P) {
2364
- const oe = re.data[l.keyField];
2365
- let le = !1, te = null;
2366
- oe === l.sourceKey ? (le = !0, te = "self") : g.value.has(oe) ? (le = !0, te = "descendant") : h.value !== void 0 && h.value === oe ? (le = !0, te = "currentParent") : Q + 1 + f > l.maxDepth && (le = !0, te = "maxDepth"), r.push({
2367
- key: oe,
2368
- depth: Q + 1,
2369
- label: l.resolveLabel(re.data, oe),
2370
- hasChildren: !!(re.children && re.children.length > 0),
2380
+ const T = (P, Y) => {
2381
+ for (const ce of P) {
2382
+ const ne = ce.data[l.keyField];
2383
+ let le = !1, ie = null;
2384
+ ne === l.sourceKey ? (le = !0, ie = "self") : b.value.has(ne) ? (le = !0, ie = "descendant") : h.value !== void 0 && h.value === ne ? (le = !0, ie = "currentParent") : Y + 1 + f > l.maxDepth && (le = !0, ie = "maxDepth"), s.push({
2385
+ key: ne,
2386
+ depth: Y + 1,
2387
+ label: l.resolveLabel(ce.data, ne),
2388
+ hasChildren: !!(ce.children && ce.children.length > 0),
2371
2389
  disallowed: le,
2372
- reason: te
2373
- }), re.children?.length && T(re.children, Q + 1);
2390
+ reason: ie
2391
+ }), ce.children?.length && T(ce.children, Y + 1);
2374
2392
  }
2375
2393
  };
2376
- return T(l.tree.children, 0), r;
2377
- }), j = A(() => S.value.filter((r) => !r.disallowed)), M = A(
2378
- () => w.value === void 0 ? null : S.value.find((r) => r.key === w.value) ?? null
2379
- ), p = A(
2394
+ return T(l.tree.children, 0), s;
2395
+ }), j = S(() => I.value.filter((s) => !s.disallowed)), M = S(
2396
+ () => w.value === void 0 ? null : I.value.find((s) => s.key === w.value) ?? null
2397
+ ), g = S(
2380
2398
  () => !!M.value && M.value.hasChildren
2381
- ), z = (r) => {
2382
- r.disallowed || (w.value = r.key);
2399
+ ), z = (s) => {
2400
+ s.disallowed || (w.value = s.key);
2383
2401
  }, q = () => {
2384
- M.value && (n("confirm", M.value.key, D.value), i.value = !1);
2385
- }, K = () => {
2402
+ M.value && (n("confirm", M.value.key, E.value), i.value = !1);
2403
+ }, B = () => {
2386
2404
  i.value = !1;
2387
- }, G = (r) => `${r * 16}px`, E = (r) => r === "maxDepth" ? v("common.sortable.changeParent.errorMaxDepth") : "";
2388
- return (r, f) => (x(), ee(an, {
2405
+ }, X = (s) => `${s * 16}px`, D = (s) => s === "maxDepth" ? m("common.sortable.changeParent.errorMaxDepth") : "";
2406
+ return (s, f) => (x(), te(an, {
2389
2407
  modelValue: i.value,
2390
2408
  "onUpdate:modelValue": f[1] || (f[1] = (T) => i.value = T),
2391
2409
  "max-width": "540",
2392
2410
  persistent: ""
2393
2411
  }, {
2394
2412
  default: u(() => [
2395
- s(nn, null, {
2413
+ r(nn, null, {
2396
2414
  default: u(() => [
2397
- s(la, null, {
2415
+ r(la, null, {
2398
2416
  default: u(() => [
2399
- Y(L(y(v)("common.sortable.changeParent.title")), 1)
2417
+ Q(V(y(m)("common.sortable.changeParent.title")), 1)
2400
2418
  ]),
2401
2419
  _: 1
2402
2420
  }),
2403
- j.value.length === 0 ? (x(), ee(Kt, {
2421
+ j.value.length === 0 ? (x(), te(Kt, {
2404
2422
  key: 0,
2405
2423
  class: "text-body-medium"
2406
2424
  }, {
2407
2425
  default: u(() => [
2408
- s(ln, {
2426
+ r(ln, {
2409
2427
  type: "info",
2410
2428
  variant: "tonal",
2411
2429
  density: "compact"
2412
2430
  }, {
2413
2431
  default: u(() => [
2414
- U("strong", null, L(y(v)("common.sortable.changeParent.noTargetsTitle")), 1),
2415
- U("div", null, L(y(v)("common.sortable.changeParent.noTargetsText")), 1)
2432
+ U("strong", null, V(y(m)("common.sortable.changeParent.noTargetsTitle")), 1),
2433
+ U("div", null, V(y(m)("common.sortable.changeParent.noTargetsText")), 1)
2416
2434
  ]),
2417
2435
  _: 1
2418
2436
  })
2419
2437
  ]),
2420
2438
  _: 1
2421
- })) : (x(), N(we, { key: 1 }, [
2422
- s(Kt, { class: "pb-1" }, {
2439
+ })) : (x(), N(xe, { key: 1 }, [
2440
+ r(Kt, { class: "pb-1" }, {
2423
2441
  default: u(() => [
2424
- s(Ct, {
2442
+ r(Ct, {
2425
2443
  density: "compact",
2426
2444
  class: "le-change-parent__list"
2427
2445
  }, {
2428
2446
  default: u(() => [
2429
- (x(!0), N(we, null, dt(S.value, (T) => (x(), ee(Ge, {
2447
+ (x(!0), N(xe, null, st(I.value, (T) => (x(), te(je, {
2430
2448
  key: T.key === null ? "__root__" : String(T.key),
2431
2449
  disabled: T.disallowed,
2432
2450
  active: w.value === T.key,
2433
2451
  title: T.label,
2434
- subtitle: E(T.reason),
2435
- style: wt({ paddingInlineStart: G(T.depth) }),
2452
+ subtitle: D(T.reason),
2453
+ style: wt({ paddingInlineStart: X(T.depth) }),
2436
2454
  "data-disallowed": T.disallowed ? "true" : "false",
2437
2455
  "data-reason": T.reason ?? "",
2438
2456
  onClick: (P) => z(T)
2439
2457
  }, {
2440
2458
  prepend: u(() => [
2441
- T.key === null ? (x(), ee(de, {
2459
+ T.key === null ? (x(), te(re, {
2442
2460
  key: 0,
2443
2461
  icon: "mdi-folder-home-outline",
2444
2462
  size: "18"
2445
- })) : T.hasChildren ? (x(), ee(de, {
2463
+ })) : T.hasChildren ? (x(), te(re, {
2446
2464
  key: 1,
2447
2465
  icon: "mdi-folder-outline",
2448
2466
  size: "18"
2449
- })) : (x(), ee(de, {
2467
+ })) : (x(), te(re, {
2450
2468
  key: 2,
2451
2469
  icon: "mdi-file-outline",
2452
2470
  size: "18"
@@ -2460,56 +2478,56 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2460
2478
  ]),
2461
2479
  _: 1
2462
2480
  }),
2463
- p.value ? (x(), ee(Kt, {
2481
+ g.value ? (x(), te(Kt, {
2464
2482
  key: 0,
2465
2483
  class: "pt-0"
2466
2484
  }, {
2467
2485
  default: u(() => [
2468
- U("div", jl, L(y(v)("common.sortable.changeParent.placementHeading", {
2486
+ U("div", jl, V(y(m)("common.sortable.changeParent.placementHeading", {
2469
2487
  label: M.value?.label ?? ""
2470
2488
  })), 1),
2471
- s(Po, {
2472
- modelValue: D.value,
2473
- "onUpdate:modelValue": f[0] || (f[0] = (T) => D.value = T),
2489
+ r(Po, {
2490
+ modelValue: E.value,
2491
+ "onUpdate:modelValue": f[0] || (f[0] = (T) => E.value = T),
2474
2492
  density: "compact",
2475
2493
  "hide-details": ""
2476
2494
  }, {
2477
2495
  default: u(() => [
2478
- s(kn, {
2496
+ r(kn, {
2479
2497
  value: "first",
2480
- label: y(v)("common.sortable.changeParent.placeFirst")
2498
+ label: y(m)("common.sortable.changeParent.placeFirst")
2481
2499
  }, null, 8, ["label"]),
2482
- s(kn, {
2500
+ r(kn, {
2483
2501
  value: "last",
2484
- label: y(v)("common.sortable.changeParent.placeLast")
2502
+ label: y(m)("common.sortable.changeParent.placeLast")
2485
2503
  }, null, 8, ["label"])
2486
2504
  ]),
2487
2505
  _: 1
2488
2506
  }, 8, ["modelValue"])
2489
2507
  ]),
2490
2508
  _: 1
2491
- })) : Z("", !0)
2509
+ })) : _("", !0)
2492
2510
  ], 64)),
2493
- s(ia, null, {
2511
+ r(ia, null, {
2494
2512
  default: u(() => [
2495
- s(on),
2496
- s(ie, {
2513
+ r(on),
2514
+ r(se, {
2497
2515
  variant: "text",
2498
- onClick: K
2516
+ onClick: B
2499
2517
  }, {
2500
2518
  default: u(() => [
2501
- Y(L(y(v)("common.sortable.reorderCancel")), 1)
2519
+ Q(V(y(m)("common.sortable.reorderCancel")), 1)
2502
2520
  ]),
2503
2521
  _: 1
2504
2522
  }),
2505
- s(ie, {
2523
+ r(se, {
2506
2524
  color: "primary",
2507
2525
  variant: "elevated",
2508
2526
  disabled: !M.value || M.value.disallowed,
2509
2527
  onClick: q
2510
2528
  }, {
2511
2529
  default: u(() => [
2512
- Y(L(y(v)("common.sortable.changeParent.confirm")), 1)
2530
+ Q(V(y(m)("common.sortable.changeParent.confirm")), 1)
2513
2531
  ]),
2514
2532
  _: 1
2515
2533
  }, 8, ["disabled"])
@@ -2542,9 +2560,9 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2542
2560
  class: "a-le-sr-only",
2543
2561
  "aria-live": "polite",
2544
2562
  role: "status"
2545
- }, wn = "a-nested-list-editor__group", ei = "a-le-drag-handle", Cn = 24, xn = 22, Mi = /* @__PURE__ */ nt({
2563
+ }, wn = "a-nested-list-editor__group", ei = "a-le-drag-handle", Cn = 24, xn = 22, Mi = /* @__PURE__ */ _e({
2546
2564
  __name: "ANestedSortableListEditor",
2547
- props: /* @__PURE__ */ Qe({
2565
+ props: /* @__PURE__ */ We({
2548
2566
  maxDepth: {},
2549
2567
  factory: { type: Function, default: void 0 },
2550
2568
  getKey: { type: [String, Function], default: void 0 },
@@ -2590,22 +2608,22 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2590
2608
  mode: { default: "view" },
2591
2609
  modeModifiers: {}
2592
2610
  }),
2593
- emits: /* @__PURE__ */ Qe(["add", "add-child", "edit", "deleted", "close", "item-saved", "item-expand", "reorder-start", "reorder-cancel", "reorder-applied", "reorder-apply-error", "reorder-end", "indent", "outdent"], ["update:modelValue", "update:mode"]),
2611
+ emits: /* @__PURE__ */ We(["add", "add-child", "edit", "deleted", "close", "item-saved", "item-expand", "reorder-start", "reorder-cancel", "reorder-applied", "reorder-apply-error", "reorder-end", "indent", "outdent"], ["update:modelValue", "update:mode"]),
2594
2612
  setup(e, { expose: k, emit: l }) {
2595
- const n = e, i = l, v = yt(e, "modelValue"), w = yt(e, "mode"), { t: D } = it(), g = ea(), { showWarningT: c } = jn(), h = Lt("rootEl"), { isNarrow: S } = lo(h), j = io(), M = A(() => n.closeVariant === "icon" ? "icon" : n.closeVariant === "labeled" ? "labeled" : S.value ? "icon" : "labeled"), p = me(/* @__PURE__ */ new Set()), z = me(/* @__PURE__ */ new Set()), q = n.getKey ?? "id", K = typeof q == "function" ? "id" : q, G = (t) => typeof q == "function" ? q(t) : t[q], E = (() => {
2613
+ const n = e, i = l, m = yt(e, "modelValue"), w = yt(e, "mode"), { t: E } = lt(), b = ea(), { showWarningT: c } = jn(), h = Lt("rootEl"), { isNarrow: I } = lo(h), j = io(), M = S(() => n.closeVariant === "icon" ? "icon" : n.closeVariant === "labeled" ? "labeled" : I.value ? "icon" : "labeled"), g = de(/* @__PURE__ */ new Set()), z = de(/* @__PURE__ */ new Set()), q = n.getKey ?? "id", B = typeof q == "function" ? "id" : q, X = (t) => typeof q == "function" ? q(t) : t[q], D = (() => {
2596
2614
  const t = n.position;
2597
2615
  return t === void 0 || t === !1 ? "position" : typeof t == "object" ? t.field : t;
2598
2616
  })();
2599
2617
  ((t) => {
2600
2618
  const d = (o) => {
2601
2619
  for (const R of o)
2602
- R.children && R.children.length > 0 && (p.value.add(G(R.data)), d(R.children));
2620
+ R.children && R.children.length > 0 && (g.value.add(X(R.data)), d(R.children));
2603
2621
  };
2604
2622
  d(t.children);
2605
- })(v.value);
2623
+ })(m.value);
2606
2624
  const f = n.editor ?? Cl({
2607
- get: () => v.value,
2608
- set: (t) => v.value = t,
2625
+ get: () => m.value,
2626
+ set: (t) => m.value = t,
2609
2627
  factory: n.factory,
2610
2628
  getKey: n.getKey,
2611
2629
  position: n.position,
@@ -2613,95 +2631,95 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2613
2631
  maxDepth: n.maxDepth,
2614
2632
  dirtyExclude: () => n.dirtyExclude ?? [],
2615
2633
  validate: n.validate
2616
- }), T = A(() => {
2634
+ }), T = S(() => {
2617
2635
  const t = [];
2618
2636
  let d = 0;
2619
- const o = n.maxDepth, R = (ae, he, je) => {
2620
- for (let Pe = 0; Pe < ae.length; Pe++) {
2621
- const Ke = ae[Pe], rt = G(Ke.data), ye = Ke.children !== void 0, vt = ye && (Ke.children?.length ?? 0) > 0, Dt = Ke.children?.length ?? 0, bt = o - (he + 1);
2637
+ const o = n.maxDepth, R = (oe, ke, Ne) => {
2638
+ for (let Ee = 0; Ee < oe.length; Ee++) {
2639
+ const Ke = oe[Ee], it = X(Ke.data), ge = Ke.children !== void 0, vt = ge && (Ke.children?.length ?? 0) > 0, Et = Ke.children?.length ?? 0, bt = o - (ke + 1);
2622
2640
  t.push({
2623
- key: rt,
2641
+ key: it,
2624
2642
  index: d++,
2625
2643
  raw: Ke.data,
2626
- position: Ke.data[E],
2644
+ position: Ke.data[D],
2627
2645
  node: Ke,
2628
- depth: he,
2629
- parent: je?.data ?? null,
2630
- parentKey: je ? G(je.data) : null,
2631
- childrenCount: Dt,
2646
+ depth: ke,
2647
+ parent: Ne?.data ?? null,
2648
+ parentKey: Ne ? X(Ne.data) : null,
2649
+ childrenCount: Et,
2632
2650
  hasChildren: vt,
2633
- childrenAllowed: ye,
2634
- siblingIndex: Pe,
2635
- siblingCount: ae.length,
2636
- firstInParent: Pe === 0,
2637
- lastInParent: Pe === ae.length - 1,
2638
- canAddChild: ye && bt > 0,
2639
- canIndent: Pe > 0,
2640
- canOutdent: he > 0
2641
- }), vt && R(Ke.children, he + 1, Ke);
2651
+ childrenAllowed: ge,
2652
+ siblingIndex: Ee,
2653
+ siblingCount: oe.length,
2654
+ firstInParent: Ee === 0,
2655
+ lastInParent: Ee === oe.length - 1,
2656
+ canAddChild: ge && bt > 0,
2657
+ canIndent: Ee > 0,
2658
+ canOutdent: ke > 0
2659
+ }), vt && R(Ke.children, ke + 1, Ke);
2642
2660
  }
2643
2661
  };
2644
- return R(v.value.children, 0, null), t;
2645
- }), P = Zt(null), Q = me(/* @__PURE__ */ new Set()), re = () => {
2646
- f.commit(), Q.value = /* @__PURE__ */ new Set();
2647
- }, oe = (t) => {
2662
+ return R(m.value.children, 0, null), t;
2663
+ }), P = Zt(null), Y = de(/* @__PURE__ */ new Set()), ce = () => {
2664
+ f.commit(), Y.value = /* @__PURE__ */ new Set();
2665
+ }, ne = (t) => {
2648
2666
  const { node: d } = f.findNode(t);
2649
2667
  if (!d) {
2650
- Q.value.add(t);
2668
+ Y.value.add(t);
2651
2669
  return;
2652
2670
  }
2653
2671
  const o = (R) => {
2654
- Q.value.add(G(R.data)), R.children && R.children.forEach(o);
2672
+ Y.value.add(X(R.data)), R.children && R.children.forEach(o);
2655
2673
  };
2656
2674
  o(d);
2657
- }, le = /* @__PURE__ */ new Map(), te = A(() => {
2675
+ }, le = /* @__PURE__ */ new Map(), ie = S(() => {
2658
2676
  const t = [], d = /* @__PURE__ */ new Set();
2659
2677
  for (const o of T.value) {
2660
2678
  d.add(o.key);
2661
- const R = ce.value.has(o.key), ae = z.value.has(o.key), he = p.value.has(o.key), je = n.loadingKeys?.has(o.key) ?? !1, Pe = Q.value.has(o.key), Ke = n.readonly ? !1 : f.isUnsaved(o.key), rt = n.readonly ? !1 : Ke || Pe, ye = le.get(o.key);
2662
- if (ye && ye.raw === o.raw && ye.index === o.index && ye.position === o.position && ye.depth === o.depth && ye.parentKey === o.parentKey && ye.childrenCount === o.childrenCount && ye.firstInParent === o.firstInParent && ye.lastInParent === o.lastInParent && ye.editing === R && ye.expanded === ae && ye.childrenExpanded === he && ye.loading === je && ye.dirty === Ke && ye.moved === Pe && ye.unsaved === rt) {
2663
- t.push(ye);
2679
+ const R = ue.value.has(o.key), oe = z.value.has(o.key), ke = g.value.has(o.key), Ne = n.loadingKeys?.has(o.key) ?? !1, Ee = Y.value.has(o.key), Ke = n.readonly ? !1 : f.isUnsaved(o.key), it = n.readonly ? !1 : Ke || Ee, ge = le.get(o.key);
2680
+ if (ge && ge.raw === o.raw && ge.index === o.index && ge.position === o.position && ge.depth === o.depth && ge.parentKey === o.parentKey && ge.childrenCount === o.childrenCount && ge.firstInParent === o.firstInParent && ge.lastInParent === o.lastInParent && ge.editing === R && ge.expanded === oe && ge.childrenExpanded === ke && ge.loading === Ne && ge.dirty === Ke && ge.moved === Ee && ge.unsaved === it) {
2681
+ t.push(ge);
2664
2682
  continue;
2665
2683
  }
2666
2684
  const vt = {
2667
2685
  ...o,
2668
2686
  editing: R,
2669
- expanded: ae,
2670
- childrenExpanded: he,
2671
- loading: je,
2687
+ expanded: oe,
2688
+ childrenExpanded: ke,
2689
+ loading: Ne,
2672
2690
  dirty: Ke,
2673
- moved: Pe,
2674
- unsaved: rt
2691
+ moved: Ee,
2692
+ unsaved: it
2675
2693
  };
2676
2694
  le.set(o.key, vt), t.push(vt);
2677
2695
  }
2678
2696
  for (const o of le.keys())
2679
2697
  d.has(o) || le.delete(o);
2680
2698
  return t;
2681
- }), Le = A(() => v.value.children.length === 0), $ = A(() => T.value.length), m = Lt("rowsContainer"), C = A(() => !n.readonly && !n.disabled && !n.loading), F = A(
2699
+ }), Re = S(() => m.value.children.length === 0), $ = S(() => T.value.length), v = Lt("rowsContainer"), C = S(() => !n.readonly && !n.disabled && !n.loading), F = S(
2682
2700
  () => C.value && !n.disableReorder && $.value > 1
2683
- ), B = A(() => !!g.item), X = A(() => !!g["item-readonly"]), _ = A(() => !!n.onItemSave), {
2684
- editingKeys: ce,
2685
- editingSnapshots: ne,
2686
- clearEditing: ve,
2687
- beginEdit: Ce,
2688
- cancelEdit: ge,
2689
- commitEdit: Ve,
2690
- closeEdit: Xe,
2691
- requestAutoOpen: Se
2701
+ ), K = S(() => !!b.item), J = S(() => !!b["item-readonly"]), ee = S(() => !!n.onItemSave), {
2702
+ editingKeys: ue,
2703
+ editingSnapshots: ae,
2704
+ clearEditing: me,
2705
+ beginEdit: Se,
2706
+ cancelEdit: we,
2707
+ commitEdit: Le,
2708
+ closeEdit: Ge,
2709
+ requestAutoOpen: Pe
2692
2710
  } = qn({
2693
- rowsContainer: m,
2711
+ rowsContainer: v,
2694
2712
  rowSelector: ".a-le-row-wrapper",
2695
- isInlineEdit: B,
2713
+ isInlineEdit: K,
2696
2714
  // markDirty=false: restoring the pre-edit snapshot on cancel must not flag the
2697
2715
  // node dirty (it would otherwise be resent by partial-multi saves).
2698
2716
  restoreSnapshot: (t, d) => f.updateItem(t, d, !1),
2699
2717
  watchKeys: () => {
2700
2718
  const t = [], d = (o) => {
2701
2719
  for (const R of o)
2702
- t.push(G(R.data)), R.children && R.children.length && d(R.children);
2720
+ t.push(X(R.data)), R.children && R.children.length && d(R.children);
2703
2721
  };
2704
- return d(v.value.children), t;
2722
+ return d(m.value.children), t;
2705
2723
  },
2706
2724
  findEntry: (t) => {
2707
2725
  const { node: d } = f.findNode(t);
@@ -2709,42 +2727,42 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2709
2727
  },
2710
2728
  afterAutoOpen: (t) => {
2711
2729
  const { parent: d } = f.findNode(t);
2712
- d && p.value.add(G(d.data));
2730
+ d && g.value.add(X(d.data));
2713
2731
  }
2714
2732
  }), {
2715
- applying: xe,
2716
- applyError: qe,
2717
- hasPendingChanges: Me,
2718
- movedCount: at,
2719
- reorderMode: ze,
2720
- enterReorderMode: Ze,
2721
- cancelReorderMode: I,
2722
- applyReorder: V
2723
- } = ro({
2733
+ applying: Ae,
2734
+ applyError: Oe,
2735
+ hasPendingChanges: Ve,
2736
+ movedCount: et,
2737
+ reorderMode: Me,
2738
+ enterReorderMode: Xe,
2739
+ cancelReorderMode: tt,
2740
+ applyReorder: rt
2741
+ } = so({
2724
2742
  mode: w,
2725
2743
  snapshot: P,
2726
- movedKeys: Q,
2727
- modelValue: v,
2744
+ movedKeys: Y,
2745
+ modelValue: m,
2728
2746
  cloneModel: (t) => Be(t),
2729
2747
  applyModel: (t) => {
2730
- v.value = t;
2748
+ m.value = t;
2731
2749
  },
2732
2750
  canEnterReorder: F,
2733
2751
  onEnter: () => {
2734
- ve();
2735
- for (const t of Oe.value) p.value.add(t);
2736
- et(() => {
2737
- J.value && ut();
2752
+ me();
2753
+ for (const t of ye.value) g.value.add(t);
2754
+ Qe(() => {
2755
+ A.value && ut();
2738
2756
  });
2739
2757
  },
2740
2758
  onExternalEnter: () => {
2741
- ve();
2759
+ me();
2742
2760
  },
2743
2761
  onCancel: () => {
2744
- Ue();
2762
+ ze();
2745
2763
  },
2746
2764
  onApplyEnd: () => {
2747
- Ue();
2765
+ ze();
2748
2766
  },
2749
2767
  onReorderApply: (t) => n.onReorderApply?.(t),
2750
2768
  emit: {
@@ -2754,60 +2772,60 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2754
2772
  reorderApplyError: (t) => i("reorder-apply-error", t),
2755
2773
  reorderEnd: () => i("reorder-end")
2756
2774
  }
2757
- }), H = A(() => C.value && n.showAddButton && !ze.value), J = A(() => ze.value && !j.value && !n.disableDrag), se = A(
2758
- () => n.addLabel ? D(n.addLabel) : D("common.sortable.add")
2759
- ), ke = A(() => n.emptyTitle ?? D("common.sortable.emptyTitle")), De = A(
2760
- () => n.deleteConfirmTitle ?? D("common.sortable.deleteConfirmTitle")
2761
- ), be = A(
2762
- () => n.deleteConfirmText ?? D("common.sortable.deleteConfirmText")
2763
- ), Ie = A(
2764
- () => !n.readonly && n.showReorderToggle && !ze.value && $.value > 0
2765
- ), Ne = A(() => !!n.title && S.value), Oe = A(() => {
2775
+ }), dt = S(() => C.value && n.showAddButton && !Me.value), A = S(() => Me.value && !j.value && !n.disableDrag), L = S(
2776
+ () => n.addLabel ? E(n.addLabel) : E("common.sortable.add")
2777
+ ), G = S(() => n.emptyTitle ?? E("common.sortable.emptyTitle")), W = S(
2778
+ () => n.deleteConfirmTitle ?? E("common.sortable.deleteConfirmTitle")
2779
+ ), Z = S(
2780
+ () => n.deleteConfirmText ?? E("common.sortable.deleteConfirmText")
2781
+ ), pe = S(
2782
+ () => !n.readonly && n.showReorderToggle && !Me.value && $.value > 0
2783
+ ), Ce = S(() => !!n.title && I.value), ye = S(() => {
2766
2784
  const t = [], d = (o) => {
2767
2785
  for (const R of o)
2768
- R.children && R.children.length > 0 && (t.push(G(R.data)), d(R.children));
2786
+ R.children && R.children.length > 0 && (t.push(X(R.data)), d(R.children));
2769
2787
  };
2770
- return d(v.value.children), t;
2771
- }), Ee = A(
2772
- () => Oe.value.length > 0 && Oe.value.every((t) => p.value.has(t))
2773
- ), a = A(
2774
- () => !ze.value && Oe.value.length > 0
2775
- ), W = () => {
2776
- if (Ee.value)
2777
- for (const t of Oe.value) p.value.delete(t);
2788
+ return d(m.value.children), t;
2789
+ }), be = S(
2790
+ () => ye.value.length > 0 && ye.value.every((t) => g.value.has(t))
2791
+ ), a = S(
2792
+ () => !Me.value && ye.value.length > 0
2793
+ ), H = () => {
2794
+ if (be.value)
2795
+ for (const t of ye.value) g.value.delete(t);
2778
2796
  else
2779
- for (const t of Oe.value) p.value.add(t);
2780
- }, b = A(
2781
- () => !!(n.title || g.header || g["reorder-toggle"] || Ie.value || a.value || ze.value)
2782
- ), pe = me([]), _e = me(0), Ue = () => {
2783
- for (const t of pe.value)
2797
+ for (const t of ye.value) g.value.add(t);
2798
+ }, p = S(
2799
+ () => !!(n.title || b.header || b["reorder-toggle"] || pe.value || a.value || Me.value)
2800
+ ), he = de([]), Ye = de(0), ze = () => {
2801
+ for (const t of he.value)
2784
2802
  try {
2785
2803
  t.stop();
2786
2804
  } catch {
2787
2805
  }
2788
- pe.value = [];
2789
- }, Te = me(null), xt = (t, d) => {
2806
+ he.value = [];
2807
+ }, Te = de(null), xt = (t, d) => {
2790
2808
  const o = document.elementFromPoint(t, d);
2791
2809
  if (!o) return null;
2792
2810
  const R = o.closest(".a-le-row-wrapper");
2793
- if (!R || !m.value || !m.value.contains(R)) return null;
2794
- const ae = rn(R.getAttribute("data-id"));
2795
- if (ae === null) return null;
2796
- const he = te.value.find((je) => je.key === ae);
2797
- return he ? { el: R, viewItem: he } : null;
2811
+ if (!R || !v.value || !v.value.contains(R)) return null;
2812
+ const oe = sn(R.getAttribute("data-id"));
2813
+ if (oe === null) return null;
2814
+ const ke = ie.value.find((Ne) => Ne.key === oe);
2815
+ return ke ? { el: R, viewItem: ke } : null;
2798
2816
  }, ct = (t, d) => {
2799
- if (!Te.value || !m.value) return;
2817
+ if (!Te.value || !v.value) return;
2800
2818
  const o = xt(t, d);
2801
2819
  if (!o) {
2802
2820
  Te.value.instruction = null;
2803
2821
  return;
2804
2822
  }
2805
- const R = m.value.getBoundingClientRect(), he = (o.el.querySelector(":scope > .a-le-row") ?? o.el).getBoundingClientRect();
2806
- Te.value.instruction = Sl({
2823
+ const R = v.value.getBoundingClientRect(), ke = (o.el.querySelector(":scope > .a-le-row") ?? o.el).getBoundingClientRect();
2824
+ Te.value.instruction = Al({
2807
2825
  pointer: { x: t, y: d },
2808
2826
  hoveredRow: {
2809
2827
  key: o.viewItem.key,
2810
- rect: he,
2828
+ rect: ke,
2811
2829
  depth: o.viewItem.depth,
2812
2830
  parentKey: o.viewItem.parentKey,
2813
2831
  siblingIndex: o.viewItem.siblingIndex,
@@ -2815,7 +2833,7 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2815
2833
  },
2816
2834
  sourceKey: Te.value.sourceKey,
2817
2835
  sourceSubtreeDepth: Te.value.sourceSubtreeDepth,
2818
- viewItems: te.value,
2836
+ viewItems: ie.value,
2819
2837
  maxDepth: n.maxDepth,
2820
2838
  indentPx: Cn,
2821
2839
  containerLeft: R.left,
@@ -2823,15 +2841,15 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2823
2841
  });
2824
2842
  }, Fe = (t) => {
2825
2843
  ct(t.clientX, t.clientY);
2826
- }, At = (t, d) => {
2844
+ }, St = (t, d) => {
2827
2845
  if (!f.moveTo(d, t.parentKey, t.index)) {
2828
- c("common.sortable.error.maxDeepExceed"), _e.value++, et(() => ut());
2846
+ c("common.sortable.error.maxDeepExceed"), Ye.value++, Qe(() => ut());
2829
2847
  return;
2830
2848
  }
2831
- oe(d), t.makeChild && t.parentKey !== null && p.value.add(t.parentKey);
2849
+ ne(d), t.makeChild && t.parentKey !== null && g.value.add(t.parentKey);
2832
2850
  }, ut = () => {
2833
- if (Ue(), !J.value || !m.value) return;
2834
- const t = Array.from(m.value.querySelectorAll("." + wn));
2851
+ if (ze(), !A.value || !v.value) return;
2852
+ const t = Array.from(v.value.querySelectorAll("." + wn));
2835
2853
  for (const d of t) {
2836
2854
  const o = uo(d, [], {
2837
2855
  group: { name: "a-nested", pull: !0, put: !0 },
@@ -2844,23 +2862,23 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2844
2862
  forceFallback: !0,
2845
2863
  fallbackTolerance: 3,
2846
2864
  onStart: (R) => {
2847
- const ae = R.item, he = rn(ae.getAttribute("data-id"));
2848
- if (he === null) return;
2849
- const je = f.findNode(he).node, Pe = je ? f.calculateSubtreeDepth(je) : 1;
2865
+ const oe = R.item, ke = sn(oe.getAttribute("data-id"));
2866
+ if (ke === null) return;
2867
+ const Ne = f.findNode(ke).node, Ee = Ne ? f.calculateSubtreeDepth(Ne) : 1;
2850
2868
  Te.value = {
2851
- sourceKey: he,
2852
- sourceSubtreeDepth: Pe,
2869
+ sourceKey: ke,
2870
+ sourceSubtreeDepth: Ee,
2853
2871
  instruction: null
2854
2872
  }, document.addEventListener("pointermove", Fe, { passive: !0 });
2855
2873
  },
2856
2874
  onMove: (R) => {
2857
- const ae = R.originalEvent;
2858
- if (ae) {
2859
- if ("clientX" in ae && "clientY" in ae)
2860
- ct(ae.clientX, ae.clientY);
2861
- else if ("touches" in ae) {
2862
- const he = ae;
2863
- he.touches.length > 0 && ct(he.touches[0].clientX, he.touches[0].clientY);
2875
+ const oe = R.originalEvent;
2876
+ if (oe) {
2877
+ if ("clientX" in oe && "clientY" in oe)
2878
+ ct(oe.clientX, oe.clientY);
2879
+ else if ("touches" in oe) {
2880
+ const ke = oe;
2881
+ ke.touches.length > 0 && ct(ke.touches[0].clientX, ke.touches[0].clientY);
2864
2882
  }
2865
2883
  }
2866
2884
  return !1;
@@ -2869,91 +2887,91 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2869
2887
  document.removeEventListener("pointermove", Fe);
2870
2888
  const R = Te.value;
2871
2889
  if (Te.value = null, !R) return;
2872
- const ae = R.instruction;
2873
- ae !== null && ae.type !== "blocked" && At(ae, R.sourceKey);
2890
+ const oe = R.instruction;
2891
+ oe !== null && oe.type !== "blocked" && St(oe, R.sourceKey);
2874
2892
  }
2875
2893
  });
2876
- pe.value.push(o);
2894
+ he.value.push(o);
2877
2895
  }
2878
- }, rn = (t) => {
2896
+ }, sn = (t) => {
2879
2897
  if (t === null || t === "") return null;
2880
2898
  const d = yo(t);
2881
2899
  return String(d) === t ? d : t;
2882
2900
  };
2883
- Re(
2884
- () => J.value,
2901
+ $e(
2902
+ () => A.value,
2885
2903
  () => {
2886
- J.value ? et(() => ut()) : Ue();
2904
+ A.value ? Qe(() => ut()) : ze();
2887
2905
  }
2888
- ), Re(
2889
- () => _e.value,
2906
+ ), $e(
2907
+ () => Ye.value,
2890
2908
  () => {
2891
- J.value && et(() => ut());
2909
+ A.value && Qe(() => ut());
2892
2910
  }
2893
- ), Re(
2894
- () => te.value.map((t) => t.key).join("|"),
2911
+ ), $e(
2912
+ () => ie.value.map((t) => t.key).join("|"),
2895
2913
  () => {
2896
- J.value && et(() => ut());
2914
+ A.value && Qe(() => ut());
2897
2915
  }
2898
2916
  ), en(() => {
2899
- J.value && ut();
2917
+ A.value && ut();
2900
2918
  }), tn(() => {
2901
- Ue(), document.removeEventListener("pointermove", Fe);
2919
+ ze(), document.removeEventListener("pointermove", Fe);
2902
2920
  });
2903
- const ot = A(() => {
2921
+ const nt = S(() => {
2904
2922
  const t = Te.value;
2905
- if (!t || t.instruction === null || !m.value) return null;
2923
+ if (!t || t.instruction === null || !v.value) return null;
2906
2924
  const d = t.instruction;
2907
2925
  if (d.type === "blocked") return null;
2908
- const o = m.value.querySelector(
2926
+ const o = v.value.querySelector(
2909
2927
  `.a-le-row-wrapper[data-id="${CSS.escape(String(d.refKey))}"]`
2910
2928
  );
2911
2929
  if (!o) return null;
2912
- const R = o.querySelector(":scope > .a-le-row"), ae = m.value.getBoundingClientRect(), he = (R ?? o).getBoundingClientRect(), je = xn + d.depth * Cn, Pe = d.refEdge === "top" ? he.top - ae.top : he.bottom - ae.top, Ke = { top: Pe, left: je, right: 16 };
2913
- let rt = null;
2930
+ const R = o.querySelector(":scope > .a-le-row"), oe = v.value.getBoundingClientRect(), ke = (R ?? o).getBoundingClientRect(), Ne = xn + d.depth * Cn, Ee = d.refEdge === "top" ? ke.top - oe.top : ke.bottom - oe.top, Ke = { top: Ee, left: Ne, right: 16 };
2931
+ let it = null;
2914
2932
  if (d.levelRowKey !== null) {
2915
- const ye = m.value.querySelector(
2933
+ const ge = v.value.querySelector(
2916
2934
  `.a-le-row-wrapper[data-id="${CSS.escape(String(d.levelRowKey))}"]`
2917
2935
  );
2918
- if (ye) {
2919
- const Dt = (ye.querySelector(":scope > .a-le-row") ?? ye).getBoundingClientRect(), bt = Dt.top - ae.top + Dt.height / 2;
2920
- bt < Pe && (rt = {
2936
+ if (ge) {
2937
+ const Et = (ge.querySelector(":scope > .a-le-row") ?? ge).getBoundingClientRect(), bt = Et.top - oe.top + Et.height / 2;
2938
+ bt < Ee && (it = {
2921
2939
  top: bt,
2922
- height: Pe - bt,
2923
- left: je
2940
+ height: Ee - bt,
2941
+ left: Ne
2924
2942
  });
2925
2943
  }
2926
2944
  }
2927
- return { line: Ke, connector: rt };
2945
+ return { line: Ke, connector: it };
2928
2946
  }), ht = () => {
2929
- H.value && (Se(), n.factory && f.addItem(), i("add", void 0));
2930
- }, sn = (t) => {
2931
- C.value && (Se(), n.factory && f.addAfter(t.key, void 0, t.childrenAllowed), i("add", { afterId: t.key, childrenAllowed: t.childrenAllowed }));
2947
+ dt.value && (Pe(), n.factory && f.addItem(), i("add", void 0));
2948
+ }, rn = (t) => {
2949
+ C.value && (Pe(), n.factory && f.addAfter(t.key, void 0, t.childrenAllowed), i("add", { afterId: t.key, childrenAllowed: t.childrenAllowed }));
2932
2950
  }, dn = (t) => {
2933
- C.value && t.canAddChild && (Se(), p.value.add(t.key), i("add-child", t), n.factory && f.addChild(t.key, void 0, !0), i("add", { parentId: t.key, childrenAllowed: !0 }));
2934
- }, St = (t) => {
2935
- if (!(!C.value || ze.value)) {
2936
- if (ce.value.has(t.key)) {
2951
+ C.value && t.canAddChild && (Pe(), g.value.add(t.key), i("add-child", t), n.factory && f.addChild(t.key, void 0, !0), i("add", { parentId: t.key, childrenAllowed: !0 }));
2952
+ }, At = (t) => {
2953
+ if (!(!C.value || Me.value)) {
2954
+ if (ue.value.has(t.key)) {
2937
2955
  gt(t);
2938
2956
  return;
2939
2957
  }
2940
- B.value && Ce(t), i("edit", t);
2958
+ K.value && Se(t), i("edit", t);
2941
2959
  }
2942
2960
  }, zt = (t) => {
2943
2961
  if (n.disabled || n.loading) return;
2944
- const d = t.key, o = p.value.has(d);
2945
- o ? p.value.delete(d) : p.value.add(d), i("item-expand", t, !o);
2962
+ const d = t.key, o = g.value.has(d);
2963
+ o ? g.value.delete(d) : g.value.add(d), i("item-expand", t, !o);
2946
2964
  }, cn = (t) => {
2947
2965
  if (n.disabled || n.loading) return;
2948
2966
  const d = t.key, o = z.value.has(d);
2949
2967
  o ? z.value.delete(d) : z.value.add(d), i("item-expand", t, !o);
2950
- }, un = (t) => n.disableRowClick || n.disabled || n.loading || ze.value ? !1 : !!(t.editing || t.expanded || !n.readonly && n.showEditButton), ca = (t) => {
2968
+ }, un = (t) => n.disableRowClick || n.disabled || n.loading || Me.value ? !1 : !!(t.editing || t.expanded || !n.readonly && n.showEditButton), ca = (t) => {
2951
2969
  if (un(t)) {
2952
2970
  if (t.editing || t.expanded) {
2953
2971
  gt(t);
2954
2972
  return;
2955
2973
  }
2956
- n.readonly && X.value ? cn(t) : St(t);
2974
+ n.readonly && J.value ? cn(t) : At(t);
2957
2975
  }
2958
2976
  }, {
2959
2977
  deleteDialog: Nt,
@@ -2966,70 +2984,70 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
2966
2984
  onDeleteConfirm: (t) => n.onDeleteConfirm ? n.onDeleteConfirm(t) : !0,
2967
2985
  onDelete: (t) => n.onDelete?.(t),
2968
2986
  onDeleted: (t) => {
2969
- ce.value.delete(t.key), ne.value.delete(t.key), z.value.delete(t.key), p.value.delete(t.key), i("deleted", t);
2987
+ ue.value.delete(t.key), ae.value.delete(t.key), z.value.delete(t.key), g.value.delete(t.key), i("deleted", t);
2970
2988
  },
2971
2989
  disableDeleteConfirm: () => n.disableDeleteConfirm
2972
2990
  }), fn = async (t) => {
2973
2991
  C.value && await va(t);
2974
2992
  }, vn = async (t) => {
2975
- n.onItemSave && await n.onItemSave(t.raw), Ve(t), i("item-saved", t);
2993
+ n.onItemSave && await n.onItemSave(t.raw), Le(t), i("item-saved", t);
2976
2994
  }, mn = (t) => {
2977
- ge(t);
2995
+ we(t);
2978
2996
  }, gt = (t) => {
2979
- Xe(t), i("close", t);
2997
+ Ge(t), i("close", t);
2980
2998
  }, Ot = (t) => {
2981
- f.moveUp(t) && oe(t);
2999
+ f.moveUp(t) && ne(t);
2982
3000
  }, Ut = (t) => {
2983
- f.moveDown(t) && oe(t);
3001
+ f.moveDown(t) && ne(t);
2984
3002
  }, jt = (t) => {
2985
- f.moveTop(t) && oe(t);
3003
+ f.moveTop(t) && ne(t);
2986
3004
  }, qt = (t) => {
2987
- f.moveBottom(t) && oe(t);
3005
+ f.moveBottom(t) && ne(t);
2988
3006
  }, Ht = (t) => {
2989
3007
  if (!f.indent(t.key)) {
2990
3008
  c("common.sortable.error.maxDeepExceed");
2991
3009
  return;
2992
3010
  }
2993
- oe(t.key), i("indent", t);
3011
+ ne(t.key), i("indent", t);
2994
3012
  }, Gt = (t) => {
2995
- f.outdent(t.key) && (oe(t.key), i("outdent", t));
3013
+ f.outdent(t.key) && (ne(t.key), i("outdent", t));
2996
3014
  }, Jt = (t) => Zn(t, { compactField: n.compactField }), yn = (t, d) => d === void 0 ? null : f.rowState(t, d), pt = /* @__PURE__ */ new Map(), ha = (t) => {
2997
3015
  let d = pt.get(t);
2998
3016
  return d || (d = {
2999
3017
  edit: () => {
3000
- const o = $e(t);
3001
- o && St(o);
3018
+ const o = De(t);
3019
+ o && At(o);
3002
3020
  },
3003
3021
  save: () => {
3004
- const o = $e(t);
3022
+ const o = De(t);
3005
3023
  if (o) return vn(o);
3006
3024
  },
3007
3025
  cancel: () => {
3008
- const o = $e(t);
3026
+ const o = De(t);
3009
3027
  o && mn(o);
3010
3028
  },
3011
3029
  close: () => {
3012
- const o = $e(t);
3030
+ const o = De(t);
3013
3031
  o && gt(o);
3014
3032
  },
3015
3033
  delete: async () => {
3016
- const o = $e(t);
3034
+ const o = De(t);
3017
3035
  o && await fn(o);
3018
3036
  },
3019
3037
  addAfter: () => {
3020
- const o = $e(t);
3021
- o && sn(o);
3038
+ const o = De(t);
3039
+ o && rn(o);
3022
3040
  },
3023
3041
  addChild: () => {
3024
- const o = $e(t);
3042
+ const o = De(t);
3025
3043
  o && dn(o);
3026
3044
  },
3027
3045
  toggleExpand: () => {
3028
- const o = $e(t);
3046
+ const o = De(t);
3029
3047
  o && zt(o);
3030
3048
  },
3031
3049
  toggleDetail: () => {
3032
- const o = $e(t);
3050
+ const o = De(t);
3033
3051
  o && cn(o);
3034
3052
  },
3035
3053
  moveUp: () => Ot(t),
@@ -3037,18 +3055,18 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
3037
3055
  moveTop: () => jt(t),
3038
3056
  moveBottom: () => qt(t),
3039
3057
  indent: () => {
3040
- const o = $e(t);
3058
+ const o = De(t);
3041
3059
  o && Ht(o);
3042
3060
  },
3043
3061
  outdent: () => {
3044
- const o = $e(t);
3062
+ const o = De(t);
3045
3063
  o && Gt(o);
3046
3064
  },
3047
3065
  update: (o) => f.updateItem(t, o)
3048
3066
  }, pt.set(t, d)), d;
3049
3067
  };
3050
- Re(
3051
- () => te.value,
3068
+ $e(
3069
+ () => ie.value,
3052
3070
  (t) => {
3053
3071
  if (pt.size === 0) return;
3054
3072
  const d = new Set(t.map((o) => o.key));
@@ -3077,7 +3095,7 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
3077
3095
  dirty: t.dirty,
3078
3096
  unsaved: t.unsaved,
3079
3097
  moved: t.moved,
3080
- reorderMode: ze.value,
3098
+ reorderMode: Me.value,
3081
3099
  canMoveUp: !t.firstInParent,
3082
3100
  canMoveDown: !t.lastInParent,
3083
3101
  canIndent: t.canIndent,
@@ -3085,26 +3103,26 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
3085
3103
  canAddChild: t.canAddChild,
3086
3104
  touch: j.value,
3087
3105
  actions: ha(t.key)
3088
- }), pa = A(() => ({
3089
- applying: xe.value,
3090
- hasPendingChanges: Me.value,
3091
- movedCount: at.value,
3092
- error: qe.value,
3106
+ }), pa = S(() => ({
3107
+ applying: Ae.value,
3108
+ hasPendingChanges: Ve.value,
3109
+ movedCount: et.value,
3110
+ error: Oe.value,
3093
3111
  actions: {
3094
- apply: V,
3095
- cancel: I
3112
+ apply: rt,
3113
+ cancel: tt
3096
3114
  }
3097
- })), hn = A(() => ({
3115
+ })), hn = S(() => ({
3098
3116
  mode: w.value,
3099
3117
  disabled: !F.value,
3100
- hasPendingChanges: Me.value,
3118
+ hasPendingChanges: Ve.value,
3101
3119
  actions: {
3102
- enterReorderMode: Ze,
3103
- exitReorderMode: I
3120
+ enterReorderMode: Xe,
3121
+ exitReorderMode: tt
3104
3122
  }
3105
- })), ba = A(() => new Set(Oe.value)), $e = (t) => te.value.find((d) => d.key === t), It = Hn({
3106
- viewItems: A(
3107
- () => te.value.map((t) => ({
3123
+ })), ba = S(() => new Set(ye.value)), De = (t) => ie.value.find((d) => d.key === t), It = Hn({
3124
+ viewItems: S(
3125
+ () => ie.value.map((t) => ({
3108
3126
  key: t.key,
3109
3127
  expanded: t.childrenExpanded,
3110
3128
  canExpand: ba.value.has(t.key),
@@ -3113,15 +3131,15 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
3113
3131
  }))
3114
3132
  ),
3115
3133
  variant: "nested",
3116
- isReorderMode: ze,
3117
- disabled: A(() => !C.value),
3118
- isEditing: (t) => ce.value.has(t),
3134
+ isReorderMode: Me,
3135
+ disabled: S(() => !C.value),
3136
+ isEditing: (t) => ue.value.has(t),
3119
3137
  onToggleEdit: (t) => {
3120
- const d = $e(t);
3121
- d && St(d);
3138
+ const d = De(t);
3139
+ d && At(d);
3122
3140
  },
3123
3141
  onCancelEdit: (t) => {
3124
- const d = $e(t);
3142
+ const d = De(t);
3125
3143
  d && gt(d);
3126
3144
  },
3127
3145
  onMoveUp: (t) => Ot(t),
@@ -3129,48 +3147,48 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
3129
3147
  onMoveTop: (t) => jt(t),
3130
3148
  onMoveBottom: (t) => qt(t),
3131
3149
  onIndent: (t) => {
3132
- const d = $e(t);
3150
+ const d = De(t);
3133
3151
  d && Ht(d);
3134
3152
  },
3135
3153
  onOutdent: (t) => {
3136
- const d = $e(t);
3154
+ const d = De(t);
3137
3155
  d && Gt(d);
3138
3156
  },
3139
3157
  onToggleChildren: (t) => {
3140
- const d = $e(t);
3158
+ const d = De(t);
3141
3159
  d && zt(d);
3142
3160
  },
3143
- onCancelReorder: () => I()
3144
- }), Wt = me(!1), ft = Zt(null), Xt = A(() => {
3161
+ onCancelReorder: () => tt()
3162
+ }), Wt = de(!1), ft = Zt(null), Xt = S(() => {
3145
3163
  const t = ft.value;
3146
3164
  if (!t) return null;
3147
- const d = f.findNode(t.key), o = d.parent?.children ?? v.value.children, R = o.findIndex((ae) => G(ae.data) === t.key);
3165
+ const d = f.findNode(t.key), o = d.parent?.children ?? m.value.children, R = o.findIndex((oe) => X(oe.data) === t.key);
3148
3166
  return {
3149
- parentId: d.parent ? G(d.parent.data) : null,
3167
+ parentId: d.parent ? X(d.parent.data) : null,
3150
3168
  total: o.length,
3151
3169
  currentIndex: R
3152
3170
  };
3153
- }), ka = A(
3171
+ }), ka = S(
3154
3172
  () => ft.value ? Jt(ft.value.raw) : ""
3155
3173
  ), wa = (t) => {
3156
3174
  n.showMoveToPosition && (ft.value = t, Wt.value = !0);
3157
3175
  }, Ca = (t) => {
3158
3176
  const d = Xt.value, o = ft.value;
3159
- ft.value = null, !(!d || !o) && t !== d.currentIndex && f.moveTo(o.key, d.parentId, t) && oe(o.key);
3160
- }, Yt = me(!1), Pt = Zt(null), xa = (t) => {
3177
+ ft.value = null, !(!d || !o) && t !== d.currentIndex && f.moveTo(o.key, d.parentId, t) && ne(o.key);
3178
+ }, Yt = de(!1), Pt = Zt(null), xa = (t) => {
3161
3179
  n.showChangeParent && (Pt.value = t, Yt.value = !0);
3162
- }, Aa = (t, d) => {
3180
+ }, Sa = (t, d) => {
3163
3181
  const o = Pt.value;
3164
3182
  if (Pt.value = null, !o) return;
3165
3183
  let R = 0;
3166
- t === null ? R = v.value.children.length : R = f.findNode(t).node?.children?.length ?? 0;
3167
- const ae = d === "first" ? 0 : R;
3168
- f.moveTo(o.key, t, ae) && (oe(o.key), t !== null && p.value.add(t));
3169
- }, Sa = A(() => ({
3170
- reorderMode: ze.value,
3184
+ t === null ? R = m.value.children.length : R = f.findNode(t).node?.children?.length ?? 0;
3185
+ const oe = d === "first" ? 0 : R;
3186
+ f.moveTo(o.key, t, oe) && (ne(o.key), t !== null && g.value.add(t));
3187
+ }, Aa = S(() => ({
3188
+ reorderMode: Me.value,
3171
3189
  readonly: n.readonly,
3172
3190
  canInteract: C.value,
3173
- dragEnabled: J.value,
3191
+ dragEnabled: A.value,
3174
3192
  showExpandToggle: n.showExpandToggle,
3175
3193
  showEditButton: n.showEditButton,
3176
3194
  showDeleteButton: n.showDeleteButton,
@@ -3178,7 +3196,7 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
3178
3196
  showAddAfterAction: n.showAddAfterAction,
3179
3197
  showMoveToPosition: n.showMoveToPosition,
3180
3198
  showChangeParent: n.showChangeParent,
3181
- showInlineSaveFooter: _.value,
3199
+ showInlineSaveFooter: ee.value,
3182
3200
  statusField: n.statusField,
3183
3201
  effectiveCloseVariant: M.value,
3184
3202
  keyboardNav: It,
@@ -3189,12 +3207,12 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
3189
3207
  })), Ia = {
3190
3208
  onRowClick: ca,
3191
3209
  onChevronClick: zt,
3192
- onEditClick: St,
3210
+ onEditClick: At,
3193
3211
  onDeleteClick: fn,
3194
3212
  onCloseClick: gt,
3195
3213
  onSaveClick: vn,
3196
3214
  onCancelClick: mn,
3197
- onAddAfterClick: sn,
3215
+ onAddAfterClick: rn,
3198
3216
  onAddChildClick: dn,
3199
3217
  moveUp: (t) => Ot(t),
3200
3218
  moveDown: (t) => Ut(t),
@@ -3204,14 +3222,14 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
3204
3222
  outdent: Gt,
3205
3223
  openMoveToPosition: wa,
3206
3224
  openChangeParent: xa
3207
- }, Pa = A(() => te.value.filter((t) => t.parentKey === null)), Da = (t, d, o) => (f.addItem(d, { afterId: t ?? void 0, childrenAllowed: o }), et(() => f.commit()), v.value), Ea = (t, d, o) => (p.value.add(t), f.addItem(d, { parentId: t, asFirstChild: !0, childrenAllowed: o }), et(() => f.commit()), v.value), $a = (t) => {
3208
- f.deleteItem(t), ce.value.delete(t), ne.value.delete(t), z.value.delete(t), p.value.delete(t), et(() => f.commit());
3209
- }, Ta = (t, d, o = null, R = null, ae = null) => {
3210
- f.updateItem(t, d), et(() => f.commit());
3211
- }, gn = A(
3212
- () => te.value.filter((t) => t.unsaved).length
3225
+ }, Pa = S(() => ie.value.filter((t) => t.parentKey === null)), Ea = (t, d, o) => (f.addItem(d, { afterId: t ?? void 0, childrenAllowed: o }), Qe(() => f.commit()), m.value), Da = (t, d, o) => (g.value.add(t), f.addItem(d, { parentId: t, asFirstChild: !0, childrenAllowed: o }), Qe(() => f.commit()), m.value), $a = (t) => {
3226
+ f.deleteItem(t), ue.value.delete(t), ae.value.delete(t), z.value.delete(t), g.value.delete(t), Qe(() => f.commit());
3227
+ }, Ta = (t, d, o = null, R = null, oe = null) => {
3228
+ f.updateItem(t, d), Qe(() => f.commit());
3229
+ }, gn = S(
3230
+ () => ie.value.filter((t) => t.unsaved).length
3213
3231
  ), Fa = () => {
3214
- f.commit(), Q.value = /* @__PURE__ */ new Set(), ve();
3232
+ f.commit(), Y.value = /* @__PURE__ */ new Set(), me();
3215
3233
  };
3216
3234
  return Jn(
3217
3235
  () => n.unsavedSectionLabel ? { label: n.unsavedSectionLabel, dirty: gn.value > 0 } : []
@@ -3223,255 +3241,255 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
3223
3241
  validateAll: () => Wn(f, (t) => {
3224
3242
  let d = f.findNode(t).parent;
3225
3243
  for (; d; )
3226
- p.value.add(G(d.data)), d = f.findNode(G(d.data)).parent;
3244
+ g.value.add(X(d.data)), d = f.findNode(X(d.data)).parent;
3227
3245
  const o = f.viewItems.value.find((R) => R.key === t);
3228
- o && Ce(o);
3246
+ o && Se(o);
3229
3247
  }),
3230
3248
  // Legacy aliases (pre-v2 ASortableNested API).
3231
- addAfterId: Da,
3232
- addChildToId: Ea,
3249
+ addAfterId: Ea,
3250
+ addChildToId: Da,
3233
3251
  removeById: $a,
3234
3252
  updateData: Ta,
3235
- resetDirtyBaseline: re,
3253
+ resetDirtyBaseline: ce,
3236
3254
  hasUnsavedChanges: f.hasUnsaved,
3237
3255
  unsavedCount: gn,
3238
3256
  clearUnsavedState: Fa,
3239
3257
  // Expand-aware flattened view (controller's own `viewItems` ignores collapse state).
3240
3258
  viewItems: T,
3241
- enterReorderMode: Ze,
3242
- cancelReorderMode: I,
3243
- applyReorder: V,
3244
- expand: (t) => p.value.add(t),
3245
- collapse: (t) => p.value.delete(t),
3259
+ enterReorderMode: Xe,
3260
+ cancelReorderMode: tt,
3261
+ applyReorder: rt,
3262
+ expand: (t) => g.value.add(t),
3263
+ collapse: (t) => g.value.delete(t),
3246
3264
  toggleExpand: (t) => {
3247
- p.value.has(t) ? p.value.delete(t) : p.value.add(t);
3265
+ g.value.has(t) ? g.value.delete(t) : g.value.add(t);
3248
3266
  },
3249
3267
  expandDetail: (t) => z.value.add(t),
3250
3268
  collapseDetail: (t) => z.value.delete(t)
3251
3269
  }), (t, d) => (x(), N("div", {
3252
3270
  ref_key: "rootEl",
3253
3271
  ref: h,
3254
- class: He(["a-nested-list-editor", [
3272
+ class: Ue(["a-nested-list-editor", [
3255
3273
  `a-nested-list-editor--mode-${w.value}`,
3256
3274
  {
3257
3275
  "a-nested-list-editor--readonly": e.readonly,
3258
3276
  "a-nested-list-editor--disabled": e.disabled,
3259
3277
  "a-nested-list-editor--touch": y(j),
3260
- "a-nested-list-editor--drag-enabled": J.value
3278
+ "a-nested-list-editor--drag-enabled": A.value
3261
3279
  }
3262
3280
  ]])
3263
3281
  }, [
3264
3282
  U("div", Gl, [
3265
- b.value ? (x(), N("div", Jl, [
3266
- O(t.$slots, "header", fe({ title: e.title }, hn.value), () => [
3267
- e.title ? (x(), N("h3", Wl, L(e.title), 1)) : Z("", !0),
3283
+ p.value ? (x(), N("div", Jl, [
3284
+ O(t.$slots, "header", ve({ title: e.title }, hn.value), () => [
3285
+ e.title ? (x(), N("h3", Wl, V(e.title), 1)) : _("", !0),
3268
3286
  U("div", Xl, [
3269
- y(ze) ? O(t.$slots, "reorder-toolbar", Ye(fe({ key: 0 }, pa.value)), () => [
3270
- s(so, {
3271
- class: He({ "a-le-toolbar-status--pending": y(Me) }),
3272
- "has-pending-changes": y(Me),
3273
- "pending-count": y(at),
3274
- error: y(qe)
3287
+ y(Me) ? O(t.$slots, "reorder-toolbar", Je(ve({ key: 0 }, pa.value)), () => [
3288
+ r(ro, {
3289
+ class: Ue({ "a-le-toolbar-status--pending": y(Ve) }),
3290
+ "has-pending-changes": y(Ve),
3291
+ "pending-count": y(et),
3292
+ error: y(Oe)
3275
3293
  }, null, 8, ["class", "has-pending-changes", "pending-count", "error"]),
3276
- s(ie, {
3294
+ r(se, {
3277
3295
  variant: "text",
3278
3296
  size: "small",
3279
- disabled: y(xe),
3280
- onClick: y(I)
3297
+ disabled: y(Ae),
3298
+ onClick: y(tt)
3281
3299
  }, {
3282
3300
  default: u(() => [
3283
- Y(L(y(D)("common.sortable.reorderCancel")), 1)
3301
+ Q(V(y(E)("common.sortable.reorderCancel")), 1)
3284
3302
  ]),
3285
3303
  _: 1
3286
3304
  }, 8, ["disabled", "onClick"]),
3287
- s(ie, {
3305
+ r(se, {
3288
3306
  color: "primary",
3289
3307
  variant: "flat",
3290
3308
  size: "small",
3291
3309
  "prepend-icon": "mdi-check",
3292
- loading: y(xe),
3293
- disabled: y(xe) || !y(Me),
3294
- onClick: y(V)
3310
+ loading: y(Ae),
3311
+ disabled: y(Ae) || !y(Ve),
3312
+ onClick: y(rt)
3295
3313
  }, {
3296
3314
  default: u(() => [
3297
- Y(L(y(D)("common.sortable.reorderApply")), 1)
3315
+ Q(V(y(E)("common.sortable.reorderApply")), 1)
3298
3316
  ]),
3299
3317
  _: 1
3300
3318
  }, 8, ["loading", "disabled", "onClick"])
3301
- ]) : (x(), N(we, { key: 1 }, [
3302
- a.value && Ne.value ? (x(), ee(ie, {
3319
+ ]) : (x(), N(xe, { key: 1 }, [
3320
+ a.value && Ce.value ? (x(), te(se, {
3303
3321
  key: 0,
3304
3322
  variant: "tonal",
3305
3323
  color: "primary",
3306
3324
  icon: "",
3307
3325
  size: "x-small",
3308
- onClick: W
3326
+ onClick: H
3309
3327
  }, {
3310
3328
  default: u(() => [
3311
- s(de, {
3312
- icon: Ee.value ? "mdi-unfold-less-horizontal" : "mdi-unfold-more-horizontal",
3329
+ r(re, {
3330
+ icon: be.value ? "mdi-unfold-less-horizontal" : "mdi-unfold-more-horizontal",
3313
3331
  size: "18"
3314
3332
  }, null, 8, ["icon"]),
3315
- s(Je, {
3333
+ r(qe, {
3316
3334
  activator: "parent",
3317
3335
  location: "bottom",
3318
- text: Ee.value ? y(D)("common.sortable.collapseAll") : y(D)("common.sortable.expandAll")
3336
+ text: be.value ? y(E)("common.sortable.collapseAll") : y(E)("common.sortable.expandAll")
3319
3337
  }, null, 8, ["text"])
3320
3338
  ]),
3321
3339
  _: 1
3322
- })) : a.value ? (x(), ee(ie, {
3340
+ })) : a.value ? (x(), te(se, {
3323
3341
  key: 1,
3324
3342
  variant: "tonal",
3325
3343
  color: "primary",
3326
3344
  size: "small",
3327
- "prepend-icon": Ee.value ? "mdi-unfold-less-horizontal" : "mdi-unfold-more-horizontal",
3328
- onClick: W
3345
+ "prepend-icon": be.value ? "mdi-unfold-less-horizontal" : "mdi-unfold-more-horizontal",
3346
+ onClick: H
3329
3347
  }, {
3330
3348
  default: u(() => [
3331
- Y(L(Ee.value ? y(D)("common.sortable.collapseAll") : y(D)("common.sortable.expandAll")), 1)
3349
+ Q(V(be.value ? y(E)("common.sortable.collapseAll") : y(E)("common.sortable.expandAll")), 1)
3332
3350
  ]),
3333
3351
  _: 1
3334
- }, 8, ["prepend-icon"])) : Z("", !0),
3335
- Ie.value ? O(t.$slots, "reorder-toggle", Ye(fe({ key: 2 }, hn.value)), () => [
3336
- Ne.value ? (x(), ee(ie, {
3352
+ }, 8, ["prepend-icon"])) : _("", !0),
3353
+ pe.value ? O(t.$slots, "reorder-toggle", Je(ve({ key: 2 }, hn.value)), () => [
3354
+ Ce.value ? (x(), te(se, {
3337
3355
  key: 0,
3338
3356
  variant: "tonal",
3339
3357
  color: "primary",
3340
3358
  icon: "",
3341
3359
  size: "x-small",
3342
3360
  disabled: !F.value,
3343
- onClick: y(Ze)
3361
+ onClick: y(Xe)
3344
3362
  }, {
3345
3363
  default: u(() => [
3346
- s(de, {
3364
+ r(re, {
3347
3365
  icon: "mdi-sort",
3348
3366
  size: "18"
3349
3367
  }),
3350
- s(Je, {
3368
+ r(qe, {
3351
3369
  activator: "parent",
3352
3370
  location: "bottom",
3353
- text: y(D)("common.sortable.reorder")
3371
+ text: y(E)("common.sortable.reorder")
3354
3372
  }, null, 8, ["text"])
3355
3373
  ]),
3356
3374
  _: 1
3357
- }, 8, ["disabled", "onClick"])) : (x(), ee(ie, {
3375
+ }, 8, ["disabled", "onClick"])) : (x(), te(se, {
3358
3376
  key: 1,
3359
3377
  variant: "tonal",
3360
3378
  color: "primary",
3361
3379
  "prepend-icon": "mdi-sort",
3362
3380
  size: "small",
3363
3381
  disabled: !F.value,
3364
- onClick: y(Ze)
3382
+ onClick: y(Xe)
3365
3383
  }, {
3366
3384
  default: u(() => [
3367
- Y(L(y(D)("common.sortable.reorder")), 1)
3385
+ Q(V(y(E)("common.sortable.reorder")), 1)
3368
3386
  ]),
3369
3387
  _: 1
3370
3388
  }, 8, ["disabled", "onClick"]))
3371
- ]) : Z("", !0)
3389
+ ]) : _("", !0)
3372
3390
  ], 64))
3373
3391
  ])
3374
3392
  ])
3375
- ])) : Z("", !0),
3393
+ ])) : _("", !0),
3376
3394
  e.loading ? (x(), N("div", Yl, [
3377
- s(ra, {
3395
+ r(sa, {
3378
3396
  indeterminate: "",
3379
3397
  color: "primary",
3380
3398
  size: "32"
3381
3399
  })
3382
3400
  ])) : e.error ? (x(), N("div", Ql, [
3383
- s(ln, {
3401
+ r(ln, {
3384
3402
  type: "error",
3385
3403
  variant: "tonal",
3386
3404
  density: "compact",
3387
3405
  border: "start"
3388
3406
  }, {
3389
3407
  default: u(() => [
3390
- Y(L(e.error), 1)
3408
+ Q(V(e.error), 1)
3391
3409
  ]),
3392
3410
  _: 1
3393
3411
  })
3394
- ])) : Le.value ? (x(), N("div", Zl, [
3412
+ ])) : Re.value ? (x(), N("div", Zl, [
3395
3413
  O(t.$slots, "empty", {
3396
3414
  readonly: e.readonly,
3397
3415
  disabled: e.disabled,
3398
3416
  actions: { add: ht }
3399
3417
  }, () => [
3400
- s(Xn, {
3401
- title: ke.value,
3402
- "add-label": se.value,
3403
- "can-add": H.value,
3418
+ r(Xn, {
3419
+ title: G.value,
3420
+ "add-label": L.value,
3421
+ "can-add": dt.value,
3404
3422
  onAdd: ht
3405
3423
  }, null, 8, ["title", "add-label", "can-add"])
3406
3424
  ])
3407
3425
  ])) : (x(), N("div", {
3408
- key: _e.value,
3426
+ key: Ye.value,
3409
3427
  ref_key: "rowsContainer",
3410
- ref: m,
3411
- class: He(["a-nested-list-editor__rows", { "a-nested-list-editor__rows--dragging": Te.value !== null }])
3428
+ ref: v,
3429
+ class: Ue(["a-nested-list-editor__rows", { "a-nested-list-editor__rows--dragging": Te.value !== null }])
3412
3430
  }, [
3413
3431
  U("div", {
3414
- class: He([wn, "a-nested-list-editor__group--root"]),
3432
+ class: Ue([wn, "a-nested-list-editor__group--root"]),
3415
3433
  "data-parent-id": ""
3416
3434
  }, [
3417
- (x(!0), N(we, null, dt(Pa.value, (o) => (x(), ee(da, {
3435
+ (x(!0), N(xe, null, st(Pa.value, (o) => (x(), te(da, {
3418
3436
  key: String(o.key),
3419
3437
  vi: o,
3420
- "view-items": te.value,
3438
+ "view-items": ie.value,
3421
3439
  "drag-state": Te.value,
3422
- context: Sa.value,
3440
+ context: Aa.value,
3423
3441
  callbacks: Ia
3424
3442
  }, {
3425
3443
  item: u((R) => [
3426
- O(t.$slots, "item", fe({ ref_for: !0 }, R))
3444
+ O(t.$slots, "item", ve({ ref_for: !0 }, R))
3427
3445
  ]),
3428
3446
  "item-compact": u((R) => [
3429
- O(t.$slots, "item-compact", fe({ ref_for: !0 }, R))
3447
+ O(t.$slots, "item-compact", ve({ ref_for: !0 }, R))
3430
3448
  ]),
3431
3449
  "item-readonly": u((R) => [
3432
- O(t.$slots, "item-readonly", fe({ ref_for: !0 }, R))
3450
+ O(t.$slots, "item-readonly", ve({ ref_for: !0 }, R))
3433
3451
  ]),
3434
3452
  "item-status": u((R) => [
3435
- O(t.$slots, "item-status", fe({ ref_for: !0 }, R))
3453
+ O(t.$slots, "item-status", ve({ ref_for: !0 }, R))
3436
3454
  ]),
3437
3455
  "item-footer": u((R) => [
3438
- O(t.$slots, "item-footer", fe({ ref_for: !0 }, R))
3456
+ O(t.$slots, "item-footer", ve({ ref_for: !0 }, R))
3439
3457
  ]),
3440
3458
  "item-actions": u((R) => [
3441
- O(t.$slots, "item-actions", fe({ ref_for: !0 }, R))
3459
+ O(t.$slots, "item-actions", ve({ ref_for: !0 }, R))
3442
3460
  ]),
3443
3461
  "before-item": u((R) => [
3444
- O(t.$slots, "before-item", fe({ ref_for: !0 }, R))
3462
+ O(t.$slots, "before-item", ve({ ref_for: !0 }, R))
3445
3463
  ]),
3446
3464
  "after-item": u((R) => [
3447
- O(t.$slots, "after-item", fe({ ref_for: !0 }, R))
3465
+ O(t.$slots, "after-item", ve({ ref_for: !0 }, R))
3448
3466
  ]),
3449
3467
  _: 3
3450
3468
  }, 8, ["vi", "view-items", "drag-state", "context"]))), 128))
3451
3469
  ], 2),
3452
- ot.value !== null ? (x(), N(we, { key: 0 }, [
3453
- ot.value.connector !== null ? (x(), N("div", {
3470
+ nt.value !== null ? (x(), N(xe, { key: 0 }, [
3471
+ nt.value.connector !== null ? (x(), N("div", {
3454
3472
  key: 0,
3455
3473
  class: "a-nested-list-editor__drop-connector",
3456
3474
  style: wt({
3457
- left: `${ot.value.connector.left}px`,
3458
- top: `${ot.value.connector.top}px`,
3459
- height: `${ot.value.connector.height}px`
3475
+ left: `${nt.value.connector.left}px`,
3476
+ top: `${nt.value.connector.top}px`,
3477
+ height: `${nt.value.connector.height}px`
3460
3478
  })
3461
- }, null, 4)) : Z("", !0),
3479
+ }, null, 4)) : _("", !0),
3462
3480
  U("div", {
3463
3481
  class: "a-nested-list-editor__drop-line",
3464
3482
  style: wt({
3465
- top: `${ot.value.line.top}px`,
3466
- left: `${ot.value.line.left}px`,
3467
- right: `${ot.value.line.right}px`
3483
+ top: `${nt.value.line.top}px`,
3484
+ left: `${nt.value.line.left}px`,
3485
+ right: `${nt.value.line.right}px`
3468
3486
  })
3469
3487
  }, [...d[3] || (d[3] = [
3470
3488
  U("span", { class: "a-nested-list-editor__drop-line-dot" }, null, -1)
3471
3489
  ])], 4)
3472
- ], 64)) : Z("", !0)
3490
+ ], 64)) : _("", !0)
3473
3491
  ], 2)),
3474
- H.value && !e.loading && !e.error && !Le.value ? O(t.$slots, "add-button", {
3492
+ dt.value && !e.loading && !e.error && !Re.value ? O(t.$slots, "add-button", {
3475
3493
  key: 5,
3476
3494
  readonly: e.readonly,
3477
3495
  disabled: e.disabled,
@@ -3483,15 +3501,15 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
3483
3501
  class: "a-le-row-add",
3484
3502
  onClick: ht
3485
3503
  }, [
3486
- s(de, {
3504
+ r(re, {
3487
3505
  icon: "mdi-plus",
3488
3506
  size: "18"
3489
3507
  }),
3490
- U("span", null, L(se.value), 1)
3508
+ U("span", null, V(L.value), 1)
3491
3509
  ])
3492
- ]) : Z("", !0)
3510
+ ]) : _("", !0)
3493
3511
  ]),
3494
- s(co, {
3512
+ r(co, {
3495
3513
  modelValue: Wt.value,
3496
3514
  "onUpdate:modelValue": d[0] || (d[0] = (o) => Wt.value = o),
3497
3515
  total: Xt.value?.total ?? 0,
@@ -3499,38 +3517,38 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
3499
3517
  "item-label": ka.value,
3500
3518
  onConfirm: Ca
3501
3519
  }, null, 8, ["modelValue", "total", "current-index", "item-label"]),
3502
- s(Hl, {
3520
+ r(Hl, {
3503
3521
  modelValue: Yt.value,
3504
3522
  "onUpdate:modelValue": d[1] || (d[1] = (o) => Yt.value = o),
3505
- tree: v.value,
3523
+ tree: m.value,
3506
3524
  "source-key": Pt.value?.key ?? null,
3507
- "key-field": y(K),
3525
+ "key-field": y(B),
3508
3526
  "max-depth": e.maxDepth,
3509
3527
  "resolve-label": Jt,
3510
3528
  "calculate-subtree-depth": y(f).calculateSubtreeDepth,
3511
- onConfirm: Aa
3529
+ onConfirm: Sa
3512
3530
  }, null, 8, ["modelValue", "tree", "source-key", "key-field", "max-depth", "calculate-subtree-depth"]),
3513
- s(Qn, {
3531
+ r(Qn, {
3514
3532
  modelValue: y(Nt),
3515
3533
  "onUpdate:modelValue": d[2] || (d[2] = (o) => ta(Nt) ? Nt.value = o : null),
3516
- title: De.value,
3517
- text: be.value,
3518
- "confirm-label": y(D)("common.sortable.delete"),
3519
- "cancel-label": y(D)("common.button.cancel"),
3534
+ title: W.value,
3535
+ text: Z.value,
3536
+ "confirm-label": y(E)("common.sortable.delete"),
3537
+ "cancel-label": y(E)("common.button.cancel"),
3520
3538
  error: y(fa),
3521
3539
  "in-flight": y(ua),
3522
3540
  onConfirm: y(ma),
3523
3541
  onCancel: y(ya)
3524
3542
  }, null, 8, ["modelValue", "title", "text", "confirm-label", "cancel-label", "error", "in-flight", "onConfirm", "onCancel"]),
3525
- U("div", _l, L(y(It).grabbedKey.value !== null ? y(D)("common.sortable.keyboardGrab.status", {
3543
+ U("div", _l, V(y(It).grabbedKey.value !== null ? y(E)("common.sortable.keyboardGrab.status", {
3526
3544
  n: y(It).grabbedIndex.value + 1,
3527
3545
  total: y(It).totalCount.value
3528
3546
  }) : ""), 1)
3529
3547
  ], 2));
3530
3548
  }
3531
- }), ti = { class: "a-unsaved-sections" }, ni = /* @__PURE__ */ nt({
3549
+ }), ti = { class: "a-unsaved-sections" }, ni = /* @__PURE__ */ _e({
3532
3550
  __name: "AUnsavedConfirmDialog",
3533
- props: /* @__PURE__ */ Qe({
3551
+ props: /* @__PURE__ */ We({
3534
3552
  title: { default: void 0 },
3535
3553
  body: { default: void 0 },
3536
3554
  stayLabel: { default: void 0 },
@@ -3540,63 +3558,63 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
3540
3558
  modelValue: { type: Boolean, required: !0 },
3541
3559
  modelModifiers: {}
3542
3560
  }),
3543
- emits: /* @__PURE__ */ Qe(["resolve"], ["update:modelValue"]),
3561
+ emits: /* @__PURE__ */ We(["resolve"], ["update:modelValue"]),
3544
3562
  setup(e, { emit: k }) {
3545
- const l = k, n = yt(e, "modelValue"), { t: i } = it(), v = () => {
3563
+ const l = k, n = yt(e, "modelValue"), { t: i } = lt(), m = () => {
3546
3564
  l("resolve", !1);
3547
3565
  }, w = () => {
3548
3566
  l("resolve", !0);
3549
3567
  };
3550
- return (D, g) => (x(), ee(an, {
3568
+ return (E, b) => (x(), te(an, {
3551
3569
  modelValue: n.value,
3552
- "onUpdate:modelValue": g[0] || (g[0] = (c) => n.value = c),
3570
+ "onUpdate:modelValue": b[0] || (b[0] = (c) => n.value = c),
3553
3571
  "max-width": "480",
3554
3572
  persistent: ""
3555
3573
  }, {
3556
3574
  default: u(() => [
3557
- s(nn, null, {
3575
+ r(nn, null, {
3558
3576
  default: u(() => [
3559
- s(la, null, {
3577
+ r(la, null, {
3560
3578
  default: u(() => [
3561
- Y(L(e.title ?? y(i)("common.sortable.unsavedChanges.title")), 1)
3579
+ Q(V(e.title ?? y(i)("common.sortable.unsavedChanges.title")), 1)
3562
3580
  ]),
3563
3581
  _: 1
3564
3582
  }),
3565
- s(Kt, null, {
3583
+ r(Kt, null, {
3566
3584
  default: u(() => [
3567
- e.body ? (x(), N(we, { key: 0 }, [
3568
- Y(L(e.body), 1)
3569
- ], 64)) : e.dirtyLabels.length ? (x(), N(we, { key: 1 }, [
3570
- Y(L(y(i)("common.sortable.unsavedChanges.sectionsIntro")) + " ", 1),
3585
+ e.body ? (x(), N(xe, { key: 0 }, [
3586
+ Q(V(e.body), 1)
3587
+ ], 64)) : e.dirtyLabels.length ? (x(), N(xe, { key: 1 }, [
3588
+ Q(V(y(i)("common.sortable.unsavedChanges.sectionsIntro")) + " ", 1),
3571
3589
  U("ul", ti, [
3572
- (x(!0), N(we, null, dt(e.dirtyLabels, (c, h) => (x(), N("li", { key: h }, L(c), 1))), 128))
3590
+ (x(!0), N(xe, null, st(e.dirtyLabels, (c, h) => (x(), N("li", { key: h }, V(c), 1))), 128))
3573
3591
  ]),
3574
- Y(" " + L(y(i)("common.sortable.unsavedChanges.leaveQuestion")), 1)
3575
- ], 64)) : (x(), N(we, { key: 2 }, [
3576
- Y(L(y(i)("common.sortable.unsavedChanges.body")), 1)
3592
+ Q(" " + V(y(i)("common.sortable.unsavedChanges.leaveQuestion")), 1)
3593
+ ], 64)) : (x(), N(xe, { key: 2 }, [
3594
+ Q(V(y(i)("common.sortable.unsavedChanges.body")), 1)
3577
3595
  ], 64))
3578
3596
  ]),
3579
3597
  _: 1
3580
3598
  }),
3581
- s(ia, null, {
3599
+ r(ia, null, {
3582
3600
  default: u(() => [
3583
- s(on),
3584
- s(ie, {
3601
+ r(on),
3602
+ r(se, {
3585
3603
  variant: "text",
3586
- onClick: v
3604
+ onClick: m
3587
3605
  }, {
3588
3606
  default: u(() => [
3589
- Y(L(e.stayLabel ?? y(i)("common.sortable.unsavedChanges.stay")), 1)
3607
+ Q(V(e.stayLabel ?? y(i)("common.sortable.unsavedChanges.stay")), 1)
3590
3608
  ]),
3591
3609
  _: 1
3592
3610
  }),
3593
- s(ie, {
3611
+ r(se, {
3594
3612
  color: "warning",
3595
3613
  variant: "flat",
3596
3614
  onClick: w
3597
3615
  }, {
3598
3616
  default: u(() => [
3599
- Y(L(e.discardLabel ?? y(i)("common.sortable.unsavedChanges.discard")), 1)
3617
+ Q(V(e.discardLabel ?? y(i)("common.sortable.unsavedChanges.discard")), 1)
3600
3618
  ]),
3601
3619
  _: 1
3602
3620
  })
@@ -3610,33 +3628,33 @@ const Mt = (e, k) => e.find((l) => l.key === k) ?? null, sa = (e, k, l) => {
3610
3628
  _: 1
3611
3629
  }, 8, ["modelValue"]));
3612
3630
  }
3613
- }), zi = /* @__PURE__ */ _n(ni, [["__scopeId", "data-v-8342a164"]]), ai = (e) => e == null ? !1 : typeof e == "boolean" ? e : e instanceof Set ? e.size > 0 : Array.isArray(e) ? e.length > 0 : !!e, An = (e, k) => e === void 0 ? k : typeof e == "boolean" ? e : e.value;
3631
+ }), zi = /* @__PURE__ */ _n(ni, [["__scopeId", "data-v-8342a164"]]), ai = (e) => e == null ? !1 : typeof e == "boolean" ? e : e instanceof Set ? e.size > 0 : Array.isArray(e) ? e.length > 0 : !!e, Sn = (e, k) => e === void 0 ? k : typeof e == "boolean" ? e : e.value;
3614
3632
  function Ni(e) {
3615
3633
  const k = ho();
3616
3634
  if (e.ownSections) {
3617
- const c = e.ownSections, h = /* @__PURE__ */ Symbol("unsaved.section.own"), S = A(() => {
3635
+ const c = e.ownSections, h = /* @__PURE__ */ Symbol("unsaved.section.own"), I = S(() => {
3618
3636
  const j = c();
3619
3637
  return Array.isArray(j) ? j : [j];
3620
3638
  });
3621
- k.register(h, S);
3639
+ k.register(h, I);
3622
3640
  }
3623
- const l = A(
3641
+ const l = S(
3624
3642
  () => e.sources.some((c) => ai(c.value)) || k.dirtyLabels.value.length > 0
3625
- ), n = me(!1);
3626
- let i = null, v = !1;
3627
- const w = () => v ? (v = !1, Promise.resolve(!0)) : new Promise((c) => {
3643
+ ), n = de(!1);
3644
+ let i = null, m = !1;
3645
+ const w = () => m ? (m = !1, Promise.resolve(!0)) : new Promise((c) => {
3628
3646
  i = c, n.value = !0;
3629
- }), D = (c) => {
3647
+ }), E = (c) => {
3630
3648
  n.value = !1, i && (i(c), i = null);
3631
- }, g = () => {
3632
- v = !0;
3649
+ }, b = () => {
3650
+ m = !0;
3633
3651
  };
3634
- if (An(e.guardRoute, !0) && na())
3652
+ if (Sn(e.guardRoute, !0) && na())
3635
3653
  try {
3636
- Do(async () => l.value ? await w() : !0);
3654
+ Eo(async () => l.value ? await w() : !0);
3637
3655
  } catch {
3638
3656
  }
3639
- if (An(e.guardWindowUnload, !0)) {
3657
+ if (Sn(e.guardWindowUnload, !0)) {
3640
3658
  const c = (h) => {
3641
3659
  l.value && (h.preventDefault(), h.returnValue = "");
3642
3660
  };
@@ -3647,36 +3665,36 @@ function Ni(e) {
3647
3665
  if (e.guardDialogModel) {
3648
3666
  const c = e.guardDialogModel;
3649
3667
  let h = !1;
3650
- Re(c, async (S, j) => {
3668
+ $e(c, async (I, j) => {
3651
3669
  if (h) {
3652
3670
  h = !1;
3653
3671
  return;
3654
3672
  }
3655
- j === !0 && S === !1 && l.value && (h = !0, c.value = !0, await w() && (h = !0, c.value = !1));
3673
+ j === !0 && I === !1 && l.value && (h = !0, c.value = !0, await w() && (h = !0, c.value = !1));
3656
3674
  });
3657
3675
  }
3658
3676
  return {
3659
3677
  hasUnsavedChanges: l,
3660
3678
  dirtyLabels: k.dirtyLabels,
3661
3679
  promptOpen: n,
3662
- resolvePrompt: D,
3663
- acknowledge: g
3680
+ resolvePrompt: E,
3681
+ acknowledge: b
3664
3682
  };
3665
3683
  }
3666
3684
  function Oi(e, k = {}) {
3667
- const l = k.keyField ?? "id", n = k.positionField ?? "position", i = k.positionMultiplier ?? 1, v = k.updatePosition === !0;
3668
- v && l === n && console.warn(
3685
+ const l = k.keyField ?? "id", n = k.positionField ?? "position", i = k.positionMultiplier ?? 1, m = k.updatePosition === !0;
3686
+ m && l === n && console.warn(
3669
3687
  `[list-editor] key-field === position-field ("${l}") with update-position enabled. Reordering renumbers positions and thus changes row keys, breaking dirty/validity tracking. Point key-field at a stable identity field (e.g. "id").`
3670
3688
  );
3671
- const w = /* @__PURE__ */ new Set(), D = (E) => {
3672
- const r = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set();
3689
+ const w = /* @__PURE__ */ new Set(), E = (D) => {
3690
+ const s = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Set();
3673
3691
  let T = 0;
3674
- for (const Q of E) {
3675
- if (Q.key === void 0 || Q.key === null) {
3692
+ for (const Y of D) {
3693
+ if (Y.key === void 0 || Y.key === null) {
3676
3694
  T++;
3677
3695
  continue;
3678
3696
  }
3679
- r.has(Q.key) && f.add(String(Q.key)), r.add(Q.key);
3697
+ s.has(Y.key) && f.add(String(Y.key)), s.add(Y.key);
3680
3698
  }
3681
3699
  if (T === 0 && f.size === 0) return;
3682
3700
  const P = `${T}|${[...f].sort().join(",")}`;
@@ -3685,51 +3703,51 @@ function Oi(e, k = {}) {
3685
3703
  ), f.size > 0 && console.warn(
3686
3704
  `[list-editor] duplicate row keys (key-field "${l}"): ${[...f].join(", ")}. Row keys must be unique — dirty tracking and validation rails target rows by key.`
3687
3705
  ));
3688
- }, g = A(() => {
3689
- const E = e.value.map((r, f) => ({
3690
- key: r[l],
3706
+ }, b = S(() => {
3707
+ const D = e.value.map((s, f) => ({
3708
+ key: s[l],
3691
3709
  index: f,
3692
- raw: r,
3693
- position: r[n]
3710
+ raw: s,
3711
+ position: s[n]
3694
3712
  }));
3695
- return D(E), E;
3696
- }), c = (E) => go(E, { positionField: n, positionMultiplier: i }), h = (E) => {
3697
- const r = v ? c(E) : E;
3698
- return e.value = r, r;
3699
- }, S = (E) => E !== null && typeof E == "object", j = (E, r) => E.findIndex((f) => f[l] === r), M = (E, r) => {
3700
- const f = S(r) ? r[l] : r;
3701
- return j(E, f);
3702
- }, p = (E, r) => {
3703
- if (!r) return E.length;
3704
- if (r.afterId !== void 0) {
3705
- const f = j(E, r.afterId);
3706
- return f === -1 ? E.length : f + 1;
3713
+ return E(D), D;
3714
+ }), c = (D) => go(D, { positionField: n, positionMultiplier: i }), h = (D) => {
3715
+ const s = m ? c(D) : D;
3716
+ return e.value = s, s;
3717
+ }, I = (D) => D !== null && typeof D == "object", j = (D, s) => D.findIndex((f) => f[l] === s), M = (D, s) => {
3718
+ const f = I(s) ? s[l] : s;
3719
+ return j(D, f);
3720
+ }, g = (D, s) => {
3721
+ if (!s) return D.length;
3722
+ if (s.afterId !== void 0) {
3723
+ const f = j(D, s.afterId);
3724
+ return f === -1 ? D.length : f + 1;
3707
3725
  }
3708
- return r.afterIndex !== void 0 ? r.afterIndex < 0 ? E.length : Math.min(r.afterIndex + 1, E.length) : r.index !== void 0 ? Math.max(0, Math.min(r.index, E.length)) : E.length;
3726
+ return s.afterIndex !== void 0 ? s.afterIndex < 0 ? D.length : Math.min(s.afterIndex + 1, D.length) : s.index !== void 0 ? Math.max(0, Math.min(s.index, D.length)) : D.length;
3709
3727
  };
3710
3728
  return {
3711
- viewItems: g,
3712
- addItem: (E, r) => {
3713
- const f = [...e.value], T = p(f, r);
3714
- return f.splice(T, 0, E), h(f);
3729
+ viewItems: b,
3730
+ addItem: (D, s) => {
3731
+ const f = [...e.value], T = g(f, s);
3732
+ return f.splice(T, 0, D), h(f);
3715
3733
  },
3716
- deleteItem: (E) => {
3717
- const r = M(e.value, E);
3718
- if (r === -1) return e.value;
3734
+ deleteItem: (D) => {
3735
+ const s = M(e.value, D);
3736
+ if (s === -1) return e.value;
3719
3737
  const f = [...e.value];
3720
- return f.splice(r, 1), h(f);
3738
+ return f.splice(s, 1), h(f);
3721
3739
  },
3722
- updateItem: (E, r) => {
3723
- const f = M(e.value, E);
3740
+ updateItem: (D, s) => {
3741
+ const f = M(e.value, D);
3724
3742
  if (f === -1) return e.value;
3725
3743
  const T = [...e.value];
3726
- return T[f] = r, h(T);
3744
+ return T[f] = s, h(T);
3727
3745
  },
3728
- moveItem: (E, r) => {
3746
+ moveItem: (D, s) => {
3729
3747
  const f = e.value.length;
3730
- if (E === r || E < 0 || E >= f || r < 0 || r >= f) return e.value;
3731
- const T = [...e.value], [P] = T.splice(E, 1);
3732
- return T.splice(r, 0, P), h(T);
3748
+ if (D === s || D < 0 || D >= f || s < 0 || s >= f) return e.value;
3749
+ const T = [...e.value], [P] = T.splice(D, 1);
3750
+ return T.splice(s, 0, P), h(T);
3733
3751
  },
3734
3752
  recalculatePositions: c
3735
3753
  };
@@ -3740,17 +3758,17 @@ const oi = /* @__PURE__ */ Symbol(
3740
3758
  function ii(e) {
3741
3759
  const k = mt(oi, null);
3742
3760
  if (!k || !na()) return;
3743
- const l = mt(li, null), n = A(() => {
3761
+ const l = mt(li, null), n = S(() => {
3744
3762
  if (e.invalid)
3745
3763
  return e.invalid() && ((e.dirty?.() ?? !1) || (l?.value.has(e.key()) ?? !1)) ? "invalid" : null;
3746
- const v = e.state;
3747
- return v === void 0 ? null : typeof v == "function" ? v() : v.value;
3764
+ const m = e.state;
3765
+ return m === void 0 ? null : typeof m == "function" ? m() : m.value;
3748
3766
  });
3749
3767
  let i = null;
3750
- Re(
3768
+ $e(
3751
3769
  e.key,
3752
- (v) => {
3753
- i !== null && i !== v && k.unregister(i), k.register(v, n), i = v;
3770
+ (m) => {
3771
+ i !== null && i !== m && k.unregister(i), k.register(m, n), i = m;
3754
3772
  },
3755
3773
  { immediate: !0 }
3756
3774
  ), tn(() => {
@@ -3765,16 +3783,16 @@ function Ui(e, k) {
3765
3783
  });
3766
3784
  }
3767
3785
  function ji() {
3768
- const e = me(/* @__PURE__ */ new Map()), k = /* @__PURE__ */ new Set(), l = (w) => e.value.get(w) ?? k, n = (w, D) => {
3769
- D.size === 0 ? e.value.delete(w) : e.value.set(w, D), e.value = new Map(e.value);
3770
- }, i = A(() => {
3786
+ const e = de(/* @__PURE__ */ new Map()), k = /* @__PURE__ */ new Set(), l = (w) => e.value.get(w) ?? k, n = (w, E) => {
3787
+ E.size === 0 ? e.value.delete(w) : e.value.set(w, E), e.value = new Map(e.value);
3788
+ }, i = S(() => {
3771
3789
  const w = /* @__PURE__ */ new Set();
3772
- for (const [D, g] of e.value.entries())
3773
- for (const c of g)
3774
- w.add(`${String(D)}:${String(c)}`);
3790
+ for (const [E, b] of e.value.entries())
3791
+ for (const c of b)
3792
+ w.add(`${String(E)}:${String(c)}`);
3775
3793
  return w;
3776
- }), v = A(() => i.value.size);
3777
- return { getForParent: l, setForParent: n, merged: i, count: v };
3794
+ }), m = S(() => i.value.size);
3795
+ return { getForParent: l, setForParent: n, merged: i, count: m };
3778
3796
  }
3779
3797
  export {
3780
3798
  Ti as ADatatableOrdering,
@@ -3787,40 +3805,40 @@ export {
3787
3805
  Qi as AFilterString,
3788
3806
  Zi as AFilterTimeInterval,
3789
3807
  _i as AFilterValueObjectOptionsSelect,
3790
- er as AFilterWrapper,
3808
+ es as AFilterWrapper,
3791
3809
  $i as AFilterWrapperSidebar,
3792
- tr as AFilterWrapperSubjectSelect,
3793
- nr as AFormRemoteAutocomplete,
3794
- ar as AFormRemoteAutocompleteWithCached,
3810
+ ts as AFilterWrapperSubjectSelect,
3811
+ ns as AFormRemoteAutocomplete,
3812
+ as as AFormRemoteAutocompleteWithCached,
3795
3813
  Vi as AListEditor,
3796
3814
  Mi as ANestedSortableListEditor,
3797
- or as ASortableListEditor,
3815
+ os as ASortableListEditor,
3798
3816
  Li as ASubjectSelect,
3799
3817
  zi as AUnsavedConfirmDialog,
3800
- Sn as DatatablePaginationKey,
3818
+ An as DatatablePaginationKey,
3801
3819
  Ka as FilterConfigKey,
3802
3820
  Ba as FilterDataKey,
3803
- lr as FilterInnerConfigKey,
3804
- ir as FilterInnerDataKey,
3821
+ ls as FilterInnerConfigKey,
3822
+ is as FilterInnerDataKey,
3805
3823
  oi as ListEditorValidationKey,
3806
- rr as SharedReorderRegistryKey,
3807
- sr as TimeIntervalSpecialOptions,
3808
- dr as UserAdminConfigLayoutType,
3809
- cr as UserAdminConfigLayoutTypeDefault,
3810
- ur as UserAdminConfigType,
3811
- fr as UserAdminConfigTypeDefault,
3824
+ ss as SharedReorderRegistryKey,
3825
+ rs as TimeIntervalSpecialOptions,
3826
+ ds as UserAdminConfigLayoutType,
3827
+ cs as UserAdminConfigLayoutTypeDefault,
3828
+ us as UserAdminConfigType,
3829
+ fs as UserAdminConfigTypeDefault,
3812
3830
  Oo as createDatatableColumnsConfig,
3813
- vr as createFilter,
3814
- mr as createFilterStore,
3831
+ vs as createFilter,
3832
+ ms as createFilterStore,
3815
3833
  Qt as generateListQuery,
3816
3834
  ao as nextListEditorTempId,
3817
3835
  go as renumberPositions,
3818
- yr as sortByPosition,
3836
+ ys as sortByPosition,
3819
3837
  Fi as useApiFetchByIds,
3820
3838
  Ga as useApiFetchList,
3821
3839
  Ki as useApiFetchListBatch,
3822
3840
  za as useApiQueryBuilder,
3823
- hr as useApiRequest,
3841
+ hs as useApiRequest,
3824
3842
  _a as useFilterHelpers,
3825
3843
  Bi as useJobApi,
3826
3844
  Oi as useListEditor,
@@ -3834,7 +3852,7 @@ export {
3834
3852
  Ri as useSubjectSelect,
3835
3853
  Ni as useUnsavedChangesGuard,
3836
3854
  Jn as useUnsavedSection,
3837
- gr as useUserAdminConfigApi,
3838
- pr as useUserAdminConfigFactory
3855
+ gs as useUserAdminConfigApi,
3856
+ ps as useUserAdminConfigFactory
3839
3857
  };
3840
3858
  //# sourceMappingURL=labs.js.map