xvai-loi 0.1.84 → 0.1.86

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 (3) hide show
  1. package/co.txt +1 -1
  2. package/package.json +1 -1
  3. package/xvai-loi.js +20 -7
package/co.txt CHANGED
@@ -1 +1 @@
1
- xvaiLoi120106
1
+ xvaiLoi120301
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xvai-loi",
3
- "version": "0.1.84",
3
+ "version": "0.1.86",
4
4
  "description": "Loi dung video (Edit Video Tu Dong) nap vao tool Google Flow qua o cam engine/oCam.ts",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
package/xvai-loi.js CHANGED
@@ -10855,14 +10855,14 @@ dangKy("cmNen", (g, d, tuoi, W4, H2, nen2, _s, dai2) => {
10855
10855
  if (hv2 > 0) g.drawImage(vt, W4 / 2 - wv / 2, yv - hv2 / 2, wv, hv2);
10856
10856
  g.restore();
10857
10857
  }
10858
- const t2 = d.tieu ? haiDong4(g, String(d.tieu), 122 * H2 / 1920, 0.76 * W4, KHUON_TOPN.chu.caoMin / 0.92 * H2, 0.05 * H2) : null;
10859
- if (t2) chu2(g, t2[0], W4 / 2, (t2[2] ? 0.118 : 0.135) * H2 + (1 - ka) * 70 * H2 / 1920, t2[1], "brand", kep12(tuoi / 0.15), 0.76 * W4);
10858
+ const t2 = d.tieu ? haiDong4(g, String(d.tieu), 122 * H2 / 1920, 0.76 * W4, KHUON_TOPN.chu.caoMin / 0.92 * H2, 0.046 * H2) : null;
10859
+ if (t2) chu2(g, t2[0], W4 / 2, (t2[2] ? 0.15 : 0.135) * H2 + (1 - ka) * 70 * H2 / 1920, t2[1], "brand", kep12(tuoi / 0.15), 0.76 * W4);
10860
10860
  if (d.so) {
10861
10861
  g.save();
10862
10862
  g.globalAlpha = a * kep12((tuoi - 0.15) / 0.2);
10863
10863
  g.font = "900 " + (0.02 * H2).toFixed(1) + "px " + FB;
10864
10864
  const t = (d.nhom || "M\u1EE4C") + " " + d.so + "/" + d.N, tw = g.measureText(t).width + 0.05 * W4;
10865
- const dy = t2 && t2[2] ? 0.01 * H2 : 0;
10865
+ const dy = t2 && t2[2] ? 0.04 * H2 : 0;
10866
10866
  bo(g, W4 / 2 - tw / 2, 0.172 * H2 + dy, tw, 0.034 * H2, 0.017 * H2);
10867
10867
  g.fillStyle = "rgba(20,20,26,0.85)";
10868
10868
  g.fill();
@@ -10874,11 +10874,11 @@ dangKy("cmNen", (g, d, tuoi, W4, H2, nen2, _s, dai2) => {
10874
10874
  }
10875
10875
  if (d.ui) theUI(g, d.ui, tuoi, W4, H2, 1);
10876
10876
  if (d.hang) {
10877
- let yh = d.so ? 0.23 : 0.17, kh = 1;
10877
+ let yh = (d.so ? 0.23 : 0.17) + (t2 && t2[2] ? 0.04 : 0), kh = 1;
10878
10878
  const L2 = luoiNguoi2(p || (nen2 ? nguoi(nen2, W4, H2) : null), d), F2 = F || (nen2 ? dauCanh(d, nen2, W4, H2) : null);
10879
10879
  if (L2 && F2) {
10880
10880
  const tt = d.bo === "cut" && p ? THU_HANG : 1, Lt = tt < 1 ? thuLuoi(L2, tt) : L2, Ft = tt < 1 ? [0.5 + tt * (F2[0] - 0.5), 1 - tt * (1 - F2[1]), 0.5 + tt * (F2[2] - 0.5), 1 - tt * (1 - F2[3])] : F2;
10881
- const nr = Math.ceil(d.hang.length / (d.hang.length > 3 ? 2 : 1)), hb2 = nr * 0.078, c = datKhoiChu({ luoi: Lt, mat: [Ft[0], Ft[1] + 0.25 * (Ft[3] - Ft[1]), Ft[2], Ft[3]], dinh: Ft[1], cam: Ft[3] }, { h: hb2, w: d.hang.length > 3 ? 0.87 : 0.7 }, false, false, void 0, false, W4 / H2, [[0, 0, 1, d.so ? 0.21 : 0.17]]);
10881
+ const nr = Math.ceil(d.hang.length / (d.hang.length > 3 ? 2 : 1)), hb2 = nr * 0.078, c = datKhoiChu({ luoi: Lt, mat: [Ft[0], Ft[1] + 0.25 * (Ft[3] - Ft[1]), Ft[2], Ft[3]], dinh: Ft[1], cam: Ft[3] }, { h: hb2, w: d.hang.length > 3 ? 0.87 : 0.7 }, false, false, void 0, false, W4 / H2, [[0, 0, 1, (d.so ? 0.21 : 0.17) + (t2 && t2[2] ? 0.04 : 0)]]);
10882
10882
  if (c.k > 0) {
10883
10883
  kh = c.k;
10884
10884
  yh = c.y - hb2 * c.k / 2;
@@ -12947,6 +12947,15 @@ function lapCuongMe(o) {
12947
12947
  sp.splice(i, 1);
12948
12948
  }
12949
12949
  }
12950
+ sp.forEach((x) => {
12951
+ const c2 = nt(x.chu2), c1 = nt(x.giant || x.chu || x.tieu);
12952
+ if (!c2 || !c1) return;
12953
+ const W1 = new Set(c1.split(/\s+/));
12954
+ if (c2.split(/\s+/).every((w) => W1.has(w))) {
12955
+ ghiL("doi", x, "chu2 trung y chu chinh: " + String(x.chu2).slice(0, 20));
12956
+ x.chu2 = "";
12957
+ }
12958
+ });
12950
12959
  }
12951
12960
  {
12952
12961
  sp.sort((p, q) => p.f - q.f);
@@ -13077,7 +13086,7 @@ function lapCuongMe(o) {
13077
13086
  G4.__doiNguoiBo = nD;
13078
13087
  }
13079
13088
  {
13080
- const coC = (x) => x.bo !== "phong" && !!String(x.giant || x.chu || x.tieu || "").trim(), C2 = sp.filter(coC).sort((p, q) => p.f - q.f), tran = Math.floor(0.9 * KHUON_TOPN.chu.phut[1] * tong / 60);
13089
+ const coC = (x) => x.bo !== "phong" && (!!String(x.giant || x.chu || x.tieu || "").trim() || x.bo === "kinh" && Array.isArray(x.dong) && x.dong.length > 0), C2 = sp.filter(coC).sort((p, q) => p.f - q.f), tran = Math.floor(0.9 * KHUON_TOPN.chu.phut[1] * tong / 60);
13081
13090
  let nT = 0;
13082
13091
  while (C2.length > tran) {
13083
13092
  let j = -1, m = 1e9;
@@ -13239,6 +13248,10 @@ function lapCuongMe(o) {
13239
13248
  }
13240
13249
  });
13241
13250
  if (s.bo === "card" || s.bo === "cut" || s.bo === "chia") (ms || []).forEach((q) => {
13251
+ if (q.kind === "sub" && q.t0 >= b - 0.06 && q.t0 < b + 0.04 && q.t1 > b + 0.2) {
13252
+ q.t0 = +(b + 0.04).toFixed(3);
13253
+ return;
13254
+ }
13242
13255
  if (q.kind === "sub" && q.t0 >= a - 0.2 && q.t0 < b && q.t1 <= b + 0.05) q.safeY = s.bo === "chia" ? 0.47 : s.bo === "card" ? 0.87 : 0.775;
13243
13256
  else if (s.bo === "chia" && q.kind === "sub" && q.t1 > a && q.t0 < b) q.safeY = 0.79;
13244
13257
  });
@@ -20990,7 +21003,7 @@ function datCauLenh(a) {
20990
21003
  on2 = true;
20991
21004
  window.addEventListener("message", async (ev) => {
20992
21005
  const d = ev.data;
20993
- if (!d || d.xvaiLoi120106 !== true) return;
21006
+ if (!d || d.xvaiLoi120301 !== true) return;
20994
21007
  const o = String(ev.origin || "");
20995
21008
  if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
20996
21009
  const tra = (kq) => {