@coffer-org/web 2.6.1 → 3.0.0

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.
Files changed (66) hide show
  1. package/dist/assets/{ChatWidget-BxY9kQxi.js → ChatWidget-CnETJEZj.js} +1 -1
  2. package/dist/assets/{ExtendReasonInfo-iAIjJ48b.js → ExtendReasonInfo-DZyJKRHy.js} +1 -1
  3. package/dist/assets/{NewRecordView-uOQOfkOx.js → NewRecordView-BAe2dw2Y.js} +1 -1
  4. package/dist/assets/{PluginSettingsPage-IaFxvJdf.js → PluginSettingsPage-BQm11aEY.js} +1 -1
  5. package/dist/assets/{SettingsForm-BC0viqzW.js → SettingsForm-xXNSptFG.js} +1 -1
  6. package/dist/assets/{Toolbar-Ce0rNkTo.js → Toolbar-_Bg6b3gy.js} +2 -2
  7. package/dist/assets/{chrome-Dxg72x2y.js → chrome-BfURuVBW.js} +1 -1
  8. package/dist/assets/{data-size-FYe9GB-w.js → data-size-B44emc58.js} +1 -1
  9. package/dist/assets/{dispatch-CBwxUhZb.js → dispatch-B7QFSWwA.js} +1 -1
  10. package/dist/assets/{extend-BEeQnsjj.js → extend-CbEbk8Xz.js} +1 -1
  11. package/dist/assets/{field-frame-B0aT2ksn.js → field-frame-lE36ax7A.js} +1 -1
  12. package/dist/assets/fields-BvFhu2Zp.js +64 -0
  13. package/dist/assets/index-B674c0cW.js +36 -0
  14. package/dist/assets/index-CvgeFYKg.css +2 -0
  15. package/dist/assets/shelf-D-ifpKTJ.js +1 -0
  16. package/dist/assets/src-BIligwLb.js +1 -0
  17. package/dist/assets/src-BbGADHi4.js +1 -0
  18. package/dist/assets/{src-DSF8bpP1.js → src-BbXav__j.js} +1 -1
  19. package/dist/assets/src-BngIhzHR.js +1 -0
  20. package/dist/assets/src-BqCV9wTP.js +1 -0
  21. package/dist/assets/{src-DHkUSKtU.js → src-CK5LF8mh.js} +1 -1
  22. package/dist/assets/src-CO_C8dwk.js +1 -0
  23. package/dist/assets/src-CTwytbLw.js +1 -0
  24. package/dist/assets/src-Ck3rvFAP.js +2 -0
  25. package/dist/assets/src-CzSQMFWS.js +7 -0
  26. package/dist/assets/{src-DkXs3X9I.js → src-D1jciqQr.js} +1 -1
  27. package/dist/assets/{src-B1LkgGT0.js → src-D20-HqBF.js} +1 -1
  28. package/dist/assets/src-DD4urQ_Z.js +4 -0
  29. package/dist/assets/{src-CyicyuOu.js → src-DLuKxde5.js} +1 -1
  30. package/dist/assets/{src-CQfRvkxA.js → src-DQEWf3tk.js} +1 -1
  31. package/dist/assets/src-D_zsiKPr.js +1 -0
  32. package/dist/assets/src-DdRHCjFX.js +1 -0
  33. package/dist/assets/src-DfExcdwX.js +1 -0
  34. package/dist/assets/{src-ctux6MQD.js → src-DkjooOXs.js} +1 -1
  35. package/dist/assets/src-JijGLvg4.js +1 -0
  36. package/dist/assets/{src-CUVSyD4r.js → src-P-7khzwl.js} +1 -1
  37. package/dist/assets/{src-oZtYFN79.js → src-R3C69mft.js} +1 -1
  38. package/dist/assets/src-m6T7MzTC.js +4 -0
  39. package/dist/assets/src-o6G2rx51.js +1 -0
  40. package/dist/assets/src-wGc7N6NH.js +1 -0
  41. package/dist/assets/{ui-BF1Zz_Rh.js → ui-DoEY93ZQ.js} +2 -2
  42. package/dist/assets/{ui-DbAPxl8P.js → ui-QxKP_mxS.js} +1 -1
  43. package/dist/assets/{ui-CVX34OBw.js → ui-Vp773Nr2.js} +1 -1
  44. package/dist/index.html +12 -12
  45. package/dist-vendor/web-sdk.js +464 -420
  46. package/package.json +2 -2
  47. package/dist/assets/fields-C2JBwQro.js +0 -64
  48. package/dist/assets/index-BsQAt1OP.js +0 -36
  49. package/dist/assets/index-DFq4B5gv.css +0 -2
  50. package/dist/assets/shelf-ZF6KVxZd.js +0 -1
  51. package/dist/assets/src-6mlUyIfG.js +0 -1
  52. package/dist/assets/src-B5Wv5ASz.js +0 -2
  53. package/dist/assets/src-BBWK9u-H.js +0 -1
  54. package/dist/assets/src-BFOIP3DL.js +0 -1
  55. package/dist/assets/src-BcIpCv23.js +0 -1
  56. package/dist/assets/src-Bq0RDmeB.js +0 -1
  57. package/dist/assets/src-CFMj5Och.js +0 -1
  58. package/dist/assets/src-CS4PO4i_.js +0 -4
  59. package/dist/assets/src-CmB0Aw5B.js +0 -1
  60. package/dist/assets/src-D30TPrc-.js +0 -4
  61. package/dist/assets/src-D7-BUu3l.js +0 -1
  62. package/dist/assets/src-DN5_wKHc.js +0 -7
  63. package/dist/assets/src-DYJtabTg.js +0 -1
  64. package/dist/assets/src-Dnc57MD8.js +0 -1
  65. package/dist/assets/src-Wi0SYiAd.js +0 -1
  66. package/dist/assets/src-na7K2wUl.js +0 -1
