boss-web-player-sdk 1.1.20 → 1.1.21

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
@@ -1,4 +1,4 @@
1
- import { c as e, t, u as n } from "./src-TRl8II1q.js";
1
+ import { c as e, t, u as n } from "./src-B8eoxemB.js";
2
2
  import { createContext as r, createElement as i, forwardRef as a, useCallback as o, useContext as s, useEffect as c, useMemo as l, useRef as u, useState as d } from "react";
3
3
  import { createPortal as ee } from "react-dom";
4
4
  import { Fragment as te, jsx as f, jsxs as p } from "react/jsx-runtime";
@@ -100,10 +100,10 @@ function re({ title: e = "Something Went Wrong", subtitle: t = "We encountered a
100
100
  }
101
101
  //#endregion
102
102
  //#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.mjs
103
- var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), ae = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), m = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), oe = (e) => {
104
- let t = m(e);
103
+ var m = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), ie = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), h = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), ae = (e) => {
104
+ let t = h(e);
105
105
  return t.charAt(0).toUpperCase() + t.slice(1);
106
- }, se = {
106
+ }, oe = {
107
107
  xmlns: "http://www.w3.org/2000/svg",
108
108
  width: 24,
109
109
  height: 24,
@@ -113,37 +113,37 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
113
113
  strokeWidth: 2,
114
114
  strokeLinecap: "round",
115
115
  strokeLinejoin: "round"
116
- }, ce = (e) => {
116
+ }, se = (e) => {
117
117
  for (let t in e) if (t.startsWith("aria-") || t === "role" || t === "title") return !0;
118
118
  return !1;
119
- }, le = r({}), ue = () => s(le), de = a(({ color: e, size: t, strokeWidth: n, absoluteStrokeWidth: r, className: a = "", children: o, iconNode: s, ...c }, l) => {
120
- let { size: u = 24, strokeWidth: d = 2, absoluteStrokeWidth: ee = !1, color: te = "currentColor", className: f = "" } = ue() ?? {}, p = r ?? ee ? Number(n ?? d) * 24 / Number(t ?? u) : n ?? d;
119
+ }, ce = r({}), le = () => s(ce), ue = a(({ color: e, size: t, strokeWidth: n, absoluteStrokeWidth: r, className: a = "", children: o, iconNode: s, ...c }, l) => {
120
+ let { size: u = 24, strokeWidth: d = 2, absoluteStrokeWidth: ee = !1, color: te = "currentColor", className: f = "" } = le() ?? {}, p = r ?? ee ? Number(n ?? d) * 24 / Number(t ?? u) : n ?? d;
121
121
  return i("svg", {
122
122
  ref: l,
123
- ...se,
124
- width: t ?? u ?? se.width,
125
- height: t ?? u ?? se.height,
123
+ ...oe,
124
+ width: t ?? u ?? oe.width,
125
+ height: t ?? u ?? oe.height,
126
126
  stroke: e ?? te,
127
127
  strokeWidth: p,
128
- className: ie("lucide", f, a),
129
- ...!o && !ce(c) && { "aria-hidden": "true" },
128
+ className: m("lucide", f, a),
129
+ ...!o && !se(c) && { "aria-hidden": "true" },
130
130
  ...c
131
131
  }, [...s.map(([e, t]) => i(e, t)), ...Array.isArray(o) ? o : [o]]);
132
- }), h = (e, t) => {
133
- let n = a(({ className: n, ...r }, a) => i(de, {
132
+ }), g = (e, t) => {
133
+ let n = a(({ className: n, ...r }, a) => i(ue, {
134
134
  ref: a,
135
135
  iconNode: t,
136
- className: ie(`lucide-${ae(oe(e))}`, `lucide-${e}`, n),
136
+ className: m(`lucide-${ie(ae(e))}`, `lucide-${e}`, n),
137
137
  ...r
138
138
  }));
139
- return n.displayName = oe(e), n;
140
- }, fe = h("airplay", [["path", {
139
+ return n.displayName = ae(e), n;
140
+ }, de = g("airplay", [["path", {
141
141
  d: "M5 17H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-1",
142
142
  key: "ns4c3b"
143
143
  }], ["path", {
144
144
  d: "m12 15 5 6H7Z",
145
145
  key: "14qnn2"
146
- }]]), pe = h("captions", [["rect", {
146
+ }]]), fe = g("captions", [["rect", {
147
147
  width: "18",
148
148
  height: "14",
149
149
  x: "3",
@@ -154,7 +154,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
154
154
  }], ["path", {
155
155
  d: "M7 15h4M15 15h2M7 11h2M13 11h4",
156
156
  key: "1ueiar"
157
- }]]), me = h("cast", [
157
+ }]]), pe = g("cast", [
158
158
  ["path", {
159
159
  d: "M2 8V6a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-6",
160
160
  key: "3zrzxg"
@@ -174,13 +174,13 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
174
174
  y2: "20",
175
175
  key: "xu2jvo"
176
176
  }]
177
- ]), g = h("check", [["path", {
177
+ ]), _ = g("check", [["path", {
178
178
  d: "M20 6 9 17l-5-5",
179
179
  key: "1gmf2c"
180
- }]]), he = h("chevron-left", [["path", {
180
+ }]]), me = g("chevron-left", [["path", {
181
181
  d: "m15 18-6-6 6-6",
182
182
  key: "1wnfg3"
183
- }]]), ge = h("external-link", [
183
+ }]]), he = g("external-link", [
184
184
  ["path", {
185
185
  d: "M15 3h6v6",
186
186
  key: "1q9fwt"
@@ -193,13 +193,13 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
193
193
  d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",
194
194
  key: "a6xqqp"
195
195
  }]
196
- ]), _e = h("gauge", [["path", {
196
+ ]), ge = g("gauge", [["path", {
197
197
  d: "m12 14 4-4",
198
198
  key: "9kzdfg"
199
199
  }], ["path", {
200
200
  d: "M3.34 19a10 10 0 1 1 17.32 0",
201
201
  key: "19p75a"
202
- }]]), ve = h("languages", [
202
+ }]]), _e = g("languages", [
203
203
  ["path", {
204
204
  d: "m5 8 6 6",
205
205
  key: "1wu5hv"
@@ -224,7 +224,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
224
224
  d: "M14 18h6",
225
225
  key: "1m8k6r"
226
226
  }]
227
- ]), ye = h("list-video", [
227
+ ]), ve = g("list-video", [
228
228
  ["path", {
229
229
  d: "M21 5H3",
230
230
  key: "1fi0y6"
@@ -241,7 +241,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
241
241
  d: "M15 12.003a1 1 0 0 1 1.517-.859l4.997 2.997a1 1 0 0 1 0 1.718l-4.997 2.997a1 1 0 0 1-1.517-.86z",
242
242
  key: "ms4nik"
243
243
  }]
244
- ]), be = h("maximize", [
244
+ ]), ye = g("maximize", [
245
245
  ["path", {
246
246
  d: "M8 3H5a2 2 0 0 0-2 2v3",
247
247
  key: "1dcmit"
@@ -258,7 +258,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
258
258
  d: "M16 21h3a2 2 0 0 0 2-2v-3",
259
259
  key: "18trek"
260
260
  }]
261
- ]), xe = h("minimize", [
261
+ ]), be = g("minimize", [
262
262
  ["path", {
263
263
  d: "M8 3v3a2 2 0 0 1-2 2H3",
264
264
  key: "hohbtr"
@@ -275,7 +275,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
275
275
  d: "M16 21v-3a2 2 0 0 1 2-2h3",
276
276
  key: "ph8mxp"
277
277
  }]
278
- ]), _ = h("pause", [["rect", {
278
+ ]), v = g("pause", [["rect", {
279
279
  x: "14",
280
280
  y: "3",
281
281
  width: "5",
@@ -289,7 +289,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
289
289
  height: "18",
290
290
  rx: "1",
291
291
  key: "1wsw3u"
292
- }]]), Se = h("picture-in-picture", [
292
+ }]]), xe = g("picture-in-picture", [
293
293
  ["path", {
294
294
  d: "M2 10h6V4",
295
295
  key: "zwrco"
@@ -314,28 +314,28 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
314
314
  rx: "1",
315
315
  key: "1wjs3o"
316
316
  }]
317
- ]), Ce = h("play", [["path", {
317
+ ]), Se = g("play", [["path", {
318
318
  d: "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",
319
319
  key: "10ikf1"
320
- }]]), we = h("rotate-ccw", [["path", {
320
+ }]]), Ce = g("rotate-ccw", [["path", {
321
321
  d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",
322
322
  key: "1357e3"
323
323
  }], ["path", {
324
324
  d: "M3 3v5h5",
325
325
  key: "1xhq8a"
326
- }]]), Te = h("rotate-cw", [["path", {
326
+ }]]), we = g("rotate-cw", [["path", {
327
327
  d: "M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",
328
328
  key: "1p45f6"
329
329
  }], ["path", {
330
330
  d: "M21 3v5h-5",
331
331
  key: "1q7to0"
332
- }]]), Ee = h("volume-1", [["path", {
332
+ }]]), Te = g("volume-1", [["path", {
333
333
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
334
334
  key: "uqj9uw"
335
335
  }], ["path", {
336
336
  d: "M16 9a5 5 0 0 1 0 6",
337
337
  key: "1q6k2b"
338
- }]]), De = h("volume-2", [
338
+ }]]), Ee = g("volume-2", [
339
339
  ["path", {
340
340
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
341
341
  key: "uqj9uw"
@@ -348,7 +348,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
348
348
  d: "M19.364 18.364a9 9 0 0 0 0-12.728",
349
349
  key: "ijwkga"
350
350
  }]
351
- ]), Oe = h("volume-x", [
351
+ ]), De = g("volume-x", [
352
352
  ["path", {
353
353
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
354
354
  key: "uqj9uw"
@@ -367,15 +367,15 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
367
367
  y2: "15",
368
368
  key: "5ykzw1"
369
369
  }]
370
- ]), ke = h("volume", [["path", {
370
+ ]), Oe = g("volume", [["path", {
371
371
  d: "M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z",
372
372
  key: "uqj9uw"
373
- }]]), Ae = 1e4, je = !1, Me = "\n html, body { margin: 0; padding: 0; height: 100%; background: #000; overflow: hidden; }\n * { box-sizing: border-box; }\n .gb-pip-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }\n .gb-pip-overlay {\n position: absolute; inset: 0; z-index: 2;\n display: flex; flex-direction: column; justify-content: space-between;\n font-family: system-ui, -apple-system, sans-serif; color: #fff;\n opacity: 0; transition: opacity 0.15s ease;\n background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 65%, rgba(0,0,0,0.55) 100%);\n }\n .gb-pip-overlay:hover, .gb-pip-overlay.gb-pip-paused { opacity: 1; }\n .gb-pip-center {\n flex: 1; display: flex; align-items: center; justify-content: center; gap: 28px;\n }\n .gb-pip-btn {\n background: rgba(0,0,0,0.35); border: none; color: #fff; border-radius: 50%;\n width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;\n cursor: pointer; padding: 0;\n }\n .gb-pip-btn:hover { background: rgba(0,0,0,0.55); }\n .gb-pip-btn.gb-pip-play { width: 56px; height: 56px; }\n .gb-pip-bottom { padding: 6px 10px 8px; display: flex; flex-direction: column; gap: 4px; }\n .gb-pip-progress { position: relative; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.3); cursor: pointer; }\n .gb-pip-progress-fill { position: absolute; inset: 0; width: 0%; border-radius: 2px; background: #fff; }\n .gb-pip-time { font-size: 11px; font-variant-numeric: tabular-nums; opacity: 0.9; }\n", Ne = (e) => {
373
+ }]]), ke = 1e4, Ae = !1, je = "\n html, body { margin: 0; padding: 0; height: 100%; background: #000; overflow: hidden; }\n * { box-sizing: border-box; }\n .gb-pip-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }\n .gb-pip-overlay {\n position: absolute; inset: 0; z-index: 2;\n display: flex; flex-direction: column; justify-content: space-between;\n font-family: system-ui, -apple-system, sans-serif; color: #fff;\n opacity: 0; transition: opacity 0.15s ease;\n background: linear-gradient(to bottom, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0) 25%, rgba(0,0,0,0) 65%, rgba(0,0,0,0.55) 100%);\n }\n .gb-pip-overlay:hover, .gb-pip-overlay.gb-pip-paused { opacity: 1; }\n .gb-pip-center {\n flex: 1; display: flex; align-items: center; justify-content: center; gap: 28px;\n }\n .gb-pip-btn {\n background: rgba(0,0,0,0.35); border: none; color: #fff; border-radius: 50%;\n width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;\n cursor: pointer; padding: 0;\n }\n .gb-pip-btn:hover { background: rgba(0,0,0,0.55); }\n .gb-pip-btn.gb-pip-play { width: 56px; height: 56px; }\n .gb-pip-bottom { padding: 6px 10px 8px; display: flex; flex-direction: column; gap: 4px; }\n .gb-pip-progress { position: relative; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.3); cursor: pointer; }\n .gb-pip-progress-fill { position: absolute; inset: 0; width: 0%; border-radius: 2px; background: #fff; }\n .gb-pip-time { font-size: 11px; font-variant-numeric: tabular-nums; opacity: 0.9; }\n", Me = (e) => {
374
374
  let t = e.match(/#EXT-X-TITLE:(.+)/);
375
375
  if (t?.[1]?.trim()) return t[1].trim();
376
376
  let n = e.match(/#EXT-X-SESSION-DATA:[^\n]*DATA-ID="[^"]*title[^"]*"[^\n]*VALUE="([^"]+)"/i);
377
377
  return n?.[1]?.trim() ? n[1].trim() : null;
378
- }, Pe = (e) => {
378
+ }, y = (e) => {
379
379
  if (!e || e.length < 10 || e[0] !== 73 || e[1] !== 68 || e[2] !== 51) return null;
380
380
  let t = e[3], n = (e[6] & 127) << 21 | (e[7] & 127) << 14 | (e[8] & 127) << 7 | e[9] & 127, r = Math.min(10 + n, e.length), i = 10;
381
381
  for (; i + 10 <= r;) {
@@ -388,7 +388,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
388
388
  i += 10 + a;
389
389
  }
390
390
  return null;
391
- }, Fe = ({ size: e = 20 }) => /* @__PURE__ */ p("svg", {
391
+ }, Ne = ({ size: e = 20 }) => /* @__PURE__ */ p("svg", {
392
392
  width: e,
393
393
  height: e,
394
394
  viewBox: "0 0 24 24",
@@ -408,7 +408,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
408
408
  /* @__PURE__ */ f("path", { d: "M7 9v6M7 12h3M10 9v6" }),
409
409
  /* @__PURE__ */ f("path", { d: "M14 9h1.5a3 3 0 0 1 0 6H14z" })
410
410
  ]
411
- }), Ie = ({ size: e = 20 }) => /* @__PURE__ */ p("svg", {
411
+ }), Pe = ({ size: e = 20 }) => /* @__PURE__ */ p("svg", {
412
412
  width: e,
413
413
  height: e,
414
414
  viewBox: "0 0 24 24",
@@ -428,10 +428,10 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
428
428
  /* @__PURE__ */ f("path", { d: "M7 9v6M7 12h3M10 9v6" }),
429
429
  /* @__PURE__ */ f("path", { d: "M14 9h1.5a3 3 0 0 1 0 6H14z" })
430
430
  ]
431
- }), Le = (e) => {
431
+ }), Fe = (e) => {
432
432
  let t = e.replace("#", "");
433
433
  return t.length === 6 ? `${parseInt(t.substring(0, 2), 16)}, ${parseInt(t.substring(2, 4), 16)}, ${parseInt(t.substring(4, 6), 16)}` : t.length === 3 ? `${parseInt(t[0] + t[0], 16)}, ${parseInt(t[1] + t[1], 16)}, ${parseInt(t[2] + t[2], 16)}` : "99, 102, 241";
434
- }, Re = {
434
+ }, Ie = {
435
435
  en: "English",
436
436
  eng: "English",
437
437
  fr: "French",
@@ -454,37 +454,53 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
454
454
  hi: "Hindi",
455
455
  ta: "Tamil",
456
456
  tam: "Tamil"
457
- }, v = (e) => {
457
+ }, Le = (e) => {
458
458
  if (!e) return null;
459
459
  let t = e.trim().toLowerCase(), n = t.match(/^(en|eng|fr|fre|fra|es|spa|de|ger|deu|it|ita|pt|por|ja|zh|ko|ru|ar|hi|ta|tam)/);
460
- if (n && Re[n[0]]) return Re[n[0]];
461
- for (let [e, n] of Object.entries(Re)) if (t.includes(e)) return n;
460
+ if (n && Ie[n[0]]) return Ie[n[0]];
461
+ for (let [e, n] of Object.entries(Ie)) if (t.includes(e)) return n;
462
462
  return /english|anglais|ingles/i.test(t) ? "English" : /french|français/i.test(t) ? "French" : /spanish|español/i.test(t) ? "Spanish" : /german|deutsch/i.test(t) ? "German" : /italian|italiano/i.test(t) ? "Italian" : /portuguese|português/i.test(t) ? "Portuguese" : /japanese|nihongo/i.test(t) ? "Japanese" : /chinese|中文/i.test(t) ? "Chinese" : /korean|한국어/i.test(t) ? "Korean" : /tamil|தமிழ்/i.test(t) ? "Tamil" : /russian|русский/i.test(t) ? "Russian" : /arabic|العربية/i.test(t) ? "Arabic" : /hindi|हिन्दी/i.test(t) ? "Hindi" : null;
463
- }, y = (e) => {
463
+ }, b = (e) => {
464
464
  if (e.lang) {
465
- let t = v(e.lang);
465
+ let t = Le(e.lang);
466
466
  if (t) return t;
467
467
  }
468
468
  if (e.label) {
469
469
  let t = e.label.trim(), n = t.split(/[#\d\.\s\-_/|:]+/).filter(Boolean);
470
470
  for (let e = n.length - 1; e >= 0; --e) {
471
- let t = v(n[e]);
471
+ let t = Le(n[e]);
472
472
  if (t) return t;
473
473
  }
474
474
  let r = t.replace(/^[#\d\.\s]+/, "").trim();
475
- return v(r) || r;
475
+ return Le(r) || r;
476
476
  }
477
477
  return "Unknown";
478
- }, ze = (e) => {
478
+ }, Re = (e) => {
479
479
  let t = /* @__PURE__ */ new Set();
480
480
  return e.filter((e) => {
481
- let n = `${y(e).toLowerCase()}|${(e.lang || "").trim().toLowerCase()}`;
481
+ let n = `${b(e).toLowerCase()}|${(e.lang || "").trim().toLowerCase()}`;
482
482
  return t.has(n) ? !1 : (t.add(n), !0);
483
483
  });
484
- }, Be = (e) => {
484
+ }, ze = (e) => {
485
485
  let t = (e ?? "").split(":").map(Number);
486
486
  return (t[0] || 0) * 3600 + (t[1] || 0) * 60 + (t[2] || 0);
487
- }, Ve = [
487
+ }, Be = (e) => {
488
+ if (!e) return !1;
489
+ try {
490
+ let { protocol: t } = new URL(e, window.location.href);
491
+ return t === "http:" || t === "https:";
492
+ } catch {
493
+ return !1;
494
+ }
495
+ }, Ve = (e) => {
496
+ if (typeof e == "number") return Number.isFinite(e) && e >= 0 ? e : null;
497
+ if (typeof e != "string") return null;
498
+ let t = e.trim();
499
+ if (!t) return null;
500
+ if (/^\d+:\d{1,2}:\d{1,2}(\.\d+)?$/.test(t)) return ze(t);
501
+ let n = Number(t);
502
+ return Number.isFinite(n) && n >= 0 ? n : null;
503
+ }, He = [
488
504
  0,
489
505
  1e3,
490
506
  2e3,
@@ -492,7 +508,7 @@ var ie = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e)
492
508
  5e3,
493
509
  8e3
494
510
  ];
495
- function He(e, t, n) {
511
+ function Ue(e, t, n) {
496
512
  let r = !1, i, a = (o) => {
497
513
  i = setTimeout(() => {
498
514
  r || fetch(e).then((e) => e.json()).then((e) => {
@@ -502,54 +518,54 @@ function He(e, t, n) {
502
518
  n(i);
503
519
  return;
504
520
  }
505
- o + 1 < Ve.length && a(o + 1);
521
+ o + 1 < He.length && a(o + 1);
506
522
  }).catch(() => {
507
- r || o + 1 < Ve.length && a(o + 1);
523
+ r || o + 1 < He.length && a(o + 1);
508
524
  });
509
- }, Ve[o]);
525
+ }, He[o]);
510
526
  };
511
527
  return a(0), () => {
512
528
  r = !0, i && clearTimeout(i);
513
529
  };
514
530
  }
515
- var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoments: ne, subtitles: ie = [], watermark: ae, themeColor: m = "#6366f1", drmConfig: oe, firebaseConfig: se, videoId: ce, onAnalyticsEvent: le, onAdBreakChange: ue, onKeyMomentsLoaded: de, enableControls: h = !0, enableChromecast: Re, enableKeyMoments: v, enableSubtitles: Ve, enableQuality: Ue, enablePlaybackSpeed: b, enablePiP: We, enableFullscreen: Ge = !0, autoFullscreen: Ke = !1, watchProgressInterval: qe = 30, subtitleStyle: Je = {}, resolvedEntitlement: Ye, licenseKey: Xe, title: x, chaptersDisplayMode: Ze = "strip", volumeControlType: Qe = "slider", urlTransformer: $e, pauseAdOnTabSwitch: et = !0, enableSkipAd: tt = !1, skipAdAfterSeconds: nt = 5, overlayAdUrl: rt, adTrackingUrl: it, sources: S, activeSourceIndex: at = 0, onSourceChange: ot, initialTime: st, onTimeUpdate: ct }) => {
516
- let lt = $e ?? ((e) => e), C = u(null), ut = u(null), dt = u(!1), w = u(null), ft = u(0), pt = u(null), T = u(null), mt = u(null), ht = u(null), gt = u(!1), E = u(!1), D = u(null), O = u(null), k = u(null), _t = u(null), vt = u(() => {}), A = u(null), yt = u(null), bt = (e) => {
517
- !e || yt.current !== null || (yt.current = e.muted, e.muted = !0);
518
- }, xt = (e) => {
519
- yt.current !== null && (e && (e.muted = yt.current), yt.current = null);
520
- }, St = u(null), Ct = u(!1), wt = u(null), Tt = u(null), Et = u(null), j = u(null), Dt = u(null), Ot = u(S), kt = u(ot), At = u(!1), M = u(null), N = u(null), P = u(null), jt = u(null), Mt = u(0), Nt = u(null), [Pt, Ft] = d(!1), It = u(!1), Lt = u(null), [Rt, zt] = d(null);
531
+ var We = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoments: ne, subtitles: m = [], watermark: ie, themeColor: h = "#6366f1", drmConfig: ae, firebaseConfig: oe, videoId: se, onAnalyticsEvent: ce, onAdBreakChange: le, onKeyMomentsLoaded: ue, enableControls: g = !0, enableChromecast: Ie, enableKeyMoments: Le, enableSubtitles: He, enableQuality: We, enablePlaybackSpeed: Ge, enablePiP: Ke, enableFullscreen: qe = !0, autoFullscreen: Je = !1, watchProgressInterval: Ye = 30, subtitleStyle: Xe = {}, resolvedEntitlement: Ze, licenseKey: Qe, title: x, chaptersDisplayMode: $e = "strip", volumeControlType: et = "slider", urlTransformer: tt, pauseAdOnTabSwitch: nt = !0, enableSkipAd: rt = !1, skipAdAfterSeconds: it = 5, overlayAdUrl: at, adTrackingUrl: ot, sources: S, activeSourceIndex: st = 0, onSourceChange: ct, initialTime: lt, onTimeUpdate: ut }) => {
532
+ let dt = tt ?? ((e) => e), C = u(null), ft = u(null), pt = u(!1), w = u(null), mt = u(0), ht = u(null), T = u(null), gt = u(null), _t = u(null), vt = u(!1), E = u(!1), D = u(null), O = u(null), k = u(null), yt = u(null), bt = u(() => {}), A = u(null), xt = u(!1), St = u(null), Ct = (e) => {
533
+ !e || St.current !== null || (St.current = e.muted, e.muted = !0);
534
+ }, wt = (e) => {
535
+ St.current !== null && (e && (e.muted = St.current), St.current = null);
536
+ }, Tt = u(null), Et = u(!1), Dt = u(null), Ot = u(null), kt = u(null), j = u(null), At = u(null), jt = u(S), Mt = u(ct), Nt = u(!1), M = u(null), N = u(null), P = u(null), Pt = u(null), Ft = u(0), It = u(null), [Lt, Rt] = d(!1), zt = u(!1), Bt = u(null), [Vt, Ht] = d(null);
521
537
  c(() => {
522
- if (typeof window > "u" || je) return;
538
+ if (typeof window > "u" || Ae) return;
523
539
  let e = window.requestAnimationFrame(() => {
524
540
  let e = C.current;
525
541
  if (!e) return;
526
542
  let t = window.getComputedStyle(e);
527
- t.overflow !== "hidden" && t.borderTopLeftRadius === "0px" && (je = !0, console.warn("[boss-web-player-sdk] Player styles appear to be missing — the player will look broken/unstyled.\nImport the stylesheet once at your app entry point:\n import 'boss-web-player-sdk/css';"));
543
+ t.overflow !== "hidden" && t.borderTopLeftRadius === "0px" && (Ae = !0, console.warn("[boss-web-player-sdk] Player styles appear to be missing — the player will look broken/unstyled.\nImport the stylesheet once at your app entry point:\n import 'boss-web-player-sdk/css';"));
528
544
  });
529
545
  return () => window.cancelAnimationFrame(e);
530
546
  }, []), c(() => {
531
547
  let e = C.current;
532
548
  if (!e) return;
533
549
  let t = new ResizeObserver((e) => {
534
- for (let t of e) Ft(t.contentRect.width <= 768);
550
+ for (let t of e) Rt(t.contentRect.width <= 768);
535
551
  });
536
- return t.observe(e), Ft(e.getBoundingClientRect().width <= 768), () => t.disconnect();
552
+ return t.observe(e), Rt(e.getBoundingClientRect().width <= 768), () => t.disconnect();
537
553
  }, []);
538
- let [F, Bt] = d(null), [Vt, Ht] = d(!1), Ut = Ye ?? null, Wt = Ut != null, Gt = Ut?.features ?? {}, Kt = Wt ? !!(Gt.drm_protection && !Xe) : !1, I = {
539
- enableSubtitles: Wt ? !!Gt.subtitle_support : typeof Ve == "boolean" ? Ve : !0,
540
- enableChromecast: Wt ? !!Gt.chromecast : typeof Re == "boolean" ? Re : !0,
541
- enableKeyMoments: Wt ? !!Gt.key_moments : typeof v == "boolean" ? v : !0,
542
- enableQuality: Wt ? !!Gt.multiple_resolution : typeof Ue == "boolean" ? Ue : !0,
543
- enablePlaybackSpeed: Wt ? !!Gt.playback_speed : typeof b == "boolean" ? b : !0,
544
- enablePiP: Wt ? !!Gt.picture_in_picture : typeof We == "boolean" ? We : !0,
545
- allowAirplay: Wt ? !!Gt.airplay : !1,
546
- allowMultipleAudio: Wt ? !!Gt.multiple_audio : !0,
547
- m3u8_playback: Wt ? !!Gt.m3u8_playback : !0,
548
- drm_protection: Wt ? !!Gt.drm_protection : !1
549
- }, [qt, Jt] = d(!1), [Yt, Xt] = d(0), [Zt, Qt] = d(!1), [L, $t] = d(0), [en, tn] = d(0), [nn, rn] = d(1), [an, on] = d(!1), [sn, cn] = d(!1), [ln, un] = d(!1), [dn, fn] = d(!1), [pn, mn] = d(!1), hn = Pt || (ln || dn) && pn, [gn, _n] = d(!1), [vn, yn] = d(null), [bn, xn] = d(!1), [R, Sn] = d([]), z = u([]), Cn = u(/* @__PURE__ */ new Set()), wn = S && S.length > 0 ? S.map((e) => e.url).join("|") : r, [Tn, En] = d(/* @__PURE__ */ new Set()), [Dn, On] = d(wn), kn = u(null), An = u(!1), jn = u(null);
550
- Dn !== wn && (On(wn), En(/* @__PURE__ */ new Set()), Cn.current = /* @__PURE__ */ new Set(), kn.current = null, An.current = !1);
551
- let Mn = u(null), Nn = u(!1), [Pn, Fn] = d([]), [In, Ln] = d(null), Rn = u([]), zn = u(null), Bn = u(/* @__PURE__ */ new Set()), [Vn, Hn] = d([]), Un = u([]), [Wn, Gn] = d([]), Kn = (e) => {
552
- let t = Un.current.find((t) => e >= t.startTimeSeconds && e < t.endTimeSeconds);
554
+ let [F, Ut] = d(null), [Wt, Gt] = d(!1), Kt = Ze ?? null, qt = Kt != null, Jt = Kt?.features ?? {}, Yt = qt ? !!(Jt.drm_protection && !Qe) : !1, I = {
555
+ enableSubtitles: qt ? !!Jt.subtitle_support : typeof He == "boolean" ? He : !0,
556
+ enableChromecast: qt ? !!Jt.chromecast : typeof Ie == "boolean" ? Ie : !0,
557
+ enableKeyMoments: qt ? !!Jt.key_moments : typeof Le == "boolean" ? Le : !0,
558
+ enableQuality: qt ? !!Jt.multiple_resolution : typeof We == "boolean" ? We : !0,
559
+ enablePlaybackSpeed: qt ? !!Jt.playback_speed : typeof Ge == "boolean" ? Ge : !0,
560
+ enablePiP: qt ? !!Jt.picture_in_picture : typeof Ke == "boolean" ? Ke : !0,
561
+ allowAirplay: qt ? !!Jt.airplay : !1,
562
+ allowMultipleAudio: qt ? !!Jt.multiple_audio : !0,
563
+ m3u8_playback: qt ? !!Jt.m3u8_playback : !0,
564
+ drm_protection: qt ? !!Jt.drm_protection : !1
565
+ }, [Xt, Zt] = d(!1), [Qt, $t] = d(0), [en, tn] = d(!1), [L, nn] = d(0), [rn, an] = d(0), [on, sn] = d(1), [cn, ln] = d(!1), [un, dn] = d(!1), [fn, pn] = d(!1), [mn, hn] = d(!1), [gn, _n] = d(!1), vn = Lt || (fn || mn) && gn, [yn, bn] = d(!1), [xn, Sn] = d(null), [Cn, wn] = d(!1), [R, Tn] = d([]), z = u([]), En = u(/* @__PURE__ */ new Set()), Dn = S && S.length > 0 ? S.map((e) => e.url).join("|") : r, [On, kn] = d(/* @__PURE__ */ new Set()), [An, jn] = d(Dn), Mn = u(null), Nn = u(!1), Pn = u(null);
566
+ An !== Dn && (jn(Dn), kn(/* @__PURE__ */ new Set()), En.current = /* @__PURE__ */ new Set(), Mn.current = null, Nn.current = !1);
567
+ let Fn = u(null), In = u(!1), [Ln, Rn] = d([]), [zn, Bn] = d(null), Vn = u([]), Hn = u(null), Un = u(/* @__PURE__ */ new Set()), [Wn, Gn] = d([]), Kn = u([]), [qn, Jn] = d([]), Yn = (e) => {
568
+ let t = Kn.current.find((t) => e >= t.startTimeSeconds && e < t.endTimeSeconds);
553
569
  if (t) return {
554
570
  start: t.startTimeSeconds,
555
571
  end: t.endTimeSeconds
@@ -559,7 +575,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
559
575
  start: n.startTime,
560
576
  end: n.endTime
561
577
  } : null;
562
- }, qn = l(() => R.reduce((e, t) => e + (t.endTime - t.startTime), 0), [R]), Jn = en > 0 ? Math.max(0, en - qn) : 0, B = R.length > 0 && Jn > 0 ? Jn : en, V = o((e) => {
578
+ }, Xn = l(() => R.reduce((e, t) => e + (t.endTime - t.startTime), 0), [R]), Zn = rn > 0 ? Math.max(0, rn - Xn) : 0, B = R.length > 0 && Zn > 0 ? Zn : rn, V = o((e) => {
563
579
  let t = e;
564
580
  for (let n of R) e >= n.endTime ? t -= n.endTime - n.startTime : e >= n.startTime && (t -= e - n.startTime);
565
581
  return Math.max(0, t);
@@ -567,31 +583,31 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
567
583
  let t = e;
568
584
  for (let e of R) t >= e.startTime && (t += e.endTime - e.startTime);
569
585
  return t;
570
- }, [R]), [Yn, Xn] = d([]), [Zn, Qn] = d({
586
+ }, [R]), [Qn, $n] = d([]), [er, tr] = d({
571
587
  id: -1,
572
588
  height: 0,
573
589
  width: 0,
574
590
  bitrate: 0,
575
591
  label: "Auto"
576
- }), [$n, er] = d(""), [U, tr] = d("off"), [nr, rr] = d(ze(ie)), [ir, ar] = d([]), [or, sr] = d(0);
592
+ }), [nr, rr] = d(""), [U, ir] = d("off"), [ar, or] = d(Re(m)), [sr, cr] = d([]), [lr, ur] = d(0);
577
593
  c(() => {
578
594
  if (F) {
579
595
  let e = F.subtitles.getTracks();
580
- rr(ze([...ie, ...e.filter((e) => !ie.some((t) => t.id === e.id))]));
581
- } else rr(ze(ie));
582
- }, [ie.map((e) => e.id).join(","), F]);
583
- let [cr, lr] = d({
596
+ or(Re([...m, ...e.filter((e) => !m.some((t) => t.id === e.id))]));
597
+ } else or(Re(m));
598
+ }, [m.map((e) => e.id).join(","), F]);
599
+ let [dr, fr] = d({
584
600
  chapter: null,
585
601
  index: -1
586
- }), [W, ur] = d(ne || s || []), [G, K] = d("none"), [dr, fr] = d(1), [pr, mr] = d(!1), [hr, gr] = d({}), [_r, vr] = d(""), [yr, br] = d(null), xr = u(!1), Sr = JSON.stringify(W.map((e) => ({
602
+ }), [W, pr] = d(ne || s || []), [G, K] = d("none"), [mr, hr] = d(1), [gr, _r] = d(!1), [vr, yr] = d({}), [br, xr] = d(""), [Sr, Cr] = d(null), wr = u(!1), Tr = JSON.stringify(W.map((e) => ({
587
603
  title: e.title,
588
604
  startTime: e.startTime
589
605
  })));
590
606
  c(() => {
591
- ur(ne || s || []);
607
+ pr(ne || s || []);
592
608
  }, [(ne || s || []).map((e) => `${e.startTime}:${e.title}`).join(",")]), c(() => {
593
609
  if (!r || !W || W.length === 0) return;
594
- gr({});
610
+ yr({});
595
611
  let e = document.createElement("video");
596
612
  e.muted = !0, e.preload = "metadata", e.crossOrigin = "anonymous", e.style.cssText = "position:fixed;top:0;left:0;width:10px;height:10px;opacity:0.01;pointer-events:none;z-index:-9999;", document.body.appendChild(e);
597
613
  let t = null, i = r.includes(".m3u8"), a = document.createElement("canvas");
@@ -607,7 +623,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
607
623
  if (o && e.readyState >= 2) {
608
624
  o.drawImage(e, 0, 0, a.width, a.height);
609
625
  let t = a.toDataURL("image/jpeg", .8);
610
- gr((e) => ({
626
+ yr((e) => ({
611
627
  ...e,
612
628
  [s]: t
613
629
  })), s++, l();
@@ -619,34 +635,34 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
619
635
  enableWorker: !1,
620
636
  maxBufferLength: 5,
621
637
  xhrSetup: (e, t) => {
622
- let n = oe?.authToken;
638
+ let n = ae?.authToken;
623
639
  try {
624
- let r = lt(t), i = new URL(r, window.location.origin);
640
+ let r = dt(t), i = new URL(r, window.location.origin);
625
641
  n && i.searchParams.set("token", n), e.open("GET", i.toString(), !0);
626
642
  } catch (e) {
627
643
  console.error("[WebVideoPlayer tempHls] xhrSetup error:", e);
628
644
  }
629
645
  }
630
- }), t.loadSource(lt(r)), t.attachMedia(e)) : e.src = r, e.readyState >= 2 && d();
646
+ }), t.loadSource(dt(r)), t.attachMedia(e)) : e.src = r, e.readyState >= 2 && d();
631
647
  let ee = () => {
632
648
  e.removeEventListener("seeked", u), e.removeEventListener("canplay", d), t && t.destroy(), document.body.contains(e) && document.body.removeChild(e);
633
649
  };
634
650
  return ee;
635
- }, [r, Sr]);
636
- let [q, Cr] = d(null), [wr, Tr] = d(null), Er = u(!1), [Dr, Or] = d(!1), [kr, Ar] = d(!1), [jr, Mr] = d(null), [Nr, Pr] = d(null), [Fr, Ir] = d(0), [Lr, Rr] = d(0), [zr, Br] = d(null), [Vr, Hr] = d(null), [J, Ur] = d(null);
651
+ }, [r, Tr]);
652
+ let [q, Er] = d(null), [Dr, Or] = d(null), kr = u(!1), [Ar, jr] = d(!1), [Mr, Nr] = d(!1), [Pr, Fr] = d(null), [Ir, Lr] = d(null), [Rr, zr] = d(0), [Br, Vr] = d(0), [Hr, Ur] = d(null), [Wr, Gr] = d(null), [J, Kr] = d(null);
637
653
  c(() => {
638
- if (_t.current && !_t.current.querySelector("google-cast-launcher")) {
654
+ if (yt.current && !yt.current.querySelector("google-cast-launcher")) {
639
655
  let e = document.createElement("google-cast-launcher");
640
- e.style.cursor = "pointer", e.style.width = "100%", e.style.height = "100%", e.style.display = "block", _t.current.appendChild(e);
656
+ e.style.cursor = "pointer", e.style.width = "100%", e.style.height = "100%", e.style.display = "block", yt.current.appendChild(e);
641
657
  }
642
658
  }, []), c(() => {
643
659
  if (!F) {
644
- Or(!1), Ar(!1), Mr(null);
660
+ jr(!1), Nr(!1), Fr(null);
645
661
  return;
646
662
  }
647
- let e = (e) => Or(e), t = () => {
663
+ let e = (e) => jr(e), t = () => {
648
664
  let e = F.getVideoElement(), t = !!e?.webkitCurrentPlaybackTargetIsWireless;
649
- Ar(t), Mr(t ? e.webkitCurrentPlaybackTargetName || "AirPlay device" : null);
665
+ Nr(t), Fr(t ? e.webkitCurrentPlaybackTargetName || "AirPlay device" : null);
650
666
  };
651
667
  e(F.casting.isAirPlayAvailable()), t();
652
668
  let n = F.getVideoElement(), r = (t) => {
@@ -658,16 +674,16 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
658
674
  "webkitShowPlaybackTargetPicker" in n && (n.removeEventListener("webkitplaybacktargetavailabilitychanged", r), n.removeEventListener("webkitcurrentplaybacktargetiswirelesschanged", i));
659
675
  };
660
676
  }, [F]);
661
- let [Wr, Gr] = d(""), [Kr, qr] = d(!0), [Y, Jr] = d(!1), [Yr, Xr] = d(!1), Zr = u(!1), Qr = u(null), $r = u(!1), ei = u(!1), ti = u("none"), ni = u(ie), ri = () => {
662
- qr(!0), Qr.current && window.clearTimeout(Qr.current);
663
- let e = It.current ? 3500 : 1e4;
664
- Qr.current = window.setTimeout(() => {
665
- $r.current && ti.current === "none" && qr(!1);
677
+ let [qr, Jr] = d(""), [Yr, Xr] = d(!0), [Y, Zr] = d(!1), [Qr, $r] = d(!1), ei = u(!1), ti = u(null), ni = u(!1), ri = u(!1), ii = u("none"), ai = u(m), oi = () => {
678
+ Xr(!0), ti.current && window.clearTimeout(ti.current);
679
+ let e = zt.current ? 3500 : 1e4;
680
+ ti.current = window.setTimeout(() => {
681
+ ni.current && ii.current === "none" && Xr(!1);
666
682
  }, e);
667
- }, ii = o((e) => {
683
+ }, si = o((e) => {
668
684
  j.current &&= (clearTimeout(j.current), null);
669
- let t = Ot.current, n = t?.[e]?.label ?? "This format", r = t?.[0]?.label ?? "default";
670
- Dt.current = null, br(`${n} isn't supported on this device. Switched to ${r}.`), window.setTimeout(() => br(null), 4e3), kt.current?.(0);
685
+ let t = jt.current, n = t?.[e]?.label ?? "This format", r = t?.[0]?.label ?? "default";
686
+ At.current = null, Cr(`${n} isn't supported on this device. Switched to ${r}.`), window.setTimeout(() => Cr(null), 4e3), Mt.current?.(0);
671
687
  }, []);
672
688
  c(() => {
673
689
  if (!C.current) return;
@@ -679,100 +695,102 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
679
695
  enableWorker: !1,
680
696
  maxBufferLength: 5,
681
697
  xhrSetup: (e, t) => {
682
- let n = oe?.authToken;
698
+ let n = ae?.authToken;
683
699
  try {
684
- let r = lt(t), i = new URL(r, window.location.origin);
700
+ let r = dt(t), i = new URL(r, window.location.origin);
685
701
  n && i.searchParams.set("token", n), e.open("GET", i.toString(), !0);
686
702
  } catch (e) {
687
703
  console.error("[WebVideoPlayer hiddenHls] xhrSetup error:", e);
688
704
  }
689
705
  }
690
706
  });
691
- e.loadSource(lt(r)), e.attachMedia(o), mt.current = e, e.on(n.Events.MANIFEST_LOADED, (e, t) => {
707
+ e.loadSource(dt(r)), e.attachMedia(o), gt.current = e, e.on(n.Events.MANIFEST_LOADED, (e, t) => {
692
708
  if (x) return;
693
- let n = Ne(t?.networkDetails?.responseText ?? "");
694
- n && Gr(n);
709
+ let n = Me(t?.networkDetails?.responseText ?? "");
710
+ n && Jr(n);
695
711
  }), e.on(n.Events.FRAG_PARSING_METADATA, (e, t) => {
696
- if (!(x || Wr)) for (let e of t?.samples ?? []) {
697
- let t = Pe(e.data);
712
+ if (!(x || qr)) for (let e of t?.samples ?? []) {
713
+ let t = y(e.data);
698
714
  if (t) {
699
- Gr(t);
715
+ Jr(t);
700
716
  break;
701
717
  }
702
718
  }
703
719
  });
704
720
  } else s && o.canPlayType("application/vnd.apple.mpegurl"), o.src = r;
705
721
  o.addEventListener("seeked", () => {
706
- let e = pt.current;
722
+ let e = ht.current;
707
723
  if (!e) return;
708
724
  let t = e.getContext("2d");
709
- t && o.readyState >= 2 && (t.drawImage(o, 0, 0, e.width, e.height), Br(e.toDataURL("image/jpeg", .82)));
725
+ t && o.readyState >= 2 && (t.drawImage(o, 0, 0, e.width, e.height), Ur(e.toDataURL("image/jpeg", .82)));
710
726
  });
711
727
  let c;
712
- if (se) {
713
- let t = new e(se);
714
- ut.current = t, c = t.createCallback();
728
+ if (oe) {
729
+ let t = new e(oe);
730
+ ft.current = t, c = t.createCallback();
715
731
  }
716
- if (Kt) return;
732
+ if (Yt) return;
717
733
  let l = new t({
718
734
  container: C.current,
719
735
  src: r,
720
- videoId: ce,
736
+ videoId: se,
721
737
  autoplay: i,
722
738
  muted: a,
723
739
  keyMoments: W,
724
- subtitles: ie,
740
+ subtitles: m,
725
741
  drm: {
726
- watermarkText: ae,
742
+ watermarkText: ie,
727
743
  allowedDomains: [
728
744
  "localhost",
729
745
  "127.0.0.1",
730
746
  window.location.hostname
731
747
  ],
732
- ...oe
748
+ ...ae
733
749
  },
734
750
  analyticsCallback: (e) => {
735
- if (e.sessionId && (kn.current === null ? kn.current = e.sessionId : e.sessionId !== kn.current && (e = {
751
+ if (e.sessionId && (Mn.current === null ? Mn.current = e.sessionId : e.sessionId !== Mn.current && (e = {
736
752
  ...e,
737
- sessionId: kn.current
753
+ sessionId: Mn.current
738
754
  })), e.eventType === "session_start") {
739
- if (An.current) return;
740
- An.current = !0;
755
+ if (Nn.current) return;
756
+ Nn.current = !0;
741
757
  }
742
- c?.(e), le && le(e);
758
+ c?.(e), ce && ce(e);
743
759
  },
744
- analyticsSessionSeed: jn.current?.key === wn ? jn.current.snapshot : void 0,
745
- watchProgressInterval: qe * 1e3,
746
- themeColor: m,
747
- urlTransformer: $e
760
+ analyticsSessionSeed: Pn.current?.key === Dn ? Pn.current.snapshot : void 0,
761
+ watchProgressInterval: Ye * 1e3,
762
+ themeColor: h,
763
+ urlTransformer: tt
748
764
  });
749
765
  l.on("keymomentsloaded", (e) => {
750
- ur(e), de && de(e);
766
+ pr(e), ue && ue(e);
751
767
  }), l.on("chaptersloaded", (e) => {
752
- ur(e), de && de(e);
768
+ pr(e), ue && ue(e);
753
769
  }), l.on("play", () => {
754
- Qt(!0), xn(!1), te(l.getCurrentTime(), !1);
770
+ tn(!0), wn(!1), te(l.getCurrentTime(), !1);
755
771
  }), l.on("pause", () => {
756
- Qt(!1), te(l.getCurrentTime(), !0);
772
+ tn(!1), te(l.getCurrentTime(), !0);
757
773
  }), l.on("ended", () => {
758
- Qt(!1), xn(!0);
774
+ tn(!1), wn(!0);
759
775
  });
760
776
  let u = () => {
761
- A.current && (A.current.style.opacity = "1"), bt(l.getVideoElement());
777
+ xt.current = !0, dn(!1), A.current && (A.current.style.opacity = "1"), Ct(l.getVideoElement());
762
778
  }, d = () => {
763
779
  requestAnimationFrame(() => {
764
780
  requestAnimationFrame(() => {
765
- A.current && (A.current.style.opacity = "0"), xt(l.getVideoElement());
781
+ xt.current = !1, A.current && (A.current.style.opacity = "0"), wt(l.getVideoElement());
782
+ let e = l.getVideoElement();
783
+ e && !e.paused && e.readyState < 3 && dn(!0);
766
784
  });
767
785
  });
768
786
  }, ee = (e, t = !1) => {
769
787
  E.current = !0;
770
- let n = t ? e + .5 : wt.current ?? e + .5;
771
- t || (wt.current = null), Ct.current = t, D.current = n, O.current = l.getCurrentTime(), u(), l.seek(n), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
772
- E.current = !1, D.current = null, O.current = null, k.current = null, Ct.current = !1, d();
788
+ let n = t ? e + .5 : Dt.current ?? e + .5;
789
+ t || (Dt.current = null), Et.current = t, D.current = n, O.current = l.getCurrentTime(), u(), l.seek(n), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
790
+ E.current = !1, D.current = null, O.current = null, k.current = null, Et.current = !1, d();
773
791
  }, 3e3);
774
792
  };
775
- St.current = ee;
793
+ Tt.current = ee;
776
794
  let te = (e, t) => {
777
795
  if (!("mediaSession" in navigator) || !navigator.mediaSession.setPositionState) return;
778
796
  navigator.mediaSession.playbackState = t ? "paused" : "playing";
@@ -802,146 +820,146 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
802
820
  };
803
821
  if (l.on("timeupdate", (e) => {
804
822
  if (!E.current && N.current === null) {
805
- let t = z.current.find((t) => Cn.current.has(t.startTime) && e >= t.startTime - .5 && e < t.endTime);
823
+ let t = z.current.find((t) => En.current.has(t.startTime) && e >= t.startTime - .5 && e < t.endTime);
806
824
  if (t) {
807
825
  ee(t.endTime);
808
826
  return;
809
827
  }
810
- wt.current !== null && z.current.find((t) => e >= t.endTime - .5 && e < t.endTime) && u();
828
+ Dt.current !== null && z.current.find((t) => e >= t.endTime - .5 && e < t.endTime) && u();
811
829
  }
812
830
  if (E.current && D.current !== null) {
813
831
  let t = D.current;
814
832
  if (O.current !== null && t < O.current ? e <= t + 2 && e >= t - 2 : e >= t - 2) {
815
833
  E.current = !1, D.current = null, O.current = null, k.current &&= (window.clearTimeout(k.current), null);
816
- let t = z.current.some((t) => e >= t.startTime && e < t.endTime), n = Ct.current;
817
- Ct.current = !1, (n || !t && wt.current === null) && d();
834
+ let t = z.current.some((t) => e >= t.startTime && e < t.endTime), n = Et.current;
835
+ Et.current = !1, (n || !t && Dt.current === null) && d();
818
836
  } else return;
819
837
  }
820
- $t(e), Mt.current = e;
838
+ nn(e), Ft.current = e;
821
839
  let t = l.getDuration();
822
- if (tn(t), N.current !== null && e >= N.current - 2) {
840
+ if (an(t), N.current !== null && e >= N.current - 2) {
823
841
  N.current = null, P.current &&= (window.clearTimeout(P.current), null);
824
- let t = z.current.find((t) => Cn.current.has(t.startTime) && e >= t.startTime && e < t.endTime);
842
+ let t = z.current.find((t) => En.current.has(t.startTime) && e >= t.startTime && e < t.endTime);
825
843
  t && ee(t.endTime), requestAnimationFrame(() => {
826
844
  requestAnimationFrame(() => {
827
845
  M.current && (M.current.style.opacity = "0");
828
846
  });
829
847
  });
830
848
  }
831
- if (!At.current && Et.current === null && st && st > 0 && t > 0 && st < t) {
832
- At.current = !0;
833
- let e = z.current.find((e) => st >= e.startTime && st < e.endTime), t = e ? e.startTime : st;
834
- jt.current = e ? null : st, N.current = t, l.seek(t), P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
849
+ if (!Nt.current && kt.current === null && lt && lt > 0 && t > 0 && lt < t) {
850
+ Nt.current = !0;
851
+ let e = z.current.find((e) => lt >= e.startTime && lt < e.endTime), t = e ? e.startTime : lt;
852
+ Pt.current = e ? null : lt, N.current = t, l.seek(t), P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
835
853
  N.current = null, P.current = null, M.current && (M.current.style.opacity = "0");
836
854
  }, 4e3);
837
855
  }
838
- if (ct?.(e), Rn.current.length > 0) if (zn.current) {
839
- let t = zn.current;
840
- (e >= t.startTimeSeconds + t.durationSeconds || e < t.startTimeSeconds) && (Ln(null), zn.current = null);
856
+ if (ut?.(e), Vn.current.length > 0) if (Hn.current) {
857
+ let t = Hn.current;
858
+ (e >= t.startTimeSeconds + t.durationSeconds || e < t.startTimeSeconds) && (Bn(null), Hn.current = null);
841
859
  } else {
842
- let t = Rn.current.find((t) => e >= t.startTimeSeconds && e < t.startTimeSeconds + t.durationSeconds && !Bn.current.has(t.availId));
843
- t && (Ln(t), zn.current = t, t.impressionBeacons.forEach((e) => {
860
+ let t = Vn.current.find((t) => e >= t.startTimeSeconds && e < t.startTimeSeconds + t.durationSeconds && !Un.current.has(t.availId));
861
+ t && (Bn(t), Hn.current = t, t.impressionBeacons.forEach((e) => {
844
862
  fetch(e, { mode: "no-cors" }).catch(() => {});
845
863
  }));
846
864
  }
847
865
  let n = l.keyMoments.getCurrentMoment(e);
848
- lr({
866
+ fr({
849
867
  chapter: n.keyMoment,
850
868
  index: n.index
851
869
  }), te(e, l.getVideoElement().paused);
852
870
  }), l.on("qualitylevels", (e) => {
853
- Xn(e);
871
+ $n(e);
854
872
  }), l.on("qualitychange", (e) => {
855
- Qn(e);
873
+ tr(e);
856
874
  }), l.on("buffering", (e) => {
857
- if (cn(e), !e && (j.current &&= (clearTimeout(j.current), null), Dt.current = null, Et.current !== null)) {
858
- let e = Et.current;
859
- Et.current = null, At.current = !0, N.current = e, P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
875
+ if (dn(e && !xt.current), !e && (j.current &&= (clearTimeout(j.current), null), At.current = null, kt.current !== null)) {
876
+ let e = kt.current;
877
+ kt.current = null, Nt.current = !0, N.current = e, P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
860
878
  N.current = null, P.current = null, M.current && (M.current.style.opacity = "0");
861
879
  }, 4e3), l.seek(e);
862
880
  }
863
881
  }), l.on("adbreakchange", (e) => {
864
- if (l.analytics.setAdBreak(e, l.getVideoElement()), ue && ue(e), e) {
882
+ if (l.analytics.setAdBreak(e, l.getVideoElement()), le && le(e), e) {
865
883
  let e = l.getCurrentTime(), t = z.current.find((t) => e >= t.startTime && e < t.endTime);
866
- if (Zr.current = !1, Xr(!1), t && Cn.current.has(t.startTime)) {
884
+ if (ei.current = !1, $r(!1), t && En.current.has(t.startTime)) {
867
885
  u(), E.current || ee(t.endTime);
868
886
  return;
869
887
  }
870
- t && (Mn.current = t.startTime), Jr(!0), K("none"), d();
871
- } else if (Mn.current !== null && (Cn.current.add(Mn.current), En(new Set(Cn.current)), Mn.current = null), Jr(!1), wt.current !== null) {
872
- let e = wt.current;
873
- wt.current = null, E.current = !0, D.current = e, O.current = l.getCurrentTime(), u(), l.seek(e), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
888
+ t && (Fn.current = t.startTime), Zr(!0), K("none"), d();
889
+ } else if (Fn.current !== null && (En.current.add(Fn.current), kn(new Set(En.current)), Fn.current = null), Zr(!1), Dt.current !== null) {
890
+ let e = Dt.current;
891
+ Dt.current = null, E.current = !0, D.current = e, O.current = l.getCurrentTime(), u(), l.seek(e), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
874
892
  E.current = !1, D.current = null, O.current = null, k.current = null, d();
875
893
  }, 3e3);
876
894
  }
877
895
  }), l.on("adbreaksloaded", (e) => {
878
- z.current = e, Sn(e);
879
- let t = jt.current;
896
+ z.current = e, Tn(e);
897
+ let t = Pt.current;
880
898
  if (t === null) return;
881
- jt.current = null;
899
+ Pt.current = null;
882
900
  let n = e.find((e) => t >= e.startTime && t < e.endTime);
883
- if (!n || Cn.current.has(n.startTime)) return;
901
+ if (!n || En.current.has(n.startTime)) return;
884
902
  let r = l.getCurrentTime();
885
903
  r < n.startTime || r >= n.endTime || (M.current && (M.current.style.opacity = "1"), N.current = n.startTime, P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
886
904
  N.current = null, P.current = null, M.current && (M.current.style.opacity = "0");
887
905
  }, 4e3), l.seek(n.startTime));
888
906
  }), l.on("volumechange", (e) => {
889
- rn(e.volume), yt.current === null && on(e.muted);
907
+ sn(e.volume), St.current === null && ln(e.muted);
890
908
  }), l.on("pipchange", (e) => {
891
- _n(e);
909
+ bn(e);
892
910
  }), l.on("error", () => {
893
- Jt(!0), cn(!1), N.current = null, P.current &&= (window.clearTimeout(P.current), null), M.current && (M.current.style.opacity = "0");
911
+ Zt(!0), dn(!1), N.current = null, P.current &&= (window.clearTimeout(P.current), null), M.current && (M.current.style.opacity = "0");
894
912
  }), l.on("unsupportedcodec", () => {
895
- let e = Dt.current;
896
- e && e.targetIdx !== 0 && (Ot.current?.length ?? 0) > 1 && ii(e.targetIdx);
913
+ let e = At.current;
914
+ e && e.targetIdx !== 0 && (jt.current?.length ?? 0) > 1 && si(e.targetIdx);
897
915
  }), l.subtitles.onSubtitleChange((e) => {
898
- er(e);
916
+ rr(e);
899
917
  }), l.on("subtitlesloaded", (e) => {
900
918
  if (!I.enableSubtitles) return;
901
- rr(ze([...e]));
919
+ or(Re([...e]));
902
920
  let t = e.find((e) => e.isDefault);
903
- t && (l.subtitles.setActiveTrack(t.id), tr(t.id));
921
+ t && (l.subtitles.setActiveTrack(t.id), ir(t.id));
904
922
  }), l.on("audiotracksloaded", (e) => {
905
- ar(e), sr(e[0]?.id ?? 0);
923
+ cr(e), ur(e[0]?.id ?? 0);
906
924
  }), l.on("audiotrackchange", (e) => {
907
- sr(e);
925
+ ur(e);
908
926
  }), l.casting.onCastStateChange((e, t) => {
909
927
  if (e) {
910
- Er.current = l.isMuted(), l.pause();
928
+ kr.current = l.isMuted(), l.pause();
911
929
  let e = l.getVideoElement();
912
- e.muted = !0, Cr(t);
930
+ e.muted = !0, Er(t);
913
931
  } else {
914
932
  let e = l.casting.getRemoteState();
915
933
  e && e.currentTime > 0 && (E.current = !0, D.current = e.currentTime, O.current = l.getCurrentTime(), l.seek(e.currentTime), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
916
934
  E.current = !1, D.current = null, O.current = null, k.current = null;
917
935
  }, 3e3));
918
936
  let t = l.getVideoElement();
919
- t.muted = Er.current, Cr(null), Tr(null);
937
+ t.muted = kr.current, Er(null), Or(null);
920
938
  }
921
939
  }), l.casting.onRemoteStateChange((e) => {
922
- Tr(e);
923
- }), rn(l.getVolume()), on(l.isMuted()), "mediaSession" in navigator) try {
940
+ Or(e);
941
+ }), sn(l.getVolume()), ln(l.isMuted()), "mediaSession" in navigator) try {
924
942
  navigator.mediaSession.setActionHandler("seekto", (e) => {
925
- if (e.seekTime == null || ei.current || Zr.current) return;
943
+ if (e.seekTime == null || ri.current || ei.current) return;
926
944
  let t = e.seekTime;
927
945
  for (let e of z.current) t >= e.startTime && (t += e.endTime - e.startTime);
928
- Tt.current?.(t);
946
+ Ot.current?.(t);
929
947
  });
930
948
  let e = (e, t) => {
931
- if (ei.current || Zr.current) return;
949
+ if (ri.current || ei.current) return;
932
950
  let n = t && t > 0 ? t : 10, r = l.getCurrentTime(), i = r;
933
951
  for (let e of z.current) r >= e.endTime ? i -= e.endTime - e.startTime : r >= e.startTime && (i -= r - e.startTime);
934
952
  if (e) {
935
953
  let e = z.current.reduce((e, t) => e + (t.endTime - t.startTime), 0), t = Math.max(0, l.getDuration() - e), r = Math.min(t, i + n);
936
954
  for (let e of z.current) r >= e.startTime && (r += e.endTime - e.startTime);
937
- Tt.current?.(r, {
955
+ Ot.current?.(r, {
938
956
  eventType: "fast_forward",
939
957
  skipSeconds: n
940
958
  });
941
959
  } else {
942
960
  let e = Math.max(0, i - n);
943
961
  for (let t of z.current) e >= t.startTime && (e += t.endTime - t.startTime);
944
- Tt.current?.(e, {
962
+ Ot.current?.(e, {
945
963
  eventType: "fast_backward",
946
964
  skipSeconds: n
947
965
  });
@@ -950,33 +968,33 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
950
968
  navigator.mediaSession.setActionHandler("seekforward", (t) => e(!0, t.seekOffset ?? void 0)), navigator.mediaSession.setActionHandler("seekbackward", (t) => e(!1, t.seekOffset ?? void 0));
951
969
  } catch {}
952
970
  let f = l.getVideoElement(), p = () => {
953
- if (!(document.pictureInPictureElement === f || f.webkitPresentationMode === "picture-in-picture") || E.current || N.current !== null || Et.current !== null) return;
954
- let e = f.currentTime, t = Mt.current;
971
+ if (!(document.pictureInPictureElement === f || f.webkitPresentationMode === "picture-in-picture") || E.current || N.current !== null || kt.current !== null) return;
972
+ let e = f.currentTime, t = Ft.current;
955
973
  if (!(Math.abs(e - t) < .5)) {
956
- if (ei.current) {
974
+ if (ri.current) {
957
975
  f.currentTime = t;
958
976
  return;
959
977
  }
960
- f.currentTime = t, Tt.current?.(e);
978
+ f.currentTime = t, Ot.current?.(e);
961
979
  }
962
980
  };
963
- f.addEventListener("seeking", p), Bt(l);
964
- let ne = Dt.current;
981
+ f.addEventListener("seeking", p), Ut(l);
982
+ let ne = At.current;
965
983
  ne && ne.targetIdx !== 0 && (j.current && clearTimeout(j.current), j.current = setTimeout(() => {
966
- j.current = null, !l.getBufferedRanges().some((e) => e.end > e.start) && ii(ne.targetIdx);
967
- }, Ae)), Et.current !== null && (P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
968
- P.current = null, N.current = null, M.current && (M.current.style.opacity = "0"), cn(!1);
969
- }, 12e3)), Ke && C.current && (dt.current = !0, C.current.requestFullscreen().catch(() => {
970
- dt.current = !1;
984
+ j.current = null, !l.getBufferedRanges().some((e) => e.end > e.start) && si(ne.targetIdx);
985
+ }, ke)), kt.current !== null && (P.current && window.clearTimeout(P.current), P.current = window.setTimeout(() => {
986
+ P.current = null, N.current = null, M.current && (M.current.style.opacity = "0"), dn(!1);
987
+ }, 12e3)), Je && C.current && (pt.current = !0, C.current.requestFullscreen().catch(() => {
988
+ pt.current = !1;
971
989
  }));
972
990
  let re = () => {
973
991
  let e = document, t = !!(document.fullscreenElement || e.webkitFullscreenElement);
974
- un(t), t || fn(!1);
992
+ pn(t), t || hn(!1);
975
993
  let n = l.getVideoElement();
976
994
  l.analytics.track(t ? "fullscreen_enter" : "fullscreen_exit", n);
977
995
  };
978
996
  document.addEventListener("fullscreenchange", re), document.addEventListener("webkitfullscreenchange", re);
979
- let h = (e) => {
997
+ let g = (e) => {
980
998
  let t = document.activeElement;
981
999
  if (!(t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.getAttribute("contenteditable") === "true" || t.getAttribute("role") === "slider"))) {
982
1000
  switch (e.key.toLowerCase()) {
@@ -996,12 +1014,12 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
996
1014
  break;
997
1015
  case "arrowleft":
998
1016
  case "j":
999
- if (e.preventDefault(), !ei.current) {
1017
+ if (e.preventDefault(), !ri.current) {
1000
1018
  let e = l.getCurrentTime(), t = e;
1001
1019
  for (let n of z.current) e >= n.endTime ? t -= n.endTime - n.startTime : e >= n.startTime && (t -= e - n.startTime);
1002
1020
  let n = Math.max(0, t - 10);
1003
1021
  for (let e of z.current) n >= e.startTime && (n += e.endTime - e.startTime);
1004
- Tt.current?.(n, {
1022
+ Ot.current?.(n, {
1005
1023
  eventType: "fast_backward",
1006
1024
  skipSeconds: 10
1007
1025
  });
@@ -1009,12 +1027,12 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1009
1027
  break;
1010
1028
  case "arrowright":
1011
1029
  case "l":
1012
- if (e.preventDefault(), !ei.current) {
1030
+ if (e.preventDefault(), !ri.current) {
1013
1031
  let e = l.getCurrentTime(), t = z.current.reduce((e, t) => e + (t.endTime - t.startTime), 0), n = Math.max(0, l.getDuration() - t), r = e;
1014
1032
  for (let t of z.current) e >= t.endTime ? r -= t.endTime - t.startTime : e >= t.startTime && (r -= e - t.startTime);
1015
1033
  let i = Math.min(n, r + 10);
1016
1034
  for (let e of z.current) i >= e.startTime && (i += e.endTime - e.startTime);
1017
- Tt.current?.(i, {
1035
+ Ot.current?.(i, {
1018
1036
  eventType: "fast_forward",
1019
1037
  skipSeconds: 10
1020
1038
  });
@@ -1030,32 +1048,32 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1030
1048
  e.preventDefault(), l.setMute(!l.isMuted());
1031
1049
  break;
1032
1050
  case "f":
1033
- e.preventDefault(), vt.current();
1051
+ e.preventDefault(), bt.current();
1034
1052
  break;
1035
1053
  case "p":
1036
- e.preventDefault(), ei.current || l.togglePictureInPicture();
1054
+ e.preventDefault(), ri.current || l.togglePictureInPicture();
1037
1055
  break;
1038
1056
  case "c":
1039
- if (e.preventDefault(), I.enableSubtitles && !ei.current) if (l.subtitles.getActiveTrackId() !== "off") l.subtitles.setActiveTrack("off"), tr("off");
1057
+ if (e.preventDefault(), I.enableSubtitles && !ri.current) if (l.subtitles.getActiveTrackId() !== "off") l.subtitles.setActiveTrack("off"), ir("off");
1040
1058
  else {
1041
- let e = ni.current;
1042
- e && e.length > 0 && (l.subtitles.setActiveTrack(e[0].id), tr(e[0].id));
1059
+ let e = ai.current;
1060
+ e && e.length > 0 && (l.subtitles.setActiveTrack(e[0].id), ir(e[0].id));
1043
1061
  }
1044
1062
  break;
1045
1063
  default: return;
1046
1064
  }
1047
- ri();
1065
+ oi();
1048
1066
  }
1049
1067
  };
1050
- return document.addEventListener("keydown", h), ri(), () => {
1051
- if (jn.current = {
1052
- key: wn,
1068
+ return document.addEventListener("keydown", g), oi(), () => {
1069
+ if (Pn.current = {
1070
+ key: Dn,
1053
1071
  snapshot: l.analytics.getSessionSnapshot()
1054
- }, Nt.current) {
1055
- let e = Nt.current, t = l.getVideoElement();
1056
- C.current && t.ownerDocument !== document && (t.classList.remove("gb-pip-video"), C.current.insertBefore(t, C.current.firstChild)), Nt.current = null, yn(null), _n(!1), e.close();
1072
+ }, It.current) {
1073
+ let e = It.current, t = l.getVideoElement();
1074
+ C.current && t.ownerDocument !== document && (t.classList.remove("gb-pip-video"), C.current.insertBefore(t, C.current.firstChild)), It.current = null, Sn(null), bn(!1), e.close();
1057
1075
  }
1058
- if (l.destroy(), ut.current?.destroy(), ut.current = null, document.body.style.overflow = "", document.body.style.touchAction = "", document.removeEventListener("fullscreenchange", re), document.removeEventListener("webkitfullscreenchange", re), document.removeEventListener("keydown", h), Qr.current && window.clearTimeout(Qr.current), k.current &&= (window.clearTimeout(k.current), null), j.current &&= (clearTimeout(j.current), null), A.current && (A.current.style.opacity = "0"), f.removeEventListener("seeking", p), "mediaSession" in navigator) {
1076
+ if (l.destroy(), ft.current?.destroy(), ft.current = null, document.body.style.overflow = "", document.body.style.touchAction = "", document.removeEventListener("fullscreenchange", re), document.removeEventListener("webkitfullscreenchange", re), document.removeEventListener("keydown", g), ti.current && window.clearTimeout(ti.current), k.current &&= (window.clearTimeout(k.current), null), j.current &&= (clearTimeout(j.current), null), xt.current = !1, A.current && (A.current.style.opacity = "0"), f.removeEventListener("seeking", p), "mediaSession" in navigator) {
1059
1077
  try {
1060
1078
  navigator.mediaSession.setActionHandler("seekto", null);
1061
1079
  } catch {}
@@ -1066,25 +1084,25 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1066
1084
  navigator.mediaSession.setActionHandler("seekbackward", null);
1067
1085
  } catch {}
1068
1086
  }
1069
- mt.current &&= (mt.current.destroy(), null), T.current &&= (document.body.removeChild(T.current), null), At.current = !1, N.current = null, P.current &&= (window.clearTimeout(P.current), null);
1087
+ gt.current &&= (gt.current.destroy(), null), T.current &&= (document.body.removeChild(T.current), null), Nt.current = !1, N.current = null, P.current &&= (window.clearTimeout(P.current), null);
1070
1088
  };
1071
1089
  }, [
1072
1090
  r,
1073
- ae,
1074
- Yt
1091
+ ie,
1092
+ Qt
1075
1093
  ]), c(() => {
1076
1094
  if (F) {
1077
1095
  F.keyMoments.setKeyMoments(W);
1078
1096
  let e = C.current?.querySelector("video");
1079
1097
  if (e) {
1080
1098
  let t = F.keyMoments.getCurrentMoment(e.currentTime);
1081
- lr({
1099
+ fr({
1082
1100
  chapter: t.keyMoment,
1083
1101
  index: t.index
1084
1102
  });
1085
1103
  }
1086
1104
  }
1087
- }, [Sr, F]), c(() => {
1105
+ }, [Tr, F]), c(() => {
1088
1106
  let e = (e) => {
1089
1107
  G !== "none" && (e.target.closest(".sdk-menu-container") || K("none"));
1090
1108
  };
@@ -1092,17 +1110,17 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1092
1110
  document.removeEventListener("click", e);
1093
1111
  };
1094
1112
  }, [G]), c(() => {
1095
- $r.current = Zt;
1096
- }, [Zt]), c(() => {
1097
- ei.current = Y;
1113
+ ni.current = en;
1114
+ }, [en]), c(() => {
1115
+ ri.current = Y;
1098
1116
  }, [Y]), c(() => {
1099
- Zr.current = Yr;
1100
- }, [Yr]);
1101
- let X = Y || Yr;
1117
+ ei.current = Qr;
1118
+ }, [Qr]);
1119
+ let X = Y || Qr;
1102
1120
  c(() => {
1103
- Nt.current = vn;
1104
- }, [vn]), c(() => {
1105
- ti.current = G;
1121
+ It.current = xn;
1122
+ }, [xn]), c(() => {
1123
+ ii.current = G;
1106
1124
  }, [G]), c(() => {
1107
1125
  if (!Y || !F) return;
1108
1126
  let e = 0, t = F.getCurrentTime(), n = performance.now(), r = () => {
@@ -1112,7 +1130,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1112
1130
  let e = i.playbackRate || 1;
1113
1131
  s = t + (o - n) / 1e3 * e;
1114
1132
  } else s = t;
1115
- let c = Kn(a);
1133
+ let c = Yn(a);
1116
1134
  if (c) {
1117
1135
  let e = Math.min(s, a + .4, c.end), t = Math.min(100, Math.max(0, (e - c.start) / (c.end - c.start) * 100));
1118
1136
  (C.current?.querySelectorAll(".sdk-ad-progress-fill"))?.forEach((e) => {
@@ -1123,38 +1141,38 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1123
1141
  };
1124
1142
  return e = requestAnimationFrame(r), () => cancelAnimationFrame(e);
1125
1143
  }, [Y, F]), c(() => {
1126
- ni.current = nr;
1127
- }, [nr]), c(() => {
1128
- It.current = Pt;
1129
- }, [Pt]), c(() => {
1144
+ ai.current = ar;
1145
+ }, [ar]), c(() => {
1146
+ zt.current = Lt;
1147
+ }, [Lt]), c(() => {
1130
1148
  z.current = R;
1131
1149
  }, [R]), c(() => {
1132
- Rn.current = Pn;
1133
- }, [Pn]), c(() => {
1134
- zn.current = In;
1135
- }, [In]), c(() => {
1136
- Un.current = Vn;
1137
- }, [Vn]), c(() => {
1138
- Ot.current = S;
1150
+ Vn.current = Ln;
1151
+ }, [Ln]), c(() => {
1152
+ Hn.current = zn;
1153
+ }, [zn]), c(() => {
1154
+ Kn.current = Wn;
1155
+ }, [Wn]), c(() => {
1156
+ jt.current = S;
1139
1157
  }, [S]), c(() => {
1140
- kt.current = ot;
1141
- }, [ot]), c(() => {
1142
- Mn.current = null, Nn.current = !1, wt.current = null, jt.current = null, Ln(null), zn.current = null, Bn.current = /* @__PURE__ */ new Set(), Jt(!1);
1158
+ Mt.current = ct;
1159
+ }, [ct]), c(() => {
1160
+ Fn.current = null, In.current = !1, Dt.current = null, Pt.current = null, Bn(null), Hn.current = null, Un.current = /* @__PURE__ */ new Set(), Zt(!1);
1143
1161
  }, [r]), c(() => {
1144
- Ht(!1);
1162
+ Gt(!1);
1145
1163
  }, [r]), c(() => {
1146
1164
  if (!F) return;
1147
1165
  let e = F.getVideoElement();
1148
1166
  if (e && e.readyState >= 1) {
1149
- Ht(!0);
1167
+ Gt(!0);
1150
1168
  return;
1151
1169
  }
1152
- let t = () => Ht(!0);
1170
+ let t = () => Gt(!0);
1153
1171
  return F.on("qualitylevels", t), e?.addEventListener("loadedmetadata", t), () => {
1154
1172
  F.off("qualitylevels", t), e?.removeEventListener("loadedmetadata", t);
1155
1173
  };
1156
1174
  }, [F]), c(() => {
1157
- if (Fn([]), !(!rt || !Vt)) return He(rt, (e) => {
1175
+ if (Rn([]), !(!at || !Wt)) return Ue(at, (e) => {
1158
1176
  let t = /* @__PURE__ */ new Set(), n = [];
1159
1177
  for (let r of e.nonLinearAvails ?? []) {
1160
1178
  if (t.has(r.availId)) continue;
@@ -1168,13 +1186,13 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1168
1186
  let s = o.position ?? "bottom_center";
1169
1187
  n.push({
1170
1188
  availId: r.availId,
1171
- startTimeSeconds: Be(r.startTime ?? ""),
1172
- durationSeconds: Be(i.minSuggestedDuration ?? "00:00:15"),
1189
+ startTimeSeconds: ze(r.startTime ?? ""),
1190
+ durationSeconds: ze(i.minSuggestedDuration ?? "00:00:15"),
1173
1191
  imageUrl: i.staticResource,
1174
1192
  imageWidth: parseInt(i.width ?? "320", 10),
1175
1193
  imageHeight: parseInt(i.height ?? "50", 10),
1176
1194
  title: i.adTitle ?? "",
1177
- clickThrough: i.clickThrough ?? "",
1195
+ clickThrough: Be(i.clickThrough) ? i.clickThrough : "",
1178
1196
  clickTrackingUrl: i.clickTracking ?? "",
1179
1197
  impressionBeacons: a,
1180
1198
  position: s,
@@ -1182,25 +1200,27 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1182
1200
  });
1183
1201
  }
1184
1202
  return n.length > 0 ? n : null;
1185
- }, Fn);
1203
+ }, Rn);
1186
1204
  }, [
1187
- rt,
1205
+ at,
1188
1206
  r,
1189
- Vt
1207
+ Wt
1190
1208
  ]), c(() => {
1191
- if (Hn([]), Gn([]), !(!it || !Vt)) return He(it, (e) => {
1209
+ if (Gn([]), Jn([]), !(!ot || !Wt)) return Ue(ot, (e) => {
1192
1210
  let t = [], n = [];
1193
1211
  for (let r of e.avails ?? []) {
1194
1212
  let e = r.ads ?? [];
1195
- e.length !== 0 && (n.push({
1196
- startTime: r.startTimeInSeconds ?? e[0].startTimeInSeconds ?? 0,
1197
- endTime: (r.startTimeInSeconds ?? 0) + (r.durationInSeconds ?? 0)
1213
+ if (e.length === 0) continue;
1214
+ let i = r.startTimeInSeconds ?? e[0].startTimeInSeconds ?? 0, a = e[e.length - 1], o = (a?.startTimeInSeconds ?? i) + (a?.durationInSeconds ?? 0);
1215
+ n.push({
1216
+ startTime: i,
1217
+ endTime: r.durationInSeconds == null ? Math.max(o, i) : i + r.durationInSeconds
1198
1218
  }), e.forEach((n, r) => {
1199
- let i = n?.skipOffset ?? null, a = !!i, o = {};
1219
+ let i = Ve(n?.skipOffset), a = i !== null, o = {};
1200
1220
  try {
1201
1221
  o = JSON.parse(n?.adParameters ?? "{}");
1202
1222
  } catch {}
1203
- let s = o.ctaText && o.redirectUrl ? {
1223
+ let s = o.ctaText && Be(o.redirectUrl) ? {
1204
1224
  text: o.ctaText,
1205
1225
  url: o.redirectUrl,
1206
1226
  title: o.title || void 0,
@@ -1211,47 +1231,47 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1211
1231
  endTimeSeconds: c + l,
1212
1232
  durationSeconds: l,
1213
1233
  skippable: a,
1214
- skipOffsetSeconds: a ? Be(i) : 0,
1234
+ skipOffsetSeconds: i ?? 0,
1215
1235
  cta: s,
1216
1236
  podIndex: r,
1217
1237
  podTotal: e.length
1218
1238
  });
1219
- }));
1239
+ });
1220
1240
  }
1221
1241
  return t.length > 0 ? {
1222
1242
  pods: t,
1223
1243
  breaks: n
1224
1244
  } : null;
1225
1245
  }, ({ pods: e, breaks: t }) => {
1226
- Hn(e), Gn(t);
1246
+ Gn(e), Jn(t);
1227
1247
  });
1228
1248
  }, [
1229
- it,
1249
+ ot,
1230
1250
  r,
1231
- Vt
1251
+ Wt
1232
1252
  ]), c(() => {
1233
- !F || Wn.length === 0 || F.setAdBreaks(Wn);
1234
- }, [F, Wn]), c(() => {
1253
+ !F || qn.length === 0 || F.setAdBreaks(qn);
1254
+ }, [F, qn]), c(() => {
1235
1255
  if (!F) return;
1236
1256
  let e = () => {
1237
- document.hidden ? et && ei.current && $r.current && (F.pause(), Nn.current = !0) : Nn.current &&= (F.play(), !1);
1257
+ document.hidden ? nt && ri.current && ni.current && (F.pause(), In.current = !0) : In.current &&= (F.play(), !1);
1238
1258
  };
1239
1259
  return document.addEventListener("visibilitychange", e), () => {
1240
1260
  document.removeEventListener("visibilitychange", e);
1241
1261
  };
1242
- }, [F, et]);
1243
- let ai = () => {
1244
- ri();
1245
- }, oi = () => {
1246
- Ke && !dt.current && C.current && (dt.current = !0, C.current.requestFullscreen().catch(() => {}));
1247
- }, si = () => {
1262
+ }, [F, nt]);
1263
+ let ci = () => {
1264
+ oi();
1265
+ }, li = () => {
1266
+ Je && !pt.current && C.current && (pt.current = !0, C.current.requestFullscreen().catch(() => {}));
1267
+ }, ui = () => {
1248
1268
  if (F) {
1249
1269
  if (q) {
1250
- F.casting.remotePlayPause(), ri();
1270
+ F.casting.remotePlayPause(), oi();
1251
1271
  return;
1252
1272
  }
1253
- if (bn) Z(0), oi(), F.play(), xn(!1);
1254
- else if (Zt) {
1273
+ if (Cn) Z(0), li(), F.play(), wn(!1);
1274
+ else if (en) {
1255
1275
  F.pause();
1256
1276
  try {
1257
1277
  let e = F.getVideoElement?.();
@@ -1264,100 +1284,100 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1264
1284
  }), T.current && !T.current.paused) try {
1265
1285
  T.current.pause();
1266
1286
  } catch {}
1267
- } else oi(), F.play();
1268
- ri();
1287
+ } else li(), F.play();
1288
+ oi();
1269
1289
  }
1270
- }, ci = (e) => {
1290
+ }, di = (e) => {
1271
1291
  if (!w.current || !F || B === 0) return 0;
1272
1292
  let t = w.current.getBoundingClientRect();
1273
1293
  return H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B);
1274
- }, li = (e) => {
1275
- if (!F || Y || Yr) return;
1276
- gt.current = !0, Ur(ci(e));
1294
+ }, fi = (e) => {
1295
+ if (!F || Y || Qr) return;
1296
+ vt.current = !0, Kr(di(e));
1277
1297
  let t = (e) => {
1278
- if (!gt.current || !w.current) return;
1298
+ if (!vt.current || !w.current) return;
1279
1299
  let t = w.current.getBoundingClientRect(), n = H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B);
1280
- Ur(n), Pr(e.clientX - t.left), Rr(n), T.current && (T.current.currentTime = n), ri();
1300
+ Kr(n), Lr(e.clientX - t.left), Vr(n), T.current && (T.current.currentTime = n), oi();
1281
1301
  }, n = (e) => {
1282
- if (gt.current = !1, w.current) {
1302
+ if (vt.current = !1, w.current) {
1283
1303
  let t = w.current.getBoundingClientRect();
1284
1304
  Z(H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B));
1285
1305
  }
1286
- Ur(null), Pr(null), Br(null), Hr(null), document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n);
1306
+ Kr(null), Lr(null), Ur(null), Gr(null), document.removeEventListener("mousemove", t), document.removeEventListener("mouseup", n);
1287
1307
  };
1288
1308
  document.addEventListener("mousemove", t), document.addEventListener("mouseup", n);
1289
1309
  }, Z = (e, t) => {
1290
1310
  if (!F) return;
1291
- if (jt.current = null, q) {
1311
+ if (Pt.current = null, q) {
1292
1312
  F.casting.remoteSeek(e);
1293
1313
  return;
1294
1314
  }
1295
- let n = Math.max(0, en > 0 ? Math.min(e, en) : e);
1315
+ let n = Math.max(0, rn > 0 ? Math.min(e, rn) : e);
1296
1316
  if (t) {
1297
1317
  let { eventType: e, ...n } = t;
1298
1318
  F.attributeNextSeek(e, n);
1299
1319
  }
1300
1320
  let r = F.getCurrentTime();
1301
1321
  if (n > r && z.current.length > 0) {
1302
- let e = z.current.filter((e) => e.startTime < n && e.endTime > r && !Cn.current.has(e.startTime)).sort((e, t) => e.startTime - t.startTime);
1322
+ let e = z.current.filter((e) => e.startTime < n && e.endTime > r && !En.current.has(e.startTime)).sort((e, t) => e.startTime - t.startTime);
1303
1323
  if (e.length > 0) {
1304
- wt.current = n;
1324
+ Dt.current = n;
1305
1325
  let t = e[e.length - 1], i = Math.max(t.startTime, r);
1306
- E.current = !0, D.current = i, O.current = r, $t(i), Zr.current = !0, Xr(!0), A.current && (A.current.style.opacity = "1"), bt(F.getVideoElement()), F.seek(i), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
1307
- E.current = !1, Zr.current = !1, Xr(!1), D.current = null, O.current = null, k.current = null, A.current && (A.current.style.opacity = "0"), xt(F.getVideoElement());
1326
+ E.current = !0, D.current = i, O.current = r, nn(i), ei.current = !0, $r(!0), A.current && (A.current.style.opacity = "1"), Ct(F.getVideoElement()), F.seek(i), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
1327
+ E.current = !1, ei.current = !1, $r(!1), D.current = null, O.current = null, k.current = null, xt.current = !1, A.current && (A.current.style.opacity = "0"), wt(F.getVideoElement());
1308
1328
  }, 3e3);
1309
1329
  return;
1310
1330
  }
1311
1331
  }
1312
- wt.current = null;
1313
- let i = z.current.find((e) => Cn.current.has(e.startTime) && n >= e.startTime - .5 && n < e.endTime + 2), a = i ? Math.max(n, i.endTime + .5) : n;
1314
- E.current = !0, D.current = a, O.current = r, $t(a), A.current && (A.current.style.opacity = "0"), xt(F.getVideoElement()), F.seek(a), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
1315
- E.current = !1, D.current = null, O.current = null, k.current = null, A.current && (A.current.style.opacity = "0");
1332
+ Dt.current = null;
1333
+ let i = z.current.find((e) => En.current.has(e.startTime) && n >= e.startTime - .5 && n < e.endTime + 2), a = i ? Math.max(n, i.endTime + .5) : n;
1334
+ E.current = !0, D.current = a, O.current = r, nn(a), xt.current = !1, A.current && (A.current.style.opacity = "0"), wt(F.getVideoElement()), F.seek(a), k.current && window.clearTimeout(k.current), k.current = window.setTimeout(() => {
1335
+ E.current = !1, D.current = null, O.current = null, k.current = null, xt.current = !1, A.current && (A.current.style.opacity = "0");
1316
1336
  }, 3e3);
1317
1337
  };
1318
- Tt.current = Z;
1319
- let ui = () => {
1338
+ Ot.current = Z;
1339
+ let pi = () => {
1320
1340
  if (!F) return;
1321
1341
  if (q) {
1322
- F.casting.remoteSetMute(!(wr?.isMuted ?? !1));
1342
+ F.casting.remoteSetMute(!(Dr?.isMuted ?? !1));
1323
1343
  return;
1324
1344
  }
1325
- let e = !an;
1326
- F.setMute(e), on(e);
1327
- }, di = (e) => {
1328
- F && (F.setPlaybackRate(e), fr(e), K("none"), vr(`Playback speed: ${e === 1 ? "Normal" : `${e}x`}`));
1329
- }, fi = (e) => {
1345
+ let e = !cn;
1346
+ F.setMute(e), ln(e);
1347
+ }, mi = (e) => {
1348
+ F && (F.setPlaybackRate(e), hr(e), K("none"), xr(`Playback speed: ${e === 1 ? "Normal" : `${e}x`}`));
1349
+ }, hi = (e) => {
1330
1350
  if (!F) return;
1331
1351
  F.setQuality(e);
1332
- let t = Yn.find((t) => t.id === e);
1333
- t && (Qn(t), vr(`Quality: ${t.label}`)), K("none");
1334
- }, pi = (e) => {
1335
- if (F) if (F.subtitles.setActiveTrack(e), tr(e), K("none"), e === "off") vr("Captions off");
1352
+ let t = Qn.find((t) => t.id === e);
1353
+ t && (tr(t), xr(`Quality: ${t.label}`)), K("none");
1354
+ }, gi = (e) => {
1355
+ if (F) if (F.subtitles.setActiveTrack(e), ir(e), K("none"), e === "off") xr("Captions off");
1336
1356
  else {
1337
- let t = nr.find((t) => t.id === e);
1338
- vr(`Captions: ${t ? y(t) : "on"}`);
1357
+ let t = ar.find((t) => t.id === e);
1358
+ xr(`Captions: ${t ? b(t) : "on"}`);
1339
1359
  }
1340
- }, mi = (e) => {
1341
- F && (j.current &&= (clearTimeout(j.current), null), br(null), M.current && (M.current.style.opacity = "1"), cn(!0), Dt.current === null && (Et.current = F.getCurrentTime()), Dt.current = { targetIdx: e }, K("none"), vr(`Source: ${S?.[e]?.label ?? ""}`), ot?.(e));
1342
- }, hi = (e, t) => {
1360
+ }, _i = (e) => {
1361
+ F && (j.current &&= (clearTimeout(j.current), null), Cr(null), M.current && (M.current.style.opacity = "1"), dn(!0), At.current === null && (kt.current = F.getCurrentTime()), At.current = { targetIdx: e }, K("none"), xr(`Source: ${S?.[e]?.label ?? ""}`), ct?.(e));
1362
+ }, vi = (e, t) => {
1343
1363
  Z(e, {
1344
1364
  eventType: "key_moments",
1345
1365
  momentTitle: t?.title ?? "",
1346
1366
  momentTime: e
1347
1367
  }), K("none");
1348
- }, gi = o(() => {
1349
- if (!Nt.current) return;
1368
+ }, yi = o(() => {
1369
+ if (!It.current) return;
1350
1370
  let e = F?.getVideoElement?.();
1351
- e && C.current && e.ownerDocument !== document && (e.classList.remove("gb-pip-video"), e.style.objectFit = "", C.current.insertBefore(e, C.current.firstChild)), Nt.current = null, yn(null), _n(!1);
1352
- }, [F]), _i = async () => {
1371
+ e && C.current && e.ownerDocument !== document && (e.classList.remove("gb-pip-video"), e.style.objectFit = "", C.current.insertBefore(e, C.current.firstChild)), It.current = null, Sn(null), bn(!1);
1372
+ }, [F]), bi = async () => {
1353
1373
  if (!F) return;
1354
1374
  let e = window.documentPictureInPicture;
1355
1375
  if (!e) {
1356
1376
  F.togglePictureInPicture();
1357
1377
  return;
1358
1378
  }
1359
- if (Nt.current) {
1360
- Nt.current.close();
1379
+ if (It.current) {
1380
+ It.current.close();
1361
1381
  return;
1362
1382
  }
1363
1383
  try {
@@ -1365,138 +1385,138 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1365
1385
  width: 360,
1366
1386
  height: Math.round(360 / n)
1367
1387
  }), i = r.document.createElement("style");
1368
- i.textContent = Me, r.document.head.appendChild(i), t.classList.add("gb-pip-video"), r.document.body.appendChild(t), r.addEventListener("pagehide", () => gi(), { once: !0 }), Nt.current = r, yn(r), _n(!0);
1388
+ i.textContent = je, r.document.head.appendChild(i), t.classList.add("gb-pip-video"), r.document.body.appendChild(t), r.addEventListener("pagehide", () => yi(), { once: !0 }), It.current = r, Sn(r), bn(!0);
1369
1389
  } catch (e) {
1370
1390
  console.error("[PlayerSDK PiP] Failed to open custom Picture-in-Picture window:", e);
1371
1391
  }
1372
- }, vi = (e) => {
1373
- if (Y || Yr) return;
1392
+ }, xi = (e) => {
1393
+ if (Y || Qr) return;
1374
1394
  let t = e.currentTarget.getBoundingClientRect();
1375
1395
  Z(H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B));
1376
- }, yi = () => {
1396
+ }, Si = () => {
1377
1397
  if (!C.current) return;
1378
1398
  let e = C.current, t = document, n = e, r = !!(document.fullscreenElement || t.webkitFullscreenElement), i = () => {
1379
- fn(!0), un(!0), document.body.style.overflow = "hidden", document.body.style.touchAction = "none", F?.analytics.track("fullscreen_enter", F.getVideoElement());
1399
+ hn(!0), pn(!0), document.body.style.overflow = "hidden", document.body.style.touchAction = "none", F?.analytics.track("fullscreen_enter", F.getVideoElement());
1380
1400
  }, a = () => {
1381
- fn(!1), un(!1), document.body.style.overflow = "", document.body.style.touchAction = "", F?.analytics.track("fullscreen_exit", F.getVideoElement());
1401
+ hn(!1), pn(!1), document.body.style.overflow = "", document.body.style.touchAction = "", F?.analytics.track("fullscreen_exit", F.getVideoElement());
1382
1402
  };
1383
- if (r || dn) mn(!1), document.fullscreenElement ? document.exitFullscreen() : t.webkitFullscreenElement ? t.webkitExitFullscreen?.() : a();
1403
+ if (r || mn) _n(!1), document.fullscreenElement ? document.exitFullscreen() : t.webkitFullscreenElement ? t.webkitExitFullscreen?.() : a();
1384
1404
  else {
1385
- mn(It.current);
1405
+ _n(zt.current);
1386
1406
  let t = e.requestFullscreen?.bind(e) ?? n.webkitRequestFullscreen?.bind(n);
1387
1407
  t ? t().catch(i) : i();
1388
1408
  }
1389
1409
  };
1390
1410
  c(() => {
1391
- vt.current = yi;
1411
+ bt.current = Si;
1392
1412
  });
1393
- let bi = () => {
1413
+ let Ci = () => {
1394
1414
  if (!Y) return;
1395
- let e = R.find((e) => L >= e.startTime && L < e.endTime), t = Vn.find((e) => L >= e.startTimeSeconds && L < e.endTimeSeconds);
1415
+ let e = R.find((e) => L >= e.startTime && L < e.endTime), t = Wn.find((e) => L >= e.startTimeSeconds && L < e.endTimeSeconds);
1396
1416
  if (t) {
1397
1417
  let n = t.podIndex >= t.podTotal - 1;
1398
- St.current?.(n ? e?.endTime ?? t.endTimeSeconds : t.endTimeSeconds, !n);
1418
+ Tt.current?.(n ? e?.endTime ?? t.endTimeSeconds : t.endTimeSeconds, !n);
1399
1419
  return;
1400
1420
  }
1401
- e && St.current?.(e.endTime);
1402
- }, xi = () => {
1403
- zn.current && Bn.current.add(zn.current.availId), Ln(null), zn.current = null;
1404
- }, Si = (e) => {
1421
+ e && Tt.current?.(e.endTime);
1422
+ }, wi = () => {
1423
+ Hn.current && Un.current.add(Hn.current.availId), Bn(null), Hn.current = null;
1424
+ }, Ti = (e) => {
1405
1425
  e.clickTrackingUrl && fetch(e.clickTrackingUrl, { mode: "no-cors" }).catch(() => {}), e.clickThrough && window.open(e.clickThrough, "_blank", "noopener,noreferrer");
1406
- }, Ci = (e) => {
1426
+ }, Ei = (e) => {
1407
1427
  window.open(e.url, "_blank", "noopener,noreferrer");
1408
- }, wi = () => {
1428
+ }, Di = () => {
1409
1429
  F && (q ? F.casting.stopCasting() : F.casting.requestSession(r, L));
1410
- }, Ti = () => {
1430
+ }, Oi = () => {
1411
1431
  if (!F) return;
1412
1432
  let e = F.getVideoElement();
1413
- if (kr) {
1433
+ if (Mr) {
1414
1434
  F.casting.stopAirPlay(e);
1415
1435
  return;
1416
1436
  }
1417
1437
  typeof e.webkitShowPlaybackTargetPicker == "function" || F.casting.isAirPlayAvailable() ? F.casting.requestAirPlaySession(e) : console.warn("[PlayerSDK AirPlay] AirPlay is not available on this device.");
1418
- }, Ei = (e) => {
1419
- if (!w.current || B === 0 || !F || Y || Yr) return;
1438
+ }, ki = (e) => {
1439
+ if (!w.current || B === 0 || !F || Y || Qr) return;
1420
1440
  let t = w.current.getBoundingClientRect();
1421
- ft.current = t.width, Ir(Math.max(192 / 2, Math.min(e.clientX - t.left, t.width - 192 / 2)));
1441
+ mt.current = t.width, zr(Math.max(192 / 2, Math.min(e.clientX - t.left, t.width - 192 / 2)));
1422
1442
  let n = H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B);
1423
- Pr(e.clientX - t.left), Rr(n), ht.current && window.clearTimeout(ht.current), ht.current = window.setTimeout(() => {
1443
+ Lr(e.clientX - t.left), Vr(n), _t.current && window.clearTimeout(_t.current), _t.current = window.setTimeout(() => {
1424
1444
  T.current && (T.current.currentTime = n);
1425
- }, 100), Hr(F.keyMoments.getCurrentMoment(n).keyMoment);
1426
- }, Di = (e) => {
1445
+ }, 100), Gr(F.keyMoments.getCurrentMoment(n).keyMoment);
1446
+ }, Ai = (e) => {
1427
1447
  if (!w.current || B === 0) return 0;
1428
1448
  let t = w.current.getBoundingClientRect();
1429
1449
  return H(Math.max(0, Math.min(1, (e.clientX - t.left) / t.width)) * B);
1430
- }, Oi = (e) => {
1431
- if (!F || Y || Yr || B === 0) return;
1432
- e.preventDefault(), gt.current = !0, Ur(Di(e.touches[0]));
1450
+ }, ji = (e) => {
1451
+ if (!F || Y || Qr || B === 0) return;
1452
+ e.preventDefault(), vt.current = !0, Kr(Ai(e.touches[0]));
1433
1453
  let t = (e) => {
1434
- if (!gt.current || !w.current) return;
1454
+ if (!vt.current || !w.current) return;
1435
1455
  let t = e.touches[0], n = w.current.getBoundingClientRect(), r = H(Math.max(0, Math.min(1, (t.clientX - n.left) / n.width)) * B);
1436
- Ur(r), Rr(r), ri();
1456
+ Kr(r), Vr(r), oi();
1437
1457
  }, n = (e) => {
1438
- if (gt.current = !1, w.current && e.changedTouches[0]) {
1458
+ if (vt.current = !1, w.current && e.changedTouches[0]) {
1439
1459
  let t = e.changedTouches[0], n = w.current.getBoundingClientRect();
1440
1460
  Z(H(Math.max(0, Math.min(1, (t.clientX - n.left) / n.width)) * B));
1441
1461
  }
1442
- Ur(null), document.removeEventListener("touchmove", t), document.removeEventListener("touchend", n);
1462
+ Kr(null), document.removeEventListener("touchmove", t), document.removeEventListener("touchend", n);
1443
1463
  };
1444
1464
  document.addEventListener("touchmove", t, { passive: !1 }), document.addEventListener("touchend", n);
1445
- }, ki = () => {
1446
- Pr(null), Br(null), Hr(null), ht.current && window.clearTimeout(ht.current);
1465
+ }, Mi = () => {
1466
+ Lr(null), Ur(null), Gr(null), _t.current && window.clearTimeout(_t.current);
1447
1467
  }, Q = (e) => {
1448
1468
  if (isNaN(e) || e < 0) return "00:00";
1449
1469
  let t = Math.floor(e), n = Math.floor(t / 3600), r = Math.floor(t % 3600 / 60), i = t % 60, a = (e) => String(e).padStart(2, "0");
1450
1470
  return n > 0 ? `${a(n)}:${a(r)}:${a(i)}` : `${a(r)}:${a(i)}`;
1451
1471
  };
1452
1472
  c(() => {
1453
- xr.current && vr(Zt ? "Playing" : "Paused");
1454
- }, [Zt]), c(() => {
1455
- xr.current && vr(an ? "Muted" : "Unmuted");
1456
- }, [an]), c(() => {
1457
- xr.current = !0;
1473
+ wr.current && xr(en ? "Playing" : "Paused");
1474
+ }, [en]), c(() => {
1475
+ wr.current && xr(cn ? "Muted" : "Unmuted");
1476
+ }, [cn]), c(() => {
1477
+ wr.current = !0;
1458
1478
  }, []), c(() => {
1459
1479
  let e = (e) => {
1460
- e.key === "Escape" && ti.current !== "none" && (e.preventDefault(), K("none"));
1480
+ e.key === "Escape" && ii.current !== "none" && (e.preventDefault(), K("none"));
1461
1481
  };
1462
1482
  return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
1463
1483
  }, []);
1464
- let Ai = q ? !(wr?.isPaused ?? !0) : Zt, $ = q ? wr?.currentTime ?? 0 : L, ji = q ? wr?.duration ?? 0 : B, Mi = q ? wr?.volumeLevel ?? 1 : nn, Ni = q ? wr?.isMuted ?? !1 : an, Pi = o((e) => {
1465
- if (Y || Yr || e.target.closest(".sdk-mobile-ctrl")) return;
1466
- let t = Date.now(), n = C.current?.getBoundingClientRect(), r = e.clientX - (n?.left ?? 0), i = Lt.current;
1484
+ let Ni = q ? !(Dr?.isPaused ?? !0) : en, $ = q ? Dr?.currentTime ?? 0 : L, Pi = q ? Dr?.duration ?? 0 : B, Fi = q ? Dr?.volumeLevel ?? 1 : on, Ii = q ? Dr?.isMuted ?? !1 : cn, Li = o((e) => {
1485
+ if (Y || Qr || e.target.closest(".sdk-mobile-ctrl")) return;
1486
+ let t = Date.now(), n = C.current?.getBoundingClientRect(), r = e.clientX - (n?.left ?? 0), i = Bt.current;
1467
1487
  if (i && t - i.time < 300) {
1468
- Lt.current = null;
1488
+ Bt.current = null;
1469
1489
  let e = r < (n?.width ?? 0) / 2, t = e ? -10 : 10;
1470
1490
  Z(H(Math.max(0, Math.min(B, V($) + t))), {
1471
1491
  eventType: e ? "fast_backward" : "fast_forward",
1472
1492
  skipSeconds: 10
1473
- }), zt(e ? "left" : "right"), window.setTimeout(() => zt(null), 700), ri();
1474
- } else Lt.current = {
1493
+ }), Ht(e ? "left" : "right"), window.setTimeout(() => Ht(null), 700), oi();
1494
+ } else Bt.current = {
1475
1495
  time: t,
1476
1496
  x: r
1477
- }, Kr ? (qr(!1), Qr.current && window.clearTimeout(Qr.current)) : ri();
1497
+ }, Yr ? (Xr(!1), ti.current && window.clearTimeout(ti.current)) : oi();
1478
1498
  }, [
1479
1499
  Y,
1480
- Yr,
1500
+ Qr,
1481
1501
  B,
1482
1502
  V,
1483
1503
  $,
1484
1504
  H,
1485
1505
  Z,
1486
- Kr
1487
- ]), Fi = () => f(Ni || Mi === 0 ? Oe : Mi < .3 ? ke : Mi < .7 ? Ee : De, { size: 18 }), Ii = (e) => (t) => {
1506
+ Yr
1507
+ ]), Ri = () => f(Ii || Fi === 0 ? De : Fi < .3 ? Oe : Fi < .7 ? Te : Ee, { size: 18 }), zi = (e) => (t) => {
1488
1508
  t.key === "Enter" || t.key === " " ? (t.preventDefault(), e()) : t.key === "Escape" && (t.preventDefault(), K("none"));
1489
- }, Li = (e) => (t) => {
1509
+ }, Bi = (e) => (t) => {
1490
1510
  (t.key === "Enter" || t.key === " ") && (t.preventDefault(), e());
1491
- }, Ri = (e) => {
1492
- if (!(Y || Yr)) if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
1511
+ }, Vi = (e) => {
1512
+ if (!(Y || Qr)) if (e.key === "ArrowLeft" || e.key === "ArrowRight") {
1493
1513
  e.preventDefault();
1494
1514
  let t = e.key === "ArrowLeft" ? -5 : 5;
1495
1515
  Z(H(Math.max(0, Math.min(B, V($) + t))));
1496
1516
  } else e.key === "Home" ? (e.preventDefault(), Z(H(0))) : e.key === "End" && (e.preventDefault(), Z(H(B)));
1497
- }, zi = (e) => {
1517
+ }, Hi = (e) => {
1498
1518
  K(G === e ? "none" : e);
1499
- }, Bi = o((e) => {
1519
+ }, Ui = o((e) => {
1500
1520
  if (!e) return;
1501
1521
  e.style.left = "";
1502
1522
  let t = C.current;
@@ -1507,19 +1527,19 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1507
1527
  return /* @__PURE__ */ p("div", {
1508
1528
  ref: C,
1509
1529
  role: "region",
1510
- "aria-label": x || Wr ? `${x || Wr} video player` : "Video player",
1511
- className: `sdk-player-container ${Kr ? "controls-active" : ""} ${dn ? "sdk-fs-simulated" : ""}`,
1512
- onMouseMove: ai,
1513
- onTouchStart: hn ? void 0 : ri,
1530
+ "aria-label": x || qr ? `${x || qr} video player` : "Video player",
1531
+ className: `sdk-player-container ${Yr ? "controls-active" : ""} ${mn ? "sdk-fs-simulated" : ""}`,
1532
+ onMouseMove: ci,
1533
+ onTouchStart: vn ? void 0 : oi,
1514
1534
  onMouseLeave: () => {},
1515
1535
  style: {
1516
- border: dn ? "none" : "1px solid rgba(255, 255, 255, 0.08)",
1517
- "--sdk-theme-color": m,
1518
- "--sdk-theme-color-rgb": Le(m)
1536
+ border: mn ? "none" : "1px solid rgba(255, 255, 255, 0.08)",
1537
+ "--sdk-theme-color": h,
1538
+ "--sdk-theme-color-rgb": Fe(h)
1519
1539
  },
1520
1540
  children: [
1521
1541
  /* @__PURE__ */ f("canvas", {
1522
- ref: pt,
1542
+ ref: ht,
1523
1543
  width: 160,
1524
1544
  height: 90,
1525
1545
  style: {
@@ -1534,7 +1554,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1534
1554
  "aria-live": "polite",
1535
1555
  "aria-atomic": "true",
1536
1556
  className: "sdk-sr-only",
1537
- children: _r
1557
+ children: br
1538
1558
  }),
1539
1559
  /* @__PURE__ */ f("div", {
1540
1560
  ref: A,
@@ -1549,10 +1569,10 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1549
1569
  },
1550
1570
  "aria-hidden": "true"
1551
1571
  }),
1552
- vn && /* @__PURE__ */ p("div", {
1572
+ xn && /* @__PURE__ */ p("div", {
1553
1573
  className: "sdk-pip-placeholder",
1554
1574
  "aria-hidden": "true",
1555
- children: [/* @__PURE__ */ f(Se, {
1575
+ children: [/* @__PURE__ */ f(xe, {
1556
1576
  size: 32,
1557
1577
  "aria-hidden": "true"
1558
1578
  }), /* @__PURE__ */ f("span", { children: "Playing in Picture-in-Picture" })]
@@ -1560,7 +1580,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1560
1580
  /* @__PURE__ */ f("div", {
1561
1581
  ref: M,
1562
1582
  style: {
1563
- opacity: st && st > 0 ? 1 : 0,
1583
+ opacity: lt && lt > 0 ? 1 : 0,
1564
1584
  position: "absolute",
1565
1585
  inset: 0,
1566
1586
  background: "#000",
@@ -1571,11 +1591,11 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1571
1591
  "aria-hidden": "true"
1572
1592
  }),
1573
1593
  /* @__PURE__ */ f("div", {
1574
- className: `sdk-spinner-overlay ${sn ? "active" : ""}`,
1594
+ className: `sdk-spinner-overlay ${un ? "active" : ""}`,
1575
1595
  "aria-hidden": "true",
1576
1596
  children: /* @__PURE__ */ f("div", { className: "sdk-spinner" })
1577
1597
  }),
1578
- qt && /* @__PURE__ */ f("div", {
1598
+ Xt && /* @__PURE__ */ f("div", {
1579
1599
  style: {
1580
1600
  position: "absolute",
1581
1601
  inset: 0,
@@ -1589,10 +1609,10 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1589
1609
  padding: "0 24px"
1590
1610
  },
1591
1611
  children: /* @__PURE__ */ f(re, { onRetry: () => {
1592
- Jt(!1), Xt((e) => e + 1);
1612
+ Zt(!1), $t((e) => e + 1);
1593
1613
  } })
1594
1614
  }),
1595
- yr && /* @__PURE__ */ f("div", {
1615
+ Sr && /* @__PURE__ */ f("div", {
1596
1616
  style: {
1597
1617
  position: "absolute",
1598
1618
  top: "50%",
@@ -1611,24 +1631,24 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1611
1631
  backdropFilter: "blur(8px)",
1612
1632
  border: "1px solid rgba(255,255,255,0.12)"
1613
1633
  },
1614
- children: yr
1634
+ children: Sr
1615
1635
  }),
1616
- I.enableSubtitles && !Y && $n && U !== "off" && /* @__PURE__ */ f("div", {
1636
+ I.enableSubtitles && !Y && nr && U !== "off" && /* @__PURE__ */ f("div", {
1617
1637
  className: "sdk-subtitles-overlay",
1618
1638
  children: /* @__PURE__ */ f("span", {
1619
1639
  className: "sdk-subtitles-text",
1620
1640
  style: {
1621
- fontSize: Je.size === "small" ? "14px" : Je.size === "large" ? "24px" : "18px",
1622
- color: Je.color ?? "#ffffff",
1623
- background: Je.background === "none" ? "transparent" : Je.background === "solid" ? "rgba(0, 0, 0, 0.92)" : "rgba(15, 23, 42, 0.78)",
1624
- border: Je.background === "none" ? "none" : "1px solid rgba(255,255,255,0.08)",
1625
- backdropFilter: Je.background === "none" ? "none" : "blur(8px)"
1641
+ fontSize: Xe.size === "small" ? "14px" : Xe.size === "large" ? "24px" : "18px",
1642
+ color: Xe.color ?? "#ffffff",
1643
+ background: Xe.background === "none" ? "transparent" : Xe.background === "solid" ? "rgba(0, 0, 0, 0.92)" : "rgba(15, 23, 42, 0.78)",
1644
+ border: Xe.background === "none" ? "none" : "1px solid rgba(255,255,255,0.08)",
1645
+ backdropFilter: Xe.background === "none" ? "none" : "blur(8px)"
1626
1646
  },
1627
- dangerouslySetInnerHTML: { __html: $n }
1647
+ dangerouslySetInnerHTML: { __html: nr }
1628
1648
  })
1629
1649
  }),
1630
- In && /* @__PURE__ */ p("div", {
1631
- className: `sdk-overlay-ad sdk-overlay-ad--${In.position}`,
1650
+ zn && /* @__PURE__ */ p("div", {
1651
+ className: `sdk-overlay-ad sdk-overlay-ad--${zn.position}`,
1632
1652
  role: "complementary",
1633
1653
  "aria-label": "Advertisement",
1634
1654
  children: [/* @__PURE__ */ p("div", {
@@ -1636,23 +1656,23 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1636
1656
  children: [/* @__PURE__ */ f("span", {
1637
1657
  className: "sdk-overlay-ad-label",
1638
1658
  children: "Ad"
1639
- }), In.dismissible && /* @__PURE__ */ f("button", {
1659
+ }), zn.dismissible && /* @__PURE__ */ f("button", {
1640
1660
  className: "sdk-overlay-ad-close",
1641
- onClick: xi,
1661
+ onClick: wi,
1642
1662
  "aria-label": "Close advertisement",
1643
1663
  children: "✕"
1644
1664
  })]
1645
1665
  }), /* @__PURE__ */ f("img", {
1646
- src: In.imageUrl,
1647
- width: In.imageWidth,
1648
- height: In.imageHeight,
1649
- alt: In.title || "Advertisement",
1666
+ src: zn.imageUrl,
1667
+ width: zn.imageWidth,
1668
+ height: zn.imageHeight,
1669
+ alt: zn.title || "Advertisement",
1650
1670
  className: "sdk-overlay-ad-img",
1651
- onClick: () => Si(In)
1671
+ onClick: () => Ti(zn)
1652
1672
  })]
1653
1673
  }),
1654
1674
  Y && (() => {
1655
- let e = Vn.find((e) => L >= e.startTimeSeconds && L < e.endTimeSeconds), t = R.find((e) => L >= e.startTime && L < e.endTime), n = e ? Math.max(0, e.endTimeSeconds - L) : t ? Math.max(0, t.endTime - L) : 0, r = e ? L - e.startTimeSeconds : t ? L - t.startTime : 0, i = !!e && e.podTotal > 1, a = e ? e.skippable : tt, o = e ? e.skipOffsetSeconds : nt, s = a && r >= o, c = Math.ceil(o - r);
1675
+ let e = Wn.find((e) => L >= e.startTimeSeconds && L < e.endTimeSeconds), t = R.find((e) => L >= e.startTime && L < e.endTime), n = e ? Math.max(0, e.endTimeSeconds - L) : t ? Math.max(0, t.endTime - L) : 0, r = e ? L - e.startTimeSeconds : t ? L - t.startTime : 0, i = !!e && e.podTotal > 1, a = e ? e.skippable : rt, o = e ? e.skipOffsetSeconds : it, s = a && r >= o, c = Math.ceil(o - r);
1656
1676
  return /* @__PURE__ */ p(te, { children: [
1657
1677
  /* @__PURE__ */ p("div", {
1658
1678
  className: "sdk-ad-countdown",
@@ -1679,7 +1699,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1679
1699
  }),
1680
1700
  a && /* @__PURE__ */ f("button", {
1681
1701
  className: `sdk-skip-ad-btn ${s ? "sdk-skip-ad-btn--ready" : ""}`,
1682
- onClick: s ? bi : void 0,
1702
+ onClick: s ? Ci : void 0,
1683
1703
  disabled: !s,
1684
1704
  "aria-label": s ? "Skip advertisement" : `Skip advertisement available in ${c} seconds`,
1685
1705
  "aria-disabled": !s,
@@ -1688,12 +1708,12 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1688
1708
  e?.cta && (() => {
1689
1709
  let t = e.cta, n = /* @__PURE__ */ p("button", {
1690
1710
  className: "sdk-ad-cta-btn",
1691
- onClick: () => Ci(t),
1711
+ onClick: () => Ei(t),
1692
1712
  "aria-label": `${t.text} — opens advertiser site in a new tab`,
1693
1713
  children: [/* @__PURE__ */ f("span", {
1694
1714
  className: "sdk-ad-cta-btn-text",
1695
1715
  children: t.text
1696
- }), /* @__PURE__ */ f(ge, {
1716
+ }), /* @__PURE__ */ f(he, {
1697
1717
  size: 15,
1698
1718
  "aria-hidden": "true"
1699
1719
  })]
@@ -1719,7 +1739,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1719
1739
  })()
1720
1740
  ] });
1721
1741
  })(),
1722
- Kt && /* @__PURE__ */ f("div", {
1742
+ Yt && /* @__PURE__ */ f("div", {
1723
1743
  style: {
1724
1744
  position: "absolute",
1725
1745
  inset: 0,
@@ -1745,35 +1765,35 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1745
1765
  })]
1746
1766
  })
1747
1767
  }),
1748
- (q || kr) && /* @__PURE__ */ f("div", { className: "sdk-cast-bg" }),
1749
- hn && /* @__PURE__ */ p("div", {
1750
- className: `sdk-mobile-overlay ${Kr ? "active" : ""}`,
1751
- onClick: Pi,
1752
- children: [Rt && /* @__PURE__ */ f("div", {
1753
- className: `sdk-mobile-doubletap ${Rt}`,
1768
+ (q || Mr) && /* @__PURE__ */ f("div", { className: "sdk-cast-bg" }),
1769
+ vn && /* @__PURE__ */ p("div", {
1770
+ className: `sdk-mobile-overlay ${Yr ? "active" : ""}`,
1771
+ onClick: Li,
1772
+ children: [Vt && /* @__PURE__ */ f("div", {
1773
+ className: `sdk-mobile-doubletap ${Vt}`,
1754
1774
  children: /* @__PURE__ */ p("div", {
1755
1775
  className: "sdk-mobile-doubletap-icon",
1756
- children: [f(Rt === "left" ? we : Te, { size: 26 }), /* @__PURE__ */ f("span", {
1776
+ children: [f(Vt === "left" ? Ce : we, { size: 26 }), /* @__PURE__ */ f("span", {
1757
1777
  className: "sdk-mobile-doubletap-label",
1758
1778
  children: "10s"
1759
1779
  })]
1760
1780
  })
1761
- }), h && /* @__PURE__ */ p(te, { children: [
1781
+ }), g && /* @__PURE__ */ p(te, { children: [
1762
1782
  /* @__PURE__ */ p("div", {
1763
1783
  className: "sdk-mobile-header sdk-mobile-ctrl",
1764
1784
  children: [/* @__PURE__ */ p("div", {
1765
1785
  className: "sdk-mobile-header-left",
1766
- children: [(ln || dn) && /* @__PURE__ */ f("button", {
1786
+ children: [(fn || mn) && /* @__PURE__ */ f("button", {
1767
1787
  className: "sdk-mobile-back-btn",
1768
- onClick: yi,
1788
+ onClick: Si,
1769
1789
  "aria-label": "Exit fullscreen",
1770
- children: /* @__PURE__ */ f(he, {
1790
+ children: /* @__PURE__ */ f(me, {
1771
1791
  size: 22,
1772
1792
  "aria-hidden": "true"
1773
1793
  })
1774
- }), (x || Wr) && /* @__PURE__ */ f("div", {
1794
+ }), (x || qr) && /* @__PURE__ */ f("div", {
1775
1795
  className: "sdk-mobile-title",
1776
- children: x || Wr
1796
+ children: x || qr
1777
1797
  })]
1778
1798
  }), /* @__PURE__ */ p("div", {
1779
1799
  className: "sdk-mobile-header-actions",
@@ -1781,36 +1801,36 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1781
1801
  I.enablePiP && /* @__PURE__ */ f("button", {
1782
1802
  className: "sdk-mobile-hdr-btn",
1783
1803
  onClick: () => {
1784
- Y || _i();
1804
+ Y || bi();
1785
1805
  },
1786
- style: { color: gn ? m : "" },
1787
- "aria-label": gn ? "Exit picture-in-picture" : "Enter picture-in-picture",
1788
- "aria-pressed": gn,
1789
- children: /* @__PURE__ */ f(Se, {
1806
+ style: { color: yn ? h : "" },
1807
+ "aria-label": yn ? "Exit picture-in-picture" : "Enter picture-in-picture",
1808
+ "aria-pressed": yn,
1809
+ children: /* @__PURE__ */ f(xe, {
1790
1810
  size: 20,
1791
1811
  "aria-hidden": "true"
1792
1812
  })
1793
1813
  }),
1794
1814
  I.enableChromecast && !Y && /* @__PURE__ */ f("button", {
1795
1815
  className: "sdk-mobile-hdr-btn",
1796
- onClick: wi,
1816
+ onClick: Di,
1797
1817
  "data-tooltip": q ? `Casting to ${q} — tap to disconnect` : "Cast to device",
1798
1818
  "aria-label": q ? `Stop casting to ${q}` : "Cast to device",
1799
1819
  "aria-pressed": !!q,
1800
1820
  style: { color: q ? "#3b82f6" : "" },
1801
- children: /* @__PURE__ */ f(me, {
1821
+ children: /* @__PURE__ */ f(pe, {
1802
1822
  size: 20,
1803
1823
  fill: q ? "currentColor" : "none",
1804
1824
  "aria-hidden": "true"
1805
1825
  })
1806
1826
  }),
1807
- I.allowAirplay && Dr && /* @__PURE__ */ f("button", {
1827
+ I.allowAirplay && Ar && /* @__PURE__ */ f("button", {
1808
1828
  className: "sdk-mobile-hdr-btn",
1809
- onClick: Ti,
1810
- "aria-label": kr ? `Stop AirPlay to ${jr || "device"}` : "AirPlay to device",
1811
- "aria-pressed": kr,
1812
- style: { color: kr ? m : "" },
1813
- children: /* @__PURE__ */ f(fe, {
1829
+ onClick: Oi,
1830
+ "aria-label": Mr ? `Stop AirPlay to ${Pr || "device"}` : "AirPlay to device",
1831
+ "aria-pressed": Mr,
1832
+ style: { color: Mr ? h : "" },
1833
+ children: /* @__PURE__ */ f(de, {
1814
1834
  size: 20,
1815
1835
  "aria-hidden": "true"
1816
1836
  })
@@ -1828,7 +1848,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1828
1848
  skipSeconds: 10
1829
1849
  }),
1830
1850
  "aria-label": "Rewind 10 seconds",
1831
- children: [/* @__PURE__ */ f(we, {
1851
+ children: [/* @__PURE__ */ f(Ce, {
1832
1852
  size: 22,
1833
1853
  "aria-hidden": "true"
1834
1854
  }), /* @__PURE__ */ f("span", {
@@ -1839,16 +1859,16 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1839
1859
  }),
1840
1860
  /* @__PURE__ */ f("button", {
1841
1861
  className: "sdk-mobile-play-btn",
1842
- onClick: si,
1843
- "aria-label": bn ? "Replay" : Ai ? "Pause" : "Play",
1844
- children: bn ? /* @__PURE__ */ f(we, {
1862
+ onClick: ui,
1863
+ "aria-label": Cn ? "Replay" : Ni ? "Pause" : "Play",
1864
+ children: Cn ? /* @__PURE__ */ f(Ce, {
1845
1865
  size: 38,
1846
1866
  "aria-hidden": "true"
1847
- }) : Ai ? /* @__PURE__ */ f(_, {
1867
+ }) : Ni ? /* @__PURE__ */ f(v, {
1848
1868
  size: 38,
1849
1869
  fill: "currentColor",
1850
1870
  "aria-hidden": "true"
1851
- }) : /* @__PURE__ */ f(Ce, {
1871
+ }) : /* @__PURE__ */ f(Se, {
1852
1872
  size: 38,
1853
1873
  fill: "currentColor",
1854
1874
  style: { marginLeft: "3px" },
@@ -1862,7 +1882,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1862
1882
  skipSeconds: 10
1863
1883
  }),
1864
1884
  "aria-label": "Skip forward 10 seconds",
1865
- children: [/* @__PURE__ */ f(Te, {
1885
+ children: [/* @__PURE__ */ f(we, {
1866
1886
  size: 22,
1867
1887
  "aria-hidden": "true"
1868
1888
  }), /* @__PURE__ */ f("span", {
@@ -1876,25 +1896,25 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1876
1896
  /* @__PURE__ */ p("div", {
1877
1897
  className: "sdk-mobile-bottom-bar sdk-mobile-ctrl",
1878
1898
  children: [
1879
- I.enableKeyMoments && pr && W.length > 0 && /* @__PURE__ */ f("div", {
1899
+ I.enableKeyMoments && gr && W.length > 0 && /* @__PURE__ */ f("div", {
1880
1900
  className: "sdk-mobile-chapters-scroll",
1881
1901
  children: W.map((e, t) => {
1882
- let n = cr.index === t;
1902
+ let n = dr.index === t;
1883
1903
  return /* @__PURE__ */ p("div", {
1884
1904
  role: "button",
1885
1905
  tabIndex: 0,
1886
1906
  className: `sdk-mobile-chapter-card${n ? " active" : ""}`,
1887
- style: { borderColor: n ? m : void 0 },
1907
+ style: { borderColor: n ? h : void 0 },
1888
1908
  "aria-label": `${e.title}, ${Q(e.startTime)}${n ? ", current chapter" : ""}`,
1889
1909
  "aria-current": n ? "true" : void 0,
1890
1910
  onClick: () => {
1891
- hi(e.startTime, e);
1911
+ vi(e.startTime, e);
1892
1912
  },
1893
- onKeyDown: Li(() => hi(e.startTime, e)),
1913
+ onKeyDown: Bi(() => vi(e.startTime, e)),
1894
1914
  children: [/* @__PURE__ */ p("div", {
1895
1915
  className: "sdk-mobile-chapter-thumb",
1896
- children: [hr[t] || e.thumbnail ? /* @__PURE__ */ f("img", {
1897
- src: hr[t] || e.thumbnail,
1916
+ children: [vr[t] || e.thumbnail ? /* @__PURE__ */ f("img", {
1917
+ src: vr[t] || e.thumbnail,
1898
1918
  alt: "",
1899
1919
  "aria-hidden": "true",
1900
1920
  style: {
@@ -1903,10 +1923,10 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1903
1923
  objectFit: "cover",
1904
1924
  display: "block"
1905
1925
  }
1906
- }) : /* @__PURE__ */ f(ye, {
1926
+ }) : /* @__PURE__ */ f(ve, {
1907
1927
  size: 16,
1908
1928
  "aria-hidden": "true",
1909
- style: { color: n ? m : "rgba(255,255,255,0.3)" }
1929
+ style: { color: n ? h : "rgba(255,255,255,0.3)" }
1910
1930
  }), /* @__PURE__ */ f("span", {
1911
1931
  className: "sdk-mobile-chapter-time-badge",
1912
1932
  "aria-hidden": "true",
@@ -1914,7 +1934,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1914
1934
  })]
1915
1935
  }), /* @__PURE__ */ f("div", {
1916
1936
  className: "sdk-mobile-chapter-title",
1917
- style: { color: n ? m : void 0 },
1937
+ style: { color: n ? h : void 0 },
1918
1938
  children: e.title
1919
1939
  })]
1920
1940
  }, t);
@@ -1930,11 +1950,11 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1930
1950
  "aria-valuetext": X ? void 0 : `${Q(V(J === null ? L : J))} of ${Q(B)}`,
1931
1951
  tabIndex: X ? void 0 : 0,
1932
1952
  className: `sdk-seekbar-container sdk-mobile-seekbar${Y ? " sdk-ad-mode" : ""}`,
1933
- onMouseDown: X ? void 0 : li,
1934
- onMouseMove: X ? void 0 : Ei,
1935
- onMouseLeave: X ? void 0 : ki,
1936
- onTouchStart: X ? void 0 : Oi,
1937
- onKeyDown: X ? void 0 : Ri,
1953
+ onMouseDown: X ? void 0 : fi,
1954
+ onMouseMove: X ? void 0 : ki,
1955
+ onMouseLeave: X ? void 0 : Mi,
1956
+ onTouchStart: X ? void 0 : ji,
1957
+ onKeyDown: X ? void 0 : Vi,
1938
1958
  style: {
1939
1959
  pointerEvents: X ? "none" : void 0,
1940
1960
  touchAction: "none"
@@ -1942,15 +1962,15 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1942
1962
  children: Y ? /* @__PURE__ */ f("div", {
1943
1963
  className: "sdk-ad-progress-fill",
1944
1964
  style: { width: (() => {
1945
- let e = F ? F.getCurrentTime() : L, t = Kn(e);
1965
+ let e = F ? F.getCurrentTime() : L, t = Yn(e);
1946
1966
  return t ? `${Math.min(100, Math.max(0, (e - t.start) / (t.end - t.start) * 100))}%` : "0%";
1947
1967
  })() }
1948
1968
  }) : /* @__PURE__ */ p(te, { children: [
1949
1969
  /* @__PURE__ */ f("div", {
1950
1970
  className: "sdk-seekbar-buffered",
1951
- style: { width: `${en ? (F && F.getBufferedRanges()[0]?.end || 0) / en * 100 : 0}%` }
1971
+ style: { width: `${rn ? (F && F.getBufferedRanges()[0]?.end || 0) / rn * 100 : 0}%` }
1952
1972
  }),
1953
- B > 0 && R.filter((e) => !Tn.has(e.startTime)).map((e, t) => /* @__PURE__ */ f("div", {
1973
+ B > 0 && R.filter((e) => !On.has(e.startTime)).map((e, t) => /* @__PURE__ */ f("div", {
1954
1974
  className: "sdk-seekbar-adbreak",
1955
1975
  style: {
1956
1976
  left: `${V(e.startTime) / B * 100}%`,
@@ -1960,7 +1980,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1960
1980
  /* @__PURE__ */ f("div", {
1961
1981
  className: "sdk-seekbar-progress",
1962
1982
  style: {
1963
- width: q ? `${ji > 0 ? $ / ji * 100 : 0}%` : `${B ? V(J === null ? L : J) / B * 100 : 0}%`,
1983
+ width: q ? `${Pi > 0 ? $ / Pi * 100 : 0}%` : `${B ? V(J === null ? L : J) / B * 100 : 0}%`,
1964
1984
  background: "#ffffff",
1965
1985
  boxShadow: "none"
1966
1986
  },
@@ -1982,38 +2002,38 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
1982
2002
  className: "sdk-mobile-controls-row",
1983
2003
  children: [!Y && /* @__PURE__ */ f("span", {
1984
2004
  className: "sdk-time-display",
1985
- children: q ? `${Q($)} / ${Q(ji)}` : `${Q(V(J === null ? L : J))} / ${Q(B)}`
2005
+ children: q ? `${Q($)} / ${Q(Pi)}` : `${Q(V(J === null ? L : J))} / ${Q(B)}`
1986
2006
  }), /* @__PURE__ */ p("div", {
1987
2007
  className: "sdk-mobile-bottom-icons",
1988
2008
  children: [
1989
2009
  I.enableKeyMoments && W.length > 0 && !Y && /* @__PURE__ */ f("button", {
1990
- className: `sdk-mobile-icon-btn${pr ? " active" : ""}`,
2010
+ className: `sdk-mobile-icon-btn${gr ? " active" : ""}`,
1991
2011
  onClick: () => {
1992
- mr(!pr);
2012
+ _r(!gr);
1993
2013
  },
1994
- "aria-label": pr ? "Hide chapters" : "Show chapters",
1995
- "aria-pressed": pr,
1996
- children: /* @__PURE__ */ f(ye, {
2014
+ "aria-label": gr ? "Hide chapters" : "Show chapters",
2015
+ "aria-pressed": gr,
2016
+ children: /* @__PURE__ */ f(ve, {
1997
2017
  size: 18,
1998
2018
  "aria-hidden": "true"
1999
2019
  })
2000
2020
  }),
2001
- I.enableSubtitles && !Y && nr.some((e) => !e.isNative) && /* @__PURE__ */ p("div", {
2021
+ I.enableSubtitles && !Y && ar.some((e) => !e.isNative) && /* @__PURE__ */ p("div", {
2002
2022
  className: "sdk-menu-container",
2003
2023
  children: [/* @__PURE__ */ f("button", {
2004
2024
  className: `sdk-mobile-icon-btn${U === "off" ? "" : " active"}`,
2005
2025
  onClick: () => {
2006
- zi("subtitles");
2026
+ Hi("subtitles");
2007
2027
  },
2008
2028
  "aria-label": "Captions",
2009
2029
  "aria-haspopup": "listbox",
2010
2030
  "aria-expanded": G === "subtitles",
2011
- children: /* @__PURE__ */ f(pe, {
2031
+ children: /* @__PURE__ */ f(fe, {
2012
2032
  size: 18,
2013
2033
  "aria-hidden": "true"
2014
2034
  })
2015
2035
  }), G === "subtitles" && /* @__PURE__ */ p("div", {
2016
- ref: Bi,
2036
+ ref: Ui,
2017
2037
  className: "sdk-dropup-menu",
2018
2038
  role: "listbox",
2019
2039
  "aria-label": "Captions",
@@ -2028,21 +2048,21 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2028
2048
  "aria-selected": U === "off",
2029
2049
  tabIndex: 0,
2030
2050
  className: `sdk-dropup-item ${U === "off" ? "active" : ""}`,
2031
- onClick: () => pi("off"),
2032
- onKeyDown: Ii(() => pi("off")),
2033
- children: [/* @__PURE__ */ f("span", { children: "Off" }), U === "off" && /* @__PURE__ */ f(g, {
2051
+ onClick: () => gi("off"),
2052
+ onKeyDown: zi(() => gi("off")),
2053
+ children: [/* @__PURE__ */ f("span", { children: "Off" }), U === "off" && /* @__PURE__ */ f(_, {
2034
2054
  size: 12,
2035
2055
  "aria-hidden": "true"
2036
2056
  })]
2037
2057
  }),
2038
- nr.map((e) => /* @__PURE__ */ p("div", {
2058
+ ar.map((e) => /* @__PURE__ */ p("div", {
2039
2059
  role: "option",
2040
2060
  "aria-selected": U === e.id,
2041
2061
  tabIndex: 0,
2042
2062
  className: `sdk-dropup-item ${U === e.id ? "active" : ""}`,
2043
- onClick: () => pi(e.id),
2044
- onKeyDown: Ii(() => pi(e.id)),
2045
- children: [/* @__PURE__ */ f("span", { children: y(e) }), U === e.id && /* @__PURE__ */ f(g, {
2063
+ onClick: () => gi(e.id),
2064
+ onKeyDown: zi(() => gi(e.id)),
2065
+ children: [/* @__PURE__ */ f("span", { children: b(e) }), U === e.id && /* @__PURE__ */ f(_, {
2046
2066
  size: 12,
2047
2067
  "aria-hidden": "true"
2048
2068
  })]
@@ -2050,22 +2070,22 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2050
2070
  ]
2051
2071
  })]
2052
2072
  }),
2053
- I.allowMultipleAudio && ir.length > 1 && !Y && /* @__PURE__ */ p("div", {
2073
+ I.allowMultipleAudio && sr.length > 1 && !Y && /* @__PURE__ */ p("div", {
2054
2074
  className: "sdk-menu-container",
2055
2075
  children: [/* @__PURE__ */ f("button", {
2056
2076
  className: `sdk-mobile-icon-btn${G === "audio" ? " active" : ""}`,
2057
2077
  onClick: () => {
2058
- zi("audio");
2078
+ Hi("audio");
2059
2079
  },
2060
2080
  "aria-label": "Audio track",
2061
2081
  "aria-haspopup": "listbox",
2062
2082
  "aria-expanded": G === "audio",
2063
- children: /* @__PURE__ */ f(ve, {
2083
+ children: /* @__PURE__ */ f(_e, {
2064
2084
  size: 18,
2065
2085
  "aria-hidden": "true"
2066
2086
  })
2067
2087
  }), G === "audio" && /* @__PURE__ */ p("div", {
2068
- ref: Bi,
2088
+ ref: Ui,
2069
2089
  className: "sdk-dropup-menu",
2070
2090
  role: "listbox",
2071
2091
  "aria-label": "Audio track",
@@ -2073,18 +2093,18 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2073
2093
  className: "sdk-dropup-header",
2074
2094
  "aria-hidden": "true",
2075
2095
  children: "Audio Track"
2076
- }), ir.map((e) => /* @__PURE__ */ p("div", {
2096
+ }), sr.map((e) => /* @__PURE__ */ p("div", {
2077
2097
  role: "option",
2078
- "aria-selected": or === e.id,
2098
+ "aria-selected": lr === e.id,
2079
2099
  tabIndex: 0,
2080
- className: `sdk-dropup-item ${or === e.id ? "active" : ""}`,
2100
+ className: `sdk-dropup-item ${lr === e.id ? "active" : ""}`,
2081
2101
  onClick: () => {
2082
- F?.setAudioTrack(e.id), sr(e.id), K("none"), vr(`Audio: ${y(e)}`);
2102
+ F?.setAudioTrack(e.id), ur(e.id), K("none"), xr(`Audio: ${b(e)}`);
2083
2103
  },
2084
- onKeyDown: Ii(() => {
2085
- F?.setAudioTrack(e.id), sr(e.id), K("none"), vr(`Audio: ${y(e)}`);
2104
+ onKeyDown: zi(() => {
2105
+ F?.setAudioTrack(e.id), ur(e.id), K("none"), xr(`Audio: ${b(e)}`);
2086
2106
  }),
2087
- children: [/* @__PURE__ */ f("span", { children: y(e) }), or === e.id && /* @__PURE__ */ f(g, {
2107
+ children: [/* @__PURE__ */ f("span", { children: b(e) }), lr === e.id && /* @__PURE__ */ f(_, {
2088
2108
  size: 12,
2089
2109
  "aria-hidden": "true"
2090
2110
  })]
@@ -2096,17 +2116,17 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2096
2116
  children: [/* @__PURE__ */ f("button", {
2097
2117
  className: `sdk-mobile-icon-btn${G === "speed" ? " active" : ""}`,
2098
2118
  onClick: () => {
2099
- zi("speed");
2119
+ Hi("speed");
2100
2120
  },
2101
2121
  "aria-label": "Playback speed",
2102
2122
  "aria-haspopup": "listbox",
2103
2123
  "aria-expanded": G === "speed",
2104
- children: /* @__PURE__ */ f(_e, {
2124
+ children: /* @__PURE__ */ f(ge, {
2105
2125
  size: 18,
2106
2126
  "aria-hidden": "true"
2107
2127
  })
2108
2128
  }), G === "speed" && /* @__PURE__ */ p("div", {
2109
- ref: Bi,
2129
+ ref: Ui,
2110
2130
  className: "sdk-dropup-menu",
2111
2131
  role: "listbox",
2112
2132
  "aria-label": "Playback speed",
@@ -2123,12 +2143,12 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2123
2143
  2
2124
2144
  ].map((e) => /* @__PURE__ */ p("div", {
2125
2145
  role: "option",
2126
- "aria-selected": dr === e,
2146
+ "aria-selected": mr === e,
2127
2147
  tabIndex: 0,
2128
- className: `sdk-dropup-item ${dr === e ? "active" : ""}`,
2129
- onClick: () => di(e),
2130
- onKeyDown: Ii(() => di(e)),
2131
- children: [/* @__PURE__ */ f("span", { children: e === 1 ? "Normal" : `${e}x` }), dr === e && /* @__PURE__ */ f(g, {
2148
+ className: `sdk-dropup-item ${mr === e ? "active" : ""}`,
2149
+ onClick: () => mi(e),
2150
+ onKeyDown: zi(() => mi(e)),
2151
+ children: [/* @__PURE__ */ f("span", { children: e === 1 ? "Normal" : `${e}x` }), mr === e && /* @__PURE__ */ f(_, {
2132
2152
  size: 12,
2133
2153
  "aria-hidden": "true"
2134
2154
  })]
@@ -2138,19 +2158,19 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2138
2158
  I.enableQuality && !Y && /* @__PURE__ */ p("div", {
2139
2159
  className: "sdk-menu-container",
2140
2160
  children: [/* @__PURE__ */ f("button", {
2141
- className: `sdk-mobile-icon-btn${Zn.id === -1 ? "" : " active"}`,
2161
+ className: `sdk-mobile-icon-btn${er.id === -1 ? "" : " active"}`,
2142
2162
  onClick: () => {
2143
- zi("quality");
2163
+ Hi("quality");
2144
2164
  },
2145
2165
  "aria-label": "Video quality",
2146
2166
  "aria-haspopup": "listbox",
2147
2167
  "aria-expanded": G === "quality",
2148
- children: /* @__PURE__ */ f(Fe, {
2168
+ children: /* @__PURE__ */ f(Ne, {
2149
2169
  size: 18,
2150
2170
  "aria-hidden": "true"
2151
2171
  })
2152
2172
  }), G === "quality" && /* @__PURE__ */ p("div", {
2153
- ref: Bi,
2173
+ ref: Ui,
2154
2174
  className: "sdk-dropup-menu large",
2155
2175
  role: "listbox",
2156
2176
  "aria-label": "Video quality",
@@ -2158,14 +2178,14 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2158
2178
  className: "sdk-dropup-header",
2159
2179
  "aria-hidden": "true",
2160
2180
  children: "Quality"
2161
- }), Yn.map((e) => /* @__PURE__ */ p("div", {
2181
+ }), Qn.map((e) => /* @__PURE__ */ p("div", {
2162
2182
  role: "option",
2163
- "aria-selected": Zn.id === e.id,
2183
+ "aria-selected": er.id === e.id,
2164
2184
  tabIndex: 0,
2165
- className: `sdk-dropup-item ${Zn.id === e.id ? "active" : ""}`,
2166
- onClick: () => fi(e.id),
2167
- onKeyDown: Ii(() => fi(e.id)),
2168
- children: [/* @__PURE__ */ f("span", { children: e.label }), Zn.id === e.id && /* @__PURE__ */ f(g, {
2185
+ className: `sdk-dropup-item ${er.id === e.id ? "active" : ""}`,
2186
+ onClick: () => hi(e.id),
2187
+ onKeyDown: zi(() => hi(e.id)),
2188
+ children: [/* @__PURE__ */ f("span", { children: e.label }), er.id === e.id && /* @__PURE__ */ f(_, {
2169
2189
  size: 12,
2170
2190
  "aria-hidden": "true"
2171
2191
  })]
@@ -2177,17 +2197,17 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2177
2197
  children: [/* @__PURE__ */ f("button", {
2178
2198
  className: `sdk-mobile-icon-btn${G === "sources" ? " active" : ""}`,
2179
2199
  onClick: () => {
2180
- zi("sources");
2200
+ Hi("sources");
2181
2201
  },
2182
2202
  "aria-label": "Select source",
2183
2203
  "aria-haspopup": "listbox",
2184
2204
  "aria-expanded": G === "sources",
2185
- children: /* @__PURE__ */ f(Ie, {
2205
+ children: /* @__PURE__ */ f(Pe, {
2186
2206
  size: 18,
2187
2207
  "aria-hidden": "true"
2188
2208
  })
2189
2209
  }), G === "sources" && /* @__PURE__ */ p("div", {
2190
- ref: Bi,
2210
+ ref: Ui,
2191
2211
  className: "sdk-dropup-menu",
2192
2212
  role: "listbox",
2193
2213
  "aria-label": "Select source",
@@ -2197,12 +2217,12 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2197
2217
  children: "Source"
2198
2218
  }), S.map((e, t) => /* @__PURE__ */ p("div", {
2199
2219
  role: "option",
2200
- "aria-selected": at === t,
2220
+ "aria-selected": st === t,
2201
2221
  tabIndex: 0,
2202
- className: `sdk-dropup-item ${at === t ? "active" : ""}`,
2203
- onClick: () => mi(t),
2204
- onKeyDown: Ii(() => mi(t)),
2205
- children: [/* @__PURE__ */ f("span", { children: e.label }), at === t && /* @__PURE__ */ f(g, {
2222
+ className: `sdk-dropup-item ${st === t ? "active" : ""}`,
2223
+ onClick: () => _i(t),
2224
+ onKeyDown: zi(() => _i(t)),
2225
+ children: [/* @__PURE__ */ f("span", { children: e.label }), st === t && /* @__PURE__ */ f(_, {
2206
2226
  size: 12,
2207
2227
  "aria-hidden": "true"
2208
2228
  })]
@@ -2211,10 +2231,10 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2211
2231
  }),
2212
2232
  /* @__PURE__ */ f("button", {
2213
2233
  className: "sdk-mobile-icon-btn",
2214
- onClick: yi,
2215
- "aria-label": ln || dn ? "Exit fullscreen" : "Enter fullscreen",
2216
- "aria-pressed": ln || dn,
2217
- children: f(ln ? xe : be, {
2234
+ onClick: Si,
2235
+ "aria-label": fn || mn ? "Exit fullscreen" : "Enter fullscreen",
2236
+ "aria-pressed": fn || mn,
2237
+ children: f(fn ? be : ye, {
2218
2238
  size: 18,
2219
2239
  "aria-hidden": "true"
2220
2240
  })
@@ -2226,28 +2246,28 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2226
2246
  })
2227
2247
  ] })]
2228
2248
  }),
2229
- !hn && /* @__PURE__ */ p("div", {
2249
+ !vn && /* @__PURE__ */ p("div", {
2230
2250
  className: "sdk-controls-overlay",
2231
2251
  onClick: (e) => {
2232
- Y || e.target.closest(".sdk-desktop-header") || e.target.closest(".sdk-desktop-center-controls") || e.target.closest(".sdk-desktop-bottom") || si();
2252
+ Y || e.target.closest(".sdk-desktop-header") || e.target.closest(".sdk-desktop-center-controls") || e.target.closest(".sdk-desktop-bottom") || ui();
2233
2253
  },
2234
2254
  children: [/* @__PURE__ */ p("div", {
2235
2255
  className: "sdk-desktop-header",
2236
2256
  children: [/* @__PURE__ */ p("div", {
2237
2257
  className: "sdk-desktop-header-left",
2238
- children: [(ln || dn) && /* @__PURE__ */ f("button", {
2258
+ children: [(fn || mn) && /* @__PURE__ */ f("button", {
2239
2259
  className: "sdk-desktop-back-btn",
2240
2260
  onClick: (e) => {
2241
- e.stopPropagation(), yi();
2261
+ e.stopPropagation(), Si();
2242
2262
  },
2243
2263
  "aria-label": "Exit fullscreen",
2244
- children: /* @__PURE__ */ f(he, {
2264
+ children: /* @__PURE__ */ f(me, {
2245
2265
  size: 22,
2246
2266
  "aria-hidden": "true"
2247
2267
  })
2248
- }), (x || Wr) && /* @__PURE__ */ f("span", {
2268
+ }), (x || qr) && /* @__PURE__ */ f("span", {
2249
2269
  className: "sdk-desktop-title",
2250
- children: x || Wr
2270
+ children: x || qr
2251
2271
  })]
2252
2272
  }), /* @__PURE__ */ p("div", {
2253
2273
  className: "sdk-desktop-header-right",
@@ -2255,13 +2275,13 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2255
2275
  I.enableChromecast && !Y && /* @__PURE__ */ f("button", {
2256
2276
  className: "sdk-desktop-hdr-btn",
2257
2277
  onClick: (e) => {
2258
- e.stopPropagation(), wi();
2278
+ e.stopPropagation(), Di();
2259
2279
  },
2260
2280
  "data-tooltip": q ? `Casting to ${q} — click to disconnect` : "Cast to device",
2261
2281
  "aria-label": q ? `Stop casting to ${q}` : "Cast to device",
2262
2282
  "aria-pressed": !!q,
2263
2283
  style: { color: q ? "#3b82f6" : "" },
2264
- children: /* @__PURE__ */ f(me, {
2284
+ children: /* @__PURE__ */ f(pe, {
2265
2285
  size: 20,
2266
2286
  fill: q ? "currentColor" : "none",
2267
2287
  "aria-hidden": "true"
@@ -2270,29 +2290,29 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2270
2290
  q && /* @__PURE__ */ p("span", {
2271
2291
  className: "sdk-cast-indicator",
2272
2292
  "aria-hidden": "true",
2273
- children: [/* @__PURE__ */ f(me, {
2293
+ children: [/* @__PURE__ */ f(pe, {
2274
2294
  size: 10,
2275
2295
  fill: "currentColor",
2276
2296
  "aria-hidden": "true"
2277
2297
  }), q]
2278
2298
  }),
2279
- I.allowAirplay && Dr && /* @__PURE__ */ f("button", {
2299
+ I.allowAirplay && Ar && /* @__PURE__ */ f("button", {
2280
2300
  className: "sdk-desktop-hdr-btn",
2281
2301
  onClick: (e) => {
2282
- e.stopPropagation(), Ti();
2302
+ e.stopPropagation(), Oi();
2283
2303
  },
2284
- "data-tooltip": kr ? `AirPlay to ${jr || "device"} — click to disconnect` : "AirPlay to device",
2285
- "aria-label": kr ? `Stop AirPlay to ${jr || "device"}` : "AirPlay to device",
2286
- "aria-pressed": kr,
2287
- style: { color: kr ? m : "" },
2288
- children: /* @__PURE__ */ f(fe, {
2304
+ "data-tooltip": Mr ? `AirPlay to ${Pr || "device"} — click to disconnect` : "AirPlay to device",
2305
+ "aria-label": Mr ? `Stop AirPlay to ${Pr || "device"}` : "AirPlay to device",
2306
+ "aria-pressed": Mr,
2307
+ style: { color: Mr ? h : "" },
2308
+ children: /* @__PURE__ */ f(de, {
2289
2309
  size: 20,
2290
2310
  "aria-hidden": "true"
2291
2311
  })
2292
2312
  })
2293
2313
  ]
2294
2314
  })]
2295
- }), h && /* @__PURE__ */ p(te, { children: [
2315
+ }), g && /* @__PURE__ */ p(te, { children: [
2296
2316
  /* @__PURE__ */ p("div", {
2297
2317
  className: "sdk-desktop-center-controls",
2298
2318
  style: { pointerEvents: "none" },
@@ -2314,7 +2334,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2314
2334
  alignItems: "center",
2315
2335
  justifyContent: "center"
2316
2336
  },
2317
- children: [/* @__PURE__ */ f(we, {
2337
+ children: [/* @__PURE__ */ f(Ce, {
2318
2338
  size: 30,
2319
2339
  "aria-hidden": "true"
2320
2340
  }), /* @__PURE__ */ f("span", {
@@ -2328,17 +2348,17 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2328
2348
  className: "sdk-desktop-play-btn",
2329
2349
  style: { pointerEvents: "auto" },
2330
2350
  onClick: (e) => {
2331
- e.stopPropagation(), si();
2351
+ e.stopPropagation(), ui();
2332
2352
  },
2333
- "aria-label": bn ? "Replay" : Ai ? "Pause" : "Play",
2334
- children: bn ? /* @__PURE__ */ f(we, {
2353
+ "aria-label": Cn ? "Replay" : Ni ? "Pause" : "Play",
2354
+ children: Cn ? /* @__PURE__ */ f(Ce, {
2335
2355
  size: 38,
2336
2356
  "aria-hidden": "true"
2337
- }) : Ai ? /* @__PURE__ */ f(_, {
2357
+ }) : Ni ? /* @__PURE__ */ f(v, {
2338
2358
  size: 38,
2339
2359
  fill: "currentColor",
2340
2360
  "aria-hidden": "true"
2341
- }) : /* @__PURE__ */ f(Ce, {
2361
+ }) : /* @__PURE__ */ f(Se, {
2342
2362
  size: 38,
2343
2363
  fill: "currentColor",
2344
2364
  style: { marginLeft: "4px" },
@@ -2362,7 +2382,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2362
2382
  alignItems: "center",
2363
2383
  justifyContent: "center"
2364
2384
  },
2365
- children: [/* @__PURE__ */ f(Te, {
2385
+ children: [/* @__PURE__ */ f(we, {
2366
2386
  size: 30,
2367
2387
  "aria-hidden": "true"
2368
2388
  }), /* @__PURE__ */ f("span", {
@@ -2374,7 +2394,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2374
2394
  })
2375
2395
  ]
2376
2396
  }),
2377
- I.enableKeyMoments && pr && W.length > 0 && Ze === "panel" && /* @__PURE__ */ p("div", {
2397
+ I.enableKeyMoments && gr && W.length > 0 && $e === "panel" && /* @__PURE__ */ p("div", {
2378
2398
  className: "sdk-chapters-panel",
2379
2399
  onClick: (e) => e.stopPropagation(),
2380
2400
  children: [/* @__PURE__ */ f("div", {
@@ -2386,19 +2406,19 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2386
2406
  }), /* @__PURE__ */ f("div", {
2387
2407
  className: "sdk-chapters-panel-list",
2388
2408
  children: W.map((e, t) => {
2389
- let n = cr.index === t;
2409
+ let n = dr.index === t;
2390
2410
  return /* @__PURE__ */ p("div", {
2391
2411
  role: "button",
2392
2412
  tabIndex: 0,
2393
2413
  className: `sdk-chapters-panel-item${n ? " active" : ""}`,
2394
2414
  "aria-label": `${e.title}, ${Q(e.startTime)}${n ? ", current chapter" : ""}`,
2395
2415
  "aria-current": n ? "true" : void 0,
2396
- onClick: () => hi(e.startTime, e),
2397
- onKeyDown: Li(() => hi(e.startTime, e)),
2416
+ onClick: () => vi(e.startTime, e),
2417
+ onKeyDown: Bi(() => vi(e.startTime, e)),
2398
2418
  children: [/* @__PURE__ */ f("div", {
2399
2419
  className: "sdk-chapters-panel-thumb",
2400
- children: hr[t] || e.thumbnail ? /* @__PURE__ */ f("img", {
2401
- src: hr[t] || e.thumbnail,
2420
+ children: vr[t] || e.thumbnail ? /* @__PURE__ */ f("img", {
2421
+ src: vr[t] || e.thumbnail,
2402
2422
  alt: "",
2403
2423
  "aria-hidden": "true",
2404
2424
  style: {
@@ -2407,7 +2427,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2407
2427
  objectFit: "cover",
2408
2428
  display: "block"
2409
2429
  }
2410
- }) : /* @__PURE__ */ f(ye, {
2430
+ }) : /* @__PURE__ */ f(ve, {
2411
2431
  size: 18,
2412
2432
  "aria-hidden": "true",
2413
2433
  style: { color: "rgba(255,255,255,0.3)" }
@@ -2437,10 +2457,10 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2437
2457
  /* @__PURE__ */ p("div", {
2438
2458
  className: "sdk-desktop-bottom",
2439
2459
  children: [
2440
- I.enableKeyMoments && pr && W.length > 0 && Ze === "strip" && /* @__PURE__ */ f("div", {
2460
+ I.enableKeyMoments && gr && W.length > 0 && $e === "strip" && /* @__PURE__ */ f("div", {
2441
2461
  className: "sdk-desktop-chapters-strip",
2442
2462
  children: W.map((e, t) => {
2443
- let n = cr.index === t;
2463
+ let n = dr.index === t;
2444
2464
  return /* @__PURE__ */ p("div", {
2445
2465
  role: "button",
2446
2466
  tabIndex: 0,
@@ -2448,14 +2468,14 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2448
2468
  "aria-label": `${e.title}, ${Q(e.startTime)}${n ? ", current chapter" : ""}`,
2449
2469
  "aria-current": n ? "true" : void 0,
2450
2470
  onClick: (t) => {
2451
- t.stopPropagation(), hi(e.startTime, e);
2471
+ t.stopPropagation(), vi(e.startTime, e);
2452
2472
  },
2453
- onKeyDown: Li(() => hi(e.startTime, e)),
2473
+ onKeyDown: Bi(() => vi(e.startTime, e)),
2454
2474
  children: [
2455
2475
  /* @__PURE__ */ f("div", {
2456
2476
  className: "sdk-desktop-chapter-thumb",
2457
- children: hr[t] || e.thumbnail ? /* @__PURE__ */ f("img", {
2458
- src: hr[t] || e.thumbnail,
2477
+ children: vr[t] || e.thumbnail ? /* @__PURE__ */ f("img", {
2478
+ src: vr[t] || e.thumbnail,
2459
2479
  alt: "",
2460
2480
  "aria-hidden": "true",
2461
2481
  style: {
@@ -2464,7 +2484,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2464
2484
  objectFit: "cover",
2465
2485
  display: "block"
2466
2486
  }
2467
- }) : /* @__PURE__ */ f(ye, {
2487
+ }) : /* @__PURE__ */ f(ve, {
2468
2488
  size: 18,
2469
2489
  "aria-hidden": "true",
2470
2490
  style: { color: "rgba(255,255,255,0.35)" }
@@ -2493,24 +2513,24 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2493
2513
  "aria-valuetext": X ? void 0 : `${Q(V(J === null ? L : J))} of ${Q(B)}`,
2494
2514
  tabIndex: X ? void 0 : 0,
2495
2515
  className: `sdk-seekbar-container sdk-desktop-seekbar${Y ? " sdk-ad-mode" : ""}`,
2496
- onMouseDown: X ? void 0 : li,
2497
- onMouseMove: X ? void 0 : Ei,
2498
- onMouseLeave: X ? void 0 : ki,
2499
- onTouchStart: X ? void 0 : Oi,
2500
- onKeyDown: X ? void 0 : Ri,
2516
+ onMouseDown: X ? void 0 : fi,
2517
+ onMouseMove: X ? void 0 : ki,
2518
+ onMouseLeave: X ? void 0 : Mi,
2519
+ onTouchStart: X ? void 0 : ji,
2520
+ onKeyDown: X ? void 0 : Vi,
2501
2521
  style: { pointerEvents: X ? "none" : void 0 },
2502
2522
  children: Y ? /* @__PURE__ */ f("div", {
2503
2523
  className: "sdk-ad-progress-fill",
2504
2524
  style: { width: (() => {
2505
- let e = F ? F.getCurrentTime() : L, t = Kn(e);
2525
+ let e = F ? F.getCurrentTime() : L, t = Yn(e);
2506
2526
  return t ? `${Math.min(100, Math.max(0, (e - t.start) / (t.end - t.start) * 100))}%` : "0%";
2507
2527
  })() }
2508
2528
  }) : /* @__PURE__ */ p(te, { children: [
2509
2529
  /* @__PURE__ */ f("div", {
2510
2530
  className: "sdk-seekbar-buffered",
2511
- style: { width: `${en ? (F && F.getBufferedRanges()[0]?.end || 0) / en * 100 : 0}%` }
2531
+ style: { width: `${rn ? (F && F.getBufferedRanges()[0]?.end || 0) / rn * 100 : 0}%` }
2512
2532
  }),
2513
- B > 0 && R.filter((e) => !Tn.has(e.startTime)).map((e, t) => /* @__PURE__ */ f("div", {
2533
+ B > 0 && R.filter((e) => !On.has(e.startTime)).map((e, t) => /* @__PURE__ */ f("div", {
2514
2534
  className: "sdk-seekbar-adbreak",
2515
2535
  style: {
2516
2536
  left: `${V(e.startTime) / B * 100}%`,
@@ -2520,7 +2540,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2520
2540
  /* @__PURE__ */ f("div", {
2521
2541
  className: "sdk-seekbar-progress",
2522
2542
  style: {
2523
- width: q ? `${ji > 0 ? $ / ji * 100 : 0}%` : `${B ? V(J === null ? L : J) / B * 100 : 0}%`,
2543
+ width: q ? `${Pi > 0 ? $ / Pi * 100 : 0}%` : `${B ? V(J === null ? L : J) / B * 100 : 0}%`,
2524
2544
  background: "#ffffff",
2525
2545
  boxShadow: "none"
2526
2546
  },
@@ -2530,14 +2550,14 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2530
2550
  className: "sdk-seekbar-chapter-marker sdk-desktop-chapter-dot",
2531
2551
  style: { left: `${V(e.startTime) / B * 100}%` }
2532
2552
  }, t)),
2533
- Nr !== null && zr && /* @__PURE__ */ p("div", {
2553
+ Ir !== null && Hr && /* @__PURE__ */ p("div", {
2534
2554
  className: "sdk-thumbnail-tooltip",
2535
- style: { left: `${Fr}px` },
2555
+ style: { left: `${Rr}px` },
2536
2556
  children: [
2537
2557
  /* @__PURE__ */ f("div", {
2538
2558
  className: "sdk-thumbnail-preview",
2539
2559
  children: /* @__PURE__ */ f("img", {
2540
- src: zr,
2560
+ src: Hr,
2541
2561
  alt: "preview",
2542
2562
  style: {
2543
2563
  width: "100%",
@@ -2548,13 +2568,13 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2548
2568
  }
2549
2569
  })
2550
2570
  }),
2551
- Vr && /* @__PURE__ */ f("div", {
2571
+ Wr && /* @__PURE__ */ f("div", {
2552
2572
  className: "sdk-thumbnail-chapter-name",
2553
- children: Vr.title
2573
+ children: Wr.title
2554
2574
  }),
2555
2575
  /* @__PURE__ */ f("div", {
2556
2576
  className: "sdk-thumbnail-time-label",
2557
- children: Q(V(Lr))
2577
+ children: Q(V(Br))
2558
2578
  })
2559
2579
  ]
2560
2580
  })
@@ -2566,31 +2586,31 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2566
2586
  className: "sdk-desktop-left-controls",
2567
2587
  children: [!Y && /* @__PURE__ */ f("div", {
2568
2588
  className: "sdk-time-display",
2569
- children: q ? `${Q($)} / ${Q(ji)}` : `${Q(V(J === null ? L : J))} / ${Q(B)}`
2570
- }), Qe === "slider" && /* @__PURE__ */ p("div", {
2589
+ children: q ? `${Q($)} / ${Q(Pi)}` : `${Q(V(J === null ? L : J))} / ${Q(B)}`
2590
+ }), et === "slider" && /* @__PURE__ */ p("div", {
2571
2591
  className: "sdk-volume-control",
2572
2592
  children: [/* @__PURE__ */ f("button", {
2573
2593
  className: "sdk-desktop-icon-btn",
2574
2594
  onClick: (e) => {
2575
- e.stopPropagation(), ui();
2595
+ e.stopPropagation(), pi();
2576
2596
  },
2577
- "data-tooltip": Ni ? "Unmute" : "Mute",
2578
- "aria-label": Ni ? "Unmute" : "Mute",
2579
- "aria-pressed": Ni,
2580
- children: Fi()
2597
+ "data-tooltip": Ii ? "Unmute" : "Mute",
2598
+ "aria-label": Ii ? "Unmute" : "Mute",
2599
+ "aria-pressed": Ii,
2600
+ children: Ri()
2581
2601
  }), /* @__PURE__ */ f("input", {
2582
2602
  type: "range",
2583
2603
  className: "sdk-volume-slider",
2584
2604
  min: 0,
2585
2605
  max: 1,
2586
2606
  step: .02,
2587
- value: Ni ? 0 : Mi,
2607
+ value: Ii ? 0 : Fi,
2588
2608
  "aria-label": "Volume",
2589
- "aria-valuetext": Ni ? "Muted" : `${Math.round(Mi * 100)}%`,
2590
- style: { "--vol-pct": Math.round((Ni ? 0 : Mi) * 100) },
2609
+ "aria-valuetext": Ii ? "Muted" : `${Math.round(Fi * 100)}%`,
2610
+ style: { "--vol-pct": Math.round((Ii ? 0 : Fi) * 100) },
2591
2611
  onChange: (e) => {
2592
2612
  let t = parseFloat(e.target.value);
2593
- q ? (F?.casting.remoteSetVolume(t), t > 0 && F?.casting.remoteSetMute(!1)) : (F?.setVolume(t), t > 0 && an && F?.setMute(!1));
2613
+ q ? (F?.casting.remoteSetVolume(t), t > 0 && F?.casting.remoteSetMute(!1)) : (F?.setVolume(t), t > 0 && cn && F?.setMute(!1));
2594
2614
  },
2595
2615
  onClick: (e) => e.stopPropagation()
2596
2616
  })]
@@ -2599,35 +2619,35 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2599
2619
  className: "sdk-desktop-right-icons",
2600
2620
  children: [
2601
2621
  I.enableKeyMoments && W.length > 0 && !Y && /* @__PURE__ */ f("button", {
2602
- className: `sdk-desktop-icon-btn${pr ? " active" : ""}`,
2622
+ className: `sdk-desktop-icon-btn${gr ? " active" : ""}`,
2603
2623
  onClick: (e) => {
2604
- e.stopPropagation(), mr(!pr);
2624
+ e.stopPropagation(), _r(!gr);
2605
2625
  },
2606
2626
  "data-tooltip": "Key Moments",
2607
- "aria-label": pr ? "Hide chapters" : "Show chapters",
2608
- "aria-pressed": pr,
2609
- children: /* @__PURE__ */ f(ye, {
2627
+ "aria-label": gr ? "Hide chapters" : "Show chapters",
2628
+ "aria-pressed": gr,
2629
+ children: /* @__PURE__ */ f(ve, {
2610
2630
  size: 20,
2611
2631
  "aria-hidden": "true"
2612
2632
  })
2613
2633
  }),
2614
- I.enableSubtitles && !Y && nr.some((e) => !e.isNative) && /* @__PURE__ */ p("div", {
2634
+ I.enableSubtitles && !Y && ar.some((e) => !e.isNative) && /* @__PURE__ */ p("div", {
2615
2635
  className: "sdk-menu-container",
2616
2636
  children: [/* @__PURE__ */ f("button", {
2617
2637
  className: `sdk-desktop-icon-btn${U === "off" ? "" : " active"}`,
2618
2638
  onClick: (e) => {
2619
- e.stopPropagation(), zi("subtitles");
2639
+ e.stopPropagation(), Hi("subtitles");
2620
2640
  },
2621
2641
  "data-tooltip": "Captions",
2622
2642
  "aria-label": "Captions",
2623
2643
  "aria-haspopup": "listbox",
2624
2644
  "aria-expanded": G === "subtitles",
2625
- children: /* @__PURE__ */ f(pe, {
2645
+ children: /* @__PURE__ */ f(fe, {
2626
2646
  size: 20,
2627
2647
  "aria-hidden": "true"
2628
2648
  })
2629
2649
  }), G === "subtitles" && /* @__PURE__ */ p("div", {
2630
- ref: Bi,
2650
+ ref: Ui,
2631
2651
  className: "sdk-dropup-menu",
2632
2652
  role: "listbox",
2633
2653
  "aria-label": "Captions",
@@ -2642,21 +2662,21 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2642
2662
  "aria-selected": U === "off",
2643
2663
  tabIndex: 0,
2644
2664
  className: `sdk-dropup-item ${U === "off" ? "active" : ""}`,
2645
- onClick: () => pi("off"),
2646
- onKeyDown: Ii(() => pi("off")),
2647
- children: [/* @__PURE__ */ f("span", { children: "Off" }), U === "off" && /* @__PURE__ */ f(g, {
2665
+ onClick: () => gi("off"),
2666
+ onKeyDown: zi(() => gi("off")),
2667
+ children: [/* @__PURE__ */ f("span", { children: "Off" }), U === "off" && /* @__PURE__ */ f(_, {
2648
2668
  size: 12,
2649
2669
  "aria-hidden": "true"
2650
2670
  })]
2651
2671
  }),
2652
- nr.map((e) => /* @__PURE__ */ p("div", {
2672
+ ar.map((e) => /* @__PURE__ */ p("div", {
2653
2673
  role: "option",
2654
2674
  "aria-selected": U === e.id,
2655
2675
  tabIndex: 0,
2656
2676
  className: `sdk-dropup-item ${U === e.id ? "active" : ""}`,
2657
- onClick: () => pi(e.id),
2658
- onKeyDown: Ii(() => pi(e.id)),
2659
- children: [/* @__PURE__ */ f("span", { children: y(e) }), U === e.id && /* @__PURE__ */ f(g, {
2677
+ onClick: () => gi(e.id),
2678
+ onKeyDown: zi(() => gi(e.id)),
2679
+ children: [/* @__PURE__ */ f("span", { children: b(e) }), U === e.id && /* @__PURE__ */ f(_, {
2660
2680
  size: 12,
2661
2681
  "aria-hidden": "true"
2662
2682
  })]
@@ -2664,23 +2684,23 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2664
2684
  ]
2665
2685
  })]
2666
2686
  }),
2667
- I.allowMultipleAudio && ir.length > 1 && !Y && /* @__PURE__ */ p("div", {
2687
+ I.allowMultipleAudio && sr.length > 1 && !Y && /* @__PURE__ */ p("div", {
2668
2688
  className: "sdk-menu-container",
2669
2689
  children: [/* @__PURE__ */ f("button", {
2670
2690
  className: `sdk-desktop-icon-btn${G === "audio" ? " active" : ""}`,
2671
2691
  onClick: (e) => {
2672
- e.stopPropagation(), zi("audio");
2692
+ e.stopPropagation(), Hi("audio");
2673
2693
  },
2674
2694
  "data-tooltip": "Audio Track",
2675
2695
  "aria-label": "Audio track",
2676
2696
  "aria-haspopup": "listbox",
2677
2697
  "aria-expanded": G === "audio",
2678
- children: /* @__PURE__ */ f(ve, {
2698
+ children: /* @__PURE__ */ f(_e, {
2679
2699
  size: 20,
2680
2700
  "aria-hidden": "true"
2681
2701
  })
2682
2702
  }), G === "audio" && /* @__PURE__ */ p("div", {
2683
- ref: Bi,
2703
+ ref: Ui,
2684
2704
  className: "sdk-dropup-menu",
2685
2705
  role: "listbox",
2686
2706
  "aria-label": "Audio track",
@@ -2688,18 +2708,18 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2688
2708
  className: "sdk-dropup-header",
2689
2709
  "aria-hidden": "true",
2690
2710
  children: "Audio Track"
2691
- }), ir.map((e) => /* @__PURE__ */ p("div", {
2711
+ }), sr.map((e) => /* @__PURE__ */ p("div", {
2692
2712
  role: "option",
2693
- "aria-selected": or === e.id,
2713
+ "aria-selected": lr === e.id,
2694
2714
  tabIndex: 0,
2695
- className: `sdk-dropup-item ${or === e.id ? "active" : ""}`,
2715
+ className: `sdk-dropup-item ${lr === e.id ? "active" : ""}`,
2696
2716
  onClick: () => {
2697
- F?.setAudioTrack(e.id), sr(e.id), K("none"), vr(`Audio: ${y(e)}`);
2717
+ F?.setAudioTrack(e.id), ur(e.id), K("none"), xr(`Audio: ${b(e)}`);
2698
2718
  },
2699
- onKeyDown: Ii(() => {
2700
- F?.setAudioTrack(e.id), sr(e.id), K("none"), vr(`Audio: ${y(e)}`);
2719
+ onKeyDown: zi(() => {
2720
+ F?.setAudioTrack(e.id), ur(e.id), K("none"), xr(`Audio: ${b(e)}`);
2701
2721
  }),
2702
- children: [/* @__PURE__ */ f("span", { children: y(e) }), or === e.id && /* @__PURE__ */ f(g, {
2722
+ children: [/* @__PURE__ */ f("span", { children: b(e) }), lr === e.id && /* @__PURE__ */ f(_, {
2703
2723
  size: 12,
2704
2724
  "aria-hidden": "true"
2705
2725
  })]
@@ -2711,18 +2731,18 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2711
2731
  children: [/* @__PURE__ */ f("button", {
2712
2732
  className: `sdk-desktop-icon-btn${G === "speed" ? " active" : ""}`,
2713
2733
  onClick: (e) => {
2714
- e.stopPropagation(), zi("speed");
2734
+ e.stopPropagation(), Hi("speed");
2715
2735
  },
2716
2736
  "data-tooltip": "Playback Speed",
2717
2737
  "aria-label": "Playback speed",
2718
2738
  "aria-haspopup": "listbox",
2719
2739
  "aria-expanded": G === "speed",
2720
- children: /* @__PURE__ */ f(_e, {
2740
+ children: /* @__PURE__ */ f(ge, {
2721
2741
  size: 20,
2722
2742
  "aria-hidden": "true"
2723
2743
  })
2724
2744
  }), G === "speed" && /* @__PURE__ */ p("div", {
2725
- ref: Bi,
2745
+ ref: Ui,
2726
2746
  className: "sdk-dropup-menu",
2727
2747
  role: "listbox",
2728
2748
  "aria-label": "Playback speed",
@@ -2739,12 +2759,12 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2739
2759
  2
2740
2760
  ].map((e) => /* @__PURE__ */ p("div", {
2741
2761
  role: "option",
2742
- "aria-selected": dr === e,
2762
+ "aria-selected": mr === e,
2743
2763
  tabIndex: 0,
2744
- className: `sdk-dropup-item ${dr === e ? "active" : ""}`,
2745
- onClick: () => di(e),
2746
- onKeyDown: Ii(() => di(e)),
2747
- children: [/* @__PURE__ */ f("span", { children: e === 1 ? "Normal" : `${e}x` }), dr === e && /* @__PURE__ */ f(g, {
2764
+ className: `sdk-dropup-item ${mr === e ? "active" : ""}`,
2765
+ onClick: () => mi(e),
2766
+ onKeyDown: zi(() => mi(e)),
2767
+ children: [/* @__PURE__ */ f("span", { children: e === 1 ? "Normal" : `${e}x` }), mr === e && /* @__PURE__ */ f(_, {
2748
2768
  size: 12,
2749
2769
  "aria-hidden": "true"
2750
2770
  })]
@@ -2754,20 +2774,20 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2754
2774
  I.enableQuality && !Y && /* @__PURE__ */ p("div", {
2755
2775
  className: "sdk-menu-container",
2756
2776
  children: [/* @__PURE__ */ f("button", {
2757
- className: `sdk-desktop-icon-btn${Zn.id === -1 ? "" : " active"}`,
2777
+ className: `sdk-desktop-icon-btn${er.id === -1 ? "" : " active"}`,
2758
2778
  onClick: (e) => {
2759
- e.stopPropagation(), zi("quality");
2779
+ e.stopPropagation(), Hi("quality");
2760
2780
  },
2761
2781
  "data-tooltip": "Quality",
2762
2782
  "aria-label": "Video quality",
2763
2783
  "aria-haspopup": "listbox",
2764
2784
  "aria-expanded": G === "quality",
2765
- children: /* @__PURE__ */ f(Fe, {
2785
+ children: /* @__PURE__ */ f(Ne, {
2766
2786
  size: 20,
2767
2787
  "aria-hidden": "true"
2768
2788
  })
2769
2789
  }), G === "quality" && /* @__PURE__ */ p("div", {
2770
- ref: Bi,
2790
+ ref: Ui,
2771
2791
  className: "sdk-dropup-menu large",
2772
2792
  role: "listbox",
2773
2793
  "aria-label": "Video quality",
@@ -2775,14 +2795,14 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2775
2795
  className: "sdk-dropup-header",
2776
2796
  "aria-hidden": "true",
2777
2797
  children: "Quality"
2778
- }), Yn.map((e) => /* @__PURE__ */ p("div", {
2798
+ }), Qn.map((e) => /* @__PURE__ */ p("div", {
2779
2799
  role: "option",
2780
- "aria-selected": Zn.id === e.id,
2800
+ "aria-selected": er.id === e.id,
2781
2801
  tabIndex: 0,
2782
- className: `sdk-dropup-item ${Zn.id === e.id ? "active" : ""}`,
2783
- onClick: () => fi(e.id),
2784
- onKeyDown: Ii(() => fi(e.id)),
2785
- children: [/* @__PURE__ */ f("span", { children: e.label }), Zn.id === e.id && /* @__PURE__ */ f(g, {
2802
+ className: `sdk-dropup-item ${er.id === e.id ? "active" : ""}`,
2803
+ onClick: () => hi(e.id),
2804
+ onKeyDown: zi(() => hi(e.id)),
2805
+ children: [/* @__PURE__ */ f("span", { children: e.label }), er.id === e.id && /* @__PURE__ */ f(_, {
2786
2806
  size: 12,
2787
2807
  "aria-hidden": "true"
2788
2808
  })]
@@ -2794,18 +2814,18 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2794
2814
  children: [/* @__PURE__ */ f("button", {
2795
2815
  className: `sdk-desktop-icon-btn${G === "sources" ? " active" : ""}`,
2796
2816
  onClick: (e) => {
2797
- e.stopPropagation(), zi("sources");
2817
+ e.stopPropagation(), Hi("sources");
2798
2818
  },
2799
2819
  "data-tooltip": "Select Source",
2800
2820
  "aria-label": "Select source",
2801
2821
  "aria-haspopup": "listbox",
2802
2822
  "aria-expanded": G === "sources",
2803
- children: /* @__PURE__ */ f(Ie, {
2823
+ children: /* @__PURE__ */ f(Pe, {
2804
2824
  size: 20,
2805
2825
  "aria-hidden": "true"
2806
2826
  })
2807
2827
  }), G === "sources" && /* @__PURE__ */ p("div", {
2808
- ref: Bi,
2828
+ ref: Ui,
2809
2829
  className: "sdk-dropup-menu",
2810
2830
  role: "listbox",
2811
2831
  "aria-label": "Select source",
@@ -2815,12 +2835,12 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2815
2835
  children: "Source"
2816
2836
  }), S.map((e, t) => /* @__PURE__ */ p("div", {
2817
2837
  role: "option",
2818
- "aria-selected": at === t,
2838
+ "aria-selected": st === t,
2819
2839
  tabIndex: 0,
2820
- className: `sdk-dropup-item ${at === t ? "active" : ""}`,
2821
- onClick: () => mi(t),
2822
- onKeyDown: Ii(() => mi(t)),
2823
- children: [/* @__PURE__ */ f("span", { children: e.label }), at === t && /* @__PURE__ */ f(g, {
2840
+ className: `sdk-dropup-item ${st === t ? "active" : ""}`,
2841
+ onClick: () => _i(t),
2842
+ onKeyDown: zi(() => _i(t)),
2843
+ children: [/* @__PURE__ */ f("span", { children: e.label }), st === t && /* @__PURE__ */ f(_, {
2824
2844
  size: 12,
2825
2845
  "aria-hidden": "true"
2826
2846
  })]
@@ -2828,37 +2848,37 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2828
2848
  })]
2829
2849
  }),
2830
2850
  I.enablePiP && !Y && /* @__PURE__ */ f("button", {
2831
- className: `sdk-desktop-icon-btn${gn ? " active" : ""}`,
2851
+ className: `sdk-desktop-icon-btn${yn ? " active" : ""}`,
2832
2852
  onClick: (e) => {
2833
- e.stopPropagation(), _i();
2853
+ e.stopPropagation(), bi();
2834
2854
  },
2835
2855
  "data-tooltip": "Picture-in-Picture",
2836
- "aria-label": gn ? "Exit picture-in-picture" : "Enter picture-in-picture",
2837
- "aria-pressed": gn,
2838
- children: /* @__PURE__ */ f(Se, {
2856
+ "aria-label": yn ? "Exit picture-in-picture" : "Enter picture-in-picture",
2857
+ "aria-pressed": yn,
2858
+ children: /* @__PURE__ */ f(xe, {
2839
2859
  size: 20,
2840
2860
  "aria-hidden": "true"
2841
2861
  })
2842
2862
  }),
2843
- Qe === "button" && /* @__PURE__ */ f("button", {
2863
+ et === "button" && /* @__PURE__ */ f("button", {
2844
2864
  className: "sdk-desktop-icon-btn",
2845
2865
  onClick: (e) => {
2846
- e.stopPropagation(), ui();
2866
+ e.stopPropagation(), pi();
2847
2867
  },
2848
- "data-tooltip": Ni ? "Unmute" : "Mute",
2849
- "aria-label": Ni ? "Unmute" : "Mute",
2850
- "aria-pressed": Ni,
2851
- children: Fi()
2868
+ "data-tooltip": Ii ? "Unmute" : "Mute",
2869
+ "aria-label": Ii ? "Unmute" : "Mute",
2870
+ "aria-pressed": Ii,
2871
+ children: Ri()
2852
2872
  }),
2853
- Ge && /* @__PURE__ */ f("button", {
2873
+ qe && /* @__PURE__ */ f("button", {
2854
2874
  className: "sdk-desktop-icon-btn",
2855
2875
  onClick: (e) => {
2856
- e.stopPropagation(), yi();
2876
+ e.stopPropagation(), Si();
2857
2877
  },
2858
- "data-tooltip": ln || dn ? "Exit fullscreen" : "Fullscreen",
2859
- "aria-label": ln || dn ? "Exit fullscreen" : "Enter fullscreen",
2860
- "aria-pressed": ln || dn,
2861
- children: f(ln ? xe : be, {
2878
+ "data-tooltip": fn || mn ? "Exit fullscreen" : "Fullscreen",
2879
+ "aria-label": fn || mn ? "Exit fullscreen" : "Enter fullscreen",
2880
+ "aria-pressed": fn || mn,
2881
+ children: f(fn ? be : ye, {
2862
2882
  size: 20,
2863
2883
  "aria-hidden": "true"
2864
2884
  })
@@ -2870,10 +2890,10 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2870
2890
  })
2871
2891
  ] })]
2872
2892
  }),
2873
- vn && (() => {
2893
+ xn && (() => {
2874
2894
  let e = R.find((e) => $ >= e.startTime && $ < e.endTime), t = e ? e.endTime - e.startTime : B, n = e ? Math.max(0, $ - e.startTime) : V($);
2875
2895
  return ee(/* @__PURE__ */ p("div", {
2876
- className: `gb-pip-overlay${Ai ? "" : " gb-pip-paused"}`,
2896
+ className: `gb-pip-overlay${Ni ? "" : " gb-pip-paused"}`,
2877
2897
  children: [
2878
2898
  /* @__PURE__ */ f("div", {}),
2879
2899
  /* @__PURE__ */ p("div", {
@@ -2887,22 +2907,22 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2887
2907
  }),
2888
2908
  "aria-label": "Rewind 10 seconds",
2889
2909
  disabled: Y,
2890
- children: /* @__PURE__ */ f(we, {
2910
+ children: /* @__PURE__ */ f(Ce, {
2891
2911
  size: 20,
2892
2912
  "aria-hidden": "true"
2893
2913
  })
2894
2914
  }),
2895
2915
  /* @__PURE__ */ f("button", {
2896
2916
  className: "gb-pip-btn gb-pip-play",
2897
- onClick: si,
2898
- "aria-label": bn ? "Replay" : Ai ? "Pause" : "Play",
2899
- children: bn ? /* @__PURE__ */ f(we, {
2917
+ onClick: ui,
2918
+ "aria-label": Cn ? "Replay" : Ni ? "Pause" : "Play",
2919
+ children: Cn ? /* @__PURE__ */ f(Ce, {
2900
2920
  size: 24,
2901
2921
  "aria-hidden": "true"
2902
- }) : Ai ? /* @__PURE__ */ f(_, {
2922
+ }) : Ni ? /* @__PURE__ */ f(v, {
2903
2923
  size: 24,
2904
2924
  "aria-hidden": "true"
2905
- }) : /* @__PURE__ */ f(Ce, {
2925
+ }) : /* @__PURE__ */ f(Se, {
2906
2926
  size: 24,
2907
2927
  "aria-hidden": "true",
2908
2928
  style: { marginLeft: 2 }
@@ -2916,7 +2936,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2916
2936
  }),
2917
2937
  "aria-label": "Skip forward 10 seconds",
2918
2938
  disabled: Y,
2919
- children: /* @__PURE__ */ f(Te, {
2939
+ children: /* @__PURE__ */ f(we, {
2920
2940
  size: 20,
2921
2941
  "aria-hidden": "true"
2922
2942
  })
@@ -2927,7 +2947,7 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2927
2947
  className: "gb-pip-bottom",
2928
2948
  children: [/* @__PURE__ */ f("div", {
2929
2949
  className: "gb-pip-progress",
2930
- onClick: vi,
2950
+ onClick: xi,
2931
2951
  children: /* @__PURE__ */ f("div", {
2932
2952
  className: "gb-pip-progress-fill",
2933
2953
  style: { width: `${t ? n / t * 100 : 0}%` }
@@ -2942,70 +2962,81 @@ var Ue = ({ src: r, autoplay: i = !1, muted: a = !1, chapters: s = [], keyMoment
2942
2962
  })]
2943
2963
  })
2944
2964
  ]
2945
- }), vn.document.body);
2965
+ }), xn.document.body);
2946
2966
  })()
2947
2967
  ]
2948
2968
  });
2949
- }, b = "https://dev-api.go-boss.com";
2950
- function We(e) {
2969
+ }, Ge = "https://dev-api.go-boss.com";
2970
+ function Ke(e) {
2951
2971
  return {
2952
2972
  "x-player-key": e,
2953
2973
  "Content-Type": "application/json"
2954
2974
  };
2955
2975
  }
2956
- async function Ge(e, t = b) {
2957
- let n = await fetch(`${t}/api/player/sdk/init`, {
2976
+ async function qe(e, t = Ge, n = {}) {
2977
+ let r = await fetch(`${t}/api/player/sdk/init`, {
2958
2978
  method: "POST",
2959
- headers: We(e),
2960
- body: JSON.stringify({})
2979
+ headers: Ke(e),
2980
+ body: JSON.stringify({ videoUrl: n.videoUrl })
2961
2981
  });
2962
- if (!n.ok) throw Error(`SDK init failed: ${n.status}`);
2963
- return await n.json();
2982
+ if (!r.ok) throw Error(`SDK init failed: ${r.status}`);
2983
+ return await r.json();
2964
2984
  }
2965
- async function Ke(e, t, n, r = b) {
2966
- let i = await fetch(`${r}/api/player/sdk/session/start`, {
2985
+ async function Je(e, t, n = Ge) {
2986
+ let { sessionId: r, videoId: i, videoTitle: a, videoUrl: o, contentDurationSec: s } = t, c = await fetch(`${n}/api/player/sdk/session/start`, {
2967
2987
  method: "POST",
2968
- headers: We(e),
2988
+ headers: Ke(e),
2969
2989
  body: JSON.stringify({
2970
- sessionId: t,
2971
- videoId: n
2990
+ sessionId: r,
2991
+ videoId: i,
2992
+ videoTitle: a,
2993
+ videoUrl: o,
2994
+ contentDurationSec: typeof s == "number" && Number.isFinite(s) && s > 0 ? s : void 0
2972
2995
  })
2973
2996
  });
2974
- if (!i.ok) throw Error(`Session start failed: ${i.status}`);
2997
+ if (!c.ok) throw Error(`Session start failed: ${c.status}`);
2975
2998
  }
2976
- async function qe(e, t, n, r, i = b) {
2999
+ async function Ye(e, t, n, r, i = Ge) {
2977
3000
  let a = {
2978
3001
  sessionId: t,
2979
3002
  currentTime: n,
2980
3003
  duration: r
2981
3004
  }, o = await fetch(`${i}/api/player/sdk/session/heartbeat`, {
2982
3005
  method: "POST",
2983
- headers: We(e),
3006
+ headers: Ke(e),
2984
3007
  body: JSON.stringify(a)
2985
3008
  });
2986
3009
  if (!o.ok) throw Error(`Heartbeat failed: ${o.status}`);
2987
3010
  }
2988
- async function Je(e, t, n = b) {
2989
- let r = await fetch(`${n}/api/player/sdk/session/end`, {
3011
+ async function Xe(e, t, n = 0, r = 0, i = Ge) {
3012
+ let a = await fetch(`${i}/api/player/sdk/session/end`, {
2990
3013
  method: "POST",
2991
- headers: We(e),
2992
- body: JSON.stringify({ sessionId: t })
3014
+ headers: Ke(e),
3015
+ body: JSON.stringify({
3016
+ sessionId: t,
3017
+ currentTime: n,
3018
+ duration: r
3019
+ })
2993
3020
  });
2994
- if (!r.ok) throw Error(`Session end failed: ${r.status}`);
3021
+ if (!a.ok) throw Error(`Session end failed: ${a.status}`);
2995
3022
  }
2996
- async function Ye(e, t, n = b) {
3023
+ async function Ze(e, t, n = Ge) {
2997
3024
  let r = await fetch(`${n}/api/player/sdk/events`, {
2998
3025
  method: "POST",
2999
- headers: We(e),
3026
+ headers: Ke(e),
3000
3027
  body: JSON.stringify(t)
3001
3028
  });
3002
3029
  if (!r.ok) throw Error(`Event ${t.eventType} failed: ${r.status}`);
3003
3030
  }
3004
- function Xe(e, t, n = b) {
3005
- fetch(`${n}/api/player/sdk/session/end`, {
3031
+ function Qe(e, t, n = 0, r = 0, i = Ge) {
3032
+ fetch(`${i}/api/player/sdk/session/end`, {
3006
3033
  method: "POST",
3007
- headers: We(e),
3008
- body: JSON.stringify({ sessionId: t }),
3034
+ headers: Ke(e),
3035
+ body: JSON.stringify({
3036
+ sessionId: t,
3037
+ currentTime: n,
3038
+ duration: r
3039
+ }),
3009
3040
  keepalive: !0
3010
3041
  });
3011
3042
  }
@@ -3014,7 +3045,7 @@ function Xe(e, t, n = b) {
3014
3045
  function x() {
3015
3046
  if (!(typeof screen > "u")) return screen.orientation?.type ?? void 0;
3016
3047
  }
3017
- var Ze = class {
3048
+ var $e = class {
3018
3049
  constructor() {
3019
3050
  this.autoplay = !1, this.keyMoments = [], this.isPlaybackActive = !1, this.hasFinished = !1, this.hasDismissed = !1, this.lastCurrentTime = 0, this.lastDuration = 0, this.lastWatchDuration = 0, this.prevSpeed = 1, this.pendingSeek = null;
3020
3051
  }
@@ -3126,7 +3157,7 @@ var Ze = class {
3126
3157
  console.error(`[PlayerSDK Delegate] ${String(e)} callback failed:`, t);
3127
3158
  }
3128
3159
  }
3129
- }, Qe = {
3160
+ }, et = {
3130
3161
  subtitles: "subtitle_support",
3131
3162
  ads: "ad_support",
3132
3163
  chapterMarkers: "key_moments",
@@ -3140,7 +3171,7 @@ var Ze = class {
3140
3171
  screenRecordingPrevention: "screen_recording_prevention",
3141
3172
  signalStrength: "signal_strength"
3142
3173
  };
3143
- function $e(e) {
3174
+ function tt(e) {
3144
3175
  let t = {
3145
3176
  m3u8_playback: !0,
3146
3177
  subtitle_support: !1,
@@ -3156,10 +3187,10 @@ function $e(e) {
3156
3187
  signal_strength: !1,
3157
3188
  ad_support: !1
3158
3189
  };
3159
- for (let [n, r] of Object.entries(Qe)) n in e && (t[r] = e[n]);
3190
+ for (let [n, r] of Object.entries(et)) n in e && (t[r] = e[n]);
3160
3191
  return t;
3161
3192
  }
3162
- function et(e) {
3193
+ function nt(e) {
3163
3194
  if (!e) return (e) => e;
3164
3195
  let t = [];
3165
3196
  for (let n of e.split(",")) {
@@ -3179,12 +3210,12 @@ function et(e) {
3179
3210
  return e;
3180
3211
  };
3181
3212
  }
3182
- function tt(e) {
3213
+ function rt(e) {
3183
3214
  let t = e.replace("#", "");
3184
3215
  return t.length === 6 ? `${parseInt(t.substring(0, 2), 16)}, ${parseInt(t.substring(2, 4), 16)}, ${parseInt(t.substring(4, 6), 16)}` : "99, 102, 241";
3185
3216
  }
3186
- var nt = 3e4;
3187
- function rt(e, t) {
3217
+ var it = 30 * 1e3;
3218
+ function at(e, t) {
3188
3219
  switch (e.eventType) {
3189
3220
  case "pause": return {
3190
3221
  eventType: "pause",
@@ -3278,119 +3309,141 @@ function rt(e, t) {
3278
3309
  default: return null;
3279
3310
  }
3280
3311
  }
3281
- function it({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i = "#6366f1", firebaseConfig: a, proxyDomains: s, apiBaseUrl: l, adTrackingUrl: ee, overlayAdUrl: te, videoId: ne, title: ie, watermark: ae, autoplay: m = !1, muted: oe = !1, autoFullscreen: se = !1, enableControls: ce = !0, enableSkipAd: le, skipAdAfterSeconds: ue, chaptersDisplayMode: de = "strip", volumeControlType: h = "slider", subtitleStyle: fe, drmConfig: pe, onAnalyticsEvent: me, delegate: g, onKeyMomentsLoaded: he, initialTime: ge, onTimeUpdate: _e }) {
3282
- let [ve, ye] = d([]), [be, xe] = d(0), [_] = d(() => new Ze());
3312
+ function ot({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i = "#6366f1", firebaseConfig: a, proxyDomains: s, apiBaseUrl: l, adTrackingUrl: ee, overlayAdUrl: te, videoId: ne, title: m, watermark: ie, autoplay: h = !1, muted: ae = !1, autoFullscreen: oe = !1, enableControls: se = !0, enableSkipAd: ce, skipAdAfterSeconds: le, chaptersDisplayMode: ue = "strip", volumeControlType: g = "slider", subtitleStyle: de, drmConfig: fe, onAnalyticsEvent: pe, delegate: _, onKeyMomentsLoaded: me, initialTime: he, onTimeUpdate: ge }) {
3313
+ let [_e, ve] = d([]), [ye, be] = d(0), [v] = d(() => new $e());
3283
3314
  c(() => {
3284
- _.setDelegate(g), _.setAutoplay(m);
3315
+ v.setDelegate(_), v.setAutoplay(h);
3285
3316
  }, [
3317
+ v,
3286
3318
  _,
3287
- g,
3288
- m
3289
- ]), c(() => () => _.notifyDismissed(), [_]);
3290
- let Se = Array.isArray(t) ? t : [{
3319
+ h
3320
+ ]), c(() => () => v.notifyDismissed(), [v]);
3321
+ let xe = Array.isArray(t) ? t : [{
3291
3322
  label: "Default",
3292
3323
  url: t
3293
- }], Ce = Se[be]?.url ?? Se[0]?.url ?? "", [we, Te] = d("loading"), [Ee, De] = d(null), [Oe, ke] = d(0), [Ae, je] = d("network"), Me = u(null), Ne = u(!1), Pe = u(""), Fe = u(!1), Ie = u(!1), Le = u(void 0), Re = u(!1), v = u(null), y = u(0), ze = u(null), Be = u({
3324
+ }], Se = xe[ye]?.url ?? xe[0]?.url ?? "", [Ce, we] = d("loading"), [Te, Ee] = d(null), [De, Oe] = d(0), [ke, Ae] = d("network"), je = u(null), Me = u(!1), y = u(""), Ne = u(!1), Pe = u(!1), Fe = u(void 0), Ie = u(!1), Le = u(it), b = u(null), Re = u(0), ze = u(null), Be = u({
3294
3325
  currentTime: 0,
3295
3326
  duration: 0
3296
- }), Ve = u(() => {}), He = Ce.split("/").filter(Boolean), b = ne || (He[He.length - 1] ?? "").replace(/\.m3u8.*$/, "") || "video", We = o(() => et(s), [s])(), x = tt(i);
3327
+ }), Ve = u(() => {}), He = Se.split("/").filter(Boolean), Ue = ne || (He[He.length - 1] ?? "").replace(/\.m3u8.*$/, "") || "video", Ge = u(Se);
3328
+ c(() => {
3329
+ Ge.current = Se;
3330
+ }, [Se]);
3331
+ let Ke = o(() => nt(s), [s])(), x = rt(i);
3297
3332
  c(() => {
3298
3333
  document.documentElement.style.setProperty("--accent-indigo", i), document.documentElement.style.setProperty("--accent-indigo-rgb", x);
3299
3334
  }, [i, x]), c(() => {
3300
3335
  let t = !1;
3301
- return Ge(e, l).then((e) => {
3336
+ return qe(e, l, { videoUrl: Ge.current }).then((e) => {
3302
3337
  if (t) return;
3303
- Me.current = e;
3304
- let { features: n, planTier: r } = e.result.data, i = {
3338
+ je.current = e;
3339
+ let { features: n, planTier: r, heartbeatIntervalSeconds: i } = e.result.data;
3340
+ Le.current = typeof i == "number" && i > 0 ? i * 1e3 : it;
3341
+ let a = {
3305
3342
  package: r,
3306
3343
  is_active: !0,
3307
- features: $e(n),
3344
+ features: tt(n),
3308
3345
  limits: { streaming_minutes: 0 }
3309
3346
  };
3310
- console.log("[SDK] Player key validated. Features:", i.features), De(i), Te("ready");
3347
+ console.log("[SDK] Player key validated. Features:", a.features), Ee(a), we("ready");
3311
3348
  }).catch((e) => {
3312
3349
  if (t) return;
3313
3350
  console.error("[SDK] Player key validation failed:", e);
3314
3351
  let n = e.message ?? "";
3315
- je(/init failed: 4\d\d/.test(n) ? "auth" : "network"), Te("error");
3352
+ Ae(/init failed: 4\d\d/.test(n) ? "auth" : "network"), we("error");
3316
3353
  }), () => {
3317
- t = !0, v.current &&= (clearTimeout(v.current), null), y.current = 0, ze.current = null, Te("loading"), De(null), Fe.current = !1, Pe.current = "", Ie.current = !1, Le.current = void 0;
3354
+ t = !0, b.current &&= (clearTimeout(b.current), null), Re.current = 0, ze.current = null, we("loading"), Ee(null), Ne.current = !1, y.current = "", Pe.current = !1, Fe.current = void 0;
3318
3355
  };
3319
3356
  }, [
3320
3357
  e,
3321
3358
  l,
3322
- Oe
3359
+ De
3323
3360
  ]);
3324
- let Qe = o(() => {
3325
- v.current && (clearTimeout(v.current), v.current = null, ze.current !== null && (y.current += Date.now() - ze.current, ze.current = null));
3326
- }, []), it = o(() => {
3327
- v.current &&= (clearTimeout(v.current), null), y.current = 0, ze.current = null;
3361
+ let et = o(() => {
3362
+ b.current && (clearTimeout(b.current), b.current = null, ze.current !== null && (Re.current += Date.now() - ze.current, ze.current = null));
3363
+ }, []), ot = o(() => {
3364
+ b.current &&= (clearTimeout(b.current), null), Re.current = 0, ze.current = null;
3328
3365
  }, []), S = o(() => {
3329
- if (v.current || !Pe.current) return;
3366
+ if (b.current || !y.current) return;
3330
3367
  ze.current = Date.now();
3331
- let t = nt - y.current;
3332
- v.current = setTimeout(() => {
3333
- v.current = null, y.current = 0, ze.current = null;
3368
+ let t = Le.current - Re.current;
3369
+ b.current = setTimeout(() => {
3370
+ b.current = null, Re.current = 0, ze.current = null;
3334
3371
  let { currentTime: t, duration: n } = Be.current;
3335
- console.log("[SDK] Heartbeat timer fired — 30s of real content elapsed"), qe(e, Pe.current, t, n, l).catch((e) => console.warn("[SDK] Heartbeat failed:", e.message)), Ve.current();
3372
+ console.log(`[SDK] Heartbeat timer fired — ${Le.current / 1e3}s of real content elapsed`), Ye(e, y.current, t, n, l).catch((e) => console.warn("[SDK] Heartbeat failed:", e.message)), Ve.current();
3336
3373
  }, t);
3337
3374
  }, [e, l]);
3338
3375
  c(() => {
3339
3376
  Ve.current = S;
3340
3377
  }, [S]);
3341
- let at = u(!0);
3378
+ let st = u(!0);
3342
3379
  c(() => {
3343
- if (at.current) {
3344
- at.current = !1;
3380
+ if (st.current) {
3381
+ st.current = !1;
3345
3382
  return;
3346
3383
  }
3347
- Re.current = !0, Le.current = void 0, Qe();
3348
- }, [be, Qe]), c(() => {
3384
+ Ie.current = !0, Fe.current = void 0, et();
3385
+ }, [ye, et]), c(() => {
3349
3386
  let t = () => {
3350
- _.notifyDismissed(), Pe.current && (Ie.current = !0, it(), Xe(e, Pe.current, l));
3387
+ if (v.notifyDismissed(), !y.current) return;
3388
+ Pe.current = !0, ot();
3389
+ let { currentTime: t, duration: n } = Be.current;
3390
+ Qe(e, y.current, t, n, l);
3351
3391
  };
3352
3392
  return window.addEventListener("beforeunload", t), () => {
3353
- window.removeEventListener("beforeunload", t), it();
3393
+ window.removeEventListener("beforeunload", t), ot();
3354
3394
  };
3355
3395
  }, [
3356
3396
  e,
3357
3397
  l,
3358
- it,
3359
- _
3398
+ ot,
3399
+ v
3360
3400
  ]);
3361
- let ot = o((t) => {
3401
+ let ct = o((t) => {
3362
3402
  let n = t;
3363
3403
  if (t.currentTime !== void 0 && (Be.current = {
3364
3404
  currentTime: t.currentTime,
3365
3405
  duration: t.duration
3366
- }), t.eventType === "session_start" && !Fe.current && (Fe.current = !0, Ie.current = !1, Pe.current = typeof n.sessionId == "string" ? n.sessionId : "", Ke(e, Pe.current, b, l).catch((e) => console.warn("[SDK] Session start failed:", e.message)), Ne.current || S()), t.eventType === "play" && Fe.current && !Ne.current && !Re.current && S(), t.eventType === "pause" && Qe(), t.eventType === "buffering_start" && Qe(), t.eventType === "buffering_end" && Fe.current && !Ne.current && (Re.current = !1, S()), t.eventType === "ended" && (it(), Pe.current && (Ie.current = !0, Je(e, Pe.current, l).catch((e) => console.warn("[SDK] Session end failed:", e.message)))), Fe.current && Pe.current && !Ie.current) {
3367
- let n = rt(t, Le.current);
3368
- n && Ye(e, {
3406
+ }), t.eventType === "session_start" && !Ne.current && (Ne.current = !0, Pe.current = !1, y.current = typeof n.sessionId == "string" ? n.sessionId : "", Je(e, {
3407
+ sessionId: y.current,
3408
+ videoId: Ue,
3409
+ videoTitle: m,
3410
+ videoUrl: Ge.current,
3411
+ contentDurationSec: t.duration
3412
+ }, l).catch((e) => console.warn("[SDK] Session start failed:", e.message)), Me.current || S()), t.eventType === "play" && Ne.current && !Me.current && !Ie.current && S(), t.eventType === "pause" && et(), t.eventType === "buffering_start" && et(), t.eventType === "buffering_end" && Ne.current && !Me.current && (Ie.current = !1, S()), t.eventType === "ended" && (ot(), y.current)) {
3413
+ Pe.current = !0;
3414
+ let { currentTime: t, duration: n } = Be.current;
3415
+ Xe(e, y.current, t, n, l).catch((e) => console.warn("[SDK] Session end failed:", e.message));
3416
+ }
3417
+ if (Ne.current && y.current && !Pe.current) {
3418
+ let n = at(t, Fe.current);
3419
+ n && Ze(e, {
3369
3420
  eventType: n.eventType,
3370
- sessionId: Pe.current,
3421
+ sessionId: y.current,
3371
3422
  currentTime: t.currentTime ?? 0,
3372
- videoId: b,
3423
+ videoId: Ue,
3424
+ videoTitle: m,
3373
3425
  ...n.extras
3374
3426
  }, l).catch((e) => console.warn(`[SDK] Event ${n.eventType} failed:`, e.message));
3375
3427
  }
3376
- t.eventType === "quality_change" && t.rendition && (Le.current = t.rendition), console.log("[SDK Analytics]", t), _.handleAnalyticsEvent(t), me?.(t);
3428
+ t.eventType === "quality_change" && t.rendition && (Fe.current = t.rendition), console.log("[SDK Analytics]", t), v.handleAnalyticsEvent(t), pe?.(t);
3377
3429
  }, [
3378
3430
  e,
3379
3431
  l,
3380
- b,
3432
+ Ue,
3433
+ m,
3381
3434
  S,
3382
- Qe,
3383
- it,
3384
- me,
3385
- _
3386
- ]), st = o((e) => {
3387
- Ne.current = e, e ? (Qe(), console.log("[SDK] Ad break started — heartbeat timer paused")) : (Fe.current && S(), console.log("[SDK] Ad break ended — heartbeat timer resumed"));
3388
- }, [Qe, S]), ct = o((e) => {
3389
- _.setKeyMoments(e), ye(e), he?.(e);
3390
- }, [he, _]), lt = o((e) => {
3391
- _.handleTimeUpdate(e), _e?.(e);
3392
- }, [_e, _]);
3393
- if (we === "loading") return /* @__PURE__ */ p("div", {
3435
+ et,
3436
+ ot,
3437
+ pe,
3438
+ v
3439
+ ]), lt = o((e) => {
3440
+ Me.current = e, e ? (et(), console.log("[SDK] Ad break started — heartbeat timer paused")) : (Ne.current && S(), console.log("[SDK] Ad break ended — heartbeat timer resumed"));
3441
+ }, [et, S]), ut = o((e) => {
3442
+ v.setKeyMoments(e), ve(e), me?.(e);
3443
+ }, [me, v]), dt = o((e) => {
3444
+ v.handleTimeUpdate(e), ge?.(e);
3445
+ }, [ge, v]);
3446
+ if (Ce === "loading") return /* @__PURE__ */ p("div", {
3394
3447
  style: {
3395
3448
  width: "100%",
3396
3449
  aspectRatio: "16 / 9",
@@ -3411,8 +3464,8 @@ function it({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i =
3411
3464
  animation: "boss-sdk-spin 1s linear infinite"
3412
3465
  } })]
3413
3466
  });
3414
- if (we === "error") {
3415
- let e = Ae === "auth";
3467
+ if (Ce === "error") {
3468
+ let e = ke === "auth";
3416
3469
  return /* @__PURE__ */ f("div", {
3417
3470
  style: {
3418
3471
  width: "100%",
@@ -3428,54 +3481,54 @@ function it({ playerKey: e, src: t, subtitles: n, licenseKey: r, themeColor: i =
3428
3481
  children: /* @__PURE__ */ f(re, {
3429
3482
  title: e ? "Invalid Player Key" : "Something Went Wrong",
3430
3483
  subtitle: e ? "Your player key is invalid or expired.\nPlease check your configuration." : "We encountered an error while connecting.\nPlease try again.",
3431
- onRetry: () => ke((e) => e + 1)
3484
+ onRetry: () => Oe((e) => e + 1)
3432
3485
  })
3433
3486
  });
3434
3487
  }
3435
- return /* @__PURE__ */ f(Ue, {
3436
- src: Ce,
3437
- sources: Se,
3438
- activeSourceIndex: be,
3439
- onSourceChange: (e) => xe(e),
3488
+ return /* @__PURE__ */ f(We, {
3489
+ src: Se,
3490
+ sources: xe,
3491
+ activeSourceIndex: ye,
3492
+ onSourceChange: (e) => be(e),
3440
3493
  subtitles: n,
3441
- keyMoments: ve,
3494
+ keyMoments: _e,
3442
3495
  themeColor: i,
3443
3496
  firebaseConfig: a,
3444
- resolvedEntitlement: Ee,
3497
+ resolvedEntitlement: Te,
3445
3498
  licenseKey: r,
3446
- title: ie,
3447
- watermark: ae,
3448
- autoplay: m,
3449
- muted: oe,
3450
- autoFullscreen: se,
3451
- enableControls: ce,
3452
- enableSkipAd: le,
3453
- skipAdAfterSeconds: ue,
3454
- chaptersDisplayMode: de,
3455
- volumeControlType: h,
3456
- subtitleStyle: fe,
3457
- drmConfig: pe,
3499
+ title: m,
3500
+ watermark: ie,
3501
+ autoplay: h,
3502
+ muted: ae,
3503
+ autoFullscreen: oe,
3504
+ enableControls: se,
3505
+ enableSkipAd: ce,
3506
+ skipAdAfterSeconds: le,
3507
+ chaptersDisplayMode: ue,
3508
+ volumeControlType: g,
3509
+ subtitleStyle: de,
3510
+ drmConfig: fe,
3458
3511
  overlayAdUrl: te,
3459
3512
  adTrackingUrl: ee,
3460
- videoId: b,
3461
- urlTransformer: We,
3462
- onAnalyticsEvent: ot,
3463
- onAdBreakChange: st,
3464
- onKeyMomentsLoaded: ct,
3465
- initialTime: ge,
3466
- onTimeUpdate: lt
3513
+ videoId: Ue,
3514
+ urlTransformer: Ke,
3515
+ onAnalyticsEvent: ct,
3516
+ onAdBreakChange: lt,
3517
+ onKeyMomentsLoaded: ut,
3518
+ initialTime: he,
3519
+ onTimeUpdate: dt
3467
3520
  });
3468
3521
  }
3469
3522
  //#endregion
3470
3523
  //#region src/create-player.ts
3471
3524
  function S(e, t) {
3472
3525
  let n = ne(e), r = t;
3473
- return n.render(i(it, r)), {
3526
+ return n.render(i(ot, r)), {
3474
3527
  update(e) {
3475
3528
  r = {
3476
3529
  ...r,
3477
3530
  ...e
3478
- }, n.render(i(it, r));
3531
+ }, n.render(i(ot, r));
3479
3532
  },
3480
3533
  destroy() {
3481
3534
  n.unmount();
@@ -3483,6 +3536,6 @@ function S(e, t) {
3483
3536
  };
3484
3537
  }
3485
3538
  //#endregion
3486
- export { it as BossVideoPlayer, e as FirebaseAnalyticsProvider, t as VideoPlayerSDK, Ue as WebVideoPlayer, S as createPlayer, Je as endSession, Ge as initSdk, Ye as sendEvent, qe as sendHeartbeat, Ke as startSession };
3539
+ export { ot as BossVideoPlayer, e as FirebaseAnalyticsProvider, t as VideoPlayerSDK, We as WebVideoPlayer, S as createPlayer, Xe as endSession, qe as initSdk, Ze as sendEvent, Ye as sendHeartbeat, Je as startSession };
3487
3540
 
3488
3541
  //# sourceMappingURL=index.js.map