xvai-loi 0.1.63 → 0.1.65

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 +99 -17
package/co.txt CHANGED
@@ -1 +1 @@
1
- xvaiLoi111249
1
+ xvaiLoi111348
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xvai-loi",
3
- "version": "0.1.63",
3
+ "version": "0.1.65",
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
@@ -1462,9 +1462,83 @@ function sampleFromLandmarks(t, lm) {
1462
1462
  const eyeY = ((lm[33]?.y ?? face.y) + (lm[263]?.y ?? face.y)) / 2;
1463
1463
  return { t, face, headTop, chin, mouth: bounds(lm, LIPS), eyeY, confidence: 1 };
1464
1464
  }
1465
+ var SEG = "https://storage.googleapis.com/mediapipe-models/image_segmenter/selfie_segmenter/float16/latest/selfie_segmenter.tflite";
1466
+ var segP = null;
1467
+ function napSeg() {
1468
+ if (!segP) segP = (async () => {
1469
+ const imp = new Function("u", "return import(u)"), mod = await imp(CDN + "/vision_bundle.mjs"), v = await mod.FilesetResolver.forVisionTasks(CDN + "/wasm");
1470
+ return mod.ImageSegmenter.createFromOptions(v, { baseOptions: { modelAssetPath: SEG, delegate: "CPU" }, runningMode: "IMAGE", outputConfidenceMasks: true, outputCategoryMask: false });
1471
+ })().catch(() => null);
1472
+ return segP;
1473
+ }
1474
+ function luoiNguoi(seg2, canvas) {
1475
+ let r = null;
1476
+ try {
1477
+ r = seg2.segment(canvas);
1478
+ } catch (e) {
1479
+ return null;
1480
+ }
1481
+ const m = r && r.confidenceMasks && r.confidenceMasks[0];
1482
+ if (!m) return null;
1483
+ const f2 = m.getAsFloat32Array(), mw = m.width, mh = m.height, g = new Uint8Array(36 * 64);
1484
+ for (let y = 0; y < 64; y++) for (let x = 0; x < 36; x++) {
1485
+ let s = 0, n = 0;
1486
+ for (let yy = Math.floor(y * mh / 64); yy < Math.floor((y + 1) * mh / 64); yy++) for (let xx = Math.floor(x * mw / 36); xx < Math.floor((x + 1) * mw / 36); xx++) {
1487
+ s += f2[yy * mw + xx];
1488
+ n++;
1489
+ }
1490
+ g[y * 36 + x] = n && s / n > 0.5 ? 1 : 0;
1491
+ }
1492
+ try {
1493
+ r.close && r.close();
1494
+ } catch (e) {
1495
+ }
1496
+ return g;
1497
+ }
1465
1498
  async function detectOnCanvas(landmarker, canvas, t) {
1466
1499
  const res = landmarker.detect(canvas);
1467
- return sampleFromLandmarks(t, res && res.faceLandmarks && res.faceLandmarks[0]);
1500
+ let s = sampleFromLandmarks(t, res && res.faceLandmarks && res.faceLandmarks[0]);
1501
+ const seg2 = await napSeg(), g = seg2 ? luoiNguoi(seg2, canvas) : null, W4 = canvas.width, H2 = canvas.height;
1502
+ if (!s.face && g) {
1503
+ let r0 = -1;
1504
+ for (let y = 0; y < 64 && r0 < 0; y++) for (let x = 0; x < 36; x++) if (g[y * 36 + x]) {
1505
+ r0 = y;
1506
+ break;
1507
+ }
1508
+ if (r0 >= 0) {
1509
+ let c0 = 36, c1 = -1, sx = 0, n = 0;
1510
+ for (let y = r0; y < Math.min(64, r0 + 6); y++) for (let x = 0; x < 36; x++) if (g[y * 36 + x]) {
1511
+ c0 = Math.min(c0, x);
1512
+ c1 = Math.max(c1, x);
1513
+ sx += x;
1514
+ n++;
1515
+ }
1516
+ const cx = (sx / Math.max(1, n) + 0.5) / 36, cy = (r0 + 4) / 64, sz = Math.max(0.16 * H2, (c1 - c0 + 1) / 36 * W4 * 2.2), x0 = Math.max(0, cx * W4 - sz / 2), y0 = Math.max(0, cy * H2 - sz / 2), cw = Math.min(W4, x0 + sz) - x0, ch = Math.min(H2, y0 + sz) - y0;
1517
+ if (cw > 8 && ch > 8) {
1518
+ const cv = document.createElement("canvas");
1519
+ cv.width = 480;
1520
+ cv.height = Math.max(2, Math.round(480 * ch / cw));
1521
+ cv.getContext("2d").drawImage(canvas, x0, y0, cw, ch, 0, 0, cv.width, cv.height);
1522
+ const r22 = landmarker.detect(cv), p = r22 && r22.faceLandmarks && r22.faceLandmarks[0];
1523
+ if (p) {
1524
+ s = sampleFromLandmarks(t, p.map((q) => ({ x: (x0 + q.x * cw) / W4, y: (y0 + q.y * ch) / H2 })));
1525
+ s.haiTang = 1;
1526
+ }
1527
+ }
1528
+ }
1529
+ }
1530
+ if (s.face) {
1531
+ let dinh = -1;
1532
+ if (g) {
1533
+ const c0 = Math.floor(s.face.x * 36), c1 = Math.max(c0 + 1, Math.floor((s.face.x + s.face.w) * 36));
1534
+ for (let y = 0; y < 64 && dinh < 0; y++) for (let x = c0; x < c1; x++) if (g[y * 36 + x]) {
1535
+ dinh = y / 64;
1536
+ break;
1537
+ }
1538
+ }
1539
+ s.headTop = dinh >= 0 && dinh < s.face.y + 0.02 ? dinh : Math.max(0, s.face.y - s.face.h * 0.35);
1540
+ }
1541
+ return s;
1468
1542
  }
