xvai-loi 0.1.72 → 0.1.73

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 +18 -5
package/co.txt CHANGED
@@ -1 +1 @@
1
- xvaiLoi111816
1
+ xvaiLoi111825
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xvai-loi",
3
- "version": "0.1.72",
3
+ "version": "0.1.73",
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
@@ -9827,8 +9827,8 @@ var KHUON_TOPN = {
9827
9827
  cat: { moi10s: [4, 6] },
9828
9828
  nguoi: { phongToiDa: 1.8, matToiDa: 0.55 },
9829
9829
  // matToiDa: hộp đầu (tóc→cằm) cao hơn 0,55 H thì KHÔNG dùng ô người / chia (không vừa ô) // MỌI ô người (PIP, thẻ, chia) phóng khung gốc tối đa 1,8× (độ nét) — trước: PIP 1,6, thẻ 1,3 (B05-1027: thẻ hiện cả người nhỏ)
9830
- bien: { dau: 3, cuoi: 2.5, ctaAnh: true }
9831
- // không đặt ảnh trám ở 3 s đầu (móc) và 2,5 s cuối; vùng CTA VẪN có ảnh (đối thủ CTA 8,7 s vẫn trám)
9830
+ bien: { dau: 1.5, cuoi: 2.5, ctaAnh: true }
9831
+ // không đặt ảnh trám ở 1,5 s đầu (móc; bàn thử 13 video: 3 → 1,5 s nâng 1/3 đầu T2 63→87, B05 23→42, B08 25→45, không video nào tụt) và 2,5 s cuối; vùng CTA VẪN có ảnh (đối thủ CTA 8,7 s vẫn trám)
9832
9832
  };
9833
9833
  var HU3 = /^(và|với|là|thì|mà|nhưng|rồi|cái|những|các|một|này|đó|chúng|ta|tôi|mình|bạn|em|anh|chị|của|cho|để|nên|vì|cũng|đã|đang|sẽ|có|không|được|rất|ạ|nhé|nha|à|ơi|lại|ra|vào|đi|nó|họ|hãy|chỉ|cần|phải|mới|khi|nếu|vậy|thế|như|từ|trong|về|bị|hết|luôn|sau|trước)$/i;
9834
9834
  var sach2 = (x) => String(x || "").replace(/[.,!?;:…"“”]/g, "");
@@ -17783,6 +17783,14 @@ async function kichBanDoan(ws) {
17783
17783
  }
17784
17784
  } catch (e) {
17785
17785
  }
17786
+ try {
17787
+ const b = await docDem("kb:" + khoa3);
17788
+ if (b && b.moc) {
17789
+ globalThis.__kbNguon = "ben";
17790
+ return JSON.parse(JSON.stringify(b));
17791
+ }
17792
+ } catch (e) {
17793
+ }
17786
17794
  if (cm) {
17787
17795
  const dau = van.dau;
17788
17796
  for (const k of Object.keys(localStorage)) {
@@ -17843,6 +17851,10 @@ async function kichBanDoan(ws) {
17843
17851
  localStorage.setItem(khoa3, JSON.stringify({ ...j, van }));
17844
17852
  } catch (e) {
17845
17853
  }
17854
+ try {
17855
+ ghiDem("kb:" + khoa3, JSON.parse(JSON.stringify({ ...j, van })));
17856
+ } catch (e) {
17857
+ }
17846
17858
  return j;
17847
17859
  }
17848
17860
  } catch (e) {
@@ -18663,9 +18675,10 @@ async function goi(de, ar, bao) {
18663
18675
  }
18664
18676
  async function mot(d, ten, de, ar, bao) {
18665
18677
  if (taiSan(ten)) return true;
18678
+ const kTen = (/no faces/i.test(de) ? "ten2:" : "ten:") + ten;
18666
18679
  let a = await doc22(d, de);
18667
18680
  if (!a) {
18668
- a = await doc22(d, "ten:" + ten);
18681
+ a = await doc22(d, kTen);
18669
18682
  if (a) ghi2(d, de, a);
18670
18683
  }
18671
18684
  if (!a && khoaAnhDen() > Date.now()) throw new Error("\u0110ang t\u1EA1m kho\xE1 t\u1EA1o \u1EA3nh t\u1EDBi " + new Date(khoaAnhDen()).toLocaleTimeString());
@@ -18682,7 +18695,7 @@ async function mot(d, ten, de, ar, bao) {
18682
18695
  if (!r || !r.base64) return false;
18683
18696
  a = { base64: r.base64, mimeType: r.mimeType || "image/png" };
18684
18697
  ghi2(d, de, a);
18685
- ghi2(d, "ten:" + ten, a);
18698
+ ghi2(d, kTen, a);
18686
18699
  }
18687
18700
  const s = atob(String(a.base64).split(",").pop() || ""), u = new Uint8Array(s.length);
18688
18701
  for (let i = 0; i < s.length; i++) u[i] = s.charCodeAt(i);
@@ -20743,7 +20756,7 @@ function datCauLenh(a) {
20743
20756
  on2 = true;
20744
20757
  window.addEventListener("message", async (ev) => {
20745
20758
  const d = ev.data;
20746
- if (!d || d.xvaiLoi111816 !== true) return;
20759
+ if (!d || d.xvaiLoi111825 !== true) return;
20747
20760
  const o = String(ev.origin || "");
20748
20761
  if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
20749
20762
  const tra = (kq) => {