Spaces:
Running
Running
第二步照片:支持 user_photo.jpg 与页面替换照片;豆子重绘为果冻质感
Browse files
README.md
CHANGED
|
@@ -71,6 +71,6 @@ pinned: false
|
|
| 71 |
- [x] 1 开场重做(极简图标、去卡顿;图标与豆子精灵加载时预热)
|
| 72 |
- [x] 2 豆维登场小程序码(去掉豆子环,恢复圆角方形卡片)
|
| 73 |
- [x] 3 场景顺序 + 新旁白(想法 → 和 AI 一起写 → 豆维登场;三版本旁白重录)
|
| 74 |
-
- [
|
| 75 |
-
- [
|
| 76 |
- [ ] 6 验证与发布
|
|
|
|
| 71 |
- [x] 1 开场重做(极简图标、去卡顿;图标与豆子精灵加载时预热)
|
| 72 |
- [x] 2 豆维登场小程序码(去掉豆子环,恢复圆角方形卡片)
|
| 73 |
- [x] 3 场景顺序 + 新旁白(想法 → 和 AI 一起写 → 豆维登场;三版本旁白重录)
|
| 74 |
+
- [x] 4 照片替换(支持 `media/user_photo.jpg` 自动加载 + 页面「替换照片」按钮;⚠️ 本轮未收到用户照片文件,暂用原图兜底)
|
| 75 |
+
- [x] 5 豆子美化(果冻质感:左上受光体积、通透内孔、双层高光、柔和接触阴影;精灵 200px 缓存)
|
| 76 |
- [ ] 6 验证与发布
|
assets/{App-v37164f544.js → App-v3561c02df.js}
RENAMED
|
@@ -1941,7 +1941,7 @@ const xs = 200,
|
|
| 1941 |
xo = new Map(),
|
| 1942 |
Tr = (r, e, t) => r.map((n) => Math.round(n + (e - n) * t)),
|
| 1943 |
xt = (r, e = 1) => `rgba(${r[0]},${r[1]},${r[2]},${e})`;
|
| 1944 |
-
// 拼豆精灵(v3):短圆管
|
| 1945 |
function Rd(r) {
|
| 1946 |
let e = xo.get(r);
|
| 1947 |
if (e) return e;
|
|
@@ -1949,101 +1949,82 @@ function Rd(r) {
|
|
| 1949 |
const t = e.getContext("2d"),
|
| 1950 |
n = xs / 2,
|
| 1951 |
R = (xs * ul) / 2,
|
| 1952 |
-
H = R * 0.
|
| 1953 |
s = al(r),
|
| 1954 |
L = (0.299 * s[0] + 0.587 * s[1] + 0.114 * s[2]) / 255,
|
| 1955 |
-
hi = Tr(s, 255, 0.
|
| 1956 |
-
lo = Tr(s, 0, 0.
|
| 1957 |
-
|
| 1958 |
-
ring = (
|
| 1959 |
-
t.beginPath();
|
| 1960 |
-
|
| 1961 |
-
|
|
|
|
| 1962 |
};
|
| 1963 |
-
// 1. 接触阴影
|
| 1964 |
-
t.save()
|
| 1965 |
-
|
| 1966 |
-
|
| 1967 |
-
|
| 1968 |
-
|
| 1969 |
-
|
| 1970 |
-
|
| 1971 |
-
|
| 1972 |
-
|
| 1973 |
-
t.
|
| 1974 |
-
t.fill();
|
| 1975 |
-
|
| 1976 |
-
// 2. 本体:左上受光的径向渐变
|
| 1977 |
-
const g1 = t.createRadialGradient(n - R * 0.42, n - R * 0.48, R * 0.05, n, n, R * 1.08);
|
| 1978 |
-
g1.addColorStop(0, xt(hi));
|
| 1979 |
-
g1.addColorStop(0.45, xt(s));
|
| 1980 |
-
g1.addColorStop(1, xt(lo));
|
| 1981 |
-
t.fillStyle = g1;
|
| 1982 |
-
ring(R, H);
|
| 1983 |
-
t.fill("evenodd");
|
| 1984 |
-
// 3. 圆管体积:内外缘压暗,环中线提亮
|
| 1985 |
const g2 = t.createRadialGradient(n, n, H, n, n, R);
|
| 1986 |
-
g2.addColorStop(0, xt(
|
| 1987 |
-
|
| 1988 |
-
|
| 1989 |
-
|
| 1990 |
-
|
| 1991 |
-
|
| 1992 |
-
|
| 1993 |
-
|
| 1994 |
-
// 4.
|
| 1995 |
const g3 = t.createLinearGradient(n - H, n - H, n + H, n + H);
|
| 1996 |
-
g3.addColorStop(0, xt(Tr(s, 0, 0.
|
| 1997 |
-
|
| 1998 |
-
|
| 1999 |
-
|
| 2000 |
-
|
| 2001 |
-
|
| 2002 |
-
t.
|
| 2003 |
-
|
| 2004 |
-
|
| 2005 |
-
|
| 2006 |
-
t.
|
| 2007 |
-
|
| 2008 |
-
|
| 2009 |
-
|
| 2010 |
-
|
| 2011 |
-
|
| 2012 |
-
|
| 2013 |
-
t.
|
| 2014 |
-
|
| 2015 |
-
|
| 2016 |
-
|
| 2017 |
-
|
| 2018 |
-
t.
|
| 2019 |
-
|
| 2020 |
-
|
| 2021 |
-
|
| 2022 |
-
|
| 2023 |
-
|
| 2024 |
-
t.
|
| 2025 |
-
|
| 2026 |
-
t.
|
| 2027 |
-
|
| 2028 |
-
|
| 2029 |
-
|
| 2030 |
-
|
| 2031 |
-
|
| 2032 |
-
|
| 2033 |
-
|
| 2034 |
-
|
| 2035 |
-
|
| 2036 |
-
t.lineWidth = R * 0.028;
|
| 2037 |
-
t.strokeStyle = `rgba(255,255,255,${0.2 + L * 0.15})`;
|
| 2038 |
-
t.beginPath();
|
| 2039 |
-
t.arc(n, n, H + R * 0.012, Math.PI * 0.05, Math.PI * 0.7);
|
| 2040 |
-
t.stroke();
|
| 2041 |
-
t.strokeStyle = xt(Tr(s, 0, 0.45), 0.5);
|
| 2042 |
-
t.beginPath();
|
| 2043 |
-
t.arc(n, n, R - R * 0.014, 0, Math.PI * 2);
|
| 2044 |
-
t.stroke();
|
| 2045 |
-
xo.set(r, e);
|
| 2046 |
-
return e;
|
| 2047 |
}
|
| 2048 |
function mr(r, e, t, n, i, s = "bead") {
|
| 2049 |
if (n <= 0.5) return;
|
|
@@ -2652,7 +2633,7 @@ const df = qe.flatMap((r) => r.sfx.map((e) => ({ ...e, t: e.t + r.start }))),
|
|
| 2652 |
),
|
| 2653 |
ml = "./",
|
| 2654 |
da = (r) => `${ml}media/${r}`,
|
| 2655 |
-
ff = (r) => `${ml}vo/${r}.mp3`,
|
| 2656 |
Co = [
|
| 2657 |
"show_finished",
|
| 2658 |
"scan_final",
|
|
@@ -2721,24 +2702,47 @@ async function gf(r) {
|
|
| 2721 |
((s[f] = await pf(da(`${f}.mp4`))), n());
|
| 2722 |
}),
|
| 2723 |
]);
|
|
|
|
| 2724 |
const a = ol(cf, "Q"),
|
| 2725 |
o = ll(a),
|
| 2726 |
-
c = i.p_done
|
| 2727 |
-
|
| 2728 |
((u.width = u.height = 800),
|
| 2729 |
u.getContext("2d").drawImage(c, 200, 300, 800, 800, 0, 0, 800, 800));
|
| 2730 |
-
|
| 2731 |
d = {
|
| 2732 |
n: l.n,
|
| 2733 |
cells: l.cells.map((f, h) =>
|
| 2734 |
f.dark && !f.fn && (h * 7919) % 5 < 2 ? { ...f, hex: "#8c7a96" } : f,
|
| 2735 |
),
|
| 2736 |
};
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2737 |
// 预热:提前生成豆子精灵与开场图标,避免首次出现时逐帧生成造成卡顿
|
| 2738 |
for (const f of new Set([...ct, ...l.cells.map((h) => h.hex), ...d.cells.map((h) => h.hex), "#ffbb27", "#fbfbf6", "#1c334d"])) Rd(f);
|
| 2739 |
for (const f of ["ai", "qr", "art", "ask"]) (hkIcon(f, 230), hkIcon(f, 190));
|
| 2740 |
return { images: i, videos: s, qr: a, plain: o, fused: l, weak: d, photo: u };
|
| 2741 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2742 |
const Ps = new Map();
|
| 2743 |
async function bf(r, e) {
|
| 2744 |
const t = {};
|
|
@@ -32458,6 +32462,46 @@ function l1({
|
|
| 32458 |
},
|
| 32459 |
this,
|
| 32460 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32461 |
],
|
| 32462 |
},
|
| 32463 |
void 0,
|
|
|
|
| 1941 |
xo = new Map(),
|
| 1942 |
Tr = (r, e, t) => r.map((n) => Math.round(n + (e - n) * t)),
|
| 1943 |
xt = (r, e = 1) => `rgba(${r[0]},${r[1]},${r[2]},${e})`;
|
| 1944 |
+
// 拼豆精灵(v3):果冻质感短圆管——左上受光、柔和体积、通透内孔、双层高光、柔和接触阴影
|
| 1945 |
function Rd(r) {
|
| 1946 |
let e = xo.get(r);
|
| 1947 |
if (e) return e;
|
|
|
|
| 1949 |
const t = e.getContext("2d"),
|
| 1950 |
n = xs / 2,
|
| 1951 |
R = (xs * ul) / 2,
|
| 1952 |
+
H = R * 0.34,
|
| 1953 |
s = al(r),
|
| 1954 |
L = (0.299 * s[0] + 0.587 * s[1] + 0.114 * s[2]) / 255,
|
| 1955 |
+
hi = Tr(s, 255, 0.5 - L * 0.25),
|
| 1956 |
+
lo = Tr(s, 0, 0.16 + (1 - L) * 0.06),
|
| 1957 |
+
rimC = Tr(s, 0, 0.3),
|
| 1958 |
+
ring = () => {
|
| 1959 |
+
(t.beginPath(), t.arc(n, n, R, 0, Math.PI * 2), t.arc(n, n, H, 0, Math.PI * 2, !0));
|
| 1960 |
+
},
|
| 1961 |
+
disc = (x, y, rr) => {
|
| 1962 |
+
(t.beginPath(), t.arc(x, y, rr, 0, Math.PI * 2));
|
| 1963 |
};
|
| 1964 |
+
// 1. 接触阴影
|
| 1965 |
+
(t.save(),
|
| 1966 |
+
(t.filter = `blur(${R * 0.12}px)`),
|
| 1967 |
+
(t.fillStyle = "rgba(60,44,20,0.22)"),
|
| 1968 |
+
t.beginPath(),
|
| 1969 |
+
t.ellipse(n + R * 0.06, n + R * 0.12, R * 0.97, R * 0.93, 0, 0, Math.PI * 2),
|
| 1970 |
+
t.fill(),
|
| 1971 |
+
(t.filter = "none"),
|
| 1972 |
+
t.restore());
|
| 1973 |
+
// 2. 本体
|
| 1974 |
+
const g1 = t.createRadialGradient(n - R * 0.38, n - R * 0.42, R * 0.1, n + R * 0.05, n + R * 0.08, R * 1.05);
|
| 1975 |
+
(g1.addColorStop(0, xt(hi)), g1.addColorStop(0.5, xt(s)), g1.addColorStop(1, xt(lo)), (t.fillStyle = g1), ring(), t.fill("evenodd"));
|
| 1976 |
+
// 3. 圆管体积:环中线微亮、外缘轻压暗
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1977 |
const g2 = t.createRadialGradient(n, n, H, n, n, R);
|
| 1978 |
+
(g2.addColorStop(0, xt(rimC, 0.28)),
|
| 1979 |
+
g2.addColorStop(0.22, xt(s, 0)),
|
| 1980 |
+
g2.addColorStop(0.55, "rgba(255,255,255,0.12)"),
|
| 1981 |
+
g2.addColorStop(0.85, xt(s, 0)),
|
| 1982 |
+
g2.addColorStop(1, xt(rimC, 0.3)),
|
| 1983 |
+
(t.fillStyle = g2),
|
| 1984 |
+
ring(),
|
| 1985 |
+
t.fill("evenodd"));
|
| 1986 |
+
// 4. 内孔:左上内壁背光、右下内壁受光,通透不发黑
|
| 1987 |
const g3 = t.createLinearGradient(n - H, n - H, n + H, n + H);
|
| 1988 |
+
(g3.addColorStop(0, xt(Tr(s, 0, 0.5))),
|
| 1989 |
+
g3.addColorStop(0.5, xt(Tr(s, 0, 0.3))),
|
| 1990 |
+
g3.addColorStop(1, xt(Tr(s, 255, 0.25))),
|
| 1991 |
+
(t.fillStyle = g3),
|
| 1992 |
+
disc(n, n, H),
|
| 1993 |
+
t.fill());
|
| 1994 |
+
const g4 = t.createRadialGradient(n - H * 0.2, n - H * 0.2, 0, n - H * 0.1, n - H * 0.1, H * 0.75);
|
| 1995 |
+
(g4.addColorStop(0, `rgba(20,14,8,${0.22 + (1 - L) * 0.08})`), g4.addColorStop(1, "rgba(20,14,8,0)"), (t.fillStyle = g4), disc(n, n, H), t.fill());
|
| 1996 |
+
// 5. 高光(裁剪在环内)
|
| 1997 |
+
(t.save(), ring(), t.clip("evenodd"));
|
| 1998 |
+
(t.filter = `blur(${R * 0.08}px)`),
|
| 1999 |
+
(t.strokeStyle = `rgba(255,255,255,${0.7 - L * 0.25})`),
|
| 2000 |
+
(t.lineWidth = R * 0.22),
|
| 2001 |
+
(t.lineCap = "round"),
|
| 2002 |
+
t.beginPath(),
|
| 2003 |
+
t.arc(n, n, (R + H) / 2 + R * 0.05, Math.PI * 1.05, Math.PI * 1.45),
|
| 2004 |
+
t.stroke();
|
| 2005 |
+
(t.filter = `blur(${R * 0.015}px)`),
|
| 2006 |
+
(t.fillStyle = "rgba(255,255,255,0.95)"),
|
| 2007 |
+
t.beginPath(),
|
| 2008 |
+
t.ellipse(n - R * 0.47, n - R * 0.47, R * 0.12, R * 0.06, -0.78, 0, Math.PI * 2),
|
| 2009 |
+
t.fill();
|
| 2010 |
+
(t.filter = `blur(${R * 0.06}px)`),
|
| 2011 |
+
(t.strokeStyle = `rgba(255,255,255,${0.2 + L * 0.12})`),
|
| 2012 |
+
(t.lineWidth = R * 0.08),
|
| 2013 |
+
t.beginPath(),
|
| 2014 |
+
t.arc(n, n, R * 0.88, Math.PI * 0.08, Math.PI * 0.45),
|
| 2015 |
+
t.stroke();
|
| 2016 |
+
((t.filter = "none"), t.restore());
|
| 2017 |
+
// 6. 孔沿亮边 + 外轮廓
|
| 2018 |
+
((t.lineWidth = R * 0.03),
|
| 2019 |
+
(t.strokeStyle = `rgba(255,255,255,${0.35 + L * 0.2})`),
|
| 2020 |
+
t.beginPath(),
|
| 2021 |
+
t.arc(n, n, H + R * 0.015, Math.PI * 0.05, Math.PI * 0.75),
|
| 2022 |
+
t.stroke(),
|
| 2023 |
+
(t.lineWidth = R * 0.025),
|
| 2024 |
+
(t.strokeStyle = xt(Tr(s, 0, 0.4), 0.45)),
|
| 2025 |
+
disc(n, n, R - R * 0.013),
|
| 2026 |
+
t.stroke());
|
| 2027 |
+
return (xo.set(r, e), e);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2028 |
}
|
| 2029 |
function mr(r, e, t, n, i, s = "bead") {
|
| 2030 |
if (n <= 0.5) return;
|
|
|
|
| 2633 |
),
|
| 2634 |
ml = "./",
|
| 2635 |
da = (r) => `${ml}media/${r}`,
|
| 2636 |
+
ff = (r) => `${ml}vo/${r}.mp3?v=3`,
|
| 2637 |
Co = [
|
| 2638 |
"show_finished",
|
| 2639 |
"scan_final",
|
|
|
|
| 2702 |
((s[f] = await pf(da(`${f}.mp4`))), n());
|
| 2703 |
}),
|
| 2704 |
]);
|
| 2705 |
+
const up = await mf(da("user_photo.jpg?v=3")).catch(() => null);
|
| 2706 |
const a = ol(cf, "Q"),
|
| 2707 |
o = ll(a),
|
| 2708 |
+
c = i.p_done;
|
| 2709 |
+
let u = document.createElement("canvas");
|
| 2710 |
((u.width = u.height = 800),
|
| 2711 |
u.getContext("2d").drawImage(c, 200, 300, 800, 800, 0, 0, 800, 800));
|
| 2712 |
+
let l = Fd(a, u, 800, 800),
|
| 2713 |
d = {
|
| 2714 |
n: l.n,
|
| 2715 |
cells: l.cells.map((f, h) =>
|
| 2716 |
f.dark && !f.fn && (h * 7919) % 5 < 2 ? { ...f, hex: "#8c7a96" } : f,
|
| 2717 |
),
|
| 2718 |
};
|
| 2719 |
+
if (up) {
|
| 2720 |
+
const A0 = { qr: a, photo: u, fused: l, weak: d };
|
| 2721 |
+
(bwSetPhoto(A0, up), (u = A0.photo), (l = A0.fused), (d = A0.weak));
|
| 2722 |
+
}
|
| 2723 |
// 预热:提前生成豆子精灵与开场图标,避免首次出现时逐帧生成造成卡顿
|
| 2724 |
for (const f of new Set([...ct, ...l.cells.map((h) => h.hex), ...d.cells.map((h) => h.hex), "#ffbb27", "#fbfbf6", "#1c334d"])) Rd(f);
|
| 2725 |
for (const f of ["ai", "qr", "art", "ask"]) (hkIcon(f, 230), hkIcon(f, 190));
|
| 2726 |
return { images: i, videos: s, qr: a, plain: o, fused: l, weak: d, photo: u };
|
| 2727 |
}
|
| 2728 |
+
// 「第二步 · 选一张照片」:用用户照片替换,并重新生成照片融合的拼豆二维码
|
| 2729 |
+
function bwSetPhoto(A, img) {
|
| 2730 |
+
const w = img.naturalWidth || img.width,
|
| 2731 |
+
h = img.naturalHeight || img.height,
|
| 2732 |
+
m = Math.min(w, h),
|
| 2733 |
+
u = document.createElement("canvas");
|
| 2734 |
+
((u.width = u.height = 800),
|
| 2735 |
+
u.getContext("2d").drawImage(img, (w - m) / 2, (h - m) / 2, m, m, 0, 0, 800, 800));
|
| 2736 |
+
const l = Fd(A.qr, u, 800, 800);
|
| 2737 |
+
((A.photo = u),
|
| 2738 |
+
(A.fused = l),
|
| 2739 |
+
(A.weak = {
|
| 2740 |
+
n: l.n,
|
| 2741 |
+
cells: l.cells.map((f, k) => (f.dark && !f.fn && (k * 7919) % 5 < 2 ? { ...f, hex: "#8c7a96" } : f)),
|
| 2742 |
+
}));
|
| 2743 |
+
for (const f of new Set(l.cells.map((k) => k.hex))) Rd(f);
|
| 2744 |
+
return A;
|
| 2745 |
+
}
|
| 2746 |
const Ps = new Map();
|
| 2747 |
async function bf(r, e) {
|
| 2748 |
const t = {};
|
|
|
|
| 32462 |
},
|
| 32463 |
this,
|
| 32464 |
),
|
| 32465 |
+
U.jsxDEV(
|
| 32466 |
+
"label",
|
| 32467 |
+
{
|
| 32468 |
+
title: "第二步 · 选一张照片:换成你自己的照片(导出视频同样生效)",
|
| 32469 |
+
className: `flex cursor-pointer items-center gap-1.5 rounded-lg border px-3 py-1.5 text-sm transition border-white/10 text-white/70 hover:bg-white/5 ${ue ? "pointer-events-none opacity-40" : ""}`,
|
| 32470 |
+
children: [
|
| 32471 |
+
"替换照片",
|
| 32472 |
+
U.jsxDEV(
|
| 32473 |
+
"input",
|
| 32474 |
+
{
|
| 32475 |
+
type: "file",
|
| 32476 |
+
accept: "image/*",
|
| 32477 |
+
className: "hidden",
|
| 32478 |
+
onChange: (K) => {
|
| 32479 |
+
var ie;
|
| 32480 |
+
const Ie = (ie = K.target.files) == null ? void 0 : ie[0];
|
| 32481 |
+
if (!Ie) return;
|
| 32482 |
+
const Ge = new Image(),
|
| 32483 |
+
Fe = URL.createObjectURL(Ie);
|
| 32484 |
+
((Ge.onload = () => {
|
| 32485 |
+
(bwSetPhoto(r, Ge), (w.current.dirty = !0), URL.revokeObjectURL(Fe));
|
| 32486 |
+
const je = qe.find((He) => He.id === "step2");
|
| 32487 |
+
je && !w.current.playing && z(je.start + 3.2);
|
| 32488 |
+
}),
|
| 32489 |
+
(Ge.src = Fe),
|
| 32490 |
+
(K.target.value = ""));
|
| 32491 |
+
},
|
| 32492 |
+
},
|
| 32493 |
+
void 0,
|
| 32494 |
+
!1,
|
| 32495 |
+
void 0,
|
| 32496 |
+
this,
|
| 32497 |
+
),
|
| 32498 |
+
],
|
| 32499 |
+
},
|
| 32500 |
+
void 0,
|
| 32501 |
+
!0,
|
| 32502 |
+
void 0,
|
| 32503 |
+
this,
|
| 32504 |
+
),
|
| 32505 |
],
|
| 32506 |
},
|
| 32507 |
void 0,
|
assets/{index-v37164f544.js → index-v3561c02df.js}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
| 1 |
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Br42UDbl.js","./index-BlGQAcOD.js","./client-BlQxAbrl.js","./index-tKuM8enU.js","./App-
|
| 2 |
-
(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))d(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const a of t.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&d(a)}).observe(document,{childList:!0,subtree:!0});function s(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function d(e){if(e.ep)return;e.ep=!0;const t=s(e);fetch(e.href,t)}})();const E="modulepreload",v=function(o,n){return new URL(o,n).href},w={},y=function(n,s,d){let e=Promise.resolve();if(s&&s.length>0){let a=function(i){return Promise.all(i.map(u=>Promise.resolve(u).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};const l=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),h=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));e=a(s.map(i=>{if(i=v(i,d),i in w)return;w[i]=!0;const u=i.endsWith(".css"),p=u?'[rel="stylesheet"]':"";if(!!d)for(let m=l.length-1;m>=0;m--){const g=l[m];if(g.href===i&&(!u||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${p}`))return;const r=document.createElement("link");if(r.rel=u?"stylesheet":E,u||(r.as="script"),r.crossOrigin="",r.href=i,h&&r.setAttribute("nonce",h),document.head.appendChild(r),u)return new Promise((m,g)=>{r.addEventListener("load",m),r.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${i}`)))})}))}function t(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return e.then(a=>{for(const l of a||[])l.status==="rejected"&&t(l.reason);return n().catch(t)})},_="__dep_reload",L=6,O=6e4;function P(){try{return JSON.parse(sessionStorage.getItem(_)||"{}")}catch{return{c:0,t:0}}}async function R(){const o=document.getElementById("root");try{let n=function(){if(!document.querySelector("[data-surf-placeholder]"))try{window.parent.postMessage({type:"surf-app-ready"},"*")}catch{}};const s=await y(()=>import("./index-Br42UDbl.js").then(c=>c.i),__vite__mapDeps([0,1]),import.meta.url);if(typeof s.useState!="function")throw new Error("dep-stub");const{createElement:d}=s,{createRoot:e,hydrateRoot:t}=await y(async()=>{const{createRoot:c,hydrateRoot:r}=await import("./client-BlQxAbrl.js").then(m=>m.c);return{createRoot:c,hydrateRoot:r}},__vite__mapDeps([2,1]),import.meta.url),{QueryClient:a,QueryClientProvider:l}=await y(async()=>{const{QueryClient:c,QueryClientProvider:r}=await import("./index-tKuM8enU.js");return{QueryClient:c,QueryClientProvider:r}},__vite__mapDeps([3,0,1]),import.meta.url),{default:f}=await y(async()=>{const{default:c}=await import("./App-
|
|
|
|
| 1 |
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Br42UDbl.js","./index-BlGQAcOD.js","./client-BlQxAbrl.js","./index-tKuM8enU.js","./App-v3561c02df.js","./jsx-dev-runtime-Czb3f8pQ.js","./ErrorBoundary-DwultlP_.js"])))=>i.map(i=>d[i]);
|
| 2 |
+
(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))d(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const a of t.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&d(a)}).observe(document,{childList:!0,subtree:!0});function s(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function d(e){if(e.ep)return;e.ep=!0;const t=s(e);fetch(e.href,t)}})();const E="modulepreload",v=function(o,n){return new URL(o,n).href},w={},y=function(n,s,d){let e=Promise.resolve();if(s&&s.length>0){let a=function(i){return Promise.all(i.map(u=>Promise.resolve(u).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};const l=document.getElementsByTagName("link"),f=document.querySelector("meta[property=csp-nonce]"),h=(f==null?void 0:f.nonce)||(f==null?void 0:f.getAttribute("nonce"));e=a(s.map(i=>{if(i=v(i,d),i in w)return;w[i]=!0;const u=i.endsWith(".css"),p=u?'[rel="stylesheet"]':"";if(!!d)for(let m=l.length-1;m>=0;m--){const g=l[m];if(g.href===i&&(!u||g.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${i}"]${p}`))return;const r=document.createElement("link");if(r.rel=u?"stylesheet":E,u||(r.as="script"),r.crossOrigin="",r.href=i,h&&r.setAttribute("nonce",h),document.head.appendChild(r),u)return new Promise((m,g)=>{r.addEventListener("load",m),r.addEventListener("error",()=>g(new Error(`Unable to preload CSS for ${i}`)))})}))}function t(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return e.then(a=>{for(const l of a||[])l.status==="rejected"&&t(l.reason);return n().catch(t)})},_="__dep_reload",L=6,O=6e4;function P(){try{return JSON.parse(sessionStorage.getItem(_)||"{}")}catch{return{c:0,t:0}}}async function R(){const o=document.getElementById("root");try{let n=function(){if(!document.querySelector("[data-surf-placeholder]"))try{window.parent.postMessage({type:"surf-app-ready"},"*")}catch{}};const s=await y(()=>import("./index-Br42UDbl.js").then(c=>c.i),__vite__mapDeps([0,1]),import.meta.url);if(typeof s.useState!="function")throw new Error("dep-stub");const{createElement:d}=s,{createRoot:e,hydrateRoot:t}=await y(async()=>{const{createRoot:c,hydrateRoot:r}=await import("./client-BlQxAbrl.js").then(m=>m.c);return{createRoot:c,hydrateRoot:r}},__vite__mapDeps([2,1]),import.meta.url),{QueryClient:a,QueryClientProvider:l}=await y(async()=>{const{QueryClient:c,QueryClientProvider:r}=await import("./index-tKuM8enU.js");return{QueryClient:c,QueryClientProvider:r}},__vite__mapDeps([3,0,1]),import.meta.url),{default:f}=await y(async()=>{const{default:c}=await import("./App-v3561c02df.js").then(r=>r.A);return{default:c}},__vite__mapDeps([4,5,1,0]),import.meta.url),{default:h}=await y(async()=>{const{default:c}=await import("./ErrorBoundary-DwultlP_.js");return{default:c}},__vite__mapDeps([6,5,1,0]),import.meta.url),i=new a({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:3,retryDelay:c=>Math.min(1e3*2**c,1e4),staleTime:3e4}}}),u=d(h,null,d(l,{client:i},d(f))),p=!!o.querySelector("[data-surf-placeholder]");o.childNodes.length>0&&o.innerHTML!=="<!--ssr-outlet-->"&&!p?t(o,u):(o.innerHTML="",e(o).render(u)),window.__reactOk=!0,sessionStorage.removeItem(_),n(),new MutationObserver(n).observe(o,{childList:!0,subtree:!0})}catch{const n=P(),s=Date.now()-n.t>O?0:n.c;s<L?(o.innerHTML=['<div style="padding:24px;text-align:center;font-family:system-ui,sans-serif">','<p style="color:#3b82f6;font-weight:600;margin:0 0 4px">Loading dependencies...</p>','<p style="color:#3b82f6;opacity:0.7;font-size:12px;margin:0">Reloading automatically</p>',"</div>"].join(""),sessionStorage.setItem(_,JSON.stringify({c:s+1,t:Date.now()})),setTimeout(()=>location.reload(),3e3+s*1e3)):o.innerHTML=['<div style="padding:24px;text-align:center;font-family:system-ui,sans-serif">','<p style="color:#c0392b;font-weight:600;margin:0 0 4px">Failed to load dependencies</p>','<p style="color:#c0392b;opacity:0.8;font-size:12px;margin:0">Please refresh the page</p>',"</div>"].join("")}}R();export{y as _};
|
assets/{mediabunny-aac-encoder-v37164f544.js → mediabunny-aac-encoder-v3561c02df.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./App-
|
| 2 |
-
import{_ as o}from"./index-
|
| 3 |
\\x7F\\x7F~\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\x01\\x7F\\\`\\r\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F}}\\x7F\\x7F}\x01}\\\`\x02\\x7F}\x01}\\\`\x03\\x7F\\x7F~\\0\\\`\\x07\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\x01\\x7F\\\`\x02\\x7F\\x7F\x01~\\\`\x03\\x7F\\x7F|\\0\\\`\\0\x01}\\\`\x03~~~\x01\\x7F\\\`
|
| 4 |
\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F}}}\\x7F\\0\\\`\x03\\x7F}\\x7F\\0\\\`\x03\\x7F\\x7F\\x7F\x01|\\\`\x02\\x7F~\x01\\x7F\x02g\x11\x01a\x01a\\0\x01\x01a\x01b\\0\x03\x01a\x01c\\0\x03\x01a\x01d\\0\x1a\x01a\x01e\\0*\x01a\x01f\\0\x04\x01a\x01g\\0\\v\x01a\x01h\\0\\v\x01a\x01i\\0\x05\x01a\x01j\\0\x06\x01a\x01k\\0\x04\x01a\x01l\\0+\x01a\x01m\\0\x05\x01a\x01n\\0\\v\x01a\x01o\\0,\x01a\x01p\\0\x03\x01a\x01q\\0\x01\x03\\xD3\x04\\xD1\x04\\0\x06\x03-\\x07\x03
|
| 5 |
\\x1B\x05\x03\\x07\\x07\\x07\x0e\\b\x04\x05
|
|
|
|
| 1 |
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./App-v3561c02df.js","./jsx-dev-runtime-Czb3f8pQ.js","./index-BlGQAcOD.js","./index-Br42UDbl.js","./index-v3561c02df.js","./index-B7FfWQ40.css"])))=>i.map(i=>d[i]);
|
| 2 |
+
import{_ as o}from"./index-v3561c02df.js";import{r as n,L as d,C as c,E as p}from"./App-v3561c02df.js";import"./jsx-dev-runtime-Czb3f8pQ.js";import"./index-BlGQAcOD.js";import"./index-Br42UDbl.js";var q=(F=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(F,{get:(x,A)=>(typeof require<"u"?require:x)[A]}):F)(function(F){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+F+'" is not supported')}),k=class i{constructor(x){this.bytes=x,this.pos=0}seekToByte(x){this.pos=8*x}readBit(){const x=Math.floor(this.pos/8),A=this.bytes[x]??0,B=7-(this.pos&7),v=(A&1<<B)>>B;return this.pos++,v}readBits(x){if(x===1)return this.readBit();let A=0;for(let B=0;B<x;B++)A<<=1,A|=this.readBit();return A}writeBits(x,A){const B=this.pos+x;for(let v=this.pos;v<B;v++){const j=Math.floor(v/8);let C=this.bytes[j];const r=7-(v&7);C&=~(1<<r),C|=(A&1<<B-v-1)>>B-v-1<<r,this.bytes[j]=C}this.pos=B}copyBits(x,A){let B=0;for(B;B<x-7;B+=8)this.writeBits(8,A.readBits(8));const v=x-B;v>0&&this.writeBits(v,A.readBits(v))}readAlignedByte(){if(this.pos%8!==0)throw new Error("Bitstream is not byte-aligned.");const x=this.pos/8,A=this.bytes[x]??0;return this.pos+=8,A}skipBits(x){this.pos+=x}getBitsLeft(){return this.bytes.length*8-this.pos}clone(){const x=new i(this.bytes);return x.pos=this.pos,x}},e=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],u=[-1,1,2,3,4,5,6,8],m=F=>{if(!F||F.byteLength<2)throw new TypeError("AAC description must be at least 2 bytes long.");const x=new k(F),A=f(x),{frequencyIndex:B,sampleRate:v}=t(x),j=x.readBits(4);let C=null;j>=1&&j<=7&&(C=u[j]);let r=A,D=!1,b=v;if(A===5||A===29)D=A===29,b=t(x).sampleRate,r=f(x),r===22&&x.skipBits(4);else for(;x.getBitsLeft()>15;){const l=x.pos;if(x.readBits(11)!==695){x.pos=l+1;continue}f(x)===5&&x.readBits(1)&&(b=t(x).sampleRate,x.getBitsLeft()>11&&x.readBits(11)===1352&&(D=!!x.readBits(1)));break}return C!==null&&C>1&&(D=!1),{objectType:A,coreObjectType:r,frequencyIndex:B,channelConfiguration:j,outputSampleRate:b,outputNumberOfChannels:D&&C===1?2:C}},f=F=>{const x=F.readBits(5);return x===31?32+F.readBits(6):x},t=F=>{const x=F.readBits(4);return x===15?{frequencyIndex:x,sampleRate:F.readBits(24)}:{frequencyIndex:x,sampleRate:x<e.length?e[x]:null}},G=F=>{const x=new Uint8Array(7),A=new k(x),{coreObjectType:B,frequencyIndex:v,channelConfiguration:j}=F,C=B-1;return A.writeBits(12,4095),A.writeBits(1,0),A.writeBits(2,0),A.writeBits(1,1),A.writeBits(2,C),A.writeBits(4,v),A.writeBits(1,0),A.writeBits(3,j),A.writeBits(1,0),A.writeBits(1,0),A.writeBits(1,0),A.writeBits(1,0),A.skipBits(13),A.writeBits(11,2047),A.writeBits(2,0),{header:x,bitstream:A}},_=(F,x)=>{F.pos=30,F.writeBits(13,x)};async function P(F){if(typeof Worker<"u"&&typeof Bun>"u"){const x=new Blob([F],{type:"text/javascript"}),A=URL.createObjectURL(x);return new Worker(A,{type:typeof Deno<"u"?"module":void 0})}else{let x;try{x=(await o(async()=>{const{Worker:B}=await import("./App-v3561c02df.js").then(v=>v.n);return{Worker:B}},__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)).Worker}catch{x=q("worker_threads").Worker}return new x(F,{eval:!0})}}function $(){return P(`var sr=Object.defineProperty;var dr=(k,a,r)=>a in k?sr(k,a,{enumerable:!0,configurable:!0,writable:!0,value:r}):k[a]=r;var CA=(k=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(k,{get:(a,r)=>(typeof require!="undefined"?require:a)[r]}):k)(function(k){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+k+'" is not supported')});var vA=(k,a,r)=>dr(k,typeof a!="symbol"?a+"":a,r);async function Er(k={}){var DA,_A,fA;var a,r=k,d=!!globalThis.window,s=!!globalThis.WorkerGlobalScope,E=((_A=(DA=globalThis.process)==null?void 0:DA.versions)==null?void 0:_A.node)&&((fA=globalThis.process)==null?void 0:fA.type)!="renderer",f=[],q="./this.program",u=(A,j)=>{throw j},F="",UA="",OA,VA;if(d||s){try{UA=new URL(".",F).href}catch(A){}s&&(VA=A=>{var j=new XMLHttpRequest;return j.open("GET",A,!1),j.responseType="arraybuffer",j.send(null),new Uint8Array(j.response)}),OA=async A=>{var j=await fetch(A,{credentials:"same-origin"});if(j.ok)return j.arrayBuffer();throw new Error(j.status+" : "+j.url)}}var K=console.log.bind(console),I=console.error.bind(console),R,M=!1,x;function SA(A){for(var j=0,t=A.length,n=new Uint8Array(t),e;j<t;++j)e=A.charCodeAt(j),n[j]=~e>>8&e;return n}var h,L,J,G,X,KA,RA,D,XA,WA,w,ZA,W=!1;function Z(){var A=N.buffer;J=new Int8Array(A),X=new Int16Array(A),r.HEAPU8=G=new Uint8Array(A),KA=new Uint16Array(A),RA=new Int32Array(A),D=new Uint32Array(A),XA=new Float32Array(A),WA=new Float64Array(A),w=new BigInt64Array(A),ZA=new BigUint64Array(A)}function YA(){if(r.preRun)for(typeof r.preRun=="function"&&(r.preRun=[r.preRun]);r.preRun.length;)aj(r.preRun.shift());z(jA)}function QA(){W=!0,b.s()}function zA(){if(r.postRun)for(typeof r.postRun=="function"&&(r.postRun=[r.postRun]);r.postRun.length;)kj(r.postRun.shift());z(AA)}function Y(A){var t;(t=r.onAbort)==null||t.call(r,A),A="Aborted("+A+")",I(A),M=!0,A+=". Build with -sASSERTIONS for more info.";var j=new WebAssembly.RuntimeError(A);throw L==null||L(j),j}var T;function Aj(){return SA(\`\\0asm\x01\\0\\0\\0\x01\\xAA\x04L\\\`\x04\\x7F\\x7F\\x7F\\x7F\\0\\\`\x03\\x7F\\x7F\\x7F\x01\\x7F\\\`\x02\\x7F\\x7F\\0\\\`\x02\\x7F\\x7F\x01\\x7F\\\`\\0\\0\\\`\x01\\x7F\x01\\x7F\\\`\x01\\x7F\\0\\\`\x03\\x7F\\x7F\\x7F\\0\\\`\\x07\\x7F\\x7F~\\x7F\\x7F\\x7F\\x7F\x01\\x7F\\\`\\f\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F}}\\x7F\\x7F\x01}\\\`\x01|\x01|\\\`\x04\\x7F\\x7F\\x7F\\x7F\x01\\x7F\\\`\x01}\x01}\\\`\x05\\x7F\\x7F\\x7F\\x7F\\x7F\x01\\x7F\\\`\x05\\x7F~~~~\\0\\\`\\b\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F}}\\0\\\`\x05\\x7F\\x7F\\x7F\\x7F\\x7F\\0\\\`\\0\x01\\x7F\\\`\x06\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\x01\\x7F\\\`\x04\\x7F~~\\x7F\\0\\\`\x02\\x7F~\\0\\\`\x02||\x01|\\\`\x06\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\\0\\\`\x03\\x7F\\x7F\\x7F\x01}\\\`\x04\\x7F\\x7F}\\x7F\\0\\\`\x04\\x7F\\x7F\\x7F}\\0\\\`\\0\x01|\\\`\x02\\x7F\\x7F\x01|\\\`\x03\\x7F|\\x7F\\0\\\`\x04\\x7F\\x7F{\\x7F\\0\\\`\x02|\\x7F\x01|\\\`\x02\\x7F|\\0\\\`\x01|\x01}\\\`\x03||\\x7F\x01|\\\`\x01\\x7F\x01}\\\`\x06\\x7F|\\x7F\\x7F\\x7F\\x7F\x01\\x7F\\\`\x04\\x7F~~~\\0\\\`\x03\\x7F~\\x7F\x01~\\\`\x01\\x7F\x01~\\\`\x04\\x7F\\x7F|\\x7F\\0\\\` \\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F}\\x7F\\0\\\`\x05\\x7F\\x7F\\x7F\\x7F}\\0\\\`\x03\\x7F~\\x7F\x01\\x7F\\\`\x02\\x7F|\x01\\x7F\\\`\x04\\x7F~\\x7F\\x7F\x01\\x7F\\\`\x01}\x01~\\\`\x02\\x7F|\x01|\\\`\x03\\x7F||\x01|\\\`\x01|\x01\\x7F\\\`\x01|\x01~\\\`\x04~~~~\x01\\x7F\\\`\x04~~~\\x7F\x01~\\\`\x02~\\x7F\x01\\x7F\\\`\x01}\x01\\x7F\\\`\x05\\x7F\\x7F~~~\\0\\\`\x06\\x7F\\x7F\\x7F|\\x7F~\x01\\x7F\\\`\x04\\x7F\\x7F\\x7F~\x01~\\\`\x02~~\x01|\\\`\\b\\x7F\\x7F~\\x7F\\x7F\\x7F\\x7F\\x7F\x01\\x7F\\\` \\x7F\\x7F~\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\x01\\x7F\\\`\x02|\\x7F\x01\\x7F\\\`\x04\\x7F\\x7F~\\x7F\x01\\x7F\\\`\x01|\\0\\\`
|
| 3 |
\\x7F\\x7F~\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\x01\\x7F\\\`\\r\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F}}\\x7F\\x7F}\x01}\\\`\x02\\x7F}\x01}\\\`\x03\\x7F\\x7F~\\0\\\`\\x07\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F\x01\\x7F\\\`\x02\\x7F\\x7F\x01~\\\`\x03\\x7F\\x7F|\\0\\\`\\0\x01}\\\`\x03~~~\x01\\x7F\\\`
|
| 4 |
\\x7F\\x7F\\x7F\\x7F\\x7F\\x7F}}}\\x7F\\0\\\`\x03\\x7F}\\x7F\\0\\\`\x03\\x7F\\x7F\\x7F\x01|\\\`\x02\\x7F~\x01\\x7F\x02g\x11\x01a\x01a\\0\x01\x01a\x01b\\0\x03\x01a\x01c\\0\x03\x01a\x01d\\0\x1a\x01a\x01e\\0*\x01a\x01f\\0\x04\x01a\x01g\\0\\v\x01a\x01h\\0\\v\x01a\x01i\\0\x05\x01a\x01j\\0\x06\x01a\x01k\\0\x04\x01a\x01l\\0+\x01a\x01m\\0\x05\x01a\x01n\\0\\v\x01a\x01o\\0,\x01a\x01p\\0\x03\x01a\x01q\\0\x01\x03\\xD3\x04\\xD1\x04\\0\x06\x03-\\x07\x03
|
| 5 |
\\x1B\x05\x03\\x07\\x07\\x07\x0e\\b\x04\x05
|
index.html
CHANGED
|
@@ -58,7 +58,7 @@
|
|
| 58 |
<script>
|
| 59 |
document.documentElement.classList.add('dark');
|
| 60 |
</script>
|
| 61 |
-
<script type="module" crossorigin src="./assets/index-
|
| 62 |
<link rel="stylesheet" crossorigin href="./assets/index-B7FfWQ40.css">
|
| 63 |
</head>
|
| 64 |
<body>
|
|
|
|
| 58 |
<script>
|
| 59 |
document.documentElement.classList.add('dark');
|
| 60 |
</script>
|
| 61 |
+
<script type="module" crossorigin src="./assets/index-v3561c02df.js"></script>
|
| 62 |
<link rel="stylesheet" crossorigin href="./assets/index-B7FfWQ40.css">
|
| 63 |
</head>
|
| 64 |
<body>
|