1469
1543
  async function analyzeFaceMap(src, step = 0.5, cancel = () => false, onStatus = () => {
1470
1544
  }, maxSide = 480) {
@@ -1533,7 +1607,7 @@ async function analyzeFaceMap(src, step = 0.5, cancel = () => false, onStatus =
1533
1607
  video.onseeked = null;
1534
1608
  video.src = "";
1535
1609
  video.load();
1536
- return { step, width: vw, height: vh, samples, ms: Math.round(performance.now() - t0), engine: "mediapipe-face-landmarker-0.10.20" };
1610
+ return { step, width: vw, height: vh, samples, ms: Math.round(performance.now() - t0), engine: "mediapipe-face-landmarker-0.10.20+mat2" };
1537
1611
  }
1538
1612
  async function faceMapWC(src, step, cancel, onStatus, maxSide, landmarker, t0) {
1539
1613
  onStatus("Nh\u1EADn m\u1EB7t (gi\u1EA3i m\xE3 WebCodecs)\u2026");
@@ -1560,7 +1634,7 @@ async function faceMapWC(src, step, cancel, onStatus, maxSide, landmarker, t0) {
1560
1634
  samples.push(await detectOnCanvas(landmarker, canvas, t));
1561
1635
  if (samples.length % 10 === 0) onStatus("Nh\u1EADn m\u1EB7t " + Math.round(t) + "/" + Math.round(dur) + " s");
1562
1636
  }
1563
- return { step, width: vw, height: vh, samples, ms: Math.round(performance.now() - t0), engine: "mediapipe-face-landmarker-0.10.20+webcodecs" };
1637
+ return { step, width: vw, height: vh, samples, ms: Math.round(performance.now() - t0), engine: "mediapipe-face-landmarker-0.10.20+webcodecs+mat2" };
1564
1638
  }
1565
1639
  function faceMapSummary(map) {
1566
1640
  const n = map.samples.length, hit2 = map.samples.filter((s) => s.face).length;
@@ -10001,7 +10075,7 @@ function thuLuoi(L, t) {
10001
10075
  }
10002
10076
  return o;
10003
10077
  }
10004
- function luoiNguoi(p, key) {
10078
+ function luoiNguoi2(p, key) {
10005
10079
  if (!p || !key) return null;
10006
10080
  key = key._goc || key;
10007
10081
  if (luoiCache.has(key)) return luoiCache.get(key);
@@ -10050,7 +10124,7 @@ function datChuNhan(g, W4, H2, F, giant, chu22, pxG, pxC, kieuG, maxW, tren = 0.
10050
10124
  return r;
10051
10125
  };
10052
10126
  {
10053
- const L = luoiNguoi(pN, khoaC);
10127
+ const L = luoiNguoi2(pN, khoaC);
10054
10128
  if (L && F) {
10055
10129
  let dinhM = null;
10056
10130
  {
@@ -10368,7 +10442,7 @@ dangKy("cmNen", (g, d, tuoi, W4, H2, nen2, _s, dai2) => {
10368
10442
  const kS = 1;
10369
10443
  let p = (d.bo === "depth" || d.bo === "cut" && !d.anNguoi) && nen2 ? nguoi(nen2, W4, H2) : null;
10370
10444
  if (p && d.bo === "cut" && F) {
10371
- const L0 = luoiNguoi(p, d);
10445
+ const L0 = luoiNguoi2(p, d);
10372
10446
  if (L0) {
10373
10447
  const c0 = Math.max(0, Math.floor(F[0] * 36)), c1 = Math.min(35, Math.ceil(F[2] * 36)), r0 = Math.max(0, Math.floor(F[1] * 64)), r1 = Math.min(63, Math.ceil(F[3] * 64));
10374
10448
  let n = 0, t = 0;
@@ -10388,7 +10462,7 @@ dangKy("cmNen", (g, d, tuoi, W4, H2, nen2, _s, dai2) => {
10388
10462
  const F7 = phongDinh(F || hopNguoi(p, d), d.z || d.phong || 1);
10389
10463
  if (F7) {
10390
10464
  const t7 = datChuNhan(g, W4, H2, F7, d.giant, String(d.giant || "").indexOf(String.fromCharCode(10)) >= 0 ? "" : d.chu2 || "", 165 * (d.coChu || 1) * H2 / 1920, 96 * H2 / 1920, "giant", 0.76 * W4, d.thanh ? 0.1 : 0.075, p, d, true);
10391
- const L7 = luoiNguoi(p, d);
10465
+ const L7 = luoiNguoi2(p, d);
10392
10466
  let day7 = 0;
10393
10467
  if (L7) for (let i = 60 * 36; i < 64 * 36; i++) day7 += L7[i];
10394
10468
  if (t7 && day7 >= 4 && (t7.vung === "het-cho" || t7.pxG < 0.6 * 165 * (d.coChu || 1) * H2 / 1920)) d = { ...d, _goc: d._goc || d, bo: "cut" };
@@ -10644,7 +10718,7 @@ dangKy("cmNen", (g, d, tuoi, W4, H2, nen2, _s, dai2) => {
10644
10718
  if (d.ui) theUI(g, d.ui, tuoi, W4, H2, 1);
10645
10719
  if (d.hang) {
10646
10720
  let yh = d.so ? 0.23 : 0.17, kh = 1;
10647
- const L2 = luoiNguoi(p || (nen2 ? nguoi(nen2, W4, H2) : null), d), F2 = F || (nen2 ? dauCanh(d, nen2, W4, H2) : null);
10721
+ const L2 = luoiNguoi2(p || (nen2 ? nguoi(nen2, W4, H2) : null), d), F2 = F || (nen2 ? dauCanh(d, nen2, W4, H2) : null);
10648
10722
  if (L2 && F2) {
10649
10723
  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;
10650
10724
  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]]);
@@ -10765,11 +10839,17 @@ dangKy("cmAnh", (g, d, tuoi, W4, H2, _n, _s, dai2) => {
10765
10839
  wK2 = 0.76 * W4;
10766
10840
  yK = (c.y - hK * c.k / 2 + 0.575 * 112 / 1920 * c.k) * H2;
10767
10841
  } else {
10842
+ let rT = 64;
10843
+ for (let r = 0; r < 64 && rT === 64; r++) {
10844
+ let m = 0;
10845
+ for (let cc = 4; cc < 32; cc++) m += LA[r * 36 + cc];
10846
+ if (m >= 3) rT = r;
10847
+ }
10768
10848
  const ph = (y0) => {
10769
10849
  let n = 0, t = 0;
10770
10850
  for (let r = Math.floor(y0 * 64); r < Math.min(64, Math.ceil((y0 + hK) * 64)); r++) for (let cc = 4; cc < 32; cc++) {
10771
10851
  t++;
10772
- n += LA[r * 36 + cc];
10852
+ n += LA[r * 36 + cc] * (r >= rT && r < rT + 16 ? 4 : 1);
10773
10853
  }
10774
10854
  return t ? n / t : 1;
10775
10855
  };
@@ -10784,7 +10864,7 @@ dangKy("cmAnh", (g, d, tuoi, W4, H2, _n, _s, dai2) => {
10784
10864
  if (d.chu2) chu2(g, d.chu2, xK, yK + 125 * kK * H2 / 1920 + (1 - k) * 70 * H2 / 1920, 96 * kK * H2 / 1920, d.do2 ? "do" : "vang", kep12((tuoi - 0.35) / 0.15) * kc, wK2);
10785
10865
  }
10786
10866
  if (d.pip && _n) {
10787
- const bw = 0.36 * W4, bh = bw * 1.2, bx = 0.06 * W4, by = 0.555 * H2 + (1 - eOut(Math.min(1, tuoi / 0.35))) * 0.05 * H2, F = d.F, Dm = dauCanh(d, _n, W4, H2), Fd = F && F[3] - F[1] > 0.45 ? F : Dm || F, top = Fd ? Fd[1] : 0.2, cam = Fd ? Math.max(Fd[3], top + 0.12) : 0.6, s = Math.max(bw / W4, bh / H2, Math.min(1.6, 0.54 * bh / (Math.max(0.08, cam - top) * H2))), cx0 = Fd ? (Fd[0] + Fd[2]) / 2 : 0.5, MK = globalThis.__matKhung, kd = d._goc || d, cx = MK ? kd.__pipCx = kd.__pipCx == null ? (MK[0] + MK[2]) / 2 : kd.__pipCx + ((MK[0] + MK[2]) / 2 - kd.__pipCx) * 0.12 : cx0;
10867
+ const bw = 0.36 * W4, bh = bw * 1.2, bx = 0.06 * W4, by = 0.555 * H2 + (1 - eOut(Math.min(1, tuoi / 0.35))) * 0.05 * H2, F = d.F, Dm = dauCanh(d, _n, W4, H2), Fd = F && F[3] - F[1] > 0.45 ? F : Dm || F || globalThis.__matNguon, top = Fd ? Fd[1] : 0.2, cam = Fd ? Math.max(Fd[3], top + 0.12) : 0.6, s = Math.max(bw / W4, bh / H2, Math.min(1.6, 0.54 * bh / (Math.max(0.08, cam - top) * H2))), cx0 = Fd ? (Fd[0] + Fd[2]) / 2 : 0.5, MK = globalThis.__matKhung, kd = d._goc || d, cx = MK ? kd.__pipCx = kd.__pipCx == null ? (MK[0] + MK[2]) / 2 : kd.__pipCx + ((MK[0] + MK[2]) / 2 - kd.__pipCx) * 0.12 : cx0;
10788
10868
  hop3(g, "nguoi:pip", bx, by, bx + bw, by + bh);
10789
10869
  globalThis.__pipO = { k: globalThis.__khungSo, b: [bx, 0.555 * H2, bx + bw, 0.555 * H2 + bh] };
10790
10870
  g.save();
@@ -11702,7 +11782,7 @@ function lapCuongMe(o) {
11702
11782
  if (x.kieu === "anh" && dV) {
11703
11783
  de(f2, dV, { uuTien: UT.so + 5, bo: "anh", ten: ten2, chu: chuK, chu2: chu22, keu: "whoosh", video: 1 }, 3, datAnh);
11704
11784
  ghiL("video", { bo: "anh", f: f2, d: dV }, "kho video: ung vien clip " + dV.toFixed(1) + " s thay anh: " + String(x.tu || ""));
11705
- } else if (x.kieu === "anh") de(f2, (f2 < f1 ? 2 : 2.4) * kTram(), { uuTien: UT.anh, ...co ? [{ bo: "anh", ten: ten2, chu: chuK, chu2: chu22, keu: "whoosh" }, { bo: "chia", ten: ten2, chu: chuK, keu: "whoosh" }, { bo: "anh", ten: ten2, chu: chuK, chu2: chu22, pip: 1, keu: "whoosh" }][nAnh++ % 3] : { bo: "kinh", dong: [chuK, chu22].filter(Boolean), keu: "whoosh" } }, 3, datAnh);
11785
+ } else if (x.kieu === "anh" && (co || chuK)) de(f2, (f2 < f1 ? 2 : 2.4) * kTram(), { uuTien: UT.anh, ...co ? [{ bo: "anh", ten: ten2, chu: chuK, chu2: chu22, keu: "whoosh" }, { bo: "chia", ten: ten2, chu: chuK, keu: "whoosh" }, { bo: "anh", ten: ten2, chu: chuK, chu2: chu22, pip: 1, keu: "whoosh" }][nAnh++ % 3] : { bo: "kinh", dong: [chuK, chu22].filter(Boolean), keu: "whoosh" } }, 3, datAnh);
11706
11786
  else if (x.kieu === "vat") {
11707
11787
  const LG = timLogo(suaChu(chuK + " " + sach2(String(x.tu || ""))))[0];
11708
11788
  if (LG) napHinhLogo(LG.slug);
@@ -14262,6 +14342,7 @@ async function renderNhanh(ff, clips, files, audio, cards, nen2, options, paint,
14262
14342
  }
14263
14343
  {
14264
14344
  globalThis.__matKhung = null;
14345
+ globalThis.__matNguon = null;
14265
14346
  if (FM.length) {
14266
14347
  const ts2 = c.trimStart + u;
14267
14348
  let m = FM[0];
@@ -14269,6 +14350,7 @@ async function renderNhanh(ff, clips, files, audio, cards, nen2, options, paint,
14269
14350
  if (Math.abs(m.t - ts2) < 0.6) {
14270
14351
  const mx = (nx) => (((W4 - sw * c0) / 2 + nx * sw * c0 - sx) * z - dx) / q / W4, my = (ny) => (((H2 - sh * c0) / 2 + ny * sh * c0 - sy) * z - dy) / q / H2, top = typeof m.headTop === "number" ? Math.min(m.headTop, m.face.y) : m.face.y, cam = typeof m.chin === "number" && m.chin > m.face.y ? m.chin : m.face.y + m.face.h;
14271
14352
  globalThis.__matKhung = [mx(m.face.x), my(top), mx(m.face.x + m.face.w), my(cam)];
14353
+ globalThis.__matNguon = [m.face.x, top, m.face.x + m.face.w, cam];
14272
14354
  }
14273
14355
  }
14274
14356
  }
@@ -16509,7 +16591,7 @@ var ProEditPanel = (props) => {
16509
16591
  try {
16510
16592
  const heard = await heardWithRetry(cancelled);
16511
16593
  if (cancelled()) return;
16512
- let faceMap = prior && prior.fingerprint === heard.fingerprint && prior.faceMap && Array.isArray(prior.faceMap.samples) ? prior.faceMap : null;
16594
+ let faceMap = prior && prior.fingerprint === heard.fingerprint && prior.faceMap && Array.isArray(prior.faceMap.samples) && /mat2/.test(String(prior.faceMap.engine || "")) ? prior.faceMap : null;
16513
16595
  if (!faceMap) try {
16514
16596
  const raw = atob(currentScene.videoBase64), bytes = new Uint8Array(raw.length);
16515
16597
  for (let i = 0; i < raw.length; i++) bytes[i] = raw.charCodeAt(i);
@@ -16586,7 +16668,7 @@ var ProEditPanel = (props) => {
16586
16668
  if (!d) {
16587
16669
  const heard = await heardWithRetry(cancelled);
16588
16670
  if (cancelled()) return;
16589
- let faceMap = prior && prior.fingerprint === heard.fingerprint && prior.faceMap && Array.isArray(prior.faceMap.samples) ? prior.faceMap : null;
16671
+ let faceMap = prior && prior.fingerprint === heard.fingerprint && prior.faceMap && Array.isArray(prior.faceMap.samples) && /mat2/.test(String(prior.faceMap.engine || "")) ? prior.faceMap : null;
16590
16672
  if (!faceMap) try {
16591
16673
  const raw = atob(currentScene.videoBase64), bytes = new Uint8Array(raw.length);
16592
16674
  for (let i = 0; i < raw.length; i++) bytes[i] = raw.charCodeAt(i);
@@ -18761,7 +18843,7 @@ async function handleExport(currentProject, setExporting, setExportedBlob, addLo
18761
18843
  }
18762
18844
  return -1;
18763
18845
  };
18764
- const moc = kb.canh.filter((c) => c && (c.kieu === "anh" || c.kieu === "vat")).map((c) => timTu(c.tu)).filter((i) => i >= 0).map((i) => W4[i].t0).sort((x, y) => x - y), pts = [W4[0].t0 + 3, ...moc, W4[W4.length - 1].t1 - 3];
18846
+ const moc = kb.canh.filter((c) => c && c.tu).map((c) => timTu(c.tu)).filter((i) => i >= 0).map((i) => W4[i].t0).sort((x, y) => x - y), pts = [W4[0].t0 + 3, ...moc, W4[W4.length - 1].t1 - 3];
18765
18847
  let them = 0;
18766
18848
  for (let k = 0; k + 1 < pts.length && them < 8; k++) {
18767
18849
  const a0 = pts[k], b0 = pts[k + 1];
@@ -18773,7 +18855,7 @@ async function handleExport(currentProject, setExporting, setExportedBlob, addLo
18773
18855
  while (i >= 0 && i < i0 + 5 && i < W4.length - 3 && HU4.test(String(W4[i].text).replace(/[.,!?;:…"“”]/g, ""))) i++;
18774
18856
  if (i < 0 || i + 3 > W4.length) continue;
18775
18857
  const tu = W4.slice(i, i + 3).map((w) => String(w.text).replace(/[.,!?;:…"“”]/g, "")).join(" "), cau = W4.slice(Math.max(0, i - 5), i + 10).map((w) => w.text).join(" ");
18776
- kb.canh.push({ tu, kieu: "anh", chu: W4.slice(i, i + 6).map((w) => String(w.text).replace(/[.,!?;:…"“”]/g, "")).filter((x) => !HU4.test(x)).slice(0, 3).join(" ").toLocaleUpperCase("vi"), chu2: "", en: 'Cinematic photorealistic vertical photo that illustrates the meaning of this Vietnamese sentence: "' + cau + '". Vietnamese people, real everyday setting, natural light, no text, no captions.' });
18858
+ kb.canh.push({ tu, kieu: "anh", chu: " ", chu2: "", en: 'Cinematic photorealistic vertical photo that illustrates the meaning of this Vietnamese sentence: "' + cau + '". Vietnamese people, real everyday setting, natural light, no text, no captions.' });
18777
18859
  them++;
18778
18860
  }
18779
18861
  }
@@ -20528,7 +20610,7 @@ async function napLoi(d) {
20528
20610
  return "LOI: " + String(e && e.message || e).slice(0, 300);
20529
20611
  }
20530
20612
  }
20531
- var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.62/nap.js";
20613
+ var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.64/nap.js";
20532
20614
  var TRONG_LOI = !!globalThis.__xvaiReact;
20533
20615
  try {
20534
20616
  if (!TRONG_LOI) setTimeout(() => {
@@ -20558,7 +20640,7 @@ function datCauLenh(a) {
20558
20640
  on2 = true;
20559
20641
  window.addEventListener("message", async (ev) => {
20560
20642
  const d = ev.data;
20561
- if (!d || d.xvaiLoi111249 !== true) return;
20643
+ if (!d || d.xvaiLoi111348 !== true) return;
20562
20644
  const o = String(ev.origin || "");
20563
20645
  if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
20564
20646
  const tra = (kq) => {