@hadoku/watchparty-ui 0.45.126 → 0.45.128
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/dist/chunks/{AdminPanel-iOXMIJ5W.js → AdminPanel-CXJxwzns.js} +4 -4
- package/dist/chunks/{AdminPanel-iOXMIJ5W.js.map → AdminPanel-CXJxwzns.js.map} +1 -1
- package/dist/chunks/{MediaDrawer-BvK1KqMY.js → MediaDrawer-Df-Cgg6o.js} +4 -4
- package/dist/chunks/{MediaDrawer-BvK1KqMY.js.map → MediaDrawer-Df-Cgg6o.js.map} +1 -1
- package/dist/chunks/{PlaylistPanel-BBbY3rI1.js → PlaylistPanel-C7BIPHXm.js} +3 -3
- package/dist/chunks/{PlaylistPanel-BBbY3rI1.js.map → PlaylistPanel-C7BIPHXm.js.map} +1 -1
- package/dist/chunks/{Room-DNqp1uge.js → Room-BW0i25qJ.js} +1618 -1600
- package/dist/chunks/Room-BW0i25qJ.js.map +1 -0
- package/dist/chunks/{index-BAFZNmHy.js → index-DeZ6HVmt.js} +138 -134
- package/dist/chunks/{index-BAFZNmHy.js.map → index-DeZ6HVmt.js.map} +1 -1
- package/dist/chunks/{submissionsApi-C6oPj4pj.js → submissionsApi-B9a3kfk2.js} +6 -6
- package/dist/chunks/{submissionsApi-C6oPj4pj.js.map → submissionsApi-B9a3kfk2.js.map} +1 -1
- package/dist/index.js +1 -1
- package/dist/room-chrome.d.ts +13 -1
- package/dist/room-chrome.js +1914 -1819
- package/dist/room-chrome.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunks/Room-DNqp1uge.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as S, Fragment as ti, jsxs as
|
|
1
|
+
import { jsx as S, Fragment as ti, jsxs as X } from "react/jsx-runtime";
|
|
2
2
|
import * as p from "react";
|
|
3
3
|
import we, { createContext as Wo, useContext as Ko, useSyncExternalStore as Mt, useEffect as he, lazy as Yo, createElement as Jo, useRef as _e, useState as ni, useMemo as Xo } from "react";
|
|
4
4
|
import { createRoot as Qo } from "react-dom/client";
|
|
@@ -31,7 +31,7 @@ function B(e, t) {
|
|
|
31
31
|
if (e === !1 || e === null || typeof e > "u")
|
|
32
32
|
throw new Error(t);
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function ae(e, t) {
|
|
35
35
|
if (!e) {
|
|
36
36
|
typeof console < "u" && console.warn(t);
|
|
37
37
|
try {
|
|
@@ -317,7 +317,7 @@ function Ct(e, t) {
|
|
|
317
317
|
};
|
|
318
318
|
}
|
|
319
319
|
function _a(e, t = !1, n = !0) {
|
|
320
|
-
|
|
320
|
+
ae(
|
|
321
321
|
e === "*" || !e.endsWith("*") || e.endsWith("/*"),
|
|
322
322
|
`Route path "${e}" will be treated as if it were "${e.replace(/\*$/, "/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/, "/*")}".`
|
|
323
323
|
);
|
|
@@ -331,7 +331,7 @@ function Ea(e) {
|
|
|
331
331
|
try {
|
|
332
332
|
return e.split("/").map((t) => decodeURIComponent(t).replace(/\//g, "%2F")).join("/");
|
|
333
333
|
} catch (t) {
|
|
334
|
-
return
|
|
334
|
+
return ae(
|
|
335
335
|
!1,
|
|
336
336
|
`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`
|
|
337
337
|
), e;
|
|
@@ -357,7 +357,7 @@ function Ta(e, t = "/") {
|
|
|
357
357
|
else {
|
|
358
358
|
if (n.includes("//")) {
|
|
359
359
|
let a = n;
|
|
360
|
-
n = n.replace(/\/\/+/g, "/"),
|
|
360
|
+
n = n.replace(/\/\/+/g, "/"), ae(
|
|
361
361
|
!1,
|
|
362
362
|
`Pathnames cannot have embedded double slashes - normalizing ${a} -> ${n}`
|
|
363
363
|
);
|
|
@@ -448,7 +448,7 @@ function ui(e, t) {
|
|
|
448
448
|
let o = new URL(window.location.href), a = n.startsWith("//") ? new URL(o.protocol + n) : new URL(n), s = ge(a.pathname, t);
|
|
449
449
|
a.origin === o.origin && s != null ? n = s + a.search + a.hash : i = !0;
|
|
450
450
|
} catch {
|
|
451
|
-
|
|
451
|
+
ae(
|
|
452
452
|
!1,
|
|
453
453
|
`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`
|
|
454
454
|
);
|
|
@@ -488,10 +488,10 @@ var La = p.createContext(
|
|
|
488
488
|
La.displayName = "Fetchers";
|
|
489
489
|
var Na = p.createContext(null);
|
|
490
490
|
Na.displayName = "Await";
|
|
491
|
-
var
|
|
491
|
+
var ee = p.createContext(
|
|
492
492
|
null
|
|
493
493
|
);
|
|
494
|
-
|
|
494
|
+
ee.displayName = "Navigation";
|
|
495
495
|
var tt = p.createContext(
|
|
496
496
|
null
|
|
497
497
|
);
|
|
@@ -536,7 +536,7 @@ function Ua(e, { relative: t } = {}) {
|
|
|
536
536
|
// router loaded. We can help them understand how to avoid that.
|
|
537
537
|
"useHref() may be used only in the context of a <Router> component."
|
|
538
538
|
);
|
|
539
|
-
let { basename: n, navigator: r } = p.useContext(
|
|
539
|
+
let { basename: n, navigator: r } = p.useContext(ee), { hash: i, pathname: o, search: a } = rt(e, { relative: t }), s = o;
|
|
540
540
|
return n !== "/" && (s = o === "/" ? n : fe([n, o])), r.createHref({ pathname: s, search: a, hash: i });
|
|
541
541
|
}
|
|
542
542
|
function nt() {
|
|
@@ -552,7 +552,7 @@ function ve() {
|
|
|
552
552
|
}
|
|
553
553
|
var pi = "You should call navigate() in a React.useEffect(), not when your component is first rendered.";
|
|
554
554
|
function mi(e) {
|
|
555
|
-
p.useContext(
|
|
555
|
+
p.useContext(ee).static || p.useLayoutEffect(e);
|
|
556
556
|
}
|
|
557
557
|
function ja() {
|
|
558
558
|
let { isDataRoute: e } = p.useContext(le);
|
|
@@ -565,12 +565,12 @@ function Ha() {
|
|
|
565
565
|
// router loaded. We can help them understand how to avoid that.
|
|
566
566
|
"useNavigate() may be used only in the context of a <Router> component."
|
|
567
567
|
);
|
|
568
|
-
let e = p.useContext(Me), { basename: t, navigator: n } = p.useContext(
|
|
568
|
+
let e = p.useContext(Me), { basename: t, navigator: n } = p.useContext(ee), { matches: r } = p.useContext(le), { pathname: i } = ve(), o = JSON.stringify(si(r)), a = p.useRef(!1);
|
|
569
569
|
return mi(() => {
|
|
570
570
|
a.current = !0;
|
|
571
571
|
}), p.useCallback(
|
|
572
572
|
(c, u = {}) => {
|
|
573
|
-
if (
|
|
573
|
+
if (ae(a.current, pi), !a.current) return;
|
|
574
574
|
if (typeof c == "number") {
|
|
575
575
|
n.go(c);
|
|
576
576
|
return;
|
|
@@ -623,7 +623,7 @@ function gi(e, t, n, r, i) {
|
|
|
623
623
|
// router loaded. We can help them understand how to avoid that.
|
|
624
624
|
"useRoutes() may be used only in the context of a <Router> component."
|
|
625
625
|
);
|
|
626
|
-
let { navigator: o } = p.useContext(
|
|
626
|
+
let { navigator: o } = p.useContext(ee), { matches: a } = p.useContext(le), s = a[a.length - 1], c = s ? s.params : {}, u = s ? s.pathname : "/", d = s ? s.pathnameBase : "/", h = s && s.route;
|
|
627
627
|
{
|
|
628
628
|
let y = h && h.path || "";
|
|
629
629
|
vi(
|
|
@@ -649,10 +649,10 @@ Please change the parent <Route path="${y}"> to <Route path="${y === "/" ? "*" :
|
|
|
649
649
|
w = "/" + E.replace(/^\//, "").split("/").slice(y.length).join("/");
|
|
650
650
|
}
|
|
651
651
|
let f = ri(e, { pathname: w });
|
|
652
|
-
|
|
652
|
+
ae(
|
|
653
653
|
h || f != null,
|
|
654
654
|
`No routes matched location "${b.pathname}${b.search}${b.hash}" `
|
|
655
|
-
),
|
|
655
|
+
), ae(
|
|
656
656
|
f == null || f[f.length - 1].route.element !== void 0 || f[f.length - 1].route.Component !== void 0 || f[f.length - 1].route.lazy !== void 0,
|
|
657
657
|
`Matched leaf route at location "${b.pathname}${b.search}${b.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`
|
|
658
658
|
);
|
|
@@ -763,7 +763,7 @@ function Wa({
|
|
|
763
763
|
children: e,
|
|
764
764
|
error: t
|
|
765
765
|
}) {
|
|
766
|
-
let { basename: n } = p.useContext(
|
|
766
|
+
let { basename: n } = p.useContext(ee);
|
|
767
767
|
if (typeof t == "object" && t && "digest" in t && typeof t.digest == "string") {
|
|
768
768
|
let r = Ba(t.digest);
|
|
769
769
|
if (r) {
|
|
@@ -931,14 +931,14 @@ function ts() {
|
|
|
931
931
|
n.current = !0;
|
|
932
932
|
}), p.useCallback(
|
|
933
933
|
async (i, o = {}) => {
|
|
934
|
-
|
|
934
|
+
ae(n.current, pi), n.current && (typeof i == "number" ? await e.navigate(i) : await e.navigate(i, { fromRouteId: t, ...o }));
|
|
935
935
|
},
|
|
936
936
|
[e, t]
|
|
937
937
|
);
|
|
938
938
|
}
|
|
939
939
|
var dr = {};
|
|
940
940
|
function vi(e, t, n) {
|
|
941
|
-
!t && !dr[e] && (dr[e] = !0,
|
|
941
|
+
!t && !dr[e] && (dr[e] = !0, ae(!1, n));
|
|
942
942
|
}
|
|
943
943
|
p.memo(ns);
|
|
944
944
|
function ns({
|
|
@@ -998,10 +998,10 @@ function rs({
|
|
|
998
998
|
navigationType: r
|
|
999
999
|
};
|
|
1000
1000
|
}, [s, u, d, h, v, b, r]);
|
|
1001
|
-
return
|
|
1001
|
+
return ae(
|
|
1002
1002
|
E != null,
|
|
1003
1003
|
`<Router basename="${s}"> is not able to match the URL "${u}${d}${h}" because it does not start with the basename, so the <Router> won't render anything.`
|
|
1004
|
-
), E == null ? null : /* @__PURE__ */ p.createElement(
|
|
1004
|
+
), E == null ? null : /* @__PURE__ */ p.createElement(ee.Provider, { value: c }, /* @__PURE__ */ p.createElement(tt.Provider, { children: t, value: E }));
|
|
1005
1005
|
}
|
|
1006
1006
|
function is({
|
|
1007
1007
|
children: e,
|
|
@@ -1095,7 +1095,7 @@ var ds = /* @__PURE__ */ new Set([
|
|
|
1095
1095
|
"text/plain"
|
|
1096
1096
|
]);
|
|
1097
1097
|
function Jt(e) {
|
|
1098
|
-
return e != null && !ds.has(e) ? (
|
|
1098
|
+
return e != null && !ds.has(e) ? (ae(
|
|
1099
1099
|
!1,
|
|
1100
1100
|
`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${yt}"`
|
|
1101
1101
|
), null) : e;
|
|
@@ -1447,7 +1447,7 @@ var _i = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i, At = p.forwardRef(
|
|
|
1447
1447
|
unstable_defaultShouldRevalidate: v,
|
|
1448
1448
|
...b
|
|
1449
1449
|
}, E) {
|
|
1450
|
-
let { basename: w, unstable_useTransitions: f } = p.useContext(
|
|
1450
|
+
let { basename: w, unstable_useTransitions: f } = p.useContext(ee), _ = typeof u == "string" && _i.test(u), y = ui(u, w);
|
|
1451
1451
|
u = y.to;
|
|
1452
1452
|
let k = Ua(u, { relative: i }), [C, g, L] = Es(
|
|
1453
1453
|
r,
|
|
@@ -1496,7 +1496,7 @@ var As = p.forwardRef(
|
|
|
1496
1496
|
children: c,
|
|
1497
1497
|
...u
|
|
1498
1498
|
}, d) {
|
|
1499
|
-
let h = rt(a, { relative: u.relative }), v = ve(), b = p.useContext(Lt), { navigator: E, basename: w } = p.useContext(
|
|
1499
|
+
let h = rt(a, { relative: u.relative }), v = ve(), b = p.useContext(Lt), { navigator: E, basename: w } = p.useContext(ee), f = b != null && // Conditional usage is OK here because the usage of a data router is static
|
|
1500
1500
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
1501
1501
|
$s(h) && s === !0, _ = E.encodeLocation ? E.encodeLocation(h).pathname : h.pathname, y = v.pathname, k = b && b.navigation && b.navigation.location ? b.navigation.location.pathname : null;
|
|
1502
1502
|
n || (y = y.toLowerCase(), k = k ? k.toLowerCase() : null, _ = _.toLowerCase()), k && w && (k = ge(k, w) || k);
|
|
@@ -1546,7 +1546,7 @@ var Is = p.forwardRef(
|
|
|
1546
1546
|
unstable_defaultShouldRevalidate: v,
|
|
1547
1547
|
...b
|
|
1548
1548
|
}, E) => {
|
|
1549
|
-
let { unstable_useTransitions: w } = p.useContext(
|
|
1549
|
+
let { unstable_useTransitions: w } = p.useContext(ee), f = Ns(), _ = Ds(s, { relative: u }), y = a.toLowerCase() === "get" ? "get" : "post", k = typeof s == "string" && _i.test(s), C = (g) => {
|
|
1550
1550
|
if (c && c(g), g.defaultPrevented) return;
|
|
1551
1551
|
g.preventDefault();
|
|
1552
1552
|
let L = g.nativeEvent.submitter, R = L?.getAttribute("formmethod") || a, N = () => f(L || g.currentTarget, {
|
|
@@ -1630,7 +1630,7 @@ function Ns() {
|
|
|
1630
1630
|
let { router: e } = Ei(
|
|
1631
1631
|
"useSubmit"
|
|
1632
1632
|
/* UseSubmit */
|
|
1633
|
-
), { basename: t } = p.useContext(
|
|
1633
|
+
), { basename: t } = p.useContext(ee), n = Za(), r = e.fetch, i = e.navigate;
|
|
1634
1634
|
return p.useCallback(
|
|
1635
1635
|
async (o, a = {}) => {
|
|
1636
1636
|
let { action: s, method: c, encType: u, formData: d, body: h } = hs(
|
|
@@ -1667,7 +1667,7 @@ function Ns() {
|
|
|
1667
1667
|
);
|
|
1668
1668
|
}
|
|
1669
1669
|
function Ds(e, { relative: t } = {}) {
|
|
1670
|
-
let { basename: n } = p.useContext(
|
|
1670
|
+
let { basename: n } = p.useContext(ee), r = p.useContext(le);
|
|
1671
1671
|
B(r, "useFormAction must be used inside a RouteContext");
|
|
1672
1672
|
let [i] = r.matches.slice(-1), o = { ...rt(e || ".", { relative: t }) }, a = ve();
|
|
1673
1673
|
if (e == null) {
|
|
@@ -2771,7 +2771,7 @@ function Ft() {
|
|
|
2771
2771
|
return null;
|
|
2772
2772
|
}
|
|
2773
2773
|
}
|
|
2774
|
-
function
|
|
2774
|
+
function Z(e) {
|
|
2775
2775
|
try {
|
|
2776
2776
|
return Ft()?.getItem(e) ?? null;
|
|
2777
2777
|
} catch {
|
|
@@ -2807,7 +2807,7 @@ function Ye(e) {
|
|
|
2807
2807
|
}
|
|
2808
2808
|
}
|
|
2809
2809
|
function nl(e) {
|
|
2810
|
-
const t =
|
|
2810
|
+
const t = Z(e);
|
|
2811
2811
|
return t === null ? null : t === "true" ? !0 : t === "false" ? !1 : null;
|
|
2812
2812
|
}
|
|
2813
2813
|
const Ki = /* @__PURE__ */ new Map();
|
|
@@ -2830,16 +2830,16 @@ function Xi(e) {
|
|
|
2830
2830
|
Je = e;
|
|
2831
2831
|
}
|
|
2832
2832
|
function Qi() {
|
|
2833
|
-
return
|
|
2833
|
+
return Z(be.REPORT_LOGS_FLAG) === "true";
|
|
2834
2834
|
}
|
|
2835
2835
|
function Zi() {
|
|
2836
2836
|
if (typeof window > "u") return !1;
|
|
2837
2837
|
if (window.__WP_DEBUG__ || new URLSearchParams(window.location.search).get("debug") === "true") return !0;
|
|
2838
|
-
const t =
|
|
2838
|
+
const t = Z(be.DEBUG_FLAG);
|
|
2839
2839
|
return t !== null && t !== "false";
|
|
2840
2840
|
}
|
|
2841
2841
|
function sl() {
|
|
2842
|
-
const e =
|
|
2842
|
+
const e = Z(be.DEBUG_FLAG);
|
|
2843
2843
|
if (!e || e === "true") return null;
|
|
2844
2844
|
const t = e.split(",").map((n) => n.trim().toLowerCase()).filter(Boolean);
|
|
2845
2845
|
return t.length > 0 ? new Set(t) : null;
|
|
@@ -2989,7 +2989,7 @@ async function yl() {
|
|
|
2989
2989
|
body: JSON.stringify({ logs: o })
|
|
2990
2990
|
});
|
|
2991
2991
|
} catch (t) {
|
|
2992
|
-
console.warn("[wp] log flush failed (client logs may be lost):",
|
|
2992
|
+
console.warn("[wp] log flush failed (client logs may be lost):", ie(t).error);
|
|
2993
2993
|
}
|
|
2994
2994
|
}
|
|
2995
2995
|
function vr(e) {
|
|
@@ -3000,7 +3000,7 @@ function vr(e) {
|
|
|
3000
3000
|
}, t);
|
|
3001
3001
|
}
|
|
3002
3002
|
}
|
|
3003
|
-
function
|
|
3003
|
+
function ie(e) {
|
|
3004
3004
|
return e instanceof Error ? { error: e.message, name: e.name } : { error: String(e), name: typeof e };
|
|
3005
3005
|
}
|
|
3006
3006
|
Ut("__wpDebug", {
|
|
@@ -3024,7 +3024,7 @@ function vl() {
|
|
|
3024
3024
|
const n = await t.json();
|
|
3025
3025
|
Xe = n, Ut("__DISPLAY_NAMES__", n), m("characters", "Loaded display names", n);
|
|
3026
3026
|
} catch (e) {
|
|
3027
|
-
m("characters", "display names fetch failed (degrading to sprite IDs)",
|
|
3027
|
+
m("characters", "display names fetch failed (degrading to sprite IDs)", ie(e));
|
|
3028
3028
|
}
|
|
3029
3029
|
})(), st);
|
|
3030
3030
|
}
|
|
@@ -3119,7 +3119,7 @@ async function Cl() {
|
|
|
3119
3119
|
if (H.accountId = e.scope === "user" ? e.userId : null, typeof e.name == "string")
|
|
3120
3120
|
return H.name = e.name, e.name;
|
|
3121
3121
|
} catch (e) {
|
|
3122
|
-
M("auth", "whoami failed",
|
|
3122
|
+
M("auth", "whoami failed", ie(e));
|
|
3123
3123
|
}
|
|
3124
3124
|
return null;
|
|
3125
3125
|
}
|
|
@@ -3142,6 +3142,8 @@ const Al = l.object({
|
|
|
3142
3142
|
// app's chatCollapsed on purpose.
|
|
3143
3143
|
chromeChatCollapsed: l.boolean().optional(),
|
|
3144
3144
|
chromeChatWidth: l.number().optional(),
|
|
3145
|
+
// The chat chime (lib/chatChime.ts); absent = on.
|
|
3146
|
+
chatSound: l.boolean().optional(),
|
|
3145
3147
|
// Recently used emoji, most recent first (lib/recentEmoji.ts). A plain
|
|
3146
3148
|
// array: a bound here would fail the whole row's parse, so the cap is
|
|
3147
3149
|
// applied on read.
|
|
@@ -3166,7 +3168,7 @@ function Pl() {
|
|
|
3166
3168
|
function Er(e) {
|
|
3167
3169
|
const t = It(e);
|
|
3168
3170
|
if (!t) return {};
|
|
3169
|
-
const n =
|
|
3171
|
+
const n = Z(t);
|
|
3170
3172
|
if (!n) return {};
|
|
3171
3173
|
try {
|
|
3172
3174
|
return JSON.parse(n)?.blob ?? {};
|
|
@@ -3179,7 +3181,7 @@ function Ol() {
|
|
|
3179
3181
|
for (const t of tl()) {
|
|
3180
3182
|
const n = t.startsWith("prefs-cache:") && t.endsWith(":watchparty"), r = t === Pt || t.startsWith(`${Pt}:`) && !t.endsWith(":_serverSynced_v1");
|
|
3181
3183
|
if (!n && !r) continue;
|
|
3182
|
-
const i =
|
|
3184
|
+
const i = Z(t);
|
|
3183
3185
|
if (!i) continue;
|
|
3184
3186
|
let o;
|
|
3185
3187
|
try {
|
|
@@ -3226,7 +3228,7 @@ function Ml() {
|
|
|
3226
3228
|
const e = Ht();
|
|
3227
3229
|
return !e || e === "public";
|
|
3228
3230
|
}
|
|
3229
|
-
function
|
|
3231
|
+
function te(e, t) {
|
|
3230
3232
|
Ml() && (so = !0), Il.has(e) ? He.save({ [e]: t }, { scope: "device" }).catch((n) => M("preferences", "themePrefs.save failed", { key: e, err: n?.message })) : Ge.save({ [e]: t }).catch((n) => M("preferences", "watchpartyPrefs.save failed", { key: e, err: n?.message })), m("preferences", "Saved (via SDK)", { key: e, value: t });
|
|
3231
3233
|
}
|
|
3232
3234
|
let ct = null, Tr = !1;
|
|
@@ -3249,7 +3251,7 @@ function Ll() {
|
|
|
3249
3251
|
} catch (a) {
|
|
3250
3252
|
M("preferences", "inline rehydrate after SDK read failed", { err: a?.message });
|
|
3251
3253
|
}
|
|
3252
|
-
const n = It("portfolio"), r = It("watchparty"), i = n ?
|
|
3254
|
+
const n = It("portfolio"), r = It("watchparty"), i = n ? Z(n) : null, o = r ? Z(r) : null;
|
|
3253
3255
|
return m("preferences", "sdk.read", {
|
|
3254
3256
|
themeKeys: Object.keys(e ?? {}),
|
|
3255
3257
|
appKeys: Object.keys(t ?? {}),
|
|
@@ -3274,7 +3276,7 @@ function fn() {
|
|
|
3274
3276
|
return !e || e === "public" ? Pt : `${Pt}:${e}`;
|
|
3275
3277
|
}
|
|
3276
3278
|
function co() {
|
|
3277
|
-
const e =
|
|
3279
|
+
const e = Z(fn());
|
|
3278
3280
|
if (!e) return null;
|
|
3279
3281
|
try {
|
|
3280
3282
|
const t = JSON.parse(e);
|
|
@@ -3355,7 +3357,7 @@ function Dl(e, t) {
|
|
|
3355
3357
|
return [t, ...e.filter((n) => n !== t)].slice(0, lo);
|
|
3356
3358
|
}
|
|
3357
3359
|
function $l() {
|
|
3358
|
-
const e =
|
|
3360
|
+
const e = Z(be.RECENT_EMOJI);
|
|
3359
3361
|
if (!e) return [];
|
|
3360
3362
|
try {
|
|
3361
3363
|
return pn(JSON.parse(e));
|
|
@@ -3376,7 +3378,7 @@ function ho(e, t) {
|
|
|
3376
3378
|
const n = new Set(t.map((o) => o.id)), r = t.reduce((o, a) => Math.max(o, a.ts), -1 / 0), i = e.filter((o) => !n.has(o.id) && o.ts > r);
|
|
3377
3379
|
return i.length ? [...t, ...i] : t;
|
|
3378
3380
|
}
|
|
3379
|
-
const fo = 6e3,
|
|
3381
|
+
const fo = 6e3, Y = Bn(), T = js((e, t) => ({
|
|
3380
3382
|
ready: !1,
|
|
3381
3383
|
name: "",
|
|
3382
3384
|
sprite: null,
|
|
@@ -3387,11 +3389,12 @@ const fo = 6e3, ee = Bn(), T = js((e, t) => ({
|
|
|
3387
3389
|
replyingTo: null,
|
|
3388
3390
|
typing: {},
|
|
3389
3391
|
chatJump: null,
|
|
3390
|
-
chatCollapsed:
|
|
3391
|
-
chromeChatCollapsed:
|
|
3392
|
-
chromeChatWidth: Zt(
|
|
3392
|
+
chatCollapsed: Y.chatCollapsed ?? !1,
|
|
3393
|
+
chromeChatCollapsed: Y.chromeChatCollapsed ?? !1,
|
|
3394
|
+
chromeChatWidth: Zt(Y.chromeChatWidth ?? uo),
|
|
3395
|
+
chatSoundEnabled: Y.chatSound ?? !0,
|
|
3393
3396
|
// The account's list, else what this browser kept before it moved to prefs.
|
|
3394
|
-
recentEmoji:
|
|
3397
|
+
recentEmoji: Y.recentEmoji !== void 0 ? pn(Y.recentEmoji) : $l(),
|
|
3395
3398
|
// Hardcoded on for everyone — the per-user toggle was removed from the
|
|
3396
3399
|
// control bar; FloatingChat + toggleFloatingChat code is kept for future
|
|
3397
3400
|
// re-enablement but the value is no longer user-controllable.
|
|
@@ -3403,11 +3406,11 @@ const fo = 6e3, ee = Bn(), T = js((e, t) => ({
|
|
|
3403
3406
|
bufferState: { isBuffering: !1, bufferedEndMs: 0 },
|
|
3404
3407
|
toasts: [],
|
|
3405
3408
|
mediaPrefs: {
|
|
3406
|
-
volume:
|
|
3407
|
-
muted:
|
|
3408
|
-
preferredAudioLang:
|
|
3409
|
-
subtitlesEnabled:
|
|
3410
|
-
subtitleStyle: ["classic", "cinema", "minimal", "contrast"].includes(
|
|
3409
|
+
volume: Y.volume ?? 1,
|
|
3410
|
+
muted: Y.muted ?? !1,
|
|
3411
|
+
preferredAudioLang: Y.preferredAudioLang || "jpn",
|
|
3412
|
+
subtitlesEnabled: Y.subtitlesEnabled ?? !0,
|
|
3413
|
+
subtitleStyle: ["classic", "cinema", "minimal", "contrast"].includes(Y.subtitleStyle) ? Y.subtitleStyle : "classic"
|
|
3411
3414
|
},
|
|
3412
3415
|
healthSnapshot: null,
|
|
3413
3416
|
sidebarTab: "chat",
|
|
@@ -3509,24 +3512,25 @@ const fo = 6e3, ee = Bn(), T = js((e, t) => ({
|
|
|
3509
3512
|
jumpToMessage: (n) => e(() => ({ chatJump: { id: n, at: Date.now() } })),
|
|
3510
3513
|
toggleChatCollapsed: () => e((n) => {
|
|
3511
3514
|
const r = !n.chatCollapsed;
|
|
3512
|
-
return Pe() ||
|
|
3515
|
+
return Pe() || te("chatCollapsed", r), { chatCollapsed: r };
|
|
3513
3516
|
}),
|
|
3514
3517
|
applyTvDefaults: () => e(() => ({ chatCollapsed: !0 })),
|
|
3515
3518
|
toggleChromeChatCollapsed: () => e((n) => {
|
|
3516
3519
|
const r = !n.chromeChatCollapsed;
|
|
3517
|
-
return
|
|
3520
|
+
return te("chromeChatCollapsed", r), { chromeChatCollapsed: r };
|
|
3518
3521
|
}),
|
|
3519
3522
|
setChromeChatWidth: (n) => e(() => {
|
|
3520
3523
|
const r = Zt(n);
|
|
3521
|
-
return
|
|
3524
|
+
return te("chromeChatWidth", r), { chromeChatWidth: r };
|
|
3522
3525
|
}),
|
|
3526
|
+
setChatSoundEnabled: (n) => e(() => (te("chatSound", n), { chatSoundEnabled: n })),
|
|
3523
3527
|
noteRecentEmoji: (n) => e((r) => {
|
|
3524
3528
|
const i = Dl(r.recentEmoji, n);
|
|
3525
|
-
return
|
|
3529
|
+
return te("recentEmoji", i), Bl(), { recentEmoji: i };
|
|
3526
3530
|
}),
|
|
3527
3531
|
toggleFloatingChat: () => e((n) => {
|
|
3528
3532
|
const r = !n.floatingChatEnabled;
|
|
3529
|
-
return
|
|
3533
|
+
return te("floatingChatEnabled", r), { floatingChatEnabled: r };
|
|
3530
3534
|
}),
|
|
3531
3535
|
allocateClientSeq: () => {
|
|
3532
3536
|
const n = t().me.nextClientSeq;
|
|
@@ -3561,11 +3565,11 @@ const fo = 6e3, ee = Bn(), T = js((e, t) => ({
|
|
|
3561
3565
|
setBufferState: (n) => e((r) => ({ bufferState: { ...r.bufferState, ...n } })),
|
|
3562
3566
|
setMutedForAutoplay: (n) => e({ mutedForAutoplay: n }),
|
|
3563
3567
|
// Media preference actions
|
|
3564
|
-
setVolume: (n) => e((r) => (
|
|
3565
|
-
setMuted: (n) => e((r) => (
|
|
3566
|
-
setPreferredAudioLang: (n) => e((r) => (
|
|
3567
|
-
setSubtitlesEnabled: (n) => e((r) => (
|
|
3568
|
-
setSubtitleStyle: (n) => e((r) => (
|
|
3568
|
+
setVolume: (n) => e((r) => (te("volume", n), { mediaPrefs: { ...r.mediaPrefs, volume: n } })),
|
|
3569
|
+
setMuted: (n) => e((r) => (te("muted", n), { mediaPrefs: { ...r.mediaPrefs, muted: n } })),
|
|
3570
|
+
setPreferredAudioLang: (n) => e((r) => (te("preferredAudioLang", n), { mediaPrefs: { ...r.mediaPrefs, preferredAudioLang: n } })),
|
|
3571
|
+
setSubtitlesEnabled: (n) => e((r) => (te("subtitlesEnabled", n), { mediaPrefs: { ...r.mediaPrefs, subtitlesEnabled: n } })),
|
|
3572
|
+
setSubtitleStyle: (n) => e((r) => (te("subtitleStyle", n), { mediaPrefs: { ...r.mediaPrefs, subtitleStyle: n } })),
|
|
3569
3573
|
setHealthSnapshot: (n) => e({ healthSnapshot: n }),
|
|
3570
3574
|
setBufferStatus: (n) => e({ bufferStatus: n }),
|
|
3571
3575
|
applyPlaylistState: (n) => e({
|
|
@@ -3619,7 +3623,7 @@ const fo = 6e3, ee = Bn(), T = js((e, t) => ({
|
|
|
3619
3623
|
setRoomKeyType: (n) => e({ roomKeyType: n }),
|
|
3620
3624
|
rehydrateFromPrefs: () => e((n) => {
|
|
3621
3625
|
const r = Bn(), i = {};
|
|
3622
|
-
if (r.chatCollapsed !== void 0 && !Pe() && (i.chatCollapsed = r.chatCollapsed), r.chromeChatCollapsed !== void 0 && (i.chromeChatCollapsed = r.chromeChatCollapsed), r.chromeChatWidth !== void 0 && (i.chromeChatWidth = Zt(r.chromeChatWidth)), r.recentEmoji !== void 0 && (i.recentEmoji = pn(r.recentEmoji)), ["volume", "muted", "preferredAudioLang", "subtitlesEnabled", "subtitleStyle"].some((s) => r[s] !== void 0)) {
|
|
3626
|
+
if (r.chatCollapsed !== void 0 && !Pe() && (i.chatCollapsed = r.chatCollapsed), r.chromeChatCollapsed !== void 0 && (i.chromeChatCollapsed = r.chromeChatCollapsed), r.chromeChatWidth !== void 0 && (i.chromeChatWidth = Zt(r.chromeChatWidth)), r.chatSound !== void 0 && (i.chatSoundEnabled = r.chatSound), r.recentEmoji !== void 0 && (i.recentEmoji = pn(r.recentEmoji)), ["volume", "muted", "preferredAudioLang", "subtitlesEnabled", "subtitleStyle"].some((s) => r[s] !== void 0)) {
|
|
3623
3627
|
const s = { ...n.mediaPrefs };
|
|
3624
3628
|
r.volume !== void 0 && (s.volume = r.volume), r.muted !== void 0 && (s.muted = r.muted), r.preferredAudioLang !== void 0 && (s.preferredAudioLang = r.preferredAudioLang), r.subtitlesEnabled !== void 0 && (s.subtitlesEnabled = r.subtitlesEnabled), r.subtitleStyle !== void 0 && ["classic", "cinema", "minimal", "contrast"].includes(r.subtitleStyle) && (s.subtitleStyle = r.subtitleStyle), i.mediaPrefs = s;
|
|
3625
3629
|
}
|
|
@@ -4166,13 +4170,13 @@ j.prototype.listeners = function(e) {
|
|
|
4166
4170
|
j.prototype.hasListeners = function(e) {
|
|
4167
4171
|
return !!this.listeners(e).length;
|
|
4168
4172
|
};
|
|
4169
|
-
const qt = typeof Promise == "function" && typeof Promise.resolve == "function" ? (t) => Promise.resolve().then(t) : (t, n) => n(t, 0),
|
|
4173
|
+
const qt = typeof Promise == "function" && typeof Promise.resolve == "function" ? (t) => Promise.resolve().then(t) : (t, n) => n(t, 0), Q = typeof self < "u" ? self : typeof window < "u" ? window : Function("return this")(), cu = "arraybuffer";
|
|
4170
4174
|
function Eo(e, ...t) {
|
|
4171
4175
|
return t.reduce((n, r) => (e.hasOwnProperty(r) && (n[r] = e[r]), n), {});
|
|
4172
4176
|
}
|
|
4173
|
-
const lu =
|
|
4177
|
+
const lu = Q.setTimeout, uu = Q.clearTimeout;
|
|
4174
4178
|
function zt(e, t) {
|
|
4175
|
-
t.useNativeTimers ? (e.setTimeoutFn = lu.bind(
|
|
4179
|
+
t.useNativeTimers ? (e.setTimeoutFn = lu.bind(Q), e.clearTimeoutFn = uu.bind(Q)) : (e.setTimeoutFn = Q.setTimeout.bind(Q), e.clearTimeoutFn = Q.clearTimeout.bind(Q));
|
|
4176
4180
|
}
|
|
4177
4181
|
const du = 1.33;
|
|
4178
4182
|
function hu(e) {
|
|
@@ -4549,7 +4553,7 @@ if (typeof document < "u") {
|
|
|
4549
4553
|
if (typeof attachEvent == "function")
|
|
4550
4554
|
attachEvent("onunload", Mr);
|
|
4551
4555
|
else if (typeof addEventListener == "function") {
|
|
4552
|
-
const e = "onpagehide" in
|
|
4556
|
+
const e = "onpagehide" in Q ? "pagehide" : "unload";
|
|
4553
4557
|
addEventListener(e, Mr, !1);
|
|
4554
4558
|
}
|
|
4555
4559
|
}
|
|
@@ -4582,7 +4586,7 @@ function ko(e) {
|
|
|
4582
4586
|
}
|
|
4583
4587
|
if (!t)
|
|
4584
4588
|
try {
|
|
4585
|
-
return new
|
|
4589
|
+
return new Q[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP");
|
|
4586
4590
|
} catch {
|
|
4587
4591
|
}
|
|
4588
4592
|
}
|
|
@@ -4643,7 +4647,7 @@ class Su extends jn {
|
|
|
4643
4647
|
return this.opts.timestampRequests && (n[this.opts.timestampParam] = So()), this.supportsBinary || (n.b64 = 1), this.createUri(t, n);
|
|
4644
4648
|
}
|
|
4645
4649
|
}
|
|
4646
|
-
const nn =
|
|
4650
|
+
const nn = Q.WebSocket || Q.MozWebSocket;
|
|
4647
4651
|
class Tu extends Su {
|
|
4648
4652
|
createSocket(t, n, r) {
|
|
4649
4653
|
return Ro ? new nn(t, n, r) : n ? new nn(t, n) : new nn(t);
|
|
@@ -5363,7 +5367,7 @@ const zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5363
5367
|
},
|
|
5364
5368
|
protocol: ju
|
|
5365
5369
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5366
|
-
function
|
|
5370
|
+
function ne(e, t, n) {
|
|
5367
5371
|
return e.on(t, n), function() {
|
|
5368
5372
|
e.off(t, n);
|
|
5369
5373
|
};
|
|
@@ -5411,10 +5415,10 @@ class Co extends j {
|
|
|
5411
5415
|
return;
|
|
5412
5416
|
const t = this.io;
|
|
5413
5417
|
this.subs = [
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
+
ne(t, "open", this.onopen.bind(this)),
|
|
5419
|
+
ne(t, "packet", this.onpacket.bind(this)),
|
|
5420
|
+
ne(t, "error", this.onerror.bind(this)),
|
|
5421
|
+
ne(t, "close", this.onclose.bind(this))
|
|
5418
5422
|
];
|
|
5419
5423
|
}
|
|
5420
5424
|
/**
|
|
@@ -6046,11 +6050,11 @@ class wn extends j {
|
|
|
6046
6050
|
this.engine = new Ou(this.uri, this.opts);
|
|
6047
6051
|
const n = this.engine, r = this;
|
|
6048
6052
|
this._readyState = "opening", this.skipReconnect = !1;
|
|
6049
|
-
const i =
|
|
6053
|
+
const i = ne(n, "open", function() {
|
|
6050
6054
|
r.onopen(), t && t();
|
|
6051
6055
|
}), o = (s) => {
|
|
6052
6056
|
this.cleanup(), this._readyState = "closed", this.emitReserved("error", s), t ? t(s) : this.maybeReconnectOnOpen();
|
|
6053
|
-
}, a =
|
|
6057
|
+
}, a = ne(n, "error", o);
|
|
6054
6058
|
if (this._timeout !== !1) {
|
|
6055
6059
|
const s = this._timeout, c = this.setTimeoutFn(() => {
|
|
6056
6060
|
i(), o(new Error("timeout")), n.close();
|
|
@@ -6079,12 +6083,12 @@ class wn extends j {
|
|
|
6079
6083
|
this.cleanup(), this._readyState = "open", this.emitReserved("open");
|
|
6080
6084
|
const t = this.engine;
|
|
6081
6085
|
this.subs.push(
|
|
6082
|
-
|
|
6083
|
-
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
+
ne(t, "ping", this.onping.bind(this)),
|
|
6087
|
+
ne(t, "data", this.ondata.bind(this)),
|
|
6088
|
+
ne(t, "error", this.onerror.bind(this)),
|
|
6089
|
+
ne(t, "close", this.onclose.bind(this)),
|
|
6086
6090
|
// @ts-ignore
|
|
6087
|
-
|
|
6091
|
+
ne(this.decoder, "decoded", this.ondecoded.bind(this))
|
|
6088
6092
|
);
|
|
6089
6093
|
}
|
|
6090
6094
|
/**
|
|
@@ -6520,7 +6524,7 @@ function dd(e) {
|
|
|
6520
6524
|
}, n.onerror = () => t(null), n.src = e;
|
|
6521
6525
|
});
|
|
6522
6526
|
}
|
|
6523
|
-
var Vn = "/cosmetics", $r = "hadoku-cosmetics",
|
|
6527
|
+
var Vn = "/cosmetics", $r = "hadoku-cosmetics", J = (e) => e.replace(
|
|
6524
6528
|
/[&<>"']/g,
|
|
6525
6529
|
(t) => ({ "&": "&", "<": "<", ">": ">", '"': """, "'": "'" })[t]
|
|
6526
6530
|
), We = (e) => e ? e.slice(e.indexOf(".") + 1) : "none";
|
|
@@ -6530,8 +6534,8 @@ function hd(e) {
|
|
|
6530
6534
|
}
|
|
6531
6535
|
var fd = /* @__PURE__ */ new Set(["hop"]);
|
|
6532
6536
|
function Pf(e, t, n = {}) {
|
|
6533
|
-
const r = We(t?.effect), i = We(t?.gradient), o = We(t?.font), a =
|
|
6534
|
-
(b, E) => `<span class="hc-ch" style="--hc-i:${E}"><span class="hc-c">${b === " " ? " " :
|
|
6537
|
+
const r = We(t?.effect), i = We(t?.gradient), o = We(t?.font), a = J(e), s = fd.has(r), c = s ? `<span class="hc-tx">${[...e].map(
|
|
6538
|
+
(b, E) => `<span class="hc-ch" style="--hc-i:${E}"><span class="hc-c">${b === " " ? " " : J(b)}</span></span>`
|
|
6535
6539
|
).join("")}</span>` : `<span class="hc-tx">${a}</span>`, u = (b) => `<span class="hc-lyr${b}" aria-hidden="true">${a}</span>`;
|
|
6536
6540
|
let d = "", h = "";
|
|
6537
6541
|
return (r === "aura" || r === "outline") && (d += u(" hc-g")), r === "glint" && (h += `<span class="hc-win" aria-hidden="true">${u("")}</span>`), r === "twinkle" && (h += [
|
|
@@ -6554,7 +6558,7 @@ function Of(e, t = Vn) {
|
|
|
6554
6558
|
const r = En.get(n)?.art;
|
|
6555
6559
|
if (r) {
|
|
6556
6560
|
const i = e?.placement ?? Ao;
|
|
6557
|
-
return `<span class="hc-ol hc-art${r.pixel ? " hc-px" : ""}" data-hc-art="${
|
|
6561
|
+
return `<span class="hc-ol hc-art${r.pixel ? " hc-px" : ""}" data-hc-art="${J(n)}" style="left:${50 - r.width / 2}%;top:${r.top}%;width:${r.width}%;z-index:${i.back ? 0 : 3}"><span class="hc-adj" style="transform:${hd(i)}"><img alt="" draggable="false" style="--hc-tilt:${r.tilt}deg" src="${J(`${t}/art/${r.file}`)}"></span></span>`;
|
|
6558
6562
|
}
|
|
6559
6563
|
switch (We(n)) {
|
|
6560
6564
|
case "runes":
|
|
@@ -6576,7 +6580,7 @@ function Of(e, t = Vn) {
|
|
|
6576
6580
|
var Br = "!<>-_/[]{}=+*^?#%&01", Fr = /* @__PURE__ */ new Set(["type", "decode", "cascade"]), Ur = 1400, md = 160;
|
|
6577
6581
|
function Mf(e, t, n = {}) {
|
|
6578
6582
|
let r = We(t?.message);
|
|
6579
|
-
if (r === "none") return `<span class="hc-msg">${
|
|
6583
|
+
if (r === "none") return `<span class="hc-msg">${J(e)}</span>`;
|
|
6580
6584
|
const i = e.split(/\s+/).filter(Boolean);
|
|
6581
6585
|
Fr.has(r) && e.length > md && (r = "words");
|
|
6582
6586
|
const o = n.keep ? " data-hc-keep" : "";
|
|
@@ -6588,16 +6592,16 @@ function Mf(e, t, n = {}) {
|
|
|
6588
6592
|
a = i.map(
|
|
6589
6593
|
(v) => `<span class="hc-w">${[...v].map((b) => {
|
|
6590
6594
|
const E = c++;
|
|
6591
|
-
return r === "decode" ? `<span class="hc-ch" style="--hc-i:${E}" data-g="${
|
|
6595
|
+
return r === "decode" ? `<span class="hc-ch" style="--hc-i:${E}" data-g="${J(u())}" data-h="${J(u())}"><span class="hc-r">${J(b)}</span></span>` : `<span class="hc-ch" style="--hc-i:${E}">${J(b)}</span>`;
|
|
6592
6596
|
}).join("")}</span>`
|
|
6593
6597
|
).join(" "), r === "type" && (a += `<span class="hc-caret" style="--hc-i:${c}"></span>`);
|
|
6594
6598
|
const d = r === "type" ? "hc-caret" : r === "decode" ? "hc-r" : "hc-ch", h = a.lastIndexOf(`<span class="${d}"`);
|
|
6595
6599
|
a = `${a.slice(0, h)}<span data-hc-last class="${d}"${a.slice(h + `<span class="${d}"`.length)}`;
|
|
6596
6600
|
} else
|
|
6597
6601
|
s = Math.min(90, Ur / Math.max(1, i.length)), a = i.map(
|
|
6598
|
-
(c, u) => `<span class="hc-w" style="--hc-i:${u}"${u === i.length - 1 ? " data-hc-last" : ""}>${
|
|
6602
|
+
(c, u) => `<span class="hc-w" style="--hc-i:${u}"${u === i.length - 1 ? " data-hc-last" : ""}>${J(c)}</span>`
|
|
6599
6603
|
).join(" ");
|
|
6600
|
-
return `<span class="hc-msg hc-mt-${r}" style="--hc-step:${s.toFixed(1)}ms" data-text="${
|
|
6604
|
+
return `<span class="hc-msg hc-mt-${r}" style="--hc-step:${s.toFixed(1)}ms" data-text="${J(e)}"${o}><span class="hc-sr">${J(e)}</span><span aria-hidden="true">${a}</span></span>`;
|
|
6601
6605
|
}
|
|
6602
6606
|
function gd(e) {
|
|
6603
6607
|
const t = e.target;
|
|
@@ -6825,7 +6829,7 @@ function Td(e) {
|
|
|
6825
6829
|
}
|
|
6826
6830
|
function kd({ user: e }) {
|
|
6827
6831
|
const t = bd(e.sprite_id, e.avatar_url);
|
|
6828
|
-
return /* @__PURE__ */
|
|
6832
|
+
return /* @__PURE__ */ X("span", { className: "relative -ml-2 first:ml-0 group/av", children: [
|
|
6829
6833
|
/* @__PURE__ */ S(
|
|
6830
6834
|
"span",
|
|
6831
6835
|
{
|
|
@@ -6855,13 +6859,13 @@ function kd({ user: e }) {
|
|
|
6855
6859
|
}
|
|
6856
6860
|
function Rd({ room: e }) {
|
|
6857
6861
|
const t = e.users ?? [], n = t.length;
|
|
6858
|
-
return /* @__PURE__ */
|
|
6862
|
+
return /* @__PURE__ */ X("li", { className: "flex items-stretch gap-2", children: [
|
|
6859
6863
|
/* @__PURE__ */ S(
|
|
6860
6864
|
At,
|
|
6861
6865
|
{
|
|
6862
6866
|
to: `/room/${encodeURIComponent(e.viewer_key)}`,
|
|
6863
6867
|
className: "flex-1 block no-underline rounded-lg border border-border bg-bg-card/40 backdrop-blur-sm px-5 py-4 transition-all duration-150 hover:border-border-light hover:-translate-y-px hover:bg-bg-card/55 focus:outline-none focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/40",
|
|
6864
|
-
children: /* @__PURE__ */
|
|
6868
|
+
children: /* @__PURE__ */ X("div", { className: "flex items-center justify-between gap-4", children: [
|
|
6865
6869
|
/* @__PURE__ */ S("div", { className: "text-xl font-medium tracking-wide text-text no-underline", children: Td(e) }),
|
|
6866
6870
|
n > 0 && /* @__PURE__ */ S("div", { className: "flex shrink-0", children: t.map((r, i) => /* @__PURE__ */ S(kd, { user: r }, `${r.name}-${i}`)) })
|
|
6867
6871
|
] })
|
|
@@ -6891,13 +6895,13 @@ function xd() {
|
|
|
6891
6895
|
const u = _e(e.serverOrigin);
|
|
6892
6896
|
return he(() => {
|
|
6893
6897
|
u.current !== e.serverOrigin && (u.current = e.serverOrigin, i());
|
|
6894
|
-
}, [e.serverOrigin, i]), /* @__PURE__ */
|
|
6898
|
+
}, [e.serverOrigin, i]), /* @__PURE__ */ X("div", { className: "wp-lobby relative h-full w-full flex flex-col items-center justify-start gap-12 py-24", children: [
|
|
6895
6899
|
/* @__PURE__ */ S(mo, {}),
|
|
6896
6900
|
/* @__PURE__ */ S("h1", { className: "text-5xl font-bold tracking-[0.08em] text-text z-10", children: "Watch Party" }),
|
|
6897
|
-
/* @__PURE__ */
|
|
6901
|
+
/* @__PURE__ */ X("div", { className: "w-full max-w-md z-10", children: [
|
|
6898
6902
|
/* @__PURE__ */ S("h2", { className: "text-xs uppercase tracking-[0.2em] text-text-muted/70 mb-3 px-1", children: "Rooms" }),
|
|
6899
|
-
n ? /* @__PURE__ */ S("div", { className: "text-text-secondary text-sm px-1 py-3 text-center", children: "Loading rooms…" }) : a ? /* @__PURE__ */
|
|
6900
|
-
/* @__PURE__ */
|
|
6903
|
+
n ? /* @__PURE__ */ S("div", { className: "text-text-secondary text-sm px-1 py-3 text-center", children: "Loading rooms…" }) : a ? /* @__PURE__ */ X("div", { className: "bg-bg-card/40 backdrop-blur-sm border border-danger/40 rounded-lg px-4 py-3 text-sm space-y-2", children: [
|
|
6904
|
+
/* @__PURE__ */ X("div", { className: "bg-danger-bg text-on-danger-bg px-2 py-1 rounded", children: [
|
|
6901
6905
|
"Failed to load rooms: ",
|
|
6902
6906
|
a
|
|
6903
6907
|
] }),
|
|
@@ -6912,9 +6916,9 @@ function xd() {
|
|
|
6912
6916
|
] }) : o.length === 0 ? /* @__PURE__ */ S("div", { className: "text-text-secondary text-sm px-1 py-3", children: "No rooms available." }) : /* @__PURE__ */ S(ti, { children: /* @__PURE__ */ S("ul", { ref: c, className: "list-none p-0 m-0 space-y-2", children: o.map((h) => /* @__PURE__ */ S(Rd, { room: h }, h.viewer_key)) }) })
|
|
6913
6917
|
] }),
|
|
6914
6918
|
kl() && /* @__PURE__ */ S("div", { className: "w-full max-w-md z-10", children: /* @__PURE__ */ S(Qc, { className: "block no-underline rounded-lg border border-border bg-bg-card/40 backdrop-blur-sm px-5 py-4 text-xl font-medium tracking-wide text-text transition-all duration-150 hover:border-border-light hover:-translate-y-px hover:bg-bg-card/55 focus:outline-none focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/40" }) }),
|
|
6915
|
-
Ed() && /* @__PURE__ */
|
|
6919
|
+
Ed() && /* @__PURE__ */ X("div", { className: "w-full max-w-md z-10", children: [
|
|
6916
6920
|
/* @__PURE__ */ S("h2", { className: "text-xs uppercase tracking-[0.2em] text-text-muted/70 mb-3 px-1", children: "On this phone" }),
|
|
6917
|
-
/* @__PURE__ */
|
|
6921
|
+
/* @__PURE__ */ X(
|
|
6918
6922
|
"a",
|
|
6919
6923
|
{
|
|
6920
6924
|
href: _d,
|
|
@@ -6929,7 +6933,7 @@ function xd() {
|
|
|
6929
6933
|
] });
|
|
6930
6934
|
}
|
|
6931
6935
|
function Cd() {
|
|
6932
|
-
return /* @__PURE__ */
|
|
6936
|
+
return /* @__PURE__ */ X("div", { className: "fixed inset-0 bg-black", children: [
|
|
6933
6937
|
/* @__PURE__ */ S(mo, {}),
|
|
6934
6938
|
/* @__PURE__ */ S("div", { className: "absolute inset-0 flex items-center justify-center", children: /* @__PURE__ */ S("div", { className: "text-center", children: /* @__PURE__ */ S("h1", { className: "text-4xl font-bold text-white mb-4", children: "API is sleeping..." }) }) })
|
|
6935
6939
|
] });
|
|
@@ -6963,7 +6967,7 @@ function Md() {
|
|
|
6963
6967
|
let Gn = { ...Li }, kt = null, Po = !1;
|
|
6964
6968
|
const Hr = "watchparty_delivery_client_id";
|
|
6965
6969
|
function Ld() {
|
|
6966
|
-
const e =
|
|
6970
|
+
const e = Z(Hr);
|
|
6967
6971
|
if (e) return e;
|
|
6968
6972
|
const t = globalThis.crypto?.randomUUID?.() ?? `d${Math.random().toString(36).slice(2)}`;
|
|
6969
6973
|
return Dn(Hr, t) ? t : "";
|
|
@@ -7028,7 +7032,7 @@ async function jd(e) {
|
|
|
7028
7032
|
}
|
|
7029
7033
|
Ud(await t.json()) && m("game", "Game catalog loaded", { games: Wn.map((n) => n.id) });
|
|
7030
7034
|
} catch (t) {
|
|
7031
|
-
M("game", "Game catalog fetch failed; using the default list",
|
|
7035
|
+
M("game", "Game catalog fetch failed; using the default list", ie(t));
|
|
7032
7036
|
}
|
|
7033
7037
|
}
|
|
7034
7038
|
}
|
|
@@ -7061,7 +7065,7 @@ function Wd(e) {
|
|
|
7061
7065
|
const n = e.pathname + (e.search || "");
|
|
7062
7066
|
return `/auth?return=${encodeURIComponent(n)}`;
|
|
7063
7067
|
}
|
|
7064
|
-
const Vr = zd(() => import("./Room-
|
|
7068
|
+
const Vr = zd(() => import("./Room-BW0i25qJ.js").then((e) => e.R));
|
|
7065
7069
|
function Gr() {
|
|
7066
7070
|
return /* @__PURE__ */ S("div", { className: "flex-1 flex items-center justify-center bg-black", children: /* @__PURE__ */ S("div", { className: "text-text-secondary text-sm", children: "Loading room..." }) });
|
|
7067
7071
|
}
|
|
@@ -7108,7 +7112,7 @@ function on(e) {
|
|
|
7108
7112
|
signal: AbortSignal.timeout(5e3)
|
|
7109
7113
|
})).ok && (m("app", "API recovery health check passed"), n(!1));
|
|
7110
7114
|
} catch (u) {
|
|
7111
|
-
m("app", "API recovery health check still failing",
|
|
7115
|
+
m("app", "API recovery health check still failing", ie(u));
|
|
7112
7116
|
}
|
|
7113
7117
|
}
|
|
7114
7118
|
const s = setInterval(() => {
|
|
@@ -7135,14 +7139,14 @@ function on(e) {
|
|
|
7135
7139
|
// missing provider is a mount-time error rather than a silently wrong
|
|
7136
7140
|
// theme. It also applies data-theme, which this app previously did through
|
|
7137
7141
|
// its own useTheme() call.
|
|
7138
|
-
/* @__PURE__ */ S(Zo, { children: /* @__PURE__ */ S(Gi.Provider, { value: i, children: /* @__PURE__ */
|
|
7142
|
+
/* @__PURE__ */ S(Zo, { children: /* @__PURE__ */ S(Gi.Provider, { value: i, children: /* @__PURE__ */ X("div", { className: "h-screen flex flex-col bg-bg", "data-tv": r ? "" : void 0, children: [
|
|
7139
7143
|
/* @__PURE__ */ S("main", { className: "flex-1 w-full overflow-hidden min-h-0 flex flex-col", children: /* @__PURE__ */ S(Kd, {}) }),
|
|
7140
7144
|
/* @__PURE__ */ S(Ul, {})
|
|
7141
7145
|
] }) }) })
|
|
7142
7146
|
);
|
|
7143
7147
|
}
|
|
7144
7148
|
function Yd({ basename: e = "/watchparty", appProps: t = {} }) {
|
|
7145
|
-
return /* @__PURE__ */ S(Cs, { basename: e, children: /* @__PURE__ */
|
|
7149
|
+
return /* @__PURE__ */ S(Cs, { basename: e, children: /* @__PURE__ */ X(is, { children: [
|
|
7146
7150
|
/* @__PURE__ */ S(mt, { path: "/", element: /* @__PURE__ */ S(on, { ...t }) }),
|
|
7147
7151
|
/* @__PURE__ */ S(mt, { path: "/room/:roomKey", element: /* @__PURE__ */ S(on, { ...t }) }),
|
|
7148
7152
|
/* @__PURE__ */ S(mt, { path: "/:roomKey", element: /* @__PURE__ */ S(on, { ...t }) })
|
|
@@ -7150,7 +7154,7 @@ function Yd({ basename: e = "/watchparty", appProps: t = {} }) {
|
|
|
7150
7154
|
}
|
|
7151
7155
|
let Rt;
|
|
7152
7156
|
function Mo() {
|
|
7153
|
-
return
|
|
7157
|
+
return Z(oa) || void 0;
|
|
7154
7158
|
}
|
|
7155
7159
|
function Jd() {
|
|
7156
7160
|
if (Rt) return;
|
|
@@ -7287,7 +7291,7 @@ async function lh(e) {
|
|
|
7287
7291
|
placed: n.placed.length
|
|
7288
7292
|
}), n;
|
|
7289
7293
|
} catch (t) {
|
|
7290
|
-
return M("tierlist", "Board fetch threw",
|
|
7294
|
+
return M("tierlist", "Board fetch threw", ie(t)), null;
|
|
7291
7295
|
}
|
|
7292
7296
|
}
|
|
7293
7297
|
let Kr = !1;
|
|
@@ -7316,7 +7320,7 @@ async function jf(e) {
|
|
|
7316
7320
|
const r = await n.json();
|
|
7317
7321
|
return T.getState().setTierlistSnapshot(r, !0), !0;
|
|
7318
7322
|
} catch (n) {
|
|
7319
|
-
return M("tierlist", "Save threw",
|
|
7323
|
+
return M("tierlist", "Save threw", ie(n)), !1;
|
|
7320
7324
|
} finally {
|
|
7321
7325
|
T.getState().setTierlistSaving(!1);
|
|
7322
7326
|
}
|
|
@@ -7450,7 +7454,7 @@ function qf(e) {
|
|
|
7450
7454
|
async function zf(e = {}) {
|
|
7451
7455
|
const t = await gh({
|
|
7452
7456
|
...e,
|
|
7453
|
-
onError: (r) => M("avatar", "Avatar settings read failed — keeping the auto-assigned character",
|
|
7457
|
+
onError: (r) => M("avatar", "Avatar settings read failed — keeping the auto-assigned character", ie(r))
|
|
7454
7458
|
}), n = Dt(t) ? t : null;
|
|
7455
7459
|
return m("avatar", "Requested character from prefs-api", { sprite: n }), n;
|
|
7456
7460
|
}
|
|
@@ -7510,7 +7514,7 @@ function xh(e, t, n) {
|
|
|
7510
7514
|
function Do(e, t) {
|
|
7511
7515
|
return e.lastPongAt === null ? void 0 : Math.max(0, t - e.lastPongAt);
|
|
7512
7516
|
}
|
|
7513
|
-
let A = null,
|
|
7517
|
+
let A = null, re = null, xt = null, oe = null, me = null;
|
|
7514
7518
|
const $o = Pc({ storageKey: "watchparty:tab-id" });
|
|
7515
7519
|
$o.settledTabId();
|
|
7516
7520
|
let Rn = 0;
|
|
@@ -7560,7 +7564,7 @@ function G() {
|
|
|
7560
7564
|
const i = new URL(t.startsWith("http") ? t : `${window.location.origin}${t}`).origin;
|
|
7561
7565
|
A = xe(i, _n(xi)), m("socket", "Socket initialized", { origin: t });
|
|
7562
7566
|
}
|
|
7563
|
-
Ut("__SOCKET__", A),
|
|
7567
|
+
Ut("__SOCKET__", A), oe && (clearTimeout(oe), oe = null), re = null, xt = setInterval(() => {
|
|
7564
7568
|
if (xh(Ee, Date.now(), !!A?.connected)) {
|
|
7565
7569
|
M("socket", "PONG-WATCHDOG no time_pong for 20s — replacing the connection", {
|
|
7566
7570
|
sid: A?.id,
|
|
@@ -7665,9 +7669,9 @@ function Ah(e) {
|
|
|
7665
7669
|
}), e.on(P.CONTROL_ACK, (t) => {
|
|
7666
7670
|
typeof t?.client_seq == "number" && typeof t?.server_seq == "number" && m("socket", "Control ack received", t);
|
|
7667
7671
|
}), e.on(P.TIME_PONG, (t) => {
|
|
7668
|
-
if (Rh(Ee, Date.now()),
|
|
7669
|
-
const n = Date.now() -
|
|
7670
|
-
T.getState().addRttSample(n, t?.server_ts,
|
|
7672
|
+
if (Rh(Ee, Date.now()), re && re.ts) {
|
|
7673
|
+
const n = Date.now() - re.ts;
|
|
7674
|
+
T.getState().addRttSample(n, t?.server_ts, re.ts), re = null, oe && (clearTimeout(oe), oe = null), m("socket", "Time sync RTT", { rtt: n, offset: T.getState().drift.offsetMs });
|
|
7671
7675
|
}
|
|
7672
7676
|
}), e.on(P.READY_STATE, (t) => {
|
|
7673
7677
|
if (!t) return;
|
|
@@ -7832,8 +7836,8 @@ function Zf(e) {
|
|
|
7832
7836
|
A?.connected && A.emit(P.CHAT_TYPING, t);
|
|
7833
7837
|
}
|
|
7834
7838
|
function Bh() {
|
|
7835
|
-
|
|
7836
|
-
|
|
7839
|
+
re || (re = { ts: Date.now() }, G().emit(P.TIME_PING, {}), oe = setTimeout(() => {
|
|
7840
|
+
re && (m("socket", "Time ping timed out after 10s, clearing inflight"), re = null), oe = null;
|
|
7837
7841
|
}, 1e4));
|
|
7838
7842
|
}
|
|
7839
7843
|
function ep(e) {
|
|
@@ -7871,7 +7875,7 @@ T.subscribe((e, t) => {
|
|
|
7871
7875
|
i && (a.name = e.name, ft.name = e.name), o && (a.sprite = e.sprite, ft.sprite = e.sprite), m("socket", "Identity reassert (store change)", a), A?.connected ? A.emit(P.IDENTITY_UPDATE, a) : G().emit(P.IDENTITY_UPDATE, a);
|
|
7872
7876
|
});
|
|
7873
7877
|
function Uh() {
|
|
7874
|
-
xt && (clearInterval(xt), xt = null),
|
|
7878
|
+
xt && (clearInterval(xt), xt = null), oe && (clearTimeout(oe), oe = null), re = null, Ee.unansweredSince = null, Ee.lastTickAt = null;
|
|
7875
7879
|
}
|
|
7876
7880
|
function jh() {
|
|
7877
7881
|
m("socket", "clearJoinState called", { hadPayload: me !== null, room_key: me?.room_key }), me = null, Rn += 1, je = !1, Qn = null;
|
|
@@ -7966,9 +7970,9 @@ function lp(e, t = {}) {
|
|
|
7966
7970
|
} catch (c) {
|
|
7967
7971
|
M("boot", "prefs.beacon.threw", { err: c?.message });
|
|
7968
7972
|
}
|
|
7969
|
-
Cl().catch((c) => M("boot", "whoami threw",
|
|
7973
|
+
Cl().catch((c) => M("boot", "whoami threw", ie(c))), Ll().then((c) => {
|
|
7970
7974
|
c && T.getState().rehydrateFromPrefs();
|
|
7971
|
-
}).catch((c) => M("boot", "prefs sync threw",
|
|
7975
|
+
}).catch((c) => M("boot", "prefs sync threw", ie(c))), Ce || (Ce = (c) => {
|
|
7972
7976
|
pe("app", "Unhandled promise rejection", { reason: String(c.reason) });
|
|
7973
7977
|
}, window.addEventListener("unhandledrejection", Ce)), Ae || (Ae = (c) => {
|
|
7974
7978
|
Gh(c) && pe("app", "Uncaught error", {
|
|
@@ -7978,7 +7982,7 @@ function lp(e, t = {}) {
|
|
|
7978
7982
|
});
|
|
7979
7983
|
}, window.addEventListener("error", Ae)), i.serverOrigin && qh(i.serverOrigin);
|
|
7980
7984
|
const o = Bn().theme;
|
|
7981
|
-
o && ea.includes(o) && ta(o), vl().catch((c) => M("boot", "display names load threw",
|
|
7985
|
+
o && ea.includes(o) && ta(o), vl().catch((c) => M("boot", "display names load threw", ie(c))), e.__watchparty?.root.unmount();
|
|
7982
7986
|
const s = { root: zh(e, /* @__PURE__ */ S(Yd, { basename: n, appProps: i }), r) };
|
|
7983
7987
|
e.__watchparty = s;
|
|
7984
7988
|
}
|
|
@@ -7989,21 +7993,21 @@ function up(e) {
|
|
|
7989
7993
|
export {
|
|
7990
7994
|
ep as $,
|
|
7991
7995
|
wd as A,
|
|
7992
|
-
|
|
7996
|
+
Ut as B,
|
|
7993
7997
|
qe as C,
|
|
7994
7998
|
On as D,
|
|
7995
|
-
|
|
7996
|
-
|
|
7997
|
-
|
|
7998
|
-
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
7999
|
+
$f as E,
|
|
8000
|
+
ja as F,
|
|
8001
|
+
Ua as G,
|
|
8002
|
+
Hh as H,
|
|
8003
|
+
zd as I,
|
|
8004
|
+
Bn as J,
|
|
8005
|
+
wr as K,
|
|
8006
|
+
Ht as L,
|
|
8003
8007
|
Xt as M,
|
|
8004
|
-
|
|
8005
|
-
|
|
8006
|
-
|
|
8008
|
+
Jf as N,
|
|
8009
|
+
uf as O,
|
|
8010
|
+
lf as P,
|
|
8007
8011
|
Yf as Q,
|
|
8008
8012
|
Kf as R,
|
|
8009
8013
|
Sf as S,
|
|
@@ -8017,7 +8021,7 @@ export {
|
|
|
8017
8021
|
qf as _,
|
|
8018
8022
|
kf as a,
|
|
8019
8023
|
tp as a0,
|
|
8020
|
-
|
|
8024
|
+
ie as a1,
|
|
8021
8025
|
$t as a2,
|
|
8022
8026
|
G as a3,
|
|
8023
8027
|
P as a4,
|
|
@@ -8039,7 +8043,7 @@ export {
|
|
|
8039
8043
|
sp as aK,
|
|
8040
8044
|
be as aL,
|
|
8041
8045
|
xl as aM,
|
|
8042
|
-
|
|
8046
|
+
Z as aN,
|
|
8043
8047
|
ip as aO,
|
|
8044
8048
|
ap as aP,
|
|
8045
8049
|
rp as aQ,
|
|
@@ -8098,4 +8102,4 @@ export {
|
|
|
8098
8102
|
nf as y,
|
|
8099
8103
|
qs as z
|
|
8100
8104
|
};
|
|
8101
|
-
//# sourceMappingURL=index-
|
|
8105
|
+
//# sourceMappingURL=index-DeZ6HVmt.js.map
|