xvai-loi 0.1.41 → 0.1.43

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 +251 -18
package/co.txt CHANGED
@@ -1 +1 @@
1
- xvaiLoi100208
1
+ xvaiLoi100752
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xvai-loi",
3
- "version": "0.1.41",
3
+ "version": "0.1.43",
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
@@ -9592,6 +9592,17 @@ function tfE(g, W4, H2, F, s, yDau, k, zk = 1) {
9592
9592
  g.translate(W4 / 2 - cxe * W4 * se, ye * H2 - top * H2 * se);
9593
9593
  g.scale(se, se);
9594
9594
  }
9595
+ function locFx(fx) {
9596
+ if (!fx || typeof fx !== "object") return "";
9597
+ const a = [];
9598
+ if (fx.sang && +fx.sang !== 1) a.push("brightness(" + (+fx.sang).toFixed(2) + ")");
9599
+ if (fx.tuongPhan && +fx.tuongPhan !== 1) a.push("contrast(" + (+fx.tuongPhan).toFixed(2) + ")");
9600
+ if (fx.baoHoa && +fx.baoHoa !== 1) a.push("saturate(" + (+fx.baoHoa).toFixed(2) + ")");
9601
+ if (fx.am) a.push("sepia(" + Math.min(0.6, Math.abs(+fx.am)).toFixed(2) + ")");
9602
+ if (fx.mo) a.push("blur(" + Math.min(12, Math.abs(+fx.mo)).toFixed(1) + "px)");
9603
+ if (fx.xam) a.push("grayscale(" + Math.min(1, Math.abs(+fx.xam)).toFixed(2) + ")");
9604
+ return a.join(" ");
9605
+ }
9595
9606
  function tf(g, W4, H2, F, s, yDau) {
9596
9607
  const cx = F ? (F[0] + F[2]) / 2 : 0.5, top = F ? F[1] : 0.2;
9597
9608
  g.translate(W4 / 2 - cx * W4 * s, yDau * H2 - top * H2 * s);
@@ -9830,6 +9841,10 @@ dangKy("cmNen", (g, d, tuoi, W4, H2, nen2, _s, dai2) => {
9830
9841
  if (a <= 0) return;
9831
9842
  g.save();
9832
9843
  g.globalAlpha = a;
9844
+ {
9845
+ const fS = locFx(d.fx);
9846
+ if (fS) g.filter = fS;
9847
+ }
9833
9848
  const kS = 1;
9834
9849
  const p = (d.bo === "card" || d.bo === "depth" || d.bo === "cut" && !d.anNguoi) && nen2 ? nguoi(nen2, W4, H2) : null;
9835
9850
  const hv = d.huong ?? -1, kv = 1 - Math.pow(1 - Math.min(1, tuoi / 0.35), 3), ox = hv === 0 ? -(1 - kv) * 0.3 * W4 : hv === 1 ? (1 - kv) * 0.3 * W4 : 0, oy = hv === 2 ? (1 - kv) * 0.1 * H2 : 0;
@@ -9840,6 +9855,7 @@ dangKy("cmNen", (g, d, tuoi, W4, H2, nen2, _s, dai2) => {
9840
9855
  g.save();
9841
9856
  g.translate(ox, oy);
9842
9857
  const x = 0.07 * W4, y = 0.715 * H2, w = 0.86 * W4, h = 0.4 * H2, r = 46 * W4 / 1080, s = d.s || 1;
9858
+ hop4(g, "the:card", x, y, x + w, y + h);
9843
9859
  g.save();
9844
9860
  g.shadowColor = "rgba(0,0,0,0.45)";
9845
9861
  g.shadowBlur = 22 * W4 / 1080;
@@ -10019,6 +10035,10 @@ dangKy("cmAnh", (g, d, tuoi, W4, H2, _n, _s, dai2) => {
10019
10035
  if (a <= 0) return;
10020
10036
  g.save();
10021
10037
  g.globalAlpha = a;
10038
+ {
10039
+ const fS = locFx(d.fx);
10040
+ if (fS) g.filter = fS;
10041
+ }
10022
10042
  if (im && im.width > 1.25 * im.height) {
10023
10043
  const zb = Math.max(W4 / im.width, H2 / im.height);
10024
10044
  g.save();
@@ -10042,16 +10062,19 @@ dangKy("cmAnh", (g, d, tuoi, W4, H2, _n, _s, dai2) => {
10042
10062
  const z = (1.03 + 0.045 * Math.min(1, tuoi / Math.max(0.5, dai2))) * Math.max(W4 / im.width, H2 / im.height);
10043
10063
  g.drawImage(im, (W4 - im.width * z) / 2, (H2 - im.height * z) / 2, im.width * z, im.height * z);
10044
10064
  }
10045
- g.globalCompositeOperation = "saturation";
10046
- g.fillStyle = "rgb(128,128,128)";
10047
- g.fillRect(0, 0, W4, H2);
10048
- g.globalCompositeOperation = "multiply";
10049
- g.fillStyle = "rgb(255,196,150)";
10050
- g.fillRect(0, 0, W4, H2);
10051
- g.globalCompositeOperation = "screen";
10052
- g.fillStyle = "rgb(46,20,12)";
10053
- g.fillRect(0, 0, W4, H2);
10054
- g.globalCompositeOperation = "source-over";
10065
+ const trangThat = /^trang:/.test(String(d.ten || ""));
10066
+ if (!trangThat) {
10067
+ g.globalCompositeOperation = "saturation";
10068
+ g.fillStyle = "rgb(128,128,128)";
10069
+ g.fillRect(0, 0, W4, H2);
10070
+ g.globalCompositeOperation = "multiply";
10071
+ g.fillStyle = "rgb(255,196,150)";
10072
+ g.fillRect(0, 0, W4, H2);
10073
+ g.globalCompositeOperation = "screen";
10074
+ g.fillStyle = "rgb(46,20,12)";
10075
+ g.fillRect(0, 0, W4, H2);
10076
+ g.globalCompositeOperation = "source-over";
10077
+ }
10055
10078
  const rg = g.createRadialGradient(W4 / 2, H2 / 2, 0.2 * H2, W4 / 2, H2 / 2, 0.75 * H2);
10056
10079
  rg.addColorStop(0, "rgba(0,0,0,0)");
10057
10080
  rg.addColorStop(1, "rgba(0,0,0,0.55)");
@@ -10067,6 +10090,7 @@ dangKy("cmAnh", (g, d, tuoi, W4, H2, _n, _s, dai2) => {
10067
10090
  }
10068
10091
  if (d.pip && _n) {
10069
10092
  const bw = 0.36 * W4, bh = bw * 1.2, bx = 0.06 * W4, by = 0.555 * H2 + (1 - eOut(Math.min(1, tuoi / 0.5))) * 0.35 * H2, F = d.F, s = 1.7 * bw / W4, cx = F ? (F[0] + F[2]) / 2 : 0.5, top = F ? F[1] : 0.2;
10093
+ hop4(g, "nguoi:pip", bx, by, bx + bw, by + bh);
10070
10094
  g.save();
10071
10095
  g.shadowColor = "rgba(0,0,0,0.5)";
10072
10096
  g.shadowBlur = 0.02 * W4;
@@ -10096,6 +10120,7 @@ dangKy("cmTien", (g, d, tuoi, W4, H2, _n, _s, dai2) => {
10096
10120
  g.globalAlpha = a;
10097
10121
  g.font = "900 " + (46 * s).toFixed(1) + "px " + FB;
10098
10122
  const tw = g.measureText(nhan).width, rw = N * ow + (N - 1) * gap + 30 * s + tw + 50 * s, x0 = (W4 - rw) / 2, yc = 0.072 * H2;
10123
+ hop4(g, "thanh:tien", x0, yc - 26 * s, x0 + rw, yc + 26 * s);
10099
10124
  bo(g, x0, yc - 34 * s, rw, 68 * s, 34 * s);
10100
10125
  g.fillStyle = "rgba(15,15,20,0.6)";
10101
10126
  g.fill();
@@ -11565,6 +11590,21 @@ function lapCuongMe(o) {
11565
11590
  s.dSua = 1;
11566
11591
  nS++;
11567
11592
  }
11593
+ if (e.fx && typeof e.fx === "object") {
11594
+ s.fx = { ...e.fx };
11595
+ s.khoa = 1;
11596
+ nS++;
11597
+ }
11598
+ if (typeof e.stX === "number" && e.stX >= 0.05 && e.stX <= 0.95) {
11599
+ s.stX = e.stX;
11600
+ s.khoa = 1;
11601
+ nS++;
11602
+ }
11603
+ if (typeof e.stY === "number" && e.stY >= 0.05 && e.stY <= 0.95) {
11604
+ s.stY = e.stY;
11605
+ s.khoa = 1;
11606
+ nS++;
11607
+ }
11568
11608
  if (typeof e.yChu === "number" && e.yChu >= 0.05 && e.yChu <= 0.6) {
11569
11609
  s.yChu = e.yChu;
11570
11610
  s.khoa = 1;
@@ -11596,7 +11636,115 @@ function lapCuongMe(o) {
11596
11636
  G2.__lichSuaDaAp = nS;
11597
11637
  ghiL("bo", { bo: "sua-tay" }, "sua tay: " + nS + " truong");
11598
11638
  }
11599
- G2.__lichSp = sp.map((s, i) => ({ i, id: s.id, yChu: s.yChu, coChu: s.coChu, f: +s.f.toFixed(2), d: +s.d.toFixed(2), bo: s.bo, giant: s.giant || "", chu: s.chu || "", chu2: s.chu2 || "", st: s.st || "", ten: s.ten || "", tieu: s.tieu || "", khoa: s.khoa ? 1 : 0 }));
11639
+ {
11640
+ let nhipCham = false;
11641
+ try {
11642
+ nhipCham = localStorage.getItem("xvaiNhipCham") === "1";
11643
+ } catch (e) {
11644
+ }
11645
+ if (nhipCham) {
11646
+ const UTn = { card: 100, kinh: 70, anh: 60, chia: 60, depth: 50, cut: 50, tron: 40, phong: 10 };
11647
+ const ut = (x) => (x.uuTien != null ? x.uuTien : UTn[x.bo] ?? 30) + (x.khoa ? 1e3 : 0);
11648
+ let nBo = 0;
11649
+ sp.sort((p, q) => p.f - q.f);
11650
+ const bo4 = (i, ly) => {
11651
+ const x = sp[i];
11652
+ if (x.khoa) return false;
11653
+ ghiL("bo", { bo: x.bo, f: x.f, d: x.d }, "nhip cham: " + ly);
11654
+ sp.splice(i, 1);
11655
+ nBo++;
11656
+ return true;
11657
+ };
11658
+ for (let i = sp.length - 1; i >= 0; i--) {
11659
+ const x = sp[i];
11660
+ if (x.bo === "phong" && sp.some((y, j) => j !== i && y.bo !== "phong" && x.f >= y.f - 0.05 && x.f < y.f + y.d)) bo4(i, "phong chong canh khac");
11661
+ }
11662
+ for (let i = sp.length - 1; i >= 1; i--) {
11663
+ const x = sp[i], tr = sp[i - 1];
11664
+ if (x.d < 1.4 && !x.khoa && (x.bo === "cut" || x.bo === "tron" || x.bo === "chia") && x.f - (tr.f + tr.d) < 0.3 && ut(x) <= ut(tr)) bo4(i, "ngan < 1,4 s noi sat (" + x.d.toFixed(2) + " s)");
11665
+ }
11666
+ for (let i = 1; i < sp.length; i++) {
11667
+ const x = sp[i], tr = sp[i - 1];
11668
+ const khe = x.f - (tr.f + tr.d);
11669
+ if (khe > -0.05 && khe < 0.9 && (x.bo === "cut" || x.bo === "tron" || x.bo === "chia") && !x.khoa) {
11670
+ bo4(i, "chua giu khung goc 0,9 s sau canh truoc (khe " + khe.toFixed(2) + ")");
11671
+ i--;
11672
+ }
11673
+ }
11674
+ for (let i = 0; i < sp.length; i++) {
11675
+ const cua2 = sp.filter((y) => y.f >= sp[i].f && y.f < sp[i].f + 10 && y.bo !== "phong" && y.bo !== "depth");
11676
+ if (cua2.length > 3.5) {
11677
+ const thap = cua2.filter((y) => !y.khoa).sort((a, b) => ut(a) - ut(b))[0];
11678
+ if (thap) {
11679
+ const j = sp.indexOf(thap);
11680
+ if (j >= 0 && bo4(j, "tran 3,5 canh/10 s")) i = Math.max(-1, i - 1);
11681
+ }
11682
+ }
11683
+ }
11684
+ const toiThieu = { card: 2.5, chia: 2.5, kinh: 2.5, anh: 1.6, depth: 1.6, cut: 1.6, tron: 1.6 };
11685
+ for (let i = 0; i < sp.length; i++) {
11686
+ const x = sp[i], m = toiThieu[x.bo];
11687
+ if (!m || x.khoa || x.d >= m) continue;
11688
+ const ke = sp[i + 1];
11689
+ const tran = ke ? ke.f - 0.1 : x.f + m;
11690
+ const dMoi = Math.min(m, tran - x.f);
11691
+ if (dMoi > x.d + 0.05) {
11692
+ ghiL("doi", x, "nhip cham: keo dai " + x.d.toFixed(2) + " -> " + dMoi.toFixed(2) + " s (giu toi thieu " + x.bo + ")");
11693
+ x.d = +dMoi.toFixed(2);
11694
+ }
11695
+ }
11696
+ const kieu = (x) => x.bo === "depth" || x.bo === "cut" || x.bo === "tron" || x.bo === "phong" ? "nguoi" : x.bo;
11697
+ for (let i = 0; i < sp.length; i++) {
11698
+ const cua2 = sp.filter((y) => y.f >= sp[i].f && y.f < sp[i].f + 10 && y.bo !== "phong");
11699
+ let doiKieu = 0;
11700
+ for (let j = 1; j < cua2.length; j++) if (kieu(cua2[j]) !== kieu(cua2[j - 1])) doiKieu++;
11701
+ if (doiKieu > 1.5) {
11702
+ const thap = cua2.filter((y) => !y.khoa && (y.bo === "chia" || y.bo === "anh" && !y.ten)).sort((a, b) => ut(a) - ut(b))[0];
11703
+ if (thap) {
11704
+ const j = sp.indexOf(thap);
11705
+ if (j >= 0 && bo4(j, "doi kieu > 1,5/10 s")) i = Math.max(-1, i - 1);
11706
+ }
11707
+ }
11708
+ }
11709
+ G2.__nhipChamBo = nBo;
11710
+ ghiL("bo", { bo: "nhip-cham" }, "nhip cham: bo " + nBo + " canh");
11711
+ }
11712
+ }
11713
+ {
11714
+ let chuoi = false;
11715
+ try {
11716
+ chuoi = localStorage.getItem("xvaiChuoiTram") === "1";
11717
+ } catch (e) {
11718
+ }
11719
+ if (chuoi) {
11720
+ sp.sort((p, q) => p.f - q.f);
11721
+ const daDung = new Set(sp.map((x) => x.ten).filter(Boolean));
11722
+ const kho6 = dsTenTaiSan().filter((t) => !daDung.has(t) && (t.indexOf("trang:") === 0 || t.indexOf("anh:") === 0));
11723
+ let kI = 0, nThem = 0;
11724
+ const spans = [];
11725
+ for (let i = 0; i + 1 < sp.length; i++) {
11726
+ const a = sp[i].f + sp[i].d, b = sp[i + 1].f;
11727
+ if (b - a >= 6) spans.push([a + 0.6, b - 0.4]);
11728
+ }
11729
+ for (const [a, b] of spans) {
11730
+ let f2 = a, n = 0;
11731
+ while (f2 + 2.2 <= b && n < 2 && kI < kho6.length) {
11732
+ const ten2 = kho6[kI];
11733
+ if (dat(+f2.toFixed(2), 2.2, { uuTien: UT.anh, bo: "anh", ten: ten2, chu: "", keu: n === 0 ? "whoosh-nhanh" : "", chuoi: 1 }, 0, 0.01)) {
11734
+ ghiL("them", { bo: "anh", f: f2, d: 2.2 }, "chuoi tram " + ten2);
11735
+ kI++;
11736
+ n++;
11737
+ nThem++;
11738
+ }
11739
+ f2 += 2.3;
11740
+ }
11741
+ }
11742
+ G2.__chuoiTramThem = nThem;
11743
+ ghiL("bo", { bo: "chuoi-tram" }, "chuoi tram: them " + nThem + " anh trong " + spans.length + " khoang trong");
11744
+ sp.sort((p, q) => p.f - q.f);
11745
+ }
11746
+ }
11747
+ G2.__lichSp = sp.map((s, i) => ({ i, id: s.id, yChu: s.yChu, coChu: s.coChu, fx: s.fx, stX: s.stX, stY: s.stY, f: +s.f.toFixed(2), d: +s.d.toFixed(2), bo: s.bo, giant: s.giant || "", chu: s.chu || "", chu2: s.chu2 || "", st: s.st || "", ten: s.ten || "", tieu: s.tieu || "", khoa: s.khoa ? 1 : 0 }));
11600
11748
  }
11601
11749
  bc = "B7 phat the";
11602
11750
  const stTr = { n: 0 }, keuTr = {};
@@ -11615,7 +11763,7 @@ function lapCuongMe(o) {
11615
11763
  });
11616
11764
  else if (s.bo === "anh") {
11617
11765
  if (s.m) moi.set(s.m, { ...s.m, t0: a, t1: b });
11618
- the(a, bT, { loai: "cmAnh", chu: s.chu, chu2: s.chu2, do1: !s.chu2 && /tốn|mất|mỏi|khổ|oan|sai|lỗi|đau|chậm|dừng|đừng|cực|vô hồn/.test(String(s.chu || "").toLocaleLowerCase("vi")) ? 1 : 0, do2: s.chu2 && /tốn|mất|mỏi|khổ|oan|sai|lỗi|đau|chậm|còng|dừng|đừng|cực/.test((String(s.chu || "") + " " + String(s.chu2)).toLocaleLowerCase("vi")) ? 1 : 0, ten: s.ten, pip: s.pip, F: Fs, vao: s.vao, ra: s.ra });
11766
+ the(a, bT, { loai: "cmAnh", fx: s.fx, chu: s.chu, chu2: s.chu2, do1: !s.chu2 && /tốn|mất|mỏi|khổ|oan|sai|lỗi|đau|chậm|dừng|đừng|cực|vô hồn/.test(String(s.chu || "").toLocaleLowerCase("vi")) ? 1 : 0, do2: s.chu2 && /tốn|mất|mỏi|khổ|oan|sai|lỗi|đau|chậm|còng|dừng|đừng|cực/.test((String(s.chu || "") + " " + String(s.chu2)).toLocaleLowerCase("vi")) ? 1 : 0, ten: s.ten, pip: s.pip, F: Fs, vao: s.vao, ra: s.ra });
11619
11767
  } else the(a, bT, {
11620
11768
  loai: "cmNen",
11621
11769
  bo: s.bo,
@@ -11645,6 +11793,7 @@ function lapCuongMe(o) {
11645
11793
  do2: s.chu2 && /tốn|mất|mỏi|khổ|oan|sai|lỗi|đau|chậm|còng|dừng|đừng|cực/.test((String(s.giant || "") + " " + String(s.chu2)).toLocaleLowerCase("vi")) ? 1 : 0,
11646
11794
  z: s.z,
11647
11795
  coChu: s.coChu,
11796
+ fx: s.fx,
11648
11797
  phong: s.phong,
11649
11798
  ra: s.ra,
11650
11799
  chu2: s.chu2,
@@ -12988,6 +13137,29 @@ async function renderNhanh(ff, clips, files, audio, cards, nen2, options, paint,
12988
13137
  }
12989
13138
  }
12990
13139
  const vi = Number(fx.flashIn) || 0, vr = Number(fx.flashOut) || 0, trang = Math.max(vi > 0 ? 1 - u / vi : 0, vr > 0 ? (u - full2 + vr) / vr : 0), den = fx.fade > 0 ? Math.max(1 - u / 0.12, (u - full2 + 0.12) / 0.12) : 0;
13140
+ {
13141
+ const G = globalThis, sp = G.__lichSp || [];
13142
+ if (sp.length) {
13143
+ if (!G.__khungCanh || G.__khungCanhLan !== G.__lichSp) {
13144
+ G.__khungCanh = {};
13145
+ G.__khungCanhLan = G.__lichSp;
13146
+ }
13147
+ const Tq = Math.round(T * 10) / 10;
13148
+ for (const s of sp) {
13149
+ const kq = (+s.f).toFixed(1);
13150
+ if (!G.__khungCanh[kq] && Math.abs(T - (+s.f + 0.3)) < 0.5 / FPS + 0.02) {
13151
+ try {
13152
+ const c2 = document.createElement("canvas");
13153
+ c2.width = 90;
13154
+ c2.height = 160;
13155
+ c2.getContext("2d").drawImage(gn.canvas, 0, 0, 90, 160);
13156
+ G.__khungCanh[kq] = c2.toDataURL("image/jpeg", 0.6);
13157
+ } catch (e) {
13158
+ }
13159
+ }
13160
+ }
13161
+ }
13162
+ }
12991
13163
  if (trang > 0) {
12992
13164
  gn.globalAlpha = Math.min(1, trang);
12993
13165
  gn.fillStyle = "#fff";
@@ -19100,7 +19272,7 @@ async function napLoi(d) {
19100
19272
  return "LOI: " + String(e && e.message || e).slice(0, 300);
19101
19273
  }
19102
19274
  }
19103
- var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.40/nap.js";
19275
+ var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.42/nap.js";
19104
19276
  var TRONG_LOI = !!globalThis.__xvaiReact;
19105
19277
  try {
19106
19278
  if (!TRONG_LOI) setTimeout(() => {
@@ -19130,7 +19302,7 @@ function datCauLenh(a) {
19130
19302
  on2 = true;
19131
19303
  window.addEventListener("message", async (ev) => {
19132
19304
  const d = ev.data;
19133
- if (!d || d.xvaiLoi100208 !== true) return;
19305
+ if (!d || d.xvaiLoi100752 !== true) return;
19134
19306
  const o = String(ev.origin || "");
19135
19307
  if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
19136
19308
  const tra = (kq) => {
@@ -19388,6 +19560,65 @@ var SuaLich = ({ ten, onDong }) => {
19388
19560
  setBao("M\xE0u c\u1EA3 b\xE0i: s\xE1ng " + (+n.sang).toFixed(2) + " \xB7 t\u01B0\u01A1ng ph\u1EA3n " + (+n.tuongPhan).toFixed(2) + " \xB7 t\u01B0\u01A1i " + (+n.baoHoa).toFixed(2) + " \xB7 \u1EA5m " + (+n.am).toFixed(2) + " \u2192 b\u1EA5m Xu\u1EA5t l\u1EA1i");
19389
19561
  }
19390
19562
  };
19563
+ const [khung, setKhung] = useState({});
19564
+ const khungDang = useState({ v: null, q: [], ban: false })[0];
19565
+ const layKhung = async (giay2) => {
19566
+ const k = giay2.toFixed(1);
19567
+ if (khung[k]) return;
19568
+ const b = G.__loiApp && G.__loiApp.b;
19569
+ if (!b) return;
19570
+ khungDang.q.push(giay2);
19571
+ if (khungDang.ban) return;
19572
+ khungDang.ban = true;
19573
+ try {
19574
+ if (!khungDang.v) {
19575
+ const v2 = document.createElement("video");
19576
+ v2.muted = true;
19577
+ v2.preload = "auto";
19578
+ v2.src = URL.createObjectURL(b);
19579
+ await new Promise((ok, er) => {
19580
+ v2.onloadeddata = () => ok();
19581
+ v2.onerror = () => er(new Error("video"));
19582
+ });
19583
+ khungDang.v = v2;
19584
+ }
19585
+ const v = khungDang.v;
19586
+ const c = document.createElement("canvas");
19587
+ c.width = 90;
19588
+ c.height = 160;
19589
+ const g = c.getContext("2d");
19590
+ while (khungDang.q.length) {
19591
+ const gi = khungDang.q.shift();
19592
+ const kk = gi.toFixed(1);
19593
+ if (khung[kk]) continue;
19594
+ await new Promise((ok) => {
19595
+ v.onseeked = () => ok();
19596
+ v.currentTime = Math.min(Math.max(0, gi + 0.3), Math.max(0, v.duration - 0.05));
19597
+ });
19598
+ g.drawImage(v, 0, 0, 90, 160);
19599
+ const u = c.toDataURL("image/jpeg", 0.6);
19600
+ setKhung((kh) => ({ ...kh, [kk]: u }));
19601
+ }
19602
+ } catch (e) {
19603
+ } finally {
19604
+ khungDang.ban = false;
19605
+ }
19606
+ };
19607
+ useEffect(() => {
19608
+ const kc = G.__khungCanh || {};
19609
+ if (Object.keys(kc).length) setKhung((kh) => ({ ...kc, ...kh }));
19610
+ else (ds2 || []).slice(0, 60).forEach((s) => layKhung(+s.f));
19611
+ }, [ds2.length, !!(G.__loiApp && G.__loiApp.b)]);
19612
+ const [khungTo, setKhungTo] = useState("");
19613
+ const [fxMo, setFxMo] = useState("");
19614
+ const fxCua = (s) => {
19615
+ const e = sua[s.id] || sua[s.i] || {};
19616
+ return e.fx || s.fx || {};
19617
+ };
19618
+ const datFxCanh = (s, k, v) => {
19619
+ const cu = fxCua(s);
19620
+ dat(s.id || String(s.i), "fx", { ...cu, [k]: v });
19621
+ };
19391
19622
  const themCanh = () => {
19392
19623
  if (!(them.d > 0.3)) return;
19393
19624
  ghiHoan(sua);
@@ -19420,15 +19651,17 @@ var SuaLich = ({ ten, onDong }) => {
19420
19651
  } }, /* @__PURE__ */ shim_react_default.createElement("option", { value: "" }, "b\u1EA3n c\u0169\u2026"), ls.map((t) => /* @__PURE__ */ shim_react_default.createElement("option", { key: t, value: t }, new Date(t).toLocaleString("vi")))) : null), /* @__PURE__ */ shim_react_default.createElement("div", { className: "flex items-center gap-2 mb-2 text-[11px] flex-wrap" }, /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "M\xE0u c\u1EA3 b\xE0i:"), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "s\xE1ng ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: "0.7", max: "1.4", step: "0.05", value: fx.sang, onChange: (ev) => datFx("sang", +ev.target.value), className: "w-20" }), " ", (+fx.sang).toFixed(2)), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "t\u01B0\u01A1ng ph\u1EA3n ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: "0.7", max: "1.4", step: "0.05", value: fx.tuongPhan, onChange: (ev) => datFx("tuongPhan", +ev.target.value), className: "w-20" }), " ", (+fx.tuongPhan).toFixed(2)), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "t\u01B0\u01A1i ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: "0.5", max: "1.6", step: "0.05", value: fx.baoHoa, onChange: (ev) => datFx("baoHoa", +ev.target.value), className: "w-20" }), " ", (+fx.baoHoa).toFixed(2)), /* @__PURE__ */ shim_react_default.createElement("label", { className: "flex items-center gap-1" }, "\u1EA5m ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: "0", max: "0.4", step: "0.05", value: fx.am, onChange: (ev) => datFx("am", +ev.target.value), className: "w-20" }), " ", (+fx.am).toFixed(2)), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: () => {
19421
19652
  setFx({ sang: 1, tuongPhan: 1, baoHoa: 1, am: 0 });
19422
19653
  datFx("sang", 1);
19423
- } }, "V\u1EC1 g\u1ED1c"), /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "(ch\u1ED1ng rung \xB7 l\xE0m \u0111\u1EB9p \xB7 ti\u1EBFng \xB7 r\u0103ng: 4 c\xF4ng t\u1EAFc \u1EDF b\u1EA3ng L\xE0m pro)")), /* @__PURE__ */ shim_react_default.createElement("div", { className: "flex items-center gap-1 mb-2 text-[11px] flex-wrap" }, /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "Th\xEAm c\u1EA3nh:"), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.1", value: them.f, onChange: (ev) => setThem({ ...them, f: ev.target.value }), title: "gi\xE2y \u0111\u1EA7u" }), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.1", value: them.d, onChange: (ev) => setThem({ ...them, d: ev.target.value }), title: "d\xE0i (s)" }), /* @__PURE__ */ shim_react_default.createElement("select", { className: "bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: them.bo, onChange: (ev) => setThem({ ...them, bo: ev.target.value }) }, /* @__PURE__ */ shim_react_default.createElement("option", { value: "depth" }, "ch\u1EEF nh\u1EA5n"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "anh" }, "\u1EA3nh to\xE0n khung"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "cut" }, "c\u1EAFt ch\u1EEF"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "tron" }, "\xF4 tr\xF2n")), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-28 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", placeholder: "ch\u1EEF nh\u1EA5n", value: them.giant, onChange: (ev) => setThem({ ...them, giant: ev.target.value }) }), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-24 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", placeholder: "\u1EA3nh: trang:\u2026", value: them.ten, onChange: (ev) => setThem({ ...them, ten: ev.target.value }) }), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: themCanh }, "+ Th\xEAm"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: taiLich }, "T\u1EA3i l\u1ECBch .json"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: taiSrt, title: "b\u1EA3n \u0111\u1EA7u: ch\u01B0a tr\u1EEB \u0111o\u1EA1n l\u1EB7ng b\u1ECB c\u1EAFt" }, "T\u1EA3i SRT"), /* @__PURE__ */ shim_react_default.createElement("label", { className: nut3 + " cursor-pointer" }, "M\u1EDF d\u1EF1 \xE1n .json", /* @__PURE__ */ shim_react_default.createElement("input", { type: "file", accept: ".json,application/json", className: "hidden", onChange: (ev) => moDuAn(ev.target.files && ev.target.files[0]) })), (sua.them || []).length ? /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#F6D178]" }, (sua.them || []).length, " c\u1EA3nh th\xEAm") : null), /* @__PURE__ */ shim_react_default.createElement("datalist", { id: "xvai-kho-anh" }, dsTenTaiSan().map((t) => /* @__PURE__ */ shim_react_default.createElement("option", { key: t, value: t }))), /* @__PURE__ */ shim_react_default.createElement("div", { className: "max-h-[60vh] overflow-auto" }, /* @__PURE__ */ shim_react_default.createElement("table", { className: "w-full text-[11px]" }, /* @__PURE__ */ shim_react_default.createElement("thead", null, /* @__PURE__ */ shim_react_default.createElement("tr", { className: "text-[#A2B2C9]" }, /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "#"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "gi\xE2y"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "b\u1ED1 c\u1EE5c"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "\u0111\u1EA7u/d\xE0i (s)"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "ch\u1EEF nh\u1EA5n"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "y / c\u1EE1"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "ch\u1EEF ph\u1EE5"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "icon"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "\u1EA3nh (t\xEAn kho)"), /* @__PURE__ */ shim_react_default.createElement("th", null, "xo\xE1"))), /* @__PURE__ */ shim_react_default.createElement("tbody", null, ds2.map((s) => {
19654
+ } }, "V\u1EC1 g\u1ED1c"), /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "(ch\u1ED1ng rung \xB7 l\xE0m \u0111\u1EB9p \xB7 ti\u1EBFng \xB7 r\u0103ng: 4 c\xF4ng t\u1EAFc \u1EDF b\u1EA3ng L\xE0m pro)")), /* @__PURE__ */ shim_react_default.createElement("div", { className: "flex items-center gap-1 mb-2 text-[11px] flex-wrap" }, /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "Th\xEAm c\u1EA3nh:"), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.1", value: them.f, onChange: (ev) => setThem({ ...them, f: ev.target.value }), title: "gi\xE2y \u0111\u1EA7u" }), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.1", value: them.d, onChange: (ev) => setThem({ ...them, d: ev.target.value }), title: "d\xE0i (s)" }), /* @__PURE__ */ shim_react_default.createElement("select", { className: "bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: them.bo, onChange: (ev) => setThem({ ...them, bo: ev.target.value }) }, /* @__PURE__ */ shim_react_default.createElement("option", { value: "depth" }, "ch\u1EEF nh\u1EA5n"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "anh" }, "\u1EA3nh to\xE0n khung"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "cut" }, "c\u1EAFt ch\u1EEF"), /* @__PURE__ */ shim_react_default.createElement("option", { value: "tron" }, "\xF4 tr\xF2n")), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-28 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", placeholder: "ch\u1EEF nh\u1EA5n", value: them.giant, onChange: (ev) => setThem({ ...them, giant: ev.target.value }) }), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-24 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", placeholder: "\u1EA3nh: trang:\u2026", value: them.ten, onChange: (ev) => setThem({ ...them, ten: ev.target.value }) }), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: themCanh }, "+ Th\xEAm"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: taiLich }, "T\u1EA3i l\u1ECBch .json"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: taiSrt, title: "b\u1EA3n \u0111\u1EA7u: ch\u01B0a tr\u1EEB \u0111o\u1EA1n l\u1EB7ng b\u1ECB c\u1EAFt" }, "T\u1EA3i SRT"), /* @__PURE__ */ shim_react_default.createElement("label", { className: nut3 + " cursor-pointer" }, "M\u1EDF d\u1EF1 \xE1n .json", /* @__PURE__ */ shim_react_default.createElement("input", { type: "file", accept: ".json,application/json", className: "hidden", onChange: (ev) => moDuAn(ev.target.files && ev.target.files[0]) })), (sua.them || []).length ? /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#F6D178]" }, (sua.them || []).length, " c\u1EA3nh th\xEAm") : null), /* @__PURE__ */ shim_react_default.createElement("datalist", { id: "xvai-kho-anh" }, dsTenTaiSan().map((t) => /* @__PURE__ */ shim_react_default.createElement("option", { key: t, value: t }))), /* @__PURE__ */ shim_react_default.createElement("div", { className: "max-h-[60vh] overflow-auto" }, /* @__PURE__ */ shim_react_default.createElement("table", { className: "w-full text-[11px]" }, /* @__PURE__ */ shim_react_default.createElement("thead", null, /* @__PURE__ */ shim_react_default.createElement("tr", { className: "text-[#A2B2C9]" }, /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "#"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "khung"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "gi\xE2y"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "b\u1ED1 c\u1EE5c"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "\u0111\u1EA7u/d\xE0i (s)"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "ch\u1EEF nh\u1EA5n"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "y / c\u1EE1"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "ch\u1EEF ph\u1EE5"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "icon"), /* @__PURE__ */ shim_react_default.createElement("th", { className: "text-left" }, "\u1EA3nh (t\xEAn kho)"), /* @__PURE__ */ shim_react_default.createElement("th", null, "fx"), /* @__PURE__ */ shim_react_default.createElement("th", null, "xo\xE1"))), /* @__PURE__ */ shim_react_default.createElement("tbody", null, ds2.map((s) => {
19424
19655
  const e = sua[s.id] || sua[s.i] || {};
19425
19656
  const v = (k) => (typeof e[k] === "string" ? e[k] : s[k]) || "";
19426
- return /* @__PURE__ */ shim_react_default.createElement("tr", { key: s.id || s.i, className: e.xoa ? "opacity-40" : s.khoa ? "bg-[#1E3A5F]/40" : "" }, /* @__PURE__ */ shim_react_default.createElement("td", null, s.i), /* @__PURE__ */ shim_react_default.createElement("td", null, s.f.toFixed(1), "\u2013", (s.f + s.d).toFixed(1)), /* @__PURE__ */ shim_react_default.createElement("td", null, s.bo), /* @__PURE__ */ shim_react_default.createElement("td", { className: "whitespace-nowrap" }, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: typeof e.f === "number" ? e.f : s.f, onChange: (ev) => dat(s.id || String(s.i), "f", +ev.target.value), type: "number", step: "0.1" }), " ", /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: typeof e.d === "number" ? e.d : s.d, onChange: (ev) => dat(s.id || String(s.i), "d", +ev.target.value), type: "number", step: "0.1", min: "0.4" })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-full bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("giant"), onChange: (ev) => dat(s.id || String(s.i), "giant", ev.target.value) })), /* @__PURE__ */ shim_react_default.createElement("td", { className: "whitespace-nowrap" }, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.02", min: "0.05", max: "0.6", placeholder: "y", value: typeof e.yChu === "number" ? e.yChu : s.yChu ?? "", onChange: (ev) => dat(s.id || String(s.i), "yChu", +ev.target.value), title: "v\u1ECB tr\xED ch\u1EEF nh\u1EA5n (0,05 tr\xEAn \u2013 0,6 d\u01B0\u1EDBi)" }), " ", /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.1", min: "0.5", max: "1.6", placeholder: "\xD71", value: typeof e.coChu === "number" ? e.coChu : s.coChu ?? "", onChange: (ev) => dat(s.id || String(s.i), "coChu", +ev.target.value), title: "c\u1EE1 ch\u1EEF nh\u1EA5n \xD70,5\u20131,6" })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-full bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("chu2") || v("chu"), onChange: (ev) => dat(s.id || String(s.i), s.chu2 || !s.chu ? "chu2" : "chu", ev.target.value) })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-20 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("st"), onChange: (ev) => dat(s.id || String(s.i), "st", ev.target.value), placeholder: "tich/luu\u2026" })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-24 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", list: "xvai-kho-anh", value: v("ten"), onChange: (ev) => dat(s.id || String(s.i), "ten", ev.target.value), placeholder: "trang:\u2026 / anh:\u2026" })), /* @__PURE__ */ shim_react_default.createElement("td", { className: "text-center" }, /* @__PURE__ */ shim_react_default.createElement("input", { type: "checkbox", checked: !!e.xoa, onChange: (ev) => dat(s.id || String(s.i), "xoa", ev.target.checked ? 1 : 0) })));
19427
- })))), /* @__PURE__ */ shim_react_default.createElement("div", { className: "text-[#A2B2C9] mt-2" }, "Ch\u1EEF nh\u1EA5n xu\u1ED1ng d\xF2ng: g\xF5 \\n. Icon: tich, luu, chuot, sao, tim, dong-ho\u2026 (t\xEAn trong veSticker). S\u1EEDa xong b\u1EA5m V\u1EBD l\u1EA1i (~2\u20135 ph\xFAt)."));
19657
+ return /* @__PURE__ */ shim_react_default.createElement("tr", { key: s.id || s.i, className: e.xoa ? "opacity-40" : s.khoa ? "bg-[#1E3A5F]/40" : "" }, /* @__PURE__ */ shim_react_default.createElement("td", null, s.i), /* @__PURE__ */ shim_react_default.createElement("td", null, khung[(+s.f).toFixed(1)] ? /* @__PURE__ */ shim_react_default.createElement("img", { src: khung[(+s.f).toFixed(1)], width: 45, height: 80, className: "rounded cursor-zoom-in", onClick: () => setKhungTo(khung[(+s.f).toFixed(1)]) }) : /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9]" }, "\u2026")), /* @__PURE__ */ shim_react_default.createElement("td", null, s.f.toFixed(1), "\u2013", (s.f + s.d).toFixed(1)), /* @__PURE__ */ shim_react_default.createElement("td", null, s.bo), /* @__PURE__ */ shim_react_default.createElement("td", { className: "whitespace-nowrap" }, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: typeof e.f === "number" ? e.f : s.f, onChange: (ev) => dat(s.id || String(s.i), "f", +ev.target.value), type: "number", step: "0.1" }), " ", /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: typeof e.d === "number" ? e.d : s.d, onChange: (ev) => dat(s.id || String(s.i), "d", +ev.target.value), type: "number", step: "0.1", min: "0.4" })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-full bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("giant"), onChange: (ev) => dat(s.id || String(s.i), "giant", ev.target.value) })), /* @__PURE__ */ shim_react_default.createElement("td", { className: "whitespace-nowrap" }, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.02", min: "0.05", max: "0.6", placeholder: "y", value: typeof e.yChu === "number" ? e.yChu : s.yChu ?? "", onChange: (ev) => dat(s.id || String(s.i), "yChu", +ev.target.value), title: "v\u1ECB tr\xED ch\u1EEF nh\u1EA5n (0,05 tr\xEAn \u2013 0,6 d\u01B0\u1EDBi)" }), " ", /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-12 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.1", min: "0.5", max: "1.6", placeholder: "\xD71", value: typeof e.coChu === "number" ? e.coChu : s.coChu ?? "", onChange: (ev) => dat(s.id || String(s.i), "coChu", +ev.target.value), title: "c\u1EE1 ch\u1EEF nh\u1EA5n \xD70,5\u20131,6" })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-full bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("chu2") || v("chu"), onChange: (ev) => dat(s.id || String(s.i), s.chu2 || !s.chu ? "chu2" : "chu", ev.target.value) })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-20 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", value: v("st"), onChange: (ev) => dat(s.id || String(s.i), "st", ev.target.value), placeholder: "tich/luu\u2026" }), " ", /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-10 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.05", min: "0.05", max: "0.95", placeholder: "x", title: "v\u1ECB tr\xED icon ngang 0,05\u20130,95", value: typeof e.stX === "number" ? e.stX : s.stX ?? "", onChange: (ev) => dat(s.id || String(s.i), "stX", +ev.target.value) }), /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-10 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", type: "number", step: "0.05", min: "0.05", max: "0.95", placeholder: "y", title: "v\u1ECB tr\xED icon d\u1ECDc", value: typeof e.stY === "number" ? e.stY : s.stY ?? "", onChange: (ev) => dat(s.id || String(s.i), "stY", +ev.target.value) })), /* @__PURE__ */ shim_react_default.createElement("td", null, /* @__PURE__ */ shim_react_default.createElement("input", { className: "w-24 bg-[#0B1A2D] border border-[#2C4A73] rounded px-1", list: "xvai-kho-anh", value: v("ten"), onChange: (ev) => dat(s.id || String(s.i), "ten", ev.target.value), placeholder: "trang:\u2026 / anh:\u2026" })), /* @__PURE__ */ shim_react_default.createElement("td", { className: "text-center" }, /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3 + (Object.keys(fxCua(s)).length ? " bg-[#F6D178] text-[#122238]" : ""), onClick: () => setFxMo(fxMo === (s.id || String(s.i)) ? "" : s.id || String(s.i)) }, "fx"), fxMo === (s.id || String(s.i)) ? /* @__PURE__ */ shim_react_default.createElement("div", { className: "absolute z-40 bg-[#0B1A2D] border border-[#F6D178] rounded p-2 text-[11px] w-56 text-left", onClick: (ev) => ev.stopPropagation() }, [["sang", "s\xE1ng", 0.5, 1.6, 1], ["tuongPhan", "t\u01B0\u01A1ng ph\u1EA3n", 0.5, 1.6, 1], ["baoHoa", "t\u01B0\u01A1i", 0, 1.8, 1], ["am", "\u1EA5m", 0, 0.6, 0], ["mo", "m\u1EDD (px)", 0, 10, 0], ["xam", "\u0111en tr\u1EAFng", 0, 1, 0]].map((r) => /* @__PURE__ */ shim_react_default.createElement("label", { key: r[0], className: "flex items-center gap-1" }, r[1], " ", /* @__PURE__ */ shim_react_default.createElement("input", { type: "range", min: r[2], max: r[3], step: r[0] === "mo" ? 0.5 : 0.05, value: fxCua(s)[r[0]] ?? r[4], onChange: (ev) => datFxCanh(s, r[0], +ev.target.value), className: "flex-1" }), " ", (+(fxCua(s)[r[0]] ?? r[4])).toFixed(2))), /* @__PURE__ */ shim_react_default.createElement("div", { className: "flex gap-1 mt-1" }, /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: () => {
19658
+ dat(s.id || String(s.i), "fx", {});
19659
+ } }, "V\u1EC1 g\u1ED1c"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: () => setFxMo("") }, "\u0110\xF3ng"))) : null), /* @__PURE__ */ shim_react_default.createElement("td", { className: "text-center" }, /* @__PURE__ */ shim_react_default.createElement("input", { type: "checkbox", checked: !!e.xoa, onChange: (ev) => dat(s.id || String(s.i), "xoa", ev.target.checked ? 1 : 0) })));
19660
+ })))), khungTo ? /* @__PURE__ */ shim_react_default.createElement("div", { className: "fixed inset-0 bg-black/70 flex items-center justify-center z-50", onClick: () => setKhungTo("") }, /* @__PURE__ */ shim_react_default.createElement("img", { src: khungTo, style: { height: "80vh" }, className: "rounded" })) : null, /* @__PURE__ */ shim_react_default.createElement("div", { className: "text-[#A2B2C9] mt-2" }, "Ch\u1EEF nh\u1EA5n xu\u1ED1ng d\xF2ng: g\xF5 \\n. Icon: tich, luu, chuot, sao, tim, dong-ho\u2026 (t\xEAn trong veSticker). S\u1EEDa xong b\u1EA5m V\u1EBD l\u1EA1i (~2\u20135 ph\xFAt)."));
19428
19661
  };
19429
19662
 
19430
19663
  // loi/vo-flow.tsx
19431
- var PHIEN_BAN = "loi-1010Q";
19664
+ var PHIEN_BAN = "loi-1010AA";
19432
19665
  var TRONG = () => migrateProject({ id: crypto.randomUUID(), name: "D\u1EF1 \xE1n m\u1EDBi", scenes: [], timeline: [], images: [null, null, null] });
19433
19666
  var nut4 = "px-3 py-1.5 rounded-lg border border-[#2C4A73] text-[11px] font-bold text-[#A2B2C9] hover:text-[#F6D178] hover:border-[#F6D178]/60";
19434
19667
  var Vo = () => {