@g1cloud/entity-modeler-next 5.0.0-beta.50 → 5.0.0-beta.51

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.
@@ -18104,8 +18104,9 @@ function DN(e, t, n = Ye) {
18104
18104
  return r;
18105
18105
  }
18106
18106
  function jn(e, t, n) {
18107
- for (const o of t) n.push({ entityId: e, attributeId: o });
18108
- return t.map((o) => bm(e, o));
18107
+ const o = new Set(n.map((a) => `${a.entityId}\0${a.attributeId}`)), i = t.filter((a) => !o.has(`${e}\0${a}`));
18108
+ for (const a of i) n.push({ entityId: e, attributeId: a });
18109
+ return i.map((a) => bm(e, a));
18109
18110
  }
18110
18111
  function mn(e, t) {
18111
18112
  if (!t.length) return [];
@@ -19717,12 +19718,13 @@ function oC(e, t, n) {
19717
19718
  }
19718
19719
  for (const g of h.values()) {
19719
19720
  if (g.length < 2) continue;
19720
- const f = g[0].name;
19721
- if (g.every((y) => y.name === f))
19722
- for (const y of g) {
19723
- const w = u.get(y.attrId);
19724
- w ? w.add(y.slot) : u.set(y.attrId, /* @__PURE__ */ new Set([y.slot]));
19725
- }
19721
+ const f = /* @__PURE__ */ new Map();
19722
+ for (const y of g) f.set(y.name, (f.get(y.name) ?? 0) + 1);
19723
+ for (const y of g) {
19724
+ if ((f.get(y.name) ?? 0) < 2) continue;
19725
+ const w = u.get(y.attrId);
19726
+ w ? w.add(y.slot) : u.set(y.attrId, /* @__PURE__ */ new Set([y.slot]));
19727
+ }
19726
19728
  }
19727
19729
  const p = { effectiveAttrs: s, embedCols: r, collectionTypes: l, redundantSlots: u }, v = n == null ? void 0 : n.get(a.modelId);
19728
19730
  i.set(a.modelId, v && tC(p, v) ? v : p);