xvai-loi 0.1.102 → 0.1.103
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 +11 -23
package/co.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
xvaiLoi122147
|
package/package.json
CHANGED
package/xvai-loi.js
CHANGED
|
@@ -8889,7 +8889,7 @@ function lapAnhTheoKhuon(kb, ws, K = KHUON_TOPN, toiDa = 12) {
|
|
|
8889
8889
|
const cau = W4.slice(Math.max(0, i - 5), i + 10).map((w) => w.text).join(" ");
|
|
8890
8890
|
c.kieu = "anh";
|
|
8891
8891
|
c.soAnh = 1;
|
|
8892
|
-
c.en = 'Cinematic photorealistic vertical photo that illustrates the meaning of this Vietnamese sentence: "' + cau + '". ' + K.tram.nhanVat[
|
|
8892
|
+
c.en = 'Cinematic photorealistic vertical photo that illustrates the meaning of this Vietnamese sentence: "' + cau + '". If the sentence is about people, feelings or relationships: ' + K.tram.nhanVat[0] + " Otherwise: " + K.tram.nhanVat[1] + " Natural light, no text, no captions.";
|
|
8893
8893
|
doi++;
|
|
8894
8894
|
}
|
|
8895
8895
|
}
|
|
@@ -8918,7 +8918,7 @@ function lapAnhTheoKhuon(kb, ws, K = KHUON_TOPN, toiDa = 12) {
|
|
|
8918
8918
|
if (nd.length < 2) continue;
|
|
8919
8919
|
const i = nd[0], tu = W4.slice(i, i + 3).map((w) => sach2(w.text)).join(" "), cau = W4.slice(Math.max(0, i - 5), i + 10).map((w) => w.text).join(" ");
|
|
8920
8920
|
if (timTu(tu) !== i) continue;
|
|
8921
|
-
kb.canh.push({ tu, kieu: "anh", chu: " ", chu2: "", khuon: 1, en: 'Cinematic photorealistic vertical photo that illustrates the meaning of this Vietnamese sentence: "' + cau + '".
|
|
8921
|
+
kb.canh.push({ tu, kieu: "anh", chu: " ", chu2: "", khuon: 1, en: 'Cinematic photorealistic vertical photo that illustrates the meaning of this Vietnamese sentence: "' + cau + '". If the sentence is about people, feelings or relationships: ' + K.tram.nhanVat[0] + " Otherwise: " + K.tram.nhanVat[1] + " Natural light, no text, no captions." });
|
|
8922
8922
|
them++;
|
|
8923
8923
|
}
|
|
8924
8924
|
}
|
|
@@ -11128,7 +11128,10 @@ function lapCuongMe(o) {
|
|
|
11128
11128
|
if (x.kieu === "anh" && dV) {
|
|
11129
11129
|
de(f2, dV, { uuTien: UT.so + 5, bo: "anh", ten: ten2, chu: chuK, chu2: chu22, keu: "whoosh", video: 1 }, 3, datAnh);
|
|
11130
11130
|
ghiL("video", { bo: "anh", f: f2, d: dV }, "kho video: ung vien clip " + dV.toFixed(1) + " s thay anh: " + String(x.tu || ""));
|
|
11131
|
-
} else if (x.kieu === "anh" && (co || chuK)) de(f2, (f2 < f1 ? 2 : 2.4) * kTram(), { uuTien: UT.anh, ...co ? ((o2) => x.khuon ? { ...o2, keu: "" } : o2)(
|
|
11131
|
+
} else if (x.kieu === "anh" && (co || chuK)) de(f2, (f2 < f1 ? 2 : 2.4) * kTram(), { uuTien: UT.anh, ...co ? ((o2) => x.khuon ? { ...o2, keu: "" } : o2)(
|
|
11132
|
+
nAnh++ % 3 === 0 || !((fb) => fb && fb[3] - fb[1] < KHUON_TOPN.nguoi.matToiDa)(F(f2, f2 + 2.4)) || tyLeMat(f2, f2 + 2.4) < 0.7 || !yenMat(f2, f2 + 3.6) ? { bo: "anh", ten: ten2, chu: chuK, chu2: chu22, keu: "whoosh" } : (nAnh - 1) % 3 === 1 ? { bo: "chia", ten: ten2, chu: chuK, keu: "whoosh" } : { bo: "anh", ten: ten2, chu: chuK, chu2: chu22, pip: 1, keu: "whoosh" }
|
|
11133
|
+
/* Lát 3 #2 CHƯA: thử chọn bố cục theo nội dung ảnh 12/10 → D03 tụt 5,3 s trám → trả lại; cần đo tỉ lệ kiểu bố cục đối thủ làm chuẩn trước */
|
|
11134
|
+
) : { bo: "kinh", dong: [chuK, chu22].filter(Boolean), keu: "whoosh" } }, 3, datAnh);
|
|
11132
11135
|
else if (x.kieu === "vat") {
|
|
11133
11136
|
const LG = timLogo(suaChu(chuK + " " + sach3(String(x.tu || ""))))[0];
|
|
11134
11137
|
if (LG) napHinhLogo(LG.slug);
|
|
@@ -11207,21 +11210,6 @@ function lapCuongMe(o) {
|
|
|
11207
11210
|
if (x.f - tr > 2.05) lo.push([tr, x.f]);
|
|
11208
11211
|
tr = Math.max(tr, x.f + x.d);
|
|
11209
11212
|
});
|
|
11210
|
-
if (0) lo.forEach(([a, b]) => {
|
|
11211
|
-
if (b - a < 4) return;
|
|
11212
|
-
let k = -1;
|
|
11213
|
-
let kc = -1;
|
|
11214
|
-
W22.forEach((w, q) => {
|
|
11215
|
-
if (w.f >= a + 1.2 && w.f <= b - 0.15) {
|
|
11216
|
-
kc = q;
|
|
11217
|
-
if (/[.,!?…]$/.test(String(ws[q]?.text || "").trim())) k = q;
|
|
11218
|
-
}
|
|
11219
|
-
});
|
|
11220
|
-
if (k < 2) k = kc;
|
|
11221
|
-
if (k < 2) return;
|
|
11222
|
-
const t3 = hoa2(suaChu([k - 2, k - 1, k].map((q) => sach3(ws[q].text)).join(" "))), f32 = Math.max(a + 0.3, Math.min(W22[k - 2].f - 0.1, b - 1.9));
|
|
11223
|
-
if (t3) dat(f32, Math.max(1.3, Math.min(2.1, b - f32 - 0.16)), { bo: "depth", giant: haiDong5(t3, 11), keu: "pop" }, 0.5);
|
|
11224
|
-
});
|
|
11225
11213
|
}
|
|
11226
11214
|
sp.sort((p, q) => p.f - q.f).forEach((s, k) => {
|
|
11227
11215
|
const g = k + 1 < sp.length ? sp[k + 1].f - s.f - s.d : 0;
|
|
@@ -18472,7 +18460,7 @@ async function kichBanDoan(ws) {
|
|
|
18472
18460
|
}
|
|
18473
18461
|
if (j && j.moc && cm) {
|
|
18474
18462
|
try {
|
|
18475
|
-
const j2 = await hoiAI(DE_SUA, loi2
|
|
18463
|
+
const j2 = await hoiAI(DE_SUA, loi2);
|
|
18476
18464
|
if (Array.isArray(j2.sua)) j.sua = j2.sua.concat(j.sua || []);
|
|
18477
18465
|
} catch (e) {
|
|
18478
18466
|
}
|
|
@@ -18487,7 +18475,7 @@ async function kichBanDoan(ws) {
|
|
|
18487
18475
|
}
|
|
18488
18476
|
cau += " " + w.text;
|
|
18489
18477
|
});
|
|
18490
|
-
const j3 = await hoiAI(DE_CANH, cau
|
|
18478
|
+
const j3 = await hoiAI(DE_CANH, cau);
|
|
18491
18479
|
if (Array.isArray(j3.canh) && j3.canh.length > (j.canh || []).length) j.canh = j3.canh;
|
|
18492
18480
|
} catch (e) {
|
|
18493
18481
|
}
|
|
@@ -18885,7 +18873,7 @@ async function chuanBiTaiSanAI(kieu, kb, bao, chi) {
|
|
|
18885
18873
|
let moiXong = 0;
|
|
18886
18874
|
for (let i = 0; i < ds2.length; i++) {
|
|
18887
18875
|
{
|
|
18888
|
-
const conMoi = coSan.slice(i).filter((c) => !c).length, tb = moiXong ? (Date.now() - t0) / moiXong : 6e4;
|
|
18876
|
+
const conMoi = coSan.slice(i).filter((c) => !c).length, tb = moiXong >= 3 ? (Date.now() - t0) / (moiXong - 1) : 6e4;
|
|
18889
18877
|
if (!coSan[i]) moiXong++;
|
|
18890
18878
|
bao?.("T\u1EA1o \u1EA3nh tr\xE1m (0 credit) " + (i + 1) + "/" + ds2.length + (conMoi ? " \xB7 c\xF2n " + conMoi + " \u1EA3nh m\u1EDBi \u2248 " + Math.max(1, Math.round(conMoi * tb / 6e4)) + " ph\xFAt" : "") + "...");
|
|
18891
18879
|
}
|
|
@@ -19199,7 +19187,7 @@ async function handleExport(currentProject, setExporting, setExportedBlob, addLo
|
|
|
19199
19187
|
{
|
|
19200
19188
|
const G3 = globalThis, bao = (st) => setExporting({ percent: 1, step: st });
|
|
19201
19189
|
let chiAnh = null;
|
|
19202
|
-
if (localStorage.getItem("
|
|
19190
|
+
if (localStorage.getItem("xvaiTaoNhanh") === "1") {
|
|
19203
19191
|
try {
|
|
19204
19192
|
const ds2 = dsTaiSan(mauPd.doan, kb), cu = G3.__taiSanThu;
|
|
19205
19193
|
const gia2 = new Map(ds2.map((x) => [x[0], { laVideo: false, dai: 0, width: x[2] === "1:1" ? 1024 : x[2] === "16:9" ? 1376 : 768, height: x[2] === "1:1" ? 1024 : x[2] === "16:9" ? 768 : 1376, khung: () => null }]));
|
|
@@ -20996,7 +20984,7 @@ function datCauLenh(a) {
|
|
|
20996
20984
|
on2 = true;
|
|
20997
20985
|
window.addEventListener("message", async (ev) => {
|
|
20998
20986
|
const d = ev.data;
|
|
20999
|
-
if (!d || d.
|
|
20987
|
+
if (!d || d.xvaiLoi122147 !== true) return;
|
|
21000
20988
|
const o = String(ev.origin || "");
|
|
21001
20989
|
if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
|
|
21002
20990
|
const tra = (kq) => {
|