@kong-ui-public/entities-plugins 9.250.4 → 9.250.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { toValue as E, computed as w, ref as re, watch as te, onBeforeUnmount as vt, reactive as Xe, toRef as j, useSlots as Ae, provide as Pe, inject as we, toRaw as Qe, onUnmounted as bt, defineComponent as U, useAttrs as ye, openBlock as _, createBlock as I, unref as o, mergeProps as z, createSlots as W, renderList as oe, withCtx as x, renderSlot as F, normalizeProps as De, guardReactiveProps as Ze, createPropsRestProxy as se, resolveComponent as D, withDirectives as G, createElementBlock as K, createVNode as V, createElementVNode as B, resolveDynamicComponent as ie, createCommentVNode as N, Fragment as ee, vShow as J, useCssVars as _t, useTemplateRef as et, normalizeClass as Te, createTextVNode as pe, toDisplayString as ce, withModifiers as Ce, nextTick as Re, Transition as At, useId as wt, useModel as $e, onBeforeMount as kt, mergeModels as Ve, withKeys as Ne } from "vue";
1
+ import { toValue as E, computed as A, ref as re, watch as te, onBeforeUnmount as vt, reactive as Xe, toRef as j, useSlots as Ae, provide as Pe, inject as we, toRaw as Qe, onUnmounted as bt, defineComponent as U, useAttrs as ye, openBlock as _, createBlock as I, unref as o, mergeProps as z, createSlots as W, renderList as oe, withCtx as x, renderSlot as F, normalizeProps as De, guardReactiveProps as Ze, createPropsRestProxy as se, resolveComponent as D, withDirectives as G, createElementBlock as K, createVNode as V, createElementVNode as B, resolveDynamicComponent as ie, createCommentVNode as N, Fragment as ee, vShow as J, useCssVars as _t, useTemplateRef as et, normalizeClass as Te, createTextVNode as pe, toDisplayString as ce, withModifiers as Ce, nextTick as Re, Transition as At, useId as wt, useModel as $e, onBeforeMount as kt, mergeModels as Ve, withKeys as Ne } from "vue";
2
2
  import { marked as St } from "marked";
3
3
  import Tt from "dompurify";
4
4
  import { get as tt, isEqual as fe, omit as Ct, cloneDeep as ze, isFunction as He, set as Pt, uniqueId as It, upperFirst as Lt } from "lodash-es";
