xvai-loi 0.1.38 → 0.1.40
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.
- package/co.txt +1 -1
- package/package.json +1 -1
- package/xvai-loi.js +74 -15
package/co.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
xvaiLoi100153
|
package/package.json
CHANGED
package/xvai-loi.js
CHANGED
|
@@ -5805,6 +5805,7 @@ function catNen(im, buoc = 7, tol = 40) {
|
|
|
5805
5805
|
return o;
|
|
5806
5806
|
}
|
|
5807
5807
|
var ts = /* @__PURE__ */ new Map();
|
|
5808
|
+
var dsTenTaiSan = () => [...ts.keys()].filter((k) => /^(trang|anh|vat|story|logo):|\.(png|jpg)$/i.test(k)).sort();
|
|
5808
5809
|
var taiSan = (ten) => ten ? ts.get(ten) || globalThis.__taiSanThu?.(ten) || null : null;
|
|
5809
5810
|
var nhanTaiSan = (ten, im) => {
|
|
5810
5811
|
ts.set(ten, ten.indexOf("anh:") === 0 ? im : catNen(im));
|
|
@@ -9967,13 +9968,16 @@ dangKy("cmNen", (g, d, tuoi, W4, H2, nen2, _s, dai2) => {
|
|
|
9967
9968
|
g.restore();
|
|
9968
9969
|
}
|
|
9969
9970
|
if (d.bo === "depth") {
|
|
9970
|
-
|
|
9971
|
+
const yG = d.yChu ?? 0.24, truoc = d.yChu != null && F && yG > F[1] - 0.06 && yG < F[3];
|
|
9972
|
+
const veChu = () => chu2(g, d.giant, W4 / 2, yG * H2 + (d.z ? 0 : (1 - ka) * 70 * H2 / 1920), 190 * (d.coChu || 1) * H2 / 1920, "giant", d.z ? 1 : kep12(tuoi / 0.2), 0.84 * W4);
|
|
9973
|
+
if (!truoc) veChu();
|
|
9971
9974
|
if (p) {
|
|
9972
9975
|
if (zk > 1.001) phongK(g, p, W4, H2, F, zk);
|
|
9973
9976
|
else g.drawImage(p, 0, 0, W4, H2);
|
|
9974
9977
|
}
|
|
9978
|
+
if (truoc) veChu();
|
|
9975
9979
|
} else if (d.giant) chu2(g, d.giant, W4 / 2, (d.yChu ?? (d.v3 ? 0.145 : d.bo === "toi" ? 0.4 : d.bo === "tron" ? 0.25 : 0.2)) * H2 + (1 - ka) * 70 * H2 / 1920, (d.cam ? 190 : d.v3 ? 112 : 150) * (d.coChu || 1) * H2 / 1920, d.cam ? "cam" : d.do ? "do" : "kw", kep12(tuoi / 0.06), 0.9 * W4);
|
|
9976
|
-
if (d.chu2 && !(d.bo === "depth" && /\n/.test(String(d.giant || "")))) chu2(g, d.chu2, W4 / 2, (d.bo === "
|
|
9980
|
+
if (d.chu2 && !(d.bo === "depth" && /\n/.test(String(d.giant || "")))) chu2(g, d.chu2, W4 / 2, (d.bo === "depth" ? (d.yChu ?? 0.24) + 0.02 : d.yChu ?? (d.bo === "toi" ? 0.4 : d.bo === "tron" ? 0.25 : 0.2)) * H2 + (/\n/.test(String(d.giant || "")) ? 290 : d.cam ? 200 : 150) * (d.coChu || 1) * H2 / 1920, 96 * H2 / 1920 * (d.z ? 1 + 0.7 * (1 - eOut((tuoi - 0.35) / 0.35)) : 1), d.do2 ? "do" : d.bo === "cut" || d.bo === "tron" || d.bo === "toi" ? "kw" : "vang", kep12((tuoi - 0.35) / 0.15), 0.88 * W4);
|
|
9977
9981
|
const vt = d.v3 && taiSan(d.v3), dl = String(d.giant || "").indexOf(String.fromCharCode(10)) >= 0;
|
|
9978
9982
|
if (vt) {
|
|
9979
9983
|
const p2 = eSoft((tuoi - 0.1) / 0.3), hh = (dl ? 0.2 : 0.26) * H2 * (0.9 + 0.1 * p2), ww = Math.min(hh * vt.width / vt.height, 0.6 * W4), h2 = ww * vt.height / vt.width;
|
|
@@ -10485,7 +10489,18 @@ function lapCuongMe(o) {
|
|
|
10485
10489
|
} catch (e) {
|
|
10486
10490
|
}
|
|
10487
10491
|
}
|
|
10488
|
-
const { tl, cs, ws, kb, fm, zc, tong, the: the0, keu, anh, moi, ms } = o;
|
|
10492
|
+
const { tl, cs, ws, kb, fm, zc, tong, the: the0, keu: keu0, anh, moi, ms } = o;
|
|
10493
|
+
let fKeu = -9;
|
|
10494
|
+
const keu = (f2, L) => {
|
|
10495
|
+
let cach = 0;
|
|
10496
|
+
try {
|
|
10497
|
+
cach = +(localStorage.getItem("xvaiSfxCach") || 0);
|
|
10498
|
+
} catch (e) {
|
|
10499
|
+
}
|
|
10500
|
+
if (cach > 0 && f2 - fKeu < cach) return;
|
|
10501
|
+
fKeu = Math.max(fKeu, f2);
|
|
10502
|
+
return keu0(f2, L);
|
|
10503
|
+
};
|
|
10489
10504
|
const loai = [];
|
|
10490
10505
|
let bc = "B0";
|
|
10491
10506
|
const r22 = (v) => +(+v || 0).toFixed(2), ghiL = (lo, s, ly, moi2) => {
|
|
@@ -11660,10 +11675,10 @@ function lapCuongMe(o) {
|
|
|
11660
11675
|
the(a, bT, {
|
|
11661
11676
|
loai: "cmSticker",
|
|
11662
11677
|
st,
|
|
11663
|
-
x: s.stX ?? (s.bo === "kinh" ? 0.87 : s.bo === "tron" ? 0.86 : stTr.n++ % 2 ? 0.16 : 0.84),
|
|
11678
|
+
x: s.stX ?? (s.bo === "kinh" ? 0.87 : s.bo === "tron" ? 0.86 : s.bo === "anh" ? 0.85 : stTr.n++ % 2 ? 0.16 : 0.84),
|
|
11664
11679
|
// trái / phải xen kẽ (mổ v38: sticker luôn 1 chỗ)
|
|
11665
11680
|
/* 09/10 20:0x RÀ SOÁT cm25 (Tú: "chữ và icon đè nhau"): ✓ đè dòng 1 thẻ kính (22,5 s "✓IỐI NHẠC NỀN", 30 s, 45 s) → kính: ghim góc trên-phải thẻ (y 0,255, trên dòng 1 ≥ 0,31 H); 🕐 đè dòng 2 (60,5 s "🕐ỚT ĐIỆN THOẠI") → chữ 2 dòng: đặt DƯỚI khối chữ, không cạnh. */
|
|
11666
|
-
y: s.stY ?? (s.bo === "kinh" ? 0.255 : s.bo === "tron" ? 0.52 : s.bo === "anh" ? 0.
|
|
11681
|
+
y: s.stY ?? (s.bo === "kinh" ? 0.255 : s.bo === "tron" ? 0.52 : s.bo === "anh" ? 0.13 : s.bo === "depth" ? (s.yChu ?? 0.24) + (s.chu2 || String(s.giant || "").indexOf(String.fromCharCode(10)) >= 0 ? 0.27 : 0.15) : s.bo === "toi" ? s.chu2 || String(s.giant || "").indexOf(String.fromCharCode(10)) >= 0 ? 0.64 : 0.52 : s.hang ? 0.47 : s.chu2 || String(s.giant || "").indexOf(String.fromCharCode(10)) >= 0 ? 0.6 : 0.33),
|
|
11667
11682
|
tre: s.stTre ?? (s.bo === "anh" ? 0.5 : 0.3),
|
|
11668
11683
|
r: s.stR ?? (s.bo === "kinh" ? 0.07 : 0.08)
|
|
11669
11684
|
});
|
|
@@ -12942,7 +12957,7 @@ async function renderNhanh(ff, clips, files, audio, cards, nen2, options, paint,
|
|
|
12942
12957
|
gn.translate(-X, -Y);
|
|
12943
12958
|
}
|
|
12944
12959
|
{
|
|
12945
|
-
const mau7 = fx0.mau || {}, sg = +mau7.sang || +fx0.sang || 1, tp = +mau7.tuongPhan || 1, bh = +mau7.baoHoa || 1, am = +mau7.am || 0;
|
|
12960
|
+
const mau7 = fx0.mau || globalThis.__xvaiMau || {}, sg = +mau7.sang || +fx0.sang || 1, tp = +mau7.tuongPhan || 1, bh = +mau7.baoHoa || 1, am = +mau7.am || 0;
|
|
12946
12961
|
const fS = (sg !== 1 ? "brightness(" + sg.toFixed(2) + ") " : "") + (tp !== 1 ? "contrast(" + tp.toFixed(2) + ") " : "") + (bh !== 1 ? "saturate(" + bh.toFixed(2) + ") " : "") + (am ? "sepia(" + Math.min(0.6, Math.abs(am)).toFixed(2) + ") " : "");
|
|
12947
12962
|
if (fS) gn.filter = fS.trim();
|
|
12948
12963
|
gn.drawImage(fr.canvas, ox, oy, sw * kz, sh * kz);
|
|
@@ -19070,7 +19085,7 @@ async function napLoi(d) {
|
|
|
19070
19085
|
return "LOI: " + String(e && e.message || e).slice(0, 300);
|
|
19071
19086
|
}
|
|
19072
19087
|
}
|
|
19073
|
-
var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.
|
|
19088
|
+
var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.39/nap.js";
|
|
19074
19089
|
var TRONG_LOI = !!globalThis.__xvaiReact;
|
|
19075
19090
|
try {
|
|
19076
19091
|
if (!TRONG_LOI) setTimeout(() => {
|
|
@@ -19100,7 +19115,7 @@ function datCauLenh(a) {
|
|
|
19100
19115
|
on2 = true;
|
|
19101
19116
|
window.addEventListener("message", async (ev) => {
|
|
19102
19117
|
const d = ev.data;
|
|
19103
|
-
if (!d || d.
|
|
19118
|
+
if (!d || d.xvaiLoi100153 !== true) return;
|
|
19104
19119
|
const o = String(ev.origin || "");
|
|
19105
19120
|
if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
|
|
19106
19121
|
const tra = (kq) => {
|
|
@@ -19224,11 +19239,41 @@ var SuaLich = ({ ten, onDong }) => {
|
|
|
19224
19239
|
}
|
|
19225
19240
|
})();
|
|
19226
19241
|
}, [ten]);
|
|
19227
|
-
const
|
|
19228
|
-
|
|
19242
|
+
const lsHoan = useState([])[0], lsLam = useState([])[0];
|
|
19243
|
+
const [nHoan, setNHoan] = useState(0);
|
|
19244
|
+
const ghiHoan = (cu) => {
|
|
19245
|
+
const t = Date.now();
|
|
19246
|
+
if (lsHoan.length && t - (lsHoan[lsHoan.length - 1].t || 0) < 600) return;
|
|
19247
|
+
lsHoan.push({ sua: cu, t });
|
|
19248
|
+
if (lsHoan.length > 50) lsHoan.shift();
|
|
19249
|
+
lsLam.length = 0;
|
|
19250
|
+
setNHoan(lsHoan.length);
|
|
19251
|
+
};
|
|
19252
|
+
const apSua = (n) => {
|
|
19229
19253
|
setSua(n);
|
|
19230
19254
|
G.__lichSua = n;
|
|
19231
19255
|
};
|
|
19256
|
+
const hoanTac = () => {
|
|
19257
|
+
if (!lsHoan.length) return;
|
|
19258
|
+
const b = lsHoan.pop();
|
|
19259
|
+
lsLam.push({ sua, t: Date.now() });
|
|
19260
|
+
apSua(b.sua);
|
|
19261
|
+
setNHoan(lsHoan.length);
|
|
19262
|
+
setBao("Ho\xE0n t\xE1c (" + lsHoan.length + " b\u01B0\u1EDBc c\xF2n l\u1EA1i)");
|
|
19263
|
+
};
|
|
19264
|
+
const lamLai = () => {
|
|
19265
|
+
if (!lsLam.length) return;
|
|
19266
|
+
const b = lsLam.pop();
|
|
19267
|
+
lsHoan.push({ sua, t: Date.now() });
|
|
19268
|
+
apSua(b.sua);
|
|
19269
|
+
setNHoan(lsHoan.length);
|
|
19270
|
+
setBao("L\xE0m l\u1EA1i");
|
|
19271
|
+
};
|
|
19272
|
+
const dat = (i, k, v) => {
|
|
19273
|
+
ghiHoan(sua);
|
|
19274
|
+
const n = { ...sua, [i]: { ...sua[i] || {}, [k]: v } };
|
|
19275
|
+
apSua(n);
|
|
19276
|
+
};
|
|
19232
19277
|
const [ls, setLs] = useState([]);
|
|
19233
19278
|
const [them, setThem] = useState({ f: 0, d: 2, bo: "depth", giant: "", ten: "" });
|
|
19234
19279
|
useEffect(() => {
|
|
@@ -19306,11 +19351,23 @@ var SuaLich = ({ ten, onDong }) => {
|
|
|
19306
19351
|
taiTep("phu-de-" + ten.replace(/[^\w-]+/g, "_").slice(0, 40) + ".srt", cues.map((c, i) => i + 1 + "\n" + hh(c.t0) + " --> " + hh(c.t1) + "\n" + c.text + "\n").join("\n"), "text/plain");
|
|
19307
19352
|
};
|
|
19308
19353
|
const fx0 = G.__loiApp && G.__loiApp.p && G.__loiApp.p.studioFx || {};
|
|
19309
|
-
|
|
19354
|
+
let m0 = fx0.mau || G.__xvaiMau || {};
|
|
19355
|
+
try {
|
|
19356
|
+
if (!fx0.mau && !G.__xvaiMau) {
|
|
19357
|
+
const t = localStorage.getItem("xvaiMau");
|
|
19358
|
+
if (t) m0 = JSON.parse(t);
|
|
19359
|
+
}
|
|
19360
|
+
} catch (e) {
|
|
19361
|
+
}
|
|
19310
19362
|
const [fx, setFx] = useState({ sang: +m0.sang || +fx0.sang || 1, tuongPhan: +m0.tuongPhan || 1, baoHoa: +m0.baoHoa || 1, am: +m0.am || 0 });
|
|
19311
19363
|
const datFx = (k, v) => {
|
|
19312
19364
|
const n = { ...fx, [k]: v };
|
|
19313
19365
|
setFx(n);
|
|
19366
|
+
G.__xvaiMau = n;
|
|
19367
|
+
try {
|
|
19368
|
+
localStorage.setItem("xvaiMau", JSON.stringify(n));
|
|
19369
|
+
} catch (e) {
|
|
19370
|
+
}
|
|
19314
19371
|
if (typeof G.__loiSetP === "function") {
|
|
19315
19372
|
G.__loiSetP((c) => c ? { ...c, studioFx: { ...c.studioFx || {}, mau: n } } : c);
|
|
19316
19373
|
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");
|
|
@@ -19318,6 +19375,7 @@ var SuaLich = ({ ten, onDong }) => {
|
|
|
19318
19375
|
};
|
|
19319
19376
|
const themCanh = () => {
|
|
19320
19377
|
if (!(them.d > 0.3)) return;
|
|
19378
|
+
ghiHoan(sua);
|
|
19321
19379
|
const n = { ...sua, them: [...sua.them || [], { ...them, f: +them.f, d: +them.d }] };
|
|
19322
19380
|
setSua(n);
|
|
19323
19381
|
G.__lichSua = n;
|
|
@@ -19333,28 +19391,29 @@ var SuaLich = ({ ten, onDong }) => {
|
|
|
19333
19391
|
} else setBao("Ch\u01B0a c\xF3 L\xE0m pro (n\u1EA1p video + ch\u1ECDn m\u1EABu tr\u01B0\u1EDBc)");
|
|
19334
19392
|
};
|
|
19335
19393
|
const xoaHet = async () => {
|
|
19394
|
+
ghiHoan(sua);
|
|
19336
19395
|
setSua({});
|
|
19337
19396
|
G.__lichSua = null;
|
|
19338
19397
|
await ghiDem("lichSua:" + ten, { sua: {} });
|
|
19339
19398
|
setBao("\u0110\xE3 b\u1ECF m\u1ECDi s\u1EEDa tay");
|
|
19340
19399
|
};
|
|
19341
19400
|
if (!ds2.length) return /* @__PURE__ */ shim_react_default.createElement("div", { className: "rounded-xl border border-[#2C4A73] p-4 text-[12px]" }, 'Ch\u01B0a c\xF3 l\u1ECBch d\u1EF1ng \u2014 b\u1EA5m "L\xE0m pro" m\u1ED9t l\u1EA7n r\u1ED3i quay l\u1EA1i \u0111\xE2y. ', /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: onDong }, "\u0110\xF3ng"));
|
|
19342
|
-
return /* @__PURE__ */ shim_react_default.createElement("div", { className: "rounded-xl border border-[#F6D178]/60 p-3 text-[12px] bg-[#0E2240]" }, /* @__PURE__ */ shim_react_default.createElement("div", { className: "flex items-center gap-2 mb-2" }, /* @__PURE__ */ shim_react_default.createElement("span", { className: "font-black text-[#F6D178]" }, "S\u1EECA L\u1ECACH D\u1EF0NG \xB7 ", ds2.length, " c\u1EA3nh"), /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9] flex-1" }, bao), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: luu }, "L\u01B0u"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3 + " bg-[#F6D178] text-[#122238]", onClick: veLai }, "V\u1EBD l\u1EA1i"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: xoaHet }, "B\u1ECF s\u1EEDa"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: () => {
|
|
19401
|
+
return /* @__PURE__ */ shim_react_default.createElement("div", { className: "rounded-xl border border-[#F6D178]/60 p-3 text-[12px] bg-[#0E2240]" }, /* @__PURE__ */ shim_react_default.createElement("div", { className: "flex items-center gap-2 mb-2" }, /* @__PURE__ */ shim_react_default.createElement("span", { className: "font-black text-[#F6D178]" }, "S\u1EECA L\u1ECACH D\u1EF0NG \xB7 ", ds2.length, " c\u1EA3nh"), /* @__PURE__ */ shim_react_default.createElement("span", { className: "text-[#A2B2C9] flex-1" }, bao), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: hoanTac, disabled: !nHoan, title: "Ho\xE0n t\xE1c (Ctrl+Z)" }, "\u21B6 ", nHoan || ""), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: lamLai, title: "L\xE0m l\u1EA1i" }, "\u21B7"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: luu }, "L\u01B0u"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3 + " bg-[#F6D178] text-[#122238]", onClick: veLai }, "V\u1EBD l\u1EA1i"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: xoaHet }, "B\u1ECF s\u1EEDa"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: () => {
|
|
19343
19402
|
setDs(G.__lichSp || []);
|
|
19344
19403
|
} }, "N\u1EA1p l\u1EA1i"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: onDong }, "\u0110\xF3ng"), ls.length ? /* @__PURE__ */ shim_react_default.createElement("select", { className: "bg-[#0B1A2D] border border-[#2C4A73] rounded px-1 text-[11px]", value: "", onChange: (ev) => {
|
|
19345
19404
|
if (ev.target.value) napBan(+ev.target.value);
|
|
19346
19405
|
} }, /* @__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: () => {
|
|
19347
19406
|
setFx({ sang: 1, tuongPhan: 1, baoHoa: 1, am: 0 });
|
|
19348
19407
|
datFx("sang", 1);
|
|
19349
|
-
} }, "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("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) => {
|
|
19408
|
+
} }, "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) => {
|
|
19350
19409
|
const e = sua[s.id] || sua[s.i] || {};
|
|
19351
19410
|
const v = (k) => (typeof e[k] === "string" ? e[k] : s[k]) || "";
|
|
19352
|
-
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", 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) })));
|
|
19411
|
+
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) })));
|
|
19353
19412
|
})))), /* @__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)."));
|
|
19354
19413
|
};
|
|
19355
19414
|
|
|
19356
19415
|
// loi/vo-flow.tsx
|
|
19357
|
-
var PHIEN_BAN = "loi-
|
|
19416
|
+
var PHIEN_BAN = "loi-1010P";
|
|
19358
19417
|
var TRONG = () => migrateProject({ id: crypto.randomUUID(), name: "D\u1EF1 \xE1n m\u1EDBi", scenes: [], timeline: [], images: [null, null, null] });
|
|
19359
19418
|
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";
|
|
19360
19419
|
var Vo = () => {
|