@realtek/core-theme 0.0.261 → 0.0.263

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.
@@ -1273,20 +1273,20 @@ function Vt(e) {
1273
1273
  let t = String(e ?? "").trim();
1274
1274
  return t === "" || t === Bt;
1275
1275
  }
1276
- function F(e = {}) {
1276
+ function Ht(e = {}) {
1277
1277
  let t = new URLSearchParams();
1278
1278
  e.module && t.set("module", e.module), e.clientId && t.set("clientId", e.clientId), e.region && t.set("region", e.region);
1279
1279
  let n = t.toString();
1280
1280
  return n ? `?${n}` : "";
1281
1281
  }
1282
- async function Ht(e = "", t = {}) {
1283
- let i = await n(r, `${P}${F({
1282
+ async function Ut(e = "", t = {}) {
1283
+ let i = await n(r, `${P}${Ht({
1284
1284
  ...t,
1285
1285
  module: e || t.module || ""
1286
1286
  })}`), a = i?.data;
1287
1287
  return Array.isArray(a) ? a : a && Array.isArray(a.groups) ? a.groups : Array.isArray(i) ? i : i && Array.isArray(i.groups) ? i.groups : [];
1288
1288
  }
1289
- async function Ut({ offset: e = 0, limit: t = 100, sortBy: i = "new", searchvalue: a = "" } = {}) {
1289
+ async function Wt({ offset: e = 0, limit: t = 100, sortBy: i = "new", searchvalue: a = "" } = {}) {
1290
1290
  let o = new URLSearchParams({
1291
1291
  offset: String(e),
1292
1292
  limit: String(t),
@@ -1297,28 +1297,28 @@ async function Ut({ offset: e = 0, limit: t = 100, sortBy: i = "new", searchvalu
1297
1297
  let u = await n(r, `/client/view?${o.toString()}`), d = u?.data ?? u;
1298
1298
  return d?.clients ?? d?.Clients ?? d?.items ?? [];
1299
1299
  }
1300
- async function Wt(e) {
1300
+ async function Gt(e) {
1301
1301
  let t = await n(r, `/filter-dropdown-fields?module=${encodeURIComponent(e)}`), i = t?.data ?? t;
1302
1302
  return Array.isArray(i) ? i : [];
1303
1303
  }
1304
- async function Gt(e, t = {}) {
1305
- return n(r, `${P}${F(t)}`, {
1304
+ async function Kt(e, t = {}) {
1305
+ return n(r, `${P}${Ht(t)}`, {
1306
1306
  method: "POST",
1307
1307
  headers: { "Content-Type": "application/json" },
1308
1308
  body: JSON.stringify(e)
1309
1309
  });
1310
1310
  }
1311
- async function Kt(e, t, i = {}) {
1312
- return n(r, `${P}/${e}${F(i)}`, {
1311
+ async function qt(e, t, i = {}) {
1312
+ return n(r, `${P}/${e}${Ht(i)}`, {
1313
1313
  method: "PUT",
1314
1314
  headers: { "Content-Type": "application/json" },
1315
1315
  body: JSON.stringify(t)
1316
1316
  });
1317
1317
  }
1318
- async function qt(e, t = {}) {
1319
- return n(r, `${P}/${e}${F(t)}`, { method: "DELETE" });
1318
+ async function Jt(e, t = {}) {
1319
+ return n(r, `${P}/${e}${Ht(t)}`, { method: "DELETE" });
1320
1320
  }
1321
- async function Jt(e, t) {
1321
+ async function Yt(e, t) {
1322
1322
  return n(r, `${zt}/request-otp`, {
1323
1323
  method: "POST",
1324
1324
  body: JSON.stringify({
@@ -1327,7 +1327,7 @@ async function Jt(e, t) {
1327
1327
  })
1328
1328
  });
1329
1329
  }
1330
- async function Yt(e, t, i) {
1330
+ async function Xt(e, t, i) {
1331
1331
  return n(r, `${zt}/apply`, {
1332
1332
  method: "POST",
1333
1333
  body: JSON.stringify({
@@ -1337,9 +1337,9 @@ async function Yt(e, t, i) {
1337
1337
  })
1338
1338
  });
1339
1339
  }
1340
- var Xt = "/admin/detail-config";
1341
- async function Zt(e, t = {}) {
1342
- let i = await n(r, `${Xt}${F({
1340
+ var Zt = "/admin/detail-config";
1341
+ async function Qt(e, t = {}) {
1342
+ let i = await n(r, `${Zt}${Ht({
1343
1343
  module: e,
1344
1344
  clientId: t.clientId
1345
1345
  })}`), a = i?.data ?? i ?? {};
@@ -1350,8 +1350,8 @@ async function Zt(e, t = {}) {
1350
1350
  merges: Array.isArray(a.merges) ? a.merges : []
1351
1351
  };
1352
1352
  }
1353
- async function Qt({ module: e, fields: t = [], merges: i = [], clientId: a = "" }) {
1354
- return n(r, Xt, {
1353
+ async function $t({ module: e, fields: t = [], merges: i = [], clientId: a = "" }) {
1354
+ return n(r, Zt, {
1355
1355
  method: "POST",
1356
1356
  headers: { "Content-Type": "application/json" },
1357
1357
  body: JSON.stringify({
@@ -1362,88 +1362,88 @@ async function Qt({ module: e, fields: t = [], merges: i = [], clientId: a = ""
1362
1362
  })
1363
1363
  });
1364
1364
  }
1365
- var $t = "/admin/detail-defaults";
1366
- async function en() {
1367
- let e = await n(r, $t);
1365
+ var en = "/admin/detail-defaults";
1366
+ async function tn() {
1367
+ let e = await n(r, en);
1368
1368
  return e?.data ?? e ?? {};
1369
1369
  }
1370
- async function tn(e) {
1371
- return n(r, $t, {
1370
+ async function nn(e) {
1371
+ return n(r, en, {
1372
1372
  method: "POST",
1373
1373
  headers: { "Content-Type": "application/json" },
1374
1374
  body: JSON.stringify(e)
1375
1375
  });
1376
1376
  }
1377
- var nn = "/admin/ai-service-config";
1378
- async function rn() {
1379
- let e = await n(r, nn);
1377
+ var rn = "/admin/ai-service-config";
1378
+ async function an() {
1379
+ let e = await n(r, rn);
1380
1380
  return e?.data ?? e ?? [];
1381
1381
  }
1382
- async function an(e) {
1383
- return n(r, nn, {
1382
+ async function on(e) {
1383
+ return n(r, rn, {
1384
1384
  method: "POST",
1385
1385
  headers: { "Content-Type": "application/json" },
1386
1386
  body: JSON.stringify(e)
1387
1387
  });
1388
1388
  }
1389
- async function on(e) {
1390
- return n(r, `${nn}?serviceKey=${encodeURIComponent(e)}`, { method: "DELETE" });
1389
+ async function sn(e) {
1390
+ return n(r, `${rn}?serviceKey=${encodeURIComponent(e)}`, { method: "DELETE" });
1391
1391
  }
1392
- var sn = "/admin/bgc-integration-config";
1393
- async function cn() {
1394
- let e = await n(r, sn);
1392
+ var cn = "/admin/bgc-integration-config";
1393
+ async function ln() {
1394
+ let e = await n(r, cn);
1395
1395
  return e?.data ?? e ?? {
1396
1396
  updateMethod: "MANUAL",
1397
1397
  enabled: !0
1398
1398
  };
1399
1399
  }
1400
- async function ln(e) {
1401
- return n(r, sn, {
1400
+ async function un(e) {
1401
+ return n(r, cn, {
1402
1402
  method: "PUT",
1403
1403
  headers: { "Content-Type": "application/json" },
1404
1404
  body: JSON.stringify(e)
1405
1405
  });
1406
1406
  }
1407
- async function un() {
1407
+ async function dn() {
1408
1408
  let e = await n(r, "/integration-config/bgc/summary");
1409
1409
  return e?.data ?? e ?? {
1410
1410
  updateMethod: "MANUAL",
1411
1411
  enabled: !0
1412
1412
  };
1413
1413
  }
1414
- var I = "/admin/integration-config";
1415
- async function dn() {
1416
- let e = await n(r, I);
1414
+ var F = "/admin/integration-config";
1415
+ async function fn() {
1416
+ let e = await n(r, F);
1417
1417
  return e?.data ?? e ?? [];
1418
1418
  }
1419
- async function fn(e) {
1420
- let t = await n(r, `${I}/${encodeURIComponent(e)}`);
1419
+ async function pn(e) {
1420
+ let t = await n(r, `${F}/${encodeURIComponent(e)}`);
1421
1421
  return t?.data ?? t;
1422
1422
  }
1423
- async function pn(e) {
1423
+ async function mn(e) {
1424
1424
  let t = e?.integrationKey;
1425
- return n(r, t ? `${I}/${encodeURIComponent(t)}` : I, {
1425
+ return n(r, t ? `${F}/${encodeURIComponent(t)}` : F, {
1426
1426
  method: t ? "PUT" : "POST",
1427
1427
  headers: { "Content-Type": "application/json" },
1428
1428
  body: JSON.stringify(e)
1429
1429
  });
1430
1430
  }
1431
- async function mn(e) {
1432
- return n(r, `${I}/${encodeURIComponent(e)}`, { method: "DELETE" });
1433
- }
1434
1431
  async function hn(e) {
1435
- let t = await n(r, `${I}/test`, {
1432
+ return n(r, `${F}/${encodeURIComponent(e)}`, { method: "DELETE" });
1433
+ }
1434
+ async function gn(e) {
1435
+ let t = await n(r, `${F}/test`, {
1436
1436
  method: "POST",
1437
1437
  headers: { "Content-Type": "application/json" },
1438
1438
  body: JSON.stringify(e)
1439
1439
  });
1440
1440
  return t?.data ?? t;
1441
1441
  }
1442
- async function gn(e) {
1442
+ async function _n(e) {
1443
1443
  let t = await n(r, `/integration-config/${encodeURIComponent(e)}/summary`);
1444
1444
  return t?.data ?? t;
1445
1445
  }
1446
- async function _n(e, t, i) {
1446
+ async function vn(e, t, i) {
1447
1447
  let a = await n(r, `/integration-config/${encodeURIComponent(e)}/apply-status/${encodeURIComponent(t)}`, {
1448
1448
  method: "POST",
1449
1449
  headers: { "Content-Type": "application/json" },
@@ -1451,11 +1451,11 @@ async function _n(e, t, i) {
1451
1451
  });
1452
1452
  return a?.data ?? a;
1453
1453
  }
1454
- async function vn(e, t) {
1454
+ async function yn(e, t) {
1455
1455
  let i = await n(r, `${P}?module=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}&view=detail`), a = i?.data ?? i;
1456
1456
  return Array.isArray(a) ? a : [];
1457
1457
  }
1458
- function yn(e) {
1458
+ function bn(e) {
1459
1459
  return {
1460
1460
  key: e.role_id ?? e.id,
1461
1461
  roleId: e.role_id ?? e.id,
@@ -1466,11 +1466,11 @@ function yn(e) {
1466
1466
  raw: e
1467
1467
  };
1468
1468
  }
1469
- function bn(e) {
1469
+ function I(e) {
1470
1470
  return e?.raw?.role_id ?? e?.roleId ?? e?.key;
1471
1471
  }
1472
1472
  async function xn() {
1473
- let e = await n(r, "/get-roles"), t = e.data ?? e, i = M(t?.zinnext_default).map(yn), a = M(t?.custom_roles).map(yn), o = [...i, ...a];
1473
+ let e = await n(r, "/get-roles"), t = e.data ?? e, i = M(t?.zinnext_default).map(bn), a = M(t?.custom_roles).map(bn), o = [...i, ...a];
1474
1474
  return {
1475
1475
  roles: o,
1476
1476
  total: o.length
@@ -1525,7 +1525,7 @@ async function En(e, t, i, a = "listView") {
1525
1525
  return M(s, s?.visibleFields, o?.visibleFields);
1526
1526
  }
1527
1527
  async function Dn(e, t = "listView", n = j) {
1528
- let r = bn(e), i = kt(n), a = await Promise.all(i.map(async ({ key: e, apiModule: n }) => [e, (await En(n, "roleId", r, t)).map((t, i) => ({
1528
+ let r = I(e), i = kt(n), a = await Promise.all(i.map(async ({ key: e, apiModule: n }) => [e, (await En(n, "roleId", r, t)).map((t, i) => ({
1529
1529
  ...Dt(t, i),
1530
1530
  module: e,
1531
1531
  apiModule: n,
@@ -1579,7 +1579,7 @@ function kn(e, t) {
1579
1579
  });
1580
1580
  }
1581
1581
  async function An(e, t, i, a = "listView", o = j) {
1582
- let s = bn(e), c = kt(o).find((e) => e.key === t)?.apiModule ?? t;
1582
+ let s = I(e), c = kt(o).find((e) => e.key === t)?.apiModule ?? t;
1583
1583
  return n(r, `${A}/role`, {
1584
1584
  method: "PUT",
1585
1585
  body: JSON.stringify({
@@ -1595,7 +1595,7 @@ function Mn(e) {
1595
1595
  return `__group__:${e}`;
1596
1596
  }
1597
1597
  async function Nn(e, t, i = {}) {
1598
- let a = bn(e), o = new URLSearchParams({
1598
+ let a = I(e), o = new URLSearchParams({
1599
1599
  module: t,
1600
1600
  roleId: String(a ?? "")
1601
1601
  });
@@ -1604,7 +1604,7 @@ async function Nn(e, t, i = {}) {
1604
1604
  return Array.isArray(c) ? c : [];
1605
1605
  }
1606
1606
  async function Pn(e, t, i) {
1607
- let a = bn(e), o = [], s = 0;
1607
+ let a = I(e), o = [], s = 0;
1608
1608
  for (let e of i) {
1609
1609
  e.locked || o.push({
1610
1610
  label: e.label,
@@ -2164,7 +2164,7 @@ function Kr(e) {
2164
2164
  }, R;
2165
2165
  }
2166
2166
  function qr(e = !1) {
2167
- return Rr && !e || (Rr = en().then((e) => Kr(e)).catch(() => R)), Rr;
2167
+ return Rr && !e || (Rr = tn().then((e) => Kr(e)).catch(() => R)), Rr;
2168
2168
  }
2169
2169
  //#endregion
2170
2170
  //#region src/utils/roleFormPermissionGate.js
@@ -3181,7 +3181,20 @@ function Aa(e, t) {
3181
3181
  url: i || void 0
3182
3182
  }];
3183
3183
  }
3184
- function ja(e) {
3184
+ function ja(e, t, n, r) {
3185
+ (e.fields ?? []).forEach((e) => {
3186
+ e?.verifyAction && [
3187
+ e.verifyResultField,
3188
+ e.verifyTimestampField,
3189
+ ...String(e.verifyLockedWhenFields ?? "").split(/[,\s]+/)
3190
+ ].map((e) => String(e ?? "").trim()).filter(Boolean).forEach((e) => {
3191
+ if (V(n, e) !== void 0) return;
3192
+ let i = r(t, { field: e });
3193
+ i != null && Y(n, e, i);
3194
+ });
3195
+ });
3196
+ }
3197
+ function Ma(e) {
3185
3198
  let t = Array.isArray(e.rows) ? e.rows : null, n = Math.max(0, Number(e.minRows ?? 0) || 0), r = (t, n, r) => {
3186
3199
  let i = {};
3187
3200
  return (e.fields ?? []).forEach((e) => {
@@ -3197,7 +3210,7 @@ function ja(e) {
3197
3210
  return;
3198
3211
  }
3199
3212
  Y(i, e.field, Ta(e.addRow) ? ia(e, a) : q(e, a));
3200
- }), i;
3213
+ }), ja(e, t, i, r), i;
3201
3214
  }, i = Gi(e, { editing: !0 });
3202
3215
  if (t && t.length > 0) {
3203
3216
  let e = t.map((e) => r(e, (e, t) => Aa(e, t), (e, t) => V(e, t.field)));
@@ -3208,7 +3221,7 @@ function ja(e) {
3208
3221
  for (; o.length < n;) o.push({ ...i });
3209
3222
  return o;
3210
3223
  }
3211
- function Ma(e, t = []) {
3224
+ function Na(e, t = []) {
3212
3225
  let n = {};
3213
3226
  return t.forEach((e) => {
3214
3227
  e.toggleEnabled && e.toggleField && Y(n, e.toggleField, !!e.toggleValue), !e.addRow && (e.fields ?? []).forEach((e) => {
@@ -3235,27 +3248,27 @@ function Ma(e, t = []) {
3235
3248
  }
3236
3249
  //#endregion
3237
3250
  //#region src/components/form/useAiActions.js
3238
- function Na(e) {
3251
+ function Pa(e) {
3239
3252
  let t = document.createElement("div");
3240
3253
  return t.innerHTML = String(e ?? ""), t.textContent || t.innerText || "";
3241
3254
  }
3242
- function Pa(e, t) {
3243
- return t && t === "stripHtml" ? Na(e) : e;
3255
+ function Fa(e, t) {
3256
+ return t && t === "stripHtml" ? Pa(e) : e;
3244
3257
  }
3245
- function Fa(e) {
3258
+ function Ia(e) {
3246
3259
  return String(e ?? "").trim().split(/\s+/).filter(Boolean).length;
3247
3260
  }
3248
- function Ia(e) {
3261
+ function La(e) {
3249
3262
  return Object.values(e || {}).some((e) => e != null && e !== "");
3250
3263
  }
3251
- function La(e, t) {
3264
+ function Ra(e, t) {
3252
3265
  if (e.kind === "file") return Array.isArray(t) ? t.length > 0 : !!t;
3253
- let n = Pa(t, e.transform), r = String(n ?? "").trim();
3266
+ let n = Fa(t, e.transform), r = String(n ?? "").trim();
3254
3267
  if (!r) return !1;
3255
3268
  let i = Number(e.minWords) || 0;
3256
- return i > 0 ? Fa(r) >= i : !0;
3269
+ return i > 0 ? Ia(r) >= i : !0;
3257
3270
  }
3258
- function Ra(e, t) {
3271
+ function za(e, t) {
3259
3272
  let n = e.inputs || [];
3260
3273
  if (n.length === 0) return !0;
3261
3274
  let r = /* @__PURE__ */ new Map();
@@ -3263,35 +3276,35 @@ function Ra(e, t) {
3263
3276
  let n = e.group || `__solo_${t}`;
3264
3277
  r.has(n) || r.set(n, []), r.get(n).push(e);
3265
3278
  });
3266
- for (let e of r.values()) if (e.some((e) => e.required || Number(e.minWords) > 0) && !e.some((e) => La(e, t(e.sourceField)))) return !1;
3279
+ for (let e of r.values()) if (e.some((e) => e.required || Number(e.minWords) > 0) && !e.some((e) => Ra(e, t(e.sourceField)))) return !1;
3267
3280
  return !0;
3268
3281
  }
3269
- var za = [
3282
+ var Ba = [
3270
3283
  "top-left",
3271
3284
  "top-center",
3272
3285
  "top-right",
3273
3286
  "bottom-left",
3274
3287
  "bottom-center",
3275
3288
  "bottom-right"
3276
- ], Ba = "bottom-left";
3277
- function Va(e = []) {
3289
+ ], Va = "bottom-left";
3290
+ function Ha(e = []) {
3278
3291
  let t = {};
3279
3292
  return e.forEach((e) => {
3280
- let n = za.includes(e.position) ? e.position : Ba;
3293
+ let n = Ba.includes(e.position) ? e.position : Va;
3281
3294
  (t[n] ??= []).push(e);
3282
3295
  }), t;
3283
3296
  }
3284
- function Ha({ form: e, groups: t, module: n }) {
3285
- let [r, i] = g(null), a = y.useWatch((e) => e, e), o = f((e) => Ra(e, (e) => (a || {})[e]), [a]), s = f((t) => {
3297
+ function Ua({ form: e, groups: t, module: n }) {
3298
+ let [r, i] = g(null), a = y.useWatch((e) => e, e), o = f((e) => za(e, (e) => (a || {})[e]), [a]), s = f((t) => {
3286
3299
  if (!Array.isArray(t) || t.length === 0) return !1;
3287
- let n = Ma(e, t.filter((e) => !e.addRow)), r = Object.keys(n).length > 0;
3300
+ let n = Na(e, t.filter((e) => !e.addRow)), r = Object.keys(n).length > 0;
3288
3301
  return t.forEach((t) => {
3289
3302
  if (!t.addRow || !Array.isArray(t.rows) || t.rows.length === 0) return;
3290
- let n = ja(t);
3303
+ let n = Ma(t);
3291
3304
  if (n.length === 0) return;
3292
3305
  r = !0;
3293
3306
  let i = () => e.setFieldsValue({ [t.name]: n }), a = e.getFieldValue(t.name) || [];
3294
- a.some(Ia) ? b.confirm({
3307
+ a.some(La) ? b.confirm({
3295
3308
  title: "Replace existing rows?",
3296
3309
  content: `This will replace ${a.length} existing row(s) in "${t.label || t.name}".`,
3297
3310
  okText: "Replace",
@@ -3311,7 +3324,7 @@ function Ha({ form: e, groups: t, module: n }) {
3311
3324
  r && (c[t.param] = r);
3312
3325
  } else {
3313
3326
  let n = e.getFieldValue(t.sourceField);
3314
- n != null && n !== "" && (i[t.param] = Pa(n, t.transform));
3327
+ n != null && n !== "" && (i[t.param] = Fa(n, t.transform));
3315
3328
  }
3316
3329
  }), (a.inputs || []).forEach((e) => {
3317
3330
  !e.group || e.kind !== "text" || (a.inputs || []).some((t) => t.group === e.group && t.kind === "file" && c[t.param]) && delete i[e.param];
@@ -3343,7 +3356,7 @@ function Ha({ form: e, groups: t, module: n }) {
3343
3356
  }
3344
3357
  //#endregion
3345
3358
  //#region src/components/form/AiActionButtons.jsx
3346
- function Ua({ position: e, actions: t, aiActions: n, groupName: r, field: i }) {
3359
+ function Wa({ position: e, actions: t, aiActions: n, groupName: r, field: i }) {
3347
3360
  return !t || t.length === 0 ? null : /* @__PURE__ */ C(ee, {
3348
3361
  size: 8,
3349
3362
  className: "v1-ai-action-buttons",
@@ -3362,18 +3375,18 @@ function Ua({ position: e, actions: t, aiActions: n, groupName: r, field: i }) {
3362
3375
  }
3363
3376
  //#endregion
3364
3377
  //#region src/components/form/emailValidator.js
3365
- function Wa(e) {
3378
+ function Ga(e) {
3366
3379
  let t = String(e ?? "").trim(), n = /^([^\s@]+)@([^\s@]+)\.([A-Za-z]{2,})$/.exec(t);
3367
3380
  if (!n) return !1;
3368
3381
  let [, r, i] = n;
3369
3382
  return /[A-Za-z]/.test(r) && /[A-Za-z]/.test(i);
3370
3383
  }
3371
- function Ga(e = "Email", t) {
3372
- return { validator: (n, r) => r == null || r === "" || Wa(r) ? Promise.resolve() : Promise.reject(Error(t ?? `Enter a valid ${e}; numeric-only email addresses are not allowed`)) };
3384
+ function Ka(e = "Email", t) {
3385
+ return { validator: (n, r) => r == null || r === "" || Ga(r) ? Promise.resolve() : Promise.reject(Error(t ?? `Enter a valid ${e}; numeric-only email addresses are not allowed`)) };
3373
3386
  }
3374
3387
  //#endregion
3375
3388
  //#region src/components/form/inputValidator.js
3376
- var Ka = [
3389
+ var qa = [
3377
3390
  {
3378
3391
  label: "Only Numbers",
3379
3392
  value: "onlyNumber"
@@ -3442,7 +3455,7 @@ var Ka = [
3442
3455
  label: "Website URL",
3443
3456
  value: "websiteUrl"
3444
3457
  }
3445
- ], qa = {
3458
+ ], Ja = {
3446
3459
  onlyNumber: /^[0-9]$/,
3447
3460
  experience: /^[0-9]$/,
3448
3461
  numericTwoDigits: /^[0-9]$/,
@@ -3457,10 +3470,10 @@ var Ka = [
3457
3470
  decimalRange: /^[0-9.]$/,
3458
3471
  contactNumber: /^[0-9()\-+\s]$/
3459
3472
  };
3460
- function Ja(e) {
3461
- return qa[e] ?? null;
3473
+ function Ya(e) {
3474
+ return Ja[e] ?? null;
3462
3475
  }
3463
- function Ya(e, t = {}, n = "change") {
3476
+ function Xa(e, t = {}, n = "change") {
3464
3477
  if (!t?.type || e == null) return {
3465
3478
  cleaned: e ?? "",
3466
3479
  error: null
@@ -3538,7 +3551,7 @@ function Ya(e, t = {}, n = "change") {
3538
3551
  break;
3539
3552
  }
3540
3553
  case "email":
3541
- c = n === "blur" ? r.trim() : r, c && !Wa(c) && (l = `${s} must be a valid email address; numeric-only email addresses are not allowed.`);
3554
+ c = n === "blur" ? r.trim() : r, c && !Ga(c) && (l = `${s} must be a valid email address; numeric-only email addresses are not allowed.`);
3542
3555
  break;
3543
3556
  case "websiteUrl":
3544
3557
  c = n === "blur" ? r.trim() : r, c && !/^(https?:\/\/)?([\da-z.-]+)\.([a-z.]{2,6})([/\w .-]*)*\/?$/i.test(c) && (l = `${s} must be a valid URL.`);
@@ -3550,21 +3563,21 @@ function Ya(e, t = {}, n = "change") {
3550
3563
  error: l
3551
3564
  };
3552
3565
  }
3553
- var Xa = "This value is already present";
3554
- function Za(e) {
3566
+ var Za = "This value is already present";
3567
+ function Qa(e) {
3555
3568
  return typeof e == "string" ? e : e?.type ?? e?.rule ?? e?.name;
3556
3569
  }
3557
- function Qa(e) {
3558
- if (Za(e) !== "unique") return null;
3570
+ function $a(e) {
3571
+ if (Qa(e) !== "unique") return null;
3559
3572
  if (typeof e == "string") return {
3560
- message: Xa,
3573
+ message: Za,
3561
3574
  normalizer: "trim",
3562
3575
  skipBlank: !0,
3563
3576
  validateOn: "blur"
3564
3577
  };
3565
3578
  let t = e.value && typeof e.value == "object" ? e.value : e, n = String(t.validateOn ?? "blur").toLowerCase();
3566
3579
  return {
3567
- message: typeof e.message == "string" && e.message.trim() ? e.message.trim() : Xa,
3580
+ message: typeof e.message == "string" && e.message.trim() ? e.message.trim() : Za,
3568
3581
  collectionField: t.collectionField ?? "",
3569
3582
  normalizer: String(t.normalizer ?? "trim"),
3570
3583
  skipBlank: t.skipBlank !== !1,
@@ -3575,20 +3588,20 @@ function Qa(e) {
3575
3588
  ].includes(n) ? n : "blur"
3576
3589
  };
3577
3590
  }
3578
- function $a(e) {
3591
+ function eo(e) {
3579
3592
  let t = e?.validations ?? e?.validation ?? e?.rules ?? [];
3580
3593
  if (!Array.isArray(t)) return null;
3581
3594
  for (let e of t) {
3582
- let t = Qa(e);
3595
+ let t = $a(e);
3583
3596
  if (t) return t;
3584
3597
  }
3585
3598
  return null;
3586
3599
  }
3587
- function eo(e = []) {
3600
+ function to(e = []) {
3588
3601
  let t = [];
3589
3602
  return (Array.isArray(e) ? e : []).forEach((e) => {
3590
3603
  (e?.fields ?? []).forEach((e) => {
3591
- let n = $a(e);
3604
+ let n = eo(e);
3592
3605
  !n || !e?.field || t.push({
3593
3606
  field: e.field,
3594
3607
  label: e.label ?? e.field,
@@ -3597,10 +3610,10 @@ function eo(e = []) {
3597
3610
  });
3598
3611
  }), t;
3599
3612
  }
3600
- function to(e) {
3613
+ function no(e) {
3601
3614
  return e == null ? !0 : typeof e == "number" ? Number.isNaN(e) : typeof e == "boolean" ? !1 : Array.isArray(e) ? e.length === 0 : String(e).trim() === "";
3602
3615
  }
3603
- function no(e, t = "trim") {
3616
+ function ro(e, t = "trim") {
3604
3617
  if (e == null) return "";
3605
3618
  let n = String(e);
3606
3619
  switch (String(t)) {
@@ -3612,10 +3625,10 @@ function no(e, t = "trim") {
3612
3625
  default: return n.trim();
3613
3626
  }
3614
3627
  }
3615
- function ro(e, t) {
3616
- return !(!e || e.skipBlank !== !1 && to(t));
3628
+ function io(e, t) {
3629
+ return !(!e || e.skipBlank !== !1 && no(t));
3617
3630
  }
3618
- function io(e) {
3631
+ function ao(e) {
3619
3632
  return !e || e.validateOn === "submit" ? [] : e.validateOn === "change" ? ["onChange", "onBlur"] : ["onBlur"];
3620
3633
  }
3621
3634
  var Z = {
@@ -3625,21 +3638,21 @@ var Z = {
3625
3638
  STALE: "stale",
3626
3639
  ERROR: "error"
3627
3640
  };
3628
- function ao({ module: e, field: t, recordId: n, normalized: r }) {
3641
+ function oo({ module: e, field: t, recordId: n, normalized: r }) {
3629
3642
  return `${e}${t}${n ?? ""}${r}`;
3630
3643
  }
3631
- function oo({ checkFieldUnique: e, onPendingChange: t } = {}) {
3644
+ function so({ checkFieldUnique: e, onPendingChange: t } = {}) {
3632
3645
  let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = 0, a = 0;
3633
3646
  function o(e) {
3634
3647
  a = e, typeof t == "function" && t(a);
3635
3648
  }
3636
3649
  async function s({ module: t, field: s, rule: c, value: l, recordId: u, clientId: d, region: f } = {}) {
3637
- if (!c || !t || !s || typeof e != "function" || !ro(c, l)) return { status: Z.SKIPPED };
3638
- let p = ao({
3650
+ if (!c || !t || !s || typeof e != "function" || !io(c, l)) return { status: Z.SKIPPED };
3651
+ let p = oo({
3639
3652
  module: t,
3640
3653
  field: s,
3641
3654
  recordId: u,
3642
- normalized: no(l, c.normalizer)
3655
+ normalized: ro(l, c.normalizer)
3643
3656
  });
3644
3657
  if (n.has(p)) return n.get(p);
3645
3658
  i += 1;
@@ -3657,7 +3670,7 @@ function oo({ checkFieldUnique: e, onPendingChange: t } = {}) {
3657
3670
  if (r.get(s) !== m) return { status: Z.STALE };
3658
3671
  let a = i?.available === !1 ? {
3659
3672
  status: Z.DUPLICATE,
3660
- message: so(i) || c.message || Xa
3673
+ message: co(i) || c.message || Za
3661
3674
  } : { status: Z.AVAILABLE };
3662
3675
  return n.set(p, a), a;
3663
3676
  } catch (e) {
@@ -3678,17 +3691,17 @@ function oo({ checkFieldUnique: e, onPendingChange: t } = {}) {
3678
3691
  }
3679
3692
  };
3680
3693
  }
3681
- function so(e) {
3694
+ function co(e) {
3682
3695
  return (e?.errors ?? []).find((e) => e?.message)?.message || e?.message || "";
3683
3696
  }
3684
- var co = "__uniqueRule";
3685
- function lo({ field: e, validation: t, context: n }) {
3686
- let r = Qa(t);
3697
+ var lo = "__uniqueRule";
3698
+ function uo({ field: e, validation: t, context: n }) {
3699
+ let r = $a(t);
3687
3700
  if (!r) return { validator: () => Promise.resolve() };
3688
3701
  let i = e?.field ?? "";
3689
3702
  return !n?.checker || !n?.module || !i ? { validator: () => Promise.resolve() } : {
3690
- [co]: r,
3691
- validateTrigger: io(r),
3703
+ [lo]: r,
3704
+ validateTrigger: ao(r),
3692
3705
  validator: async (e, t) => {
3693
3706
  let a = await n.checker.check({
3694
3707
  module: n.module,
@@ -3703,22 +3716,22 @@ function lo({ field: e, validation: t, context: n }) {
3703
3716
  }
3704
3717
  };
3705
3718
  }
3706
- function uo(e = []) {
3719
+ function fo(e = []) {
3707
3720
  let t = Array.isArray(e) ? e : [];
3708
- if (!t.some((e) => e && e[co])) return t;
3709
- let n = t.filter((e) => e && !e[co]);
3721
+ if (!t.some((e) => e && e[lo])) return t;
3722
+ let n = t.filter((e) => e && !e[lo]);
3710
3723
  return t.map((e) => {
3711
- if (!e || !e[co]) return e;
3724
+ if (!e || !e[lo]) return e;
3712
3725
  let t = e.validator;
3713
3726
  return {
3714
3727
  ...e,
3715
- validator: async (e, r) => await fo(n, r, e) ? Promise.resolve() : t(e, r)
3728
+ validator: async (e, r) => await po(n, r, e) ? Promise.resolve() : t(e, r)
3716
3729
  };
3717
3730
  });
3718
3731
  }
3719
- async function fo(e = [], t, n = {}) {
3732
+ async function po(e = [], t, n = {}) {
3720
3733
  for (let r of e) if (!(!r || typeof r == "string")) {
3721
- if (r.required && to(t) || !to(t) && (r.pattern instanceof RegExp && !new RegExp(r.pattern.source, r.pattern.flags).test(String(t)) || r.len != null && String(t).length !== Number(r.len))) return !0;
3734
+ if (r.required && no(t) || !no(t) && (r.pattern instanceof RegExp && !new RegExp(r.pattern.source, r.pattern.flags).test(String(t)) || r.len != null && String(t).length !== Number(r.len))) return !0;
3722
3735
  if (typeof r.validator == "function") try {
3723
3736
  await r.validator(n, t);
3724
3737
  } catch {
@@ -3727,7 +3740,7 @@ async function fo(e = [], t, n = {}) {
3727
3740
  }
3728
3741
  return !1;
3729
3742
  }
3730
- function po(e) {
3743
+ function mo(e) {
3731
3744
  let t = String(e ?? "").trim();
3732
3745
  if (!t.startsWith("{")) return null;
3733
3746
  try {
@@ -3736,24 +3749,24 @@ function po(e) {
3736
3749
  return null;
3737
3750
  }
3738
3751
  }
3739
- function mo(e) {
3752
+ function ho(e) {
3740
3753
  if (!e) return null;
3741
- if (typeof e == "string") return po(e);
3754
+ if (typeof e == "string") return mo(e);
3742
3755
  let t = [
3743
3756
  e.data,
3744
3757
  e.response,
3745
3758
  e,
3746
- po(e.message)
3759
+ mo(e.message)
3747
3760
  ];
3748
3761
  for (let e of t) if (!(!e || typeof e != "object") && (Array.isArray(e.errors) || e.code === "DUPLICATE_VALUE")) return e;
3749
3762
  return null;
3750
3763
  }
3751
- function ho(e, { uniqueRules: t = [] } = {}) {
3752
- let n = mo(e);
3764
+ function go(e, { uniqueRules: t = [] } = {}) {
3765
+ let n = ho(e);
3753
3766
  if (n) {
3754
3767
  let e = (Array.isArray(n.errors) ? n.errors : []).filter((e) => e?.field).map((e) => ({
3755
3768
  field: e.field,
3756
- message: e.message || n.message || Xa
3769
+ message: e.message || n.message || Za
3757
3770
  }));
3758
3771
  if (e.length) return e;
3759
3772
  }
@@ -3767,7 +3780,7 @@ function ho(e, { uniqueRules: t = [] } = {}) {
3767
3780
  }
3768
3781
  //#endregion
3769
3782
  //#region src/services/uniqueValidationApi.js
3770
- async function go({ module: e, field: t, value: i, recordId: a, clientId: o, region: s } = {}) {
3783
+ async function _o({ module: e, field: t, value: i, recordId: a, clientId: o, region: s } = {}) {
3771
3784
  if (!e || !t) throw Error("module and field are required to check uniqueness");
3772
3785
  let c = {
3773
3786
  field: t,
@@ -3803,7 +3816,7 @@ async function go({ module: e, field: t, value: i, recordId: a, clientId: o, reg
3803
3816
  }
3804
3817
  //#endregion
3805
3818
  //#region src/components/form/uploadAccept.js
3806
- var _o = [
3819
+ var vo = [
3807
3820
  "jpg",
3808
3821
  "jpeg",
3809
3822
  "png",
@@ -3812,18 +3825,18 @@ var _o = [
3812
3825
  "bmp",
3813
3826
  "svg",
3814
3827
  "avif"
3815
- ], vo = [
3828
+ ], yo = [
3816
3829
  "mp4",
3817
3830
  "webm",
3818
3831
  "ogg",
3819
3832
  "ogv",
3820
3833
  "mov",
3821
3834
  "m4v"
3822
- ], yo = [
3835
+ ], bo = [
3823
3836
  "pdf",
3824
3837
  "doc",
3825
3838
  "docx"
3826
- ], bo = [
3839
+ ], xo = [
3827
3840
  {
3828
3841
  label: "Any file",
3829
3842
  value: "any"
@@ -3844,34 +3857,34 @@ var _o = [
3844
3857
  label: "Images & Videos",
3845
3858
  value: "imagesAndVideos"
3846
3859
  }
3847
- ], xo = {
3860
+ ], So = {
3848
3861
  documents: {
3849
- exts: [...yo, ..._o],
3862
+ exts: [...bo, ...vo],
3850
3863
  hint: "PDF, DOC or image files",
3851
3864
  error: "Only document (PDF/DOC) or image files are allowed"
3852
3865
  },
3853
3866
  images: {
3854
- exts: _o,
3867
+ exts: vo,
3855
3868
  hint: "Image files",
3856
3869
  error: "Only image files are allowed"
3857
3870
  },
3858
3871
  videos: {
3859
- exts: vo,
3872
+ exts: yo,
3860
3873
  hint: "Video files",
3861
3874
  error: "Only video files are allowed"
3862
3875
  },
3863
3876
  imagesAndVideos: {
3864
- exts: [..._o, ...vo],
3877
+ exts: [...vo, ...yo],
3865
3878
  hint: "Image or video files",
3866
3879
  error: "Only image or video files are allowed"
3867
3880
  }
3868
3881
  };
3869
- function So(e) {
3870
- return xo[String(e?.accept ?? "").trim()] ?? null;
3882
+ function Co(e) {
3883
+ return So[String(e?.accept ?? "").trim()] ?? null;
3871
3884
  }
3872
3885
  //#endregion
3873
3886
  //#region src/components/AppButton.jsx
3874
- function Co({ children: e, className: t = "", icon: n, to: r, variant: i = "default", ...a }) {
3887
+ function wo({ children: e, className: t = "", icon: n, to: r, variant: i = "default", ...a }) {
3875
3888
  let o = /* @__PURE__ */ C(v, {
3876
3889
  className: `app-button app-button--${i} ${t}`.trim(),
3877
3890
  icon: n,
@@ -3886,13 +3899,13 @@ function Co({ children: e, className: t = "", icon: n, to: r, variant: i = "defa
3886
3899
  }
3887
3900
  //#endregion
3888
3901
  //#region src/components/detail/userNames.js
3889
- function wo(e) {
3902
+ function To(e) {
3890
3903
  return !e || typeof e != "object" ? "" : [e.first_name ?? e.firstName ?? e.FIRST_NAME, e.last_name ?? e.lastName ?? e.LAST_NAME].filter(Boolean).join(" ").trim() || e.name || e.user_name || e.userName || e.username || e.email || "";
3891
3904
  }
3892
- function To(e) {
3905
+ function Eo(e) {
3893
3906
  let t = {};
3894
3907
  return (Array.isArray(e) ? e : []).forEach((e) => {
3895
- let n = wo(e);
3908
+ let n = To(e);
3896
3909
  n && [
3897
3910
  e.legacyUserId,
3898
3911
  e.userId,
@@ -3906,16 +3919,16 @@ function To(e) {
3906
3919
  });
3907
3920
  }), t;
3908
3921
  }
3909
- var Eo = /* @__PURE__ */ new Map();
3910
- function Do(e) {
3922
+ var Do = /* @__PURE__ */ new Map();
3923
+ function Oo(e) {
3911
3924
  let t = String(e ?? "").trim();
3912
3925
  if (!t) return Promise.resolve("");
3913
- if (Eo.has(t)) return Eo.get(t);
3914
- let i = n(r, `/get-detailed-view?userId=${encodeURIComponent(t)}`).then((e) => wo(e?.data ?? e ?? null)).catch(() => "");
3915
- return Eo.set(t, i), i;
3926
+ if (Do.has(t)) return Do.get(t);
3927
+ let i = n(r, `/get-detailed-view?userId=${encodeURIComponent(t)}`).then((e) => To(e?.data ?? e ?? null)).catch(() => "");
3928
+ return Do.set(t, i), i;
3916
3929
  }
3917
3930
  var Q = (e) => e == null ? "" : String(e).trim();
3918
- function Oo(e) {
3931
+ function ko(e) {
3919
3932
  let t = e?.quickCreateNotice;
3920
3933
  return !t || typeof t != "object" || t.enabled === !1 ? null : {
3921
3934
  enabled: !0,
@@ -3928,7 +3941,7 @@ function Oo(e) {
3928
3941
  creatorLabel: Q(t.creatorLabel) || "Created by"
3929
3942
  };
3930
3943
  }
3931
- var ko = [
3944
+ var Ao = [
3932
3945
  "clientName",
3933
3946
  "companyName",
3934
3947
  "name",
@@ -3938,24 +3951,24 @@ var ko = [
3938
3951
  "label",
3939
3952
  "employerName",
3940
3953
  "vendorName"
3941
- ], Ao = (e, t) => {
3954
+ ], jo = (e, t) => {
3942
3955
  if (!(!e || !t)) return String(t).split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e);
3943
- }, jo = (e) => typeof e == "string" || typeof e == "number" ? Q(e) : e && typeof e == "object" ? Q(e.label ?? e.name ?? e.title ?? "") : "";
3944
- function Mo(e, { recordNameField: t = "", displayField: n = "" } = {}) {
3956
+ }, Mo = (e) => typeof e == "string" || typeof e == "number" ? Q(e) : e && typeof e == "object" ? Q(e.label ?? e.name ?? e.title ?? "") : "";
3957
+ function No(e, { recordNameField: t = "", displayField: n = "" } = {}) {
3945
3958
  if (!e || typeof e != "object") return "";
3946
3959
  for (let r of [
3947
3960
  t,
3948
3961
  n,
3949
- ...ko
3962
+ ...Ao
3950
3963
  ]) {
3951
3964
  if (!r) continue;
3952
- let t = jo(Ao(e, r));
3965
+ let t = Mo(jo(e, r));
3953
3966
  if (t) return t;
3954
3967
  }
3955
3968
  let r = Object.keys(e).find((t) => /name$/i.test(t) && typeof e[t] == "string" && e[t].trim());
3956
3969
  return r ? Q(e[r]) : "";
3957
3970
  }
3958
- function No(e) {
3971
+ function Po(e) {
3959
3972
  if (!e || typeof e != "object") return "";
3960
3973
  let t = [
3961
3974
  e.createdBy,
@@ -3977,36 +3990,36 @@ function No(e) {
3977
3990
  }
3978
3991
  return "";
3979
3992
  }
3980
- function Po(e = o) {
3993
+ function Fo(e = o) {
3981
3994
  try {
3982
- return wo(e()) || "";
3995
+ return To(e()) || "";
3983
3996
  } catch {
3984
3997
  return "";
3985
3998
  }
3986
3999
  }
3987
- var Fo = (e, t) => n(r, `/module/list?module=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`).then((e) => {
4000
+ var Io = (e, t) => n(r, `/module/list?module=${encodeURIComponent(e)}&id=${encodeURIComponent(t)}`).then((e) => {
3988
4001
  let t = e?.data?.data ?? e?.data ?? [];
3989
4002
  return Array.isArray(t) ? t[0] : t;
3990
4003
  });
3991
- async function Io({ module: e, recordId: t, notice: n, displayField: r = "", deps: i = {} } = {}) {
3992
- let { fetchRecord: a = Fo, fetchUserNameFn: s = Do, getUser: c = o } = i, l = null;
4004
+ async function Lo({ module: e, recordId: t, notice: n, displayField: r = "", deps: i = {} } = {}) {
4005
+ let { fetchRecord: a = Io, fetchUserNameFn: s = Oo, getUser: c = o } = i, l = null;
3993
4006
  if (e && t) try {
3994
4007
  l = await a(e, t);
3995
4008
  } catch {
3996
4009
  l = null;
3997
4010
  }
3998
- let u = n?.showRecordName === !1 ? "" : Mo(l, {
4011
+ let u = n?.showRecordName === !1 ? "" : No(l, {
3999
4012
  recordNameField: n?.recordNameField,
4000
4013
  displayField: r
4001
4014
  }), d = "";
4002
4015
  if (n?.showCreator !== !1) {
4003
- let e = No(l);
4016
+ let e = Po(l);
4004
4017
  if (e) try {
4005
4018
  d = Q(await s(e));
4006
4019
  } catch {
4007
4020
  d = "";
4008
4021
  }
4009
- d ||= Po(c);
4022
+ d ||= Fo(c);
4010
4023
  }
4011
4024
  return {
4012
4025
  recordName: u,
@@ -4015,17 +4028,17 @@ async function Io({ module: e, recordId: t, notice: n, displayField: r = "", dep
4015
4028
  }
4016
4029
  //#endregion
4017
4030
  //#region src/components/form/QuickCreateEditField.jsx
4018
- var Lo = d(() => import("./index.js").then((e) => e.i)), Ro = d(() => import("./index.js").then((e) => e.n)), zo = (e) => e == null || e === "", Bo = (e) => typeof e == "string" && e.includes(".") ? e.split(".") : [e];
4019
- function Vo(e, t, n, r, i) {
4031
+ var Ro = d(() => import("./index.js").then((e) => e.i)), zo = d(() => import("./index.js").then((e) => e.n)), Bo = (e) => e == null || e === "", Vo = (e) => typeof e == "string" && e.includes(".") ? e.split(".") : [e];
4032
+ function Ho(e, t, n, r, i) {
4020
4033
  let a = e.quickEditIdFrom;
4021
4034
  if (a) {
4022
- let e = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number" ? [...n.slice(0, 2), ...Bo(a)] : Bo(a), i = t?.getFieldValue?.(e);
4023
- return zo(i) && (i = r?.[a]), zo(i) ? null : i;
4035
+ let e = Array.isArray(n) && n.length >= 3 && typeof n[1] == "number" ? [...n.slice(0, 2), ...Vo(a)] : Vo(a), i = t?.getFieldValue?.(e);
4036
+ return Bo(i) && (i = r?.[a]), Bo(i) ? null : i;
4024
4037
  }
4025
- return i && typeof i == "object" ? i.value ?? null : zo(i) ? null : i;
4038
+ return i && typeof i == "object" ? i.value ?? null : Bo(i) ? null : i;
4026
4039
  }
4027
- function Ho({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValue: a, onDone: o }) {
4028
- let [s, c] = g(null), [l, d] = g(null), f = !!e?.quickCreate, p = !!e?.quickEdit, h = e?.quickCreateModule || e?.lookupCollection || "", _ = e?.quickEditModule || e?.lookupCollection || "", y = m(() => p ? Vo(e, t, n, i, a) : null, [
4040
+ function Uo({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValue: a, onDone: o }) {
4041
+ let [s, c] = g(null), [l, d] = g(null), f = !!e?.quickCreate, p = !!e?.quickEdit, h = e?.quickCreateModule || e?.lookupCollection || "", _ = e?.quickEditModule || e?.lookupCollection || "", y = m(() => p ? Ho(e, t, n, i, a) : null, [
4029
4042
  p,
4030
4043
  e,
4031
4044
  t,
@@ -4038,6 +4051,10 @@ function Ho({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4038
4051
  modal: null
4039
4052
  };
4040
4053
  let x = () => c(null), ne = () => {
4054
+ if (e?.quickCreateOnClick) {
4055
+ e.quickCreateOnClick();
4056
+ return;
4057
+ }
4041
4058
  if (e?.quickCreateRoute) {
4042
4059
  window.open(e.quickCreateRoute, "_blank", "noopener,noreferrer");
4043
4060
  return;
@@ -4051,12 +4068,12 @@ function Ho({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4051
4068
  module: _,
4052
4069
  recordId: String(y)
4053
4070
  }), re = (t) => {
4054
- let n = Oo(e);
4071
+ let n = ko(e);
4055
4072
  n && (d({
4056
4073
  ...n,
4057
4074
  recordName: "",
4058
4075
  creatorName: ""
4059
- }), Io({
4076
+ }), Lo({
4060
4077
  module: h,
4061
4078
  recordId: t,
4062
4079
  notice: n,
@@ -4117,7 +4134,7 @@ function Ho({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4117
4134
  },
4118
4135
  children: /* @__PURE__ */ C(te, {})
4119
4136
  }),
4120
- children: s.mode === "create" ? /* @__PURE__ */ C(Lo, {
4137
+ children: s.mode === "create" ? /* @__PURE__ */ C(Ro, {
4121
4138
  moduleName: s.module,
4122
4139
  embedded: !0,
4123
4140
  breadcrumbItems: [],
@@ -4125,7 +4142,7 @@ function Ho({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4125
4142
  onSuccess: (e) => {
4126
4143
  x(), re(e), o?.("create", e);
4127
4144
  }
4128
- }) : /* @__PURE__ */ C(Ro, {
4145
+ }) : /* @__PURE__ */ C(zo, {
4129
4146
  moduleName: s.module,
4130
4147
  recordId: s.recordId,
4131
4148
  embedded: !0,
@@ -4149,7 +4166,7 @@ function Ho({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4149
4166
  width: "min(520px, 94vw)",
4150
4167
  maskClosable: !1,
4151
4168
  onCancel: () => d(null),
4152
- footer: /* @__PURE__ */ C(Co, {
4169
+ footer: /* @__PURE__ */ C(wo, {
4153
4170
  variant: "primary",
4154
4171
  type: "primary",
4155
4172
  onClick: () => d(null),
@@ -4186,8 +4203,8 @@ function Ho({ field: e, form: t, name: n, moduleName: r, scopeValues: i, ownValu
4186
4203
  }
4187
4204
  //#endregion
4188
4205
  //#region src/components/form/crossFieldRules.js
4189
- var Uo = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0;
4190
- function Wo(e, t, n) {
4206
+ var Wo = (e) => e == null || e === "" || Array.isArray(e) && e.length === 0;
4207
+ function Go(e, t, n) {
4191
4208
  let r = String(t ?? "").includes(".") ? String(t).split(".") : [t];
4192
4209
  if (typeof n == "function") {
4193
4210
  let e = n(t);
@@ -4195,24 +4212,24 @@ function Wo(e, t, n) {
4195
4212
  }
4196
4213
  return Array.isArray(e) && e.length > 1 ? [...e.slice(0, -1), ...r] : r;
4197
4214
  }
4198
- function Go({ label: e, message: t, rule: n = {}, value: r, form: i, name: a, prefixFor: o }) {
4215
+ function Ko({ label: e, message: t, rule: n = {}, value: r, form: i, name: a, prefixFor: o }) {
4199
4216
  let s = n.field ?? n.compareField ?? r;
4200
4217
  return { validator: async (n, r) => {
4201
- if (!s || Uo(r)) return Promise.resolve();
4202
- let c = i?.getFieldValue?.(Wo(a, s, o));
4203
- if (Uo(c)) return Promise.resolve();
4218
+ if (!s || Wo(r)) return Promise.resolve();
4219
+ let c = i?.getFieldValue?.(Go(a, s, o));
4220
+ if (Wo(c)) return Promise.resolve();
4204
4221
  let l = Number(c), u = Number(r);
4205
4222
  return Number.isNaN(l) || Number.isNaN(u) || u <= l ? Promise.resolve() : Promise.reject(Error(t ?? `${e} must not exceed ${s}`));
4206
4223
  } };
4207
4224
  }
4208
- function Ko(e = {}, t, n) {
4225
+ function qo(e = {}, t, n) {
4209
4226
  let r = e.field ?? e.compareField ?? e.value;
4210
- return r ? Wo(t, r, n) : null;
4227
+ return r ? Go(t, r, n) : null;
4211
4228
  }
4212
4229
  //#endregion
4213
4230
  //#region src/components/form/optionConstraints.js
4214
- var qo = (e) => String(e ?? "").trim().toLowerCase();
4215
- function Jo(e) {
4231
+ var Jo = (e) => String(e ?? "").trim().toLowerCase();
4232
+ function Yo(e) {
4216
4233
  let t = Array.isArray(e) ? e : [e], n = [];
4217
4234
  return t.forEach((e) => {
4218
4235
  if (!(e == null || e === "")) {
@@ -4224,46 +4241,46 @@ function Jo(e) {
4224
4241
  e.label,
4225
4242
  e.name
4226
4243
  ].forEach((e) => {
4227
- e != null && e !== "" && n.push(qo(e));
4244
+ e != null && e !== "" && n.push(Jo(e));
4228
4245
  });
4229
4246
  return;
4230
4247
  }
4231
- n.push(qo(e));
4248
+ n.push(Jo(e));
4232
4249
  }
4233
4250
  }), n;
4234
4251
  }
4235
- function Yo(e = [], t) {
4236
- let n = Jo(t);
4252
+ function Xo(e = [], t) {
4253
+ let n = Yo(t);
4237
4254
  if (!n.length || !Array.isArray(e) || e.length === 0) return e;
4238
- let r = new Set(n), i = e.filter((e) => e == null ? !1 : typeof e == "object" ? r.has(qo(e.value)) || r.has(qo(e.label)) : r.has(qo(e)));
4255
+ let r = new Set(n), i = e.filter((e) => e == null ? !1 : typeof e == "object" ? r.has(Jo(e.value)) || r.has(Jo(e.label)) : r.has(Jo(e)));
4239
4256
  return i.length > 0 ? i : e;
4240
4257
  }
4241
4258
  //#endregion
4242
4259
  //#region src/components/form/fieldTooltip.js
4243
- var Xo = (e) => e == null || String(e).trim() === "", Zo = (e) => e === !0 || e === 1 || e === "1" || e === "true";
4244
- function Qo(e) {
4245
- return Xo(e?.tooltip) ? Zo(e?.infoEnabled) && !Xo(e?.infoText) ? String(e.infoText) : "" : String(e.tooltip);
4260
+ var Zo = (e) => e == null || String(e).trim() === "", Qo = (e) => e === !0 || e === 1 || e === "1" || e === "true";
4261
+ function $o(e) {
4262
+ return Zo(e?.tooltip) ? Qo(e?.infoEnabled) && !Zo(e?.infoText) ? String(e.infoText) : "" : String(e.tooltip);
4246
4263
  }
4247
4264
  //#endregion
4248
4265
  //#region src/utils/roleAllowsAction.js
4249
- function $o(e) {
4250
- return e == null ? !0 : typeof e == "object" ? $o(e.permission ?? e.allowed ?? e.value) : e !== !1 && e !== 0 && e !== "0";
4266
+ function es(e) {
4267
+ return e == null ? !0 : typeof e == "object" ? es(e.permission ?? e.allowed ?? e.value) : e !== !1 && e !== 0 && e !== "0";
4251
4268
  }
4252
- function es(e, t) {
4269
+ function ts(e, t) {
4253
4270
  if (!e) return !0;
4254
4271
  try {
4255
4272
  let n = JSON.parse(localStorage.getItem("menuPermission") || "{}"), [r, i] = String(e).split(".");
4256
- return $o((n[r || String(t || "").replace(/s$/i, "")] ?? n[String(t || "")] ?? n[String(t || "").replace(/s$/i, "")] ?? {})[i]);
4273
+ return es((n[r || String(t || "").replace(/s$/i, "")] ?? n[String(t || "")] ?? n[String(t || "").replace(/s$/i, "")] ?? {})[i]);
4257
4274
  } catch {
4258
4275
  return !0;
4259
4276
  }
4260
4277
  }
4261
4278
  //#endregion
4262
4279
  //#region src/utils/afterSubmitNav.js
4263
- function ts(e) {
4280
+ function ns(e) {
4264
4281
  return (e ?? []).filter((e) => e?.afterSubmit?.mode).sort((e, t) => (e.order ?? 0) - (t.order ?? 0))[0]?.afterSubmit ?? null;
4265
4282
  }
4266
- function ns(e, t, n) {
4283
+ function rs(e, t, n) {
4267
4284
  let r = String(e ?? "").trim();
4268
4285
  return !r || !r.startsWith("/") || r.startsWith("//") || /^[a-z][a-z0-9+.-]*:/i.test(r) ? null : r.replace(/:([A-Za-z_][\w]*)/g, (e, r) => {
4269
4286
  let i = r === "id" ? t : n?.[r];
@@ -4272,29 +4289,29 @@ function ns(e, t, n) {
4272
4289
  }
4273
4290
  //#endregion
4274
4291
  //#region src/utils/submitMessages.js
4275
- function rs(e) {
4292
+ function is(e) {
4276
4293
  return (e ?? []).filter((e) => e?.submitMessages && typeof e.submitMessages == "object").sort((e, t) => (e.order ?? 0) - (t.order ?? 0))[0]?.submitMessages ?? null;
4277
4294
  }
4278
4295
  function $(e) {
4279
4296
  let t = String(e ?? "").trim();
4280
4297
  return t ? t.charAt(0).toUpperCase() + t.slice(1) : "Record";
4281
4298
  }
4282
- function is(e, t) {
4299
+ function as(e, t) {
4283
4300
  return String(e).replaceAll("${module}", $(t)).replaceAll("${moduleName}", $(t));
4284
4301
  }
4285
- function as(e, t, n) {
4286
- let r = rs(e);
4302
+ function os(e, t, n) {
4303
+ let r = is(e);
4287
4304
  if (r?.suppress) return null;
4288
4305
  let i = n === "edit" ? r?.editSuccess : r?.addSuccess;
4289
- return i && String(i).trim() ? is(i, t) : n === "edit" ? `${$(t)} has Updated successfully` : `${$(t)} has added successfully`;
4306
+ return i && String(i).trim() ? as(i, t) : n === "edit" ? `${$(t)} has Updated successfully` : `${$(t)} has added successfully`;
4290
4307
  }
4291
- function os(e, t, n, r) {
4292
- let i = rs(e), a = n === "edit" ? i?.editError : i?.addError;
4293
- return a && String(a).trim() ? is(a, t) : r && String(r).trim() ? String(r) : n === "edit" ? `Failed to update ${$(t)}` : `Failed to create ${$(t)}`;
4308
+ function ss(e, t, n, r) {
4309
+ let i = is(e), a = n === "edit" ? i?.editError : i?.addError;
4310
+ return a && String(a).trim() ? as(a, t) : r && String(r).trim() ? String(r) : n === "edit" ? `Failed to update ${$(t)}` : `Failed to create ${$(t)}`;
4294
4311
  }
4295
4312
  //#endregion
4296
4313
  //#region src/utils/scrollToFirstFormError.js
4297
- function ss({ errorFields: e } = {}, t) {
4314
+ function cs({ errorFields: e } = {}, t) {
4298
4315
  if (!e?.length) return;
4299
4316
  let n = e[0]?.name;
4300
4317
  setTimeout(() => {
@@ -4319,10 +4336,10 @@ function ss({ errorFields: e } = {}, t) {
4319
4336
  }
4320
4337
  //#endregion
4321
4338
  //#region src/components/form/conditionalFieldLabel.js
4322
- function cs(e) {
4339
+ function ls(e) {
4323
4340
  return Array.isArray(e) ? e.map((e) => String(e ?? "").trim()) : String(e ?? "").split(",").map((e) => e.trim());
4324
4341
  }
4325
- function ls(e, t) {
4342
+ function us(e, t) {
4326
4343
  if (!e?.field) return !1;
4327
4344
  switch (e.operator ?? "eq") {
4328
4345
  case "eq": return String(t ?? "") === String(e.value ?? "");
@@ -4330,38 +4347,38 @@ function ls(e, t) {
4330
4347
  case "truthy": return t != null && t !== "" && t !== !1;
4331
4348
  case "falsy": return t == null || t === "" || t === !1;
4332
4349
  case "notEmpty": return Array.isArray(t) ? t.length > 0 : !!t;
4333
- case "in": return cs(e.value).includes(String(t ?? ""));
4334
- case "notIn": return !cs(e.value).includes(String(t ?? ""));
4350
+ case "in": return ls(e.value).includes(String(t ?? ""));
4351
+ case "notIn": return !ls(e.value).includes(String(t ?? ""));
4335
4352
  default: return !1;
4336
4353
  }
4337
4354
  }
4338
- function us(e, t, n = !1) {
4355
+ function ds(e, t, n = !1) {
4339
4356
  let r = n ? e?.combineLabel ?? e?.label : e?.label, i = e?.labelWhen;
4340
- return ls(i, t) && i?.label ? i.label : r;
4357
+ return us(i, t) && i?.label ? i.label : r;
4341
4358
  }
4342
- function ds(e) {
4359
+ function fs(e) {
4343
4360
  return e ? [...e.field ? [e] : [], ...(e.conditions ?? []).filter((e) => e?.field)] : [];
4344
4361
  }
4345
- function fs(e, t) {
4346
- let n = ds(e);
4362
+ function ps(e, t) {
4363
+ let n = fs(e);
4347
4364
  if (!n.length) return !0;
4348
- let r = n.map((e) => ls(e, t(e.field)));
4365
+ let r = n.map((e) => us(e, t(e.field)));
4349
4366
  return e.logic === "or" ? r.some(Boolean) : r.every(Boolean);
4350
4367
  }
4351
- function ps(e) {
4368
+ function ms(e) {
4352
4369
  let t = e?.colWhen;
4353
4370
  return t ? (Array.isArray(t) ? t : [t]).filter((e) => e?.field && Number(e?.col) > 0) : [];
4354
4371
  }
4355
- function ms(e, t, n) {
4356
- for (let t of ps(e)) if (ls(t, n(t))) return Number(t.col);
4372
+ function hs(e, t, n) {
4373
+ for (let t of ms(e)) if (us(t, n(t))) return Number(t.col);
4357
4374
  return t;
4358
4375
  }
4359
- function hs(e, t) {
4376
+ function gs(e, t) {
4360
4377
  return e?.field ? t == null ? [e.field] : [...Array.isArray(t) ? t : [t], e.field] : ["__noop_conditional_label__"];
4361
4378
  }
4362
4379
  //#endregion
4363
4380
  //#region src/components/Breadcrumb.jsx
4364
- function gs({ items: e = [] }) {
4381
+ function _s({ items: e = [] }) {
4365
4382
  return /* @__PURE__ */ C(_, { items: e.map((t, n) => ({ title: n === e.length - 1 ? /* @__PURE__ */ C(Be, {
4366
4383
  variant: "body",
4367
4384
  weight: "medium",
@@ -4377,6 +4394,6 @@ function gs({ items: e = [] }) {
4377
4394
  }) })) });
4378
4395
  }
4379
4396
  //#endregion
4380
- export { Zi as $, Tn as $n, In as $t, oo as A, Vn as An, Gt as At, ja as B, Pt as Bn, mn as Bt, Co as C, jt as Cn, Fr as Ct, uo as D, sr as Dn, Tr as Dt, go as E, Dn as En, Er as Et, Ga as F, Qt as Fn, Hn as Ft, J as G, fr as Gn, Ft as Gt, da as H, Ln as Hn, nr as Ht, Ua as I, tn as In, gr as It, sa as J, Sr as Jn, Ut as Jt, wa as K, ar as Kn, vr as Kt, Va as L, pn as Ln, qt as Lt, Ka as M, Jt as Mn, ir as Mt, Ya as N, an as Nn, er as Nt, lo as O, hr as On, Yt as Ot, Ja as P, ln as Pn, xr as Pt, ia as Q, _r as Qn, wn as Qt, Ha as R, It as Rn, on as Rt, To as S, Wt as Sn, Or as St, So as T, bn as Tn, jr as Tt, ua as U, hn as Un, Cr as Ut, Da as V, Pn as Vn, or as Vt, fa as W, Kt as Wn, Wn as Wt, q as X, An as Xn, rn as Xt, ca as Y, Un as Yn, Ht as Yt, Qi as Z, cr as Zn, xn as Zt, Yo as _, br as _n, Vr as _t, us as a, Zn as an, _t as ar, zi as at, Ho as b, qn as bn, Pr as bt, ds as c, en as cn, ut as cr, Yr as ct, as as d, dn, He as dr, Lr as dt, Qn as en, Fn as er, ki as et, ts as f, gn as fn, Be as fr, Kr as ft, Qo as g, $n as gn, qr as gt, es as h, rr as hn, Ur as ht, ls as i, un as in, wt as ir, ra as it, ho as j, Nt as jn, dr as jt, eo as k, On as kn, _n as kt, ss as l, Rn as ln, lt as lr, Xr as lt, $o as m, Kn as mn, E as mr, zr as mt, ps as n, Lt as nn, Yn as nr, K as nt, fs as o, ur as on, vt as or, Ri as ot, ns as p, Gn as pn, D as pr, Gr as pt, oa as q, tr as qn, Bn as qt, hs as r, cn as rn, Tt as rr, Gi as rt, ms as s, Zt as sn, yt as sr, fi as st, gs as t, Xn as tn, zn as tr, V as tt, os as u, fn as un, ct as ur, Jr as ut, Ko as v, Mt as vn, Wr as vt, bo as w, Nn as wn, Ar as wt, Do as x, vn as xn, kr as xt, Go as y, Rt as yn, Ir as yt, Ma as z, Jn as zn, pr as zt };
4397
+ export { Zi as $, Tn as $n, In as $t, so as A, Vn as An, Kt as At, Ma as B, Pt as Bn, hn as Bt, wo as C, jt as Cn, Fr as Ct, fo as D, sr as Dn, Tr as Dt, _o as E, Dn as En, Er as Et, Ka as F, $t as Fn, Hn as Ft, J as G, fr as Gn, Ft as Gt, da as H, Ln as Hn, nr as Ht, Wa as I, nn as In, gr as It, sa as J, Sr as Jn, Wt as Jt, wa as K, ar as Kn, vr as Kt, Ha as L, mn as Ln, Jt as Lt, qa as M, Yt as Mn, ir as Mt, Xa as N, on as Nn, er as Nt, uo as O, hr as On, Xt as Ot, Ya as P, un as Pn, xr as Pt, ia as Q, _r as Qn, wn as Qt, Ua as R, It as Rn, sn as Rt, Eo as S, Gt as Sn, Or as St, Co as T, I as Tn, jr as Tt, ua as U, gn as Un, Cr as Ut, Da as V, Pn as Vn, or as Vt, fa as W, qt as Wn, Wn as Wt, q as X, An as Xn, an as Xt, ca as Y, Un as Yn, Ut as Yt, Qi as Z, cr as Zn, xn as Zt, Xo as _, br as _n, Vr as _t, ds as a, Zn as an, _t as ar, zi as at, Uo as b, qn as bn, Pr as bt, fs as c, tn as cn, ut as cr, Yr as ct, os as d, fn as dn, He as dr, Lr as dt, Qn as en, Fn as er, ki as et, ns as f, _n as fn, Be as fr, Kr as ft, $o as g, $n as gn, qr as gt, ts as h, rr as hn, Ur as ht, us as i, dn as in, wt as ir, ra as it, go as j, Nt as jn, dr as jt, to as k, On as kn, vn as kt, cs as l, Rn as ln, lt as lr, Xr as lt, es as m, Kn as mn, E as mr, zr as mt, ms as n, Lt as nn, Yn as nr, K as nt, ps as o, ur as on, vt as or, Ri as ot, rs as p, Gn as pn, D as pr, Gr as pt, oa as q, tr as qn, Bn as qt, gs as r, ln as rn, Tt as rr, Gi as rt, hs as s, Qt as sn, yt as sr, fi as st, _s as t, Xn as tn, zn as tr, V as tt, ss as u, pn as un, ct as ur, Jr as ut, qo as v, Mt as vn, Wr as vt, xo as w, Nn as wn, Ar as wt, Oo as x, yn as xn, kr as xt, Ko as y, Rt as yn, Ir as yt, Na as z, Jn as zn, pr as zt };
4381
4398
 
4382
- //# sourceMappingURL=Breadcrumb-Db_WFy70.js.map
4399
+ //# sourceMappingURL=Breadcrumb-DoifsTga.js.map