@@ -79,8 +79,8 @@ function lt(e, r) {
79
79
  if (h)
80
80
  for (const { bundleIndex: u, position: f } of h) {
81
81
  const b = r[u];
82
- for (let C = f + 1; C < b.length; C++) {
83
- const g = b[C];
82
+ for (let k = f + 1; k < b.length; k++) {
83
+ const g = b[k];
84
84
  if (!s.has(g)) {
85
85
  const y = t.get(g);
86
86
  y && (n.push(y), s.add(g), c.delete(g));
@@ -107,7 +107,7 @@ function Ut(e) {
107
107
  return t;
108
108
  }
109
109
  function ut(e) {
110
- return w(() => Ut(E(e)));
110
+ return A(() => Ut(E(e)));
111
111
  }
112
112
  const Ge = /* @__PURE__ */ Symbol("free-form-field-path"), Oe = /* @__PURE__ */ Symbol("free-form-field-renderer-slots"), Je = /* @__PURE__ */ Symbol("free-form-field-reset-label-path-setting"), ke = "free-form-field-renderers-slot", Nt = {
113
113
  tooltipAttributes: {
@@ -178,7 +178,7 @@ function he(e, r) {
178
178
  return $(...a);
179
179
  }
180
180
  function Ht(e) {
181
- const r = E(e), t = w(() => r ? zt(r) : {});
181
+ const r = E(e), t = A(() => r ? zt(r) : {});
182
182
  function a(l) {
183
183
  if (l) {
184
184
  let u = he(l, t.value || {});
@@ -199,8 +199,8 @@ function Ht(e) {
199
199
  const f = {};
200
200
  if (Array.isArray(l.fields))
201
201
  for (const b of l.fields) {
202
- const C = Object.keys(b)[0], g = u ? `${u}.${C}` : C, y = s(g, !1);
203
- y !== void 0 && (f[C] = y);
202
+ const k = Object.keys(b)[0], g = u ? `${u}.${k}` : k, y = s(g, !1);
203
+ y !== void 0 && (f[k] = y);
204
204
  }
205
205
  return f;
206
206
  }
@@ -262,9 +262,9 @@ function Wt(e, r) {
262
262
  function Gt(e, r) {
263
263
  const t = re({}), a = re({});
264
264
  function s(g, y) {
265
- const A = g.map((v) => Z(v).length), T = A[0];
266
- if (!A.every((v) => v === T)) {
267
- const v = g.map((k, P) => ` - '${k}' is at level ${A[P]}`).join(`
265
+ const w = g.map((v) => Z(v).length), C = w[0];
266
+ if (!w.every((v) => v === C)) {
267
+ const v = g.map((S, P) => ` - '${S}' is at level ${w[P]}`).join(`
268
268
  `);
269
269
  throw new Error(
270
270
  `${y}: Fields must be at the same level. Found mixed levels:
@@ -273,23 +273,23 @@ ${v}`
273
273
  }
274
274
  }
275
275
  function n(g) {
276
- for (const [y, A] of Object.entries(g)) {
277
- if (!A.bundles) continue;
278
- for (const v of A.bundles)
276
+ for (const [y, w] of Object.entries(g)) {
277
+ if (!w.bundles) continue;
278
+ for (const v of w.bundles)
279
279
  if (new Set(v).size !== v.length) {
280
280
  const P = v.filter((M, L) => v.indexOf(M) !== L);
281
281
  throw new Error(
282
282
  `Self-cycle detected in bundle: field '${P[0]}' appears multiple times in [${v.join(", ")}]`
283
283
  );
284
284
  }
285
- const T = /* @__PURE__ */ new Map();
286
- for (const v of A.bundles)
287
- for (let k = 1; k < v.length; k++) {
288
- const P = v[k], M = v[k - 1];
289
- T.has(P) || T.set(P, /* @__PURE__ */ new Set()), T.get(P).add(M);
285
+ const C = /* @__PURE__ */ new Map();
286
+ for (const v of w.bundles)
287
+ for (let S = 1; S < v.length; S++) {
288
+ const P = v[S], M = v[S - 1];
289
+ C.has(P) || C.set(P, /* @__PURE__ */ new Set()), C.get(P).add(M);
290
290
  }
291
- for (const v of T.keys()) {
292
- let k = function(L) {
291
+ for (const v of C.keys()) {
292
+ let S = function(L) {
293
293
  if (M.includes(L)) {
294
294
  const R = [...M, L].join(" -> ");
295
295
  throw new Error(
@@ -299,50 +299,50 @@ ${R}`
299
299
  }
300
300
  if (P.has(L)) return;
301
301
  P.add(L), M.push(L);
302
- const S = T.get(L);
303
- if (S)
304
- for (const R of S)
305
- k(R);
302
+ const T = C.get(L);
303
+ if (T)
304
+ for (const R of T)
305
+ S(R);
306
306
  M.pop();
307
307
  };
308
308
  const P = /* @__PURE__ */ new Set(), M = [];
309
- k(v);
309
+ S(v);
310
310
  }
311
311
  }
312
312
  }
313
313
  function c(g) {
314
- for (const [y, A] of Object.entries(g))
315
- if (A.dependencies)
316
- for (const T of Object.keys(A.dependencies)) {
314
+ for (const [y, w] of Object.entries(g))
315
+ if (w.dependencies)
316
+ for (const C of Object.keys(w.dependencies)) {
317
317
  let v = function(M) {
318
318
  if (P.includes(M)) {
319
- const S = [...P, M].join(" -> ");
319
+ const T = [...P, M].join(" -> ");
320
320
  throw new Error(
321
321
  `Circular dependency detected in path '${y}':
322
- ${S}`
322
+ ${T}`
323
323
  );
324
324
  }
325
- if (k.has(M)) return;
326
- k.add(M), P.push(M);
327
- const L = A.dependencies[M];
325
+ if (S.has(M)) return;
326
+ S.add(M), P.push(M);
327
+ const L = w.dependencies[M];
328
328
  if (L) {
329
- const [S] = L;
330
- A.dependencies[S] && v(S);
329
+ const [T] = L;
330
+ w.dependencies[T] && v(T);
331
331
  }
332
332
  P.pop();
333
333
  };
334
- const k = /* @__PURE__ */ new Set(), P = [];
335
- v(T);
334
+ const S = /* @__PURE__ */ new Set(), P = [];
335
+ v(C);
336
336
  }
337
337
  }
338
338
  function d(g, y) {
339
- const A = g.map((v) => y ? $(y, v) : v), T = Z(A[0]);
340
- return T.pop(), $(...T);
339
+ const w = g.map((v) => y ? $(y, v) : v), C = Z(w[0]);
340
+ return C.pop(), $(...C);
341
341
  }
342
342
  function p(g, y) {
343
343
  if (!y) return g;
344
- const A = `${y}${Ie}`;
345
- return g.startsWith(A) ? g.slice(A.length) : g;
344
+ const w = `${y}${Ie}`;
345
+ return g.startsWith(w) ? g.slice(w.length) : g;
346
346
  }
347
347
  function i(g) {
348
348
  const y = Z(g);
@@ -350,37 +350,37 @@ ${S}`
350
350
  }
351
351
  function m() {
352
352
  const g = {};
353
- for (const [y, A] of Object.entries(t.value)) {
354
- const T = y === ue ? "" : y;
355
- if (A.bundles)
356
- for (const v of A.bundles) {
353
+ for (const [y, w] of Object.entries(t.value)) {
354
+ const C = y === ue ? "" : y;
355
+ if (w.bundles)
356
+ for (const v of w.bundles) {
357
357
  if (v.length < 2)
358
358
  throw new Error(
359
359
  `Bundle must contain at least 2 fields. Found ${v.length} field(s) in bundle: [${v.join(", ")}]`
360
360
  );
361
- const k = v.map((L) => T ? $(T, L) : L);
362
- s(k, `Bundle [${v.join(", ")}]`);
363
- const P = d(v, T) || ue;
361
+ const S = v.map((L) => C ? $(C, L) : L);
362
+ s(S, `Bundle [${v.join(", ")}]`);
363
+ const P = d(v, C) || ue;
364
364
  g[P] || (g[P] = {}), g[P].bundles || (g[P].bundles = []);
365
- const M = k.map((L) => p(L, P));
365
+ const M = S.map((L) => p(L, P));
366
366
  g[P].bundles.push(M);
367
367
  }
368
- if (A.dependencies)
369
- for (const [v, [k, P]] of Object.entries(A.dependencies)) {
370
- const M = T ? $(T, v) : v, L = T ? $(T, k) : k;
368
+ if (w.dependencies)
369
+ for (const [v, [S, P]] of Object.entries(w.dependencies)) {
370
+ const M = C ? $(C, v) : v, L = C ? $(C, S) : S;
371
371
  s(
372
372
  [M, L],
373
- `Dependency '${v}' -> '${k}'`
373
+ `Dependency '${v}' -> '${S}'`
374
374
  );
375
- const S = i(M) || ue;
376
- g[S] || (g[S] = {}), g[S].dependencies || (g[S].dependencies = {});
377
- const R = p(M, S), q = p(L, S);
378
- g[S].dependencies[R] = [q, P];
375
+ const T = i(M) || ue;
376
+ g[T] || (g[T] = {}), g[T].dependencies || (g[T].dependencies = {});
377
+ const R = p(M, T), q = p(L, T);
378
+ g[T].dependencies[R] = [q, P];
379
379
  }
380
380
  }
381
381
  return n(g), c(g), g;
382
382
  }
383
- const h = w(() => {
383
+ const h = A(() => {
384
384
  try {
385
385
  return m();
386
386
  } catch (g) {
@@ -395,18 +395,18 @@ ${S}`
395
395
  }
396
396
  function u(g) {
397
397
  let y = !1;
398
- return w(() => {
398
+ return A(() => {
399
399
  if (y) return;
400
- const A = E(g);
400
+ const w = E(g);
401
401
  try {
402
- return l(A);
403
- } catch (T) {
404
- y = !0, console.error(`Failed to get render rules for path: \`${A}\`,`, T instanceof Error ? T.message : "");
402
+ return l(w);
403
+ } catch (C) {
404
+ y = !0, console.error(`Failed to get render rules for path: \`${w}\`,`, C instanceof Error ? C.message : "");
405
405
  return;
406
406
  }
407
407
  });
408
408
  }
409
- const f = w(
409
+ const f = A(
410
410
  () => Object.values(h.value).some(
411
411
  (g) => g.dependencies && Object.keys(g.dependencies).length > 0
412
412
  )
@@ -414,37 +414,37 @@ ${S}`
414
414
  function b(g) {
415
415
  const {
416
416
  fieldPath: y,
417
- rules: A,
418
- omittedFields: T
417
+ rules: w,
418
+ omittedFields: C
419
419
  } = g;
420
420
  te([
421
- () => E(A),
421
+ () => E(w),
422
422
  () => E(y),
423
- () => E(T)
424
- ], ([k, P, M], [, L]) => {
425
- k ? t.value[P] = k : delete t.value[P], M && M.length ? a.value[P] = [...M] : delete a.value[P], L && L !== P && (delete t.value[L], delete a.value[L]);
423
+ () => E(C)
424
+ ], ([S, P, M], [, L]) => {
425
+ S ? t.value[P] = S : delete t.value[P], M && M.length ? a.value[P] = [...M] : delete a.value[P], L && L !== P && (delete t.value[L], delete a.value[L]);
426
426
  }, { immediate: !0, deep: !0 });
427
427
  const v = u(y);
428
428
  return vt(() => {
429
- const k = E(y);
430
- delete t.value[k], delete a.value[k];
429
+ const S = E(y);
430
+ delete t.value[S], delete a.value[S];
431
431
  }), v;
432
432
  }
433
- function C(g) {
433
+ function k(g) {
434
434
  const y = Z(g);
435
435
  if (!y.length) return !1;
436
- const A = y[y.length - 1], T = $(...y.slice(0, -1));
437
- if (a.value[T]?.includes(A)) return !1;
438
- const v = T === "" ? ue : he(T, e()), k = h.value[v]?.dependencies?.[A];
439
- if (!k) return !1;
440
- const [P, M] = k, L = T ? $(T, P) : P, S = tt(r(), Z(L));
441
- return !Wt(S, M);
436
+ const w = y[y.length - 1], C = $(...y.slice(0, -1));
437
+ if (a.value[C]?.includes(w)) return !1;
438
+ const v = C === "" ? ue : he(C, e()), S = h.value[v]?.dependencies?.[w];
439
+ if (!S) return !1;
440
+ const [P, M] = S, L = C ? $(C, P) : P, T = tt(r(), Z(L));
441
+ return !Wt(T, M);
442
442
  }
443
443
  return {
444
444
  useCurrentRules: b,
445
445
  createComputedRules: u,
446
446
  hasDependencies: f,
447
- isFieldHidden: C
447
+ isFieldHidden: k
448
448
  };
449
449
  }
450
450
  let Jt = 0;
@@ -557,23 +557,23 @@ const [ta, aa] = qt(
557
557
  Pe(Oe, Ct(f, "default", ke));
558
558
  const {
559
559
  useCurrentRules: b,
560
- createComputedRules: C,
560
+ createComputedRules: k,
561
561
  hasDependencies: g,
562
562
  isFieldHidden: y
563
- } = Gt(i.getSchemaMap, () => l), A = b({
563
+ } = Gt(i.getSchemaMap, () => l), w = b({
564
564
  fieldPath: ue,
565
565
  rules: n
566
566
  });
567
- function T(q) {
567
+ function C(q) {
568
568
  Object.keys(l).forEach((X) => {
569
569
  delete l[X];
570
570
  }), m.clear(), Object.assign(l, m.serialize(q));
571
571
  }
572
572
  function v(q) {
573
573
  let X;
574
- !q || !k(E(q)) ? X = d() : X = ze(E(q)), He(u.value.prepareFormData) ? T(u.value.prepareFormData(X)) : T(X);
574
+ !q || !S(E(q)) ? X = d() : X = ze(E(q)), He(u.value.prepareFormData) ? C(u.value.prepareFormData(X)) : C(X);
575
575
  }
576
- function k(q) {
576
+ function S(q) {
577
577
  return He(u.value.hasValue) ? u.value.hasValue(q) : !!q;
578
578
  }
579
579
  function P() {
@@ -594,7 +594,7 @@ const [ta, aa] = qt(
594
594
  function L(q) {
595
595
  return q != null && typeof q == "object" && !Array.isArray(q) ? m.serialize(q) : q;
596
596
  }
597
- function S(q) {
597
+ function T(q) {
598
598
  return L(d(q));
599
599
  }
600
600
  function R(q) {
@@ -608,15 +608,15 @@ const [ta, aa] = qt(
608
608
  schema: t,
609
609
  config: u,
610
610
  fieldRendererRegistry: h,
611
- setValue: T,
611
+ setValue: C,
612
612
  useCurrentRenderRules: b,
613
- rootRenderRules: A,
614
- createComputedRenderRules: C,
613
+ rootRenderRules: w,
614
+ createComputedRenderRules: k,
615
615
  ...i,
616
616
  getValue: P,
617
617
  isFieldHidden: y,
618
618
  keyIdMap: m,
619
- getDefault: S,
619
+ getDefault: T,
620
620
  getEmptyOrDefault: R
621
621
  };
622
622
  }
@@ -628,21 +628,21 @@ function ae() {
628
628
  return e;
629
629
  }
630
630
  const ct = (e) => {
631
- const r = we(Ge, w(() => "")), t = w(() => {
631
+ const r = we(Ge, A(() => "")), t = A(() => {
632
632
  const a = E(e);
633
633
  let s = a;
634
634
  return !We(a) && r.value && (s = $(r.value, a)), We(a) && (s = s.slice(Ee("").length)), s;
635
635
  });
636
636
  return Pe(Ge, t), t;
637
637
  }, na = (e) => {
638
- const { getSchema: r, getSchemaMap: t, fieldRendererRegistry: a } = ae(), { default: s, ...n } = Ae(), c = we(Oe), d = w(() => {
638
+ const { getSchema: r, getSchemaMap: t, fieldRendererRegistry: a } = ae(), { default: s, ...n } = Ae(), c = we(Oe), d = A(() => {
639
639
  const p = E(c), i = t(), m = Object.keys(n).filter((h) => h !== ke && h !== "item").reduce((h, l) => {
640
640
  const u = he($(E(e), l), i);
641
641
  return { ...h, [u]: n[l] };
642
642
  }, {});
643
643
  return p ? { ...p, ...m } : m;
644
644
  });
645
- return Pe(Oe, d), w(() => {
645
+ return Pe(Oe, d), A(() => {
646
646
  if (s) return;
647
647
  const p = E(e), i = d.value[he(p, t())];
648
648
  if (i) return i;
@@ -657,14 +657,14 @@ const ct = (e) => {
657
657
  function ia(e) {
658
658
  const { formData: r } = ae(), t = ct(e);
659
659
  return {
660
- value: w({
660
+ value: A({
661
661
  get: () => tt(r, Z(t.value)),
662
662
  set: (s) => Pt(r, Z(t.value), s)
663
663
  })
664
664
  };
665
665
  }
666
666
  function Y(e) {
667
- const { getSchema: r, isFieldHidden: t, getEmptyOrDefault: a } = ae(), s = ct(e), n = na(s), { value: c } = ia(e), d = w(() => r(s.value)), p = w(() => t(s.value)), i = w(() => a(s.value));
667
+ const { getSchema: r, isFieldHidden: t, getEmptyOrDefault: a } = ae(), s = ct(e), n = na(s), { value: c } = ia(e), d = A(() => r(s.value)), p = A(() => t(s.value)), i = A(() => a(s.value));
668
668
  return d.value ? {
669
669
  schema: d,
670
670
  path: s,
@@ -783,7 +783,7 @@ function mt(e) {
783
783
  }
784
784
  function la(e, r) {
785
785
  const t = E(e), a = me(t), { config: s, getSchema: n } = ae(), c = sa(a, r), d = ut(e);
786
- return w(() => {
786
+ return A(() => {
787
787
  const p = c.value ?? a, i = d.value.parent?.path ? n(d.value.parent.path) : null, m = i?.type === "array", h = i?.type === "map";
788
788
  if (m || h)
789
789
  return "";
@@ -793,7 +793,7 @@ function la(e, r) {
793
793
  }
794
794
  function ne(e, r) {
795
795
  const { getLabelAttributes: t, getPlaceholder: a, getSchema: s } = ae(), n = E(e), c = E(r), d = la(e, j(() => E(r).resetLabelPath));
796
- return w(() => ({
796
+ return A(() => ({
797
797
  ...c,
798
798
  placeholder: c.placeholder ?? a(n) ?? void 0,
799
799
  labelAttributes: c.labelAttributes ?? t(n),
@@ -802,12 +802,12 @@ function ne(e, r) {
802
802
  }));
803
803
  }
804
804
  function ua(e, r) {
805
- const { value: t, ...a } = Y(e), { getEmptyOrDefault: s, keyIdMap: n } = ae(), c = w(() => {
805
+ const { value: t, ...a } = Y(e), { getEmptyOrDefault: s, keyIdMap: n } = ae(), c = A(() => {
806
806
  if (a.path)
807
807
  return a.schema.value.values;
808
- }), d = w(() => t ? Object.keys(t.value || {}).map((f) => {
809
- const b = f, C = n.getKey(b) ?? "";
810
- return [b, C];
808
+ }), d = A(() => t ? Object.keys(t.value || {}).map((f) => {
809
+ const b = f, k = n.getKey(b) ?? "";
810
+ return [b, k];
811
811
  }) : []);
812
812
  function p(u, f) {
813
813
  t && (n.updateKey(u, f), t.value = { ...t.value });
@@ -828,7 +828,7 @@ function ua(e, r) {
828
828
  function h(u) {
829
829
  return n.getKey(u);
830
830
  }
831
- const l = w(() => {
831
+ const l = A(() => {
832
832
  if (!a.path) return "";
833
833
  const u = me(a.path.value);
834
834
  let f = u;
@@ -838,15 +838,15 @@ function ua(e, r) {
838
838
  let u = function() {
839
839
  if (!t || !t.value) return null;
840
840
  const b = {};
841
- for (const [C, g] of Object.entries(t.value)) {
842
- const y = n.getKey(C);
841
+ for (const [k, g] of Object.entries(t.value)) {
842
+ const y = n.getKey(k);
843
843
  y && (b[y] = g);
844
844
  }
845
845
  return b;
846
846
  }, f = null;
847
847
  te(() => t?.value, (b) => {
848
- const C = u();
849
- fe(f, C) || (f = C, r?.(C));
848
+ const k = u();
849
+ fe(f, k) || (f = k, r?.(k));
850
850
  }, { deep: !0 });
851
851
  }
852
852
  return {
@@ -878,7 +878,7 @@ const be = /* @__PURE__ */ U({
878
878
  },
879
879
  emits: ["update:modelValue"],
880
880
  setup(e, { emit: r }) {
881
- const t = e, a = ye(), s = r, n = w(() => t.multiline ? Mt : xt), c = w(() => a.characterLimit ?? (t.multiline ? !1 : void 0)), d = re(t.modelValue);
881
+ const t = e, a = ye(), s = r, n = A(() => t.multiline ? Mt : xt), c = A(() => a.characterLimit ?? (t.multiline ? !1 : void 0)), d = re(t.modelValue);
882
882
  te(() => t.modelValue, (h) => {
883
883
  d.value = h;
884
884
  });
@@ -928,26 +928,26 @@ const be = /* @__PURE__ */ U({
928
928
  },
929
929
  emits: ["update:modelValue"],
930
930
  setup(e, { emit: r }) {
931
- const t = ye(), { i18n: a } = ve(), s = se(e, ["autofocus", "showVaultSecretPicker", "showPasswordMaskToggle", "name"]), n = r, { value: c, hide: d, ...p } = Y(j(() => e.name)), i = ne(p.path, j({ ...s, ...t })), m = c?.value;
932
- function h(g) {
933
- m !== void 0 && g === "" && g !== m ? (c.value = null, n("update:modelValue", null)) : (c.value = g.trim(), n("update:modelValue", g.trim()));
931
+ const t = ye(), { i18n: a } = ve(), s = se(e, ["autofocus", "showVaultSecretPicker", "showPasswordMaskToggle", "name"]), n = r, { value: c, hide: d, ...p } = Y(j(() => e.name)), i = ne(p.path, j({ ...s, ...t }));
932
+ function m(k) {
933
+ c.value = k === "" ? null : k, n("update:modelValue", c.value);
934
934
  }
935
- const l = w(() => e.showPasswordMaskToggle !== void 0 ? e.showPasswordMaskToggle : s.type === "password" ? !0 : !!(p.schema?.value).encrypted), u = we(at, void 0), f = w(() => e.showVaultSecretPicker !== void 0 ? e.showVaultSecretPicker : !!p.schema.value?.referenceable), b = w(() => ({ referenceable: f.value })), C = w(() => t["data-1p-ignore"] !== void 0 ? t["data-1p-ignore"] : me(e.name) === "name");
936
- return (g, y) => {
937
- const A = D("KAlert");
938
- return p.error ? (_(), I(A, {
935
+ const h = A(() => e.showPasswordMaskToggle !== void 0 ? e.showPasswordMaskToggle : s.type === "password" ? !0 : !!(p.schema?.value).encrypted), l = we(at, void 0), u = A(() => e.showVaultSecretPicker !== void 0 ? e.showVaultSecretPicker : !!p.schema.value?.referenceable), f = A(() => ({ referenceable: u.value })), b = A(() => t["data-1p-ignore"] !== void 0 ? t["data-1p-ignore"] : me(e.name) === "name");
936
+ return (k, g) => {
937
+ const y = D("KAlert");
938
+ return p.error ? (_(), I(y, {
939
939
  key: 0,
940
940
  appearance: "danger",
941
941
  message: p.error.message
942
- }, null, 8, ["message"])) : G((_(), K("div", De(z({ key: 1 }, g.$attrs)), [
942
+ }, null, 8, ["message"])) : G((_(), K("div", De(z({ key: 1 }, k.$attrs)), [
943
943
  V(be, z({
944
944
  ...o(i),
945
- showPasswordMaskToggle: l.value,
946
- type: l.value ? "password" : "text"
945
+ showPasswordMaskToggle: h.value,
946
+ type: h.value ? "password" : "text"
947
947
  }, {
948
948
  id: e.inputId,
949
949
  class: "ff-string-field",
950
- "data-1p-ignore": C.value,
950
+ "data-1p-ignore": b.value,
951
951
  "data-autofocus": e.autofocus ? "true" : void 0,
952
952
  "data-testid": `ff-${p.path.value}`,
953
953
  error: e.error,
@@ -956,12 +956,12 @@ const be = /* @__PURE__ */ U({
956
956
  "model-value": o(c) ?? "",
957
957
  multiline: e.multiline,
958
958
  placeholder: e.placeholder ?? o(i).placeholder,
959
- "onUpdate:modelValue": h
959
+ "onUpdate:modelValue": m
960
960
  }), W({ _: 2 }, [
961
961
  o(i).labelAttributes?.info ? {
962
962
  name: "label-tooltip",
963
963
  fn: x(() => [
964
- F(g.$slots, "tooltip", {}, () => [
964
+ F(k.$slots, "tooltip", {}, () => [
965
965
  B("div", {
966
966
  innerHTML: o(i).labelAttributes.info
967
967
  }, null, 8, ma)
@@ -969,23 +969,23 @@ const be = /* @__PURE__ */ U({
969
969
  ]),
970
970
  key: "0"
971
971
  } : void 0,
972
- !(e.multiline && e.error) && g.$slots.help ? {
972
+ !(e.multiline && e.error) && k.$slots.help ? {
973
973
  name: "help",
974
974
  fn: x(() => [
975
- F(g.$slots, "help", {}, void 0, !0)
975
+ F(k.$slots, "help", {}, void 0, !0)
976
976
  ]),
977
977
  key: "1"
978
978
  } : void 0,
979
979
  !e.multiline && e.inlineVaultPicker ? {
980
980
  name: "after",
981
981
  fn: x(() => [
982
- o(u) && f.value ? (_(), I(ie(o(u)), {
982
+ o(l) && u.value ? (_(), I(ie(o(l)), {
983
983
  key: 0,
984
- schema: b.value,
985
- update: h,
984
+ schema: f.value,
985
+ update: m,
986
986
  value: o(c) ?? ""
987
987
  }, null, 8, ["schema", "value"])) : N("", !0),
988
- f.value && !o(u) ? (_(), I(A, {
988
+ u.value && !o(l) ? (_(), I(y, {
989
989
  key: 1,
990
990
  appearance: "warning",
991
991
  "data-testid": `ff-vault-secret-picker-warning-${p.path.value}`,
@@ -996,13 +996,13 @@ const be = /* @__PURE__ */ U({
996
996
  } : void 0
997
997
  ]), 1040, ["id", "data-1p-ignore", "data-autofocus", "data-testid", "error", "error-message", "help", "model-value", "multiline", "placeholder"]),
998
998
  e.inlineVaultPicker ? N("", !0) : (_(), K(ee, { key: 0 }, [
999
- o(u) && f.value ? (_(), I(ie(o(u)), {
999
+ o(l) && u.value ? (_(), I(ie(o(l)), {
1000
1000
  key: 0,
1001
- schema: b.value,
1002
- update: h,
1001
+ schema: f.value,
1002
+ update: m,
1003
1003
  value: o(c) ?? ""
1004
1004
  }, null, 8, ["schema", "value"])) : N("", !0),
1005
- f.value && !o(u) ? (_(), I(A, {
1005
+ u.value && !o(l) ? (_(), I(y, {
1006
1006
  key: 1,
1007
1007
  appearance: "warning",
1008
1008
  "data-testid": `ff-vault-secret-picker-warning-${p.path.value}`,
@@ -1019,7 +1019,7 @@ const be = /* @__PURE__ */ U({
1019
1019
  for (const [a, s] of r)
1020
1020
  t[a] = s;
1021
1021
  return t;
1022
- }, ft = /* @__PURE__ */ H(fa, [["__scopeId", "data-v-5cb8f07e"]]), ha = ["innerHTML"], ga = /* @__PURE__ */ U({
1022
+ }, ft = /* @__PURE__ */ H(fa, [["__scopeId", "data-v-ab4f4a8a"]]), ha = ["innerHTML"], ga = /* @__PURE__ */ U({
1023
1023
  inheritAttrs: !1,
1024
1024
  __name: "BooleanField",
1025
1025
  props: {
@@ -1073,23 +1073,23 @@ const be = /* @__PURE__ */ U({
1073
1073
  },
1074
1074
  emits: ["update:modelValue"],
1075
1075
  setup(e, { emit: r }) {
1076
- const t = ye(), a = se(e, ["autofocus", "name"]), s = r, { value: n, hide: c, ...d } = Y(j(() => e.name)), p = ne(d.path, j({ ...a, ...t })), i = w(() => d.schema?.value?.len_min && d.schema.value.len_min > 0), m = re("");
1076
+ const t = ye(), a = se(e, ["autofocus", "name"]), s = r, { value: n, hide: c, ...d } = Y(j(() => e.name)), p = ne(d.path, j({ ...a, ...t })), i = A(() => d.schema?.value?.len_min && d.schema.value.len_min > 0), m = re("");
1077
1077
  function h(b) {
1078
- return b.map((C) => C.trim()).filter(Boolean).join(", ");
1078
+ return b.map((k) => k.trim()).filter(Boolean).join(", ");
1079
1079
  }
1080
1080
  function l(b) {
1081
- return b.trim().split(",").map((C) => C.trim()).filter(Boolean);
1081
+ return b.trim().split(",").map((k) => k.trim()).filter(Boolean);
1082
1082
  }
1083
1083
  function u(b) {
1084
1084
  m.value = b;
1085
- const C = l(b), g = !C.length && i.value ? null : C;
1085
+ const k = l(b), g = !k.length && i.value ? null : k;
1086
1086
  n.value = g, s("update:modelValue", g);
1087
1087
  }
1088
- const f = w(() => t["data-1p-ignore"] !== void 0 ? t["data-1p-ignore"] : me(e.name) === "name");
1088
+ const f = A(() => t["data-1p-ignore"] !== void 0 ? t["data-1p-ignore"] : me(e.name) === "name");
1089
1089
  return te(n, (b) => {
1090
- const C = b ? h(b) : "";
1091
- h(l(m.value)) !== C && (m.value = C);
1092
- }, { immediate: !0 }), (b, C) => {
1090
+ const k = b ? h(b) : "";
1091
+ h(l(m.value)) !== k && (m.value = k);
1092
+ }, { immediate: !0 }), (b, k) => {
1093
1093
  const g = D("KAlert");
1094
1094
  return d.error ? (_(), I(g, {
1095
1095
  key: 0,
@@ -1139,48 +1139,48 @@ const be = /* @__PURE__ */ U({
1139
1139
  },
1140
1140
  emits: ["add", "remove"],
1141
1141
  setup(e, { emit: r }) {
1142
- _t((S) => ({
1142
+ _t((T) => ({
1143
1143
  v2cc732dc: L.value
1144
1144
  }));
1145
- const t = e, a = r, { i18n: { t: s } } = ve(), { getDefault: n, getSchema: c } = ae(), { value: d, hide: p, ...i } = Y(j(t, "name")), m = ne(i.path, j({ ...t, ...ye() })), h = w(() => {
1145
+ const t = e, a = r, { i18n: { t: s } } = ve(), { getDefault: n, getSchema: c } = ae(), { value: d, hide: p, ...i } = Y(j(t, "name")), m = ne(i.path, j({ ...t, ...ye() })), h = A(() => {
1146
1146
  if (!i.path) throw new Error("Field path is required for sub-schema retrieval");
1147
- const S = c(i.path.value);
1148
- if (!S) throw new Error(`Schema not found for path: ${i.path.value}`);
1149
- return S.elements;
1150
- }), l = w(() => {
1147
+ const T = c(i.path.value);
1148
+ if (!T) throw new Error(`Schema not found for path: ${i.path.value}`);
1149
+ return T.elements;
1150
+ }), l = A(() => {
1151
1151
  if (!i.path) return "";
1152
- const S = me(i.path.value);
1153
- return pt(S);
1154
- }), u = w(() => t.items ?? E(d) ?? []), { getKey: f } = oa("ff-array-field", u), b = w(() => t.appearance ? t.appearance : h.value.type === "record" || h.value.type === "map" ? "card" : "default"), C = w(() => b.value === "card" ? Ke : "div");
1155
- function g(S, R) {
1156
- return typeof t.itemLabel == "function" ? t.itemLabel(S, R) : t.itemLabel || m.value.label || `Item #${R}`;
1152
+ const T = me(i.path.value);
1153
+ return pt(T);
1154
+ }), u = A(() => t.items ?? E(d) ?? []), { getKey: f } = oa("ff-array-field", u), b = A(() => t.appearance ? t.appearance : h.value.type === "record" || h.value.type === "map" ? "card" : "default"), k = A(() => b.value === "card" ? Ke : "div");
1155
+ function g(T, R) {
1156
+ return typeof t.itemLabel == "function" ? t.itemLabel(T, R) : t.itemLabel || m.value.label || `Item #${R}`;
1157
1157
  }
1158
- const y = w(() => u.value.map((S, R) => ({
1159
- hash: `#${f(S, R)}`,
1158
+ const y = A(() => u.value.map((T, R) => ({
1159
+ hash: `#${f(T, R)}`,
1160
1160
  title: ""
1161
- }))), A = re(y.value[0]?.hash), T = async () => {
1162
- const S = n($(i.path.value, Be));
1163
- Array.isArray(d.value) || (d.value = []), d.value.push(S), a("add"), t.appearance === "tabs" && (await Re(), A.value = y.value[y.value.length - 1]?.hash), await Re(), P(u.value.length + 1);
1164
- }, v = async (S) => {
1165
- Array.isArray(d.value) && (d.value.splice(S, 1), d.value.length === 0 && !m.value.required && (d.value = null)), a("remove", S), t.appearance === "tabs" && (A.value = y.value[Math.max(0, S - 1)]?.hash);
1166
- }, k = et("root");
1167
- function P(S) {
1168
- if (!k.value)
1161
+ }))), w = re(y.value[0]?.hash), C = async () => {
1162
+ const T = n($(i.path.value, Be));
1163
+ Array.isArray(d.value) || (d.value = []), d.value.push(T), a("add"), t.appearance === "tabs" && (await Re(), w.value = y.value[y.value.length - 1]?.hash), await Re(), P(u.value.length + 1);
1164
+ }, v = async (T) => {
1165
+ Array.isArray(d.value) && (d.value.splice(T, 1), d.value.length === 0 && !m.value.required && (d.value = null)), a("remove", T), t.appearance === "tabs" && (w.value = y.value[Math.max(0, T - 1)]?.hash);
1166
+ }, S = et("root");
1167
+ function P(T) {
1168
+ if (!S.value)
1169
1169
  return;
1170
- const R = Math.max(0, Math.min(S, u.value.length - 1)), q = k.value.querySelector(`[data-index="${R}"]`);
1170
+ const R = Math.max(0, Math.min(T, u.value.length - 1)), q = S.value.querySelector(`[data-index="${R}"]`);
1171
1171
  if (!q)
1172
1172
  return;
1173
1173
  M(q)?.focus();
1174
1174
  }
1175
- function M(S) {
1176
- const R = S.querySelector('[data-autofocus="true"]');
1177
- return R ? R.matches(xe) ? R : R.querySelector(xe) : S.querySelector(xe);
1175
+ function M(T) {
1176
+ const R = T.querySelector('[data-autofocus="true"]');
1177
+ return R ? R.matches(xe) ? R : R.querySelector(xe) : T.querySelector(xe);
1178
1178
  }
1179
- const L = w(() => {
1180
- const { appearance: S, stickyTabs: R } = t;
1181
- return S !== "tabs" || R == null || R === !1 ? null : typeof R == "number" ? `${t.stickyTabs}px` : typeof R == "string" ? R : "0";
1179
+ const L = A(() => {
1180
+ const { appearance: T, stickyTabs: R } = t;
1181
+ return T !== "tabs" || R == null || R === !1 ? null : typeof R == "number" ? `${t.stickyTabs}px` : typeof R == "string" ? R : "0";
1182
1182
  });
1183
- return (S, R) => {
1183
+ return (T, R) => {
1184
1184
  const q = D("KAlert"), X = D("KLabel"), Q = D("KButton"), de = D("KTooltip"), gt = D("KTabs");
1185
1185
  return i.error ? (_(), I(q, {
1186
1186
  key: 0,
@@ -1189,7 +1189,7 @@ const be = /* @__PURE__ */ U({
1189
1189
  }, null, 8, ["message"])) : G((_(), K("div", {
1190
1190
  key: 1,
1191
1191
  ref_key: "root",
1192
- ref: k,
1192
+ ref: S,
1193
1193
  class: Te(["ff-array-field", {
1194
1194
  [`ff-array-field-${b.value ?? "default"}`]: !0,
1195
1195
  "ff-array-field-sticky-tabs": e.stickyTabs
@@ -1214,7 +1214,7 @@ const be = /* @__PURE__ */ U({
1214
1214
  o(m).labelAttributes?.info ? {
1215
1215
  name: "tooltip",
1216
1216
  fn: x(() => [
1217
- F(S.$slots, "tooltip", {}, () => [
1217
+ F(T.$slots, "tooltip", {}, () => [
1218
1218
  B("div", {
1219
1219
  innerHTML: o(m).labelAttributes.info
1220
1220
  }, null, 8, ka)
@@ -1229,7 +1229,7 @@ const be = /* @__PURE__ */ U({
1229
1229
  "aria-label": o(s)("actions.add_entity", { entity: l.value }),
1230
1230
  "data-testid": `ff-add-item-btn-${i.path.value}`,
1231
1231
  icon: "",
1232
- onClick: T
1232
+ onClick: C
1233
1233
  }, {
1234
1234
  default: x(() => [
1235
1235
  V(o(je))
@@ -1242,7 +1242,7 @@ const be = /* @__PURE__ */ U({
1242
1242
  class: "ff-array-field-container",
1243
1243
  "data-testid": `ff-array-basic-container-${i.path.value}`
1244
1244
  }, [
1245
- (_(!0), K(ee, null, oe(u.value, (le, O) => (_(), I(o(C), {
1245
+ (_(!0), K(ee, null, oe(u.value, (le, O) => (_(), I(o(k), {
1246
1246
  key: o(f)(le, O),
1247
1247
  class: Te(["ff-array-field-item", { "ff-array-field-item-card": b.value === "card" }]),
1248
1248
  "data-index": O,
@@ -1250,7 +1250,7 @@ const be = /* @__PURE__ */ U({
1250
1250
  }, {
1251
1251
  default: x(() => [
1252
1252
  B("div", Ta, [
1253
- S.$slots.item ? F(S.$slots, "item", {
1253
+ T.$slots.item ? F(T.$slots, "item", {
1254
1254
  key: 0,
1255
1255
  autofocus: !0,
1256
1256
  fieldName: String(O),
@@ -1296,7 +1296,7 @@ const be = /* @__PURE__ */ U({
1296
1296
  "aria-label": o(s)("actions.add_entity", { entity: l.value }),
1297
1297
  class: "ff-array-field-add-item-btn",
1298
1298
  "data-testid": `ff-add-item-btn-${i.path.value}`,
1299
- onClick: T
1299
+ onClick: C
1300
1300
  }, {
1301
1301
  default: x(() => [
1302
1302
  V(o(je)),
@@ -1310,8 +1310,8 @@ const be = /* @__PURE__ */ U({
1310
1310
  }, {
1311
1311
  default: x(() => [
1312
1312
  V(gt, {
1313
- modelValue: A.value,
1314
- "onUpdate:modelValue": R[0] || (R[0] = (le) => A.value = le),
1313
+ modelValue: w.value,
1314
+ "onUpdate:modelValue": R[0] || (R[0] = (le) => w.value = le),
1315
1315
  "data-testid": `ff-array-tabs-${i.path.value}`,
1316
1316
  tabs: y.value
1317
1317
  }, W({ _: 2 }, [
@@ -1323,7 +1323,7 @@ const be = /* @__PURE__ */ U({
1323
1323
  "data-index": O,
1324
1324
  "data-testid": `ff-array-item-${i.path.value}.${O}`
1325
1325
  }, [
1326
- S.$slots.item ? F(S.$slots, "item", {
1326
+ T.$slots.item ? F(T.$slots, "item", {
1327
1327
  key: 0,
1328
1328
  autofocus: !0,
1329
1329
  fieldName: String(O),
@@ -1443,7 +1443,7 @@ const be = /* @__PURE__ */ U({
1443
1443
  visibleFields: {}
1444
1444
  },
1445
1445
  setup(e) {
1446
- const { i18n: { t: r } } = ve(), t = w(() => {
1446
+ const { i18n: { t: r } } = ve(), t = A(() => {
1447
1447
  if (!Array.isArray(e.entityChecks) || e.entityChecks.length === 0)
1448
1448
  return null;
1449
1449
  const n = [], c = [
@@ -1526,28 +1526,28 @@ const be = /* @__PURE__ */ U({
1526
1526
  fieldPath: n.path,
1527
1527
  rules: j(t, "renderRules"),
1528
1528
  omittedFields: j(() => e.omit)
1529
- }), m = $e(e, "added"), h = $e(e, "expanded"), l = w(() => {
1529
+ }), m = $e(e, "added"), h = $e(e, "expanded"), l = A(() => {
1530
1530
  if (n.ancestors?.value) {
1531
1531
  const v = n.ancestors.value.parent;
1532
1532
  if (v?.path)
1533
1533
  return c(v.path)?.type === "array";
1534
1534
  }
1535
1535
  return !1;
1536
- }), u = w(() => {
1536
+ }), u = A(() => {
1537
1537
  if (n.ancestors?.value) {
1538
1538
  const v = n.ancestors.value.parent;
1539
1539
  if (v?.path)
1540
1540
  return c(v.path)?.type === "map";
1541
1541
  }
1542
1542
  return !1;
1543
- }), f = ne(n.path, { required: e.required, ...t, resetLabelPath: e.resetLabelPath }), b = w(() => f.value.required ? !0 : m.value ?? e.defaultAdded), C = w(() => e.asChild !== void 0 ? e.asChild : l.value), g = w(() => {
1543
+ }), f = ne(n.path, { required: e.required, ...t, resetLabelPath: e.resetLabelPath }), b = A(() => f.value.required ? !0 : m.value ?? e.defaultAdded), k = A(() => e.asChild !== void 0 ? e.asChild : l.value), g = A(() => {
1544
1544
  let v = n.schema.value.fields;
1545
- return e.omit && (v = v.filter((k) => !e.omit.includes(Object.keys(k)[0]))), e.fieldsOrder ? st(v, e.fieldsOrder) : (i.value?.bundles && (v = lt([...v], i.value.bundles)), v);
1546
- }), y = w(() => g.value.map((v) => Object.keys(v)[0]));
1547
- function A() {
1545
+ return e.omit && (v = v.filter((S) => !e.omit.includes(Object.keys(S)[0]))), e.fieldsOrder ? st(v, e.fieldsOrder) : (i.value?.bundles && (v = lt([...v], i.value.bundles)), v);
1546
+ }), y = A(() => g.value.map((v) => Object.keys(v)[0]));
1547
+ function w() {
1548
1548
  h.value = !h.value;
1549
1549
  }
1550
- function T() {
1550
+ function C() {
1551
1551
  m.value ? a.value = d(n.path.value) : a.value = null;
1552
1552
  }
1553
1553
  return te(b, (v) => {
@@ -1556,7 +1556,7 @@ const be = /* @__PURE__ */ U({
1556
1556
  if (n.error || !a) return;
1557
1557
  const v = a.value != null;
1558
1558
  m.value = v, (f.value.required || v) && (h.value = !0);
1559
- }), (v, k) => {
1559
+ }), (v, S) => {
1560
1560
  const P = D("KAlert"), M = D("KInputSwitch");
1561
1561
  return _(), K(ee, null, [
1562
1562
  (_(), I(ie(v.$slots[o(ke)]))),
@@ -1564,7 +1564,7 @@ const be = /* @__PURE__ */ U({
1564
1564
  key: 0,
1565
1565
  appearance: "danger",
1566
1566
  message: n.error.message
1567
- }, null, 8, ["message"])) : C.value ? G((_(), K("div", z({
1567
+ }, null, 8, ["message"])) : k.value ? G((_(), K("div", z({
1568
1568
  key: 1,
1569
1569
  class: "ff-object-field ff-object-field-as-child"
1570
1570
  }, v.$attrs, {
@@ -1600,7 +1600,7 @@ const be = /* @__PURE__ */ U({
1600
1600
  "data-testid": `ff-object-toggle-btn-${n.path.value}`,
1601
1601
  disabled: !m.value,
1602
1602
  type: "button",
1603
- onClick: Ce(A, ["prevent", "stop"])
1603
+ onClick: Ce(w, ["prevent", "stop"])
1604
1604
  }, [
1605
1605
  V(o(Ot), {
1606
1606
  class: Te(["ff-object-field-toggle-btn-trigger-icon", { "collapse-expanded": h.value }]),
@@ -1641,8 +1641,8 @@ const be = /* @__PURE__ */ U({
1641
1641
  key: 0,
1642
1642
  modelValue: m.value,
1643
1643
  "onUpdate:modelValue": [
1644
- k[0] || (k[0] = (L) => m.value = L),
1645
- T
1644
+ S[0] || (S[0] = (L) => m.value = L),
1645
+ C
1646
1646
  ],
1647
1647
  "data-testid": `ff-object-switch-${n.path.value}`
1648
1648
  }, null, 8, ["modelValue", "data-testid"]))
@@ -1700,37 +1700,37 @@ const be = /* @__PURE__ */ U({
1700
1700
  },
1701
1701
  emits: ["update:modelValue"],
1702
1702
  setup(e, { emit: r }) {
1703
- const t = se(e, ["autofocus", "showVaultSecretPicker", "name"]), { value: a, hide: s, ...n } = Y(j(() => e.name)), c = ne(n.path, t), { i18n: d } = ve(), p = w(() => {
1703
+ const t = se(e, ["autofocus", "showVaultSecretPicker", "name"]), { value: a, hide: s, ...n } = Y(j(() => e.name)), c = ne(n.path, t), { i18n: d } = ve(), p = A(() => {
1704
1704
  const y = n.schema?.value;
1705
1705
  if (typeof y.gt == "number")
1706
1706
  return { min: y.type === "integer" ? y.gt + 1 : y.gt };
1707
- const [A, T] = y.between ?? [];
1707
+ const [w, C] = y.between ?? [];
1708
1708
  return {
1709
- min: t.min ?? A,
1710
- max: t.max ?? T
1709
+ min: t.min ?? w,
1710
+ max: t.max ?? C
1711
1711
  };
1712
- }), i = r, m = a.value, h = w(() => {
1712
+ }), i = r, m = a.value, h = A(() => {
1713
1713
  const y = a?.value;
1714
1714
  if (y == null || y === "") return "";
1715
- if (C.value) return `${y}`;
1716
- const A = typeof y == "number" ? y : Number(y);
1717
- return Number.isFinite(A) ? `${A}` : "";
1715
+ if (k.value) return `${y}`;
1716
+ const w = typeof y == "number" ? y : Number(y);
1717
+ return Number.isFinite(w) ? `${w}` : "";
1718
1718
  });
1719
1719
  function l(y) {
1720
- const A = u(y);
1721
- m !== void 0 && y === "" && A !== m ? (a.value = null, i("update:modelValue", null)) : (a.value = A, i("update:modelValue", A));
1720
+ const w = u(y);
1721
+ m !== void 0 && y === "" && w !== m ? (a.value = null, i("update:modelValue", null)) : (a.value = w, i("update:modelValue", w));
1722
1722
  }
1723
1723
  function u(y) {
1724
1724
  if (y === "") return null;
1725
- const A = y.trim();
1726
- if (A === "") return null;
1727
- const T = Number(A);
1728
- return Number.isFinite(T) ? T : C.value ? y : null;
1725
+ const w = y.trim();
1726
+ if (w === "") return null;
1727
+ const C = Number(w);
1728
+ return Number.isFinite(C) ? C : k.value ? y : null;
1729
1729
  }
1730
- const f = we(at, void 0), b = w(() => ({ referenceable: C.value })), C = w(() => e.showVaultSecretPicker !== void 0 ? e.showVaultSecretPicker : !!n.schema.value?.referenceable), g = w(() => C.value ? "text" : "number");
1731
- return (y, A) => {
1732
- const T = D("KAlert");
1733
- return n.error ? (_(), I(T, {
1730
+ const f = we(at, void 0), b = A(() => ({ referenceable: k.value })), k = A(() => e.showVaultSecretPicker !== void 0 ? e.showVaultSecretPicker : !!n.schema.value?.referenceable), g = A(() => k.value ? "text" : "number");
1731
+ return (y, w) => {
1732
+ const C = D("KAlert");
1733
+ return n.error ? (_(), I(C, {
1734
1734
  key: 0,
1735
1735
  appearance: "danger",
1736
1736
  message: n.error.message
@@ -1758,13 +1758,13 @@ const be = /* @__PURE__ */ U({
1758
1758
  key: "0"
1759
1759
  } : void 0
1760
1760
  ]), 1040, ["data-autofocus", "data-testid", "model-value", "type"]),
1761
- o(f) && C.value ? (_(), I(ie(o(f)), {
1761
+ o(f) && k.value ? (_(), I(ie(o(f)), {
1762
1762
  key: 0,
1763
1763
  schema: b.value,
1764
1764
  update: l,
1765
1765
  value: o(a) ?? ""
1766
1766
  }, null, 8, ["schema", "value"])) : N("", !0),
1767
- C.value && !o(f) ? (_(), I(T, {
1767
+ k.value && !o(f) ? (_(), I(C, {
1768
1768
  key: 1,
1769
1769
  appearance: "warning",
1770
1770
  "data-testid": `ff-vault-secret-picker-warning-${n.path.value}`,
@@ -1826,10 +1826,10 @@ const be = /* @__PURE__ */ U({
1826
1826
  set: (f) => {
1827
1827
  n.value = i(f);
1828
1828
  }
1829
- }), h = w(() => e.items ? e.items : d.path ? s(d.path.value) : []), l = w(() => e.multiple !== void 0 ? e.multiple : d.schema.value?.type === "set"), u = w(() => l.value ? Vt : Kt);
1829
+ }), h = A(() => e.items ? e.items : d.path ? s(d.path.value) : []), l = A(() => e.multiple !== void 0 ? e.multiple : d.schema.value?.type === "set"), u = A(() => l.value ? Vt : Kt);
1830
1830
  return (f, b) => {
1831
- const C = D("KAlert");
1832
- return d.error ? (_(), I(C, {
1831
+ const k = D("KAlert");
1832
+ return d.error ? (_(), I(k, {
1833
1833
  key: 0,
1834
1834
  appearance: "danger",
1835
1835
  message: d.error.message
@@ -1890,7 +1890,7 @@ const be = /* @__PURE__ */ U({
1890
1890
  }
1891
1891
  n.value = u, s("update:modelValue", u);
1892
1892
  }
1893
- const h = w(() => t["data-1p-ignore"] !== void 0 ? t["data-1p-ignore"] : me(e.name) === "name");
1893
+ const h = A(() => t["data-1p-ignore"] !== void 0 ? t["data-1p-ignore"] : me(e.name) === "name");
1894
1894
  return te(n, (l) => {
1895
1895
  if (l && typeof l == "object") {
1896
1896
  try {
@@ -1960,12 +1960,12 @@ const be = /* @__PURE__ */ U({
1960
1960
  const t = ye(), { i18n: { t: a } } = ve(), s = se(e, ["autofocus", "name"]), n = r, { value: c, hide: d, ...p } = Y(j(() => e.name));
1961
1961
  if (p.error)
1962
1962
  throw new Error(p.error.message);
1963
- const i = ne(p.path, j({ ...s, ...t })), m = c.value ? c.value.id : null, h = w(() => i.value.placeholder ? i.value.placeholder : a("plugins.free-form.foreign_placeholder", { entity: p.schema.value?.reference ?? "entity" })), l = re(m ?? "");
1963
+ const i = ne(p.path, j({ ...s, ...t })), m = c.value ? c.value.id : null, h = A(() => i.value.placeholder ? i.value.placeholder : a("plugins.free-form.foreign_placeholder", { entity: p.schema.value?.reference ?? "entity" })), l = re(m ?? "");
1964
1964
  function u(b) {
1965
1965
  m !== void 0 && b === "" && b !== m ? (c.value = null, n("update:modelValue", null)) : (c.value = { id: b.trim() }, n("update:modelValue", c.value));
1966
1966
  }
1967
- const f = w(() => t["data-1p-ignore"] !== void 0 ? t["data-1p-ignore"] : me(e.name) === "name");
1968
- return (b, C) => G((_(), I(be, z(o(i), {
1967
+ const f = A(() => t["data-1p-ignore"] !== void 0 ? t["data-1p-ignore"] : me(e.name) === "name");
1968
+ return (b, k) => G((_(), I(be, z(o(i), {
1969
1969
  class: "ff-foreign-field",
1970
1970
  "data-1p-ignore": f.value,
1971
1971
  "data-autofocus": e.autofocus ? "true" : void 0,
@@ -2011,23 +2011,23 @@ const be = /* @__PURE__ */ U({
2011
2011
  removeKey: p,
2012
2012
  field: i,
2013
2013
  fieldDisplayName: m
2014
- } = ua(j(a, "name"), v), h = ne(i.path, a), l = ["string", "number", "boolean", "integer", "foreign"], u = w(() => a.oneLine ? !0 : i.schema?.value?.type === "map" && l.includes(i.schema.value.values.type) && !a.appearance?.string?.multiline), f = w(() => i.schema?.value?.type === "map" ? i.schema.value.values : void 0), b = w(() => f.value?.type === "string" && !f.value?.one_of), C = w(() => u.value ? "div" : Ke), g = et("root");
2015
- function y(k, P) {
2016
- a.appearance?.string?.multiline || (k.preventDefault(), P === n.value.length - 1 && d(), A(P + 1));
2014
+ } = ua(j(a, "name"), v), h = ne(i.path, a), l = ["string", "number", "boolean", "integer", "foreign"], u = A(() => a.oneLine ? !0 : i.schema?.value?.type === "map" && l.includes(i.schema.value.values.type) && !a.appearance?.string?.multiline), f = A(() => i.schema?.value?.type === "map" ? i.schema.value.values : void 0), b = A(() => f.value?.type === "string" && !f.value?.one_of), k = A(() => u.value ? "div" : Ke), g = et("root");
2015
+ function y(S, P) {
2016
+ a.appearance?.string?.multiline || (S.preventDefault(), P === n.value.length - 1 && d(), w(P + 1));
2017
2017
  }
2018
- async function A(k) {
2019
- g.value && (await Re(), g.value.querySelector(`[data-key-input="${k}"]`)?.focus());
2018
+ async function w(S) {
2019
+ g.value && (await Re(), g.value.querySelector(`[data-key-input="${S}"]`)?.focus());
2020
2020
  }
2021
- function T() {
2021
+ function C() {
2022
2022
  d();
2023
- const k = n.value.findIndex(([P, M]) => !M);
2024
- A(k === -1 ? n.value.length - 1 : k);
2023
+ const S = n.value.findIndex(([P, M]) => !M);
2024
+ w(S === -1 ? n.value.length - 1 : S);
2025
2025
  }
2026
- function v(k) {
2027
- s("legacyValueChange", k);
2026
+ function v(S) {
2027
+ s("legacyValueChange", S);
2028
2028
  }
2029
- return (k, P) => {
2030
- const M = D("KAlert"), L = D("KLabel"), S = D("KButton"), R = D("KTooltip");
2029
+ return (S, P) => {
2030
+ const M = D("KAlert"), L = D("KLabel"), T = D("KButton"), R = D("KTooltip");
2031
2031
  return o(i).error ? (_(), I(M, {
2032
2032
  key: 0,
2033
2033
  appearance: "danger",
@@ -2057,7 +2057,7 @@ const be = /* @__PURE__ */ U({
2057
2057
  o(h).labelAttributes?.info ? {
2058
2058
  name: "tooltip",
2059
2059
  fn: x(() => [
2060
- F(k.$slots, "tooltip", {}, () => [
2060
+ F(S.$slots, "tooltip", {}, () => [
2061
2061
  B("div", {
2062
2062
  innerHTML: o(h).labelAttributes.info
2063
2063
  }, null, 8, on)
@@ -2067,7 +2067,7 @@ const be = /* @__PURE__ */ U({
2067
2067
  } : void 0
2068
2068
  ]), 1040, ["data-testid", "required", "tooltip-attributes"])
2069
2069
  ], 8, nn)) : N("", !0),
2070
- (_(!0), K(ee, null, oe(o(n), ([q, X], Q) => (_(), I(ie(C.value), {
2070
+ (_(!0), K(ee, null, oe(o(n), ([q, X], Q) => (_(), I(ie(k.value), {
2071
2071
  key: q,
2072
2072
  class: Te(["ff-map-field-item", {
2073
2073
  "ff-map-field-item-simple": u.value,
@@ -2083,10 +2083,10 @@ const be = /* @__PURE__ */ U({
2083
2083
  "data-testid": `ff-map-key-${o(i).path.value}.${Q}`,
2084
2084
  "model-value": X,
2085
2085
  placeholder: e.keyPlaceholder || "Key",
2086
- onKeydown: Ne(Ce((de) => A(Q), ["prevent"]), ["enter"]),
2086
+ onKeydown: Ne(Ce((de) => w(Q), ["prevent"]), ["enter"]),
2087
2087
  "onUpdate:modelValue": (de) => o(c)(q, de)
2088
2088
  }, null, 8, ["data-key-input", "data-testid", "model-value", "placeholder", "onKeydown", "onUpdate:modelValue"]),
2089
- F(k.$slots, "default", { keyId: q }, () => [
2089
+ F(S.$slots, "default", { keyId: q }, () => [
2090
2090
  b.value ? (_(), I(ft, {
2091
2091
  key: 0,
2092
2092
  "inline-vault-picker": "",
@@ -2103,7 +2103,7 @@ const be = /* @__PURE__ */ U({
2103
2103
  text: o(t).t("actions.remove_entity", { entity: o(m) })
2104
2104
  }, {
2105
2105
  default: x(() => [
2106
- V(S, {
2106
+ V(T, {
2107
2107
  appearance: "tertiary",
2108
2108
  "aria-label": o(t).t("actions.remove_entity", { entity: o(m) }),
2109
2109
  "data-testid": `ff-map-remove-btn-${o(i).path.value}.${Q}`,
@@ -2121,12 +2121,12 @@ const be = /* @__PURE__ */ U({
2121
2121
  ]),
2122
2122
  _: 2
2123
2123
  }, 1032, ["class", "data-testid"]))), 128)),
2124
- V(S, {
2124
+ V(T, {
2125
2125
  appearance: "tertiary",
2126
2126
  "aria-label": o(t).t("actions.add_entity", { entity: o(m) }),
2127
2127
  class: "ff-map-field-add-entry-btn",
2128
2128
  "data-testid": `ff-map-add-btn-${o(i).path.value}`,
2129
- onClick: T
2129
+ onClick: C
2130
2130
  }, {
2131
2131
  default: x(() => [
2132
2132
  V(o(je)),
@@ -2149,7 +2149,7 @@ const be = /* @__PURE__ */ U({
2149
2149
  },
2150
2150
  emits: ["globalAction"],
2151
2151
  setup(e) {
2152
- const r = e, t = Y(j(r, "name")), a = w(() => {
2152
+ const r = e, t = Y(j(r, "name")), a = A(() => {
2153
2153
  switch (t.schema?.value?.type) {
2154
2154
  case "string":
2155
2155
  return "one_of" in t.schema.value ? Se : ft;
@@ -2217,11 +2217,11 @@ const be = /* @__PURE__ */ U({
2217
2217
  setup(e, { expose: r, emit: t }) {
2218
2218
  const a = t, s = Ae(), { getSchema: n, formData: c, setValue: d, getValue: p, rootRenderRules: i } = ta({
2219
2219
  schema: e.schema,
2220
- propsData: w(() => e.data),
2220
+ propsData: A(() => e.data),
2221
2221
  propsConfig: e.config,
2222
2222
  propsRenderRules: j(() => e.renderRules),
2223
2223
  onChange: (h) => a("change", h)
2224
- }), m = w(() => {
2224
+ }), m = A(() => {
2225
2225
  const { fields: h } = n();
2226
2226
  let l = [...h];
2227
2227
  return e.fieldsOrder ? st(l, e.fieldsOrder) : (i.value?.bundles && (l = lt([...l], i.value.bundles)), l);