@@ -3383,13 +3383,13 @@ function H(e, t) {
3383
3383
  function U(e = "required") {
3384
3384
  return { error: (t) => t.input === void 0 ? H(e) : void 0 };
3385
3385
  }
3386
- function lo(e = "invalid_type") {
3386
+ function W(e = "invalid_type") {
3387
3387
  return { error: (t) => t.code === "invalid_type" ? H(e) : void 0 };
3388
3388
  }
3389
- function uo() {
3389
+ function lo() {
3390
3390
  return { error: (e) => e.code === "invalid_type" ? e.input === void 0 ? H("required") : H("invalid_type") : void 0 };
3391
3391
  }
3392
- function W(e) {
3392
+ function G(e) {
3393
3393
  if (typeof e == "string") try {
3394
3394
  return JSON.parse(e);
3395
3395
  } catch {
@@ -3397,9 +3397,9 @@ function W(e) {
3397
3397
  }
3398
3398
  return e;
3399
3399
  }
3400
- function fo(e, t) {
3400
+ function uo(e, t) {
3401
3401
  return R().superRefine((n, r) => {
3402
- let i = W(n);
3402
+ let i = G(n);
3403
3403
  if (typeof n == "string" && typeof i == "string") {
3404
3404
  r.addIssue({
3405
3405
  code: B.custom,
@@ -3413,7 +3413,7 @@ function fo(e, t) {
3413
3413
  });
3414
3414
  });
3415
3415
  }
3416
- function G(e, t) {
3416
+ function K(e, t) {
3417
3417
  let n = t === !0, r = (e) => e === "" || e === null ? void 0 : e;
3418
3418
  return n ? $a(r, R().superRefine((e, t) => {
3419
3419
  e === void 0 && t.addIssue({
@@ -3424,7 +3424,7 @@ function G(e, t) {
3424
3424
  }
3425
3425
  //#endregion
3426
3426
  //#region ../sdk/src/fields/normalize.ts
3427
- function K(e) {
3427
+ function q(e) {
3428
3428
  let t = e, n = t.rules ?? {}, r = t.view ?? {}, i = {};
3429
3429
  n.min != null && typeof n.min == "number" && (i.min = n.min), n.max != null && typeof n.max == "number" && (i.max = n.max), n.step != null && (i.step = n.step), n.pattern != null && (i.pattern = n.pattern), n.messageKey != null && (i.messageKey = n.messageKey), n.granularity != null && (i.granularity = n.granularity), n.language != null && (i.language = n.language), n.defaultCurrency != null && (i.defaultCurrency = n.defaultCurrency), n.defaultLang != null && (i.defaultLang = n.defaultLang);
3430
3430
  let { rules: a, view: o, ...s } = t, c = {
@@ -3454,9 +3454,9 @@ function K(e) {
3454
3454
  }
3455
3455
  //#endregion
3456
3456
  //#region ../sdk/src/field-presets.ts
3457
- function po(e) {
3458
- let t = K(e), n = t.required ?? !1, r = F().email({ message: H("email") });
3459
- return n && (r = r.min(1, { message: H("min_length", { min: 1 }) })), J(t, Y({
3457
+ function fo(e) {
3458
+ let t = q(e), n = t.required ?? !1, r = F().email({ message: H("email") });
3459
+ return n && (r = r.min(1, { message: H("min_length", { min: 1 }) })), Y(t, X({
3460
3460
  kind: "email",
3461
3461
  label: t.label ?? "",
3462
3462
  required: n,
@@ -3466,12 +3466,12 @@ function po(e) {
3466
3466
  format: "email",
3467
3467
  inputType: "email"
3468
3468
  },
3469
- zod: G(r, n)
3469
+ zod: K(r, n)
3470
3470
  }, t.multiple ?? !1));
3471
3471
  }
3472
- function mo(e) {
3473
- let t = K(e), n = t.required ?? !1, r = F().regex(To, { message: H("pattern", { messageKey: "core.presets.tel" }) }), i = n ? r.min(1, { message: H("min_length", { min: 1 }) }) : r;
3474
- return J(t, Y({
3472
+ function po(e) {
3473
+ let t = q(e), n = t.required ?? !1, r = F().regex(wo, { message: H("pattern", { messageKey: "core.presets.tel" }) }), i = n ? r.min(1, { message: H("min_length", { min: 1 }) }) : r;
3474
+ return Y(t, X({
3475
3475
  kind: "tel",
3476
3476
  label: t.label ?? "",
3477
3477
  required: n,
@@ -3481,12 +3481,12 @@ function mo(e) {
3481
3481
  format: "tel",
3482
3482
  inputType: "tel"
3483
3483
  },
3484
- zod: G(i, n)
3484
+ zod: K(i, n)
3485
3485
  }, t.multiple ?? !1));
3486
3486
  }
3487
- function ho(e) {
3488
- let t = K(e), n = t.required ?? !1, r = n ? F().min(1, { message: H("min_length", { min: 1 }) }) : F();
3489
- return J(t, {
3487
+ function mo(e) {
3488
+ let t = q(e), n = t.required ?? !1, r = n ? F().min(1, { message: H("min_length", { min: 1 }) }) : F();
3489
+ return Y(t, {
3490
3490
  kind: "password",
3491
3491
  label: t.label ?? "",
3492
3492
  required: n,
@@ -3496,90 +3496,90 @@ function ho(e) {
3496
3496
  format: "password",
3497
3497
  inputType: "password"
3498
3498
  },
3499
- zod: G(r, n)
3499
+ zod: K(r, n)
3500
3500
  });
3501
3501
  }
3502
- function go(e) {
3503
- return q({
3502
+ function ho(e) {
3503
+ return J({
3504
3504
  key: e.key,
3505
3505
  label: e.label ?? e.key,
3506
3506
  multiple: !0,
3507
3507
  rules: { unique: ["name"] },
3508
3508
  view: { kind: "internalApiToken" },
3509
3509
  fields: [
3510
- X({ key: "name" }),
3511
- ho({ key: "token" }),
3512
- X({ key: "createdAt" }),
3513
- X({ key: "lastUsedAt" })
3510
+ Z({ key: "name" }),
3511
+ mo({ key: "token" }),
3512
+ Z({ key: "createdAt" }),
3513
+ Z({ key: "lastUsedAt" })
3514
3514
  ]
3515
3515
  });
3516
3516
  }
3517
- function _o(e) {
3518
- return q({
3517
+ function go(e) {
3518
+ return J({
3519
3519
  key: e.key,
3520
3520
  label: e.label ?? e.key,
3521
3521
  multiple: !0,
3522
3522
  view: { kind: "internalOauthGrants" },
3523
3523
  fields: [
3524
- X({ key: "clientName" }),
3525
- X({ key: "createdAt" }),
3526
- X({ key: "lastUsedAt" })
3524
+ Z({ key: "clientName" }),
3525
+ Z({ key: "createdAt" }),
3526
+ Z({ key: "lastUsedAt" })
3527
3527
  ]
3528
3528
  });
3529
3529
  }
3530
- var vo = /^[a-z0-9-]+$/;
3531
- function yo(e) {
3532
- let t = K(e), n = t.required ?? !1, r = F().regex(vo, { message: H("pattern", { messageKey: "core.presets.slug" }) });
3533
- return J(t, Y({
3530
+ var _o = /^[a-z0-9-]+$/;
3531
+ function vo(e) {
3532
+ let t = q(e), n = t.required ?? !1, r = F().regex(_o, { message: H("pattern", { messageKey: "core.presets.slug" }) });
3533
+ return Y(t, X({
3534
3534
  kind: "slug",
3535
3535
  label: t.label ?? "",
3536
3536
  required: n,
3537
3537
  prim: "text",
3538
3538
  column: "text",
3539
3539
  hints: {},
3540
- zod: G(r, n)
3540
+ zod: K(r, n)
3541
3541
  }, t.multiple ?? !1));
3542
3542
  }
3543
- var bo = /^#[0-9a-fA-F]{6}$/;
3544
- function xo(e) {
3545
- let t = K(e), n = t.required ?? !1, r = F().regex(bo, { message: H("color_format") });
3546
- return J(t, Y({
3543
+ var yo = /^#[0-9a-fA-F]{6}$/;
3544
+ function bo(e) {
3545
+ let t = q(e), n = t.required ?? !1, r = F().regex(yo, { message: H("color_format") });
3546
+ return Y(t, X({
3547
3547
  kind: "color",
3548
3548
  label: t.label ?? "",
3549
3549
  required: n,
3550
3550
  prim: "text",
3551
3551
  column: "text",
3552
3552
  hints: {},
3553
- zod: G(r, n)
3553
+ zod: K(r, n)
3554
3554
  }, t.multiple ?? !1));
3555
3555
  }
3556
- function So(e) {
3557
- let t = K(e), n = t.required ?? !1, r = (n ? F().min(1, { message: H("min_length", { min: 1 }) }) : F()).refine((e) => Do.has(e.toLowerCase()), { message: H("colorname") });
3558
- return J(t, Y({
3556
+ function xo(e) {
3557
+ let t = q(e), n = t.required ?? !1, r = (n ? F().min(1, { message: H("min_length", { min: 1 }) }) : F()).refine((e) => Eo.has(e.toLowerCase()), { message: H("colorname") });
3558
+ return Y(t, X({
3559
3559
  kind: "colorname",
3560
3560
  label: t.label ?? "",
3561
3561
  required: n,
3562
3562
  prim: "text",
3563
3563
  column: "text",
3564
3564
  hints: {},
3565
- zod: G(r, n)
3565
+ zod: K(r, n)
3566
3566
  }, t.multiple ?? !1));
3567
3567
  }
3568
- function Co(e) {
3569
- let t = K(e), n = t.required ?? !1, r = n ? F().min(1, { message: H("min_length", { min: 1 }) }) : F();
3570
- return J(t, Y({
3568
+ function So(e) {
3569
+ let t = q(e), n = t.required ?? !1, r = n ? F().min(1, { message: H("min_length", { min: 1 }) }) : F();
3570
+ return Y(t, X({
3571
3571
  kind: "title",
3572
3572
  label: t.label ?? "",
3573
3573
  required: n,
3574
3574
  prim: "text",
3575
3575
  column: "text",
3576
3576
  hints: {},
3577
- zod: G(r, n)
3577
+ zod: K(r, n)
3578
3578
  }, t.multiple ?? !1));
3579
3579
  }
3580
- function wo(e) {
3581
- let t = K(e), n = t.required ?? !1, r = F().regex(Eo, { message: H("pattern", { messageKey: "core.presets.link" }) }), i = n ? r.min(1, { message: H("min_length", { min: 1 }) }) : r;
3582
- return J(t, Y({
3580
+ function Co(e) {
3581
+ let t = q(e), n = t.required ?? !1, r = F().regex(To, { message: H("pattern", { messageKey: "core.presets.link" }) }), i = n ? r.min(1, { message: H("min_length", { min: 1 }) }) : r;
3582
+ return Y(t, X({
3583
3583
  kind: "link",
3584
3584
  label: t.label ?? "",
3585
3585
  required: n,
@@ -3589,13 +3589,13 @@ function wo(e) {
3589
3589
  format: "url",
3590
3590
  inputType: "url"
3591
3591
  },
3592
- zod: G(i, n)
3592
+ zod: K(i, n)
3593
3593
  }, t.multiple ?? !1));
3594
3594
  }
3595
- var To = /^\+?[\d\s()-]{4,}$/, Eo = /^([a-z][a-z0-9+.-]*:\/\/\S+|[\w-]+(\.[\w-]+)+(:\d+)?(\/\S*)?)$/i, Do = /* @__PURE__ */ new Set(/* @__PURE__ */ "aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkgrey.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkslategrey.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dimgrey.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.green.greenyellow.grey.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightgrey.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightslategrey.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.slategrey.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen.transparent".split("."));
3596
- function Oo(e) {
3597
- let t = K(e), n = t.required ?? !1, r = F().min(1, { message: H("min_length", { min: 1 }) }), i = Array.isArray(e.options) ? e.options : [], a = typeof e.options == "string" ? e.options : null;
3598
- return J(t, Y({
3595
+ var wo = /^\+?[\d\s()-]{4,}$/, To = /^([a-z][a-z0-9+.-]*:\/\/\S+|[\w-]+(\.[\w-]+)+(:\d+)?(\/\S*)?)$/i, Eo = /* @__PURE__ */ new Set(/* @__PURE__ */ "aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkgrey.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkslategrey.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dimgrey.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.green.greenyellow.grey.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightgrey.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightslategrey.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.slategrey.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen.transparent".split("."));
3596
+ function Do(e) {
3597
+ let t = q(e), n = t.required ?? !1, r = F().min(1, { message: H("min_length", { min: 1 }) }), i = Array.isArray(e.options) ? e.options : [], a = typeof e.options == "string" ? e.options : null;
3598
+ return Y(t, X({
3599
3599
  kind: "tag",
3600
3600
  label: t.label ?? "",
3601
3601
  required: n,
@@ -3605,18 +3605,18 @@ function Oo(e) {
3605
3605
  suggestions: i,
3606
3606
  ...a ? { source: a } : {}
3607
3607
  },
3608
- zod: G(r, n)
3608
+ zod: K(r, n)
3609
3609
  }, t.multiple ?? !1));
3610
3610
  }
3611
- function ko(e) {
3612
- return Oo({
3611
+ function Oo(e) {
3612
+ return Do({
3613
3613
  ...e,
3614
3614
  multiple: !0
3615
3615
  });
3616
3616
  }
3617
- function Ao(e) {
3618
- return J(K(e), {
3619
- ...Z({
3617
+ function ko(e) {
3618
+ return Y(q(e), {
3619
+ ...Q({
3620
3620
  label: e.label,
3621
3621
  rules: e.rules,
3622
3622
  view: e.view
@@ -3625,13 +3625,13 @@ function Ao(e) {
3625
3625
  kind: "markdown"
3626
3626
  });
3627
3627
  }
3628
- function jo(e) {
3629
- let t = e.rules?.language, n = K(e), r = Z({
3628
+ function Ao(e) {
3629
+ let t = e.rules?.language, n = q(e), r = Q({
3630
3630
  label: e.label,
3631
3631
  rules: e.rules,
3632
3632
  view: e.view
3633
3633
  });
3634
- return J(n, {
3634
+ return Y(n, {
3635
3635
  ...r,
3636
3636
  prim: "text",
3637
3637
  kind: "snippet",
@@ -3641,12 +3641,12 @@ function jo(e) {
3641
3641
  }
3642
3642
  });
3643
3643
  }
3644
- function Mo(e) {
3644
+ function jo(e) {
3645
3645
  return e.includes("\0") || e.includes("�");
3646
3646
  }
3647
- function No(e) {
3648
- let t = K(e), n = t.required ?? !1, r = t.ext ?? "txt", i = t.maxBytes ?? 262144, a = F(uo()).superRefine((e, t) => {
3649
- if (Mo(e)) {
3647
+ function Mo(e) {
3648
+ let t = q(e), n = t.required ?? !1, r = t.ext ?? "txt", i = t.maxBytes ?? 262144, a = F(lo()).superRefine((e, t) => {
3649
+ if (jo(e)) {
3650
3650
  t.addIssue({
3651
3651
  code: B.custom,
3652
3652
  message: H("source_binary")
@@ -3658,7 +3658,7 @@ function No(e) {
3658
3658
  message: H("source_too_large", { maxBytes: i })
3659
3659
  });
3660
3660
  });
3661
- return J(t, {
3661
+ return Y(t, {
3662
3662
  kind: "source",
3663
3663
  label: t.label ?? "",
3664
3664
  required: n,
@@ -3669,24 +3669,24 @@ function No(e) {
3669
3669
  maxBytes: i,
3670
3670
  noEditControl: !0
3671
3671
  },
3672
- zod: G(a, n)
3672
+ zod: K(a, n)
3673
3673
  });
3674
3674
  }
3675
- function Po(e) {
3676
- let t = K(e), n = t.required ?? !1, r = e.rules?.max ?? 5, i = V(lo()).int({ message: H("int") }).min(1, { message: H("min", { min: 1 }) }).max(r, { message: H("max", { max: r }) });
3677
- return J(t, Y({
3675
+ function No(e) {
3676
+ let t = q(e), n = t.required ?? !1, r = e.rules?.max ?? 5, i = V(W()).int({ message: H("int") }).min(1, { message: H("min", { min: 1 }) }).max(r, { message: H("max", { max: r }) });
3677
+ return Y(t, X({
3678
3678
  kind: "rating",
3679
3679
  label: t.label ?? "",
3680
3680
  required: n,
3681
3681
  prim: "number",
3682
3682
  column: "integer",
3683
3683
  hints: { max: r },
3684
- zod: G(i, n)
3684
+ zod: K(i, n)
3685
3685
  }, t.multiple ?? !1));
3686
3686
  }
3687
- function Fo(e) {
3688
- let t = K(e), n = t.required ?? !1, r = e.rules?.max ?? 604800, i = e.rules?.step ?? 60, a = V(lo()).int({ message: H("int") }).min(0, { message: H("min", { min: 0 }) }).max(r, { message: H("max", { max: r }) });
3689
- return J(t, Y({
3687
+ function Po(e) {
3688
+ let t = q(e), n = t.required ?? !1, r = e.rules?.max ?? 604800, i = e.rules?.step ?? 60, a = V(W()).int({ message: H("int") }).min(0, { message: H("min", { min: 0 }) }).max(r, { message: H("max", { max: r }) });
3689
+ return Y(t, X({
3690
3690
  kind: "duration",
3691
3691
  label: t.label ?? "",
3692
3692
  required: n,
@@ -3696,16 +3696,16 @@ function Fo(e) {
3696
3696
  step: i,
3697
3697
  max: r
3698
3698
  },
3699
- zod: G(a, n)
3699
+ zod: K(a, n)
3700
3700
  }, t.multiple ?? !1));
3701
3701
  }
3702
- function Io(e) {
3703
- let t = K(e), n = bs({
3702
+ function Fo(e) {
3703
+ let t = q(e), n = ys({
3704
3704
  label: e.label,
3705
3705
  rules: e.rules,
3706
3706
  view: e.view
3707
3707
  });
3708
- return J(t, {
3708
+ return Y(t, {
3709
3709
  ...n,
3710
3710
  kind: "reminder",
3711
3711
  hints: {
@@ -3715,9 +3715,9 @@ function Io(e) {
3715
3715
  }
3716
3716
  });
3717
3717
  }
3718
- var Lo = vs, Ro = ys;
3719
- function zo(e) {
3720
- return Lo({
3718
+ var Io = _s, Lo = vs;
3719
+ function Ro(e) {
3720
+ return Io({
3721
3721
  ...e,
3722
3722
  rules: {
3723
3723
  min: 0,
@@ -3726,8 +3726,8 @@ function zo(e) {
3726
3726
  }
3727
3727
  });
3728
3728
  }
3729
- function Bo(e) {
3730
- return Ro({
3729
+ function zo(e) {
3730
+ return Lo({
3731
3731
  ...e,
3732
3732
  rules: {
3733
3733
  min: 1900,
@@ -3736,8 +3736,8 @@ function Bo(e) {
3736
3736
  }
3737
3737
  });
3738
3738
  }
3739
- function Vo(e) {
3740
- let t = K(e), n = ys({
3739
+ function Bo(e) {
3740
+ let t = q(e), n = vs({
3741
3741
  label: e.label,
3742
3742
  rules: {
3743
3743
  min: 1,
@@ -3745,7 +3745,7 @@ function Vo(e) {
3745
3745
  },
3746
3746
  view: e.view
3747
3747
  });
3748
- return J(t, {
3748
+ return Y(t, {
3749
3749
  ...n,
3750
3750
  kind: "weight",
3751
3751
  hints: {
@@ -3754,13 +3754,13 @@ function Vo(e) {
3754
3754
  }
3755
3755
  });
3756
3756
  }
3757
- function Ho(e) {
3758
- let t = K(e), n = t.required ?? !1, r = fo(z({
3757
+ function Vo(e) {
3758
+ let t = q(e), n = t.required ?? !1, r = uo(z({
3759
3759
  w: L().int().nonnegative(),
3760
3760
  h: L().int().nonnegative(),
3761
3761
  d: L().int().nonnegative()
3762
3762
  }), "json");
3763
- return J(t, {
3763
+ return Y(t, {
3764
3764
  kind: "dimensions",
3765
3765
  label: t.label ?? "",
3766
3766
  required: n,
@@ -3772,40 +3772,40 @@ function Ho(e) {
3772
3772
  h: "integer",
3773
3773
  d: "integer"
3774
3774
  },
3775
- zod: G(r, n)
3775
+ zod: K(r, n)
3776
3776
  });
3777
3777
  }
3778
- function Uo(e) {
3779
- return Es({
3778
+ function Ho(e) {
3779
+ return Ts({
3780
3780
  ...e,
3781
3781
  options: "countries"
3782
3782
  });
3783
3783
  }
3784
- var Wo = {
3785
- email: po,
3786
- tel: mo,
3787
- slug: yo,
3788
- color: xo,
3789
- colorname: So,
3790
- title: Co,
3791
- password: ho,
3792
- link: wo,
3793
- tag: Oo,
3794
- tags: ko,
3795
- markdown: Ao,
3796
- snippet: jo,
3797
- source: No,
3798
- rating: Po,
3799
- duration: Fo,
3800
- reminder: Io,
3801
- percent: zo,
3802
- year: Bo,
3803
- weight: Vo,
3804
- dimensions: Ho,
3805
- country: Uo,
3806
- internalApiToken: go,
3807
- internalOauthGrants: _o
3808
- }, Go = /* @__PURE__ */ t(((e, t) => {
3784
+ var Uo = {
3785
+ email: fo,
3786
+ tel: po,
3787
+ slug: vo,
3788
+ color: bo,
3789
+ colorname: xo,
3790
+ title: So,
3791
+ password: mo,
3792
+ link: Co,
3793
+ tag: Do,
3794
+ tags: Oo,
3795
+ markdown: ko,
3796
+ snippet: Ao,
3797
+ source: Mo,
3798
+ rating: No,
3799
+ duration: Po,
3800
+ reminder: Fo,
3801
+ percent: Ro,
3802
+ year: zo,
3803
+ weight: Bo,
3804
+ dimensions: Vo,
3805
+ country: Ho,
3806
+ internalApiToken: ho,
3807
+ internalOauthGrants: go
3808
+ }, Wo = /* @__PURE__ */ t(((e, t) => {
3809
3809
  t.exports = {
3810
3810
  aa: {
3811
3811
  name: "Afar",
@@ -4540,8 +4540,8 @@ var Wo = {
4540
4540
  nativeName: "isiZulu"
4541
4541
  }
4542
4542
  };
4543
- })), Ko = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
4544
- var n = Go(), r = {}, i = {}, a = [], o = [], s = [];
4543
+ })), Go = /* @__PURE__ */ e((/* @__PURE__ */ t(((e, t) => {
4544
+ var n = Wo(), r = {}, i = {}, a = [], o = [], s = [];
4545
4545
  for (let e in n) {
4546
4546
  let { name: t, nativeName: c } = n[e];
4547
4547
  r[e] = i[t.toLowerCase()] = i[c.toLowerCase()] = {
@@ -4581,14 +4581,14 @@ var Wo = {
4581
4581
  }
4582
4582
  };
4583
4583
  })))(), 1);
4584
- Ko.default.getAllCodes().map((e) => ({
4584
+ Go.default.getAllCodes().map((e) => ({
4585
4585
  code: e,
4586
- name: Ko.default.getNativeName(e)
4586
+ name: Go.default.getNativeName(e)
4587
4587
  })).sort((e, t) => e.name.localeCompare(t.name));
4588
4588
  //#endregion
4589
4589
  //#region ../sdk/src/fields.ts
4590
- var qo = (e) => "key" in e && !("el" in e), Jo = (e) => "el" in e && e.el === "static", Yo = (e) => "el" in e && e.el === "group", Xo = (e) => "el" in e && e.el === "divider", Zo = (e) => "el" in e && e.el === "info", Qo = (e) => "el" in e && e.el === "button";
4591
- function q(e) {
4590
+ var Ko = (e) => "key" in e && !("el" in e), qo = (e) => "el" in e && e.el === "static", Jo = (e) => "el" in e && e.el === "group", Yo = (e) => "el" in e && e.el === "divider", Xo = (e) => "el" in e && e.el === "info", Zo = (e) => "el" in e && e.el === "button";
4591
+ function J(e) {
4592
4592
  let t = e.rules ?? {}, n = e.view ?? {};
4593
4593
  if (e.key) {
4594
4594
  if (!e.label) throw Error(`[field.group] storage group '${e.key}' requires a label`);
@@ -4609,16 +4609,16 @@ function q(e) {
4609
4609
  fields: e.fields
4610
4610
  };
4611
4611
  }
4612
- function $o(e) {
4613
- return q({
4612
+ function Qo(e) {
4613
+ return J({
4614
4614
  label: e.label,
4615
4615
  icon: e.icon,
4616
4616
  fields: e.fields,
4617
4617
  view: { display: "scroll" }
4618
4618
  });
4619
4619
  }
4620
- function es(e) {
4621
- return q({
4620
+ function $o(e) {
4621
+ return J({
4622
4622
  key: e.key,
4623
4623
  label: e.label,
4624
4624
  icon: e.icon,
@@ -4629,39 +4629,39 @@ function es(e) {
4629
4629
  view: { display: "table" }
4630
4630
  });
4631
4631
  }
4632
- function ts(e) {
4632
+ function es(e) {
4633
4633
  let t = [];
4634
4634
  return e.fields.forEach((e, n) => {
4635
- n > 0 && t.push(ss()), t.push(...e);
4636
- }), q({
4635
+ n > 0 && t.push(os()), t.push(...e);
4636
+ }), J({
4637
4637
  label: e.label,
4638
4638
  icon: e.icon,
4639
4639
  fields: t,
4640
4640
  view: { display: "sheet" }
4641
4641
  });
4642
4642
  }
4643
- function ns(e) {
4644
- return q({
4643
+ function ts(e) {
4644
+ return J({
4645
4645
  key: e.key,
4646
4646
  label: e.label ?? e.key,
4647
4647
  required: e.required,
4648
4648
  view: { kind: "url" },
4649
4649
  fields: [
4650
- X({ key: "scheme" }),
4651
- X({ key: "username" }),
4652
- X({ key: "password" }),
4653
- X({ key: "host" }),
4654
- ys({ key: "port" }),
4655
- X({ key: "path" }),
4656
- X({ key: "query" }),
4657
- X({ key: "hash" })
4650
+ Z({ key: "scheme" }),
4651
+ Z({ key: "username" }),
4652
+ Z({ key: "password" }),
4653
+ Z({ key: "host" }),
4654
+ vs({ key: "port" }),
4655
+ Z({ key: "path" }),
4656
+ Z({ key: "query" }),
4657
+ Z({ key: "hash" })
4658
4658
  ]
4659
4659
  });
4660
4660
  }
4661
- function rs(e) {
4661
+ function ns(e) {
4662
4662
  if (e.fixed && e.by.type.prim !== "select") throw Error(`[field.keyed] fixed requires by=select (enumerated), got '${e.by.type.prim}'`);
4663
4663
  return {
4664
- ...(e.container ?? q)({
4664
+ ...(e.container ?? J)({
4665
4665
  label: e.label,
4666
4666
  icon: e.icon,
4667
4667
  fields: [e.by, ...e.fields]
@@ -4673,20 +4673,20 @@ function rs(e) {
4673
4673
  fixed: e.fixed
4674
4674
  };
4675
4675
  }
4676
- var is = (e) => e.key != null && e.multiple === !0, as = (e) => e.key != null && e.multiple !== !0;
4677
- function os() {
4676
+ var rs = (e) => e.key != null && e.multiple === !0, is = (e) => e.key != null && e.multiple !== !0;
4677
+ function as() {
4678
4678
  return { el: "divider" };
4679
4679
  }
4680
- function ss() {
4680
+ function os() {
4681
4681
  return { el: "break" };
4682
4682
  }
4683
- function cs(e) {
4683
+ function ss(e) {
4684
4684
  return {
4685
4685
  el: "info",
4686
4686
  text: e
4687
4687
  };
4688
4688
  }
4689
- function ls(e) {
4689
+ function cs(e) {
4690
4690
  return {
4691
4691
  el: "button",
4692
4692
  label: e.label,
@@ -4695,7 +4695,7 @@ function ls(e) {
4695
4695
  variant: e.variant
4696
4696
  };
4697
4697
  }
4698
- function J(e, t) {
4698
+ function Y(e, t) {
4699
4699
  let n = t;
4700
4700
  return e.noEditControl && (n = {
4701
4701
  ...n,
@@ -4727,6 +4727,14 @@ function J(e, t) {
4727
4727
  }), e.hidden !== void 0 && (n = {
4728
4728
  ...n,
4729
4729
  hidden: e.hidden
4730
+ }), e.derive && (n = {
4731
+ ...n,
4732
+ derive: e.derive,
4733
+ derived: !0,
4734
+ hints: {
4735
+ ...n.hints,
4736
+ noEditControl: !0
4737
+ }
4730
4738
  }), e.key ? {
4731
4739
  key: e.key,
4732
4740
  type: n
@@ -4736,17 +4744,17 @@ function J(e, t) {
4736
4744
  value: e.value
4737
4745
  } : n;
4738
4746
  }
4739
- function us(e) {
4747
+ function ls(e) {
4740
4748
  return e === "today" ? (/* @__PURE__ */ new Date()).toISOString().slice(0, 10) : e;
4741
4749
  }
4742
- function ds(e) {
4750
+ function us(e) {
4743
4751
  try {
4744
4752
  return JSON.parse(e);
4745
4753
  } catch {
4746
4754
  return;
4747
4755
  }
4748
4756
  }
4749
- function fs(e) {
4757
+ function ds(e) {
4750
4758
  return R().superRefine((t, n) => {
4751
4759
  let r;
4752
4760
  if (Array.isArray(t)) r = t;
@@ -4782,9 +4790,9 @@ function fs(e) {
4782
4790
  }
4783
4791
  });
4784
4792
  }
4785
- function Y(e, t) {
4793
+ function X(e, t) {
4786
4794
  if (!t) return e;
4787
- let n = fs(e.zod);
4795
+ let n = ds(e.zod);
4788
4796
  return {
4789
4797
  ...e,
4790
4798
  column: "text",
@@ -4793,12 +4801,12 @@ function Y(e, t) {
4793
4801
  multiple: !0
4794
4802
  },
4795
4803
  json: !0,
4796
- zod: G(n, e.required)
4804
+ zod: K(n, e.required)
4797
4805
  };
4798
4806
  }
4799
- function X(e) {
4800
- let t = K(e), n = t.required ?? !1, r = t.config ?? {}, i = r.min ?? +(t.required === !0), a = F(uo());
4801
- return i > 0 && (a = a.min(i, { message: H("min_length", { min: i }) })), r.max != null && (a = a.max(r.max, { message: H("max_length", { max: r.max }) })), r.pattern && (a = a.regex(new RegExp(r.pattern), { message: H("pattern", r.messageKey ? { messageKey: r.messageKey } : void 0) })), J(t, Y({
4807
+ function Z(e) {
4808
+ let t = q(e), n = t.required ?? !1, r = t.config ?? {}, i = r.min ?? +(t.required === !0), a = F(lo());
4809
+ return i > 0 && (a = a.min(i, { message: H("min_length", { min: i }) })), r.max != null && (a = a.max(r.max, { message: H("max_length", { max: r.max }) })), r.pattern && (a = a.regex(new RegExp(r.pattern), { message: H("pattern", r.messageKey ? { messageKey: r.messageKey } : void 0) })), Y(t, X({
4802
4810
  kind: "text",
4803
4811
  label: t.label ?? "",
4804
4812
  required: n,
@@ -4808,32 +4816,32 @@ function X(e) {
4808
4816
  minLength: r.min,
4809
4817
  maxLength: r.max
4810
4818
  },
4811
- zod: G(a, n)
4819
+ zod: K(a, n)
4812
4820
  }, t.multiple ?? !1));
4813
4821
  }
4814
- function ps(e, t, n) {
4815
- let r = e.required ?? !1, i = F(uo());
4816
- return e.required === !0 && (i = i.min(1, { message: H("min_length", { min: 1 }) })), J(e, {
4822
+ function fs(e, t, n) {
4823
+ let r = e.required ?? !1, i = F(lo());
4824
+ return e.required === !0 && (i = i.min(1, { message: H("min_length", { min: 1 }) })), Y(e, {
4817
4825
  kind: t,
4818
4826
  label: e.label ?? "",
4819
4827
  required: r,
4820
4828
  prim: "text",
4821
4829
  column: "text",
4822
4830
  hints: n && n.length ? { exts: n } : {},
4823
- zod: G(i, r),
4831
+ zod: K(i, r),
4824
4832
  ...e.default === void 0 ? {} : { default: e.default }
4825
4833
  });
4826
4834
  }
4827
- function ms(e) {
4828
- return ps(K(e), "localDir");
4835
+ function ps(e) {
4836
+ return fs(q(e), "localDir");
4829
4837
  }
4830
- function hs(e) {
4831
- let t = K(e);
4832
- return ps(t, "localFile", t.exts);
4838
+ function ms(e) {
4839
+ let t = q(e);
4840
+ return fs(t, "localFile", t.exts);
4833
4841
  }
4834
- function Z(e) {
4835
- return J(K(e), {
4836
- ...X({
4842
+ function Q(e) {
4843
+ return Y(q(e), {
4844
+ ...Z({
4837
4845
  ...e,
4838
4846
  key: void 0,
4839
4847
  value: void 0
@@ -4842,9 +4850,9 @@ function Z(e) {
4842
4850
  kind: "textarea"
4843
4851
  });
4844
4852
  }
4845
- function gs(e) {
4846
- return J(K(e), {
4847
- ...Z({
4853
+ function hs(e) {
4854
+ return Y(q(e), {
4855
+ ...Q({
4848
4856
  ...e,
4849
4857
  key: void 0,
4850
4858
  value: void 0
@@ -4852,9 +4860,9 @@ function gs(e) {
4852
4860
  kind: "i18n"
4853
4861
  });
4854
4862
  }
4855
- function _s(e) {
4856
- return J(K(e), {
4857
- ...Z({
4863
+ function gs(e) {
4864
+ return Y(q(e), {
4865
+ ...Q({
4858
4866
  ...e,
4859
4867
  key: void 0,
4860
4868
  value: void 0
@@ -4862,9 +4870,9 @@ function _s(e) {
4862
4870
  kind: "smalltext"
4863
4871
  });
4864
4872
  }
4865
- function vs(e) {
4866
- let t = K(e), n = t.required ?? !1, r = t.config ?? {}, i = V(lo());
4867
- return r.min != null && (i = i.min(r.min, { message: H("min", { min: r.min }) })), r.max != null && (i = i.max(r.max, { message: H("max", { max: r.max }) })), J(t, Y({
4873
+ function _s(e) {
4874
+ let t = q(e), n = t.required ?? !1, r = t.config ?? {}, i = V(W());
4875
+ return r.min != null && (i = i.min(r.min, { message: H("min", { min: r.min }) })), r.max != null && (i = i.max(r.max, { message: H("max", { max: r.max }) })), Y(t, X({
4868
4876
  kind: "number",
4869
4877
  label: t.label ?? "",
4870
4878
  required: n,
@@ -4875,12 +4883,12 @@ function vs(e) {
4875
4883
  max: r.max,
4876
4884
  step: r.step ?? "any"
4877
4885
  },
4878
- zod: G(i, n)
4886
+ zod: K(i, n)
4879
4887
  }, t.multiple ?? !1));
4880
4888
  }
4881
- function ys(e) {
4882
- let t = K(e), n = t.required ?? !1, r = t.config ?? {}, i = V(lo()).int({ message: H("int") });
4883
- return r.min != null && (i = i.min(r.min, { message: H("min", { min: r.min }) })), r.max != null && (i = i.max(r.max, { message: H("max", { max: r.max }) })), J(t, Y({
4889
+ function vs(e) {
4890
+ let t = q(e), n = t.required ?? !1, r = t.config ?? {}, i = V(W()).int({ message: H("int") });
4891
+ return r.min != null && (i = i.min(r.min, { message: H("min", { min: r.min }) })), r.max != null && (i = i.max(r.max, { message: H("max", { max: r.max }) })), Y(t, X({
4884
4892
  kind: "number",
4885
4893
  label: t.label ?? "",
4886
4894
  required: n,
@@ -4891,11 +4899,11 @@ function ys(e) {
4891
4899
  max: r.max,
4892
4900
  step: r.step ?? 1
4893
4901
  },
4894
- zod: G(i, n)
4902
+ zod: K(i, n)
4895
4903
  }, t.multiple ?? !1));
4896
4904
  }
4897
- function bs(e) {
4898
- let t = K(e), n = t.required ?? !1, r = t.config?.granularity ?? "day", i;
4905
+ function ys(e) {
4906
+ let t = q(e), n = t.required ?? !1, r = t.config?.granularity ?? "day", i;
4899
4907
  return i = r === "year" ? F(U()).regex(/^\d{4}$/, { message: H("date_format") }).superRefine((e, n) => {
4900
4908
  t.min && e < t.min && n.addIssue({
4901
4909
  code: B.custom,
@@ -4913,14 +4921,14 @@ function bs(e) {
4913
4921
  message: H("date_max", { max: t.max })
4914
4922
  });
4915
4923
  }) : F(U()).regex(/^\d{4}-\d{2}-\d{2}$/, { message: H("date_format") }).superRefine((e, n) => {
4916
- t.min && e < us(t.min) && n.addIssue({
4924
+ t.min && e < ls(t.min) && n.addIssue({
4917
4925
  code: B.custom,
4918
- message: H("date_min", { min: us(t.min) })
4919
- }), t.max && e > us(t.max) && n.addIssue({
4926
+ message: H("date_min", { min: ls(t.min) })
4927
+ }), t.max && e > ls(t.max) && n.addIssue({
4920
4928
  code: B.custom,
4921
- message: H("date_max", { max: us(t.max) })
4929
+ message: H("date_max", { max: ls(t.max) })
4922
4930
  });
4923
- }), J(t, Y({
4931
+ }), Y(t, X({
4924
4932
  kind: "date",
4925
4933
  label: t.label ?? "",
4926
4934
  required: n,
@@ -4931,44 +4939,44 @@ function bs(e) {
4931
4939
  max: t.max,
4932
4940
  granularity: r
4933
4941
  },
4934
- zod: G(i, n)
4942
+ zod: K(i, n)
4935
4943
  }, t.multiple ?? !1));
4936
4944
  }
4937
- function xs(e) {
4938
- let t = K(e), n = t.required ?? !1, r = t.config?.granularity ?? "second", i = F(U()).regex({
4945
+ function bs(e) {
4946
+ let t = q(e), n = t.required ?? !1, r = t.config?.granularity ?? "second", i = F(U()).regex({
4939
4947
  hour: /^([01]\d|2[0-3])$/,
4940
4948
  minute: /^([01]\d|2[0-3]):[0-5]\d$/,
4941
4949
  second: /^([01]\d|2[0-3]):[0-5]\d:[0-5]\d$/
4942
4950
  }[r], { message: H("time_format") });
4943
- return J(t, Y({
4951
+ return Y(t, X({
4944
4952
  kind: "time",
4945
4953
  label: t.label ?? "",
4946
4954
  required: n,
4947
4955
  prim: "time",
4948
4956
  column: "time",
4949
4957
  hints: { granularity: r },
4950
- zod: G(i, n)
4958
+ zod: K(i, n)
4951
4959
  }, t.multiple ?? !1));
4952
4960
  }
4953
- function Ss(e) {
4954
- let t = K(e), n = t.required ?? !1, r = t.config?.granularity ?? "minute", i = F(U()).regex({
4961
+ function xs(e) {
4962
+ let t = q(e), n = t.required ?? !1, r = t.config?.granularity ?? "minute", i = F(U()).regex({
4955
4963
  hour: /^\d{4}-\d{2}-\d{2}T([01]\d|2[0-3])$/,
4956
4964
  minute: /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/,
4957
4965
  second: /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}$/
4958
4966
  }[r], { message: H("datetime_format") });
4959
- return J(t, Y({
4967
+ return Y(t, X({
4960
4968
  kind: "datetime",
4961
4969
  label: t.label ?? "",
4962
4970
  required: n,
4963
4971
  prim: "datetime",
4964
4972
  column: "datetime",
4965
4973
  hints: { granularity: r },
4966
- zod: G(i, n)
4974
+ zod: K(i, n)
4967
4975
  }, t.multiple ?? !1));
4968
4976
  }
4969
- function Cs(e) {
4970
- let t = K(e), n = $a((e) => e === "true" || e === 1 || e === "1" ? !0 : e === "false" || e === 0 || e === "0" ? !1 : e, ma().default(!1).nullable());
4971
- return J(t, {
4977
+ function Ss(e) {
4978
+ let t = q(e), n = $a((e) => e === "true" || e === 1 || e === "1" ? !0 : e === "false" || e === 0 || e === "0" ? !1 : e, ma().default(!1).nullable());
4979
+ return Y(t, {
4972
4980
  kind: "boolean",
4973
4981
  label: t.label ?? "",
4974
4982
  required: !1,
@@ -4978,31 +4986,31 @@ function Cs(e) {
4978
4986
  zod: n
4979
4987
  });
4980
4988
  }
4981
- function ws(e) {
4982
- let t = K(e), n = t.required ?? !1, r = Oa([
4989
+ function Cs(e) {
4990
+ let t = q(e), n = t.required ?? !1, r = Oa([
4983
4991
  "yes",
4984
4992
  "no",
4985
4993
  "unknown"
4986
4994
  ], { error: () => H("enum") });
4987
- return J(t, {
4995
+ return Y(t, {
4988
4996
  kind: "triState",
4989
4997
  label: t.label ?? "",
4990
4998
  required: n,
4991
4999
  prim: "triState",
4992
5000
  column: "text",
4993
5001
  hints: {},
4994
- zod: G(r, n)
5002
+ zod: K(r, n)
4995
5003
  });
4996
5004
  }
4997
- function Ts(e) {
5005
+ function ws(e) {
4998
5006
  return typeof e == "string" ? {
4999
5007
  value: e,
5000
5008
  title: e
5001
5009
  } : e;
5002
5010
  }
5003
- function Es(e) {
5004
- let t = K(e), n = t.required ?? !1, r = typeof t.options == "string" ? t.options : null, i = Array.isArray(t.options) ? t.options.map(Ts) : [], a = i.length > 0 ? Oa(i.map((e) => e.value), { error: () => H("enum") }) : F(U());
5005
- return J(t, Y({
5011
+ function Ts(e) {
5012
+ let t = q(e), n = t.required ?? !1, r = typeof t.options == "string" ? t.options : null, i = Array.isArray(t.options) ? t.options.map(ws) : [], a = i.length > 0 ? Oa(i.map((e) => e.value), { error: () => H("enum") }) : F(U());
5013
+ return Y(t, X({
5006
5014
  kind: "select",
5007
5015
  label: t.label ?? "",
5008
5016
  required: n,
@@ -5010,18 +5018,18 @@ function Es(e) {
5010
5018
  column: "text",
5011
5019
  hints: { source: r },
5012
5020
  options: i,
5013
- zod: G(a, n)
5021
+ zod: K(a, n)
5014
5022
  }, t.multiple ?? !1));
5015
5023
  }
5016
- function Ds(e) {
5017
- let t = K(e), n = t.required ?? !1, r = t.multiple ?? !1, i;
5024
+ function Es(e) {
5025
+ let t = q(e), n = t.required ?? !1, r = t.multiple ?? !1, i;
5018
5026
  return i = r ? R().superRefine((e, t) => {
5019
- let n = W(e);
5027
+ let n = G(e);
5020
5028
  (!Array.isArray(n) || !n.every((e) => Number.isInteger(e) && e > 0)) && t.addIssue({
5021
5029
  code: B.custom,
5022
5030
  message: H("int_list")
5023
5031
  });
5024
- }) : V().int().positive({ message: H("int") }), J(t, {
5032
+ }) : V().int().positive({ message: H("int") }), Y(t, {
5025
5033
  kind: "relation",
5026
5034
  label: t.label ?? "",
5027
5035
  required: n,
@@ -5036,11 +5044,11 @@ function Ds(e) {
5036
5044
  shelf: e.options.shelf
5037
5045
  },
5038
5046
  ...r && { json: !0 },
5039
- zod: G(i, n)
5047
+ zod: K(i, n)
5040
5048
  });
5041
5049
  }
5042
- function Os(e) {
5043
- let t = K(e), n = t.required ?? !1, r = R().superRefine((e, t) => {
5050
+ function Ds(e) {
5051
+ let t = q(e), n = t.required ?? !1, r = R().superRefine((e, t) => {
5044
5052
  if (typeof e == "string") try {
5045
5053
  JSON.parse(e);
5046
5054
  } catch {
@@ -5050,7 +5058,7 @@ function Os(e) {
5050
5058
  });
5051
5059
  }
5052
5060
  });
5053
- return J(t, {
5061
+ return Y(t, {
5054
5062
  kind: "json",
5055
5063
  label: t.label ?? "",
5056
5064
  required: n,
@@ -5058,11 +5066,11 @@ function Os(e) {
5058
5066
  column: "text",
5059
5067
  hints: {},
5060
5068
  json: !0,
5061
- zod: G(r, n)
5069
+ zod: K(r, n)
5062
5070
  });
5063
5071
  }
5064
- function ks(e) {
5065
- let t = K(e), n = t.required ?? !1, r = t.multiple ?? !1, i = t.slots && t.slots.length > 0 ? t.slots : [""], a = t.fields?.length ? t.fields : [X({
5072
+ function Os(e) {
5073
+ let t = q(e), n = t.required ?? !1, r = t.multiple ?? !1, i = t.slots && t.slots.length > 0 ? t.slots : [""], a = t.fields?.length ? t.fields : [Z({
5066
5074
  key: "text",
5067
5075
  label: "core.fields.text"
5068
5076
  })], o = /* @__PURE__ */ new Set();
@@ -5072,13 +5080,13 @@ function ks(e) {
5072
5080
  if (!r && (e.type.virtual || e.type.columns)) throw Error(`[field.check] single content field '${e.key}' must be a scalar stored field`);
5073
5081
  o.add(e.key);
5074
5082
  }
5075
- let s = i.map((e, t) => Cs({
5083
+ let s = i.map((e, t) => Ss({
5076
5084
  key: `check${t}`,
5077
5085
  label: e || "core.fields.check"
5078
5086
  }));
5079
5087
  if (r) {
5080
5088
  let e = [...s, ...a];
5081
- return q({
5089
+ return J({
5082
5090
  key: t.key,
5083
5091
  label: t.label ?? t.key,
5084
5092
  multiple: !0,
@@ -5093,7 +5101,7 @@ function ks(e) {
5093
5101
  c[`check${t}`] = ma(), l[`check${t}`] = "boolean";
5094
5102
  });
5095
5103
  let u = z(c).passthrough(), d = R().superRefine((e, t) => {
5096
- let n = typeof e == "string" ? ds(e) : e;
5104
+ let n = typeof e == "string" ? us(e) : e;
5097
5105
  if (n === void 0) {
5098
5106
  t.addIssue({
5099
5107
  code: B.custom,
@@ -5106,7 +5114,7 @@ function ks(e) {
5106
5114
  message: H("check_structure")
5107
5115
  });
5108
5116
  });
5109
- return J(t, {
5117
+ return Y(t, {
5110
5118
  kind: "check",
5111
5119
  label: t.label ?? "",
5112
5120
  required: n,
@@ -5116,21 +5124,21 @@ function ks(e) {
5116
5124
  slots: i,
5117
5125
  fields: a.map((e) => ({
5118
5126
  key: e.key,
5119
- ...ic(e.type)
5127
+ ...ac(e.type)
5120
5128
  }))
5121
5129
  },
5122
5130
  columns: l,
5123
- zod: G(d, n)
5131
+ zod: K(d, n)
5124
5132
  });
5125
5133
  }
5126
- function As(e) {
5127
- let t = K(e), n = t.required ?? !1, r = t.config ?? {}, i = ao((t.options, t.options)), a = L().finite();
5134
+ function ks(e) {
5135
+ let t = q(e), n = t.required ?? !1, r = t.config ?? {}, i = ao((t.options, t.options)), a = L().finite();
5128
5136
  r.step === 1 && (a = a.int({ message: H("int") })), r.min != null && (a = a.min(r.min)), r.max != null && (a = a.max(r.max));
5129
5137
  let o = z({
5130
5138
  value: a,
5131
5139
  unit: F().refine((e) => i.some((t) => t.value === e), { message: H("measured_unit") })
5132
5140
  }), s = R().superRefine((e, t) => {
5133
- let n = W(e);
5141
+ let n = G(e);
5134
5142
  if (typeof n == "string") {
5135
5143
  t.addIssue({
5136
5144
  code: B.custom,
@@ -5153,7 +5161,7 @@ function As(e) {
5153
5161
  });
5154
5162
  }
5155
5163
  });
5156
- return J(t, {
5164
+ return Y(t, {
5157
5165
  kind: "measured",
5158
5166
  label: t.label ?? "",
5159
5167
  required: n,
@@ -5169,17 +5177,50 @@ function As(e) {
5169
5177
  value: "real",
5170
5178
  unit: "text"
5171
5179
  },
5172
- zod: G(s, n)
5180
+ zod: K(s, n)
5181
+ });
5182
+ }
5183
+ function As(e) {
5184
+ let t = q(e), n = t.required ?? !1, r = ao(t.options), i = F(U()).refine((e) => r.some((t) => t.value === e), { message: H("measured_unit") });
5185
+ return Y(t, {
5186
+ kind: "unit",
5187
+ label: t.label ?? "",
5188
+ required: n,
5189
+ prim: "select",
5190
+ column: "text",
5191
+ hints: { source: typeof t.options == "string" ? t.options : null },
5192
+ options: r.map((e) => ({
5193
+ value: e.value,
5194
+ title: e.label
5195
+ })),
5196
+ zod: K(i, n)
5173
5197
  });
5174
5198
  }
5175
5199
  function js(e) {
5176
- let t = K(e), n = t.required ?? !1, r = t.config ?? {}, i = L().finite();
5200
+ let t = q(e), n = t.required ?? !1, r = t.config ?? {}, i = V(W());
5201
+ return r.min != null && (i = i.min(r.min, { message: H("min", { min: r.min }) })), r.max != null && (i = i.max(r.max, { message: H("max", { max: r.max }) })), Y(t, {
5202
+ kind: "amount",
5203
+ label: t.label ?? "",
5204
+ required: n,
5205
+ prim: "number",
5206
+ column: "real",
5207
+ hints: {
5208
+ unitFrom: t.unitFrom,
5209
+ min: r.min,
5210
+ max: r.max,
5211
+ step: r.step ?? "any"
5212
+ },
5213
+ zod: K(i, n)
5214
+ });
5215
+ }
5216
+ function Ms(e) {
5217
+ let t = q(e), n = t.required ?? !1, r = t.config ?? {}, i = L().finite();
5177
5218
  r.min != null && (i = i.min(r.min)), r.max != null && (i = i.max(r.max));
5178
5219
  let a = z({
5179
5220
  value: i,
5180
5221
  currency: F().refine(co, { message: H("money_currency") })
5181
5222
  }), o = R().superRefine((e, t) => {
5182
- let n = W(e);
5223
+ let n = G(e);
5183
5224
  if (typeof n == "string") {
5184
5225
  t.addIssue({
5185
5226
  code: B.custom,
@@ -5192,7 +5233,7 @@ function js(e) {
5192
5233
  message: H("money_structure")
5193
5234
  });
5194
5235
  });
5195
- return J(t, {
5236
+ return Y(t, {
5196
5237
  kind: "money",
5197
5238
  label: t.label ?? "",
5198
5239
  required: n,
@@ -5207,15 +5248,15 @@ function js(e) {
5207
5248
  value: "real",
5208
5249
  currency: "text"
5209
5250
  },
5210
- zod: G(o, n)
5251
+ zod: K(o, n)
5211
5252
  });
5212
5253
  }
5213
- function Ms(e) {
5214
- let t = K(e), n = t.required ?? !1, r = t.config ?? {}, i = z({
5254
+ function Ns(e) {
5255
+ let t = q(e), n = t.required ?? !1, r = t.config ?? {}, i = z({
5215
5256
  code: F(),
5216
5257
  lang: F()
5217
5258
  }), a = R().superRefine((e, t) => {
5218
- let n = W(e);
5259
+ let n = G(e);
5219
5260
  if (typeof n == "string") {
5220
5261
  t.addIssue({
5221
5262
  code: B.custom,
@@ -5228,7 +5269,7 @@ function Ms(e) {
5228
5269
  message: H("code_structure")
5229
5270
  });
5230
5271
  });
5231
- return J(t, {
5272
+ return Y(t, {
5232
5273
  kind: "code",
5233
5274
  label: t.label ?? "",
5234
5275
  required: n,
@@ -5239,16 +5280,16 @@ function Ms(e) {
5239
5280
  code: "text",
5240
5281
  lang: "text"
5241
5282
  },
5242
- zod: G(a, n)
5283
+ zod: K(a, n)
5243
5284
  });
5244
5285
  }
5245
- function Ns(e) {
5246
- let t = K(e), n = t.required ?? !1, r = z({
5286
+ function Ps(e) {
5287
+ let t = q(e), n = t.required ?? !1, r = z({
5247
5288
  lat: L().min(-90).max(90),
5248
5289
  lng: L().min(-180).max(180),
5249
5290
  label: F().nullish()
5250
5291
  }), i = R().superRefine((e, t) => {
5251
- let i = W(e), a = i;
5292
+ let i = G(e), a = i;
5252
5293
  if (a == null || typeof a == "object" && a.lat == null && a.lng == null) {
5253
5294
  n && t.addIssue({
5254
5295
  code: B.custom,
@@ -5268,7 +5309,7 @@ function Ns(e) {
5268
5309
  message: H("geo_structure")
5269
5310
  });
5270
5311
  });
5271
- return J(t, {
5312
+ return Y(t, {
5272
5313
  kind: "geo",
5273
5314
  label: t.label ?? "",
5274
5315
  required: n,
@@ -5280,21 +5321,21 @@ function Ns(e) {
5280
5321
  lng: "real",
5281
5322
  label: "text"
5282
5323
  },
5283
- zod: G(i, n)
5324
+ zod: K(i, n)
5284
5325
  });
5285
5326
  }
5286
- function Ps(e) {
5327
+ function Fs(e) {
5287
5328
  return {
5288
- ...rs({
5329
+ ...ns({
5289
5330
  key: e.key,
5290
5331
  label: e.label,
5291
- by: Es({
5332
+ by: Ts({
5292
5333
  key: "day",
5293
5334
  label: "core.fields.weekday",
5294
5335
  options: "weekdays"
5295
5336
  }),
5296
5337
  fixed: !0,
5297
- fields: [vs({
5338
+ fields: [_s({
5298
5339
  key: "value",
5299
5340
  label: "core.fields.value",
5300
5341
  rules: e.rules
@@ -5303,9 +5344,9 @@ function Ps(e) {
5303
5344
  kind: "per-weekday"
5304
5345
  };
5305
5346
  }
5306
- function Fs(e) {
5307
- let t = K(e);
5308
- return J(t, {
5347
+ function Is(e) {
5348
+ let t = q(e);
5349
+ return Y(t, {
5309
5350
  kind: "lookup",
5310
5351
  label: t.label ?? "",
5311
5352
  required: !1,
@@ -5320,16 +5361,16 @@ function Fs(e) {
5320
5361
  zod: ga().optional()
5321
5362
  });
5322
5363
  }
5323
- function Is(e) {
5324
- let t = K(e), n = t.config?.granularity ?? "day", r = t.required ?? !1, i = t.multiple ?? !1, a = (e, t) => n === "datetime" ? Ss({
5364
+ function Ls(e) {
5365
+ let t = q(e), n = t.config?.granularity ?? "day", r = t.required ?? !1, i = t.multiple ?? !1, a = (e, t) => n === "datetime" ? xs({
5325
5366
  key: e,
5326
5367
  label: t
5327
- }) : bs({
5368
+ }) : ys({
5328
5369
  key: e,
5329
5370
  label: t,
5330
5371
  rules: { granularity: n === "month" ? "month" : "day" }
5331
5372
  });
5332
- if (i) return q({
5373
+ if (i) return J({
5333
5374
  key: t.key,
5334
5375
  label: t.label ?? t.key,
5335
5376
  multiple: !0,
@@ -5361,12 +5402,12 @@ function Is(e) {
5361
5402
  });
5362
5403
  let d = n === "datetime" ? "datetime" : n === "day" ? "date" : "text", f = [{
5363
5404
  key: "from",
5364
- ...ic(o.type)
5405
+ ...ac(o.type)
5365
5406
  }, {
5366
5407
  key: "until",
5367
- ...ic(s.type)
5408
+ ...ac(s.type)
5368
5409
  }];
5369
- return J(t, {
5410
+ return Y(t, {
5370
5411
  kind: "period",
5371
5412
  label: t.label ?? "",
5372
5413
  required: r,
@@ -5382,32 +5423,32 @@ function Is(e) {
5382
5423
  from: d,
5383
5424
  until: d
5384
5425
  },
5385
- zod: G(u, r)
5426
+ zod: K(u, r)
5386
5427
  });
5387
5428
  }
5388
- var Ls = /* @__PURE__ */ new Set([
5429
+ var Rs = /* @__PURE__ */ new Set([
5389
5430
  "name",
5390
5431
  "mime",
5391
5432
  "size"
5392
- ]), Rs = [
5433
+ ]), zs = [
5393
5434
  "url",
5394
5435
  "src",
5395
5436
  "href",
5396
5437
  "link"
5397
5438
  ];
5398
- function zs(e) {
5439
+ function Bs(e) {
5399
5440
  if (typeof e != "object" || !e || Array.isArray(e)) return "file_structure";
5400
5441
  let t = e;
5401
- if (Rs.some((e) => e in t)) return "file_remote_url";
5442
+ if (zs.some((e) => e in t)) return "file_remote_url";
5402
5443
  let n = t.name;
5403
5444
  if (typeof n != "string" || n === "") return "file_structure";
5404
5445
  if (n.includes("://") || n.startsWith("//")) return "file_remote_url";
5405
5446
  if (/[\\/]/.test(n) || n.includes("..")) return "file_name";
5406
- for (let e of Object.keys(t)) if (!Ls.has(e)) return "file_unknown_key";
5447
+ for (let e of Object.keys(t)) if (!Rs.has(e)) return "file_unknown_key";
5407
5448
  return t.mime !== void 0 && typeof t.mime != "string" || t.size !== void 0 && typeof t.size != "number" ? "file_structure" : null;
5408
5449
  }
5409
- function Q(e, t) {
5410
- let n = K(t), r = n.required ?? !1, i = n.multiple ?? !1, a = R().superRefine((e, t) => {
5450
+ function $(e, t) {
5451
+ let n = q(t), r = n.required ?? !1, i = n.multiple ?? !1, a = R().superRefine((e, t) => {
5411
5452
  if (typeof e == "string") try {
5412
5453
  JSON.parse(e);
5413
5454
  } catch {
@@ -5417,9 +5458,9 @@ function Q(e, t) {
5417
5458
  });
5418
5459
  return;
5419
5460
  }
5420
- let n = W(e), r = Array.isArray(n) ? n : [n];
5461
+ let n = G(e), r = Array.isArray(n) ? n : [n];
5421
5462
  for (let e of r) {
5422
- let n = zs(e);
5463
+ let n = Bs(e);
5423
5464
  if (n) {
5424
5465
  t.addIssue({
5425
5466
  code: B.custom,
@@ -5429,7 +5470,7 @@ function Q(e, t) {
5429
5470
  }
5430
5471
  }
5431
5472
  });
5432
- return J(n, {
5473
+ return Y(n, {
5433
5474
  kind: e,
5434
5475
  label: n.label ?? "",
5435
5476
  required: r,
@@ -5437,46 +5478,46 @@ function Q(e, t) {
5437
5478
  column: "text",
5438
5479
  hints: i ? { multiple: !0 } : {},
5439
5480
  json: !0,
5440
- zod: G(a, r)
5481
+ zod: K(a, r)
5441
5482
  });
5442
5483
  }
5443
- function Bs(e) {
5444
- return Q("file", e);
5445
- }
5446
5484
  function Vs(e) {
5447
- return Q("document", e);
5485
+ return $("file", e);
5448
5486
  }
5449
5487
  function Hs(e) {
5450
- return Q("audio", e);
5488
+ return $("document", e);
5451
5489
  }
5452
5490
  function Us(e) {
5453
- return Q("video", e);
5491
+ return $("audio", e);
5454
5492
  }
5455
5493
  function Ws(e) {
5456
- return Q("image", e);
5494
+ return $("video", e);
5457
5495
  }
5458
5496
  function Gs(e) {
5459
- return Q("media", e);
5497
+ return $("image", e);
5460
5498
  }
5461
5499
  function Ks(e) {
5462
- return Q("avatar", e);
5500
+ return $("media", e);
5463
5501
  }
5464
5502
  function qs(e) {
5465
- return Q("cover", e);
5503
+ return $("avatar", e);
5466
5504
  }
5467
5505
  function Js(e) {
5468
- return Q("poster", e);
5506
+ return $("cover", e);
5469
5507
  }
5470
5508
  function Ys(e) {
5471
- let t = K(e), n = {
5472
- ...t.option ?? X({ label: "" }),
5509
+ return $("poster", e);
5510
+ }
5511
+ function Xs(e) {
5512
+ let t = q(e), n = {
5513
+ ...t.option ?? Z({ label: "" }),
5473
5514
  label: t.valueLabel ?? ""
5474
5515
  };
5475
- return rs({
5516
+ return ns({
5476
5517
  key: t.key,
5477
5518
  label: t.label ?? "",
5478
- container: t.container ?? es,
5479
- by: X({
5519
+ container: t.container ?? $o,
5520
+ by: Z({
5480
5521
  key: "key",
5481
5522
  label: t.keyLabel ?? ""
5482
5523
  }),
@@ -5487,8 +5528,8 @@ function Ys(e) {
5487
5528
  required: t.required
5488
5529
  });
5489
5530
  }
5490
- function Xs(e, t, n) {
5491
- let r = K(n), i = r.required ?? !1, a = r.config ?? {}, o = L().finite();
5531
+ function Zs(e, t, n) {
5532
+ let r = q(n), i = r.required ?? !1, a = r.config ?? {}, o = L().finite();
5492
5533
  t && (o = o.int({ message: H("int") })), a.min != null && (o = o.min(a.min)), a.max != null && (o = o.max(a.max));
5493
5534
  let s = z({
5494
5535
  from: o,
@@ -5503,7 +5544,7 @@ function Xs(e, t, n) {
5503
5544
  });
5504
5545
  return;
5505
5546
  }
5506
- let n = s.safeParse(W(e));
5547
+ let n = s.safeParse(G(e));
5507
5548
  if (!n.success) {
5508
5549
  t.addIssue({
5509
5550
  code: B.custom,
@@ -5516,7 +5557,7 @@ function Xs(e, t, n) {
5516
5557
  message: H("range_order")
5517
5558
  });
5518
5559
  });
5519
- return J(r, {
5560
+ return Y(r, {
5520
5561
  kind: e,
5521
5562
  label: r.label ?? "",
5522
5563
  required: i,
@@ -5534,17 +5575,17 @@ function Xs(e, t, n) {
5534
5575
  from: "real",
5535
5576
  to: "real"
5536
5577
  },
5537
- zod: G(c, i)
5578
+ zod: K(c, i)
5538
5579
  });
5539
5580
  }
5540
- function Zs(e) {
5541
- return Xs("numberRange", !0, e);
5542
- }
5543
5581
  function Qs(e) {
5544
- return Xs("realRange", !1, e);
5582
+ return Zs("numberRange", !0, e);
5545
5583
  }
5546
5584
  function $s(e) {
5547
- let t = K(e), n = t.required ?? !1, r = t.multiple ?? !1, i = z({
5585
+ return Zs("realRange", !1, e);
5586
+ }
5587
+ function ec(e) {
5588
+ let t = q(e), n = t.required ?? !1, r = t.multiple ?? !1, i = z({
5548
5589
  url: F().min(1),
5549
5590
  title: F().optional(),
5550
5591
  description: F().optional(),
@@ -5559,8 +5600,8 @@ function $s(e) {
5559
5600
  html: F().optional(),
5560
5601
  width: L().optional(),
5561
5602
  height: L().optional()
5562
- }), a = fo(r ? xa(i) : wa([i, xa(i).max(1)]), "embed_structure");
5563
- return J(t, {
5603
+ }), a = uo(r ? xa(i) : wa([i, xa(i).max(1)]), "embed_structure");
5604
+ return Y(t, {
5564
5605
  kind: "embed",
5565
5606
  label: t.label ?? "",
5566
5607
  required: n,
@@ -5568,72 +5609,74 @@ function $s(e) {
5568
5609
  column: "text",
5569
5610
  hints: r ? { multiple: !0 } : {},
5570
5611
  json: !0,
5571
- zod: G(a, n)
5572
- });
5573
- }
5574
- var ec = {
5575
- string: X,
5576
- text: Z,
5577
- i18n: gs,
5578
- smallText: _s,
5579
- localDir: ms,
5580
- localFile: hs,
5581
- real: vs,
5582
- int: ys,
5583
- date: bs,
5584
- time: xs,
5585
- datetime: Ss,
5586
- boolean: Cs,
5587
- triState: ws,
5588
- select: Es,
5589
- relation: Ds,
5590
- json: Os,
5591
- check: ks,
5592
- measured: As,
5593
- money: js,
5594
- code: Ms,
5595
- geo: Ns,
5596
- lookup: Fs,
5597
- perWeekday: Ps,
5598
- period: Is,
5599
- file: Bs,
5600
- document: Vs,
5601
- audio: Hs,
5602
- video: Us,
5603
- image: Ws,
5604
- media: Gs,
5605
- avatar: Ks,
5606
- cover: qs,
5607
- poster: Js,
5608
- embed: $s,
5609
- keyValue: Ys,
5610
- numberRange: Zs,
5611
- realRange: Qs,
5612
- group: q,
5613
- row: $o,
5614
- table: es,
5615
- sheet: ts,
5616
- keyed: rs,
5617
- url: ns,
5618
- divider: os,
5619
- break: ss,
5620
- info: cs,
5621
- button: ls
5612
+ zod: K(a, n)
5613
+ });
5614
+ }
5615
+ var tc = {
5616
+ string: Z,
5617
+ text: Q,
5618
+ i18n: hs,
5619
+ smallText: gs,
5620
+ localDir: ps,
5621
+ localFile: ms,
5622
+ real: _s,
5623
+ int: vs,
5624
+ date: ys,
5625
+ time: bs,
5626
+ datetime: xs,
5627
+ boolean: Ss,
5628
+ triState: Cs,
5629
+ select: Ts,
5630
+ relation: Es,
5631
+ json: Ds,
5632
+ check: Os,
5633
+ measured: ks,
5634
+ unit: As,
5635
+ amount: js,
5636
+ money: Ms,
5637
+ code: Ns,
5638
+ geo: Ps,
5639
+ lookup: Is,
5640
+ perWeekday: Fs,
5641
+ period: Ls,
5642
+ file: Vs,
5643
+ document: Hs,
5644
+ audio: Us,
5645
+ video: Ws,
5646
+ image: Gs,
5647
+ media: Ks,
5648
+ avatar: qs,
5649
+ cover: Js,
5650
+ poster: Ys,
5651
+ embed: ec,
5652
+ keyValue: Xs,
5653
+ numberRange: Qs,
5654
+ realRange: $s,
5655
+ group: J,
5656
+ row: Qo,
5657
+ table: $o,
5658
+ sheet: es,
5659
+ keyed: ns,
5660
+ url: ts,
5661
+ divider: as,
5662
+ break: os,
5663
+ info: ss,
5664
+ button: cs
5622
5665
  };
5623
- function tc(e) {
5624
- for (let t of Object.keys(e)) if (t in ec) throw Error(`[f] preset '${t}' overrides a primitive`);
5666
+ function nc(e) {
5667
+ for (let t of Object.keys(e)) if (t in tc) throw Error(`[f] preset '${t}' overrides a primitive`);
5625
5668
  return {
5626
- ...ec,
5669
+ ...tc,
5627
5670
  ...e
5628
5671
  };
5629
5672
  }
5630
- var nc, rc = () => nc ??= tc(Wo);
5673
+ var rc, ic = () => rc ??= nc(Uo);
5631
5674
  new Proxy({}, {
5632
- get: (e, t) => rc()[t],
5633
- has: (e, t) => t in rc()
5675
+ get: (e, t) => ic()[t],
5676
+ has: (e, t) => t in ic()
5634
5677
  });
5635
- function ic(e) {
5636
- let { kind: t, label: n, required: r, prim: i, hints: a, options: o, relation: s, virtual: c, json: l, hidden: u } = e;
5678
+ function ac(e) {
5679
+ let { kind: t, label: n, required: r, prim: i, hints: a, options: o, relation: s, virtual: c, json: l, hidden: u, derived: d } = e;
5637
5680
  return {
5638
5681
  kind: t,
5639
5682
  label: n,
@@ -5644,13 +5687,14 @@ function ic(e) {
5644
5687
  relation: s,
5645
5688
  virtual: c,
5646
5689
  json: l,
5647
- hidden: u
5690
+ hidden: u,
5691
+ derived: d
5648
5692
  };
5649
5693
  }
5650
5694
  //#endregion
5651
5695
  //#region ../web-sdk/src/registry.ts
5652
- var ac = {};
5653
- function oc(e) {
5696
+ var oc = {};
5697
+ function sc(e) {
5654
5698
  if (!e.kinds.length) throw Error("[render] renderer without kinds");
5655
5699
  let t = {
5656
5700
  kinds: e.kinds,
@@ -5661,90 +5705,90 @@ function oc(e) {
5661
5705
  keys: e.keys
5662
5706
  };
5663
5707
  for (let n of e.kinds) {
5664
- if (ac[n]) throw Error(`[render] kind '${n}' already registered`);
5665
- ac[n] = t;
5708
+ if (oc[n]) throw Error(`[render] kind '${n}' already registered`);
5709
+ oc[n] = t;
5666
5710
  }
5667
5711
  }
5668
- function sc(e) {
5669
- return ac[e.kind];
5670
- }
5671
5712
  function cc(e) {
5672
- if (qo(e) || Jo(e)) return e.type.kind;
5673
- if (Yo(e)) return e.kind ?? (is(e) ? "collection" : as(e) ? "embedded" : "group");
5674
- if (Qo(e)) return "button";
5675
- if (Xo(e)) return "divider";
5676
- if (Zo(e)) return "info";
5677
- throw Error("[render] unknown layout element");
5713
+ return oc[e.kind];
5678
5714
  }
5679
5715
  function lc(e) {
5680
- let t = sc(e)?.layout;
5716
+ if (Ko(e) || qo(e)) return e.type.kind;
5717
+ if (Jo(e)) return e.kind ?? (rs(e) ? "collection" : is(e) ? "embedded" : "group");
5718
+ if (Zo(e)) return "button";
5719
+ if (Yo(e)) return "divider";
5720
+ if (Xo(e)) return "info";
5721
+ throw Error("[render] unknown layout element");
5722
+ }
5723
+ function uc(e) {
5724
+ let t = cc(e)?.layout;
5681
5725
  return typeof t == "function" ? t(e) : t ?? "scalar";
5682
5726
  }
5683
- var uc = (e) => e.hints.multi === !0 || e.hints.multiple === !0 ? "block" : "scalar", dc = {};
5684
- function fc(e, t) {
5685
- if (dc[e]) throw Error(`[template] '${e}' already registered`);
5686
- dc[e] = t;
5727
+ var dc = (e) => e.hints.multi === !0 || e.hints.multiple === !0 ? "block" : "scalar", fc = {};
5728
+ function pc(e, t) {
5729
+ if (fc[e]) throw Error(`[template] '${e}' already registered`);
5730
+ fc[e] = t;
5687
5731
  }
5688
- function pc(e) {
5689
- return dc[e];
5732
+ function mc(e) {
5733
+ return fc[e];
5690
5734
  }
5691
5735
  //#endregion
5692
5736
  //#region ../web-sdk/src/list-view.ts
5693
- var mc = {};
5694
- function hc(e) {
5737
+ var hc = {};
5738
+ function gc(e) {
5695
5739
  if (!e.kind) throw Error("[list-view] view without kind");
5696
- if (mc[e.kind]) throw Error(`[list-view] kind '${e.kind}' already registered`);
5697
- mc[e.kind] = e;
5740
+ if (hc[e.kind]) throw Error(`[list-view] kind '${e.kind}' already registered`);
5741
+ hc[e.kind] = e;
5698
5742
  }
5699
- function gc(e) {
5700
- return mc[e];
5743
+ function _c(e) {
5744
+ return hc[e];
5701
5745
  }
5702
5746
  //#endregion
5703
5747
  //#region ../web-sdk/src/plugin-ui.ts
5704
- function _c(e) {
5748
+ function vc(e) {
5705
5749
  return e;
5706
5750
  }
5707
- var $ = /* @__PURE__ */ new Map(), vc = /* @__PURE__ */ new Map(), yc = /* @__PURE__ */ new Map();
5708
- function bc(e) {
5751
+ var yc = /* @__PURE__ */ new Map(), bc = /* @__PURE__ */ new Map(), xc = /* @__PURE__ */ new Map();
5752
+ function Sc(e) {
5709
5753
  for (let t of e.slots ?? []) {
5710
- let e = $.get(t.slot);
5711
- e || (e = /* @__PURE__ */ new Map(), $.set(t.slot, e)), e.set(t.id, t);
5754
+ let e = yc.get(t.slot);
5755
+ e || (e = /* @__PURE__ */ new Map(), yc.set(t.slot, e)), e.set(t.id, t);
5712
5756
  }
5713
- for (let t of e.routes ?? []) vc.set(t.path, t);
5714
- for (let t of e.nav ?? []) yc.set(t.to, t);
5757
+ for (let t of e.routes ?? []) bc.set(t.path, t);
5758
+ for (let t of e.nav ?? []) xc.set(t.to, t);
5715
5759
  }
5716
- function xc(e) {
5760
+ function Cc(e) {
5717
5761
  return (t, n) => (t.order ?? 0) - (n.order ?? 0) || e(t).localeCompare(e(n));
5718
5762
  }
5719
- function Sc(e) {
5720
- return [...$.get(e)?.values() ?? []].sort(xc((e) => e.id));
5763
+ function wc(e) {
5764
+ return [...yc.get(e)?.values() ?? []].sort(Cc((e) => e.id));
5721
5765
  }
5722
- function Cc() {
5723
- return [...vc.values()];
5766
+ function Tc() {
5767
+ return [...bc.values()];
5724
5768
  }
5725
- function wc() {
5726
- return [...yc.values()].sort(xc((e) => e.to));
5769
+ function Ec() {
5770
+ return [...xc.values()].sort(Cc((e) => e.to));
5727
5771
  }
5728
- function Tc() {
5729
- $.clear(), vc.clear(), yc.clear();
5772
+ function Dc() {
5773
+ yc.clear(), bc.clear(), xc.clear();
5730
5774
  }
5731
5775
  //#endregion
5732
5776
  //#region ../web-sdk/src/site-links.ts
5733
- var Ec = [], Dc = [];
5734
- function Oc(e) {
5735
- Ec = [...e];
5736
- }
5737
- function kc() {
5738
- return [...Ec];
5739
- }
5777
+ var Oc = [], kc = [];
5740
5778
  function Ac(e) {
5741
- Dc = [...e];
5779
+ Oc = [...e];
5742
5780
  }
5743
5781
  function jc() {
5744
- return [...Dc];
5782
+ return [...Oc];
5783
+ }
5784
+ function Mc(e) {
5785
+ kc = [...e];
5786
+ }
5787
+ function Nc() {
5788
+ return [...kc];
5745
5789
  }
5746
- function Mc() {
5747
- Ec = [], Dc = [];
5790
+ function Pc() {
5791
+ Oc = [], kc = [];
5748
5792
  }
5749
5793
  //#endregion
5750
- export { bc as applyAppUI, _c as definePluginUI, cc as elementKind, lc as fieldLayout, wc as getPluginNav, Cc as getPluginRoutes, kc as getSiteLinks, jc as getSiteShelves, Sc as getSlotEntries, mc as listViewRegistry, uc as multiBlock, hc as registerListView, oc as registerRenderer, Oc as registerSiteLinks, Ac as registerSiteShelves, fc as registerTemplate, ac as rendererRegistry, Tc as resetAppUI, Mc as resetSiteLinks, gc as resolveListView, sc as resolveRenderer, pc as resolveTemplate };
5794
+ export { Sc as applyAppUI, vc as definePluginUI, lc as elementKind, uc as fieldLayout, Ec as getPluginNav, Tc as getPluginRoutes, jc as getSiteLinks, Nc as getSiteShelves, wc as getSlotEntries, hc as listViewRegistry, dc as multiBlock, gc as registerListView, sc as registerRenderer, Ac as registerSiteLinks, Mc as registerSiteShelves, pc as registerTemplate, oc as rendererRegistry, Dc as resetAppUI, Pc as resetSiteLinks, _c as resolveListView, cc as resolveRenderer, mc as resolveTemplate };