@vocalstack/player 0.1.0-alpha.34 → 0.1.0-alpha.35

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/index.js CHANGED
@@ -2,14 +2,14 @@ var La = Object.defineProperty;
2
2
  var va = (t, e, n) => e in t ? La(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var Me = (t, e, n) => va(t, typeof e != "symbol" ? e + "" : e, n);
4
4
  import { jsx as i, jsxs as g, Fragment as be } from "react/jsx-runtime";
5
- import { useState as k, useRef as j, useEffect as E, useLayoutEffect as Ht, createContext as ci, useMemo as Ie, useContext as ka, useCallback as qe, Fragment as ja, forwardRef as za, useImperativeHandle as Ia } from "react";
5
+ import { useState as v, useRef as j, useEffect as S, useLayoutEffect as Ht, createContext as ci, useMemo as Ie, useContext as ka, useCallback as qe, Fragment as ja, forwardRef as za, useImperativeHandle as Ia } from "react";
6
6
  import { createPortal as Oa } from "react-dom";
7
7
  import { VocalStackError as ui, VocalStack as di } from "@vocalstack/js-sdk";
8
8
  const hi = "https://vocalstack.com", Ca = "data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMDUxLjY5MDciIGhlaWdodD0iMTU1LjMwNjQxIiB2aWV3Qm94PSIwIDAgMTA1MS42OTA2IDE1NS4zMDY0MSI+PGcgdHJhbnNmb3JtPSJtYXRyaXgoMC44ODczNDc3MSwwLDAsMC44OTExODY4MiwtNDIuNzE2NjMsLTEyMy44NTM4OCkiPjxwYXRoIHN0eWxlPSJmaWxsOiM1NWFiZTU7ZmlsbC1vcGFjaXR5OjE7c3Ryb2tlLXdpZHRoOjAuMzcyOTYyIiBkPSJtIDE2NS43NDM2OSwzMTIuMzQ1MTQgYyAtMy42NTkwNCwtMC45NTg2MSAtNi44OTEzMSwtMy4zNTM0OCAtOS4yMTQ5NCwtNi44Mjc1OSAtMS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iIHg9IjExOS43ODkyNCIgeT0iMTc2LjI1OTA5IiByeT0iNS42MTA0OTYiLz48L2c+PC9nPjwvc3ZnPg==";
9
9
  function Sa({ size: t = 16, sw: e = 1.5, children: n, style: r, ...s }) {
10
10
  return /* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: t, height: t, fill: "none", stroke: "currentColor", strokeWidth: e, strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", style: { flex: "none", ...r }, ...s, children: n });
11
11
  }
12
- const ee = {
12
+ const X = {
13
13
  plus: "M12 4.5v15m7.5-7.5h-15",
14
14
  check: "M4.5 12.75l6 6 9-13.5",
15
15
  downloaded: "M12 21a9 9 0 100-18 9 9 0 000 18zM12 6.75v10.5m0 0l3.75-3.75M12 17.25l-3.75-3.75",
@@ -100,13 +100,13 @@ function yt({ checked: t, onChange: e, label: n, disabled: r }) {
100
100
  return /* @__PURE__ */ i("button", { type: "button", role: "switch", "aria-checked": t, "aria-label": n, className: "vs-toggle", disabled: r, onClick: () => e(!t), children: /* @__PURE__ */ i("span", { className: "vs-toggle__knob" }) });
101
101
  }
102
102
  function gr({ value: t, onChange: e, options: n, size: r, bordered: s = !0, fill: a }) {
103
- const o = j(null), [l, c] = k(null), u = Math.max(0, n.findIndex((d) => d.value === t));
103
+ const o = j(null), [l, c] = v(null), u = Math.max(0, n.findIndex((d) => d.value === t));
104
104
  return Ht(() => {
105
105
  const d = o.current;
106
106
  if (!d) return;
107
107
  const M = d.querySelectorAll(".vs-switch__opt")[u];
108
108
  M && c({ left: M.offsetLeft, width: M.offsetWidth });
109
- }, [u, n.length]), E(() => {
109
+ }, [u, n.length]), S(() => {
110
110
  const d = o.current;
111
111
  if (!d || typeof ResizeObserver > "u") return;
112
112
  const M = new ResizeObserver(() => {
@@ -132,11 +132,11 @@ function xn({ flag: t, code: e, label: n, onClick: r, variant: s, block: a, bord
132
132
  return /* @__PURE__ */ g("button", { type: "button", className: `vs-lang-chip${s ? ` vs-lang-chip--${s}` : ""}${a ? " vs-lang-chip--block" : ""}${a && !d ? " vs-lang-chip--bare" : ""}${o ? "" : " vs-lang-chip--borderless"}${l === "sm" ? " vs-lang-chip--sm" : ""}`, onClick: r, "aria-label": n ? e ? `${n} (${e})` : n : e, style: c, children: [
133
133
  t ? /* @__PURE__ */ i("span", { className: "vs-lang-chip__flag", children: t }) : null,
134
134
  d ? /* @__PURE__ */ i("span", { className: "vs-lang-chip__name", children: n ?? e }) : a ? null : /* @__PURE__ */ i("span", { className: "vs-lang-chip__code", children: e }),
135
- /* @__PURE__ */ i(oe, { d: ee.chevronDown, size: 13, className: "vs-lang-chip__chevron", style: { color: s === "primary" ? "currentColor" : "var(--vs-text-muted)" } })
135
+ /* @__PURE__ */ i(oe, { d: X.chevronDown, size: 13, className: "vs-lang-chip__chevron", style: { color: s === "primary" ? "currentColor" : "var(--vs-text-muted)" } })
136
136
  ] });
137
137
  }
138
138
  function Ya({ value: t, label: e = "Copy", onCopied: n }) {
139
- const [r, s] = k(!1), a = async () => {
139
+ const [r, s] = v(!1), a = async () => {
140
140
  try {
141
141
  await navigator.clipboard.writeText(t), s(!0), n == null || n(), setTimeout(() => s(!1), 1400);
142
142
  } catch {
@@ -155,7 +155,7 @@ function Ya({ value: t, label: e = "Copy", onCopied: n }) {
155
155
  },
156
156
  children: [
157
157
  /* @__PURE__ */ i("span", { className: "vs-sr", "aria-live": "polite", children: r ? `Copied${e.replace(/^Copy\b/, "")}` : "" }),
158
- r ? /* @__PURE__ */ i(oe, { d: ee.check, size: 13, sw: 2.2 }) : /* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: "13", height: "13", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ i("path", { d: "M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75" }) })
158
+ r ? /* @__PURE__ */ i(oe, { d: X.check, size: 13, sw: 2.2 }) : /* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: "13", height: "13", fill: "none", stroke: "currentColor", strokeWidth: "1.6", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: /* @__PURE__ */ i("path", { d: "M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 0 1-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 0 1 1.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 0 0-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 0 1-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 0 0-3.375-3.375h-1.5a1.125 1.125 0 0 1-1.125-1.125v-1.5a3.375 3.375 0 0 0-3.375-3.375H9.75" }) })
159
159
  ]
160
160
  }
161
161
  );
@@ -178,14 +178,14 @@ function Ua(t, e) {
178
178
  }, [t, e]);
179
179
  }
180
180
  function fr({ children: t, ms: e = 220 }) {
181
- const [n] = k(() => {
181
+ const [n] = v(() => {
182
182
  var r;
183
183
  return typeof window < "u" && !!((r = window.matchMedia) != null && r.call(window, "(hover: hover) and (pointer: fine)").matches);
184
184
  });
185
185
  return n ? /* @__PURE__ */ i(Ra, { ms: e, children: t }) : /* @__PURE__ */ i("div", { children: t });
186
186
  }
187
187
  function Ra({ children: t, ms: e }) {
188
- const n = j(null), r = j(null), [s, a] = k(null);
188
+ const n = j(null), r = j(null), [s, a] = v(null);
189
189
  return Ht(() => {
190
190
  const o = r.current, l = n.current;
191
191
  if (!o || !l) return;
@@ -211,7 +211,7 @@ function Ra({ children: t, ms: e }) {
211
211
  }
212
212
  function Wt({ open: t, onClose: e, title: n, titleNode: r, note: s, doneLabel: a = "Done", children: o, drawer: l = !1, header: c, kind: u, sticky: d = !1 }) {
213
213
  const M = j(null);
214
- return Ua(M, t), E(() => {
214
+ return Ua(M, t), S(() => {
215
215
  if (!t) return;
216
216
  const h = (N) => {
217
217
  N.key === "Escape" && e();
@@ -275,22 +275,22 @@ async function $a(t) {
275
275
  }
276
276
  function Ba(t, e, n = {}) {
277
277
  const r = new URLSearchParams({ kind: "delivery", format: _n() });
278
- return n.accessToken && r.set("access_token", n.accessToken), n.listenerToken && r.set("listenerToken", n.listenerToken), n.shareCode && r.set("shareCode", n.shareCode), `${t}/v1/recordings/${e}/audio?${r}`;
278
+ return n.media ? r.set("media", n.media) : n.accessToken && r.set("access_token", n.accessToken), n.listenerToken && r.set("listenerToken", n.listenerToken), n.shareCode && r.set("shareCode", n.shareCode), `${t}/v1/recordings/${e}/audio?${r}`;
279
279
  }
280
280
  function $s(t, e, n = {}, r = "background") {
281
281
  const s = new URLSearchParams({ kind: r, format: _n() });
282
- return n.accessToken && s.set("access_token", n.accessToken), n.listenerToken && s.set("listenerToken", n.listenerToken), n.shareCode && s.set("shareCode", n.shareCode), `${t}/v1/recordings/${e}/audio?${s}`;
282
+ return n.media ? s.set("media", n.media) : n.accessToken && s.set("access_token", n.accessToken), n.listenerToken && s.set("listenerToken", n.listenerToken), n.shareCode && s.set("shareCode", n.shareCode), `${t}/v1/recordings/${e}/audio?${s}`;
283
283
  }
284
284
  function vn(t, e, n, r = {}) {
285
285
  const s = new URLSearchParams({ kind: n });
286
- return n === "delivery" && s.set("format", "mp3"), r.accessToken && s.set("access_token", r.accessToken), r.listenerToken && s.set("listenerToken", r.listenerToken), r.shareCode && s.set("shareCode", r.shareCode), `${t}/v1/recordings/${e}/audio?${s}`;
286
+ return n === "delivery" && s.set("format", "mp3"), r.media ? s.set("media", r.media) : r.accessToken && s.set("access_token", r.accessToken), r.listenerToken && s.set("listenerToken", r.listenerToken), r.shareCode && s.set("shareCode", r.shareCode), `${t}/v1/recordings/${e}/audio?${s}`;
287
287
  }
288
288
  function Va(t, e, n, r, s = {}) {
289
289
  return Ha(t, e, n, r, "mp3", s);
290
290
  }
291
291
  function Ha(t, e, n, r, s, a) {
292
292
  const o = new URLSearchParams({ kind: "voice", lang: n, format: s });
293
- return r && o.set("voice", r), a.accessToken && o.set("access_token", a.accessToken), a.listenerToken && o.set("listenerToken", a.listenerToken), a.shareCode && o.set("shareCode", a.shareCode), `${t}/v1/recordings/${e}/audio?${o}`;
293
+ return r && o.set("voice", r), a.media ? o.set("media", a.media) : a.accessToken && o.set("access_token", a.accessToken), a.listenerToken && o.set("listenerToken", a.listenerToken), a.shareCode && o.set("shareCode", a.shareCode), `${t}/v1/recordings/${e}/audio?${o}`;
294
294
  }
295
295
  function Wa(t, e = !0) {
296
296
  const n = (t == null ? void 0 : t.code) ?? 0, r = n === 2 ? "the download failed" : n === 3 ? "this browser could not decode it" : n === 4 ? "the file is not available, or this browser cannot play it" : n === 1 ? "the load was stopped" : "something went wrong";
@@ -904,12 +904,12 @@ function qa(t, e, n, r = {}, s) {
904
904
  var h, N;
905
905
  const d = (h = t.clipRev) == null ? void 0 : h[String(u)], M = Math.max(1, ((N = t.clipParts) == null ? void 0 : N[String(u)]) ?? 1);
906
906
  return Array.from({ length: M }, (p, y) => {
907
- var v;
907
+ var k;
908
908
  return {
909
909
  sentenceId: u,
910
910
  lang: t.lang,
911
911
  src: `${n}/v1/recordings/${e}/voice/${u}?lang=${encodeURIComponent(t.lang)}${c}&format=${_n()}${y > 0 ? `&part=${y}` : ""}${d ? `&v=${encodeURIComponent(d)}` : ""}${l}`,
912
- durationS: M === 1 ? ((v = t.clipDur) == null ? void 0 : v[String(u)]) ?? 0 : 0,
912
+ durationS: M === 1 ? ((k = t.clipDur) == null ? void 0 : k[String(u)]) ?? 0 : 0,
913
913
  voice: t.voice ?? null,
914
914
  cloned: !1,
915
915
  part: y,
@@ -953,8 +953,8 @@ function Ti(t, e) {
953
953
  for (const n of yr) n();
954
954
  }
955
955
  function Cr(t, e) {
956
- const [n, r] = k(() => Tr(t, e));
957
- return E(() => {
956
+ const [n, r] = v(() => Tr(t, e));
957
+ return S(() => {
958
958
  const s = () => r(Tr(t, e));
959
959
  return yr.add(s), window.addEventListener("storage", s), () => {
960
960
  yr.delete(s), window.removeEventListener("storage", s);
@@ -988,73 +988,73 @@ function eo(t) {
988
988
  return [typeof e == "number" && e > 0 ? e : t === "ga" ? 560 : Xa, n];
989
989
  }
990
990
  function br({ open: t, onClose: e, value: n, onSelect: r, languages: s, searchPlaceholder: a = "Search languages", none: o, pinned: l = [], recent: c = [], requireVoice: u, keepOpen: d, busy: M }) {
991
- const [h, N] = k(""), [p, y] = k(!1), [v, m] = k(null);
992
- E(() => {
991
+ const [h, N] = v(""), [p, y] = v(!1), [k, m] = v(null);
992
+ S(() => {
993
993
  t && (N(""), y(!1), m(null));
994
994
  }, [t]);
995
995
  const f = Ie(() => {
996
- const S = h.trim().toLowerCase();
997
- return [...S ? s.filter((O) => O.label.toLowerCase().includes(S) || O.native.toLowerCase().includes(S) || O.code.toLowerCase().includes(S)) : s].sort((O, te) => {
996
+ const A = h.trim().toLowerCase();
997
+ return [...A ? s.filter((O) => O.label.toLowerCase().includes(A) || O.native.toLowerCase().includes(A) || O.code.toLowerCase().includes(A)) : s].sort((O, te) => {
998
998
  const K = l.indexOf(O.code), L = l.indexOf(te.code);
999
999
  return K !== -1 || L !== -1 ? (K === -1 ? 999 : K) - (L === -1 ? 999 : L) : O.label.localeCompare(te.label);
1000
1000
  });
1001
1001
  }, [s, h, l]), I = Ie(
1002
- () => h ? [] : c.map((S) => f.find((T) => T.code === S)).filter((S) => !!S).sort((S, T) => S.label.localeCompare(T.label)),
1002
+ () => h ? [] : c.map((A) => f.find((T) => T.code === A)).filter((A) => !!A).sort((A, T) => A.label.localeCompare(T.label)),
1003
1003
  [c, f, h]
1004
- ), C = Ie(() => I.length ? f.filter((S) => !I.some((T) => T.code === S.code)) : f, [f, I]), D = p || h ? C.length : 12, B = C, Y = C.length - Math.min(D, C.length), X = (S, T = !1, _ = !1) => {
1005
- const O = !!u && !S.voice;
1004
+ ), C = Ie(() => I.length ? f.filter((A) => !I.some((T) => T.code === A.code)) : f, [f, I]), D = p || h ? C.length : 12, B = C, Y = C.length - Math.min(D, C.length), ee = (A, T = !1, _ = !1) => {
1005
+ const O = !!u && !A.voice;
1006
1006
  return /* @__PURE__ */ g(
1007
1007
  "button",
1008
1008
  {
1009
1009
  type: "button",
1010
1010
  className: `vs-picker__row${O ? " vs-picker__row--off" : ""}${_ ? " vs-picker__row--extra" : ""}`,
1011
- "aria-selected": n === S.code,
1011
+ "aria-selected": n === A.code,
1012
1012
  onClick: () => {
1013
1013
  if (O) {
1014
- m(S.code);
1014
+ m(A.code);
1015
1015
  return;
1016
1016
  }
1017
- r(S.code), d || e();
1017
+ r(A.code), d || e();
1018
1018
  },
1019
1019
  children: [
1020
- /* @__PURE__ */ i("span", { className: "vs-picker__flag", children: S.flag }),
1020
+ /* @__PURE__ */ i("span", { className: "vs-picker__flag", children: A.flag }),
1021
1021
  /* @__PURE__ */ g("span", { style: { flex: 1, minWidth: 0 }, children: [
1022
- /* @__PURE__ */ i("div", { className: "vs-picker__label", children: S.label }),
1023
- /* @__PURE__ */ i("div", { className: "vs-picker__native", children: S.native })
1022
+ /* @__PURE__ */ i("div", { className: "vs-picker__label", children: A.label }),
1023
+ /* @__PURE__ */ i("div", { className: "vs-picker__native", children: A.native })
1024
1024
  ] }),
1025
- /* @__PURE__ */ i("span", { className: "vs-picker__slot", children: T && /* @__PURE__ */ i("span", { className: "vs-picker__forget", role: "button", tabIndex: 0, title: `Remove ${S.label} from recent`, "aria-label": `Remove ${S.label} from recent`, onClick: (te) => {
1026
- te.stopPropagation(), Bs(S.code);
1025
+ /* @__PURE__ */ i("span", { className: "vs-picker__slot", children: T && /* @__PURE__ */ i("span", { className: "vs-picker__forget", role: "button", tabIndex: 0, title: `Remove ${A.label} from recent`, "aria-label": `Remove ${A.label} from recent`, onClick: (te) => {
1026
+ te.stopPropagation(), Bs(A.code);
1027
1027
  }, onKeyDown: (te) => {
1028
- (te.key === "Enter" || te.key === " ") && (te.preventDefault(), te.stopPropagation(), Bs(S.code));
1029
- }, children: /* @__PURE__ */ i(oe, { d: ee.close, size: 16 }) }) }),
1030
- /* @__PURE__ */ i("span", { className: `vs-picker__slot${O ? " vs-picker__slot--wide" : ""}`, title: S.voice ? "Voice available" : O ? "No voice speaks this language yet" : void 0, children: O ? v === S.code && /* @__PURE__ */ i("span", { className: "vs-picker__off", children: "UNAVAILABLE" }) : S.voice && /* @__PURE__ */ i(oe, { d: ee.headphones, size: 16 }) }),
1031
- /* @__PURE__ */ i("span", { className: "vs-picker__check", children: n === S.code && (M === S.code ? /* @__PURE__ */ i(ut, { size: 15, color: "var(--vs-link-hover)", track: "var(--vs-border)" }) : /* @__PURE__ */ i(oe, { d: ee.check, size: 16, sw: 2.2 })) })
1028
+ (te.key === "Enter" || te.key === " ") && (te.preventDefault(), te.stopPropagation(), Bs(A.code));
1029
+ }, children: /* @__PURE__ */ i(oe, { d: X.close, size: 16 }) }) }),
1030
+ /* @__PURE__ */ i("span", { className: `vs-picker__slot${O ? " vs-picker__slot--wide" : ""}`, title: A.voice ? "Voice available" : O ? "No voice speaks this language yet" : void 0, children: O ? k === A.code && /* @__PURE__ */ i("span", { className: "vs-picker__off", children: "UNAVAILABLE" }) : A.voice && /* @__PURE__ */ i(oe, { d: X.headphones, size: 16 }) }),
1031
+ /* @__PURE__ */ i("span", { className: "vs-picker__check", children: n === A.code && (M === A.code ? /* @__PURE__ */ i(ut, { size: 15, color: "var(--vs-link-hover)", track: "var(--vs-border)" }) : /* @__PURE__ */ i(oe, { d: X.check, size: 16, sw: 2.2 })) })
1032
1032
  ]
1033
1033
  },
1034
- S.code
1034
+ A.code
1035
1035
  );
1036
1036
  }, z = /* @__PURE__ */ g("div", { className: "vs-picker__search", children: [
1037
- /* @__PURE__ */ i(oe, { d: ee.search, size: 16, sw: 1.7, style: { color: "var(--vs-text-muted)" } }),
1038
- /* @__PURE__ */ i("input", { value: h, onChange: (S) => N(S.target.value), placeholder: a, "aria-label": a })
1037
+ /* @__PURE__ */ i(oe, { d: X.search, size: 16, sw: 1.7, style: { color: "var(--vs-text-muted)" } }),
1038
+ /* @__PURE__ */ i("input", { value: h, onChange: (A) => N(A.target.value), placeholder: a, "aria-label": a })
1039
1039
  ] }), F = /* @__PURE__ */ g("div", { className: "vs-picker__list", children: [
1040
1040
  o && !h && /* @__PURE__ */ g("button", { type: "button", className: "vs-picker__row", "data-vs-original": "", "aria-selected": n === null, onClick: () => {
1041
1041
  r(null), d || e();
1042
1042
  }, children: [
1043
- /* @__PURE__ */ i("span", { className: "vs-picker__flag", children: /* @__PURE__ */ i(oe, { d: ee.mic, size: 19, sw: 1.6, style: { color: "var(--vs-text-muted)" } }) }),
1043
+ /* @__PURE__ */ i("span", { className: "vs-picker__flag", children: /* @__PURE__ */ i(oe, { d: X.mic, size: 19, sw: 1.6, style: { color: "var(--vs-text-muted)" } }) }),
1044
1044
  /* @__PURE__ */ g("span", { style: { flex: 1, minWidth: 0 }, children: [
1045
1045
  /* @__PURE__ */ i("div", { className: "vs-picker__label", children: o }),
1046
1046
  /* @__PURE__ */ i("div", { className: "vs-picker__native", children: "As spoken · no translation" })
1047
1047
  ] }),
1048
1048
  /* @__PURE__ */ i("span", { className: "vs-picker__slot" }),
1049
1049
  /* @__PURE__ */ i("span", { className: "vs-picker__slot" }),
1050
- /* @__PURE__ */ i("span", { className: "vs-picker__check", children: n === null && /* @__PURE__ */ i(oe, { d: ee.check, size: 16, sw: 2.2 }) })
1050
+ /* @__PURE__ */ i("span", { className: "vs-picker__check", children: n === null && /* @__PURE__ */ i(oe, { d: X.check, size: 16, sw: 2.2 }) })
1051
1051
  ] }),
1052
1052
  I.length > 0 && /* @__PURE__ */ g(be, { children: [
1053
1053
  /* @__PURE__ */ i("div", { className: "vs-picker__head", children: "RECENT" }),
1054
- I.map((S) => X(S, !0)),
1054
+ I.map((A) => ee(A, !0)),
1055
1055
  /* @__PURE__ */ i("div", { className: "vs-picker__rule" })
1056
1056
  ] }),
1057
- B.map((S, T) => X(S, !1, T >= D)),
1057
+ B.map((A, T) => ee(A, !1, T >= D)),
1058
1058
  Y > 0 && /* @__PURE__ */ g("button", { type: "button", className: "vs-picker__more vs-picker__more--btn", style: { background: "none", border: 0, cursor: "pointer", width: "100%", textAlign: "left" }, onClick: () => y(!0), children: [
1059
1059
  "+ ",
1060
1060
  Y,
@@ -1073,19 +1073,19 @@ function to({ open: t, onClose: e, title: n, note: r, sticky: s, ...a }) {
1073
1073
  return /* @__PURE__ */ i(Wt, { open: t, onClose: e, title: n, note: r, drawer: !1, sticky: s, kind: "picker", header: o, children: l });
1074
1074
  }
1075
1075
  function no({ src: t, t: e, playing: n, seekN: r, onToggle: s }) {
1076
- const a = j(null), [o, l] = k(!1), [c, u] = k(!1), d = j(e);
1077
- return d.current = e, E(() => {
1076
+ const a = j(null), [o, l] = v(!1), [c, u] = v(!1), d = j(e);
1077
+ return d.current = e, S(() => {
1078
1078
  l(!1), u(!1);
1079
- }, [t]), E(() => {
1079
+ }, [t]), S(() => {
1080
1080
  const M = a.current;
1081
1081
  !M || !o || (n ? M.play().catch(() => {
1082
1082
  }) : M.pause());
1083
- }, [n, o]), E(() => {
1083
+ }, [n, o]), S(() => {
1084
1084
  const M = a.current;
1085
1085
  if (!M || !o) return;
1086
1086
  const h = Math.max(0, d.current);
1087
1087
  Math.abs(M.currentTime - h) > (n ? 0.4 : 0.08) && (M.currentTime = h);
1088
- }, [e, r, o, n]), E(() => {
1088
+ }, [e, r, o, n]), S(() => {
1089
1089
  const M = a.current;
1090
1090
  if (!M || !o || !n) return;
1091
1091
  const h = setInterval(() => {
@@ -1115,8 +1115,8 @@ function no({ src: t, t: e, playing: n, seekN: r, onToggle: s }) {
1115
1115
  }
1116
1116
  const Xt = /* @__PURE__ */ new Map();
1117
1117
  function ro(t) {
1118
- const [e, n] = k(() => t ? Xt.get(t) ?? null : null);
1119
- return E(() => {
1118
+ const [e, n] = v(() => t ? Xt.get(t) ?? null : null);
1119
+ return S(() => {
1120
1120
  if (!t) {
1121
1121
  n(null);
1122
1122
  return;
@@ -1218,8 +1218,8 @@ function ar(t) {
1218
1218
  t && (t.pause(), t.removeAttribute("src"), t.load());
1219
1219
  }
1220
1220
  function vi(t, e) {
1221
- const [n, r] = k("off"), [s, a] = k([]), [o, l] = k(!1), c = j(null), u = j([null, null]), d = j([NaN, NaN]), M = j(0);
1222
- return E(() => {
1221
+ const [n, r] = v("off"), [s, a] = v([]), [o, l] = v(!1), c = j(null), u = j([null, null]), d = j([NaN, NaN]), M = j(0);
1222
+ return S(() => {
1223
1223
  if (a([]), l(!1), !t) {
1224
1224
  r("off");
1225
1225
  return;
@@ -1230,19 +1230,19 @@ function vi(t, e) {
1230
1230
  yo(t).then((y) => {
1231
1231
  if (!h) {
1232
1232
  if (y.ready) {
1233
- const v = new Audio();
1234
- v.preload = "auto";
1233
+ const k = new Audio();
1234
+ k.preload = "auto";
1235
1235
  const m = () => {
1236
- !h && c.current === v && r("ready");
1236
+ !h && c.current === k && r("ready");
1237
1237
  };
1238
- v.addEventListener("canplay", m, { once: !0 }), v.addEventListener("error", m, { once: !0 }), v.src = t, c.current = v;
1238
+ k.addEventListener("canplay", m, { once: !0 }), k.addEventListener("error", m, { once: !0 }), k.src = t, c.current = k;
1239
1239
  return;
1240
1240
  }
1241
1241
  if (y.retryS == null) {
1242
1242
  r("unavailable"), a([]);
1243
1243
  return;
1244
1244
  }
1245
- a((v) => v.length === y.parts.length && v.every((m, f) => m.startS === y.parts[f].startS) ? v : y.parts), N = setTimeout(p, y.retryS * 1e3);
1245
+ a((k) => k.length === y.parts.length && k.every((m, f) => m.startS === y.parts[f].startS) ? k : y.parts), N = setTimeout(p, y.retryS * 1e3);
1246
1246
  }
1247
1247
  }).catch(() => {
1248
1248
  h || (N = setTimeout(p, 5e3));
@@ -1251,7 +1251,7 @@ function vi(t, e) {
1251
1251
  return p(), () => {
1252
1252
  h = !0, N && clearTimeout(N), ar(c.current), c.current = null, ar(u.current[0]), ar(u.current[1]), u.current = [null, null], d.current = [NaN, NaN];
1253
1253
  };
1254
- }, [t]), E(() => {
1254
+ }, [t]), S(() => {
1255
1255
  const h = () => {
1256
1256
  for (const m of u.current) m && !m.paused && m.pause();
1257
1257
  };
@@ -1270,8 +1270,8 @@ function vi(t, e) {
1270
1270
  I || (I = new Audio(), I.preload = "auto", u.current[m] = I), I.pause(), I.src = s[f].url, d.current[m] = s[f].startS;
1271
1271
  }
1272
1272
  M.current = p.play;
1273
- const y = u.current[p.play], v = u.current[1 - p.play];
1274
- v && !v.paused && v.pause(), Hs(y, { ...e, t: e.t - s[N].startS }), l(!e.playing || y.readyState >= 3);
1273
+ const y = u.current[p.play], k = u.current[1 - p.play];
1274
+ k && !k.paused && k.pause(), Hs(y, { ...e, t: e.t - s[N].startS }), l(!e.playing || y.readyState >= 3);
1275
1275
  }, [n, s, e.t, e.playing, e.muted]), { state: n, on: o, untilS: n === "ready" ? 1 / 0 : s.length ? s[s.length - 1].endS : 0 };
1276
1276
  }
1277
1277
  function To(t, e) {
@@ -1321,18 +1321,18 @@ function zo(t) {
1321
1321
  const c = /* @__PURE__ */ new Map();
1322
1322
  for (const u of t.clips) c.set(u.sentenceId, [...c.get(u.sentenceId) ?? [], u]);
1323
1323
  return c;
1324
- }, [t.clips]), n = j(/* @__PURE__ */ new Map()), r = j(null), [s, a] = k({ missing: null, sid: null }), o = (c) => {
1324
+ }, [t.clips]), n = j(/* @__PURE__ */ new Map()), r = j(null), [s, a] = v({ missing: null, sid: null }), o = (c) => {
1325
1325
  let u = n.current.get(c);
1326
1326
  return u || (u = new Audio(), u.preload = "auto", u.src = c, n.current.set(c, u)), u;
1327
1327
  }, l = () => {
1328
1328
  var c;
1329
1329
  (c = r.current) == null || c.el.pause(), r.current = null;
1330
1330
  };
1331
- return E(() => () => {
1331
+ return S(() => () => {
1332
1332
  for (const c of n.current.values())
1333
1333
  c.pause(), c.removeAttribute("src");
1334
1334
  n.current.clear(), r.current = null;
1335
- }, []), E(() => {
1335
+ }, []), S(() => {
1336
1336
  if (!t.on) {
1337
1337
  l(), a((p) => p.missing == null && p.sid == null ? p : { missing: null, sid: null });
1338
1338
  return;
@@ -1412,16 +1412,16 @@ function Co(t, e) {
1412
1412
  const n = j(t);
1413
1413
  n.current = t;
1414
1414
  const r = !!t;
1415
- E(() => {
1415
+ S(() => {
1416
1416
  const a = typeof navigator < "u" ? navigator.mediaSession : void 0;
1417
1417
  if (!(!a || !r))
1418
1418
  return Oo(a, () => n.current);
1419
1419
  }, [r]);
1420
1420
  const s = !!(t != null && t.playing);
1421
- E(() => {
1421
+ S(() => {
1422
1422
  const a = typeof navigator < "u" ? navigator.mediaSession : void 0;
1423
1423
  !a || !r || (a.playbackState = s ? "playing" : "paused");
1424
- }, [r, s]), E(() => {
1424
+ }, [r, s]), S(() => {
1425
1425
  const a = typeof navigator < "u" ? navigator.mediaSession : void 0;
1426
1426
  if (!(!a || !r || !e || typeof MediaMetadata > "u"))
1427
1427
  try {
@@ -1820,8 +1820,10 @@ const Vo = /* @__PURE__ */ new Set([
1820
1820
  };
1821
1821
  function It(t) {
1822
1822
  const e = t, n = typeof (e == null ? void 0 : e.code) == "string" ? e.code : void 0, r = typeof (e == null ? void 0 : e.status) == "number" ? e.status : void 0, s = e == null ? void 0 : e.details;
1823
- if (n || r && r >= 400)
1824
- return n && Vo.has(n) && typeof (e == null ? void 0 : e.message) == "string" ? { message: e.message, code: n, status: r, details: s } : n === "unavailable" && r === void 0 ? { message: lr, code: n, details: s } : r === 0 ? { message: typeof (e == null ? void 0 : e.message) == "string" ? e.message : lr, code: n, status: r, details: s } : { message: n && zi[n] || wr, code: n, status: r, details: s };
1823
+ if (n || r && r >= 400) {
1824
+ const o = typeof (e == null ? void 0 : e.requestId) == "string" && e.requestId ? { requestId: e.requestId } : {};
1825
+ return n && Vo.has(n) && typeof (e == null ? void 0 : e.message) == "string" ? { message: e.message, code: n, status: r, details: s, ...o } : n === "unavailable" && r === void 0 ? { message: lr, code: n, details: s, ...o } : r === 0 ? { message: typeof (e == null ? void 0 : e.message) == "string" ? e.message : lr, code: n, status: r, details: s, ...o } : { message: n && zi[n] || wr, code: n, status: r, details: s, ...o };
1826
+ }
1825
1827
  const a = (e == null ? void 0 : e.name) ?? "";
1826
1828
  return a === "TypeError" && /fetch|network|load failed/i.test(String((e == null ? void 0 : e.message) ?? "")) ? (typeof navigator < "u" && navigator.onLine !== !1 && Mi(t instanceof Error ? t : new Error(String(t))), { message: lr }) : Zs[a] ? { message: Zs[a] } : t instanceof Error && a === "Error" && !(t instanceof ui) ? { message: t.message } : { message: wr };
1827
1829
  }
@@ -1848,11 +1850,11 @@ function Oi(t) {
1848
1850
  const o = !!t.token, l = Ie(() => async () => {
1849
1851
  const h = a.current;
1850
1852
  return (typeof h == "function" ? await h() : h) || void 0;
1851
- }, []), [c, u] = k(() => {
1853
+ }, []), [c, u] = v(() => {
1852
1854
  const h = t.token, N = typeof h == "function" ? h() : h;
1853
1855
  return typeof N == "string" && N ? N : null;
1854
1856
  });
1855
- E(() => {
1857
+ S(() => {
1856
1858
  if (!r) return;
1857
1859
  let h = !0;
1858
1860
  return l().then((N) => {
@@ -1870,7 +1872,7 @@ function Oi(t) {
1870
1872
  }, [M, s, r, t.id, l, e, n, c]);
1871
1873
  }
1872
1874
  function Zo(t, e) {
1873
- return e ? { ...t, cred: { media: e } } : t;
1875
+ return e ? { ...t, cred: { ...t.cred, media: e } } : t;
1874
1876
  }
1875
1877
  async function qo(t, e) {
1876
1878
  if (t.listen) {
@@ -1898,8 +1900,8 @@ async function qo(t, e) {
1898
1900
  };
1899
1901
  }
1900
1902
  function Ko(t, e) {
1901
- const [n, r] = k(null), [s, a] = k(!1), [o, l] = k(null), [c, u] = k(0);
1902
- return E(() => {
1903
+ const [n, r] = v(null), [s, a] = v(!1), [o, l] = v(null), [c, u] = v(0);
1904
+ return S(() => {
1903
1905
  let d = !0;
1904
1906
  return qo(t, e).then((M) => {
1905
1907
  d && (r(M), a(!1), l(null));
@@ -1913,8 +1915,8 @@ function Ko(t, e) {
1913
1915
  }, [t, e, c]), { source: n, gone: s, error: o, reload: () => u((d) => d + 1) };
1914
1916
  }
1915
1917
  function Jo(t, e) {
1916
- const [n, r] = k(null);
1917
- return E(() => {
1918
+ const [n, r] = v(null);
1919
+ return S(() => {
1918
1920
  if (!t.owner || !e) {
1919
1921
  r(null);
1920
1922
  return;
@@ -1947,8 +1949,8 @@ async function qs(t, e, n = {}) {
1947
1949
  }
1948
1950
  const cr = /* @__PURE__ */ new Map();
1949
1951
  function Ci() {
1950
- const t = Rt(), [e, n] = k(cr.get(t.origin) ?? null);
1951
- return E(() => {
1952
+ const t = Rt(), [e, n] = v(cr.get(t.origin) ?? null);
1953
+ return S(() => {
1952
1954
  cr.has(t.origin) || t.client.languages.list().then((r) => {
1953
1955
  cr.set(t.origin, r), n(r);
1954
1956
  }).catch(() => {
@@ -1956,8 +1958,8 @@ function Ci() {
1956
1958
  }, [t]), e;
1957
1959
  }
1958
1960
  function bi(t, e) {
1959
- const [n, r] = k(null), [s, a] = k(null), [o, l] = k(0);
1960
- return E(() => {
1961
+ const [n, r] = v(null), [s, a] = v(null), [o, l] = v(0);
1962
+ return S(() => {
1961
1963
  let c = !0;
1962
1964
  return t().then((u) => c && r(u)).catch((u) => c && a(It(u))), () => {
1963
1965
  c = !1;
@@ -1968,44 +1970,44 @@ const Xo = (t) => new Promise((e) => setTimeout(e, t)), el = 2500, tl = 72;
1968
1970
  function nl(t, e) {
1969
1971
  const n = Rt(), r = j(n);
1970
1972
  r.current = n;
1971
- const [s, a] = k(Vt), o = j(Vt()), l = j(null), c = j(e.lang ?? null), [u, d] = k(!1), [M, h] = k(null), [N, p] = k(!1), y = qe(() => {
1972
- const S = o.current;
1973
- a({ ...S });
1974
- }, []), v = j(e);
1975
- v.current = e, E(() => {
1973
+ const [s, a] = v(Vt), o = j(Vt()), l = j(null), c = j(e.lang ?? null), [u, d] = v(!1), [M, h] = v(null), [N, p] = v(!1), y = qe(() => {
1974
+ const A = o.current;
1975
+ a({ ...A });
1976
+ }, []), k = j(e);
1977
+ k.current = e, S(() => {
1976
1978
  if (!t) return;
1977
- let S = !0, T = 0;
1979
+ let A = !0, T = 0;
1978
1980
  o.current = Vt(), a(Vt()), p(!1);
1979
1981
  const _ = n.client;
1980
1982
  let O = o.current.state;
1981
1983
  const te = () => {
1982
1984
  var L, ie;
1983
1985
  const K = o.current.state;
1984
- K !== O && (O = K, (ie = (L = v.current).onState) == null || ie.call(L, K));
1986
+ K !== O && (O = K, (ie = (L = k.current).onState) == null || ie.call(L, K));
1985
1987
  };
1986
1988
  return (async () => {
1987
1989
  var K, L, ie, ne;
1988
- for (; S; ) {
1990
+ for (; A; ) {
1989
1991
  let G = null;
1990
1992
  try {
1991
1993
  const pe = c.current;
1992
- if (G = await _.recordings.subscribe(t, { lang: pe ?? void 0, ...n.readAs, asOwner: n.owner, voice: e.voice ?? void 0 }), !S) {
1994
+ if (G = await _.recordings.subscribe(t, { lang: pe ?? void 0, ...n.readAs, asOwner: n.owner, voice: e.voice ?? void 0 }), !A) {
1993
1995
  G.close();
1994
1996
  return;
1995
1997
  }
1996
1998
  T = 0, l.current = G, c.current !== pe && G.setLanguage(c.current), d(!0), h(null), o.current = or(G.snapshot, o.current), y(), te();
1997
1999
  for await (const le of G) {
1998
- if (!S) break;
2000
+ if (!A) break;
1999
2001
  if (le.type === "snapshot")
2000
2002
  o.current = or(le.snapshot, le.reason === "gap" ? o.current : Vt()), y(), te();
2001
2003
  else if (le.type === "frame") {
2002
2004
  Do(o.current, le.frame);
2003
2005
  const Te = le.frame;
2004
- Te.type === "recording.state" && (O = o.current.state, (L = (K = v.current).onState) == null || L.call(K, Te.state, Te.reason)), (ne = (ie = v.current).onFrame) == null || ne.call(ie, Te), y();
2006
+ Te.type === "recording.state" && (O = o.current.state, (L = (K = k.current).onState) == null || L.call(K, Te.state, Te.reason)), (ne = (ie = k.current).onFrame) == null || ne.call(ie, Te), y();
2005
2007
  } else le.type === "closed" && d(!1);
2006
2008
  }
2007
2009
  } catch (pe) {
2008
- if (!S) return;
2010
+ if (!A) return;
2009
2011
  const le = It(pe);
2010
2012
  if (le.code === "not_found" || le.status === 404) {
2011
2013
  p(!0), h(le);
@@ -2033,40 +2035,40 @@ function nl(t, e) {
2033
2035
  l.current === G && (l.current = null), d(!1);
2034
2036
  }
2035
2037
  const J = o.current.state;
2036
- if (!S || J === "ended" || J === "finalized" || J === "processing") return;
2038
+ if (!A || J === "ended" || J === "finalized" || J === "processing") return;
2037
2039
  T += 1, await Xo(Math.min(15e3, 1e3 * 2 ** Math.min(T, 4)));
2038
2040
  }
2039
2041
  })(), () => {
2040
2042
  var K;
2041
- S = !1, (K = l.current) == null || K.close(), l.current = null, d(!1);
2043
+ A = !1, (K = l.current) == null || K.close(), l.current = null, d(!1);
2042
2044
  };
2043
2045
  }, [t, n, e.voice]);
2044
- const [m, f] = k(!1), [I, C] = k(null), D = j(0), [B, Y] = k(null), X = qe((S) => {
2046
+ const [m, f] = v(!1), [I, C] = v(null), D = j(0), [B, Y] = v(null), ee = qe((A) => {
2045
2047
  var te;
2046
- if (c.current = S, (te = l.current) == null || te.setLanguage(S), !t) return;
2048
+ if (c.current = A, (te = l.current) == null || te.setLanguage(A), !t) return;
2047
2049
  const T = r.current.client, _ = ++D.current;
2048
2050
  f(!0), C(null);
2049
- const O = (K) => T.recordings.transcript(t, { lang: S ?? void 0, ...r.current.readAs, asListener: !r.current.owner }).then((L) => {
2050
- _ === D.current && (o.current = or(L, o.current), Y(S), y(), L.translationPending && K > 0 && window.setTimeout(() => {
2051
+ const O = (K) => T.recordings.transcript(t, { lang: A ?? void 0, ...r.current.readAs, asListener: !r.current.owner }).then((L) => {
2052
+ _ === D.current && (o.current = or(L, o.current), Y(A), y(), L.translationPending && K > 0 && window.setTimeout(() => {
2051
2053
  _ === D.current && O(K - 1).catch(() => {
2052
2054
  });
2053
2055
  }, el));
2054
2056
  });
2055
2057
  O(tl).catch(() => {
2056
- _ === D.current && S && C(S);
2058
+ _ === D.current && A && C(A);
2057
2059
  }).finally(() => {
2058
2060
  _ === D.current && f(!1);
2059
2061
  });
2060
- }, [y, t]), z = qe((S, T) => {
2062
+ }, [y, t]), z = qe((A, T) => {
2061
2063
  const _ = o.current;
2062
2064
  let O = !1;
2063
2065
  for (const [te, K] of Object.entries(T)) {
2064
2066
  const L = _.sentences.get(Number(te));
2065
- L && (L.translations = { ...L.translations, [S]: K }, O = !0);
2067
+ L && (L.translations = { ...L.translations, [A]: K }, O = !0);
2066
2068
  }
2067
2069
  O && y();
2068
2070
  }, [y]), F = qe(() => h(null), []);
2069
- return { model: s, connected: u, error: M, notFound: N, clearError: F, setLanguage: X, mergeTranslations: z, translating: m, translateFailed: I, shownLang: B };
2071
+ return { model: s, connected: u, error: M, notFound: N, clearError: F, setLanguage: ee, mergeTranslations: z, translating: m, translateFailed: I, shownLang: B };
2070
2072
  }
2071
2073
  const Ks = {
2072
2074
  English: { vcFor: "Voice for", vcMute: "Mute", vcUnmute: "Unmute", vcMuted: "MUTED", vcShared: "Also used by", vcUsedBy: "Used by", vcUnknownSpk: "Unknown", vcUse: "Use this voice", vcGetting: "Downloading…", vcSample: "Here’s how it sounds.", vcPreview: "PREVIEW", vcMale: "Male", vcFemale: "Female", vcSynth: "SYNTHETIC", origAudio: "ORIGINAL AUDIO", vcCloned: "VOICES", vcBadge: "CLONED", vcNone: "TEXT ONLY", vcNoVoice: "No voice for ", vcSheet: "VOICE", vcNeutral: "SYNTHETIC VOICE", vcWarm: "SYNTHETIC VOICE", searchPlaceholder: "Search this broadcast", noise: "Audio unclear", newLines: "new", live: "LIVE", ended: "ENDED", waiting: "WAITING", corrected: "CORRECTED", hostLine: "Hosted by Marcus Reed · 4 speakers", langLabel: "LANGUAGE", langCount: "100+ languages", read: "Read", listen: "Listen", watch: "Watch", waitTitle: "The broadcast hasn’t started yet", waitBody: "The transcript appears here as soon as the host starts speaking.", english: "ENGLISH", playing: "Playing the live audio", ready: "Tap to start audio", readyNote: "Set your volume first", voiceMeta: "ORIGINAL AUDIO", voice: "Voice", sheetTitle: "APP LANGUAGE", done: "Done", search: "Search 100+ languages", sheetNote: "Follow along in your language.", moreLangs: "more", confTitle: "Some words weren't heard clearly", confBody: "The transcript marks words the model is unsure about with a dashed underline. The words keep their colour, so only the underline tells you where to look.", confMid: "Slightly unsure — probably right", confHigh: "Low confidence — may be wrong", settings: "BROADCAST", setOrig: "Show original language", setTheme: "Appearance", light: "Light", dark: "Dark", setConf: "Show uncertain words", setConfHint1: "Colours words the model is unsure about — ", setConfMid: "amber", setConfSep: " or ", setConfLow: "red", setConfHint2: "", behindLive: "TRANSLATION LATENCY", behindNote: "How far the translation trails the speaker right now.", shareLabel: "LIVE TRANSLATION LINK", copy: "Copy", copied: "Copied" },
@@ -2184,28 +2186,28 @@ function dr(t) {
2184
2186
  function Ml(t, e, n = 0) {
2185
2187
  const r = j(() => {
2186
2188
  });
2187
- E(() => {
2189
+ S(() => {
2188
2190
  r.current();
2189
- }, [n]), E(() => {
2191
+ }, [n]), S(() => {
2190
2192
  const s = t.current, a = e.current;
2191
2193
  if (!s || !a) return;
2192
2194
  const o = () => {
2193
2195
  let Y = s.parentElement;
2194
- for (let X = 0; X < 4 && Y; X++) {
2196
+ for (let ee = 0; ee < 4 && Y; ee++) {
2195
2197
  const z = Y.querySelector("[data-transport]");
2196
2198
  if (z) return z;
2197
2199
  Y = Y.parentElement;
2198
2200
  }
2199
2201
  return null;
2200
2202
  }, l = () => {
2201
- const Y = o(), X = Y ? Y.offsetHeight : 0, z = s.clientHeight - X - 36, F = s.scrollHeight - s.clientHeight, S = z > 0 ? Math.max(30, Math.round(z * (s.clientHeight - X) / s.scrollHeight)) : 0;
2202
- return { vis: z, max: F, size: S };
2203
+ const Y = o(), ee = Y ? Y.offsetHeight : 0, z = s.clientHeight - ee - 36, F = s.scrollHeight - s.clientHeight, A = z > 0 ? Math.max(30, Math.round(z * (s.clientHeight - ee) / s.scrollHeight)) : 0;
2204
+ return { vis: z, max: F, size: A };
2203
2205
  };
2204
2206
  let c = -1, u = null, d = !1, M = 0, h = 0;
2205
2207
  const N = () => {
2206
2208
  const Y = o();
2207
2209
  if (!Y) return;
2208
- const X = parseFloat(s.dataset.glassExtra || "0") || 0, z = Y.offsetHeight + 14 + X;
2210
+ const ee = parseFloat(s.dataset.glassExtra || "0") || 0, z = Y.offsetHeight + 14 + ee;
2209
2211
  if (z === c) return;
2210
2212
  c = z;
2211
2213
  const F = s.scrollHeight - s.scrollTop - s.clientHeight < 40;
@@ -2215,11 +2217,11 @@ function Ml(t, e, n = 0) {
2215
2217
  d || (a.style.opacity = "0");
2216
2218
  }, 900);
2217
2219
  };
2218
- let y = null, v = null;
2220
+ let y = null, k = null;
2219
2221
  const m = (Y) => {
2220
2222
  N();
2221
- const X = o();
2222
- X && X !== v && y && (v = X, y.observe(X));
2223
+ const ee = o();
2224
+ ee && ee !== k && y && (k = ee, y.observe(ee));
2223
2225
  const z = l();
2224
2226
  if (z.vis < 60 || z.max < 6) {
2225
2227
  a.style.opacity = "0", a.style.pointerEvents = "none";
@@ -2229,12 +2231,12 @@ function Ml(t, e, n = 0) {
2229
2231
  }, f = parseFloat(getComputedStyle(s).paddingRight) || 0;
2230
2232
  a.style.right = (f >= 12 ? -(f - 6) : 2) + "px";
2231
2233
  const I = () => m(!0), C = (Y) => {
2232
- const X = l();
2233
- X.vis - X.size <= 0 || (Y.preventDefault(), Y.stopPropagation(), a.setPointerCapture(Y.pointerId), d = !0, M = Y.clientY, h = s.scrollTop, a.style.cursor = "grabbing", p());
2234
+ const ee = l();
2235
+ ee.vis - ee.size <= 0 || (Y.preventDefault(), Y.stopPropagation(), a.setPointerCapture(Y.pointerId), d = !0, M = Y.clientY, h = s.scrollTop, a.style.cursor = "grabbing", p());
2234
2236
  }, D = (Y) => {
2235
2237
  if (!d) return;
2236
- const X = l();
2237
- s.scrollTop = h + (Y.clientY - M) / (X.vis - X.size) * X.max, p();
2238
+ const ee = l();
2239
+ s.scrollTop = h + (Y.clientY - M) / (ee.vis - ee.size) * ee.max, p();
2238
2240
  }, B = () => {
2239
2241
  d && (d = !1, a.style.cursor = "grab", p());
2240
2242
  };
@@ -2249,26 +2251,39 @@ function gl({ thumbRef: t }) {
2249
2251
  }
2250
2252
  function fl({ error: t, onClose: e }) {
2251
2253
  const n = j(e);
2252
- if (n.current = e, E(() => {
2253
- if (!t) return;
2254
- const s = setTimeout(() => n.current(), 8e3);
2255
- return () => clearTimeout(s);
2256
- }, [t]), !t) return null;
2257
- const r = t.code === "insufficient_credit" || t.code === "quota_exceeded" || t.status === 402;
2258
- return /* @__PURE__ */ g("div", { className: "toast", role: "alert", children: [
2259
- /* @__PURE__ */ i(oe, { d: ee.warn, size: 16, style: { color: "var(--conf-low)", flex: "none" } }),
2254
+ n.current = e;
2255
+ const [r, s] = v(!1), [a, o] = v(!1), l = j();
2256
+ if (S(() => {
2257
+ o(!1), s(!1), window.clearTimeout(l.current);
2258
+ }, [t]), S(() => () => window.clearTimeout(l.current), []), S(() => {
2259
+ if (!t || r || a) return;
2260
+ const d = setTimeout(() => n.current(), 10500);
2261
+ return () => clearTimeout(d);
2262
+ }, [t, r, a]), !t) return null;
2263
+ const c = () => {
2264
+ var M;
2265
+ const d = t.requestId ? `${t.message}
2266
+ Request id: ${t.requestId}` : t.message;
2267
+ (M = navigator.clipboard) == null || M.writeText(d).then(() => {
2268
+ o(!0), window.clearTimeout(l.current), l.current = window.setTimeout(() => o(!1), 1800);
2269
+ }, () => {
2270
+ });
2271
+ }, u = t.code === "insufficient_credit" || t.code === "quota_exceeded" || t.status === 402;
2272
+ return /* @__PURE__ */ g("div", { className: "toast", role: "alert", onPointerEnter: () => s(!0), onPointerLeave: () => s(!1), children: [
2273
+ /* @__PURE__ */ i(oe, { d: X.warn, size: 16, style: { color: "var(--conf-low)", flex: "none" } }),
2260
2274
  /* @__PURE__ */ g("span", { style: { flex: 1 }, children: [
2261
2275
  t.message,
2262
- r && /* @__PURE__ */ g(be, { children: [
2276
+ u && /* @__PURE__ */ g(be, { children: [
2263
2277
  " ",
2264
2278
  /* @__PURE__ */ i("a", { href: "https://app.vocalstack.com/billing", target: "_blank", rel: "noopener", className: "dev-link", style: { fontSize: "inherit", fontWeight: 600, whiteSpace: "nowrap" }, children: "Add credit" })
2265
2279
  ] })
2266
2280
  ] }),
2267
- /* @__PURE__ */ i("button", { type: "button", onClick: e, "aria-label": "Dismiss", children: /* @__PURE__ */ i(oe, { d: ee.close, size: 14 }) })
2281
+ /* @__PURE__ */ i("button", { type: "button", onClick: c, "aria-label": a ? "Copied" : "Copy error", title: a ? "Copied" : "Copy error", children: /* @__PURE__ */ i(oe, { d: a ? X.check : X.copy, size: 14 }) }),
2282
+ /* @__PURE__ */ i("button", { type: "button", onClick: e, "aria-label": "Dismiss", children: /* @__PURE__ */ i(oe, { d: X.close, size: 14 }) })
2268
2283
  ] });
2269
2284
  }
2270
2285
  function Ei({ color: t }) {
2271
- return /* @__PURE__ */ i("span", { title: "Cloned voice", style: { flex: "none", display: "inline-flex" }, children: /* @__PURE__ */ i(oe, { d: ee.voiceClone, size: 13, sw: 1.7, stroke: t }) });
2286
+ return /* @__PURE__ */ i("span", { title: "Cloned voice", style: { flex: "none", display: "inline-flex" }, children: /* @__PURE__ */ i(oe, { d: X.voiceClone, size: 13, sw: 1.7, stroke: t }) });
2272
2287
  }
2273
2288
  function Mu({ chip: t, note: e, scrub: n, mute: r, voice: s, prev: a, play: o, next: l }) {
2274
2289
  return /* @__PURE__ */ g("div", { className: "vs-tt", children: [
@@ -2288,7 +2303,7 @@ function Mu({ chip: t, note: e, scrub: n, mute: r, voice: s, prev: a, play: o, n
2288
2303
  ] });
2289
2304
  }
2290
2305
  function pl({ index: t, total: e, atLabel: n, durLabel: r, stepLabel: s, onSeek: a, onSeekFrac: o, onScrubStart: l, onScrubEnd: c, frac: u, glideMs: d = 260 }) {
2291
- const M = j(null), h = j(!1), [N, p] = k(null), y = Math.max(1, e), v = N ?? u, m = v != null ? Math.min(100, Math.max(0, v * 100)) : t / Math.max(1, y - 1) * 100, f = u != null && d > 0 && N == null ? `width ${d}ms linear, left ${d}ms linear` : "none", I = (D) => {
2306
+ const M = j(null), h = j(!1), [N, p] = v(null), y = Math.max(1, e), k = N ?? u, m = k != null ? Math.min(100, Math.max(0, k * 100)) : t / Math.max(1, y - 1) * 100, f = u != null && d > 0 && N == null ? `width ${d}ms linear, left ${d}ms linear` : "none", I = (D) => {
2292
2307
  var z;
2293
2308
  const B = (z = M.current) == null ? void 0 : z.getBoundingClientRect();
2294
2309
  if (!B) return;
@@ -2297,8 +2312,8 @@ function pl({ index: t, total: e, atLabel: n, durLabel: r, stepLabel: s, onSeek:
2297
2312
  p(Y), o(Y);
2298
2313
  return;
2299
2314
  }
2300
- const X = Math.round(Y * (y - 1));
2301
- X !== t && a(X);
2315
+ const ee = Math.round(Y * (y - 1));
2316
+ ee !== t && a(ee);
2302
2317
  }, C = () => {
2303
2318
  h.current && (h.current = !1, p(null), c == null || c());
2304
2319
  };
@@ -2343,7 +2358,7 @@ function ml({ f: t, desk: e, onOpen: n }) {
2343
2358
  const r = (s, a, o) => /* @__PURE__ */ g("span", { role: "button", title: "Open this line in Fix", className: "badge badge--fix", style: { marginLeft: o ? "auto" : 0 }, onClick: (l) => {
2344
2359
  l.stopPropagation(), n == null || n();
2345
2360
  }, children: [
2346
- /* @__PURE__ */ i(oe, { d: ee.pencilFix, size: e ? 10 : 9, sw: 2 }),
2361
+ /* @__PURE__ */ i(oe, { d: X.pencilFix, size: e ? 10 : 9, sw: 2 }),
2347
2362
  s,
2348
2363
  a > 0 && /* @__PURE__ */ i("span", { className: "badge__n", children: a })
2349
2364
  ] }, s);
@@ -2353,21 +2368,21 @@ function ml({ f: t, desk: e, onOpen: n }) {
2353
2368
  ] });
2354
2369
  }
2355
2370
  function yl({ onOpen: t, alone: e }) {
2356
- const [n, r] = k(!1);
2371
+ const [n, r] = v(!1);
2357
2372
  return /* @__PURE__ */ g("span", { role: "button", title: "Fix this line", className: `badge badge--pen${n ? " is-over" : ""}`, style: { marginLeft: e ? "auto" : 0 }, onMouseEnter: () => r(!0), onMouseLeave: () => r(!1), onClick: (s) => {
2358
2373
  s.stopPropagation(), t();
2359
2374
  }, children: [
2360
- /* @__PURE__ */ i(oe, { d: ee.pencilFix, size: 11, sw: 2 }),
2375
+ /* @__PURE__ */ i(oe, { d: X.pencilFix, size: 11, sw: 2 }),
2361
2376
  n && "FIX"
2362
2377
  ] });
2363
2378
  }
2364
2379
  function Tl(t, e, n, r) {
2365
- const s = Rt(), [a, o] = k([]), [l, c] = k(0), u = j(/* @__PURE__ */ new Set()), d = j(!1), M = Ie(() => new Map(n.filter((N) => N.sentenceId != null).map((N) => [N.sentenceId, N])), [n]);
2366
- E(() => {
2380
+ const s = Rt(), [a, o] = v([]), [l, c] = v(0), u = j(/* @__PURE__ */ new Set()), d = j(!1), M = Ie(() => new Map(n.filter((N) => N.sentenceId != null).map((N) => [N.sentenceId, N])), [n]);
2381
+ S(() => {
2367
2382
  u.current = /* @__PURE__ */ new Set();
2368
2383
  }, [t, e]);
2369
2384
  const h = qe((N) => o(N), []);
2370
- return E(() => {
2385
+ return S(() => {
2371
2386
  if (!t || !e || !a.length || d.current) return;
2372
2387
  const N = a.filter((p) => {
2373
2388
  const y = M.get(p);
@@ -2381,7 +2396,7 @@ function Tl(t, e, n, r) {
2381
2396
  }).catch((p) => {
2382
2397
  const y = p == null ? void 0 : p.status;
2383
2398
  if (!(y && y >= 400 && y < 500))
2384
- for (const v of N) u.current.delete(`${e}:${v}`);
2399
+ for (const k of N) u.current.delete(`${e}:${k}`);
2385
2400
  }).finally(() => {
2386
2401
  d.current = !1, c((p) => p + 1);
2387
2402
  });
@@ -2479,7 +2494,7 @@ function kl({ roster: t, selected: e, onSelect: n, noClone: r, building: s, shor
2479
2494
  /* @__PURE__ */ i("span", { style: { fontSize: 12.5, fontWeight: 500, color: M ? "var(--ink-96)" : "var(--ink-62)", whiteSpace: "nowrap" }, children: d.name }),
2480
2495
  d.hasVoice && !h && /* @__PURE__ */ i(Ei, { color: d.fg ?? (M ? "var(--ink-62)" : "var(--ink-45)") }),
2481
2496
  h && /* @__PURE__ */ i("span", { title: h, "aria-label": h, style: { flex: "none", width: 15, height: 15, marginRight: -2, borderRadius: "50%", background: "#c27c00", color: "#fff", font: "900 10.5px/1 system-ui, sans-serif", display: "flex", alignItems: "center", justifyContent: "center" }, children: "!" }),
2482
- y && /* @__PURE__ */ i("span", { title: "Not enough audio to clone", "aria-label": "Not enough audio to clone", style: { flex: "none", display: "flex", marginRight: -2, color: M ? "var(--ink-45)" : "var(--ink-35)" }, children: /* @__PURE__ */ i(oe, { d: ee.micOff, size: 13, sw: 1.7 }) }),
2497
+ y && /* @__PURE__ */ i("span", { title: "Not enough audio to clone", "aria-label": "Not enough audio to clone", style: { flex: "none", display: "flex", marginRight: -2, color: M ? "var(--ink-45)" : "var(--ink-35)" }, children: /* @__PURE__ */ i(oe, { d: X.micOff, size: 13, sw: 1.7 }) }),
2483
2498
  (p || N) && /* @__PURE__ */ i("span", { title: N ? "Cloning this voice…" : "No voice clone yet", "aria-label": N ? "Cloning this voice" : "No voice clone yet", style: { flex: "none", width: 10, height: 10, marginRight: -2, display: "flex", alignItems: "center", justifyContent: "center" }, children: N ? /* @__PURE__ */ i(ut, { size: 10, color: "var(--brand)", track: "var(--fill-10)", sw: 1.6 }) : /* @__PURE__ */ i("span", { style: { width: 7, height: 7, borderRadius: "50%", background: "var(--brand)" } }) })
2484
2499
  ]
2485
2500
  },
@@ -2488,18 +2503,18 @@ function kl({ roster: t, selected: e, onSelect: n, noClone: r, building: s, shor
2488
2503
  }) }) : null;
2489
2504
  }
2490
2505
  function jl({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s = null, dlId: a = null, onPick: o, onAdd: l, onUse: c, usedBy: u, foldKey: d, foldFor: M = null, problem: h, noClone: N = null, t: p }) {
2491
- const y = Ie(() => Ll(e, p), [e, p]), [v, m] = k({});
2492
- E(() => {
2506
+ const y = Ie(() => Ll(e, p), [e, p]), [k, m] = v({});
2507
+ S(() => {
2493
2508
  m({});
2494
2509
  }, [d, M]);
2495
2510
  const f = (D) => D === p.vcMale.toUpperCase() || D === p.vcFemale.toUpperCase(), I = (D) => {
2496
2511
  if (D === p.vcSheet) return !0;
2497
- const B = v[D];
2512
+ const B = k[D];
2498
2513
  return B != null ? !B : !M || !f(D) ? !0 : D === (M === "female" ? p.vcFemale : p.vcMale).toUpperCase();
2499
2514
  }, C = !!r && r !== n;
2500
2515
  return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column" }, children: [
2501
2516
  h && /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "flex-start", gap: 9, padding: "10px 11px", marginBottom: 10, borderRadius: 11, background: "var(--conf-low-soft)" }, children: [
2502
- /* @__PURE__ */ i(oe, { d: ee.warnTri, size: 15, sw: 1.7, style: { flex: "none", marginTop: 1, color: "var(--conf-low)" } }),
2517
+ /* @__PURE__ */ i(oe, { d: X.warnTri, size: 15, sw: 1.7, style: { flex: "none", marginTop: 1, color: "var(--conf-low)" } }),
2503
2518
  /* @__PURE__ */ i("span", { style: { flex: 1, minWidth: 0, fontSize: 12.5, fontWeight: 300, lineHeight: 1.45, color: "var(--ink-80)", textWrap: "pretty" }, children: h }),
2504
2519
  /* @__PURE__ */ i("span", { style: { flex: "none", marginTop: -1 }, children: /* @__PURE__ */ i(Ya, { value: h, label: "Copy this error" }) })
2505
2520
  ] }),
@@ -2509,15 +2524,15 @@ function jl({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
2509
2524
  /* @__PURE__ */ g("div", { role: N.action ? "button" : "status", tabIndex: N.action ? 0 : void 0, title: N.tip, onClick: N.action, onKeyDown: N.action ? (D) => {
2510
2525
  (D.key === "Enter" || D.key === " ") && (D.preventDefault(), N.action());
2511
2526
  } : void 0, style: { display: "flex", alignItems: "center", gap: 11, padding: "11px 8px", margin: "0 -6px", borderRadius: 10, cursor: N.action ? "pointer" : "default" }, children: [
2512
- /* @__PURE__ */ i("span", { style: { flex: "none", width: 32, height: 32, boxSizing: "border-box", borderRadius: "50%", border: N.busy ? 0 : N.action ? "1.5px solid var(--brand)" : "1.5px dashed var(--fill-20)", display: "flex", alignItems: "center", justifyContent: "center" }, children: N.busy ? /* @__PURE__ */ i("span", { style: { width: 16, height: 16, borderRadius: "50%", border: "2px solid var(--fill-10)", borderTopColor: "var(--brand)", animation: "vs-spin .7s linear infinite" } }) : /* @__PURE__ */ i(oe, { d: N.action ? ee.plus : ee.mic, size: 15, sw: N.action ? 2 : 1.6, style: { color: N.action ? "var(--brand)" : "var(--ink-45)" } }) }),
2527
+ /* @__PURE__ */ i("span", { style: { flex: "none", width: 32, height: 32, boxSizing: "border-box", borderRadius: "50%", border: N.busy ? 0 : N.action ? "1.5px solid var(--brand)" : "1.5px dashed var(--fill-20)", display: "flex", alignItems: "center", justifyContent: "center" }, children: N.busy ? /* @__PURE__ */ i("span", { style: { width: 16, height: 16, borderRadius: "50%", border: "2px solid var(--fill-10)", borderTopColor: "var(--brand)", animation: "vs-spin .7s linear infinite" } }) : /* @__PURE__ */ i(oe, { d: N.action ? X.plus : X.mic, size: 15, sw: N.action ? 2 : 1.6, style: { color: N.action ? "var(--brand)" : "var(--ink-45)" } }) }),
2513
2528
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
2514
2529
  /* @__PURE__ */ i("div", { style: { fontSize: 14.5, fontWeight: N.action ? 500 : 400, color: N.action ? "var(--brand)" : "var(--ink-62)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: N.title }),
2515
2530
  /* @__PURE__ */ i("div", { style: { fontSize: 12, fontWeight: 300, color: "var(--ink-62)", marginTop: 2, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: N.sub })
2516
2531
  ] })
2517
2532
  ] })
2518
2533
  ] }),
2519
- y.map(({ v: D, headOn: B, head: Y, headCount: X, rule: z }, F) => {
2520
- const S = wl(D), T = a === D.id, _ = I(Y), O = (u == null ? void 0 : u(D)) ?? null;
2534
+ y.map(({ v: D, headOn: B, head: Y, headCount: ee, rule: z }, F) => {
2535
+ const A = wl(D), T = a === D.id, _ = I(Y), O = (u == null ? void 0 : u(D)) ?? null;
2521
2536
  return /* @__PURE__ */ g(ja, { children: [
2522
2537
  B && Y === p.vcSheet && /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", padding: "14px 2px 6px", borderTop: F === 0 && !N ? "0" : "1px solid var(--hair)", userSelect: "none" }, children: /* @__PURE__ */ i("span", { style: { font: "600 9px var(--vs-font-mono)", letterSpacing: ".13em", color: "var(--ink-62)" }, children: Y }) }),
2523
2538
  B && Y !== p.vcSheet && /* @__PURE__ */ g(
@@ -2531,9 +2546,9 @@ function jl({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
2531
2546
  "aria-expanded": _,
2532
2547
  style: { width: "100%", textAlign: "left", font: "inherit", display: "flex", alignItems: "center", gap: 7, padding: _ ? "14px 2px 6px" : "14px 2px 14px", border: 0, borderTop: F === 0 && !N ? "0" : "1px solid var(--hair)", background: "transparent", cursor: "pointer", userSelect: "none" },
2533
2548
  children: [
2534
- /* @__PURE__ */ i(oe, { d: ee.chevronDown, size: 12, sw: 2.4, style: { flex: "none", color: "var(--ink-45)", transform: `rotate(${_ ? "0deg" : "-90deg"})`, transition: "transform .18s ease" } }),
2549
+ /* @__PURE__ */ i(oe, { d: X.chevronDown, size: 12, sw: 2.4, style: { flex: "none", color: "var(--ink-45)", transform: `rotate(${_ ? "0deg" : "-90deg"})`, transition: "transform .18s ease" } }),
2535
2550
  /* @__PURE__ */ i("span", { style: { font: "600 9px var(--vs-font-mono)", letterSpacing: ".13em", color: "var(--ink-62)" }, children: Y }),
2536
- /* @__PURE__ */ i("span", { style: { font: "600 9px var(--vs-font-mono)", color: "var(--ink-62)" }, children: X })
2551
+ /* @__PURE__ */ i("span", { style: { font: "600 9px var(--vs-font-mono)", color: "var(--ink-62)" }, children: ee })
2537
2552
  ]
2538
2553
  }
2539
2554
  ),
@@ -2550,23 +2565,23 @@ function jl({ cast: t, voices: e, currentId: n, armedId: r = null, sampleId: s =
2550
2565
  /* @__PURE__ */ i("span", { title: T ? "Downloading this voice" : void 0, style: { flex: "none", width: 32, height: 32, borderRadius: "50%", background: T ? "transparent" : D.cloned ? "var(--brand-soft)" : "var(--fill-06)", display: "flex", alignItems: "center", justifyContent: "center" }, children: T ? /* @__PURE__ */ i("span", { style: { width: 16, height: 16, borderRadius: "50%", border: "2px solid var(--fill-10)", borderTopColor: "var(--brand)", animation: "vs-spin .7s linear infinite" } }) : s === D.id ? /* @__PURE__ */ g("span", { className: "vcplay", children: [
2551
2566
  /* @__PURE__ */ i("span", { className: "vcplay__eq", children: /* @__PURE__ */ i(zl, { height: 13, width: 2.5 }) }),
2552
2567
  /* @__PURE__ */ i("span", { className: "vcplay__stop", children: /* @__PURE__ */ i(Aa, { size: 11 }) })
2553
- ] }) : /* @__PURE__ */ i(oe, { d: D.cloned ? ee.voiceClone : D.gender === "female" ? ee.venus : D.gender === "male" ? ee.mars : ee.mic, size: 15, sw: 1.6, style: { color: D.cloned ? "var(--brand)" : "var(--ink-55)" } }) }),
2568
+ ] }) : /* @__PURE__ */ i(oe, { d: D.cloned ? X.voiceClone : D.gender === "female" ? X.venus : D.gender === "male" ? X.mars : X.mic, size: 15, sw: 1.6, style: { color: D.cloned ? "var(--brand)" : "var(--ink-55)" } }) }),
2554
2569
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
2555
2570
  /* @__PURE__ */ i("div", { style: { display: "flex", alignItems: "center", gap: 7, minWidth: 0 }, children: /* @__PURE__ */ i("span", { style: { minWidth: 0, fontSize: 14.5, fontWeight: D.id === n ? 600 : 400, color: "var(--ink-96)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: D.name }) }),
2556
- S && /* @__PURE__ */ i("div", { style: { fontSize: 12, fontWeight: 300, color: "var(--ink-62)", marginTop: 2, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: S }),
2571
+ A && /* @__PURE__ */ i("div", { style: { fontSize: 12, fontWeight: 300, color: "var(--ink-62)", marginTop: 2, whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: A }),
2557
2572
  O && (D.id === n ? /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 5, marginTop: 3, minWidth: 0 }, children: [
2558
- /* @__PURE__ */ i(oe, { d: ee.notice, size: 12, sw: 1.7, style: { flex: "none", color: "var(--conf-mid)" } }),
2573
+ /* @__PURE__ */ i(oe, { d: X.notice, size: 12, sw: 1.7, style: { flex: "none", color: "var(--conf-mid)" } }),
2559
2574
  /* @__PURE__ */ i("span", { style: { minWidth: 0, fontSize: 11, fontWeight: 300, color: "var(--conf-mid)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: `${p.vcShared} ${O}` })
2560
2575
  ] }) : /* @__PURE__ */ i("div", { style: { marginTop: 2, minWidth: 0, fontSize: 12, fontWeight: 300, color: "var(--ink-50)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: `${p.vcUsedBy} ${O}` }))
2561
2576
  ] }),
2562
2577
  /* @__PURE__ */ g("div", { style: { flex: "none", width: D.live ? D.id === n ? 18 : 0 : 42, overflow: "hidden", display: "flex", alignItems: "center", justifyContent: "flex-end", gap: 6 }, children: [
2563
2578
  /* @__PURE__ */ i("span", { style: { flex: "none", width: 18, height: 18 } }),
2564
- /* @__PURE__ */ i("span", { style: { flex: "none", width: 18, height: 18, display: "flex", alignItems: "center", justifyContent: "center" }, children: D.id === n && /* @__PURE__ */ i(oe, { d: ee.check, size: 17, sw: 2.2, style: { flex: "none", color: "var(--brand)" } }) })
2579
+ /* @__PURE__ */ i("span", { style: { flex: "none", width: 18, height: 18, display: "flex", alignItems: "center", justifyContent: "center" }, children: D.id === n && /* @__PURE__ */ i(oe, { d: X.check, size: 17, sw: 2.2, style: { flex: "none", color: "var(--brand)" } }) })
2565
2580
  ] }),
2566
2581
  (D.live || D.cloned && D.library === !1 && !D.auto && !!l) && /* @__PURE__ */ g("span", { className: "gvadd", role: "button", title: D.live ? `Save ${D.name}’s voice from this session` : `Add ${D.name} to My voices`, onClick: l ? (te) => {
2567
2582
  te.stopPropagation(), l(D);
2568
2583
  } : void 0, children: [
2569
- /* @__PURE__ */ i(oe, { d: ee.plus, size: 14, sw: 2 }),
2584
+ /* @__PURE__ */ i(oe, { d: X.plus, size: 14, sw: 2 }),
2570
2585
  "Add"
2571
2586
  ] })
2572
2587
  ]
@@ -2586,8 +2601,8 @@ function zl({ height: t, width: e = 2 }) {
2586
2601
  ] });
2587
2602
  }
2588
2603
  const Il = /* @__PURE__ */ g("span", { style: { display: "inline-flex", alignItems: "center", gap: 3 }, children: [
2589
- /* @__PURE__ */ i(oe, { d: ee.langAuto, size: 19, sw: 1.7, style: { color: "var(--ink-62)", display: "block" } }),
2590
- /* @__PURE__ */ i(oe, { d: ee.globe, size: 18, sw: 1.6, style: { color: "var(--ink-62)", display: "block" } })
2604
+ /* @__PURE__ */ i(oe, { d: X.langAuto, size: 19, sw: 1.7, style: { color: "var(--ink-62)", display: "block" } }),
2605
+ /* @__PURE__ */ i(oe, { d: X.globe, size: 18, sw: 1.6, style: { color: "var(--ink-62)", display: "block" } })
2591
2606
  ] });
2592
2607
  function vr(t, e) {
2593
2608
  const n = e ? t == null ? void 0 : t.languages.find((r) => r.code === e) : null;
@@ -2615,16 +2630,16 @@ function bl({ recordingId: t, lang: e, ended: n, cred: r, pickedVoice: s, senten
2615
2630
  }, [t, e, o, n]), u = Ie(
2616
2631
  () => l && l.lang === e && l.recordingId === t ? l.rows : [],
2617
2632
  [l, e, t]
2618
- ), d = Ie(() => mi(u, s), [u, s]), M = d ? d.voiceKey || null : s, [h, N] = k(null), [p, y] = k(null), v = j(/* @__PURE__ */ new Set()), m = `${t ?? ""}|${e ?? ""}|${M ?? ""}`, f = qe(async (K, L) => {
2633
+ ), d = Ie(() => mi(u, s), [u, s]), M = d ? d.voiceKey || null : s, [h, N] = v(null), [p, y] = v(null), k = j(/* @__PURE__ */ new Set()), m = `${t ?? ""}|${e ?? ""}|${M ?? ""}`, f = qe(async (K, L) => {
2619
2634
  if (!t || !e || !n) return;
2620
2635
  const ie = L != null && L.size ? null : ei(K), ne = L != null && L.size ? L : ie, G = ne && ne.size ? Object.fromEntries([...ne].map(([Te, je]) => [String(Te), je])) : null, J = `${t}|${e}|${G ? JSON.stringify(G) : K ?? ""}`;
2621
- if (v.current.has(J)) return;
2622
- v.current.add(J), N(J), y(null);
2636
+ if (k.current.has(J)) return;
2637
+ k.current.add(J), N(J), y(null);
2623
2638
  const pe = { langs: [e] };
2624
2639
  G ? pe.voiceBySpeaker = G : K && (pe.voice = K);
2625
2640
  const le = await qs(o, `/v1/recordings/${t}/voice`, { method: "POST", body: pe }).catch(() => null);
2626
2641
  if (N((Te) => Te === J ? null : Te), !(le != null && le.ok)) {
2627
- v.current.delete(J);
2642
+ k.current.delete(J);
2628
2643
  const Te = le ? await le.json().catch(() => null) : null;
2629
2644
  y((Te == null ? void 0 : Te.message) || "This voice could not be prepared.");
2630
2645
  return;
@@ -2632,23 +2647,23 @@ function bl({ recordingId: t, lang: e, ended: n, cred: r, pickedVoice: s, senten
2632
2647
  c();
2633
2648
  }, [t, e, n, o, c]), I = qe(() => {
2634
2649
  const K = `${t ?? ""}|${e ?? ""}|`;
2635
- for (const L of [...v.current]) L.startsWith(K) && v.current.delete(L);
2650
+ for (const L of [...k.current]) L.startsWith(K) && k.current.delete(L);
2636
2651
  y(null);
2637
- }, [t, e]), C = !!d && (d.state === "queued" || d.state === "running") || h === m, D = (d == null ? void 0 : d.state) === "failed" ? d.error || "the render failed" : p, B = (a == null ? void 0 : a.join(",")) ?? "", [Y, X] = k(null), z = Ie(() => new Set((d == null ? void 0 : d.clips) ?? []), [d]), F = Ie(() => n && B ? B.split(",").map(Number).filter((K) => !z.has(K)) : [], [n, B, z]), S = j(null);
2638
- E(() => {
2652
+ }, [t, e]), C = !!d && (d.state === "queued" || d.state === "running") || h === m, D = (d == null ? void 0 : d.state) === "failed" ? d.error || "the render failed" : p, B = (a == null ? void 0 : a.join(",")) ?? "", [Y, ee] = v(null), z = Ie(() => new Set((d == null ? void 0 : d.clips) ?? []), [d]), F = Ie(() => n && B ? B.split(",").map(Number).filter((K) => !z.has(K)) : [], [n, B, z]), A = j(null);
2653
+ S(() => {
2639
2654
  if (!n || !t || !e || !F.length) return;
2640
- const K = Y ?? F[0], L = F.find((pe) => pe >= K) ?? F[0], ie = `${t}|${e}|${M ?? ""}`, ne = S.current;
2655
+ const K = Y ?? F[0], L = F.find((pe) => pe >= K) ?? F[0], ie = `${t}|${e}|${M ?? ""}`, ne = A.current;
2641
2656
  if (ne && ne.key === ie && Math.abs(ne.near - L) < 12 && Date.now() - ne.at < 6e4) return;
2642
- S.current = { key: ie, near: L, at: Date.now() };
2657
+ A.current = { key: ie, near: L, at: Date.now() };
2643
2658
  const G = ei(M), J = { langs: [e], near: L };
2644
2659
  G && G.size ? J.voiceBySpeaker = Object.fromEntries([...G].map(([pe, le]) => [String(pe), le])) : M && (J.voice = M), qs(o, `/v1/recordings/${t}/voice`, { method: "POST", body: J }).then((pe) => {
2645
- pe.ok || (S.current = null);
2660
+ pe.ok || (A.current = null);
2646
2661
  }).catch(() => {
2647
- S.current = null;
2662
+ A.current = null;
2648
2663
  });
2649
2664
  }, [n, t, e, M, Y, F, o]);
2650
2665
  const T = F.length > 0, _ = j({ n: -1, at: 0 });
2651
- E(() => {
2666
+ S(() => {
2652
2667
  if (!T) return;
2653
2668
  const K = setInterval(() => {
2654
2669
  const L = z.size;
@@ -2661,27 +2676,27 @@ function bl({ recordingId: t, lang: e, ended: n, cred: r, pickedVoice: s, senten
2661
2676
  const K = B ? B.split(",").map(Number).filter((ie) => !n || z.has(ie)) : void 0, L = d ?? (K != null && K.length && e ? { lang: e, voiceKey: s ?? "", clips: [], voice: null } : null);
2662
2677
  return qa(L, t, o.origin, r, K);
2663
2678
  }, [d, t, o, r, B, e, s, n, z]), te = Ie(() => new Set(F), [F]);
2664
- return { listed: l, rows: u, track: d, renderVoiceId: M, rendering: C, failed: D, clips: O, requestRender: f, forget: I, reload: c, setNear: X, missing: F.length, coming: te };
2679
+ return { listed: l, rows: u, track: d, renderVoiceId: M, rendering: C, failed: D, clips: O, requestRender: f, forget: I, reload: c, setNear: ee, missing: F.length, coming: te };
2665
2680
  }
2666
- const xl = { share: ee.share, delay: ee.tabGauge, video: ee.video, source: ee.tabSources, script: ee.tabScript, fix: ee.tabFix, ending: ee.tabEnding, summary: ee.tabSummary, export: ee.tabExport, settings: ee.tabSettings, sources: ee.tabSources, recs: ee.mic };
2681
+ const xl = { share: X.share, delay: X.tabGauge, video: X.video, source: X.tabSources, script: X.tabScript, fix: X.tabFix, ending: X.tabEnding, summary: X.tabSummary, export: X.tabExport, settings: X.tabSettings, sources: X.tabSources, recs: X.mic };
2667
2682
  function _i({ tabs: t, current: e, onPick: n, gap: r, fold: s = !0, side: a = !s }) {
2668
- const o = s && t.length <= 3, l = t.some((v) => v.key === e), [c, u] = k(null), d = j(null), [M, h] = k(0);
2669
- E(() => {
2683
+ const o = s && t.length <= 3, l = t.some((k) => k.key === e), [c, u] = v(null), d = j(null), [M, h] = v(0);
2684
+ S(() => {
2670
2685
  d.current && h(d.current.offsetWidth);
2671
2686
  }, [c == null ? void 0 : c.k]);
2672
- const N = (v, m) => {
2673
- const f = v.currentTarget.querySelector(".tabbar__label");
2687
+ const N = (k, m) => {
2688
+ const f = k.currentTarget.querySelector(".tabbar__label");
2674
2689
  if (o || s || m.key === e || f && getComputedStyle(f).opacity === "1") {
2675
2690
  c && u(null);
2676
2691
  return;
2677
2692
  }
2678
2693
  if ((c == null ? void 0 : c.k) === m.key) return;
2679
- const I = v.currentTarget.getBoundingClientRect(), C = v.currentTarget.parentElement.getBoundingClientRect();
2694
+ const I = k.currentTarget.getBoundingClientRect(), C = k.currentTarget.parentElement.getBoundingClientRect();
2680
2695
  u({ k: m.key, label: m.label, x: I.left + I.width / 2, y: C.top });
2681
2696
  }, p = () => u(null);
2682
2697
  let y = null;
2683
2698
  if (c) {
2684
- const v = { l: 0, r: typeof window < "u" ? window.innerWidth : 0 }, m = M || 80, f = Math.max(v.l + 8, Math.min(v.r - m - 8, c.x - m / 2));
2699
+ const k = { l: 0, r: typeof window < "u" ? window.innerWidth : 0 }, m = M || 80, f = Math.max(k.l + 8, Math.min(k.r - m - 8, c.x - m / 2));
2685
2700
  y = Oa(
2686
2701
  /* @__PURE__ */ i("div", { className: "vsp vsp-portal", "data-theme": "dark", children: /* @__PURE__ */ g("div", { ref: d, "data-theme": "dark", className: "vs-tip__bubble vs-tip__bubble--top tabtip", style: { position: "fixed", left: f, top: c.y - 8, bottom: "auto", width: "auto", whiteSpace: "nowrap", transform: "translateY(-100%)", zIndex: 2147483e3, pointerEvents: "none" }, children: [
2687
2702
  /* @__PURE__ */ i("span", { className: "vs-tip__row", children: /* @__PURE__ */ i("span", { className: "vs-tip__copy", children: c.label }) }),
@@ -2691,25 +2706,25 @@ function _i({ tabs: t, current: e, onPick: n, gap: r, fold: s = !0, side: a = !s
2691
2706
  );
2692
2707
  }
2693
2708
  return /* @__PURE__ */ g("div", { role: "tablist", className: `tabbar tabbar--icons${s ? "" : " tabbar--desk"}`, "data-desk-tabs": a ? "" : void 0, "data-tab-n": a ? t.length : void 0, style: { marginBottom: r ? 12 : 0 }, onMouseLeave: p, children: [
2694
- t.map((v) => {
2695
- const m = e === v.key, f = o || m, I = o ? "1 1 0" : m ? "1 1 auto" : s && !l ? "1 1 0" : "0 0 auto", C = v.icon ?? xl[v.key], D = () => {
2696
- p(), n(s && m ? "none" : v.key);
2709
+ t.map((k) => {
2710
+ const m = e === k.key, f = o || m, I = o ? "1 1 0" : m ? "1 1 auto" : s && !l ? "1 1 0" : "0 0 auto", C = k.icon ?? xl[k.key], D = () => {
2711
+ p(), n(s && m ? "none" : k.key);
2697
2712
  };
2698
- return s ? /* @__PURE__ */ g("button", { type: "button", role: "tab", "aria-selected": m, title: v.label, className: `tabbar__tab${m ? " is-on" : ""}`, style: { flex: I }, onClick: D, children: [
2699
- C && /* @__PURE__ */ i(oe, { d: C, size: 15, sw: v.sw ?? 2, style: { flex: "none" } }),
2700
- f && /* @__PURE__ */ i("span", { className: "tabbar__label", children: v.label })
2701
- ] }, v.key) : /* @__PURE__ */ i("div", { className: "tabbar__slot", "data-tab-cell": "", style: { flex: I }, onMouseEnter: (B) => N(B, v), onMouseMove: (B) => N(B, v), onClick: D, children: /* @__PURE__ */ g("button", { type: "button", role: "tab", "aria-selected": m, "aria-label": v.label, className: `tabbar__tab${m ? " is-on" : ""}${(c == null ? void 0 : c.k) === v.key ? " is-tip" : ""}`, children: [
2702
- C && /* @__PURE__ */ i(oe, { d: C, size: 15, sw: v.sw ?? 2, className: "tabbar__icon", style: { flex: "none", transform: m && !o ? "scale(1.12)" : "none" } }),
2703
- /* @__PURE__ */ i("span", { className: "tabbar__grow", "data-tab-lw": "", style: { gridTemplateColumns: f ? "1fr" : "0fr", marginLeft: f && C ? 6 : 0 }, children: /* @__PURE__ */ i("span", { className: "tabbar__label", "data-tab-l": "", style: { opacity: f ? 1 : 0, transform: f ? "none" : "translateX(-6px)" }, children: v.label }) })
2704
- ] }) }, v.key);
2713
+ return s ? /* @__PURE__ */ g("button", { type: "button", role: "tab", "aria-selected": m, title: k.label, className: `tabbar__tab${m ? " is-on" : ""}`, style: { flex: I }, onClick: D, children: [
2714
+ C && /* @__PURE__ */ i(oe, { d: C, size: 15, sw: k.sw ?? 2, style: { flex: "none" } }),
2715
+ f && /* @__PURE__ */ i("span", { className: "tabbar__label", children: k.label })
2716
+ ] }, k.key) : /* @__PURE__ */ i("div", { className: "tabbar__slot", "data-tab-cell": "", style: { flex: I }, onMouseEnter: (B) => N(B, k), onMouseMove: (B) => N(B, k), onClick: D, children: /* @__PURE__ */ g("button", { type: "button", role: "tab", "aria-selected": m, "aria-label": k.label, className: `tabbar__tab${m ? " is-on" : ""}${(c == null ? void 0 : c.k) === k.key ? " is-tip" : ""}`, children: [
2717
+ C && /* @__PURE__ */ i(oe, { d: C, size: 15, sw: k.sw ?? 2, className: "tabbar__icon", style: { flex: "none", transform: m && !o ? "scale(1.12)" : "none" } }),
2718
+ /* @__PURE__ */ i("span", { className: "tabbar__grow", "data-tab-lw": "", style: { gridTemplateColumns: f ? "1fr" : "0fr", marginLeft: f && C ? 6 : 0 }, children: /* @__PURE__ */ i("span", { className: "tabbar__label", "data-tab-l": "", style: { opacity: f ? 1 : 0, transform: f ? "none" : "translateX(-6px)" }, children: k.label }) })
2719
+ ] }) }, k.key);
2705
2720
  }),
2706
2721
  y
2707
2722
  ] });
2708
2723
  }
2709
2724
  const Dl = "M3 16.5v2.25A2.25 2.25 0 0 0 5.25 21h13.5A2.25 2.25 0 0 0 21 18.75V16.5M16.5 12 12 16.5m0 0L7.5 12m4.5 4.5V3", Sl = "m9 9 10.5-3m0 6.553v3.75a2.25 2.25 0 0 1-1.632 2.163l-1.32.377a1.803 1.803 0 1 1-.99-3.467l2.31-.66a2.25 2.25 0 0 0 1.632-2.163Zm0 0V2.25L9 5.25v10.303m0 0v3.75a2.25 2.25 0 0 1-1.632 2.163l-1.32.377a1.803 1.803 0 0 1-.99-3.467l2.31-.66A2.25 2.25 0 0 0 9 15.553Z";
2710
2725
  function Al({ audio: t, video: e, formats: n, onExport: r }) {
2711
- const [s, a] = k(null), [o, l] = k(null), c = j(void 0), u = j(!0);
2712
- E(() => (u.current = !0, () => {
2726
+ const [s, a] = v(null), [o, l] = v(null), c = j(void 0), u = j(!0);
2727
+ S(() => (u.current = !0, () => {
2713
2728
  u.current = !1, window.clearTimeout(c.current);
2714
2729
  }), []);
2715
2730
  const d = (p) => {
@@ -2728,24 +2743,24 @@ function Al({ audio: t, video: e, formats: n, onExport: r }) {
2728
2743
  }).finally(() => {
2729
2744
  u.current && l(null);
2730
2745
  }));
2731
- }, N = (p, y, v, m) => /* @__PURE__ */ g(be, { children: [
2746
+ }, N = (p, y, k, m) => /* @__PURE__ */ g(be, { children: [
2732
2747
  /* @__PURE__ */ i(pr, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: m }),
2733
2748
  /* @__PURE__ */ g("button", { type: "button", className: "dlrow", disabled: o != null, "aria-busy": o === p || void 0, onClick: () => h(p, y), style: o && o !== p ? { opacity: 0.45 } : void 0, children: [
2734
- o === p ? /* @__PURE__ */ i(ut, { size: 17, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(oe, { d: v, size: 17, sw: 1.5, style: { flex: "none", color: "var(--ink-70)" } }),
2749
+ o === p ? /* @__PURE__ */ i(ut, { size: 17, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(oe, { d: k, size: 17, sw: 1.5, style: { flex: "none", color: "var(--ink-70)" } }),
2735
2750
  /* @__PURE__ */ g("span", { style: { flex: 1, minWidth: 0, display: "flex", flexDirection: "column", gap: 1, textAlign: "left" }, children: [
2736
2751
  /* @__PURE__ */ i("span", { style: { fontSize: 13, fontWeight: 500, color: "var(--ink-96)", whiteSpace: "nowrap", overflow: "hidden", textOverflow: "ellipsis" }, children: y.name }),
2737
2752
  /* @__PURE__ */ i("span", { style: { font: "500 9.5px var(--vs-font-mono)", color: "var(--ink-40)", letterSpacing: ".04em" }, children: y.meta })
2738
2753
  ] }),
2739
- /* @__PURE__ */ i(oe, { d: s === p ? ee.check : Dl, size: 17, sw: 1.6, style: { flex: "none", color: s === p ? "var(--brand)" : "var(--ink-62)" } })
2754
+ /* @__PURE__ */ i(oe, { d: s === p ? X.check : Dl, size: 17, sw: 1.6, style: { flex: "none", color: s === p ? "var(--brand)" : "var(--ink-62)" } })
2740
2755
  ] })
2741
2756
  ] });
2742
2757
  return /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: 10 }, children: [
2743
2758
  t && N("audio", t, Sl, "DOWNLOAD AUDIO"),
2744
- e && N("video", e, ee.video, "DOWNLOAD VIDEO"),
2759
+ e && N("video", e, X.video, "DOWNLOAD VIDEO"),
2745
2760
  n !== !1 && /* @__PURE__ */ g(be, { children: [
2746
2761
  /* @__PURE__ */ i(pr, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: "EXPORT AS" }),
2747
2762
  /* @__PURE__ */ i("div", { className: "fmtgrid", children: Lr.map((p) => /* @__PURE__ */ g("button", { type: "button", className: "fmtgrid__cell", title: o === p.key ? `Building the ${p.name}…` : p.note, disabled: o != null, "aria-busy": o === p.key || void 0, onClick: () => M(p.key), style: o && o !== p.key ? { opacity: 0.45 } : void 0, children: [
2748
- o === p.key ? /* @__PURE__ */ i(ut, { size: 16, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(oe, { d: s === p.key ? ee.check : p.icon, size: 16, sw: 1.6, style: { color: s === p.key ? "var(--brand)" : "var(--ink-62)" } }),
2763
+ o === p.key ? /* @__PURE__ */ i(ut, { size: 16, color: "var(--brand)", track: "var(--fill-12)" }) : /* @__PURE__ */ i(oe, { d: s === p.key ? X.check : p.icon, size: 16, sw: 1.6, style: { color: s === p.key ? "var(--brand)" : "var(--ink-62)" } }),
2749
2764
  /* @__PURE__ */ i("span", { children: p.name })
2750
2765
  ] }, p.key)) })
2751
2766
  ] })
@@ -2766,9 +2781,9 @@ function _r(t, e, n) {
2766
2781
  r();
2767
2782
  }
2768
2783
  function El(t, e, n) {
2769
- const [r, s] = k(null), a = t.state === "ready", o = `${e ?? ""}|${n ?? ""}|${a ? `${t.title}
2784
+ const [r, s] = v(null), a = t.state === "ready", o = `${e ?? ""}|${n ?? ""}|${a ? `${t.title}
2770
2785
  ${t.summary}` : ""}`, l = Rt();
2771
- return E(() => {
2786
+ return S(() => {
2772
2787
  if (!e || !n || !a) return;
2773
2788
  let c = !0;
2774
2789
  return l.client.recordings.summary(e, { lang: n, ...l.readAs }).then((u) => u).then((u) => {
@@ -2788,8 +2803,8 @@ function _l(t) {
2788
2803
  } };
2789
2804
  }
2790
2805
  function Yl({ s: t }) {
2791
- const [e, n] = k(!1), r = j(void 0);
2792
- E(() => () => window.clearTimeout(r.current), []);
2806
+ const [e, n] = v(!1), r = j(void 0);
2807
+ S(() => () => window.clearTimeout(r.current), []);
2793
2808
  const s = t.title ?? "", a = t.summary ?? "", o = () => {
2794
2809
  var c;
2795
2810
  (c = navigator.clipboard) == null || c.writeText(`${s}
@@ -2804,7 +2819,7 @@ ${a}`).catch(() => {
2804
2819
  /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 8, minHeight: 24 }, children: [
2805
2820
  /* @__PURE__ */ i(pr, { style: { letterSpacing: ".12em", color: "var(--ink-35)" }, children: "SUMMARY" }),
2806
2821
  t.state === "ready" && /* @__PURE__ */ g("button", { type: "button", className: "sumcopy", title: "Copy title and summary", style: { color: e ? "var(--brand)" : "var(--ink-70)" }, onClick: o, children: [
2807
- /* @__PURE__ */ i(oe, { d: e ? ee.check : Pl, size: 13, sw: 1.6 }),
2822
+ /* @__PURE__ */ i(oe, { d: e ? X.check : Pl, size: 13, sw: 1.6 }),
2808
2823
  e ? "Copied" : "Copy"
2809
2824
  ] })
2810
2825
  ] }),
@@ -2827,7 +2842,7 @@ function Ul({ ytId: t, title: e, timeLabel: n, radius: r, style: s, large: a, ch
2827
2842
  }
2828
2843
  function Rl(t = !0, e) {
2829
2844
  const n = j(null), r = e ?? n;
2830
- return E(() => {
2845
+ return S(() => {
2831
2846
  const s = r.current;
2832
2847
  if (!s || !t) return;
2833
2848
  let a = 0, o = 0, l = !1;
@@ -2870,7 +2885,7 @@ function Ql(t, e) {
2870
2885
  r([...C.filter((D) => !u(D) || D === f), ...c.filter((D) => !C.includes(D) && D !== `!${f}`)]);
2871
2886
  }, y = (f) => {
2872
2887
  r([...c.filter((I) => I !== f && I !== `!${f}`), ...(e.autoPin ?? []).includes(f) ? [`!${f}`] : []]), e.onPick(f);
2873
- }, v = (f) => {
2888
+ }, k = (f) => {
2874
2889
  var I;
2875
2890
  return ((I = e.tabs.find((C) => C.key === f)) == null ? void 0 : I.label) ?? f;
2876
2891
  }, m = (f) => {
@@ -2880,7 +2895,7 @@ function Ql(t, e) {
2880
2895
  pinned: I,
2881
2896
  order: I ? d.indexOf(f) + 1 : 1e3,
2882
2897
  pill: a && C && o.includes(f) && M.length > 0 && (I || M.length > 1),
2883
- title: I ? `Unpin — return ${v(f)} to the tabs` : `Pin ${v(f)} open above the tabs`,
2898
+ title: I ? `Unpin — return ${k(f)} to the tabs` : `Pin ${k(f)} open above the tabs`,
2884
2899
  toggle: () => I ? y(f) : p(f)
2885
2900
  };
2886
2901
  };
@@ -2894,7 +2909,7 @@ function $l({ col: t, order: e, render: n, grip: r, onPick: s, wrapClass: a }) {
2894
2909
  const c = n(o);
2895
2910
  return c ? /* @__PURE__ */ g("div", { "data-panel-key": o, "data-pinned": l.pinned ? "true" : "false", className: `pinwrap sidepanel ${(a == null ? void 0 : a(o, l.pinned)) ?? ""}`, style: { order: l.order, "--grip-h": `${(r == null ? void 0 : r[o]) ?? 30}px` }, children: [
2896
2911
  c,
2897
- l.pill && /* @__PURE__ */ i("button", { type: "button", "data-pin-pill": "", className: `pinpill${l.pinned ? " is-on" : ""}`, title: l.title, "aria-label": l.title, "aria-pressed": l.pinned, onClick: l.toggle, children: /* @__PURE__ */ i(oe, { d: ee.pin, size: 12, sw: 2 }) })
2912
+ l.pill && /* @__PURE__ */ i("button", { type: "button", "data-pin-pill": "", className: `pinpill${l.pinned ? " is-on" : ""}`, title: l.title, "aria-label": l.title, "aria-pressed": l.pinned, onClick: l.toggle, children: /* @__PURE__ */ i(oe, { d: X.pin, size: 12, sw: 2 }) })
2898
2913
  ] }, o) : null;
2899
2914
  }),
2900
2915
  t.tabbed && t.cur && /* @__PURE__ */ i("div", { className: "deskstrip", style: { order: 999 }, children: /* @__PURE__ */ i(_i, { tabs: t.stripTabs, current: t.cur, onPick: (o) => {
@@ -2907,12 +2922,12 @@ function Bl(t) {
2907
2922
  const e = j(t);
2908
2923
  e.current = t;
2909
2924
  const n = t.id;
2910
- E(() => {
2925
+ S(() => {
2911
2926
  let r = null, s = null;
2912
2927
  const a = (m) => {
2913
2928
  r !== m && (r && r.removeAttribute("data-grip-hot"), r = m, m && m.setAttribute("data-grip-hot", ""));
2914
2929
  }, o = (m) => m.col.querySelector("[data-desk-tabs]"), l = (m) => {
2915
- var X;
2930
+ var ee;
2916
2931
  const f = m.el.getBoundingClientRect(), I = m.el.cloneNode(!0);
2917
2932
  I.querySelectorAll("*").forEach((z) => {
2918
2933
  z.style.animation = "none", z.style.transition = "none";
@@ -2933,26 +2948,26 @@ function Bl(t) {
2933
2948
  }
2934
2949
  I.style.background = B || getComputedStyle(document.body).backgroundColor, document.body.appendChild(I), m.orig = [...m.col.querySelectorAll("[data-panel-key]")].map((z) => [z, z.style.order]), m.snap = {}, m.orig.forEach(([z]) => {
2935
2950
  m.snap[z.getAttribute("data-panel-key")] = z.getBoundingClientRect();
2936
- }), m.tabsSnap = ((X = o(m)) == null ? void 0 : X.getBoundingClientRect()) ?? null;
2951
+ }), m.tabsSnap = ((ee = o(m)) == null ? void 0 : ee.getBoundingClientRect()) ?? null;
2937
2952
  const Y = m.col.querySelector("[data-panel-grid]");
2938
2953
  m.grid = !!Y && getComputedStyle(Y).display === "grid", m.el.classList.add("is-dragging"), document.documentElement.style.cursor = "move", document.body.style.userSelect = "none", document.body.style.webkitUserSelect = "none", Object.assign(m, { on: !0, clone: I }), a(null);
2939
2954
  }, c = () => {
2940
2955
  const m = s;
2941
2956
  if (!m || !m.on || m.px == null || m.py == null) return;
2942
2957
  m.raf = 0, m.clone.style.transform = `translate3d(${m.px - m.x0}px,${m.py - m.y0}px,0)`;
2943
- const f = e.current, I = m.key, C = o(m), D = f.seq.includes(I), B = D || f.tabKeys.length > 1, Y = C && m.tabsSnap, X = !Y || m.py < Y.top + Y.height / 2 ? B ? "pin" : null : "tabs";
2958
+ const f = e.current, I = m.key, C = o(m), D = f.seq.includes(I), B = D || f.tabKeys.length > 1, Y = C && m.tabsSnap, ee = !Y || m.py < Y.top + Y.height / 2 ? B ? "pin" : null : "tabs";
2944
2959
  let z = null;
2945
- if (X === "pin") {
2946
- const S = f.seq.filter((_) => _ !== I).map((_) => m.snap[_]).filter(Boolean), T = m.grid ? S.filter((_) => _.bottom < m.py || _.top <= m.py && _.left + _.width / 2 < m.px).length : S.filter((_) => _.top + _.height / 2 < m.py).length;
2947
- D && f.seq.indexOf(I) === T || (z = { zone: X, idx: T });
2948
- } else X === "tabs" && D && (z = { zone: X });
2960
+ if (ee === "pin") {
2961
+ const A = f.seq.filter((_) => _ !== I).map((_) => m.snap[_]).filter(Boolean), T = m.grid ? A.filter((_) => _.bottom < m.py || _.top <= m.py && _.left + _.width / 2 < m.px).length : A.filter((_) => _.top + _.height / 2 < m.py).length;
2962
+ D && f.seq.indexOf(I) === T || (z = { zone: ee, idx: T });
2963
+ } else ee === "tabs" && D && (z = { zone: ee });
2949
2964
  const F = z ? z.zone + (z.idx ?? "") : "";
2950
2965
  if (F !== m.sig) {
2951
- if (m.sig = F, m.target = z, m.orig.forEach(([S, T]) => {
2952
- S.style.order = T;
2966
+ if (m.sig = F, m.target = z, m.orig.forEach(([A, T]) => {
2967
+ A.style.order = T;
2953
2968
  }), (z == null ? void 0 : z.zone) === "pin") {
2954
- const S = f.seq.filter((T) => T !== I);
2955
- S.splice(z.idx, 0, I), S.forEach((T, _) => {
2969
+ const A = f.seq.filter((T) => T !== I);
2970
+ A.splice(z.idx, 0, I), A.forEach((T, _) => {
2956
2971
  const O = m.col.querySelector(`[data-panel-key="${T}"]`);
2957
2972
  O && (O.style.order = String(_ + 1));
2958
2973
  });
@@ -2996,32 +3011,32 @@ function Bl(t) {
2996
3011
  f && (m.preventDefault(), m.stopImmediatePropagation(), s = { el: r, col: f, key: r.getAttribute("data-panel-key"), x0: m.clientX, y0: m.clientY, on: !1 });
2997
3012
  }, N = () => u(!0), p = () => u(!1), y = (m) => {
2998
3013
  m.key === "Escape" && s && (m.preventDefault(), m.stopImmediatePropagation(), u(!1));
2999
- }, v = () => {
3014
+ }, k = () => {
3000
3015
  s || a(null);
3001
3016
  };
3002
- return document.addEventListener("pointermove", M, !0), document.addEventListener("pointerdown", h, !0), window.addEventListener("pointerup", N), window.addEventListener("pointercancel", p), window.addEventListener("keydown", y, !0), document.addEventListener("pointerleave", v), () => {
3003
- u(!1), a(null), document.removeEventListener("pointermove", M, !0), document.removeEventListener("pointerdown", h, !0), window.removeEventListener("pointerup", N), window.removeEventListener("pointercancel", p), window.removeEventListener("keydown", y, !0), document.removeEventListener("pointerleave", v);
3017
+ return document.addEventListener("pointermove", M, !0), document.addEventListener("pointerdown", h, !0), window.addEventListener("pointerup", N), window.addEventListener("pointercancel", p), window.addEventListener("keydown", y, !0), document.addEventListener("pointerleave", k), () => {
3018
+ u(!1), a(null), document.removeEventListener("pointermove", M, !0), document.removeEventListener("pointerdown", h, !0), window.removeEventListener("pointerup", N), window.removeEventListener("pointercancel", p), window.removeEventListener("keydown", y, !0), document.removeEventListener("pointerleave", k);
3004
3019
  };
3005
3020
  }, [n]);
3006
3021
  }
3007
3022
  function Vl({ id: t, className: e, gap: n, hidden: r, plain: s, children: a }) {
3008
3023
  const [o, l] = eo(t), c = j(null), u = j(null);
3009
- Hl(u), E(() => {
3024
+ Hl(u), S(() => {
3010
3025
  document.documentElement.style.setProperty("--colw", `${o}px`);
3011
3026
  }, [o]);
3012
3027
  const d = (h) => {
3013
3028
  const N = c.current, p = N == null ? void 0 : N.parentElement;
3014
3029
  if (h.button !== 0 || !N || !p) return;
3015
3030
  h.preventDefault();
3016
- const y = h.currentTarget, v = getComputedStyle(p), m = p.clientWidth - parseFloat(v.paddingLeft) - parseFloat(v.paddingRight) - (parseFloat(v.columnGap) || 0), f = 320, I = 320, C = Math.max(f, m - I), D = h.clientX, B = N.getBoundingClientRect().width;
3031
+ const y = h.currentTarget, k = getComputedStyle(p), m = p.clientWidth - parseFloat(k.paddingLeft) - parseFloat(k.paddingRight) - (parseFloat(k.columnGap) || 0), f = 320, I = 320, C = Math.max(f, m - I), D = h.clientX, B = N.getBoundingClientRect().width;
3017
3032
  let Y = B;
3018
3033
  y.classList.add("is-on");
3019
- const X = { cur: document.body.style.cursor, sel: document.body.style.userSelect };
3034
+ const ee = { cur: document.body.style.cursor, sel: document.body.style.userSelect };
3020
3035
  document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
3021
- const z = (S) => {
3022
- Y = Math.round(Math.min(C, Math.max(f, B + (D - S.clientX)))), N.style.flexBasis = `${Y}px`, document.documentElement.style.setProperty("--colw", `${Y}px`);
3036
+ const z = (A) => {
3037
+ Y = Math.round(Math.min(C, Math.max(f, B + (D - A.clientX)))), N.style.flexBasis = `${Y}px`, document.documentElement.style.setProperty("--colw", `${Y}px`);
3023
3038
  }, F = () => {
3024
- window.removeEventListener("pointermove", z), window.removeEventListener("pointerup", F), window.removeEventListener("pointercancel", F), document.body.style.cursor = X.cur, document.body.style.userSelect = X.sel, y.classList.remove("is-on"), l(Y);
3039
+ window.removeEventListener("pointermove", z), window.removeEventListener("pointerup", F), window.removeEventListener("pointercancel", F), document.body.style.cursor = ee.cur, document.body.style.userSelect = ee.sel, y.classList.remove("is-on"), l(Y);
3025
3040
  };
3026
3041
  window.addEventListener("pointermove", z), window.addEventListener("pointerup", F), window.addEventListener("pointercancel", F);
3027
3042
  }, M = r ? { display: "none" } : void 0;
@@ -3031,7 +3046,7 @@ function Vl({ id: t, className: e, gap: n, hidden: r, plain: s, children: a }) {
3031
3046
  ] });
3032
3047
  }
3033
3048
  function Hl(t) {
3034
- E(() => {
3049
+ S(() => {
3035
3050
  const e = t.current;
3036
3051
  if (!e) return;
3037
3052
  const n = 16;
@@ -3063,14 +3078,14 @@ function Wl(t) {
3063
3078
  }
3064
3079
  const Fl = 1500, Gl = 3e5;
3065
3080
  function Zl(t) {
3066
- const e = Rt(), [n, r] = k(null), [s, a] = k(null), [o, l] = k(null), [c, u] = k(null), d = j(null), M = j(null), h = j(null), N = j(0), p = qe(() => {
3081
+ const e = Rt(), [n, r] = v(null), [s, a] = v(null), [o, l] = v(null), [c, u] = v(null), d = j(null), M = j(null), h = j(null), N = j(0), p = qe(() => {
3067
3082
  h.current && (clearTimeout(h.current), h.current = null), d.current && (d.current.pause(), d.current.removeAttribute("src"), d.current.load(), d.current = null), M.current && (URL.revokeObjectURL(M.current), M.current = null);
3068
3083
  }, []), y = qe(() => {
3069
3084
  N.current += 1, p(), a(null), l(null);
3070
- }, [p]), v = qe(() => {
3085
+ }, [p]), k = qe(() => {
3071
3086
  y(), r(null);
3072
3087
  }, [y]);
3073
- E(() => () => {
3088
+ S(() => () => {
3074
3089
  N.current += 1, p();
3075
3090
  }, [p]);
3076
3091
  const m = qe((f) => {
@@ -3085,11 +3100,11 @@ function Zl(t) {
3085
3100
  if (N.current !== I) return;
3086
3101
  let Y;
3087
3102
  try {
3088
- const S = e.owner ? await e.bearer() : void 0;
3089
- Y = await fetch(C, { headers: S ? { Authorization: `Bearer ${S}` } : {} });
3090
- } catch (S) {
3103
+ const A = e.owner ? await e.bearer() : void 0;
3104
+ Y = await fetch(C, { headers: A ? { Authorization: `Bearer ${A}` } : {} });
3105
+ } catch (A) {
3091
3106
  if (N.current !== I) return;
3092
- l(null), u(It(S));
3107
+ l(null), u(It(A));
3093
3108
  return;
3094
3109
  }
3095
3110
  if (N.current !== I) return;
@@ -3105,13 +3120,13 @@ function Zl(t) {
3105
3120
  }
3106
3121
  if (!Y.ok) {
3107
3122
  l(null);
3108
- const S = await Y.json().catch(() => null);
3109
- u((S == null ? void 0 : S.code) === "language_unavailable" ? { message: "No voice can speak this language yet.", status: Y.status } : { message: `This voice could not be previewed (${Y.status}).`, status: Y.status });
3123
+ const A = await Y.json().catch(() => null);
3124
+ u((A == null ? void 0 : A.code) === "language_unavailable" ? { message: "No voice can speak this language yet.", status: Y.status } : { message: `This voice could not be previewed (${Y.status}).`, status: Y.status });
3110
3125
  return;
3111
3126
  }
3112
- const X = await Y.blob();
3127
+ const ee = await Y.blob();
3113
3128
  if (N.current !== I) return;
3114
- l(null), M.current = URL.createObjectURL(X);
3129
+ l(null), M.current = URL.createObjectURL(ee);
3115
3130
  const z = new Audio(M.current);
3116
3131
  z.playsInline = !0;
3117
3132
  const F = () => {
@@ -3123,7 +3138,7 @@ function Zl(t) {
3123
3138
  };
3124
3139
  B();
3125
3140
  }, [t, p, e]);
3126
- return { armId: n, sampleId: s, dlId: o, error: c, clearError: () => u(null), arm: m, stop: y, reset: v };
3141
+ return { armId: n, sampleId: s, dlId: o, error: c, clearError: () => u(null), arm: m, stop: y, reset: k };
3127
3142
  }
3128
3143
  const kr = 0.05, Yi = (t, e) => {
3129
3144
  let n = 0;
@@ -3176,8 +3191,8 @@ function Ut(t, e, n) {
3176
3191
  return r != null && r > e ? r : (t == null ? void 0 : t.end) != null && t.end > e ? t.end : n > e ? n : e + 4;
3177
3192
  }
3178
3193
  function Kl({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd: o, endT: l, onGone: c, onKnown: u, lead: d, onTime: M, waiting: h = !1 }) {
3179
- const N = j(null), [p, y] = k(!1);
3180
- E(() => {
3194
+ const N = j(null), [p, y] = v(!1);
3195
+ S(() => {
3181
3196
  if (!h) {
3182
3197
  y(!1);
3183
3198
  return;
@@ -3185,24 +3200,24 @@ function Kl({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
3185
3200
  const W = setTimeout(() => y(!0), 300);
3186
3201
  return () => clearTimeout(W);
3187
3202
  }, [h]);
3188
- const v = r && !p, m = j(!1), [f, I] = k(!1), C = (W, ye = []) => {
3203
+ const k = r && !p, m = j(!1), [f, I] = v(!1), C = (W, ye = []) => {
3189
3204
  var Z, ke;
3190
3205
  if (!(m.current && (W === "pauseVideo" || W === "seekTo" || W === "setPlaybackRate")))
3191
3206
  try {
3192
3207
  (ke = (Z = N.current) == null ? void 0 : Z.contentWindow) == null || ke.postMessage(JSON.stringify({ event: "command", func: W, args: ye }), "*");
3193
3208
  } catch {
3194
3209
  }
3195
- }, D = j(null), B = j(!1), Y = j(!1), X = j(!1), z = j(a);
3210
+ }, D = j(null), B = j(!1), Y = j(!1), ee = j(!1), z = j(a);
3196
3211
  z.current = a;
3197
3212
  const F = j(d);
3198
3213
  F.current = d;
3199
- const S = j(o);
3200
- S.current = o;
3214
+ const A = j(o);
3215
+ A.current = o;
3201
3216
  const T = j(!1), _ = () => {
3202
3217
  var ye, Z;
3203
- const W = Y.current || X.current;
3218
+ const W = Y.current || ee.current;
3204
3219
  if (W !== m.current)
3205
- if (m.current = W, I(W), (ye = S.current) == null || ye.call(S, W), W) {
3220
+ if (m.current = W, I(W), (ye = A.current) == null || ye.call(A, W), W) {
3206
3221
  if (C("playVideo"), F.current) return;
3207
3222
  we.current && z.current && (T.current = !0, z.current());
3208
3223
  } else T.current && !F.current && (T.current = !1, we.current || (Z = z.current) == null || Z.call(z));
@@ -3210,12 +3225,12 @@ function Kl({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
3210
3225
  O.current = n;
3211
3226
  const te = j(M);
3212
3227
  te.current = M;
3213
- const K = j(null), L = j(null), [ie, ne] = k(!0), [G, J] = k(!1), pe = () => {
3228
+ const K = j(null), L = j(null), [ie, ne] = v(!0), [G, J] = v(!1), pe = () => {
3214
3229
  C("unloadModule", ["captions"]), C("unloadModule", ["cc"]);
3215
3230
  }, le = j([]), Te = () => {
3216
3231
  pe(), le.current.forEach(clearTimeout), le.current = [400, 1200, 2500, 5e3].map((W) => window.setTimeout(pe, W));
3217
3232
  };
3218
- E(() => () => le.current.forEach(clearTimeout), []);
3233
+ S(() => () => le.current.forEach(clearTimeout), []);
3219
3234
  const je = () => {
3220
3235
  var W, ye;
3221
3236
  try {
@@ -3224,24 +3239,24 @@ function Kl({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
3224
3239
  }
3225
3240
  (!F.current || F.current.muted) && C("mute"), J(!0);
3226
3241
  };
3227
- E(() => (d == null || d.bind(C), () => d == null ? void 0 : d.bind(null)), [!!d]), E(() => {
3242
+ S(() => (d == null || d.bind(C), () => d == null ? void 0 : d.bind(null)), [!!d]), S(() => {
3228
3243
  !d && G && C("mute");
3229
3244
  }, [!!d]);
3230
3245
  const De = j(null), Le = j(l);
3231
3246
  Le.current = l;
3232
- const we = j(v);
3233
- we.current = v;
3247
+ const we = j(k);
3248
+ we.current = k;
3234
3249
  const Ee = j(!1), Re = j(c);
3235
3250
  Re.current = c;
3236
3251
  const Se = j(u);
3237
3252
  Se.current = u;
3238
- const $ = j(!1), [H, A] = k(!1), b = (W) => {
3253
+ const $ = j(!1), [H, E] = v(!1), b = (W) => {
3239
3254
  const ye = De.current;
3240
3255
  return !!ye && (W < ye.start - 1 || W > ye.end + 5);
3241
3256
  }, V = () => {
3242
3257
  b(O.current) || C("seekTo", [O.current, !0]);
3243
3258
  }, ce = () => K.current;
3244
- return E(() => {
3259
+ return S(() => {
3245
3260
  const W = (ye) => {
3246
3261
  var Ge, Ae, ge, _e, Ve, Q, he, ue, ae, fe, Ye, U, R, q, re, de;
3247
3262
  if (ye.source !== ((Ge = N.current) == null ? void 0 : Ge.contentWindow) || typeof ye.data != "string") return;
@@ -3266,30 +3281,30 @@ function Kl({ ytId: t, title: e, t: n, playing: r, seekN: s, onToggle: a, onAd:
3266
3281
  typeof ((Ye = Z == null ? void 0 : Z.info) == null ? void 0 : Ye.currentTime) == "number" && (K.current = Z.info.currentTime, (U = F.current) == null || U.onInfo({ t: Z.info.currentTime }), !m.current && L.current === 1 && ((R = te.current) == null || R.call(te, Z.info.currentTime))), ((q = Z == null ? void 0 : Z.info) == null ? void 0 : q.muted) === !1 && !F.current && C("mute"), typeof ((re = Z == null ? void 0 : Z.info) == null ? void 0 : re.muted) == "boolean" && ((de = F.current) == null || de.onInfo({ muted: Z.info.muted }));
3267
3282
  };
3268
3283
  return window.addEventListener("message", W), () => window.removeEventListener("message", W);
3269
- }, []), E(() => {
3284
+ }, []), S(() => {
3270
3285
  if (d) return;
3271
3286
  const W = b(n);
3272
- W !== H && (A(W), W ? C("pauseVideo") : G && (C("seekTo", [n, !0]), v && C("playVideo")));
3273
- }), E(() => {
3287
+ W !== H && (E(W), W ? C("pauseVideo") : G && (C("seekTo", [n, !0]), k && C("playVideo")));
3288
+ }), S(() => {
3274
3289
  if (!G || H || d) return;
3275
- if (!v && De.current == null && !Ee.current) {
3290
+ if (!k && De.current == null && !Ee.current) {
3276
3291
  Ee.current = !0, C("seekTo", [O.current, !0]), C("playVideo");
3277
3292
  return;
3278
3293
  }
3279
3294
  const W = ce();
3280
- v && (W == null || Math.abs(W - O.current) > 1.5) && V(), C(v ? "playVideo" : "pauseVideo");
3281
- }, [v, G, H]), E(() => {
3295
+ k && (W == null || Math.abs(W - O.current) > 1.5) && V(), C(k ? "playVideo" : "pauseVideo");
3296
+ }, [k, G, H]), S(() => {
3282
3297
  if (!G || s === 0 || H || d) return;
3283
3298
  const W = ce();
3284
- (W == null || Math.abs(W - O.current) > 0.5) && V(), v || C("pauseVideo");
3285
- }, [s, G]), E(() => {
3299
+ (W == null || Math.abs(W - O.current) > 0.5) && V(), k || C("pauseVideo");
3300
+ }, [s, G]), S(() => {
3286
3301
  if (!G) return;
3287
3302
  let W = null, ye = 0;
3288
3303
  const Z = setInterval(() => {
3289
3304
  const ke = K.current;
3290
3305
  ye = L.current === 1 && ke != null && W != null && Math.abs(ke - W) < 0.05 ? ye + 1 : 0, W = ke;
3291
3306
  const ze = ye >= 3;
3292
- ze !== X.current && (X.current = ze, _());
3307
+ ze !== ee.current && (ee.current = ze, _());
3293
3308
  }, 1e3);
3294
3309
  return () => clearInterval(Z);
3295
3310
  }, [G]), /* @__PURE__ */ g("div", { className: `txyt${f ? " txyt--ad" : ""}`, children: [
@@ -3309,13 +3324,13 @@ const Jl = /* @__PURE__ */ g(be, { children: [
3309
3324
  ] }), Xl = /* @__PURE__ */ i("path", { d: "M7.5 5.6a1 1 0 0 1 1.52-.85l9.1 5.55a1 1 0 0 1 0 1.7l-9.1 5.55a1 1 0 0 1-1.52-.85V5.6Z" });
3310
3325
  function ec({ player: t, size: e }) {
3311
3326
  const n = t.muted ? "Unmute" : "Mute";
3312
- return /* @__PURE__ */ i("button", { type: "button", className: `mutebtn${e < 36 ? " mutebtn--sm" : e > 36 ? " mutebtn--lg" : ""}`, "aria-label": n, title: n, "aria-pressed": t.muted, onClick: t.toggleMute, children: /* @__PURE__ */ i(oe, { d: t.muted ? ee.volumeOff : ee.volume, size: 17, sw: 1.6, style: { color: t.muted ? "var(--ink-38)" : "var(--ink-70)" } }) });
3327
+ return /* @__PURE__ */ i("button", { type: "button", className: `mutebtn${e < 36 ? " mutebtn--sm" : e > 36 ? " mutebtn--lg" : ""}`, "aria-label": n, title: n, "aria-pressed": t.muted, onClick: t.toggleMute, children: /* @__PURE__ */ i(oe, { d: t.muted ? X.volumeOff : X.volume, size: 17, sw: 1.6, style: { color: t.muted ? "var(--ink-38)" : "var(--ink-70)" } }) });
3313
3328
  }
3314
3329
  function tc() {
3315
- const [t, e] = k(""), n = j(null), r = qe((s) => {
3330
+ const [t, e] = v(""), n = j(null), r = qe((s) => {
3316
3331
  clearTimeout(n.current), e(s), n.current = setTimeout(() => e(""), 3e3);
3317
3332
  }, []);
3318
- return E(() => () => clearTimeout(n.current), []), [t, r];
3333
+ return S(() => () => clearTimeout(n.current), []), [t, r];
3319
3334
  }
3320
3335
  const nc = 0.2, rc = 140, sc = 320;
3321
3336
  function ic(t, e) {
@@ -3331,27 +3346,27 @@ function ic(t, e) {
3331
3346
  };
3332
3347
  d();
3333
3348
  }, []);
3334
- E(() => {
3349
+ S(() => {
3335
3350
  a(e ? nc : 1, e ? rc : sc);
3336
- }, [e, a]), E(() => () => {
3351
+ }, [e, a]), S(() => () => {
3337
3352
  cancelAnimationFrame(r.current), s.current = 1;
3338
3353
  for (const o of n.current) o.setVolume(1);
3339
3354
  }, []);
3340
3355
  }
3341
3356
  function ac(t, e, n, r) {
3342
3357
  var Se;
3343
- const s = j(null), a = j(!1), o = j(!1), [l, c] = k(null), [u, d] = k(!0), M = j(!0), h = j(!1), [N, p] = k(0), y = j(0);
3358
+ const s = j(null), a = j(!1), o = j(!1), [l, c] = v(null), [u, d] = v(!0), M = j(!0), h = j(!1), [N, p] = v(0), y = j(0);
3344
3359
  y.current = N;
3345
- const v = j({ t: 0, at: 0 }), m = j(n);
3360
+ const k = j({ t: 0, at: 0 }), m = j(n);
3346
3361
  m.current = n;
3347
3362
  const f = j(r);
3348
3363
  f.current = r;
3349
- const [I, C] = k(!1), D = j(!1), B = ($) => {
3364
+ const [I, C] = v(!1), D = j(!1), B = ($) => {
3350
3365
  D.current = $, C($);
3351
3366
  }, Y = ($, H) => {
3352
- var A;
3353
- return (A = s.current) == null ? void 0 : A.call(s, $, H);
3354
- }, X = l === 1 || l === 3, z = j(null), F = j(null), S = Ie(() => ({
3367
+ var E;
3368
+ return (E = s.current) == null ? void 0 : E.call(s, $, H);
3369
+ }, ee = l === 1 || l === 3, z = j(null), F = j(null), A = Ie(() => ({
3355
3370
  muted: !0,
3356
3371
  bind: ($) => {
3357
3372
  s.current = $, $ || (a.current = !1);
@@ -3359,15 +3374,15 @@ function ac(t, e, n, r) {
3359
3374
  onInfo: ($) => {
3360
3375
  if ($.ready && !a.current && (a.current = !0, o.current && (o.current = !1, Y("playVideo"))), typeof $.state == "number" && (z.current = $.state, c($.state)), typeof $.muted == "boolean" && (F.current = $.muted), typeof $.t == "number") {
3361
3376
  const H = $.t - m.current;
3362
- v.current = { t: H, at: performance.now() }, H < y.current && y.current - H < 0.35 || p(Math.max(0, H));
3377
+ k.current = { t: H, at: performance.now() }, H < y.current && y.current - H < 0.35 || p(Math.max(0, H));
3363
3378
  }
3364
3379
  }
3365
3380
  }), []);
3366
- S.muted = M.current || h.current, E(() => {
3381
+ A.muted = M.current || h.current, S(() => {
3367
3382
  if (l !== 1) return;
3368
3383
  let $ = 0;
3369
3384
  const H = () => {
3370
- const A = v.current, b = A.t + Math.min(1.2, (performance.now() - A.at) / 1e3);
3385
+ const E = k.current, b = E.t + Math.min(1.2, (performance.now() - E.at) / 1e3);
3371
3386
  if (f.current != null && b >= f.current) {
3372
3387
  B(!0), Y("pauseVideo"), p(b);
3373
3388
  return;
@@ -3375,9 +3390,9 @@ function ac(t, e, n, r) {
3375
3390
  b > y.current && p(b), $ = requestAnimationFrame(H);
3376
3391
  };
3377
3392
  return $ = requestAnimationFrame(H), () => cancelAnimationFrame($);
3378
- }, [l]), E(() => {
3393
+ }, [l]), S(() => {
3379
3394
  !I || r == null || r < N + 1.5 || (B(!1), Y("playVideo"));
3380
- }, [I, r, N]), E(() => {
3395
+ }, [I, r, N]), S(() => {
3381
3396
  r == null && D.current && (B(!1), Y("playVideo"));
3382
3397
  }, [r]);
3383
3398
  const T = t.length ? ((Se = t[t.length - 1].words[t[t.length - 1].words.length - 1]) == null ? void 0 : Se.end) ?? t[t.length - 1].start + 4 : 0, _ = e || T || 1, O = Ie(() => {
@@ -3385,15 +3400,15 @@ function ac(t, e, n, r) {
3385
3400
  let $ = 0;
3386
3401
  for (let H = 0; H < t.length; H++) t[H].start <= N + 0.05 && ($ = H);
3387
3402
  return $;
3388
- }, [t, N]), [te, K] = k(0), L = ($) => {
3403
+ }, [t, N]), [te, K] = v(0), L = ($) => {
3389
3404
  const H = Math.max(0, f.current != null ? Math.min($, Math.max(0, f.current - 0.5)) : $);
3390
- Y("seekTo", [H + m.current, !0]), v.current = { t: H, at: performance.now() }, p(H), K((A) => A + 1);
3405
+ Y("seekTo", [H + m.current, !0]), k.current = { t: H, at: performance.now() }, p(H), K((E) => E + 1);
3391
3406
  }, ie = j(!1), ne = j(void 0), G = ($) => {
3392
3407
  window.clearTimeout(ne.current), ne.current = window.setTimeout(() => {
3393
3408
  !ie.current || $ <= 0 || z.current === 1 || z.current === 3 || (Y("playVideo"), G($ - 1));
3394
3409
  }, 1200);
3395
3410
  };
3396
- E(() => () => window.clearTimeout(ne.current), []);
3411
+ S(() => () => window.clearTimeout(ne.current), []);
3397
3412
  const J = () => {
3398
3413
  if (ie.current = !0, !a.current) {
3399
3414
  o.current = !0;
@@ -3407,7 +3422,7 @@ function ac(t, e, n, r) {
3407
3422
  o.current = !0;
3408
3423
  return;
3409
3424
  }
3410
- if (X) {
3425
+ if (ee) {
3411
3426
  pe();
3412
3427
  return;
3413
3428
  }
@@ -3421,7 +3436,7 @@ function ac(t, e, n, r) {
3421
3436
  H && L(H.start);
3422
3437
  }, je = j(!1), De = () => {
3423
3438
  const $ = M.current || h.current;
3424
- S.muted = $, Y($ ? "mute" : "unMute");
3439
+ A.muted = $, Y($ ? "mute" : "unMute");
3425
3440
  }, Le = ($) => {
3426
3441
  M.current = $, d($), De();
3427
3442
  }, we = ($) => {
@@ -3429,17 +3444,17 @@ function ac(t, e, n, r) {
3429
3444
  };
3430
3445
  return { player: {
3431
3446
  autoplay: async () => {
3432
- const $ = (A) => new Promise((b) => setTimeout(b, A)), H = async (A, b) => {
3433
- for (let V = 0; V < b / 250 && !A(); V++) await $(250);
3434
- return A();
3447
+ const $ = (E) => new Promise((b) => setTimeout(b, E)), H = async (E, b) => {
3448
+ for (let V = 0; V < b / 250 && !E(); V++) await $(250);
3449
+ return E();
3435
3450
  };
3436
3451
  if (!await H(() => a.current, 1e4)) return null;
3437
3452
  Le(!0);
3438
- for (let A = 0; A < 5 && z.current !== 1; A++)
3453
+ for (let E = 0; E < 5 && z.current !== 1; E++)
3439
3454
  Y("playVideo"), await H(() => z.current === 1, 1500);
3440
3455
  return z.current !== 1 ? null : h.current ? (Le(!0), !1) : (Le(!1), await $(1200), z.current === 1 && F.current === !1 ? !0 : (Le(!0), Y("playVideo"), !1));
3441
3456
  },
3442
- playing: X,
3457
+ playing: ee,
3443
3458
  ended: l === 0,
3444
3459
  t: N,
3445
3460
  idx: O,
@@ -3457,16 +3472,16 @@ function ac(t, e, n, r) {
3457
3472
  seekFrac: ($) => L(Math.max(0, Math.min(1, $)) * _),
3458
3473
  seekWord: ($) => L($.start),
3459
3474
  playRow: ($) => {
3460
- Te($), X || J();
3475
+ Te($), ee || J();
3461
3476
  },
3462
3477
  stop: () => {
3463
3478
  pe(), L(0);
3464
3479
  },
3465
- engaged: X || N > 0,
3480
+ engaged: ee || N > 0,
3466
3481
  prev: () => Te(O - 1),
3467
3482
  next: () => Te(O + 1),
3468
3483
  hold: () => {
3469
- X && (Y("pauseVideo"), je.current = !0);
3484
+ ee && (Y("pauseVideo"), je.current = !0);
3470
3485
  },
3471
3486
  release: () => {
3472
3487
  je.current && (je.current = !1, J());
@@ -3479,16 +3494,16 @@ function ac(t, e, n, r) {
3479
3494
  wordSync: !0,
3480
3495
  pause: pe,
3481
3496
  setVolume: ($) => Y("setVolume", [Math.round($ * 100)])
3482
- }, lead: S, setVideoSound: we };
3497
+ }, lead: A, setVideoSound: we };
3483
3498
  }
3484
3499
  function oc(t, e, n, r, s = 0, a = null) {
3485
- var A;
3486
- const o = j(null), [l, c] = k(!1), [u, d] = k(0), [M, h] = k(!1), N = j(M);
3500
+ var E;
3501
+ const o = j(null), [l, c] = v(!1), [u, d] = v(0), [M, h] = v(!1), N = j(M);
3487
3502
  N.current = M;
3488
- const p = j(!1), [y, v] = k(null), [m, f] = k(!1), I = j(s);
3503
+ const p = j(!1), [y, k] = v(null), [m, f] = v(!1), I = j(s);
3489
3504
  I.current = s;
3490
- const C = j(null), [D, B] = k(0);
3491
- E(() => {
3505
+ const C = j(null), [D, B] = v(0);
3506
+ S(() => {
3492
3507
  f(!1);
3493
3508
  const b = C.current;
3494
3509
  if (C.current = null, b || d(0), !t) {
@@ -3498,45 +3513,45 @@ function oc(t, e, n, r, s = 0, a = null) {
3498
3513
  const V = pi(t), ce = I.current;
3499
3514
  return V.preload = "metadata", V.muted = N.current || p.current, V.onplay = () => c(!0), V.onpause = () => c(!1), V.onended = () => c(!1), V.onloadedmetadata = () => {
3500
3515
  f(!0), V.currentTime = ((b == null ? void 0 : b.t) ?? 0) + ce, b != null && b.playing && V.play().catch((W) => {
3501
- b.asked && (W == null ? void 0 : W.name) === "NotAllowedError" || v(It(W));
3516
+ b.asked && (W == null ? void 0 : W.name) === "NotAllowedError" || k(It(W));
3502
3517
  });
3503
3518
  }, V.onerror = () => {
3504
3519
  c(!1);
3505
3520
  const W = V.error, ye = Wa(W, !1);
3506
3521
  Qa(t).then((Z) => {
3507
- Wl(Z == null ? void 0 : Z.message) || gi(W), o.current === V && (v({ message: (Z == null ? void 0 : Z.message) ?? ye }), Z != null && Z.permanent || (o.current = null));
3522
+ Wl(Z == null ? void 0 : Z.message) || gi(W), o.current === V && (k({ message: (Z == null ? void 0 : Z.message) ?? ye }), Z != null && Z.permanent || (o.current = null));
3508
3523
  });
3509
3524
  }, o.current = V, () => {
3510
3525
  C.current = { t: Math.max(0, V.currentTime - ce), playing: !V.paused && !V.ended }, V.pause(), V.onplay = V.onpause = V.onended = V.onloadedmetadata = V.onerror = null, o.current = null;
3511
3526
  };
3512
- }, [t, D]), E(() => () => {
3527
+ }, [t, D]), S(() => () => {
3513
3528
  C.current = null;
3514
3529
  }, []);
3515
- const Y = n.length ? ((A = n[n.length - 1].words[n[n.length - 1].words.length - 1]) == null ? void 0 : A.end) ?? n[n.length - 1].start + 4 : 0, X = s > 0 || r != null && m && o.current != null && Number.isFinite(o.current.duration) && o.current.duration > r + 1, z = !X && m && o.current && Number.isFinite(o.current.duration) && o.current.duration || r || Y || 1, F = j(z);
3530
+ const Y = n.length ? ((E = n[n.length - 1].words[n[n.length - 1].words.length - 1]) == null ? void 0 : E.end) ?? n[n.length - 1].start + 4 : 0, ee = s > 0 || r != null && m && o.current != null && Number.isFinite(o.current.duration) && o.current.duration > r + 1, z = !ee && m && o.current && Number.isFinite(o.current.duration) && o.current.duration || r || Y || 1, F = j(z);
3516
3531
  F.current = z;
3517
- const S = j(X);
3518
- S.current = X;
3532
+ const A = j(ee);
3533
+ A.current = ee;
3519
3534
  const T = j(a);
3520
3535
  T.current = a;
3521
- const [_, O] = k(!1), te = j(!1), K = (b) => {
3536
+ const [_, O] = v(!1), te = j(!1), K = (b) => {
3522
3537
  te.current = b, O(b);
3523
3538
  };
3524
- E(() => {
3539
+ S(() => {
3525
3540
  var b;
3526
3541
  a == null && te.current && (K(!1), (b = o.current) == null || b.play().catch(() => {
3527
3542
  }));
3528
- }, [a]), E(() => {
3543
+ }, [a]), S(() => {
3529
3544
  var b;
3530
3545
  !_ || a == null || a < u + 1.5 || (K(!1), (b = o.current) == null || b.play().catch(() => {
3531
3546
  }));
3532
- }, [_, a, u]), E(() => {
3547
+ }, [_, a, u]), S(() => {
3533
3548
  if (!l) return;
3534
3549
  let b = 0;
3535
3550
  const V = () => {
3536
3551
  const ce = o.current;
3537
3552
  if (ce) {
3538
3553
  const W = ce.currentTime - I.current;
3539
- if (S.current && W >= F.current) {
3554
+ if (A.current && W >= F.current) {
3540
3555
  ce.pause(), d(F.current);
3541
3556
  return;
3542
3557
  }
@@ -3555,11 +3570,11 @@ function oc(t, e, n, r, s = 0, a = null) {
3555
3570
  let b = 0;
3556
3571
  for (let V = 0; V < n.length; V++) n[V].start <= u + 0.05 && (b = V);
3557
3572
  return b;
3558
- }, [n, u]), [ie, ne] = k(0), G = (b) => {
3573
+ }, [n, u]), [ie, ne] = v(0), G = (b) => {
3559
3574
  const V = T.current != null ? Math.min(b, Math.max(0, T.current - 0.5)) : b, ce = o.current;
3560
3575
  d(V), ce && (ce.currentTime = V + I.current), ne((W) => W + 1);
3561
3576
  }, J = (b) => {
3562
- (b == null ? void 0 : b.name) !== "AbortError" && v(It(b));
3577
+ (b == null ? void 0 : b.name) !== "AbortError" && k(It(b));
3563
3578
  }, pe = () => {
3564
3579
  var V;
3565
3580
  const b = o.current;
@@ -3568,7 +3583,7 @@ function oc(t, e, n, r, s = 0, a = null) {
3568
3583
  C.current = (V = C.current) != null && V.asked ? null : { t: u, playing: !0, asked: !0 };
3569
3584
  return;
3570
3585
  }
3571
- t && B((ce) => ce + 1), v({ message: e ? "The audio player is not ready yet — try again in a moment." : "There is no audio for this transcription." });
3586
+ t && B((ce) => ce + 1), k({ message: e ? "The audio player is not ready yet — try again in a moment." : "There is no audio for this transcription." });
3572
3587
  return;
3573
3588
  }
3574
3589
  if (l) {
@@ -3657,7 +3672,7 @@ function oc(t, e, n, r, s = 0, a = null) {
3657
3672
  hold: Re,
3658
3673
  release: Se,
3659
3674
  error: y,
3660
- clearError: () => v(null),
3675
+ clearError: () => k(null),
3661
3676
  has: e,
3662
3677
  edgeWait: _,
3663
3678
  wordSync: !0,
@@ -3676,11 +3691,11 @@ function oc(t, e, n, r, s = 0, a = null) {
3676
3691
  function lc(t, e, n, r, s, a, o = !1, l) {
3677
3692
  const c = j(/* @__PURE__ */ new Set());
3678
3693
  c.current = l ?? c.current;
3679
- const u = j(null), [d, M] = k(!1), [h, N] = k(0), [p, y] = k(0), [v, m] = k(!1), f = j(v);
3680
- f.current = v;
3681
- const [I, C] = k(null), [D, B] = k(null), [Y, X] = k(null), [z, F] = k(null), S = j(z);
3682
- S.current = z;
3683
- const [T, _] = k(null), [O, te] = k(null), [K, L] = k(null), [ie, ne] = k(!1), G = j(e);
3694
+ const u = j(null), [d, M] = v(!1), [h, N] = v(0), [p, y] = v(0), [k, m] = v(!1), f = j(k);
3695
+ f.current = k;
3696
+ const [I, C] = v(null), [D, B] = v(null), [Y, ee] = v(null), [z, F] = v(null), A = j(z);
3697
+ A.current = z;
3698
+ const [T, _] = v(null), [O, te] = v(null), [K, L] = v(null), [ie, ne] = v(!1), G = j(e);
3684
3699
  G.current = e;
3685
3700
  const J = j(o), pe = j([]);
3686
3701
  J.current = o, u.current && (u.current.flow = o);
@@ -3689,7 +3704,7 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3689
3704
  const je = j(a);
3690
3705
  je.current = a;
3691
3706
  const De = qe((U) => {
3692
- U.finite = !0, U.coming = (R) => c.current.has(R), U.readAhead = 6, U.readAheadS = 45, U.onWaiting = (R) => B(R), U.onStarting = (R) => X(R), U.onSentence = (R) => {
3707
+ U.finite = !0, U.coming = (R) => c.current.has(R), U.readAhead = 6, U.readAheadS = 45, U.onWaiting = (R) => B(R), U.onStarting = (R) => ee(R), U.onSentence = (R) => {
3693
3708
  if (M(U.playing), R == null) return;
3694
3709
  const q = G.current.findIndex((re) => re.sentenceId === R);
3695
3710
  q >= 0 && N(q);
@@ -3699,7 +3714,7 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3699
3714
  if (!J.current) return 0;
3700
3715
  const re = G.current, de = re.find((Ce) => Ce.sentenceId === R), Oe = re.find((Ce) => Ce.sentenceId === q);
3701
3716
  if (!Oe) return 0;
3702
- const me = S.current;
3717
+ const me = A.current;
3703
3718
  if (R == null) return me && me.sid === q ? Math.max(0, Oe.start - me.t) : 0;
3704
3719
  const ve = le.current;
3705
3720
  return ve && Date.now() - ve.at < 2e3 ? Math.max(0, Oe.start - (ve.t + (Date.now() - ve.at) / 1e3 * U.rate)) : !de || Oe.start <= de.start ? 0 : Math.max(0, Oe.start - Ut(de, de.start, de.start + 4));
@@ -3715,19 +3730,19 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3715
3730
  const re = G.current.find((de) => de.sentenceId === R);
3716
3731
  return !re || !q.has(re.speaker);
3717
3732
  };
3718
- }, []), Le = j(null), we = j(null), Ee = j(null), [Re, Se] = k(!1), $ = j(() => {
3733
+ }, []), Le = j(null), we = j(null), Ee = j(null), [Re, Se] = v(!1), $ = j(() => {
3719
3734
  }), H = (U) => {
3720
3735
  if (Ee.current = U, Se(!!(U != null && U.playing)), !U) return;
3721
3736
  const R = In(U, G.current, ze).index;
3722
3737
  N(R), Ae.current = R;
3723
- }, A = () => {
3738
+ }, E = () => {
3724
3739
  Ee.current && H(null);
3725
3740
  };
3726
- E(() => {
3741
+ S(() => {
3727
3742
  var q;
3728
3743
  if (Le.current !== r) {
3729
3744
  const re = Le.current != null ? we.current : null;
3730
- Le.current = r, (q = u.current) == null || q.stop(), u.current = new Nr(), De(u.current), u.current.setSequence(pe.current), M(!1), N(0), C(null), X(null), F(null), H(re && (re.playing || re.t > 0) ? re : null);
3745
+ Le.current = r, (q = u.current) == null || q.stop(), u.current = new Nr(), De(u.current), u.current.setSequence(pe.current), M(!1), N(0), C(null), ee(null), F(null), H(re && (re.playing || re.t > 0) ? re : null);
3731
3746
  }
3732
3747
  const U = u.current;
3733
3748
  U.setMuted(f.current);
@@ -3736,15 +3751,15 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3736
3751
  R && (J.current || t.some((re) => re.sentenceId >= (R.sentenceId ?? 0))) && (H(null), $.current(R));
3737
3752
  }, [r, t]);
3738
3753
  const b = Ie(() => o ? e.map((U) => U.sentenceId).filter((U) => U != null) : [], [e, o]);
3739
- pe.current = b, E(() => {
3754
+ pe.current = b, S(() => {
3740
3755
  var U;
3741
3756
  (U = u.current) == null || U.setSequence(b);
3742
- }, [b, r]), E(() => () => {
3757
+ }, [b, r]), S(() => () => {
3743
3758
  var U;
3744
3759
  (U = u.current) == null || U.stop(), u.current = null, Le.current = null;
3745
3760
  }, []);
3746
3761
  const V = T != null || O != null;
3747
- E(() => {
3762
+ S(() => {
3748
3763
  if (!d && !V) {
3749
3764
  _(null), te(null);
3750
3765
  return;
@@ -3752,9 +3767,9 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3752
3767
  const U = () => {
3753
3768
  var me, ve;
3754
3769
  const q = ((me = u.current) == null ? void 0 : me.resting()) ?? null;
3755
- ne(!!(q != null && q.silent)), q != null && q.silent && S.current && (S.current = null, F(null)), te((Ce) => q == null ? null : Ce != null && Math.abs(Ce - q.s) < 0.05 ? Ce : q.s);
3756
- const re = S.current;
3757
- q == null ? L(null) : re && re.sid === q.sentenceId && (L(re.t), S.current = null, F(null));
3770
+ ne(!!(q != null && q.silent)), q != null && q.silent && A.current && (A.current = null, F(null)), te((Ce) => q == null ? null : Ce != null && Math.abs(Ce - q.s) < 0.05 ? Ce : q.s);
3771
+ const re = A.current;
3772
+ q == null ? L(null) : re && re.sid === q.sentenceId && (L(re.t), A.current = null, F(null));
3758
3773
  const de = ((ve = u.current) == null ? void 0 : ve.position()) ?? null, Oe = de && je.current ? je.current[String(de.sentenceId)] ?? null : null;
3759
3774
  re && de && de.sentenceId === re.sid && de.t > 0.1 && F(null), _((Ce) => de ? Ce && Math.abs(Ce.t - de.t) < 0.05 && Ce.dur === de.dur && Ce.words === Oe ? Ce : { t: de.t, dur: de.dur, words: Oe } : Ce == null ? Ce : null);
3760
3775
  };
@@ -3780,13 +3795,13 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3780
3795
  N(R), Ae.current = R, y((Oe) => Oe + 1), (re = u.current) == null || re.seek(((q = e[R]) == null ? void 0 : q.sentenceId) ?? null), M(!!((de = u.current) != null && de.playing));
3781
3796
  }, Ve = (U) => {
3782
3797
  var R;
3783
- A(), F(null), (R = u.current) == null || R.startWithin(-1, 0), _e(U);
3798
+ E(), F(null), (R = u.current) == null || R.startWithin(-1, 0), _e(U);
3784
3799
  }, Q = (U) => {
3785
3800
  var de;
3786
3801
  const R = e[U], q = (R == null ? void 0 : R.start) ?? 0, re = ((de = e[U + 1]) == null ? void 0 : de.start) ?? Ut(R, q, ze);
3787
3802
  return { from: q, span: Math.max(0, re - q) };
3788
3803
  }, he = Q(Z), ue = Math.max(0, Math.min(he.span, Ut(e[Z], he.from, he.from + 4) - he.from)), ae = z ? z.t : o ? O != null && ie ? he.from + Math.min(he.span, O) : O != null ? K != null ? Math.min(he.from, K + O) : he.from + Math.min(he.span, ue + O) : T && T.dur > 0 ? he.from + Math.min(ue, T.t / T.dur * ue) : he.from : T && T.dur > 0 ? he.from + Math.min(he.span, T.t / T.dur * he.span) : he.from;
3789
- E(() => {
3804
+ S(() => {
3790
3805
  we.current = Ee.current ?? ql(e, ae, d, ze);
3791
3806
  });
3792
3807
  const fe = {
@@ -3794,7 +3809,7 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3794
3809
  t: ae,
3795
3810
  idx: Z,
3796
3811
  dur: ze,
3797
- muted: v,
3812
+ muted: k,
3798
3813
  wordSync: !1,
3799
3814
  timed: o,
3800
3815
  clipPos: z ? null : T,
@@ -3816,16 +3831,16 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3816
3831
  toggle: () => {
3817
3832
  var R, q, re;
3818
3833
  if (Re) {
3819
- A();
3834
+ E();
3820
3835
  return;
3821
3836
  }
3822
- if (A(), d) {
3837
+ if (E(), d) {
3823
3838
  (R = u.current) == null || R.pause(), M(!1);
3824
3839
  return;
3825
3840
  }
3826
3841
  C(null);
3827
3842
  const U = Ae.current;
3828
- if (!S.current && ((re = u.current) != null && re.resume(((q = e[U]) == null ? void 0 : q.sentenceId) ?? null))) {
3843
+ if (!A.current && ((re = u.current) != null && re.resume(((q = e[U]) == null ? void 0 : q.sentenceId) ?? null))) {
3829
3844
  M(!0);
3830
3845
  return;
3831
3846
  }
@@ -3833,11 +3848,11 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3833
3848
  },
3834
3849
  pause: () => {
3835
3850
  var U;
3836
- A(), (U = u.current) == null || U.pause(), M(!1);
3851
+ E(), (U = u.current) == null || U.pause(), M(!1);
3837
3852
  },
3838
3853
  stop: () => {
3839
3854
  var U, R, q;
3840
- A(), (U = u.current) == null || U.pause(), M(!1), N(0), _(null), (q = u.current) == null || q.seek(((R = e[0]) == null ? void 0 : R.sentenceId) ?? null);
3855
+ E(), (U = u.current) == null || U.pause(), M(!1), N(0), _(null), (q = u.current) == null || q.seek(((R = e[0]) == null ? void 0 : R.sentenceId) ?? null);
3841
3856
  },
3842
3857
  seekRow: Ve,
3843
3858
  resumeAt: (U) => {
@@ -3845,7 +3860,7 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3845
3860
  },
3846
3861
  seekFrac: (U) => {
3847
3862
  var ot, st, pt;
3848
- A();
3863
+ E();
3849
3864
  const R = Math.max(0, Math.min(1, U)) * ze;
3850
3865
  let q = 0;
3851
3866
  for (let Ze = 0; Ze < e.length; Ze++) e[Ze].start <= R && (q = Ze);
@@ -3854,7 +3869,7 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3854
3869
  const Ze = de ? q : q + 1, it = e[Ze];
3855
3870
  (ot = u.current) == null || ot.startWithin(-1, 0);
3856
3871
  const dt = { t: R, sid: it.sentenceId ?? null };
3857
- S.current = dt, F(dt), _e(Ze);
3872
+ A.current = dt, F(dt), _e(Ze);
3858
3873
  return;
3859
3874
  }
3860
3875
  const Oe = (re == null ? void 0 : re.sentenceId) ?? null, { from: me, span: ve } = Q(q);
@@ -3877,7 +3892,7 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3877
3892
  } : void 0,
3878
3893
  playRow: (U) => {
3879
3894
  var q;
3880
- A();
3895
+ E();
3881
3896
  const R = Math.max(0, Math.min(Math.max(0, e.length - 1), U));
3882
3897
  F(null), (q = u.current) == null || q.startWithin(-1, 0), N(R), Ae.current = R, y((re) => re + 1), ge(R);
3883
3898
  },
@@ -3906,12 +3921,12 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3906
3921
  var re, de, Oe, me;
3907
3922
  const R = (re = e[U]) == null ? void 0 : re.sentenceId;
3908
3923
  if (R == null) return;
3909
- N(U), Ae.current = U, F(null), S.current = null, (de = u.current) == null || de.joinSilently(R);
3924
+ N(U), Ae.current = U, F(null), A.current = null, (de = u.current) == null || de.joinSilently(R);
3910
3925
  const q = ((Oe = u.current) == null ? void 0 : Oe.resting()) ?? null;
3911
3926
  te((q == null ? void 0 : q.s) ?? null), ne(!!(q != null && q.silent)), M(!!((me = u.current) != null && me.playing));
3912
3927
  }
3913
3928
  return fe.joinAt = o ? (U) => {
3914
- A(), Ye(In({ t: U, playing: !0, sentenceId: null, offset: 0, ended: !1 }, e, ze).index);
3929
+ E(), Ye(In({ t: U, playing: !0, sentenceId: null, offset: 0, ended: !1 }, e, ze).index);
3915
3930
  } : void 0, $.current = (U) => {
3916
3931
  var q;
3917
3932
  const R = In(U, e, ze);
@@ -3924,13 +3939,13 @@ function lc(t, e, n, r, s, a, o = !1, l) {
3924
3939
  }
3925
3940
  const cc = () => {
3926
3941
  }, uc = "The language this recording is read aloud in.", dc = { title: "READ IN", note: "The transcript and its voice switch to this language." };
3927
- function hc({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, langs: o, srcLang: l, canTranslate: c, pickedLang: u, setPickedLang: d, side: M, hearOriginal: h = !1, timed: N = !1, stockVoices: p = !1, stickyPicker: y = !1, pickerBusy: v = null, voiceSheet: m, forcedVoice: f = null }) {
3942
+ function hc({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, langs: o, srcLang: l, canTranslate: c, pickedLang: u, setPickedLang: d, side: M, hearOriginal: h = !1, timed: N = !1, stockVoices: p = !1, stickyPicker: y = !1, pickerBusy: k = null, voiceSheet: m, forcedVoice: f = null }) {
3928
3943
  var Lt, un, dn, Kt;
3929
- const { onAddVoice: I, onPickVoice: C, onSelectSpeaker: D, noCloneFor: B, castNoClone: Y, castShort: X, castBuilding: z, castWarn: F, badge: S, titleNode: T } = m ?? {}, _ = !!m, O = !!(m != null && m.pendingClones), [te, K] = wi(), [L, ie] = k(null), [ne, G] = k(!1), [J, pe] = k(!1), [le, Te] = k(!1), [je, De] = k(!1), Le = u ?? l, we = u === null, Ee = u != null || L != null, Se = ((P) => !!P && !!(o != null && o.voice.includes(P)))(we ? l : Le) ? we ? l : Le : "en", $ = Zl(Se), H = (m == null ? void 0 : m.cloneOn) ?? !0, [A, b] = k(0), V = j(H);
3930
- E(() => {
3944
+ const { onAddVoice: I, onPickVoice: C, onSelectSpeaker: D, noCloneFor: B, castNoClone: Y, castShort: ee, castBuilding: z, castWarn: F, badge: A, titleNode: T } = m ?? {}, _ = !!m, O = !!(m != null && m.pendingClones), [te, K] = wi(), [L, ie] = v(null), [ne, G] = v(!1), [J, pe] = v(!1), [le, Te] = v(!1), [je, De] = v(!1), Le = u ?? l, we = u === null, Ee = u != null || L != null, Se = ((P) => !!P && !!(o != null && o.voice.includes(P)))(we ? l : Le) ? we ? l : Le : "en", $ = Zl(Se), H = (m == null ? void 0 : m.cloneOn) ?? !0, [E, b] = v(0), V = j(H);
3945
+ S(() => {
3931
3946
  V.current !== H && (V.current = H, b((P) => P + 1));
3932
3947
  }, [H]);
3933
- const ce = Ol(Se, Ee || s || J, Cl(e) * 1e3 + A, { id: t ?? null, shareCode: a.shareCode ?? null }), W = Ie(() => ((ce == null ? void 0 : ce.voices) ?? []).filter((P) => _ || !P.cloned || P.speaker != null), [ce, _]), ye = W.length > 1, Z = vr(o, Le), ke = xi(), ze = Ie(() => Li(o, "translation"), [o]), [Ge, Ae] = k(null), [ge] = k(() => /* @__PURE__ */ new Set()), [_e, Ve] = k({}), Q = Ie(() => vl(n, e, ke.vcUnknownSpk), [n, e, ke]), he = ye && Q.filter((P) => P.key >= 0).length > 1, ue = Ge != null && Q.some((P) => P.key === Ge) ? Ge : ((Lt = Q[0]) == null ? void 0 : Lt.key) ?? null, ae = Ie(() => {
3948
+ const ce = Ol(Se, Ee || s || J, Cl(e) * 1e3 + E, { id: t ?? null, shareCode: a.shareCode ?? null }), W = Ie(() => ((ce == null ? void 0 : ce.voices) ?? []).filter((P) => _ || !P.cloned || P.speaker != null), [ce, _]), ye = W.length > 1, Z = vr(o, Le), ke = xi(), ze = Ie(() => Li(o, "translation"), [o]), [Ge, Ae] = v(null), [ge] = v(() => /* @__PURE__ */ new Set()), [_e, Ve] = v({}), Q = Ie(() => vl(n, e, ke.vcUnknownSpk), [n, e, ke]), he = ye && Q.filter((P) => P.key >= 0).length > 1, ue = Ge != null && Q.some((P) => P.key === Ge) ? Ge : ((Lt = Q[0]) == null ? void 0 : Lt.key) ?? null, ae = Ie(() => {
3934
3949
  const P = ti(Q, W, H);
3935
3950
  for (const [xe, He] of Object.entries(_e[Se ?? ""] ?? {})) P.set(Number(xe), He);
3936
3951
  return P;
@@ -3941,17 +3956,17 @@ function hc({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
3941
3956
  var xe;
3942
3957
  return P.id === ((xe = me.track) == null ? void 0 : xe.voice);
3943
3958
  }) ?? W.find((P) => P.default) ?? W[0] ?? null, Ce = (ve == null ? void 0 : ve.id) ?? null;
3944
- E(() => {
3959
+ S(() => {
3945
3960
  if (!me.rendering) return;
3946
3961
  const P = setInterval(me.reload, 4e3);
3947
3962
  return () => clearInterval(P);
3948
3963
  }, [me.rendering, me.reload]);
3949
3964
  const We = `${t ?? ""}|${Le ?? ""}|${f || (U ?? L ?? ((un = me.track) == null ? void 0 : un.voiceKey) ?? "default")}`, Be = lc(me.clips, n, r, We, ge, (dn = me.track) == null ? void 0 : dn.wordTimes, N, me.coming);
3950
- E(() => {
3965
+ S(() => {
3951
3966
  var xe;
3952
3967
  const P = (xe = n[Be.idx]) == null ? void 0 : xe.sentenceId;
3953
3968
  P != null && me.setNear(P);
3954
- }, [Be.idx]), E(() => {
3969
+ }, [Be.idx]), S(() => {
3955
3970
  !je || !Be.has || (De(!1), Be.playing || Be.toggle());
3956
3971
  }, [je, Be.has]);
3957
3972
  const ot = me.rendering, st = ot ? null : me.failed ?? null, pt = !1, Ze = Ee && de, it = Ee && !we && de && !(me.listed && me.listed.lang === Le && me.listed.recordingId === t), dt = {
@@ -4000,7 +4015,7 @@ function hc({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
4000
4015
  return;
4001
4016
  }
4002
4017
  ie(P);
4003
- }, Mt = we ? { ...vr(o, null), flag: /* @__PURE__ */ i(oe, { d: ee.langAuto, size: 21, sw: 1.7, style: { color: "currentColor", display: "block" } }) } : Z, St = c ? M ? /* @__PURE__ */ i("span", { className: "barchip", style: lt ? { background: "var(--brand-tint)", boxShadow: "0 0 0 1.5px var(--brand)" } : void 0, children: /* @__PURE__ */ i(xn, { flag: Mt.flag, code: Mt.code, bordered: !1, onClick: se, flagOnly: !0, label: Mt.label }) }) : /* @__PURE__ */ i(xn, { flag: Mt.flag, code: Mt.code, bordered: !1, onClick: Qe, flagOnly: !0, label: Mt.label }) : null, Pt = ee.voiceClone, Ot = Ee && (!!me.track || ot), Yn = st ? "var(--conf-low)" : Ot || M && Tt ? "var(--brand)" : "var(--ink-55)", Qt = ot || !!Be.preparing && Ee, Je = Be.preparing ? `Speaking this line in ${(ve == null ? void 0 : ve.name) ?? "this voice"}…` : ot ? `Preparing this recording in ${(ve == null ? void 0 : ve.name) ?? "this voice"} — it will play as soon as it is ready` : st ? `This voice could not be prepared: ${st}` : re ? ye ? "Choose a voice" : ve ? ve.name : ke.vcNoVoice + Z.label : `${ke.vcNoVoice}${Z.label}`, gt = /* @__PURE__ */ i(to, { open: ne, onClose: Ft, keepOpen: (!!M || y) && !le, value: we ? null : Le, onSelect: Dt, languages: ze, title: (M == null ? void 0 : M.title) ?? "SPOKEN LANGUAGE", note: (M == null ? void 0 : M.note) ?? uc, searchPlaceholder: ke.search, none: "Original", pinned: (we ? l : Le) ? [we ? l : Le] : [], recent: te, requireVoice: le, sticky: y, busy: v }), Ct = Ie(() => W.filter((P) => P.cloned && !P.auto), [W]), ct = (P) => P.voiceId ? Ct.find((xe) => xe.id === `clone:${P.voiceId}`) ?? null : null, et = Ie(() => Q.filter((P) => P.key >= 0), [Q]), Zt = Ie(() => {
4018
+ }, Mt = we ? { ...vr(o, null), flag: /* @__PURE__ */ i(oe, { d: X.langAuto, size: 21, sw: 1.7, style: { color: "currentColor", display: "block" } }) } : Z, St = c ? M ? /* @__PURE__ */ i("span", { className: "barchip", style: lt ? { background: "var(--brand-tint)", boxShadow: "0 0 0 1.5px var(--brand)" } : void 0, children: /* @__PURE__ */ i(xn, { flag: Mt.flag, code: Mt.code, bordered: !1, onClick: se, flagOnly: !0, label: Mt.label }) }) : /* @__PURE__ */ i(xn, { flag: Mt.flag, code: Mt.code, bordered: !1, onClick: Qe, flagOnly: !0, label: Mt.label }) : null, Pt = X.voiceClone, Ot = Ee && (!!me.track || ot), Yn = st ? "var(--conf-low)" : Ot || M && Tt ? "var(--brand)" : "var(--ink-55)", Qt = ot || !!Be.preparing && Ee, Je = Be.preparing ? `Speaking this line in ${(ve == null ? void 0 : ve.name) ?? "this voice"}…` : ot ? `Preparing this recording in ${(ve == null ? void 0 : ve.name) ?? "this voice"} — it will play as soon as it is ready` : st ? `This voice could not be prepared: ${st}` : re ? ye ? "Choose a voice" : ve ? ve.name : ke.vcNoVoice + Z.label : `${ke.vcNoVoice}${Z.label}`, gt = /* @__PURE__ */ i(to, { open: ne, onClose: Ft, keepOpen: (!!M || y) && !le, value: we ? null : Le, onSelect: Dt, languages: ze, title: (M == null ? void 0 : M.title) ?? "SPOKEN LANGUAGE", note: (M == null ? void 0 : M.note) ?? uc, searchPlaceholder: ke.search, none: "Original", pinned: (we ? l : Le) ? [we ? l : Le] : [], recent: te, requireVoice: le, sticky: y, busy: k }), Ct = Ie(() => W.filter((P) => P.cloned && !P.auto), [W]), ct = (P) => P.voiceId ? Ct.find((xe) => xe.id === `clone:${P.voiceId}`) ?? null : null, et = Ie(() => Q.filter((P) => P.key >= 0), [Q]), Zt = Ie(() => {
4004
4019
  const P = W.filter((He) => !He.cloned);
4005
4020
  if (!he) return [...P, ...s && et.length === 1 ? Ct.filter((He) => He.id === `clone:${et[0].voiceId}`) : []];
4006
4021
  const xe = [];
@@ -4013,7 +4028,7 @@ function hc({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
4013
4028
  }, [W, Ct, he, et, O, s]), at = he ? et.find((P) => P.key === ue) ?? null : null, sn = (P) => {
4014
4029
  var xe;
4015
4030
  return P ? ((xe = W.find((He) => He.id === P)) == null ? void 0 : xe.gender) ?? null : null;
4016
- }, an = at ? at.sex ?? sn(ae.get(at.key)) : null, qt = Ie(() => at ? Zt.filter((P) => P.cloned ? P.live ? P.speaker === at.key : P.id === `clone:${at.voiceId}` : !0) : Zt, [Zt, at, an, et]), wt = (P) => W.find((xe) => xe.cloned && xe.auto && xe.speaker === P) ?? null, $e = { people: et, gvList: W, autoOf: wt, savedFor: ct }, bt = (S == null ? void 0 : S($e)) ?? 0, on = F ? et.map((P) => F(P, $e)).filter((P) => !!P) : [], ln = /* @__PURE__ */ g("button", { type: "button", className: "txvoice", "aria-label": "Voice", "aria-pressed": M ? Tt : void 0, title: Qt || st ? Je : void 0, style: { cursor: "pointer", background: Ot || Qt || M && Tt ? "var(--brand-tint)" : "var(--fill-06)", boxShadow: M && Tt ? "inset 0 0 0 1.5px var(--brand)" : void 0 }, onClick: M ? Gt : Ke, children: [
4031
+ }, an = at ? at.sex ?? sn(ae.get(at.key)) : null, qt = Ie(() => at ? Zt.filter((P) => P.cloned ? P.live ? P.speaker === at.key : P.id === `clone:${at.voiceId}` : !0) : Zt, [Zt, at, an, et]), wt = (P) => W.find((xe) => xe.cloned && xe.auto && xe.speaker === P) ?? null, $e = { people: et, gvList: W, autoOf: wt, savedFor: ct }, bt = (A == null ? void 0 : A($e)) ?? 0, on = F ? et.map((P) => F(P, $e)).filter((P) => !!P) : [], ln = /* @__PURE__ */ g("button", { type: "button", className: "txvoice", "aria-label": "Voice", "aria-pressed": M ? Tt : void 0, title: Qt || st ? Je : void 0, style: { cursor: "pointer", background: Ot || Qt || M && Tt ? "var(--brand-tint)" : "var(--fill-06)", boxShadow: M && Tt ? "inset 0 0 0 1.5px var(--brand)" : void 0 }, onClick: M ? Gt : Ke, children: [
4017
4032
  Qt ? /* @__PURE__ */ i("span", { style: { width: 16, height: 16, borderRadius: "50%", border: "2px solid var(--fill-10)", borderTopColor: "var(--brand)", animation: "vs-spin .7s linear infinite" } }) : /* @__PURE__ */ i(oe, { d: Pt, size: 17, sw: 1.6, style: { color: Yn } }),
4018
4033
  on.length > 0 ? /* @__PURE__ */ i("span", { className: "txvoice__warn", title: on.join(" · "), children: "!" }) : !!bt && /* @__PURE__ */ i("span", { className: "txvoice__n", title: `${bt} speaker${bt === 1 ? "" : "s"} can get a cloned voice`, children: bt })
4019
4034
  ] }), tt = /* @__PURE__ */ i(Wt, { open: J, onClose: ht, title: ke.vcSheet, titleNode: T, doneLabel: ke.done, children: /* @__PURE__ */ i(
@@ -4030,7 +4045,7 @@ function hc({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
4030
4045
  $.reset(), Ae(P), D == null || D(P);
4031
4046
  },
4032
4047
  noClone: (P) => !!(Y != null && Y(P, $e)),
4033
- short: (P) => !!(X != null && X(P, $e)),
4048
+ short: (P) => !!(ee != null && ee(P, $e)),
4034
4049
  warn: (P) => (F == null ? void 0 : F(P, $e)) ?? null,
4035
4050
  building: (P) => !ct(P) && (W.some((xe) => xe.cloned && xe.speaker === P.key && xe.ready === !1) || !!(z != null && z(P, $e))),
4036
4051
  sexOf: (P) => P.sex ?? sn(ae.get(P.key))
@@ -4091,7 +4106,7 @@ function hc({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
4091
4106
  openPicker: Qe,
4092
4107
  original: we,
4093
4108
  reloadVoices: () => b((P) => P + 1),
4094
- voicesVer: A,
4109
+ voicesVer: E,
4095
4110
  people: et,
4096
4111
  gvList: W,
4097
4112
  autoOf: wt,
@@ -4118,19 +4133,19 @@ function hc({ recordingId: t, model: e, rows: n, lenS: r, ended: s, cred: a, lan
4118
4133
  langList: { value: we ? null : Le, onSelect: Dt, languages: ze, searchPlaceholder: ke.search, none: "Original", pinned: (we ? l : Le) ? [we ? l : Le] : [], recent: te }
4119
4134
  };
4120
4135
  }
4121
- function Mc({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a, onWord: o, onFix: l, fixMode: c, fixingId: u, marks: d = !0, fixBadges: M = !0, tail: h, tailFg: N, running: p, desk: y, feedRef: v, listener: m, showLabels: f, find: I, findOpen: C, lang: D, warm: B, onVisible: Y, wordHl: X = !0 }) {
4122
- const { playing: z, engaged: F, t: S, idx: T, seekN: _, wordSync: O, clipPos: te } = n;
4123
- Rl(!0, v);
4136
+ function Mc({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a, onWord: o, onFix: l, fixMode: c, fixingId: u, marks: d = !0, fixBadges: M = !0, tail: h, tailFg: N, running: p, desk: y, feedRef: k, listener: m, showLabels: f, find: I, findOpen: C, lang: D, warm: B, onVisible: Y, wordHl: ee = !0 }) {
4137
+ const { playing: z, engaged: F, t: A, idx: T, seekN: _, wordSync: O, clipPos: te } = n;
4138
+ Rl(!0, k);
4124
4139
  const K = j(null);
4125
- Ml(v, K);
4126
- const [L, ie] = k(null), ne = (I ?? "").trim().toLowerCase(), [G, J] = k(0), pe = j(0), le = j(null), Te = j(T), je = (H) => {
4127
- var A;
4128
- return ((A = v.current) == null ? void 0 : A.querySelector(`[data-tx-row="${H}"]`)) ?? null;
4140
+ Ml(k, K);
4141
+ const [L, ie] = v(null), ne = (I ?? "").trim().toLowerCase(), [G, J] = v(0), pe = j(0), le = j(null), Te = j(T), je = (H) => {
4142
+ var E;
4143
+ return ((E = k.current) == null ? void 0 : E.querySelector(`[data-tx-row="${H}"]`)) ?? null;
4129
4144
  }, De = j("");
4130
- E(() => {
4131
- const H = v.current;
4145
+ S(() => {
4146
+ const H = k.current;
4132
4147
  if (!H || !Y) return;
4133
- const A = () => {
4148
+ const E = () => {
4134
4149
  const W = H.getBoundingClientRect(), ye = [];
4135
4150
  for (const ke of Array.from(H.querySelectorAll("[data-sentence]"))) {
4136
4151
  const ze = ke.getBoundingClientRect();
@@ -4138,45 +4153,45 @@ function Mc({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
4138
4153
  }
4139
4154
  const Z = ye.join(",");
4140
4155
  Z !== De.current && (De.current = Z, Y(ye));
4141
- }, b = window.setTimeout(A, 120);
4156
+ }, b = window.setTimeout(E, 120);
4142
4157
  let V;
4143
4158
  const ce = () => {
4144
- window.clearTimeout(V), V = window.setTimeout(A, 120);
4159
+ window.clearTimeout(V), V = window.setTimeout(E, 120);
4145
4160
  };
4146
4161
  return H.addEventListener("scroll", ce, { passive: !0 }), () => {
4147
4162
  window.clearTimeout(b), window.clearTimeout(V), H.removeEventListener("scroll", ce);
4148
4163
  };
4149
- }, [e, Y, v]);
4164
+ }, [e, Y, k]);
4150
4165
  const Le = (H) => {
4151
- const A = v.current, b = je(H);
4152
- if (!A || !b) return;
4153
- const V = b.getBoundingClientRect().top - A.getBoundingClientRect().top + A.scrollTop, ce = A.scrollHeight - A.clientHeight, W = dr(A), ye = Math.max(80, A.clientHeight - W.top - W.bottom), Z = b.offsetHeight > ye ? 8 : (ye - b.offsetHeight) / 2;
4154
- A.scrollTop = Math.max(0, Math.min(ce, V - W.top - Z));
4166
+ const E = k.current, b = je(H);
4167
+ if (!E || !b) return;
4168
+ const V = b.getBoundingClientRect().top - E.getBoundingClientRect().top + E.scrollTop, ce = E.scrollHeight - E.clientHeight, W = dr(E), ye = Math.max(80, E.clientHeight - W.top - W.bottom), Z = b.offsetHeight > ye ? 8 : (ye - b.offsetHeight) / 2;
4169
+ E.scrollTop = Math.max(0, Math.min(ce, V - W.top - Z));
4155
4170
  }, we = (H) => {
4156
- const A = v.current, b = je(H);
4157
- if (!A || !A.clientHeight || !A.offsetParent || !b) return 0;
4158
- const V = b.getBoundingClientRect(), ce = A.getBoundingClientRect(), W = dr(A), ye = ce.top + W.top, Z = ce.bottom - W.bottom;
4171
+ const E = k.current, b = je(H);
4172
+ if (!E || !E.clientHeight || !E.offsetParent || !b) return 0;
4173
+ const V = b.getBoundingClientRect(), ce = E.getBoundingClientRect(), W = dr(E), ye = ce.top + W.top, Z = ce.bottom - W.bottom;
4159
4174
  return V.height > Z - ye ? V.top < ye - 4 ? -1 : V.top > Z - 60 ? 1 : 0 : V.bottom < ye + 10 ? -1 : V.bottom > Z - 4 ? 1 : 0;
4160
4175
  }, Ee = (H) => {
4161
4176
  pe.current = performance.now() + 420;
4162
- const A = v.current, b = je(H);
4163
- if (!A || !A.clientHeight || !b) return;
4164
- const V = b.getBoundingClientRect(), ce = A.getBoundingClientRect(), W = A.scrollHeight - A.clientHeight, ye = A.scrollTop, Z = dr(A), ke = Math.max(80, A.clientHeight - Z.top - Z.bottom), ze = V.height > ke ? 8 : (ke - V.height) / 2, Ge = Math.max(0, Math.min(W, ye + (V.top - ce.top) - Z.top - ze));
4177
+ const E = k.current, b = je(H);
4178
+ if (!E || !E.clientHeight || !b) return;
4179
+ const V = b.getBoundingClientRect(), ce = E.getBoundingClientRect(), W = E.scrollHeight - E.clientHeight, ye = E.scrollTop, Z = dr(E), ke = Math.max(80, E.clientHeight - Z.top - Z.bottom), ze = V.height > ke ? 8 : (ke - V.height) / 2, Ge = Math.max(0, Math.min(W, ye + (V.top - ce.top) - Z.top - ze));
4165
4180
  if (le.current && cancelAnimationFrame(le.current), Math.abs(Ge - ye) < 2) {
4166
- A.scrollTop = Ge, le.current = null;
4181
+ E.scrollTop = Ge, le.current = null;
4167
4182
  return;
4168
4183
  }
4169
4184
  const Ae = performance.now(), ge = 360, _e = () => {
4170
4185
  const Ve = Math.min(1, (performance.now() - Ae) / ge);
4171
- A.scrollTop = ye + (Ge - ye) * (1 - Math.pow(1 - Ve, 3)), le.current = Ve < 1 ? requestAnimationFrame(_e) : null;
4186
+ E.scrollTop = ye + (Ge - ye) * (1 - Math.pow(1 - Ve, 3)), le.current = Ve < 1 ? requestAnimationFrame(_e) : null;
4172
4187
  };
4173
4188
  le.current = requestAnimationFrame(_e);
4174
4189
  };
4175
- E(() => () => {
4190
+ S(() => () => {
4176
4191
  le.current && cancelAnimationFrame(le.current);
4177
4192
  }, []);
4178
4193
  const Re = j(0);
4179
- E(() => {
4194
+ S(() => {
4180
4195
  if (!z) {
4181
4196
  Te.current = T, Re.current = 0, J(0);
4182
4197
  return;
@@ -4188,9 +4203,9 @@ function Mc({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
4188
4203
  b && V && !Re.current && (Le(T), V = 0), Re.current = V, J(V);
4189
4204
  };
4190
4205
  H();
4191
- const A = setInterval(H, 200);
4192
- return () => clearInterval(A);
4193
- }, [T, z]), E(() => {
4206
+ const E = setInterval(H, 200);
4207
+ return () => clearInterval(E);
4208
+ }, [T, z]), S(() => {
4194
4209
  _ && Ee(T);
4195
4210
  }, [_]);
4196
4211
  const Se = () => {
@@ -4199,15 +4214,15 @@ function Mc({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
4199
4214
  /* @__PURE__ */ i(oe, { d: H === "up" ? "m4.5 15.75 7.5-7.5 7.5 7.5" : "m19.5 8.25-7.5 7.5-7.5-7.5", size: 15, sw: 2 }),
4200
4215
  "Now playing"
4201
4216
  ] }) });
4202
- return /* @__PURE__ */ g("div", { ref: v, "data-tx-feed": "1", className: `txfeed${y ? " txfeed--desk" : ""}${C && !p ? " is-find" : ""}`, children: [
4217
+ return /* @__PURE__ */ g("div", { ref: k, "data-tx-feed": "1", className: `txfeed${y ? " txfeed--desk" : ""}${C && !p ? " is-find" : ""}`, children: [
4203
4218
  /* @__PURE__ */ i(gl, { thumbRef: K }),
4204
4219
  z && G === -1 && $("up"),
4205
- e.map((H, A) => {
4220
+ e.map((H, E) => {
4206
4221
  var he;
4207
- const b = z && A === T, V = F && A === T, ce = !!u && u === H.id, W = ne && !H.text.toLowerCase().includes(ne) && !(D && ((he = H.translations[D]) != null && he.toLowerCase().includes(ne))) ? 0.22 : !F || A <= T || ce ? 1 : 0.38, ye = m ? () => n.playRow(A) : c && l ? () => {
4208
- z && !b && n.seekRow(A), l(H);
4209
- } : z && b ? void 0 : () => n.playRow(A), Z = m ? null : Nl(H, s, r), ke = !!Z && (Z.script > 0 || Z.manual), ze = y && !!a && L === H.id && !!Z && !ke, Ge = Dr(t, H.speaker), Ae = Sr(t, H.speaker), ge = Ae.lane, _e = D && H.translations[D] && H.language !== D ? H.translations[D] : null, Ve = Ui(e, A, D), Q = V && !O && te ? yi(Ve.map((ue) => ({ t: ue.text, sp: " " })), te) : null;
4210
- return /* @__PURE__ */ g("div", { "data-tx-row": A, "data-sentence": H.sentenceId, className: `txline${B ? " txline--warm" : ""}${ce ? " txline--fixing" : ""}`, "aria-current": ce || void 0, style: { opacity: W }, onClick: ye, onMouseEnter: y && a ? () => ie(H.id) : void 0, onMouseLeave: y && a ? () => ie(null) : void 0, children: [
4222
+ const b = z && E === T, V = F && E === T, ce = !!u && u === H.id, W = ne && !H.text.toLowerCase().includes(ne) && !(D && ((he = H.translations[D]) != null && he.toLowerCase().includes(ne))) ? 0.22 : !F || E <= T || ce ? 1 : 0.38, ye = m ? () => n.playRow(E) : c && l ? () => {
4223
+ z && !b && n.seekRow(E), l(H);
4224
+ } : z && b ? void 0 : () => n.playRow(E), Z = m ? null : Nl(H, s, r), ke = !!Z && (Z.script > 0 || Z.manual), ze = y && !!a && L === H.id && !!Z && !ke, Ge = Dr(t, H.speaker), Ae = Sr(t, H.speaker), ge = Ae.lane, _e = D && H.translations[D] && H.language !== D ? H.translations[D] : null, Ve = Ui(e, E, D), Q = V && !O && te ? yi(Ve.map((ue) => ({ t: ue.text, sp: " " })), te) : null;
4225
+ return /* @__PURE__ */ g("div", { "data-tx-row": E, "data-sentence": H.sentenceId, className: `txline${B ? " txline--warm" : ""}${ce ? " txline--fixing" : ""}`, "aria-current": ce || void 0, style: { opacity: W }, onClick: ye, onMouseEnter: y && a ? () => ie(H.id) : void 0, onMouseLeave: y && a ? () => ie(null) : void 0, children: [
4211
4226
  /* @__PURE__ */ g("div", { className: "txline__meta", children: [
4212
4227
  /* @__PURE__ */ i("span", { className: "txline__at", children: zt(H.start) }),
4213
4228
  f && H.speaker >= 0 && /* @__PURE__ */ g(be, { children: [
@@ -4215,12 +4230,12 @@ function Mc({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
4215
4230
  /* @__PURE__ */ i("span", { className: `txline__who lane-${ge}`, style: Ae.fg ? { color: Ae.fg } : void 0, children: Ge }),
4216
4231
  Ae.hasVoice && /* @__PURE__ */ i(Ei, { color: Ae.fg ?? `var(--lane-${ge})` })
4217
4232
  ] }),
4218
- b && /* @__PURE__ */ i("span", { title: "Playing", style: { flex: "none", display: "inline-flex", alignItems: "center" }, children: /* @__PURE__ */ i(oe, { d: ee.headphones, size: y ? 15 : 14, sw: 1.6, stroke: f && H.speaker >= 0 ? Ae.fg ?? `var(--lane-${ge})` : "var(--ink-45)" }) }),
4233
+ b && /* @__PURE__ */ i("span", { title: "Playing", style: { flex: "none", display: "inline-flex", alignItems: "center" }, children: /* @__PURE__ */ i(oe, { d: X.headphones, size: y ? 15 : 14, sw: 1.6, stroke: f && H.speaker >= 0 ? Ae.fg ?? `var(--lane-${ge})` : "var(--ink-45)" }) }),
4219
4234
  Z && M && /* @__PURE__ */ i(ml, { f: Z, desk: y, onOpen: a ? () => a(H, !0) : void 0 }),
4220
4235
  ze && /* @__PURE__ */ i(yl, { alone: !0, onOpen: () => a == null ? void 0 : a(H, !1) })
4221
4236
  ] }),
4222
4237
  /* @__PURE__ */ i("div", { className: "txline__text", children: Ve.map((ue, ae) => {
4223
- const fe = `${ue.seq}:${ue.idx}`, Ye = Uo(ue.prob), U = V && X, R = U && (O ? S >= ue.start && (S < ue.end || ae === Ve.length - 1 || S < Ve[ae + 1].start) : ae === Q), q = U && !R && (O ? ue.start > S : Q != null && ae > Q), re = !_e && !m && (!!(r != null && r.has(fe)) || !!ue.script), de = !_e && !m && d && !!Ye && !re, Oe = de ? Ye === "low" ? "var(--conf-low-half)" : "var(--conf-mid-half)" : null, me = re ? "var(--brand)" : q ? "var(--ink-40)" : Oe ?? "var(--ink-96)";
4238
+ const fe = `${ue.seq}:${ue.idx}`, Ye = Uo(ue.prob), U = V && ee, R = U && (O ? A >= ue.start && (A < ue.end || ae === Ve.length - 1 || A < Ve[ae + 1].start) : ae === Q), q = U && !R && (O ? ue.start > A : Q != null && ae > Q), re = !_e && !m && (!!(r != null && r.has(fe)) || !!ue.script), de = !_e && !m && d && !!Ye && !re, Oe = de ? Ye === "low" ? "var(--conf-low-half)" : "var(--conf-mid-half)" : null, me = re ? "var(--brand)" : q ? "var(--ink-40)" : Oe ?? "var(--ink-96)";
4224
4239
  return /* @__PURE__ */ g("span", { children: [
4225
4240
  /* @__PURE__ */ i(
4226
4241
  "span",
@@ -4237,7 +4252,7 @@ function Mc({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
4237
4252
  (Ce = n.seekWord) == null || Ce.call(n, ue);
4238
4253
  return;
4239
4254
  }
4240
- n.playRow(A);
4255
+ n.playRow(E);
4241
4256
  } : void 0,
4242
4257
  style: { color: me, opacity: q ? 0.45 : 1, fontWeight: 300, cursor: o && !_e ? c || !b || !z || n.seekWord ? "pointer" : "default" : b ? "default" : "pointer", textShadow: R ? "0 0 2px currentColor, 0 0 4px currentColor" : "none", textDecorationLine: de || re ? "underline" : "none", textDecorationStyle: re ? "solid" : "dotted", textDecorationColor: re ? "var(--brand)" : Oe ?? "currentColor", textDecorationThickness: de || re ? "1.5px" : void 0, textUnderlineOffset: de || re ? "3px" : void 0 },
4243
4258
  children: ue.text
@@ -4258,7 +4273,7 @@ function Mc({ model: t, rows: e, player: n, fixed: r, applied: s, onFixOpen: a,
4258
4273
  }
4259
4274
  function gc({ open: t, q: e, onQ: n, onClose: r, hits: s, desk: a, inline: o, flash: l }) {
4260
4275
  return /* @__PURE__ */ i("div", { className: o ? "searchbar searchbar--inline" : `searchbar searchbar--float${a ? " searchbar--desk" : ""}${t ? "" : " is-hidden"}`, children: /* @__PURE__ */ g("div", { children: [
4261
- /* @__PURE__ */ i(oe, { d: ee.search, size: 16, sw: 1.7, style: { color: "var(--ink-45)", flex: "none" } }),
4276
+ /* @__PURE__ */ i(oe, { d: X.search, size: 16, sw: 1.7, style: { color: "var(--ink-45)", flex: "none" } }),
4262
4277
  /* @__PURE__ */ i("input", { value: e, onChange: (c) => n(c.target.value), onKeyDown: (c) => {
4263
4278
  c.key === "Escape" && (c.stopPropagation(), e ? n("") : r());
4264
4279
  }, placeholder: "Search this transcript" }),
@@ -4267,7 +4282,7 @@ function gc({ open: t, q: e, onQ: n, onClose: r, hits: s, desk: a, inline: o, fl
4267
4282
  s,
4268
4283
  " found"
4269
4284
  ] }),
4270
- e.trim() && /* @__PURE__ */ i("button", { type: "button", className: "searchbar__x", onClick: () => n(""), "aria-label": "Clear", title: "Clear", children: /* @__PURE__ */ i(oe, { d: ee.close, size: 15, sw: 1.7 }) })
4285
+ e.trim() && /* @__PURE__ */ i("button", { type: "button", className: "searchbar__x", onClick: () => n(""), "aria-label": "Clear", title: "Clear", children: /* @__PURE__ */ i(oe, { d: X.close, size: 15, sw: 1.7 }) })
4271
4286
  ] }) });
4272
4287
  }
4273
4288
  function fc(t, e, n, r, s) {
@@ -4275,10 +4290,10 @@ function fc(t, e, n, r, s) {
4275
4290
  a.current = n;
4276
4291
  const o = j(r);
4277
4292
  o.current = r;
4278
- const [l, c] = k(0), u = r.trim().toLowerCase();
4279
- return E(() => {
4293
+ const [l, c] = v(0), u = r.trim().toLowerCase();
4294
+ return S(() => {
4280
4295
  c(u ? e.filter((d) => d.text.toLowerCase().includes(u)).length : 0);
4281
- }, [e, u]), E(() => {
4296
+ }, [e, u]), S(() => {
4282
4297
  const d = t.current;
4283
4298
  if (!d) return;
4284
4299
  let M = d.scrollTop, h = 0, N = 0;
@@ -4286,7 +4301,7 @@ function fc(t, e, n, r, s) {
4286
4301
  N = Date.now() + 1500;
4287
4302
  }, y = (m) => {
4288
4303
  m.buttons && p();
4289
- }, v = () => {
4304
+ }, k = () => {
4290
4305
  const m = d.scrollTop, f = m - M;
4291
4306
  if (M = m, Date.now() > N) {
4292
4307
  h = 0;
@@ -4294,8 +4309,8 @@ function fc(t, e, n, r, s) {
4294
4309
  }
4295
4310
  h = f < 0 == h < 0 ? h + f : f, h < -14 && !a.current ? (h = 0, s(!0)) : h > 56 && a.current && !o.current.trim() && (h = 0, s(!1));
4296
4311
  };
4297
- return d.addEventListener("wheel", p, { passive: !0 }), d.addEventListener("touchmove", p, { passive: !0 }), d.addEventListener("pointermove", y), d.addEventListener("scroll", v, { passive: !0 }), () => {
4298
- d.removeEventListener("wheel", p), d.removeEventListener("touchmove", p), d.removeEventListener("pointermove", y), d.removeEventListener("scroll", v);
4312
+ return d.addEventListener("wheel", p, { passive: !0 }), d.addEventListener("touchmove", p, { passive: !0 }), d.addEventListener("pointermove", y), d.addEventListener("scroll", k, { passive: !0 }), () => {
4313
+ d.removeEventListener("wheel", p), d.removeEventListener("touchmove", p), d.removeEventListener("pointermove", y), d.removeEventListener("scroll", k);
4299
4314
  };
4300
4315
  }, []), l;
4301
4316
  }
@@ -4367,8 +4382,8 @@ function yc(t) {
4367
4382
  for (let T = 0; T < N[0].length; T++) N.forEach((_, O) => {
4368
4383
  (T !== h - u || O >= M) && y.push(_[T]);
4369
4384
  });
4370
- const v = Array.from({ length: r }, () => new Array(r).fill(!1)), m = Array.from({ length: r }, () => new Array(r).fill(!1)), f = (T, _, O) => {
4371
- v[_][T] = O, m[_][T] = !0;
4385
+ const k = Array.from({ length: r }, () => new Array(r).fill(!1)), m = Array.from({ length: r }, () => new Array(r).fill(!1)), f = (T, _, O) => {
4386
+ k[_][T] = O, m[_][T] = !0;
4372
4387
  };
4373
4388
  for (let T = 0; T < r; T++)
4374
4389
  f(6, T, T % 2 === 0), f(T, 6, T % 2 === 0);
@@ -4409,7 +4424,7 @@ function yc(t) {
4409
4424
  T === 6 && (T = 5);
4410
4425
  for (let _ = 0; _ < r; _++) for (let O = 0; O < 2; O++) {
4411
4426
  const te = T - O, K = T + 1 & 2 ? _ : r - 1 - _;
4412
- !m[K][te] && B < y.length * 8 && (v[K][te] = (y[B >>> 3] >>> 7 - (B & 7) & 1) !== 0, B++);
4427
+ !m[K][te] && B < y.length * 8 && (k[K][te] = (y[B >>> 3] >>> 7 - (B & 7) & 1) !== 0, B++);
4413
4428
  }
4414
4429
  }
4415
4430
  const Y = (T, _, O) => {
@@ -4431,8 +4446,8 @@ function yc(t) {
4431
4446
  default:
4432
4447
  return ((_ + O) % 2 + _ * O % 3) % 2 === 0;
4433
4448
  }
4434
- }, X = (T) => {
4435
- for (let _ = 0; _ < r; _++) for (let O = 0; O < r; O++) !m[_][O] && Y(T, O, _) && (v[_][O] = !v[_][O]);
4449
+ }, ee = (T) => {
4450
+ for (let _ = 0; _ < r; _++) for (let O = 0; O < r; O++) !m[_][O] && Y(T, O, _) && (k[_][O] = !k[_][O]);
4436
4451
  }, z = () => {
4437
4452
  let T = 0;
4438
4453
  const _ = (ne) => {
@@ -4447,24 +4462,24 @@ function yc(t) {
4447
4462
  ne(le) === G ? (J++, J === 5 ? T += 3 : J > 5 && T++) : (O(pe, J), G || (T += _(pe) * 40), G = ne(le), J = 1);
4448
4463
  T += te(pe, G, J) * 40;
4449
4464
  };
4450
- for (let ne = 0; ne < r; ne++) K((G) => v[ne][G]);
4451
- for (let ne = 0; ne < r; ne++) K((G) => v[G][ne]);
4465
+ for (let ne = 0; ne < r; ne++) K((G) => k[ne][G]);
4466
+ for (let ne = 0; ne < r; ne++) K((G) => k[G][ne]);
4452
4467
  for (let ne = 0; ne < r - 1; ne++) for (let G = 0; G < r - 1; G++) {
4453
- const J = v[ne][G];
4454
- J === v[ne][G + 1] && J === v[ne + 1][G] && J === v[ne + 1][G + 1] && (T += 3);
4468
+ const J = k[ne][G];
4469
+ J === k[ne][G + 1] && J === k[ne + 1][G] && J === k[ne + 1][G + 1] && (T += 3);
4455
4470
  }
4456
4471
  let L = 0;
4457
- for (const ne of v) for (const G of ne) G && L++;
4472
+ for (const ne of k) for (const G of ne) G && L++;
4458
4473
  const ie = r * r;
4459
4474
  return T += (Math.ceil(Math.abs(L * 20 - ie * 10) / ie) - 1) * 10, T;
4460
4475
  };
4461
- let F = 0, S = 1 / 0;
4476
+ let F = 0, A = 1 / 0;
4462
4477
  for (let T = 0; T < 8; T++) {
4463
- X(T), D(T);
4478
+ ee(T), D(T);
4464
4479
  const _ = z();
4465
- _ < S && (S = _, F = T), X(T);
4480
+ _ < A && (A = _, F = T), ee(T);
4466
4481
  }
4467
- return X(F), D(F), v;
4482
+ return ee(F), D(F), k;
4468
4483
  }
4469
4484
  function Tc(t) {
4470
4485
  const e = yc(t), n = e.length, r = 2;
@@ -4508,11 +4523,11 @@ function On(t) {
4508
4523
  }
4509
4524
  }
4510
4525
  function vc(t) {
4511
- const [e, n] = k(() => {
4526
+ const [e, n] = v(() => {
4512
4527
  var r;
4513
4528
  return typeof window < "u" && !!((r = window.matchMedia) != null && r.call(window, t).matches);
4514
4529
  });
4515
- return E(() => {
4530
+ return S(() => {
4516
4531
  var a;
4517
4532
  const r = (a = window.matchMedia) == null ? void 0 : a.call(window, t);
4518
4533
  if (!r) return;
@@ -4521,7 +4536,7 @@ function vc(t) {
4521
4536
  }, [t]), e;
4522
4537
  }
4523
4538
  function Cn({ pos: t, interactive: e, axis: n = "x" }) {
4524
- const [r, s] = k(null), a = (c) => {
4539
+ const [r, s] = v(null), a = (c) => {
4525
4540
  const u = c.currentTarget.getBoundingClientRect(), d = n === "y" ? (c.clientY - u.top) / Math.max(1, u.height) : (c.clientX - u.left) / Math.max(1, u.width);
4526
4541
  return Math.min(1, Math.max(0, d));
4527
4542
  }, o = (c) => {
@@ -4560,7 +4575,7 @@ function Cn({ pos: t, interactive: e, axis: n = "x" }) {
4560
4575
  ] });
4561
4576
  }
4562
4577
  function gu({ pos: t }) {
4563
- const [e, n] = k(null), r = (l) => {
4578
+ const [e, n] = v(null), r = (l) => {
4564
4579
  const c = l.currentTarget.getBoundingClientRect();
4565
4580
  return Math.min(1, Math.max(0, (l.clientX - c.left) / Math.max(1, c.width)));
4566
4581
  }, s = (l) => {
@@ -4602,7 +4617,7 @@ function gu({ pos: t }) {
4602
4617
  }
4603
4618
  function bn({ t, mini: e }) {
4604
4619
  return /* @__PURE__ */ g("div", { className: "gfull__transport", children: [
4605
- /* @__PURE__ */ i("button", { type: "button", className: "gfull__step", "aria-label": "Previous line", title: "Previous line", style: { opacity: t.prevOn ? 1 : 0.3 }, onClick: t.onPrev, children: /* @__PURE__ */ i(oe, { d: ee.chevronLeft, size: e ? 13 : 16, sw: e ? 1.8 : 1.9 }) }),
4620
+ /* @__PURE__ */ i("button", { type: "button", className: "gfull__step", "aria-label": "Previous line", title: "Previous line", style: { opacity: t.prevOn ? 1 : 0.3 }, onClick: t.onPrev, children: /* @__PURE__ */ i(oe, { d: X.chevronLeft, size: e ? 13 : 16, sw: e ? 1.8 : 1.9 }) }),
4606
4621
  /* @__PURE__ */ i(
4607
4622
  "button",
4608
4623
  {
@@ -4616,7 +4631,7 @@ function bn({ t, mini: e }) {
4616
4631
  children: t.busy ? /* @__PURE__ */ i("span", { className: "gfull__spin", "aria-hidden": "true" }) : t.playing ? /* @__PURE__ */ i(Ea, { size: e ? 14 : 18 }) : /* @__PURE__ */ i(Ir, { size: e ? 15 : 19 })
4617
4632
  }
4618
4633
  ),
4619
- /* @__PURE__ */ i("button", { type: "button", className: "gfull__step", "aria-label": "Next line", title: "Next line", style: { opacity: t.nextOn ? 1 : 0.3 }, onClick: t.onNext, children: /* @__PURE__ */ i(oe, { d: ee.chevronRight, size: e ? 13 : 16, sw: e ? 1.8 : 1.9 }) })
4634
+ /* @__PURE__ */ i("button", { type: "button", className: "gfull__step", "aria-label": "Next line", title: "Next line", style: { opacity: t.nextOn ? 1 : 0.3 }, onClick: t.onNext, children: /* @__PURE__ */ i(oe, { d: X.chevronRight, size: e ? 13 : 16, sw: e ? 1.8 : 1.9 }) })
4620
4635
  ] });
4621
4636
  }
4622
4637
  function zr({ live: t, mini: e, desk: n, pct: r, mark: s }) {
@@ -4630,7 +4645,7 @@ function zr({ live: t, mini: e, desk: n, pct: r, mark: s }) {
4630
4645
  ] });
4631
4646
  }
4632
4647
  function Qi({ v: t, size: e }) {
4633
- return /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", "aria-label": "Voices", title: t.title, disabled: !t.on, style: { opacity: t.on ? 1 : 0.45, cursor: t.on ? "pointer" : "default" }, onClick: t.on ? t.onClick : void 0, children: /* @__PURE__ */ i(oe, { d: ee.headphones, size: e, sw: 1.6 }) });
4648
+ return /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", "aria-label": "Voices", title: t.title, disabled: !t.on, style: { opacity: t.on ? 1 : 0.45, cursor: t.on ? "pointer" : "default" }, onClick: t.on ? t.onClick : void 0, children: /* @__PURE__ */ i(oe, { d: X.headphones, size: e, sw: 1.6 }) });
4634
4649
  }
4635
4650
  function kc({ pos: t, transport: e, chip: n, voices: r, onShare: s, onFull: a, copied: o }) {
4636
4651
  return /* @__PURE__ */ g("div", { className: "gmini", "data-theme": "dark", children: [
@@ -4645,7 +4660,7 @@ function kc({ pos: t, transport: e, chip: n, voices: r, onShare: s, onFull: a, c
4645
4660
  /* @__PURE__ */ i(Qi, { v: r, size: 14 }),
4646
4661
  s && /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", "aria-label": "Share", title: "Share", onClick: (l) => {
4647
4662
  l.stopPropagation(), s();
4648
- }, children: /* @__PURE__ */ i(oe, { d: ee.share, size: 13, sw: 1.8 }) }),
4663
+ }, children: /* @__PURE__ */ i(oe, { d: X.share, size: 13, sw: 1.8 }) }),
4649
4664
  /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", "aria-label": "Full screen", title: "Full screen", onClick: a, children: /* @__PURE__ */ i(oe, { d: Pi, size: 14, sw: 1.8 }) })
4650
4665
  ] })
4651
4666
  ] }),
@@ -4653,10 +4668,10 @@ function kc({ pos: t, transport: e, chip: n, voices: r, onShare: s, onFull: a, c
4653
4668
  ] });
4654
4669
  }
4655
4670
  const jc = { color: "rgba(255,255,255,.4)" };
4656
- function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title: s, desk: a, pos: o, sub: l, wait: c, pct: u, mute: d, cc: M, ad: h, chip: N, transport: p, picker: y, sheet: v, voices: m, voicesBtn: f, sheetOpen: I, onShare: C, onSettings: D, paused: B, copied: Y, onTouch: X, onClose: z }) {
4657
- const [F, S] = k(() => !!hr());
4658
- E(() => {
4659
- const Q = () => S(!!hr());
4671
+ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title: s, desk: a, pos: o, sub: l, wait: c, pct: u, mute: d, cc: M, ad: h, chip: N, transport: p, picker: y, sheet: k, voices: m, voicesBtn: f, sheetOpen: I, onShare: C, onSettings: D, paused: B, copied: Y, onTouch: ee, onClose: z }) {
4672
+ const [F, A] = v(() => !!hr());
4673
+ S(() => {
4674
+ const Q = () => A(!!hr());
4660
4675
  return document.addEventListener("fullscreenchange", Q), document.addEventListener("webkitfullscreenchange", Q), () => {
4661
4676
  document.removeEventListener("fullscreenchange", Q), document.removeEventListener("webkitfullscreenchange", Q);
4662
4677
  };
@@ -4665,8 +4680,8 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4665
4680
  T.current = z;
4666
4681
  const _ = j(p.playable ? p.onPlay : void 0);
4667
4682
  _.current = p.playable ? p.onPlay : void 0;
4668
- const [O, te] = k(!1), [K, L] = k(0), ie = j(!1);
4669
- E(() => () => On(!1), []), E(() => {
4683
+ const [O, te] = v(!1), [K, L] = v(0), ie = j(!1);
4684
+ S(() => () => On(!1), []), S(() => {
4670
4685
  if (!n) return;
4671
4686
  const Q = [document.documentElement, document.body], he = Q.map((fe) => fe.style.background);
4672
4687
  Q.forEach((fe) => {
@@ -4679,8 +4694,8 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4679
4694
  }), ue && ae && (ue.content = ae);
4680
4695
  };
4681
4696
  }, []);
4682
- const ne = Ie(() => n && Lc(), [n]), [G, J] = k(ne);
4683
- E(() => {
4697
+ const ne = Ie(() => n && Lc(), [n]), [G, J] = v(ne);
4698
+ S(() => {
4684
4699
  if (!n) return;
4685
4700
  const Q = [document.documentElement, document.body], he = Q.map((fe) => [fe.style.overflow, fe.style.overscrollBehavior]);
4686
4701
  if (!ne)
@@ -4699,7 +4714,7 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4699
4714
  };
4700
4715
  }, [ne, n]);
4701
4716
  const pe = j(I);
4702
- pe.current = I, E(() => {
4717
+ pe.current = I, S(() => {
4703
4718
  const Q = (ae) => ae instanceof HTMLElement && (ae.isContentEditable || /^(INPUT|TEXTAREA|SELECT)$/.test(ae.tagName)), he = (ae) => {
4704
4719
  var fe;
4705
4720
  ae.key === "Escape" && !pe.current && T.current && (ae.stopPropagation(), T.current()), ae.key === " " && !pe.current && !Q(ae.target) && (ae.preventDefault(), ae.stopPropagation(), ae.repeat || (fe = _.current) == null || fe.call(_)), (ae.key === "f" || ae.key === "F") && !ae.metaKey && !ae.ctrlKey && !ae.altKey && !pe.current && !Q(ae.target) && ii() && (ae.preventDefault(), ae.repeat || On(!hr()));
@@ -4710,7 +4725,7 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4710
4725
  window.removeEventListener("keydown", he, !0), window.removeEventListener("keyup", ue, !0);
4711
4726
  };
4712
4727
  }, []);
4713
- const le = vc("(orientation: landscape) and (max-height: 540px)"), Te = j(null), [je, De] = k(null);
4728
+ const le = vc("(orientation: landscape) and (max-height: 540px)"), Te = j(null), [je, De] = v(null);
4714
4729
  Ht(() => {
4715
4730
  const Q = Te.current;
4716
4731
  if (!Q || (De(Q.getBoundingClientRect().width), typeof ResizeObserver > "u")) return;
@@ -4718,7 +4733,7 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4718
4733
  return he.observe(Q), () => he.disconnect();
4719
4734
  }, []);
4720
4735
  const Le = t && !F, we = !Le && a && !le && (je == null || je >= 880), Ee = !we;
4721
- E(() => {
4736
+ S(() => {
4722
4737
  if (te(!1), !p.playing || I) return;
4723
4738
  const Q = setTimeout(() => te(!0), 3e3);
4724
4739
  return () => clearTimeout(Q);
@@ -4729,9 +4744,9 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4729
4744
  if (Q.pointerType !== "mouse") return;
4730
4745
  const he = Date.now();
4731
4746
  !Re.current && he - Se.current < 1e3 || (Se.current = he, L((ue) => ue + 1));
4732
- }, H = !we && le, A = j(null), b = l ? l.words.map((Q) => Q.dim ? 0 : 1).join("") + l.words.length + ":" + (l.cursor ?? "") : "";
4747
+ }, H = !we && le, E = j(null), b = l ? l.words.map((Q) => Q.dim ? 0 : 1).join("") + l.words.length + ":" + (l.cursor ?? "") : "";
4733
4748
  Ht(() => {
4734
- const Q = A.current;
4749
+ const Q = E.current;
4735
4750
  if (!Q) return;
4736
4751
  const he = !!(l != null && l.words.some((de) => de.dim)) || (l == null ? void 0 : l.cursor) != null, ue = Q.querySelectorAll((l == null ? void 0 : l.cursor) != null && !l.words.some((de) => de.dim) ? "[data-at]" : "[data-said]"), ae = parseFloat(getComputedStyle(Q).lineHeight) || 24, fe = Math.round(Q.scrollHeight / ae) - Math.round(Q.clientHeight / ae), Ye = Math.max(0, fe) * ae;
4737
4752
  if (Ye <= 0) {
@@ -4741,8 +4756,8 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4741
4756
  const U = (de) => Math.round((de.getBoundingClientRect().top - Q.getBoundingClientRect().top + Q.scrollTop) / ae), R = Math.max(1, Math.round(Q.clientHeight / ae)), q = he ? ue.length ? Math.floor(U(ue[ue.length - 1]) / R) * R * ae : 0 : Ye, re = Math.max(0, Math.min(Ye, q));
4742
4757
  Math.abs(re - Q.scrollTop) > 1 && (Q.scrollTop = re);
4743
4758
  }, [b, H]);
4744
- const [V, ce] = k(!0), [W, ye] = k(!1), Z = j(void 0);
4745
- E(() => () => window.clearTimeout(Z.current), []);
4759
+ const [V, ce] = v(!0), [W, ye] = v(!1), Z = j(void 0);
4760
+ S(() => () => window.clearTimeout(Z.current), []);
4746
4761
  const ke = B != null && B.share ? B.share.url(V && B.share.at >= 1 ? Math.floor(B.share.at) : null) : "", ze = Ie(() => we && ke && !p.playing ? Tc(ke) : "", [we, ke, p.playing]), Ge = () => {
4747
4762
  var Q;
4748
4763
  (Q = navigator.clipboard) == null || Q.writeText(ke).then(() => {
@@ -4761,24 +4776,24 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4761
4776
  /* @__PURE__ */ i("div", { className: "gfull__shareurl", children: /* @__PURE__ */ i("span", { children: ke.replace(/^https?:\/\//, "") }) }),
4762
4777
  /* @__PURE__ */ g("div", { className: "gfull__shareacts", children: [
4763
4778
  /* @__PURE__ */ g("button", { type: "button", className: "gfull__sharebtn gfull__sharebtn--main", onClick: Ge, children: [
4764
- /* @__PURE__ */ i(oe, { d: W ? ee.check : ee.copy, size: 14, sw: 1.8 }),
4779
+ /* @__PURE__ */ i(oe, { d: W ? X.check : X.copy, size: 14, sw: 1.8 }),
4765
4780
  W ? "Copied" : "Copy link"
4766
4781
  ] }),
4767
4782
  /* @__PURE__ */ g("button", { type: "button", className: "gfull__sharebtn", onClick: () => _r(ke, s), children: [
4768
- /* @__PURE__ */ i(oe, { d: ee.share, size: 14, sw: 1.6 }),
4783
+ /* @__PURE__ */ i(oe, { d: X.share, size: 14, sw: 1.6 }),
4769
4784
  "Share"
4770
4785
  ] })
4771
4786
  ] })
4772
4787
  ] })
4773
4788
  ] }), ge = (Q, he, ue, ae, fe, Ye = 0) => /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", title: Q, "aria-label": Q, onClick: ae, children: /* @__PURE__ */ i(oe, { d: he, size: (we ? 20 : Ee ? 15 : 18) + Ye, sw: ue, style: fe }) }), _e = /* @__PURE__ */ g("div", { className: "gfull__acts", children: [
4774
4789
  f && /* @__PURE__ */ i(Qi, { v: f, size: we ? 20 : Ee ? 15 : 18 }),
4775
- C && ge("Share", ee.share, 1.6, C),
4790
+ C && ge("Share", X.share, 1.6, C),
4776
4791
  ii() && !e && ge(F ? "Exit full screen" : "Full screen", F ? wc : Pi, 1.7, () => On(!F)),
4777
- z && ge("Close player", ee.close, 1.7, z)
4792
+ z && ge("Close player", X.close, 1.7, z)
4778
4793
  ] }), Ve = (d || M || D) && /* @__PURE__ */ g("div", { className: "gfull__top", children: [
4779
- d && ge(d.muted ? "Unmute" : "Mute", d.muted ? ee.volumeOff : ee.volume, 1.6, d.onToggle),
4780
- M && ge(M.on ? "Hide subtitles" : "Show subtitles", M.on ? ee.cc : ee.ccOff, 1.7, M.onToggle, void 0, 4),
4781
- D && ge("Settings", ee.cog, 1.6, D)
4794
+ d && ge(d.muted ? "Unmute" : "Mute", d.muted ? X.volumeOff : X.volume, 1.6, d.onToggle),
4795
+ M && ge(M.on ? "Hide subtitles" : "Show subtitles", M.on ? X.cc : X.ccOff, 1.7, M.onToggle, void 0, 4),
4796
+ D && ge("Settings", X.cog, 1.6, D)
4782
4797
  ] });
4783
4798
  return /* @__PURE__ */ g(
4784
4799
  "div",
@@ -4791,7 +4806,7 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4791
4806
  onPointerMove: $,
4792
4807
  onPointerDownCapture: (Q) => {
4793
4808
  var he, ue;
4794
- O && (ie.current = !0), L((ae) => ae + 1), (ue = (he = Q.target).closest) != null && ue.call(he, '[aria-label="Exit full screen"], [aria-label="Full screen"], [aria-label="Close player"]') || X();
4809
+ O && (ie.current = !0), L((ae) => ae + 1), (ue = (he = Q.target).closest) != null && ue.call(he, '[aria-label="Exit full screen"], [aria-label="Full screen"], [aria-label="Close player"]') || ee();
4795
4810
  },
4796
4811
  onClickCapture: (Q) => {
4797
4812
  ie.current && (ie.current = !1, Q.stopPropagation(), Q.preventDefault());
@@ -4819,7 +4834,7 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4819
4834
  c ? typeof c == "string" ? /* @__PURE__ */ i("div", { className: "gfull__sub", "aria-live": "polite", children: /* @__PURE__ */ g("div", { className: "gfull__wait", children: [
4820
4835
  /* @__PURE__ */ i("span", { className: "gfull__spin", "aria-hidden": "true" }),
4821
4836
  c
4822
- ] }) }) : /* @__PURE__ */ i("div", { className: "gfull__sub", children: c }) : l && /* @__PURE__ */ i("div", { className: "gfull__sub", children: /* @__PURE__ */ g("div", { ref: A, children: [
4837
+ ] }) }) : /* @__PURE__ */ i("div", { className: "gfull__sub", children: c }) : l && /* @__PURE__ */ i("div", { className: "gfull__sub", children: /* @__PURE__ */ g("div", { ref: E, children: [
4823
4838
  /* @__PURE__ */ i("div", { className: "gfull__subback", "aria-hidden": "true", children: /* @__PURE__ */ g("span", { children: [
4824
4839
  l.who && /* @__PURE__ */ g(be, { children: [
4825
4840
  /* @__PURE__ */ g("b", { children: [
@@ -4868,7 +4883,7 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4868
4883
  ] })
4869
4884
  ] }) }),
4870
4885
  y,
4871
- v,
4886
+ k,
4872
4887
  m
4873
4888
  ] })
4874
4889
  ]
@@ -4877,7 +4892,7 @@ function $i({ compact: t = !1, noFull: e = !1, page: n = !0, picture: r, title:
4877
4892
  }
4878
4893
  function zc({ dark: t, back: e, home: n, live: r, title: s, badge: a, subline: o, onOptions: l, optionsActive: c }) {
4879
4894
  return /* @__PURE__ */ g("div", { className: "ghead", children: [
4880
- e && /* @__PURE__ */ i("button", { type: "button", className: "ghead__back", "aria-label": "Back", title: "Back", onClick: e, children: /* @__PURE__ */ i(oe, { d: ee.chevronLeft, size: 19, sw: 1.7 }) }),
4895
+ e && /* @__PURE__ */ i("button", { type: "button", className: "ghead__back", "aria-label": "Back", title: "Back", onClick: e, children: /* @__PURE__ */ i(oe, { d: X.chevronLeft, size: 19, sw: 1.7 }) }),
4881
4896
  r && /* @__PURE__ */ i("span", { className: "mark", children: /* @__PURE__ */ i(Or, { dark: t, size: 30 }) }),
4882
4897
  /* @__PURE__ */ i("div", { style: { flex: 1, minWidth: 0, display: "flex" }, children: n ? /* @__PURE__ */ i("div", { className: "ghead__logo", children: /* @__PURE__ */ i(En, { dark: t, height: 22 }) }) : /* @__PURE__ */ g("div", { className: "ghead__title", onClick: e, title: e ? "Back" : void 0, style: { cursor: e ? "pointer" : "default" }, children: [
4883
4898
  /* @__PURE__ */ g("div", { style: { display: "flex", alignItems: "center", gap: 8 }, children: [
@@ -4893,15 +4908,15 @@ function zc({ dark: t, back: e, home: n, live: r, title: s, badge: a, subline: o
4893
4908
  ] }) })
4894
4909
  ] });
4895
4910
  }
4896
- const Ic = "m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z", Oc = (t, e = !1) => [{ value: "read", label: t.read, icon: /* @__PURE__ */ i(oe, { d: ee.book, size: 17 }) }, { value: "listen", label: /* @__PURE__ */ i("span", { style: { display: "inline-block", minWidth: 52, textAlign: "center" }, children: e ? t.watch : t.listen }), icon: /* @__PURE__ */ i(oe, { d: e ? Ic : ee.headphones, size: 19, sw: 1.5 }) }];
4911
+ const Ic = "m15.75 10.5 4.72-4.72a.75.75 0 0 1 1.28.53v11.38a.75.75 0 0 1-1.28.53l-4.72-4.72M4.5 18.75h9a2.25 2.25 0 0 0 2.25-2.25v-9a2.25 2.25 0 0 0-2.25-2.25h-9A2.25 2.25 0 0 0 2.25 7.5v9a2.25 2.25 0 0 0 2.25 2.25Z", Oc = (t, e = !1) => [{ value: "read", label: t.read, icon: /* @__PURE__ */ i(oe, { d: X.book, size: 17 }) }, { value: "listen", label: /* @__PURE__ */ i("span", { style: { display: "inline-block", minWidth: 52, textAlign: "center" }, children: e ? t.watch : t.listen }), icon: /* @__PURE__ */ i(oe, { d: e ? Ic : X.headphones, size: 19, sw: 1.5 }) }];
4897
4912
  function Cc(t) {
4898
4913
  if (!t.lang) return null;
4899
4914
  const e = t.langName;
4900
4915
  return t.translateFailed === t.lang ? { kind: "translateFailed", lang: e } : t.voiceFailed ? { kind: "voiceFailed", lang: e } : t.translating ? { kind: "translating", lang: e } : t.starting != null ? { kind: "starting", lang: e, since: t.starting } : t.relang || t.slowLine ? { kind: "voice", lang: e, since: t.lineSince } : null;
4901
4916
  }
4902
4917
  function bc(t, e) {
4903
- const [n, r] = k(null), [s, a] = k(!1);
4904
- return E(() => {
4918
+ const [n, r] = v(null), [s, a] = v(!1);
4919
+ return S(() => {
4905
4920
  if (!t) {
4906
4921
  r(null), a(!1);
4907
4922
  return;
@@ -4914,8 +4929,8 @@ function bc(t, e) {
4914
4929
  }
4915
4930
  const xc = (t) => `${Math.floor(t / 60)}:${String(t % 60).padStart(2, "0")}`;
4916
4931
  function Dc({ state: t, line: e, onRetry: n, onOriginal: r }) {
4917
- const [s, a] = k(() => Date.now());
4918
- E(() => {
4932
+ const [s, a] = v(() => Date.now());
4933
+ S(() => {
4919
4934
  if (t.since == null) return;
4920
4935
  const d = setInterval(() => a(Date.now()), 1e3);
4921
4936
  return () => clearInterval(d);
@@ -4944,7 +4959,7 @@ function Dc({ state: t, line: e, onRetry: n, onOriginal: r }) {
4944
4959
  onPointerDown: (d) => d.stopPropagation(),
4945
4960
  children: [
4946
4961
  /* @__PURE__ */ g("div", { className: "pwait__head", children: [
4947
- l ? /* @__PURE__ */ i("div", { className: "pwait__mark", "aria-hidden": "true", children: /* @__PURE__ */ i(oe, { d: ee.warnCircle, size: 18, sw: 1.8 }) }) : /* @__PURE__ */ i("div", { className: "pwait__spin", "aria-hidden": "true" }),
4962
+ l ? /* @__PURE__ */ i("div", { className: "pwait__mark", "aria-hidden": "true", children: /* @__PURE__ */ i(oe, { d: X.warnCircle, size: 18, sw: 1.8 }) }) : /* @__PURE__ */ i("div", { className: "pwait__spin", "aria-hidden": "true" }),
4948
4963
  /* @__PURE__ */ i("div", { className: "pwait__t", children: c }),
4949
4964
  !l && o != null && o >= 3 && /* @__PURE__ */ i("div", { className: "pwait__clock", "aria-label": `${o} seconds`, children: xc(o) })
4950
4965
  ] }),
@@ -4971,7 +4986,7 @@ function Bi(t, e, n) {
4971
4986
  return d ? new Promise((M, h) => {
4972
4987
  let N = !1;
4973
4988
  const p = (m) => {
4974
- N || (N = !0, window.removeEventListener("message", y), clearInterval(v), m());
4989
+ N || (N = !0, window.removeEventListener("message", y), clearInterval(k), m());
4975
4990
  }, y = (m) => {
4976
4991
  if (m.origin !== r.origin || m.source !== d) return;
4977
4992
  const f = m.data;
@@ -5000,7 +5015,7 @@ function Bi(t, e, n) {
5000
5015
  }
5001
5016
  };
5002
5017
  window.addEventListener("message", y);
5003
- const v = setInterval(() => {
5018
+ const k = setInterval(() => {
5004
5019
  d.closed && p(() => M(null));
5005
5020
  }, 500);
5006
5021
  }) : Promise.reject(new Error("Your browser blocked the VocalStack window. Allow pop-ups for this site and try again."));
@@ -5032,10 +5047,10 @@ const Uc = {
5032
5047
  starting: "Starting the transcription…"
5033
5048
  }, Rc = /^(https?:\/\/)?([\w-]+\.)+[a-z]{2,}(\/\S*)?$/i;
5034
5049
  function Pc({ options: t, onStarted: e, onReplay: n, onClose: r }) {
5035
- const [s, a] = k(""), [o, l] = k(!1), [c, u] = k(null), [d, M] = k(null);
5036
- E(() => {
5037
- const y = (v) => {
5038
- v.key === "Escape" && r();
5050
+ const [s, a] = v(""), [o, l] = v(!1), [c, u] = v(null), [d, M] = v(null);
5051
+ S(() => {
5052
+ const y = (k) => {
5053
+ k.key === "Escape" && r();
5039
5054
  };
5040
5055
  return window.addEventListener("keydown", y), () => window.removeEventListener("keydown", y);
5041
5056
  }, [r]);
@@ -5055,7 +5070,7 @@ function Pc({ options: t, onStarted: e, onReplay: n, onClose: r }) {
5055
5070
  return /* @__PURE__ */ i("div", { className: "vsp-end", role: "dialog", "aria-label": "Transcribe another video", onPointerDown: (y) => y.stopPropagation(), onClick: (y) => {
5056
5071
  y.stopPropagation(), y.target === y.currentTarget && r();
5057
5072
  }, children: /* @__PURE__ */ g("div", { className: "vsp-end__card", children: [
5058
- /* @__PURE__ */ i("button", { type: "button", className: "vsp-end__close", "aria-label": "Close", title: "Close", onClick: r, children: /* @__PURE__ */ i(oe, { d: ee.close, size: 16, sw: 1.8 }) }),
5073
+ /* @__PURE__ */ i("button", { type: "button", className: "vsp-end__close", "aria-label": "Close", title: "Close", onClick: r, children: /* @__PURE__ */ i(oe, { d: X.close, size: 16, sw: 1.8 }) }),
5059
5074
  /* @__PURE__ */ i("div", { className: "vsp-end__brand", children: /* @__PURE__ */ i(En, { dark: !0, link: !1, height: 16 }) }),
5060
5075
  /* @__PURE__ */ i("div", { className: "vsp-end__title", children: t.title ?? "Transcribe and translate any video" }),
5061
5076
  /* @__PURE__ */ i("div", { className: "vsp-end__note", children: t.note ?? "Paste a link from YouTube, Vimeo or any page with a video. It plays right here with subtitles and spoken translations." }),
@@ -5072,15 +5087,15 @@ function Pc({ options: t, onStarted: e, onReplay: n, onClose: r }) {
5072
5087
  /* @__PURE__ */ g("div", { className: "vsp-end__foot", children: [
5073
5088
  /* @__PURE__ */ i("span", { children: "Uses your VocalStack account. You'll be asked to sign in if you're not." }),
5074
5089
  /* @__PURE__ */ g("button", { type: "button", className: "vsp-end__replay", onClick: n, children: [
5075
- /* @__PURE__ */ i(oe, { d: ee.uturn, size: 14, sw: 1.8 }),
5090
+ /* @__PURE__ */ i(oe, { d: X.uturn, size: 14, sw: 1.8 }),
5076
5091
  "Replay"
5077
5092
  ] })
5078
5093
  ] })
5079
5094
  ] }) });
5080
5095
  }
5081
5096
  function Hi(t) {
5082
- const [e, n] = k(() => typeof window > "u" ? !0 : window.innerWidth >= 880);
5083
- return E(() => {
5097
+ const [e, n] = v(() => typeof window > "u" ? !0 : window.innerWidth >= 880);
5098
+ return S(() => {
5084
5099
  if (t != null) return;
5085
5100
  const r = () => n(window.innerWidth >= 880);
5086
5101
  return window.addEventListener("resize", r), () => window.removeEventListener("resize", r);
@@ -5088,22 +5103,22 @@ function Hi(t) {
5088
5103
  }
5089
5104
  const Qc = { lang: null, subtitles: !0, speakerLabels: !1, wordHighlight: !0, translateAudio: !0, voices: "cloned", removeBackground: !1, muted: !1 };
5090
5105
  function $c(t, e) {
5091
- const n = Ci(), [r, s] = wi(), [a, o] = k(null), [l, c] = k("main"), u = vr(n, t.lang), d = Ie(() => Li(n, "translation"), [n]), M = (Y) => {
5106
+ const n = Ci(), [r, s] = wi(), [a, o] = v(null), [l, c] = v("main"), u = vr(n, t.lang), d = Ie(() => Li(n, "translation"), [n]), M = (Y) => {
5092
5107
  e({ lang: Y }), s(Y);
5093
5108
  }, h = br({ open: a === "lang" || a === "settings" && l === "lang", onClose: () => a === "lang" ? o(null) : c("main"), value: t.lang, onSelect: M, languages: d, none: "As spoken", pinned: t.lang ? [t.lang] : [], recent: r, keepOpen: !0 }), N = () => {
5094
5109
  o(null), c("main");
5095
- }, p = t.lang ? /* @__PURE__ */ i("span", { style: { fontSize: 19, lineHeight: 1 }, children: u.flag }) : /* @__PURE__ */ i(oe, { d: ee.langAuto, size: 19, sw: 1.7 }), y = /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", "aria-label": `Language: ${t.lang ? u.label : "As spoken"}`, title: t.lang ? u.label : "As spoken", onClick: (Y) => {
5096
- Y.stopPropagation(), c("main"), o((X) => X === "lang" ? null : "lang");
5097
- }, children: p }), v = /* @__PURE__ */ i(oe, { d: ee.chevronRight, size: 17, sw: 1.6, style: { flex: "none", color: "var(--ink-45)" } }), m = /* @__PURE__ */ g("span", { className: "vs-sheet__title", style: { position: "relative" }, children: [
5110
+ }, p = t.lang ? /* @__PURE__ */ i("span", { style: { fontSize: 19, lineHeight: 1 }, children: u.flag }) : /* @__PURE__ */ i(oe, { d: X.langAuto, size: 19, sw: 1.7 }), y = /* @__PURE__ */ i("button", { type: "button", className: "gfull__btn", "aria-label": `Language: ${t.lang ? u.label : "As spoken"}`, title: t.lang ? u.label : "As spoken", onClick: (Y) => {
5111
+ Y.stopPropagation(), c("main"), o((ee) => ee === "lang" ? null : "lang");
5112
+ }, children: p }), k = /* @__PURE__ */ i(oe, { d: X.chevronRight, size: 17, sw: 1.6, style: { flex: "none", color: "var(--ink-45)" } }), m = /* @__PURE__ */ g("span", { className: "vs-sheet__title", style: { position: "relative" }, children: [
5098
5113
  " ",
5099
5114
  /* @__PURE__ */ g("button", { type: "button", onClick: () => c("main"), "aria-label": "Back", className: "vsp-idlesheet__back", children: [
5100
- /* @__PURE__ */ i(oe, { d: ee.chevronLeft, size: 18, sw: 1.8 }),
5115
+ /* @__PURE__ */ i(oe, { d: X.chevronLeft, size: 18, sw: 1.8 }),
5101
5116
  "Back"
5102
5117
  ] })
5103
- ] }), f = { display: "flex", flexDirection: "column", gap: 2, paddingBottom: 14 }, I = (Y, X, z) => /* @__PURE__ */ g("div", { className: "srow", children: [
5118
+ ] }), f = { display: "flex", flexDirection: "column", gap: 2, paddingBottom: 14 }, I = (Y, ee, z) => /* @__PURE__ */ g("div", { className: "srow", children: [
5104
5119
  /* @__PURE__ */ g("div", { style: { flex: 1, minWidth: 0 }, children: [
5105
5120
  /* @__PURE__ */ i("div", { className: "srow__t", children: Y }),
5106
- /* @__PURE__ */ i("div", { className: "srow__s", children: X })
5121
+ /* @__PURE__ */ i("div", { className: "srow__s", children: ee })
5107
5122
  ] }),
5108
5123
  z
5109
5124
  ] }), C = /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column" }, children: [
@@ -5124,7 +5139,7 @@ function $c(t, e) {
5124
5139
  /* @__PURE__ */ i("div", { className: "srow__s", children: t.lang ? `Translated to ${u.label}` : "Original language" })
5125
5140
  ] }),
5126
5141
  /* @__PURE__ */ i("span", { style: { fontSize: 18, lineHeight: 1 }, children: t.lang ? u.flag : null }),
5127
- v
5142
+ k
5128
5143
  ] }),
5129
5144
  /* @__PURE__ */ i("div", { className: "sdiv" }),
5130
5145
  /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", onClick: () => c("subs"), children: [
@@ -5132,7 +5147,7 @@ function $c(t, e) {
5132
5147
  /* @__PURE__ */ i("div", { className: "srow__t", children: "Subtitles" }),
5133
5148
  /* @__PURE__ */ i("div", { className: "srow__s", children: t.subtitles ? "On · speaker labels and word highlighting" : "Off" })
5134
5149
  ] }),
5135
- v
5150
+ k
5136
5151
  ] }),
5137
5152
  /* @__PURE__ */ i("div", { className: "sdiv" }),
5138
5153
  /* @__PURE__ */ g("div", { className: "srow srow--tap", role: "button", onClick: () => c("audio"), children: [
@@ -5140,7 +5155,7 @@ function $c(t, e) {
5140
5155
  /* @__PURE__ */ i("div", { className: "srow__t", children: "Audio" }),
5141
5156
  /* @__PURE__ */ i("div", { className: "srow__s", children: t.lang && t.translateAudio ? `Translated, ${t.voices === "cloned" ? "cloned voices" : "synthetic voices"}` : t.removeBackground ? "Original speech, background removed" : "Original sound" })
5142
5157
  ] }),
5143
- v
5158
+ k
5144
5159
  ] })
5145
5160
  ] }), B = /* @__PURE__ */ g(be, { children: [
5146
5161
  /* @__PURE__ */ i(Wt, { open: a === "lang", onClose: N, title: "LANGUAGE", kind: "picker", header: h.search, sticky: !0, children: /* @__PURE__ */ i(fr, { children: h.list }) }),
@@ -5218,8 +5233,8 @@ function Wc({ t }) {
5218
5233
  ] });
5219
5234
  }
5220
5235
  function Fc() {
5221
- const t = j(null), [e, n] = k(!0), [r, s] = k(() => typeof document > "u" || !document.hidden);
5222
- return E(() => {
5236
+ const t = j(null), [e, n] = v(!0), [r, s] = v(() => typeof document > "u" || !document.hidden);
5237
+ return S(() => {
5223
5238
  const a = () => s(!document.hidden);
5224
5239
  document.addEventListener("visibilitychange", a);
5225
5240
  const o = t.current;
@@ -5248,7 +5263,7 @@ function Mr(t) {
5248
5263
  }
5249
5264
  }
5250
5265
  function Gc(t, e) {
5251
- const [n, r] = k(!1), [s, a] = k(null), [o, l] = k(null), [c, u] = k(() => _c(t)), d = qe((N) => {
5266
+ const [n, r] = v(!1), [s, a] = v(null), [o, l] = v(null), [c, u] = v(() => _c(t)), d = qe((N) => {
5252
5267
  if (n) return;
5253
5268
  r(!0), l(null);
5254
5269
  let p;
@@ -5278,10 +5293,10 @@ function qc({ poster: t, src: e }) {
5278
5293
  const Kc = { live: !1, atEdge: !1, edgeFrac: null, pct: 0, atLabel: "0:00", labelAt: () => "0:00", endLabel: "0:00", onSeek: () => {
5279
5294
  } };
5280
5295
  function An({ idle: t, poster: e, src: n, title: r, page: s, onAct: a, children: o }) {
5281
- const l = $c(t.prefs, t.set), c = Hi(), u = j(null), [d, M] = k(!1);
5296
+ const l = $c(t.prefs, t.set), c = Hi(), u = j(null), [d, M] = v(!1);
5282
5297
  Ht(() => {
5283
- var v;
5284
- const N = (v = u.current) == null ? void 0 : v.parentElement;
5298
+ var k;
5299
+ const N = (k = u.current) == null ? void 0 : k.parentElement;
5285
5300
  if (!N) return;
5286
5301
  const p = () => M(N.getBoundingClientRect().width < 560);
5287
5302
  if (p(), typeof ResizeObserver > "u") return;
@@ -5300,7 +5315,7 @@ function An({ idle: t, poster: e, src: n, title: r, page: s, onAct: a, children:
5300
5315
  function Fi({ connect: t, onClick: e, label: n }) {
5301
5316
  return /* @__PURE__ */ g(be, { children: [
5302
5317
  /* @__PURE__ */ g("button", { type: "button", className: "vsp-idle__connect", onClick: e, disabled: t.busy, children: [
5303
- t.busy ? /* @__PURE__ */ i(ut, { size: 18, color: "#050507", track: "rgba(5,5,7,.2)" }) : /* @__PURE__ */ i(oe, { d: ee.link, size: 18, sw: 1.8 }),
5318
+ t.busy ? /* @__PURE__ */ i(ut, { size: 18, color: "#050507", track: "rgba(5,5,7,.2)" }) : /* @__PURE__ */ i(oe, { d: X.link, size: 18, sw: 1.8 }),
5304
5319
  /* @__PURE__ */ i("span", { children: t.busy ? "Waiting for VocalStack…" : n })
5305
5320
  ] }),
5306
5321
  t.busy && /* @__PURE__ */ i("div", { className: "vsp-idle__note", role: "status", children: Wi[t.status ?? "checking"] }),
@@ -5316,7 +5331,7 @@ function Jc({ idle: t, src: e, ask: n, connect: r, page: s, poster: a = null, on
5316
5331
  ] });
5317
5332
  }
5318
5333
  function Xc({ idle: t, connect: e, page: n, poster: r = null, onPick: s }) {
5319
- const [a, o] = k(""), l = j(null), c = j(null), u = a.trim(), d = oi.test(u), M = () => {
5334
+ const [a, o] = v(""), l = j(null), c = j(null), u = a.trim(), d = oi.test(u), M = () => {
5320
5335
  if (!d || e.busy) return;
5321
5336
  const p = /^https?:\/\//i.test(u) ? u : `https://${u}`;
5322
5337
  s(p), e.start(p, !1);
@@ -5333,14 +5348,14 @@ function Xc({ idle: t, connect: e, page: n, poster: r = null, onPick: s }) {
5333
5348
  const y = p.trim();
5334
5349
  if (!oi.test(y) || e.busy || y === c.current) return;
5335
5350
  c.current = y;
5336
- const v = /^https?:\/\//i.test(y) ? y : `https://${y}`;
5337
- s(v), e.start(v, !1);
5351
+ const k = /^https?:\/\//i.test(y) ? y : `https://${y}`;
5352
+ s(k), e.start(k, !1);
5338
5353
  };
5339
5354
  return /* @__PURE__ */ g(An, { idle: t, poster: r, src: null, title: "VocalStack", page: n, onAct: h, children: [
5340
5355
  /* @__PURE__ */ i("form", { className: "vsp-idle__form", onSubmit: (p) => {
5341
5356
  p.preventDefault(), M();
5342
5357
  }, children: /* @__PURE__ */ g("span", { className: "vsp-idle__field", children: [
5343
- /* @__PURE__ */ i(oe, { d: ee.link, size: 16, sw: 1.8 }),
5358
+ /* @__PURE__ */ i(oe, { d: X.link, size: 16, sw: 1.8 }),
5344
5359
  /* @__PURE__ */ i("input", { ref: l, className: "vsp-idle__input", type: "url", inputMode: "url", enterKeyHint: "go", autoComplete: "off", spellCheck: !1, placeholder: "Paste a video link", value: a, onChange: (p) => o(p.target.value), onPaste: (p) => {
5345
5360
  const y = p.clipboardData.getData("text");
5346
5361
  y && (o(y.trim()), N(y), p.preventDefault());
@@ -5354,18 +5369,18 @@ function Xc({ idle: t, connect: e, page: n, poster: r = null, onPick: s }) {
5354
5369
  function eu({ idle: t, message: e, onRetry: n, page: r }) {
5355
5370
  return /* @__PURE__ */ g(An, { idle: t, poster: null, src: null, title: "VocalStack", page: r, onAct: n, children: [
5356
5371
  /* @__PURE__ */ g("div", { className: "vsp-idle__err", role: "alert", children: [
5357
- /* @__PURE__ */ i(oe, { d: ee.warn, size: 16, sw: 1.8 }),
5372
+ /* @__PURE__ */ i(oe, { d: X.warn, size: 16, sw: 1.8 }),
5358
5373
  e
5359
5374
  ] }),
5360
5375
  /* @__PURE__ */ g("button", { type: "button", className: "vsp-idle__connect", onClick: n, children: [
5361
- /* @__PURE__ */ i(oe, { d: ee.uturn, size: 18, sw: 1.8 }),
5376
+ /* @__PURE__ */ i(oe, { d: X.uturn, size: 18, sw: 1.8 }),
5362
5377
  /* @__PURE__ */ i("span", { children: "Try again" })
5363
5378
  ] })
5364
5379
  ] });
5365
5380
  }
5366
5381
  function tu(t, e, n) {
5367
- const [r, s] = k(t && e ? void 0 : null);
5368
- return E(() => {
5382
+ const [r, s] = v(t && e ? void 0 : null);
5383
+ return S(() => {
5369
5384
  if (!t) {
5370
5385
  s(null);
5371
5386
  return;
@@ -5429,66 +5444,66 @@ const fu = za(function(e, n) {
5429
5444
  return (L = r.current) == null ? void 0 : L.toggle();
5430
5445
  }
5431
5446
  }), []);
5432
- const [s, a] = k({ id: e.id ?? "", token: e.token });
5433
- E(() => {
5447
+ const [s, a] = v({ id: e.id ?? "", token: e.token });
5448
+ S(() => {
5434
5449
  a({ id: e.id ?? "", token: e.token });
5435
5450
  }, [e.id, e.token, e.src]);
5436
5451
  const o = tu(e.src ?? null, e.token ?? null, e.baseUrl ?? null);
5437
- E(() => {
5452
+ S(() => {
5438
5453
  o != null && o.id && a({ id: o.id, token: e.token });
5439
5454
  }, [o == null ? void 0 : o.id]);
5440
- const [l, c] = k(null), [u, d] = k(() => ({ ...Qc, ...Object.fromEntries(Object.entries({ ...e.initial ?? {}, ...e.settings ?? {} }).filter(([, L]) => L !== void 0)) })), [M, h] = k({}), N = { prefs: u, set: (L) => {
5455
+ const [l, c] = v(null), [u, d] = v(() => ({ ...Qc, ...Object.fromEntries(Object.entries({ ...e.initial ?? {}, ...e.settings ?? {} }).filter(([, L]) => L !== void 0)) })), [M, h] = v({}), N = { prefs: u, set: (L) => {
5441
5456
  d((ie) => ({ ...ie, ...L })), h((ie) => ({ ...ie, ...L }));
5442
5457
  }, shareUrl: (K = e.shareUrl) == null ? void 0 : K.call(e, null) }, { muted: p, ...y } = M;
5443
- E(() => {
5458
+ S(() => {
5444
5459
  c(null);
5445
5460
  }, [e.id, e.src]);
5446
- const v = e.src ?? l, m = !s.id && !!v && (l != null || o !== void 0), f = !s.id && !e.src && !l, I = Oi({ id: s.id, token: s.token, baseUrl: e.baseUrl, listen: s.listen }), { source: C, gone: D, error: B, reload: Y } = Ko(I, s.id), X = Jo(I, (C == null ? void 0 : C.recording.id) ?? null), z = Ie(() => Zo(I, X), [I, X]);
5447
- E(() => {
5461
+ const k = e.src ?? l, m = !s.id && !!k && (l != null || o !== void 0), f = !s.id && !e.src && !l, I = Oi({ id: s.id, token: s.token, baseUrl: e.baseUrl, listen: s.listen }), { source: C, gone: D, error: B, reload: Y } = Ko(I, s.id), ee = Jo(I, (C == null ? void 0 : C.recording.id) ?? null), z = Ie(() => Zo(I, ee), [I, ee]);
5462
+ S(() => {
5448
5463
  var L;
5449
5464
  C && ((L = e.onSource) == null || L.call(e, C));
5450
- }, [C]), E(() => {
5465
+ }, [C]), S(() => {
5451
5466
  var L;
5452
5467
  B && ((L = e.onError) == null || L.call(e, B));
5453
5468
  }, [B]);
5454
- const F = Hi(e.desk), S = (e.layout ?? "embed") === "embed", T = e.appUrl ?? (e.endCard ? e.endCard.appUrl : void 0), _ = qe((L) => a({ id: L.transcriptionId, token: null, listen: { transcriptionId: L.transcriptionId, recordingId: L.recordingId, token: L.token } }), []), O = Gc(T, _), te = j(null);
5455
- return E(() => (si(S ? te.current : null), () => si(null)), [S]), /* @__PURE__ */ i(Ho, { value: z, children: /* @__PURE__ */ i("div", { ref: te, className: `vsp${S ? " vsp--embed" : ""}${e.className ? ` ${e.className}` : ""}`, "data-theme": (e.mode ?? "video") === "video" || e.dark ? "dark" : "light", "data-mode": (e.mode ?? "video") === "video" ? "video" : "transcript", children: f ? /* @__PURE__ */ i(Xc, { idle: N, connect: O, page: !S, poster: e.poster ?? null, onPick: c }) : m ? /* @__PURE__ */ i(Jc, { idle: N, src: v, ask: !l, connect: O, page: !S, poster: e.poster ?? null, onClear: l ? () => c(null) : void 0 }) : s.id ? B && !C ? /* @__PURE__ */ i(eu, { idle: N, message: B.message, onRetry: Y, page: !S }) : /* @__PURE__ */ i(su, { ...e, initial: { ...e.initial ?? {}, ...y }, startMuted: p === !0, handle: r, id: s.id, api: z, shared: C, gone: D, loadError: B, reread: Y, desk: F, dark: (e.mode ?? "video") === "video" || !!e.dark, onStarted: (L) => a({ id: L.transcriptionId, token: null, listen: { transcriptionId: L.transcriptionId, recordingId: L.recordingId, token: L.token } }) }, s.id) : /* @__PURE__ */ i("div", { className: "vsp-gate", "data-theme": "dark", children: /* @__PURE__ */ i("span", { className: "gfull__spin gfull__holdspin", "aria-label": "Loading" }) }) }) });
5469
+ const F = Hi(e.desk), A = (e.layout ?? "embed") === "embed", T = e.appUrl ?? (e.endCard ? e.endCard.appUrl : void 0), _ = qe((L) => a({ id: L.transcriptionId, token: null, listen: { transcriptionId: L.transcriptionId, recordingId: L.recordingId, token: L.token } }), []), O = Gc(T, _), te = j(null);
5470
+ return S(() => (si(A ? te.current : null), () => si(null)), [A]), /* @__PURE__ */ i(Ho, { value: z, children: /* @__PURE__ */ i("div", { ref: te, className: `vsp${A ? " vsp--embed" : ""}${e.className ? ` ${e.className}` : ""}`, "data-theme": (e.mode ?? "video") === "video" || e.dark ? "dark" : "light", "data-mode": (e.mode ?? "video") === "video" ? "video" : "transcript", children: f ? /* @__PURE__ */ i(Xc, { idle: N, connect: O, page: !A, poster: e.poster ?? null, onPick: c }) : m ? /* @__PURE__ */ i(Jc, { idle: N, src: k, ask: !l, connect: O, page: !A, poster: e.poster ?? null, onClear: l ? () => c(null) : void 0 }) : s.id ? B && !C ? /* @__PURE__ */ i(eu, { idle: N, message: B.message, onRetry: Y, page: !A }) : /* @__PURE__ */ i(su, { ...e, initial: { ...e.initial ?? {}, ...y }, startMuted: p === !0, handle: r, id: s.id, api: z, shared: C, gone: D, loadError: B, reread: Y, desk: F, dark: (e.mode ?? "video") === "video" || !!e.dark, onStarted: (L) => a({ id: L.transcriptionId, token: null, listen: { transcriptionId: L.transcriptionId, recordingId: L.recordingId, token: L.token } }) }, s.id) : /* @__PURE__ */ i("div", { className: "vsp-gate", "data-theme": "dark", children: /* @__PURE__ */ i("span", { className: "gfull__spin gfull__holdspin", "aria-label": "Loading" }) }) }) });
5456
5471
  });
5457
5472
  function su(t) {
5458
5473
  var fs, ps, Ns, ms, ys, Ts, ws, Ls, vs, ks, js, zs, Is, Os, Cs, bs, xs, Ds, Ss, As, Es, _s, Ys, Us, Rs, Ps;
5459
- const { api: e, shared: n, gone: r, desk: s, dark: a } = t, o = t.id ?? "", l = Ie(() => ru(t), []), u = (t.mode ?? "video") === "video", [d, M] = k(t.loadError);
5460
- E(() => {
5474
+ const { api: e, shared: n, gone: r, desk: s, dark: a } = t, o = t.id ?? "", l = Ie(() => ru(t), []), u = (t.mode ?? "video") === "video", [d, M] = v(t.loadError);
5475
+ S(() => {
5461
5476
  t.loadError && M(t.loadError);
5462
5477
  }, [t.loadError]);
5463
- const [h, N] = k("none"), [p, y] = k(!1), [v, m] = k(""), [f, I] = tc(), [C, D] = k(null), [B, Y] = k(u ? "listen" : "read"), [X, z] = k(!1), F = j(null), S = j(/* @__PURE__ */ new Map()), [T, _] = k("main"), O = (w) => {
5478
+ const [h, N] = v("none"), [p, y] = v(!1), [k, m] = v(""), [f, I] = tc(), [C, D] = v(null), [B, Y] = v(u ? "listen" : "read"), [ee, z] = v(!1), F = j(null), A = j(/* @__PURE__ */ new Map()), [T, _] = v("main"), O = (w) => {
5464
5479
  const Ne = document.querySelector(".vs-sheet--settings"), Pe = Ne == null ? void 0 : Ne.parentElement;
5465
5480
  Ne && Pe && T === "main" && w !== "main" && Pe.style.setProperty("--vs-sheet-top", `${Math.round(Ne.getBoundingClientRect().top - Pe.getBoundingClientRect().top)}px`), _(w);
5466
5481
  };
5467
- E(() => {
5468
- X || O("main");
5469
- }, [X]);
5470
- const [te, K] = k(u), L = (n == null ? void 0 : n.recording) ?? null, ie = (L == null ? void 0 : L.id) ?? null, [ne, G] = k(l.lang), J = typeof ne == "string" ? ne : null, [pe, le] = k(l.labels), [Te, je] = k(l.words), [De, Le] = k(l.cc), [we, Ee] = k(l.translateAudio), [Re, Se] = k(l.clonedVoices), [$, H] = k(l.removeBackground), A = t.settings;
5471
- E(() => {
5472
- (A == null ? void 0 : A.lang) !== void 0 && G(A.lang);
5473
- }, [A == null ? void 0 : A.lang]), E(() => {
5474
- (A == null ? void 0 : A.speakerLabels) !== void 0 && le(A.speakerLabels ? "on" : "off");
5475
- }, [A == null ? void 0 : A.speakerLabels]), E(() => {
5476
- (A == null ? void 0 : A.wordHighlight) !== void 0 && je(A.wordHighlight ? "on" : "off");
5477
- }, [A == null ? void 0 : A.wordHighlight]), E(() => {
5478
- (A == null ? void 0 : A.subtitles) !== void 0 && Le(A.subtitles);
5479
- }, [A == null ? void 0 : A.subtitles]), E(() => {
5480
- (A == null ? void 0 : A.translateAudio) !== void 0 && Ee(A.translateAudio);
5481
- }, [A == null ? void 0 : A.translateAudio]), E(() => {
5482
- (A == null ? void 0 : A.voices) !== void 0 && Se(A.voices === "cloned");
5483
- }, [A == null ? void 0 : A.voices]), E(() => {
5484
- (A == null ? void 0 : A.removeBackground) !== void 0 && H(A.removeBackground);
5485
- }, [A == null ? void 0 : A.removeBackground]);
5482
+ S(() => {
5483
+ ee || O("main");
5484
+ }, [ee]);
5485
+ const [te, K] = v(u), L = (n == null ? void 0 : n.recording) ?? null, ie = (L == null ? void 0 : L.id) ?? null, [ne, G] = v(l.lang), J = typeof ne == "string" ? ne : null, [pe, le] = v(l.labels), [Te, je] = v(l.words), [De, Le] = v(l.cc), [we, Ee] = v(l.translateAudio), [Re, Se] = v(l.clonedVoices), [$, H] = v(l.removeBackground), E = t.settings;
5486
+ S(() => {
5487
+ (E == null ? void 0 : E.lang) !== void 0 && G(E.lang);
5488
+ }, [E == null ? void 0 : E.lang]), S(() => {
5489
+ (E == null ? void 0 : E.speakerLabels) !== void 0 && le(E.speakerLabels ? "on" : "off");
5490
+ }, [E == null ? void 0 : E.speakerLabels]), S(() => {
5491
+ (E == null ? void 0 : E.wordHighlight) !== void 0 && je(E.wordHighlight ? "on" : "off");
5492
+ }, [E == null ? void 0 : E.wordHighlight]), S(() => {
5493
+ (E == null ? void 0 : E.subtitles) !== void 0 && Le(E.subtitles);
5494
+ }, [E == null ? void 0 : E.subtitles]), S(() => {
5495
+ (E == null ? void 0 : E.translateAudio) !== void 0 && Ee(E.translateAudio);
5496
+ }, [E == null ? void 0 : E.translateAudio]), S(() => {
5497
+ (E == null ? void 0 : E.voices) !== void 0 && Se(E.voices === "cloned");
5498
+ }, [E == null ? void 0 : E.voices]), S(() => {
5499
+ (E == null ? void 0 : E.removeBackground) !== void 0 && H(E.removeBackground);
5500
+ }, [E == null ? void 0 : E.removeBackground]);
5486
5501
  const b = { language: !0, subtitles: !0, audio: !0, export: !0, share: !0, fullscreen: !0, settings: !0, ...t.controls ?? {} }, V = u && !we;
5487
- E(() => {
5502
+ S(() => {
5488
5503
  if (!t.syncUrl) return;
5489
5504
  const w = new URL(window.location.href);
5490
5505
  J ? w.searchParams.set("lang", J) : w.searchParams.delete("lang"), pe ? w.searchParams.set("labels", pe) : w.searchParams.delete("labels"), Te ? w.searchParams.set("words", Te) : w.searchParams.delete("words"), De ? w.searchParams.delete("cc") : w.searchParams.set("cc", "off"), we ? w.searchParams.delete("audio") : w.searchParams.set("audio", "original"), Re ? w.searchParams.delete("voices") : w.searchParams.set("voices", "stock"), Mo(w, $), w.href !== window.location.href && window.history.replaceState(window.history.state, "", w);
5491
- }, [J, pe, Te, De, we, Re, $]), E(() => {
5506
+ }, [J, pe, Te, De, we, Re, $]), S(() => {
5492
5507
  n && !n.allowTranslate && J && G(null);
5493
5508
  }, [n, J]);
5494
5509
  const { model: ce, error: W, clearError: ye, setLanguage: Z, mergeTranslations: ke, translating: ze, translateFailed: Ge, shownLang: Ae } = nl(ie, {
@@ -5497,15 +5512,15 @@ function su(t) {
5497
5512
  w.type === "job.progress" && D({ state: w.state, processedS: w.processedS ?? 0, totalS: w.totalS ?? null, segmentsDone: w.segmentsDone ?? 0, segmentsTotal: w.segmentsTotal ?? null, pct: w.pct ?? 0, error: w.error ?? null });
5498
5513
  }
5499
5514
  }), ge = Ie(() => So(ce).filter((w) => !w.suppressed), [ce]), _e = rl((n == null ? void 0 : n.job) ?? null), Ve = ["done", "failed", "stopped"].includes(ur((_e == null ? void 0 : _e.state) ?? ((fs = n == null ? void 0 : n.job) == null ? void 0 : fs.state))), Q = Ve ? _e : C ?? _e, he = !!C && !["done", "failed", "stopped"].includes(ur(C.state)), ue = j(0);
5500
- E(() => {
5515
+ S(() => {
5501
5516
  !Ve || !he || Date.now() - ue.current < 1e4 || (ue.current = Date.now(), t.reread());
5502
5517
  }, [Ve, he, C == null ? void 0 : C.state, C == null ? void 0 : C.processedS, o]);
5503
5518
  const ae = ur((Q == null ? void 0 : Q.state) ?? ((ps = n == null ? void 0 : n.job) == null ? void 0 : ps.state) ?? (e.listen ? (L == null ? void 0 : L.state) === "finalized" ? "done" : L != null && L.state ? "transcribing" : void 0 : void 0)), fe = !!ie && (ae === "transcribing" || ae === "queued"), Ye = u && !r && (!n || (fe || ae === "cropping") && ge.length === 0), U = fe ? (Q == null ? void 0 : Q.pct) ?? 0 : 100, R = il(n == null ? void 0 : n.job, Q) ?? (L == null ? void 0 : L.mediaDurationS) ?? null, q = ((Ns = ce.segments.values().next().value) == null ? void 0 : Ns.language) ?? (L == null ? void 0 : L.spokenLanguage) ?? null, re = n != null && n.sharedBy ? `Shared by ${n.sharedBy}` : "", de = ((Ts = (ys = (ms = n == null ? void 0 : n.job) == null ? void 0 : ms.source) == null ? void 0 : ys.name) == null ? void 0 : Ts.trim()) || null, Oe = n ? ((ws = n.name) == null ? void 0 : ws.trim()) || de : null, me = !!((Ls = n == null ? void 0 : n.job) != null && Ls.hasAudio), ve = (vs = n == null ? void 0 : n.job) == null ? void 0 : vs.source, Ce = !me && !!ve && (ve.kind !== "url" || ve.bytes != null) && (ae === "transcribing" || ae === "queued" || ae === "done"), We = ie && (n != null && n.allowDownload) && me ? Ba(e.origin, ie, e.cred) : null, Be = !!ve && (ve.kind !== "url" || ve.bytes != null), ot = iu(We && Be ? We : null), st = We && (!Be || ot === "yes") ? We : We && ot === "unknown" ? null : ie && (n != null && n.allowDownload) && (Ce || me && Be) ? vn(e.origin, ie, "source", e.cred) : null, pt = ge[ge.length - 1], Ze = pt ? ((ks = pt.words[pt.words.length - 1]) == null ? void 0 : ks.end) ?? pt.start : 0, it = u && fe ? Math.max(Ze, (Q == null ? void 0 : Q.processedS) ?? 0) : null, dt = oc(st, (me || Ce) && !!(n != null && n.allowDownload), ge, R, Ce ? ((zs = (js = n == null ? void 0 : n.job) == null ? void 0 : js.crop) == null ? void 0 : zs.startS) ?? 0 : 0, it), Qe = ((Os = (Is = n == null ? void 0 : n.job) == null ? void 0 : Is.source) == null ? void 0 : Os.kind) === "url" ? Si(n.job.source.url) : null, Ft = ro(Qe), Dt = ac(ge, R, ((bs = (Cs = n == null ? void 0 : n.job) == null ? void 0 : Cs.crop) == null ? void 0 : bs.startS) ?? 0, it), Ke = !!Qe, ht = Ke ? Dt.player : dt, lt = Ci(), Tt = j(null), se = hc({ forcedVoice: t.voice ?? null, recordingId: ie, model: ce, rows: ge, lenS: R, ended: !!ie && !fe, cred: e.cred, langs: lt, srcLang: q, canTranslate: !!(n != null && n.allowTranslate), pickedLang: ne, setPickedLang: G, side: s && !te ? dc : void 0, hearOriginal: V, timed: !!Qe, stockVoices: u && !Re, stickyPicker: u, pickerBusy: Tt.current }), Gt = j(null);
5504
- E(() => {
5519
+ S(() => {
5505
5520
  !ie || Gt.current === J || (Gt.current = J, Z(J));
5506
5521
  }, [J, ie]);
5507
5522
  const x = Ke ? Dt.player : se.on ? se.player : ht;
5508
- E(() => {
5523
+ S(() => {
5509
5524
  if (Ke) {
5510
5525
  se.player.pause();
5511
5526
  return;
@@ -5516,14 +5531,14 @@ function su(t) {
5516
5531
  var Fe;
5517
5532
  return { sid: w.sentenceId, start: w.start, end: ((Fe = Pe[Ne + 1]) == null ? void 0 : Fe.start) ?? Ut(w, w.start, w.start + 4) };
5518
5533
  }), [ge]), St = zo({ on: Ke && se.on, lines: Mt, clips: se.clips, t: x.t, playing: x.playing, muted: x.muted }), Pt = !!J && (ze || se.relang || se.on && St.missing != null);
5519
- Tt.current = Pt ? J : null, E(() => {
5534
+ Tt.current = Pt ? J : null, S(() => {
5520
5535
  Ke && se.on && St.sid != null && se.setNear(St.sid);
5521
5536
  }, [St.sid, Ke, se.on]), ic([ht, se.player], se.sampling);
5522
5537
  const Ot = j(null);
5523
- E(() => {
5538
+ S(() => {
5524
5539
  fe && !x.playing && Ot.current && (Ot.current.scrollTop = Ot.current.scrollHeight);
5525
5540
  }, [fe, ge.length]);
5526
- const Yn = fc(Ot, ge, p, v, y), Qt = /* @__PURE__ */ i(gc, { open: p, q: v, onQ: m, onClose: () => y(!1), hits: Yn, desk: s, inline: s }), Je = io({ name: n == null ? void 0 : n.name, sourceName: (Ds = (xs = n == null ? void 0 : n.job) == null ? void 0 : xs.source) == null ? void 0 : Ds.name, ytTitle: Ft, url: ((As = (Ss = n == null ? void 0 : n.job) == null ? void 0 : Ss.source) == null ? void 0 : As.kind) === "url" ? n.job.source.url : t.src ?? null, id: o }), gt = !!(n != null && n.allowDownload), Ct = !!(n != null && n.allowExport), ct = se.readLang, et = ct ? ((Es = lt == null ? void 0 : lt.languages.find((w) => w.code === ct)) == null ? void 0 : Es.name) ?? ct.toUpperCase() : null, Zt = async () => {
5541
+ const Yn = fc(Ot, ge, p, k, y), Qt = /* @__PURE__ */ i(gc, { open: p, q: k, onQ: m, onClose: () => y(!1), hits: Yn, desk: s, inline: s }), Je = io({ name: n == null ? void 0 : n.name, sourceName: (Ds = (xs = n == null ? void 0 : n.job) == null ? void 0 : xs.source) == null ? void 0 : Ds.name, ytTitle: Ft, url: ((As = (Ss = n == null ? void 0 : n.job) == null ? void 0 : Ss.source) == null ? void 0 : As.kind) === "url" ? n.job.source.url : t.src ?? null, id: o }), gt = !!(n != null && n.allowDownload), Ct = !!(n != null && n.allowExport), ct = se.readLang, et = ct ? ((Es = lt == null ? void 0 : lt.languages.find((w) => w.code === ct)) == null ? void 0 : Es.name) ?? ct.toUpperCase() : null, Zt = async () => {
5527
5542
  if (ie)
5528
5543
  try {
5529
5544
  if (ct && se.canSpeak) {
@@ -5547,7 +5562,7 @@ function su(t) {
5547
5562
  }, sn = fe ? "MORE TO COME…" : "END OF TRANSCRIPT", an = fe ? "var(--brand)" : "var(--ink-28)", qt = sl(Q, ge.length), wt = x.has && (!se.relang || !!Qe), $e = j(x);
5548
5563
  $e.current = x;
5549
5564
  const bt = `${J ?? ""}|${se.on ? "voice" : "source"}`, on = j({ key: bt, idx: 0, t: 0, playing: !1, until: 0 });
5550
- E(() => {
5565
+ S(() => {
5551
5566
  const w = on.current;
5552
5567
  if (w.key !== bt && (w.key = bt, w.until = Date.now() + 15e3), !Ke) {
5553
5568
  if (!w.until) {
@@ -5563,8 +5578,8 @@ function su(t) {
5563
5578
  });
5564
5579
  const ln = j(!1), tt = j(!1);
5565
5580
  u && (fi.video = !0);
5566
- const [cn, At] = k(!1), [Un, Rn] = k(!1);
5567
- E(() => {
5581
+ const [cn, At] = v(!1), [Un, Rn] = v(!1);
5582
+ S(() => {
5568
5583
  if (!u || ln.current || !wt || !te || Ye || t.autoplay === !1) return;
5569
5584
  ln.current = !0;
5570
5585
  const w = (Fe) => {
@@ -5596,8 +5611,8 @@ function su(t) {
5596
5611
  return;
5597
5612
  }
5598
5613
  tt.current = !0, $e.current.toggle();
5599
- }, P = (w) => /* @__PURE__ */ i(ec, { player: x, size: w }), xe = !!ie && !fe, [He, vt] = k(!1);
5600
- E(() => {
5614
+ }, P = (w) => /* @__PURE__ */ i(ec, { player: x, size: w }), xe = !!ie && !fe, [He, vt] = v(!1);
5615
+ S(() => {
5601
5616
  if (!ze) {
5602
5617
  vt(!1);
5603
5618
  return;
@@ -5608,7 +5623,7 @@ function su(t) {
5608
5623
  const Et = He ? Ae : J, Gi = Tl(ie, J, ge, ke), Pn = El(_l(L), ie, se.readLang), Zi = gt || Ct, qi = (((Ys = (_s = n == null ? void 0 : n.job) == null ? void 0 : _s.crop) == null ? void 0 : Ys.startS) ?? 0) + jn(x, ge), kt = B === "listen", _t = kt && (!!Qe || u), Ki = (w) => {
5609
5624
  ht.pause(), se.player.pause(), Y(w), w === "read" && te && (tn(!1), K(!1));
5610
5625
  };
5611
- E(() => {
5626
+ S(() => {
5612
5627
  kt || (ht.playing && ht.pause(), se.player.playing && se.player.pause());
5613
5628
  }, [kt, ht.playing, se.player.playing]);
5614
5629
  const Ue = se.barChip, $t = xi(Ue.label), Rr = /* @__PURE__ */ i(gr, { value: B, onChange: Ki, bordered: !1, options: Oc($t, !!Qe) }), Bt = [...xe ? [{ key: "summary", label: "Summary" }] : [], ...Zi ? [{ key: "export", label: "Export" }] : []], Pr = (w) => /* @__PURE__ */ g(be, { children: [
@@ -5628,7 +5643,7 @@ function su(t) {
5628
5643
  se.relang || (Ne = x.seekFrac) == null || Ne.call(x, w);
5629
5644
  }
5630
5645
  }, [Xi, ea] = bc(se.on && !!x.preparing && x.playing, 1500), Qn = se.on && ((Us = x.error) == null ? void 0 : Us.code) === "voice_not_started", $n = se.canSpeak && !se.error && !Qn, hn = J ? ((Rs = lt == null ? void 0 : lt.languages.find((w) => w.code === J)) == null ? void 0 : Rs.name) ?? Ue.label : "", nt = te ? Cc({ lang: J, langName: hn, translating: ze && !!J, translateFailed: Ge, voiceFailed: Qn, relang: se.relang, starting: se.on ? x.starting : null, slowLine: Xi, lineSince: ea }) : null, Bn = !!Qe && !!nt && (nt.kind === "translating" || nt.kind === "voice" && se.relang), $r = !Bn || !nt ? null : nt.kind === "translating" ? `Translating into ${hn || "the new language"}…` : `Preparing the ${hn || "translated"} voice…`, Jt = !Bn && ((nt == null ? void 0 : nt.kind) === "voice" || (nt == null ? void 0 : nt.kind) === "starting"), Br = br({ ...se.langList, keepOpen: !0, open: T === "lang", onClose: () => O("main") }), Vr = uo($, se.on), ta = u && Vr.bed && gt && ie && (!fe || st) ? $s(e.origin, ie, e.cred) : null, Hr = To(ta, { t: jn(x, ge), playing: x.playing && !Jt && !(x.timed && x.preparing), muted: x.muted }), na = u && Vr.speech && gt && ie && (!fe || st) ? $s(e.origin, ie, e.cred, "speech") : null, Vn = vi(na, { t: jn(x, ge), playing: !se.on && x.playing, muted: x.muted }), Hn = !se.on && Vn.on;
5631
- E(() => {
5646
+ S(() => {
5632
5647
  var w;
5633
5648
  Dt.setVideoSound(!(Ke && (se.on || Hn))), (w = dt.silence) == null || w.call(dt, !Ke && Hn);
5634
5649
  }, [Ke, se.on, Hn, st]);
@@ -5653,8 +5668,8 @@ function su(t) {
5653
5668
  /* @__PURE__ */ i("span", { style: { fontSize: Ne === "sm" ? 17 : 21, lineHeight: 1 }, children: Ue.flag }),
5654
5669
  Pt && /* @__PURE__ */ i("span", { style: { position: "absolute", right: 2, bottom: 2, display: "flex", borderRadius: 999, background: "rgba(5,6,21,.7)", padding: 1 }, children: /* @__PURE__ */ i(ut, { size: 11, color: "#eef0f8", track: "rgba(255,255,255,.25)" }) })
5655
5670
  ] }) : /* @__PURE__ */ i(xn, { flag: Ue.flag, code: Ue.code, label: Ue.label, bordered: !1, size: Ne, onClick: Ue.onClick, style: w }), Fr = { on: !1, title: "Voices", onClick: () => {
5656
- } }, [aa, oa] = k(!1);
5657
- E(() => {
5671
+ } }, [aa, oa] = v(!1);
5672
+ S(() => {
5658
5673
  x.t > 0.3 && oa(!0);
5659
5674
  }, [x.t]);
5660
5675
  const la = !Qe && u && ie && (n != null && n.allowDownload) && !fe ? /* @__PURE__ */ i(no, { src: vn(e.origin, ie, "video", e.cred), t: jn(x, ge), playing: x.playing && !Jt, seekN: x.seekN, onToggle: x.has ? Kt : void 0 }, ie) : null, Gr = Qe ? /* @__PURE__ */ g(be, { children: [
@@ -5672,18 +5687,18 @@ function su(t) {
5672
5687
  ] }) : null, Zr = _t && Qe && !te ? /* @__PURE__ */ i(Ul, { ytId: Qe, title: Je, radius: 14, large: !0, style: s ? void 0 : { margin: "8px 20px 2px" }, picture: Gr, children: /* @__PURE__ */ i(kc, { pos: Qr, transport: Wr, chip: Zn({ ...Gn, width: 64, height: 28, minHeight: 28, padding: "0 8px" }, "sm"), voices: Fr, onFull: () => {
5673
5688
  tn(!0), K(!0);
5674
5689
  }, copied: null }) }) : null, Xe = x.wordSync ? dl(ge, x.idx, x.t) ? ge[x.idx] : void 0 : ge[x.idx];
5675
- for (const w of ge) for (const [Ne, Pe] of Object.entries(w.translations)) Pe && S.current.set(`${w.sentenceId ?? w.start}|${Ne}`, Pe);
5676
- const qr = (w, Ne) => w.translations[Ne] || S.current.get(`${w.sentenceId ?? w.start}|${Ne}`) || null, qn = (w, Ne) => !w || !Ne || w.language === Ne || !!qr(w, Ne), jt = qn(Xe, J) ? J : qn(Xe, F.current) ? F.current : J;
5690
+ for (const w of ge) for (const [Ne, Pe] of Object.entries(w.translations)) Pe && A.current.set(`${w.sentenceId ?? w.start}|${Ne}`, Pe);
5691
+ const qr = (w, Ne) => w.translations[Ne] || A.current.get(`${w.sentenceId ?? w.start}|${Ne}`) || null, qn = (w, Ne) => !w || !Ne || w.language === Ne || !!qr(w, Ne), jt = qn(Xe, J) ? J : qn(Xe, F.current) ? F.current : J;
5677
5692
  Xe && qn(Xe, jt) && (F.current = jt);
5678
5693
  const Kr = Xe && jt && Xe.language !== jt ? qr(Xe, jt) : null, ca = Xe && Kr && jt && !Xe.translations[jt] ? Object.assign([...ge], { [x.idx]: { ...Xe, translations: { ...Xe.translations, [jt]: Kr } } }) : ge, Mn = Xe ? Ui(ca, x.idx, jt) : [], gn = Te ? Te === "on" : !u || se.on || !Et || Et === q, Jr = gn ? ni(x, x.idx, Mn) : null, Xr = Mn.map((w, Ne) => ({ t: w.text, sp: Ne < Mn.length - 1 ? " " : "", dim: Jr != null && Ne > Jr })), fn = pe ? pe === "on" : u ? !1 : Bo(ce, ge, L == null ? void 0 : L.settings), es = { lang: J, subtitles: De, speakerLabels: fn, wordHighlight: gn, translateAudio: we, voices: Re ? "cloned" : "synthetic", removeBackground: $ }, ua = JSON.stringify(es), pn = j(t.onSettingsChange);
5679
- pn.current = t.onSettingsChange, E(() => {
5694
+ pn.current = t.onSettingsChange, S(() => {
5680
5695
  var w;
5681
5696
  (w = pn.current) == null || w.call(pn, es);
5682
5697
  }, [ua]);
5683
- const Nn = Xe && Xe.speaker >= 0 && fn ? Sr(ce, Xe.speaker) : null, [da, ts] = k(!1), [Kn, ns] = k(null), [ha, rs] = k(null), Jn = j(void 0);
5684
- E(() => () => window.clearTimeout(Jn.current), []);
5698
+ const Nn = Xe && Xe.speaker >= 0 && fn ? Sr(ce, Xe.speaker) : null, [da, ts] = v(!1), [Kn, ns] = v(null), [ha, rs] = v(null), Jn = j(void 0);
5699
+ S(() => () => window.clearTimeout(Jn.current), []);
5685
5700
  const Xn = j(void 0);
5686
- E(() => () => window.clearTimeout(Xn.current), []);
5701
+ S(() => () => window.clearTimeout(Xn.current), []);
5687
5702
  const ss = (w) => {
5688
5703
  if (t.shareUrl) return t.shareUrl(w);
5689
5704
  const Ne = new URL(window.location.href);
@@ -5697,10 +5712,10 @@ function su(t) {
5697
5712
  for (let Pe = 0; Pe < ge.length; Pe++) ge[Pe].start <= w && (Ne = Pe);
5698
5713
  x.seekRow(Ne);
5699
5714
  }, is = j(!1);
5700
- E(() => {
5715
+ S(() => {
5701
5716
  const w = mn.current;
5702
5717
  w == null || is.current || !x.has || ge.length === 0 || (is.current = !0, er(w));
5703
- }, [x.has, ge.length]), E(() => {
5718
+ }, [x.has, ge.length]), S(() => {
5704
5719
  const w = mn.current;
5705
5720
  w == null || !x.playing || (mn.current = null, Math.abs(x.t - w) > 2 && er(w));
5706
5721
  }, [x.playing]);
@@ -5721,13 +5736,13 @@ function su(t) {
5721
5736
  toggleMute: () => {
5722
5737
  At(!1), $e.current.toggleMute();
5723
5738
  }
5724
- }, E(() => () => {
5739
+ }, S(() => () => {
5725
5740
  t.handle.current = null;
5726
5741
  }, []);
5727
5742
  const as = j(t.onPlayback);
5728
5743
  as.current = t.onPlayback;
5729
5744
  const os = j(J);
5730
- os.current = J, E(() => {
5745
+ os.current = J, S(() => {
5731
5746
  let w = "";
5732
5747
  const Ne = () => {
5733
5748
  const Fe = as.current;
@@ -5754,15 +5769,15 @@ function su(t) {
5754
5769
  /* @__PURE__ */ i("div", { className: "srow__t", children: Ne }),
5755
5770
  /* @__PURE__ */ i("div", { className: "srow__s", children: Pe })
5756
5771
  ] }),
5757
- /* @__PURE__ */ i(oe, { d: ft ? ee.check : ee.downloaded, size: 17, sw: 1.6, style: { flex: "none", color: ft ? "var(--brand)" : "var(--ink-62)" } })
5772
+ /* @__PURE__ */ i(oe, { d: ft ? X.check : X.downloaded, size: 17, sw: 1.6, style: { flex: "none", color: ft ? "var(--brand)" : "var(--ink-62)" } })
5758
5773
  ] });
5759
5774
  }, fa = /* @__PURE__ */ g("span", { className: "vs-sheet__title", style: { position: "relative" }, children: [
5760
5775
  " ",
5761
5776
  /* @__PURE__ */ g("button", { type: "button", onClick: () => O("main"), "aria-label": "Back", style: { position: "absolute", left: -6, top: "50%", transform: "translateY(-50%)", display: "inline-flex", alignItems: "center", gap: 2, padding: "4px 6px 4px 0", border: 0, background: "none", color: "var(--ink-96)", fontFamily: "var(--vs-font-sans)", fontSize: 15, fontWeight: 600, letterSpacing: 0, lineHeight: 1, whiteSpace: "nowrap", cursor: "pointer" }, children: [
5762
- /* @__PURE__ */ i(oe, { d: ee.chevronLeft, size: 18, sw: 1.8 }),
5777
+ /* @__PURE__ */ i(oe, { d: X.chevronLeft, size: 18, sw: 1.8 }),
5763
5778
  "Back"
5764
5779
  ] })
5765
- ] }), yn = /* @__PURE__ */ i(oe, { d: ee.chevronRight, size: 17, sw: 1.6, style: { flex: "none", color: "var(--ink-45)" } }), pa = { main: "SETTINGS", lang: "LANGUAGE", subs: "SUBTITLES", audio: "AUDIO", export: "EXPORT" }[T], Tn = { display: "flex", flexDirection: "column", gap: 2, paddingBottom: 14 }, tr = u ? /* @__PURE__ */ i(Wt, { open: X, onClose: () => z(!1), title: pa, titleNode: T === "main" ? void 0 : fa, doneLabel: $t.done, kind: T === "main" ? "settings" : "settings vs-sheet--page", sticky: !0, children: /* @__PURE__ */ i(fr, { children: T === "lang" ? /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column" }, children: [
5780
+ ] }), yn = /* @__PURE__ */ i(oe, { d: X.chevronRight, size: 17, sw: 1.6, style: { flex: "none", color: "var(--ink-45)" } }), pa = { main: "SETTINGS", lang: "LANGUAGE", subs: "SUBTITLES", audio: "AUDIO", export: "EXPORT" }[T], Tn = { display: "flex", flexDirection: "column", gap: 2, paddingBottom: 14 }, tr = u ? /* @__PURE__ */ i(Wt, { open: ee, onClose: () => z(!1), title: pa, titleNode: T === "main" ? void 0 : fa, doneLabel: $t.done, kind: T === "main" ? "settings" : "settings vs-sheet--page", sticky: !0, children: /* @__PURE__ */ i(fr, { children: T === "lang" ? /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column" }, children: [
5766
5781
  /* @__PURE__ */ i("div", { style: { position: "sticky", top: 0, zIndex: 1, padding: "4px 14px 10px", background: "var(--vs-surface-raised)" }, children: Br.search }),
5767
5782
  Br.list
5768
5783
  ] }) : T === "subs" ? /* @__PURE__ */ g("div", { style: Tn, children: [
@@ -5845,7 +5860,7 @@ function su(t) {
5845
5860
  ] }),
5846
5861
  yn
5847
5862
  ] }, "export")
5848
- ].filter(Boolean).flatMap((w, Ne) => Ne ? [/* @__PURE__ */ i("div", { className: "sdiv" }, `d${Ne}`), w] : [w]) }) }) }) : /* @__PURE__ */ i(Wt, { open: X, onClose: () => z(!1), title: $t.settings, doneLabel: $t.done, drawer: s, children: /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
5863
+ ].filter(Boolean).flatMap((w, Ne) => Ne ? [/* @__PURE__ */ i("div", { className: "sdiv" }, `d${Ne}`), w] : [w]) }) }) }) : /* @__PURE__ */ i(Wt, { open: ee, onClose: () => z(!1), title: $t.settings, doneLabel: $t.done, drawer: s, children: /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", gap: 2 }, children: [
5849
5864
  Ue.can && /* @__PURE__ */ g(be, { children: [
5850
5865
  /* @__PURE__ */ g("div", { className: "srow srow--tap", onClick: () => {
5851
5866
  z(!1), Ue.onClick();
@@ -5856,7 +5871,7 @@ function su(t) {
5856
5871
  ] }),
5857
5872
  /* @__PURE__ */ i("span", { style: { fontSize: 18, lineHeight: 1 }, children: Ue.flag }),
5858
5873
  se.original ? null : /* @__PURE__ */ i("span", { style: { fontSize: 14, fontWeight: 600, color: "var(--ink-96)" }, children: Ue.label }),
5859
- /* @__PURE__ */ i(oe, { d: ee.chevronRight, size: 15, style: { color: "var(--ink-45)" } })
5874
+ /* @__PURE__ */ i(oe, { d: X.chevronRight, size: 15, style: { color: "var(--ink-45)" } })
5860
5875
  ] }),
5861
5876
  /* @__PURE__ */ i("div", { className: "sdiv" })
5862
5877
  ] }),
@@ -5882,7 +5897,7 @@ function su(t) {
5882
5897
  sheet: u ? tr : null,
5883
5898
  voices: null,
5884
5899
  voicesBtn: u ? null : Fr,
5885
- sheetOpen: se.sheetsOpen || X,
5900
+ sheetOpen: se.sheetsOpen || ee,
5886
5901
  onShare: u && b.share ? ga : void 0,
5887
5902
  onSettings: u && b.settings ? () => {
5888
5903
  se.closePicker(), z((w) => !w);
@@ -5890,10 +5905,10 @@ function su(t) {
5890
5905
  compact: !!t.compact,
5891
5906
  paused: { title: Je, summary: Pn.state === "ready" ? Pn.summary ?? null : null, share: b.share && (t.shareUrl || !t.onShare) ? { url: ss, at: x.t } : null },
5892
5907
  copied: da ? /* @__PURE__ */ g("div", { className: "gfull__toast", "aria-live": "polite", children: [
5893
- /* @__PURE__ */ i(oe, { d: ee.check, size: 13, sw: 2 }),
5908
+ /* @__PURE__ */ i(oe, { d: X.check, size: 13, sw: 2 }),
5894
5909
  "Link copied"
5895
5910
  ] }) : cn ? /* @__PURE__ */ g("div", { className: "gfull__toast gfull__soundtip", "aria-live": "polite", children: [
5896
- /* @__PURE__ */ i(oe, { d: ee.volumeOff, size: 14, sw: 1.8 }),
5911
+ /* @__PURE__ */ i(oe, { d: X.volumeOff, size: 14, sw: 1.8 }),
5897
5912
  "Tap for sound"
5898
5913
  ] }) : $r ? /* @__PURE__ */ g("div", { className: "gfull__toast", role: "status", "aria-live": "polite", children: [
5899
5914
  /* @__PURE__ */ i(ut, { size: 13, color: "#eef0f8", track: "rgba(255,255,255,.25)" }),
@@ -5910,7 +5925,7 @@ function su(t) {
5910
5925
  }
5911
5926
  }
5912
5927
  );
5913
- E(() => {
5928
+ S(() => {
5914
5929
  !u && te && !_t && (tn(!1), K(!1));
5915
5930
  }, [u, te, _t]);
5916
5931
  const cs = fe && /* @__PURE__ */ g("div", { className: `pubprog${s ? " pubprog--desk" : ""}${p ? " pubprog--find" : ""}`, children: [
@@ -5921,15 +5936,15 @@ function su(t) {
5921
5936
  /* @__PURE__ */ i("span", { className: "s", children: qt })
5922
5937
  ] }),
5923
5938
  !s && /* @__PURE__ */ i("div", { className: "pubprog__bar", style: { marginTop: 8 }, children: /* @__PURE__ */ i("div", { style: { width: `${U}%` } }) })
5924
- ] }), nr = r && /* @__PURE__ */ i("div", { className: "hint", style: { padding: "30px 20px", textAlign: "center", fontSize: 13 }, children: "This link is no longer shared. Ask the person who sent it for a new one." }), us = /* @__PURE__ */ i(Mc, { model: ce, rows: ge, player: kt ? x : { ...x, playRow: x.seekRow }, tail: sn, tailFg: an, running: fe, desk: s, feedRef: Ot, listener: !0, showLabels: fn, find: v, findOpen: !s && p, lang: Et, warm: He, onVisible: Gi, wordHl: gn }), rr = /* @__PURE__ */ i(fl, { error: d ?? W ?? (Qn && te ? null : x.error) ?? se.error, onClose: () => {
5939
+ ] }), nr = r && /* @__PURE__ */ i("div", { className: "hint", style: { padding: "30px 20px", textAlign: "center", fontSize: 13 }, children: "This link is no longer shared. Ask the person who sent it for a new one." }), us = /* @__PURE__ */ i(Mc, { model: ce, rows: ge, player: kt ? x : { ...x, playRow: x.seekRow }, tail: sn, tailFg: an, running: fe, desk: s, feedRef: Ot, listener: !0, showLabels: fn, find: k, findOpen: !s && p, lang: Et, warm: He, onVisible: Gi, wordHl: gn }), rr = /* @__PURE__ */ i(fl, { error: d ?? W ?? (Qn && te ? null : x.error) ?? se.error, onClose: () => {
5925
5940
  M(null), ye(), x.clearError(), se.clearError();
5926
5941
  } }), ds = [R ? zt(R) : null, q ? q.toUpperCase() : null, re || "Read-only copy"].filter(Boolean).join(" · "), hs = (w) => /* @__PURE__ */ i("div", { className: "ctrans", children: se.noVoice ? se.noVoiceNote : /* @__PURE__ */ g(be, { children: [
5927
5942
  /* @__PURE__ */ g("div", { className: "ctrans__row", children: [
5928
5943
  /* @__PURE__ */ i("span", { className: "ctrans__sp", "aria-hidden": "true" }),
5929
5944
  /* @__PURE__ */ g("div", { className: "ctrans__mid", children: [
5930
- /* @__PURE__ */ i("button", { type: "button", className: "ctrans__step", "aria-label": "Previous segment", title: "Previous segment", style: { opacity: x.idx <= 0 ? 0.3 : 1 }, onClick: x.prev, children: /* @__PURE__ */ i(oe, { d: ee.chevronLeft, size: 16, sw: 1.8 }) }),
5945
+ /* @__PURE__ */ i("button", { type: "button", className: "ctrans__step", "aria-label": "Previous segment", title: "Previous segment", style: { opacity: x.idx <= 0 ? 0.3 : 1 }, onClick: x.prev, children: /* @__PURE__ */ i(oe, { d: X.chevronLeft, size: 16, sw: 1.8 }) }),
5931
5946
  /* @__PURE__ */ i("button", { type: "button", className: "ctrans__play", "aria-label": se.relang ? "Preparing audio" : x.playing ? "Pause" : "Play", title: se.relang ? "Preparing audio…" : se.playTitle ?? (x.playing ? "Pause" : "Play"), disabled: !wt, onClick: x.toggle, children: se.relang ? /* @__PURE__ */ i("span", { className: "ctrans__spin" }) : /* @__PURE__ */ i("svg", { viewBox: "0 0 24 24", width: 16, height: 16, fill: "currentColor", "aria-hidden": "true", style: x.playing ? void 0 : { marginLeft: 2 }, children: x.playing ? Jl : Xl }) }),
5932
- /* @__PURE__ */ i("button", { type: "button", className: "ctrans__step", "aria-label": "Next segment", title: "Next segment", style: { opacity: x.idx >= ge.length - 1 ? 0.3 : 1 }, onClick: x.next, children: /* @__PURE__ */ i(oe, { d: ee.chevronRight, size: 16, sw: 1.8 }) })
5947
+ /* @__PURE__ */ i("button", { type: "button", className: "ctrans__step", "aria-label": "Next segment", title: "Next segment", style: { opacity: x.idx >= ge.length - 1 ? 0.3 : 1 }, onClick: x.next, children: /* @__PURE__ */ i(oe, { d: X.chevronRight, size: 16, sw: 1.8 }) })
5933
5948
  ] }),
5934
5949
  /* @__PURE__ */ i("span", { className: "ctrans__mute", children: P(36) })
5935
5950
  ] }),
@@ -5947,12 +5962,12 @@ function su(t) {
5947
5962
  /* @__PURE__ */ i("div", { className: "gfull__holdn", children: "The video starts as soon as the first lines are transcribed." })
5948
5963
  ] }) : /* @__PURE__ */ i("span", { className: "gfull__spin gfull__holdspin", "aria-label": "Loading" }) })
5949
5964
  ] }), gs = u && n && (fe || ae === "cropping") ? Math.max(0, Math.min(100, Math.round(U))) : null, wn = j(t.onProgress);
5950
- wn.current = t.onProgress, E(() => {
5965
+ wn.current = t.onProgress, S(() => {
5951
5966
  var w;
5952
5967
  (w = wn.current) == null || w.call(wn, gs);
5953
5968
  }, [gs]);
5954
- const [ya, sr] = k(!1), ir = !!xt && !Ye && (Ke ? !!x.ended : !x.playing && x.dur > 0 && x.t >= x.dur - 0.5);
5955
- E(() => {
5969
+ const [ya, sr] = v(!1), ir = !!xt && !Ye && (Ke ? !!x.ended : !x.playing && x.dur > 0 && x.t >= x.dur - 0.5);
5970
+ S(() => {
5956
5971
  ir || sr(!1);
5957
5972
  }, [ir]);
5958
5973
  const Ta = t.endCard !== !1 && ir && !ya && /* @__PURE__ */ i(Pc, { options: { appUrl: t.appUrl, ...t.endCard || {} }, onStarted: t.onStarted, onClose: () => sr(!0), onReplay: () => {
@@ -6006,7 +6021,7 @@ function su(t) {
6006
6021
  h !== "none" && Pr(h)
6007
6022
  ] }) });
6008
6023
  return /* @__PURE__ */ g(be, { children: [
6009
- /* @__PURE__ */ i(zc, { dark: a, title: n ? Je : "", subline: n ? ds : "", onOptions: () => z(!0), optionsActive: X }),
6024
+ /* @__PURE__ */ i(zc, { dark: a, title: n ? Je : "", subline: n ? ds : "", onOptions: () => z(!0), optionsActive: ee }),
6010
6025
  nr,
6011
6026
  cs,
6012
6027
  !r && wa,
@@ -6030,8 +6045,8 @@ function su(t) {
6030
6045
  ] });
6031
6046
  }
6032
6047
  function iu(t) {
6033
- const [e, n] = k(null);
6034
- return E(() => {
6048
+ const [e, n] = v(null);
6049
+ return S(() => {
6035
6050
  if (!t || (e == null ? void 0 : e.url) === t && e.ok) return;
6036
6051
  let r = !0, s;
6037
6052
  const a = () => {