xvai-loi 0.1.35 → 0.1.36
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 +41 -6
package/co.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
xvaiLoi100025
|
package/package.json
CHANGED
package/xvai-loi.js
CHANGED
|
@@ -11524,13 +11524,18 @@ function lapCuongMe(o) {
|
|
|
11524
11524
|
nS++;
|
|
11525
11525
|
}
|
|
11526
11526
|
}
|
|
11527
|
+
if (Array.isArray(sua.them)) for (const t of sua.them) {
|
|
11528
|
+
if (!t || typeof t.f !== "number" || !(t.d > 0.3)) continue;
|
|
11529
|
+
sp.push({ id: idC({ f: +t.f, bo: ["depth", "anh", "cut", "tron"].includes(t.bo) ? t.bo : "depth" }), f: +t.f, d: +t.d, bo: ["depth", "anh", "cut", "tron"].includes(t.bo) ? t.bo : "depth", giant: String(t.giant || ""), chu: String(t.chu || ""), chu2: String(t.chu2 || ""), ten: String(t.ten || ""), st: String(t.st || ""), khoa: 1, dSua: 1, moi: 1, keu: 1 });
|
|
11530
|
+
nS++;
|
|
11531
|
+
}
|
|
11527
11532
|
const sp2 = sp.filter((s) => !s.xoa);
|
|
11528
11533
|
sp.length = 0;
|
|
11529
11534
|
sp.push(...sp2);
|
|
11530
11535
|
sp.sort((p, q) => p.f - q.f);
|
|
11531
11536
|
for (let i = 0; i + 1 < sp.length; i++) {
|
|
11532
11537
|
const s = sp[i];
|
|
11533
|
-
if (s.dSua && s.f + s.d > sp[i + 1].f + 0.05) s.d = Math.max(0.4, +(sp[i + 1].f - s.f).toFixed(2));
|
|
11538
|
+
if ((s.dSua || sp[i + 1].moi) && s.f + s.d > sp[i + 1].f + 0.05) s.d = Math.max(0.4, +(sp[i + 1].f - s.f).toFixed(2));
|
|
11534
11539
|
}
|
|
11535
11540
|
G2.__lichSuaDaAp = nS;
|
|
11536
11541
|
ghiL("bo", { bo: "sua-tay" }, "sua tay: " + nS + " truong");
|
|
@@ -18962,7 +18967,7 @@ async function napLoi(d) {
|
|
|
18962
18967
|
return "LOI: " + String(e && e.message || e).slice(0, 300);
|
|
18963
18968
|
}
|
|
18964
18969
|
}
|
|
18965
|
-
var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.
|
|
18970
|
+
var LOI_URL = "https://cdn.jsdelivr.net/npm/xvai-loi@0.1.35/nap.js";
|
|
18966
18971
|
var TRONG_LOI = !!globalThis.__xvaiReact;
|
|
18967
18972
|
try {
|
|
18968
18973
|
if (!TRONG_LOI) setTimeout(() => {
|
|
@@ -18992,7 +18997,7 @@ function datCauLenh(a) {
|
|
|
18992
18997
|
on2 = true;
|
|
18993
18998
|
window.addEventListener("message", async (ev) => {
|
|
18994
18999
|
const d = ev.data;
|
|
18995
|
-
if (!d || d.
|
|
19000
|
+
if (!d || d.xvaiLoi100025 !== true) return;
|
|
18996
19001
|
const o = String(ev.origin || "");
|
|
18997
19002
|
if (!(o.indexOf("https://flow.google.com") === 0 || o.indexOf("https://labs.google") === 0)) return;
|
|
18998
19003
|
const tra = (kq) => {
|
|
@@ -19121,10 +19126,38 @@ var SuaLich = ({ ten, onDong }) => {
|
|
|
19121
19126
|
setSua(n);
|
|
19122
19127
|
G.__lichSua = n;
|
|
19123
19128
|
};
|
|
19129
|
+
const [ls, setLs] = useState([]);
|
|
19130
|
+
const [them, setThem] = useState({ f: 0, d: 2, bo: "depth", giant: "", ten: "" });
|
|
19131
|
+
useEffect(() => {
|
|
19132
|
+
(async () => {
|
|
19133
|
+
const d = await docDem("lichSuaLS:" + ten);
|
|
19134
|
+
if (d && Array.isArray(d.ds)) setLs(d.ds);
|
|
19135
|
+
})();
|
|
19136
|
+
}, [ten]);
|
|
19124
19137
|
const luu = async () => {
|
|
19125
19138
|
G.__lichSua = sua;
|
|
19126
19139
|
await ghiDem("lichSua:" + ten, { sua });
|
|
19127
|
-
|
|
19140
|
+
const t = Date.now();
|
|
19141
|
+
await ghiDem("lichSua:" + ten + ":" + t, { sua });
|
|
19142
|
+
const ds3 = [t, ...ls].slice(0, 10);
|
|
19143
|
+
setLs(ds3);
|
|
19144
|
+
await ghiDem("lichSuaLS:" + ten, { ds: ds3 });
|
|
19145
|
+
setBao("\u0110\xE3 l\u01B0u " + Object.keys(sua).length + " c\u1EA3nh s\u1EEDa tay (b\u1EA3n " + new Date(t).toTimeString().slice(0, 5) + ") \xB7 b\u1EA5m V\u1EBD l\u1EA1i \u0111\u1EC3 \xE1p");
|
|
19146
|
+
};
|
|
19147
|
+
const napBan = async (t) => {
|
|
19148
|
+
const d = await docDem("lichSua:" + ten + ":" + t);
|
|
19149
|
+
if (d && d.sua) {
|
|
19150
|
+
setSua(d.sua);
|
|
19151
|
+
G.__lichSua = d.sua;
|
|
19152
|
+
setBao("\u0110\xE3 n\u1EA1p b\u1EA3n " + new Date(t).toTimeString().slice(0, 5) + " \xB7 b\u1EA5m V\u1EBD l\u1EA1i \u0111\u1EC3 \xE1p");
|
|
19153
|
+
}
|
|
19154
|
+
};
|
|
19155
|
+
const themCanh = () => {
|
|
19156
|
+
if (!(them.d > 0.3)) return;
|
|
19157
|
+
const n = { ...sua, them: [...sua.them || [], { ...them, f: +them.f, d: +them.d }] };
|
|
19158
|
+
setSua(n);
|
|
19159
|
+
G.__lichSua = n;
|
|
19160
|
+
setBao("\u0110\xE3 th\xEAm c\u1EA3nh " + them.bo + " \u1EDF " + (+them.f).toFixed(1) + " s \xB7 L\u01B0u r\u1ED3i V\u1EBD l\u1EA1i");
|
|
19128
19161
|
};
|
|
19129
19162
|
const veLai = async () => {
|
|
19130
19163
|
await luu();
|
|
@@ -19144,7 +19177,9 @@ var SuaLich = ({ ten, onDong }) => {
|
|
|
19144
19177
|
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"));
|
|
19145
19178
|
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: () => {
|
|
19146
19179
|
setDs(G.__lichSp || []);
|
|
19147
|
-
} }, "N\u1EA1p l\u1EA1i"), /* @__PURE__ */ shim_react_default.createElement("button", { className: nut3, onClick: onDong }, "\u0110\xF3ng")
|
|
19180
|
+
} }, "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) => {
|
|
19181
|
+
if (ev.target.value) napBan(+ev.target.value);
|
|
19182
|
+
} }, /* @__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-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"), (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" }, "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) => {
|
|
19148
19183
|
const e = sua[s.id] || sua[s.i] || {};
|
|
19149
19184
|
const v = (k) => (typeof e[k] === "string" ? e[k] : s[k]) || "";
|
|
19150
19185
|
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", 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) })));
|
|
@@ -19152,7 +19187,7 @@ var SuaLich = ({ ten, onDong }) => {
|
|
|
19152
19187
|
};
|
|
19153
19188
|
|
|
19154
19189
|
// loi/vo-flow.tsx
|
|
19155
|
-
var PHIEN_BAN = "loi-
|
|
19190
|
+
var PHIEN_BAN = "loi-0910N";
|
|
19156
19191
|
var TRONG = () => migrateProject({ id: crypto.randomUUID(), name: "D\u1EF1 \xE1n m\u1EDBi", scenes: [], timeline: [], images: [null, null, null] });
|
|
19157
19192
|
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";
|
|
19158
19193
|
var Vo = () => {
|