@vindral/web-sdk 4.8.2-10-g2eaf67d3 → 4.8.2-12-g615430ca

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.
@@ -1,10 +1,9 @@
1
- import { t as e } from "./CFqytvUK.js";
2
- import { i as t, n, r, t as i } from "./DSw1XhvD.js";
3
- import { t as a } from "./CXMDq12B.js";
4
- import { t as o } from "./2sSTdNyC.js";
5
- import { C as s, S as c, b as l, i as u, r as ee, t as d, y as f } from "./c9cSjfkk.js";
6
- import { t as p } from "./DZ6JmYgs.js";
7
- //#region \0rolldown/runtime.js
1
+ import { a as e, c as t, i as n, n as r, o as i, r as a, s as o } from "./CRSfJWky.js";
2
+ import { n as s, t as c } from "./DvtbAkGW.js";
3
+ import { _ as ee } from "./Ce2T9yKc.js";
4
+ import { a as l, i as u, o as d, s as f } from "./Bz5OiWeK.js";
5
+ import { l as p } from "./BeCY4GvT.js";
6
+ // \0rolldown/runtime.js
8
7
  var m = Object.defineProperty, h = (e, t) => {
9
8
  let n = {};
10
9
  for (var r in e) m(n, r, {
@@ -21,7 +20,7 @@ _.innerHTML = `
21
20
  justify-content: center;
22
21
  }
23
22
 
24
- :host([${l.DEBUG_PANEL_OPEN}]) {
23
+ :host([${i.DEBUG_PANEL_OPEN}]) {
25
24
  background: rgba(255, 255, 255, 0.15);
26
25
  }
27
26
  </style>
@@ -30,7 +29,7 @@ _.innerHTML = `
30
29
  <slot name="icon">${te}</slot>
31
30
  </span>
32
31
  `;
33
- var ne = class extends u {
32
+ var ne = class extends n {
34
33
  constructor() {
35
34
  var e;
36
35
  super(), (e = this.shadowRoot) == null || e.appendChild(_.content.cloneNode(!0));
@@ -38,16 +37,15 @@ var ne = class extends u {
38
37
  connectedCallback() {
39
38
  super.connectedCallback(), this.setAttribute("aria-label", "Toggle debug panel");
40
39
  }
41
- handleClick(e) {
42
- this.dispatchEvent(new CustomEvent(f.TOGGLE_DEBUG_PANEL, {
40
+ handleClick(t) {
41
+ this.dispatchEvent(new CustomEvent(e.TOGGLE_DEBUG_PANEL, {
43
42
  bubbles: !0,
44
43
  composed: !0
45
44
  }));
46
45
  }
47
46
  };
48
- g = ne, e(ne, "observedAttributes", [...ee(g, "observedAttributes", g), l.DEBUG_PANEL_OPEN]);
49
- //#endregion
50
- //#region ../../libs/player-next/src/components/DebugPanel.constants.ts
47
+ g = ne, s(ne, "observedAttributes", [...a(g, "observedAttributes", g), i.DEBUG_PANEL_OPEN]);
48
+ // ../../libs/player-next/src/components/DebugPanel.constants.ts
51
49
  var re = "Adaptive around current target", v = [
52
50
  {
53
51
  label: "Ultra-Low",
@@ -69,15 +67,15 @@ var re = "Adaptive around current target", v = [
69
67
  value: 3e3,
70
68
  description: "Maximum stability"
71
69
  }
72
- ], ie = (e) => e <= 350 ? v[0] : e <= 800 ? v[1] : e <= 2e3 ? v[2] : v[3], ae = "vindral:debug-panel-layout:v1", y = [
70
+ ], ie = (e) => e <= 350 ? v[0] : e <= 800 ? v[1] : e <= 2e3 ? v[2] : v[3], ae = "vindral:debug-panel-layout:v1", oe = [
73
71
  "latency-section",
74
72
  "quality-section",
75
73
  "playback-section",
76
74
  "network-section",
77
75
  "stats-section",
78
76
  "events-section"
79
- ], oe = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M18 6 6 18\"/>\n <path d=\"m6 6 12 12\"/>\n</svg>\n", se = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m9 18 6-6-6-6\"/>\n</svg>\n", ce = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m15 18-6-6 6-6\"/>\n</svg>\n", le = document.createElement("template");
80
- le.innerHTML = `
77
+ ], se = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"M18 6 6 18\"/>\n <path d=\"m6 6 12 12\"/>\n</svg>\n", ce = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m9 18 6-6-6-6\"/>\n</svg>\n", le = "\n<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"14\" height=\"14\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\">\n <path d=\"m15 18-6-6 6-6\"/>\n</svg>\n", ue = document.createElement("template");
78
+ ue.innerHTML = `
81
79
  <style>
82
80
  :host {
83
81
  --debug-overlay-controls-reserved-space: var(
@@ -104,7 +102,7 @@ le.innerHTML = `
104
102
  padding-bottom: env(safe-area-inset-bottom);
105
103
  }
106
104
 
107
- :host([${l.DEBUG_PANEL_OPEN}]) {
105
+ :host([${i.DEBUG_PANEL_OPEN}]) {
108
106
  display: block;
109
107
  }
110
108
 
@@ -816,8 +814,8 @@ le.innerHTML = `
816
814
  </button>
817
815
  </div>
818
816
  </div>
819
- <button class="scroll-tabs-btn" type="button" aria-label="Scroll tabs">${se}</button>
820
- <button class="close-btn" type="button" aria-label="Close debug panel">${oe}</button>
817
+ <button class="scroll-tabs-btn" type="button" aria-label="Scroll tabs">${ce}</button>
818
+ <button class="close-btn" type="button" aria-label="Close debug panel">${se}</button>
821
819
  </div>
822
820
 
823
821
  <!-- Latency Section -->
@@ -1018,221 +1016,219 @@ le.innerHTML = `
1018
1016
  </div>
1019
1017
  </div>
1020
1018
  `;
1021
- var ue = le, b = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), de = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), K = /* @__PURE__ */ new WeakSet(), pe = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), be = class extends HTMLElement {
1019
+ var de = ue, y = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), x = /* @__PURE__ */ new WeakMap(), S = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakMap(), w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = /* @__PURE__ */ new WeakMap(), D = /* @__PURE__ */ new WeakMap(), O = /* @__PURE__ */ new WeakMap(), k = /* @__PURE__ */ new WeakMap(), A = /* @__PURE__ */ new WeakMap(), j = /* @__PURE__ */ new WeakMap(), M = /* @__PURE__ */ new WeakMap(), N = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), pe = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakMap(), I = /* @__PURE__ */ new WeakMap(), L = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), H = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), W = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakSet(), me = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), _e = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), xe = class extends HTMLElement {
1022
1020
  constructor() {
1023
- super(), p(this, K), t(this, b, null), t(this, x, []), t(this, S, 2 ** 53 - 1), t(this, C, !0), t(this, w, !0), t(this, T, null), t(this, E, 1500), t(this, D, 0), t(this, O, null), t(this, de, !1), t(this, k, []), t(this, A, 0), t(this, j, !1), t(this, M, null), t(this, N, /* @__PURE__ */ new Map()), t(this, P, []), t(this, F, []), t(this, I, []), t(this, fe, []), t(this, L, null), t(this, R, null), t(this, z, null), t(this, B, null), t(this, V, null), t(this, H, !1), t(this, U, null), t(this, W, null), t(this, G, null), t(this, pe, (e) => {
1021
+ super(), ee(this, G), f(this, y, null), f(this, b, []), f(this, x, 2 ** 53 - 1), f(this, S, !0), f(this, C, !0), f(this, w, null), f(this, T, 1500), f(this, E, 0), f(this, D, null), f(this, O, !1), f(this, k, []), f(this, A, 0), f(this, j, !1), f(this, M, null), f(this, N, /* @__PURE__ */ new Map()), f(this, P, []), f(this, fe, []), f(this, pe, []), f(this, F, []), f(this, I, null), f(this, L, null), f(this, R, null), f(this, z, null), f(this, B, null), f(this, V, !1), f(this, H, null), f(this, U, null), f(this, W, null), f(this, me, (e) => {
1024
1022
  let t = e === "disconnected" ? "warn" : "info";
1025
- r(K, this, $).call(this, "Connection", `State: ${e}`, t);
1026
- }), t(this, me, (e) => {
1027
- r(K, this, $).call(this, "Playback", `State: ${e}`);
1028
- }), t(this, he, (e) => {
1029
- r(K, this, $).call(this, "Buffer", `${e}`, "warn");
1030
- }), t(this, ge, (e) => {
1023
+ d(G, this, $).call(this, "Connection", `State: ${e}`, t);
1024
+ }), f(this, he, (e) => {
1025
+ d(G, this, $).call(this, "Playback", `State: ${e}`);
1026
+ }), f(this, ge, (e) => {
1027
+ d(G, this, $).call(this, "Buffer", `${e}`, "warn");
1028
+ }), f(this, _e, (e) => {
1031
1029
  let t = e.isFatal() ? "Fatal" : "Non-fatal";
1032
- r(K, this, $).call(this, "Error", `${t}: ${e.message} (${e.code()})`, e.isFatal() ? "error" : "warn");
1033
- }), t(this, _e, (e) => {
1030
+ d(G, this, $).call(this, "Error", `${t}: ${e.message} (${e.code()})`, e.isFatal() ? "error" : "warn");
1031
+ }), f(this, ve, (e) => {
1034
1032
  let t = e.video;
1035
1033
  if (t != null && t.width && t.height) {
1036
- let e = r(K, this, et).call(this, t.frameRate), n = e ? ` @ ${e}fps` : "";
1037
- r(K, this, $).call(this, "Quality", `Rendition: ${t.width}x${t.height}${n}`);
1034
+ let e = d(G, this, et).call(this, t.frameRate), n = e ? ` @ ${e}fps` : "";
1035
+ d(G, this, $).call(this, "Quality", `Rendition: ${t.width}x${t.height}${n}`);
1038
1036
  }
1039
- }), t(this, ve, (e) => {
1040
- r(K, this, $).call(this, "Connection", `Channel ${e ? "live" : "offline"}`);
1041
- }), t(this, ye, (e) => {
1042
- let { key: t, ctrlKey: n, altKey: r, metaKey: i } = e;
1043
- n || r || i || t === "Escape" && (e.preventDefault(), e.stopPropagation(), this.dispatchEvent(new CustomEvent(f.TOGGLE_DEBUG_PANEL, {
1037
+ }), f(this, ye, (e) => {
1038
+ d(G, this, $).call(this, "Connection", `Channel ${e ? "live" : "offline"}`);
1039
+ }), f(this, be, (t) => {
1040
+ let { key: n, ctrlKey: r, altKey: i, metaKey: a } = t;
1041
+ r || i || a || n === "Escape" && (t.preventDefault(), t.stopPropagation(), this.dispatchEvent(new CustomEvent(e.TOGGLE_DEBUG_PANEL, {
1044
1042
  bubbles: !0,
1045
1043
  composed: !0
1046
1044
  })));
1047
- }), this.attachShadow({ mode: "open" }).appendChild(ue.content.cloneNode(!0));
1045
+ }), this.attachShadow({ mode: "open" }).appendChild(de.content.cloneNode(!0));
1048
1046
  }
1049
1047
  connectedCallback() {
1050
1048
  var e;
1051
- n(b, this, this.closest("vindral-controller")), (e = i(b, this)) == null || e.connectListener(this), this.tabIndex = -1, r(K, this, we).call(this), r(K, this, Te).call(this), r(K, this, Ee).call(this), r(K, this, Re).call(this), r(K, this, Ye).call(this), r(K, this, Ot).call(this), r(K, this, St).call(this), r(K, this, qe).call(this), this.setAttribute("data-density", "compact"), r(K, this, je).call(this), r(K, this, Ie).call(this), r(K, this, Le).call(this), r(K, this, Et).call(this), r(K, this, ot).call(this), this.addEventListener("keydown", i(ye, this)), this.addEventListener("dblclick", (e) => e.stopPropagation());
1049
+ l(y, this, this.closest("vindral-controller")), (e = u(y, this)) == null || e.connectListener(this), this.tabIndex = -1, d(G, this, Te).call(this), d(G, this, Ee).call(this), d(G, this, De).call(this), d(G, this, ze).call(this), d(G, this, Ye).call(this), d(G, this, Ot).call(this), d(G, this, St).call(this), d(G, this, qe).call(this), this.setAttribute("data-density", "compact"), d(G, this, Me).call(this), d(G, this, Le).call(this), d(G, this, Re).call(this), d(G, this, Et).call(this), d(G, this, ot).call(this), this.addEventListener("keydown", u(be, this)), this.addEventListener("dblclick", (e) => e.stopPropagation());
1052
1050
  }
1053
1051
  disconnectedCallback() {
1054
1052
  var e;
1055
- (e = i(b, this)) == null || e.disconnectListener(this), this.removeEventListener("keydown", i(ye, this)), r(K, this, it).call(this), r(K, this, st).call(this), r(K, this, Fe).call(this), i(N, this).clear();
1053
+ (e = u(y, this)) == null || e.disconnectListener(this), this.removeEventListener("keydown", u(be, this)), d(G, this, it).call(this), d(G, this, st).call(this), d(G, this, Ie).call(this), u(N, this).clear();
1056
1054
  }
1057
- attributeChangedCallback(e, t, a) {
1058
- if (t !== a) switch (e) {
1059
- case l.DEBUG_PANEL_OPEN:
1060
- a === null ? r(K, this, it).call(this) : (r(K, this, rt).call(this), this.focus({ preventScroll: !0 }));
1055
+ attributeChangedCallback(e, t, n) {
1056
+ if (t !== n) switch (e) {
1057
+ case i.DEBUG_PANEL_OPEN:
1058
+ n === null ? d(G, this, it).call(this) : (d(G, this, rt).call(this), this.focus({ preventScroll: !0 }));
1061
1059
  break;
1062
- case l.TARGET_BUFFER_TIME:
1063
- if (a) {
1064
- let e = parseInt(a, 10);
1065
- Number.isNaN(e) || (e !== i(E, this) && r(K, this, $).call(this, "Latency", `Target buffer set to ${e}ms`), n(E, this, e), r(K, this, Z).call(this));
1060
+ case i.TARGET_BUFFER_TIME:
1061
+ if (n) {
1062
+ let e = parseInt(n, 10);
1063
+ Number.isNaN(e) || (e !== u(T, this) && d(G, this, $).call(this, "Latency", `Target buffer set to ${e}ms`), l(T, this, e), d(G, this, Z).call(this));
1066
1064
  }
1067
1065
  break;
1068
- case l.DRIFT:
1069
- if (a) {
1070
- let e = parseFloat(a);
1071
- Number.isNaN(e) || (n(D, this, e), r(K, this, Je).call(this));
1066
+ case i.DRIFT:
1067
+ if (n) {
1068
+ let e = parseFloat(n);
1069
+ Number.isNaN(e) || (l(E, this, e), d(G, this, Je).call(this));
1072
1070
  }
1073
1071
  break;
1074
- case l.RENDITION_LEVELS:
1075
- if (a) try {
1076
- let e = JSON.parse(a);
1077
- Array.isArray(e) && (n(x, this, e), r(K, this, $e).call(this));
1072
+ case i.RENDITION_LEVELS:
1073
+ if (n) try {
1074
+ let e = JSON.parse(n);
1075
+ Array.isArray(e) && (l(b, this, e), d(G, this, $e).call(this));
1078
1076
  } catch (e) {}
1079
1077
  break;
1080
- case l.MAX_VIDEO_BITRATE:
1081
- n(S, this, a ? parseInt(a, 10) : 2 ** 53 - 1), Number.isNaN(i(S, this)) && n(S, this, 2 ** 53 - 1), r(K, this, tt).call(this);
1078
+ case i.MAX_VIDEO_BITRATE:
1079
+ l(x, this, n ? parseInt(n, 10) : 2 ** 53 - 1), Number.isNaN(u(x, this)) && l(x, this, 2 ** 53 - 1), d(G, this, tt).call(this);
1082
1080
  break;
1083
- case l.ABR_ENABLED:
1084
- n(C, this, a !== null && a !== "false"), r(K, this, Ze).call(this), r(K, this, Qe).call(this);
1081
+ case i.ABR_ENABLED:
1082
+ l(S, this, n !== null && n !== "false"), d(G, this, Ze).call(this), d(G, this, Qe).call(this);
1085
1083
  break;
1086
- case l.SIZE_BASED_RESOLUTION_CAP_ENABLED:
1087
- n(w, this, a !== null && a !== "false"), r(K, this, Qe).call(this);
1088
- break;
1089
- case l.RENDITION_LEVEL:
1090
- if (a) try {
1091
- var o;
1092
- let e = JSON.parse(a), t = i(T, this);
1093
- if (n(T, this, e), r(K, this, tt).call(this), t && (o = e.video) != null && o.width && e.video.height) {
1094
- let n = t.video ? `${t.video.width}x${t.video.height}` : "?", i = `${e.video.width}x${e.video.height}`;
1095
- n !== i && r(K, this, $).call(this, "Quality", `Switched: ${n} → ${i}`);
1096
- }
1097
- } catch (e) {}
1084
+ case i.SIZE_BASED_RESOLUTION_CAP_ENABLED:
1085
+ l(C, this, n !== null && n !== "false"), d(G, this, Qe).call(this);
1098
1086
  break;
1087
+ case i.RENDITION_LEVEL: if (n) try {
1088
+ var r;
1089
+ let e = JSON.parse(n), t = u(w, this);
1090
+ if (l(w, this, e), d(G, this, tt).call(this), t && (r = e.video) != null && r.width && e.video.height) {
1091
+ let n = t.video ? `${t.video.width}x${t.video.height}` : "?", r = `${e.video.width}x${e.video.height}`;
1092
+ n !== r && d(G, this, $).call(this, "Quality", `Switched: ${n} → ${r}`);
1093
+ }
1094
+ } catch (e) {}
1099
1095
  }
1100
1096
  }
1101
1097
  };
1102
- function q(e) {
1098
+ function K(e) {
1103
1099
  if (!this.shadowRoot) return null;
1104
- if (i(N, this).has(e)) return i(N, this).get(e);
1100
+ if (u(N, this).has(e)) return u(N, this).get(e);
1105
1101
  let t = this.shadowRoot.querySelector(e);
1106
- return i(N, this).set(e, t), t;
1102
+ return u(N, this).set(e, t), t;
1107
1103
  }
1108
- function J(e, t) {
1109
- !e || e.textContent === t || (e.textContent = t);
1104
+ function q(e, t) {
1105
+ e && e.textContent !== t && (e.textContent = t);
1110
1106
  }
1111
- function xe() {
1112
- var e, t, r, a, o, s, c;
1113
- n(P, this, Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll("#latency-strip-target")) || [])), n(F, this, Array.from(((t = this.shadowRoot) == null ? void 0 : t.querySelectorAll("#latency-strip-decrease")) || [])), n(I, this, Array.from(((r = this.shadowRoot) == null ? void 0 : r.querySelectorAll("#latency-strip-increase")) || [])), n(fe, this, Array.from(((a = this.shadowRoot) == null ? void 0 : a.querySelectorAll(".preset-btn[data-value]")) || [])), n(L, this, ((o = this.shadowRoot) == null ? void 0 : o.querySelector(".preset-btn[data-mode=\"dynamic\"]")) || null), n(R, this, ((s = i(L, this)) == null ? void 0 : s.querySelector(".dynamic-subtitle")) || null), n(z, this, ((c = i(L, this)) == null ? void 0 : c.querySelector(".dynamic-value")) || null);
1107
+ function Se() {
1108
+ var e, t, n, r, i, a, o;
1109
+ l(P, this, Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll("#latency-strip-target")) || [])), l(fe, this, Array.from(((t = this.shadowRoot) == null ? void 0 : t.querySelectorAll("#latency-strip-decrease")) || [])), l(pe, this, Array.from(((n = this.shadowRoot) == null ? void 0 : n.querySelectorAll("#latency-strip-increase")) || [])), l(F, this, Array.from(((r = this.shadowRoot) == null ? void 0 : r.querySelectorAll(".preset-btn[data-value]")) || [])), l(I, this, ((i = this.shadowRoot) == null ? void 0 : i.querySelector(".preset-btn[data-mode=\"dynamic\"]")) || null), l(L, this, ((a = u(I, this)) == null ? void 0 : a.querySelector(".dynamic-subtitle")) || null), l(R, this, ((o = u(I, this)) == null ? void 0 : o.querySelector(".dynamic-value")) || null);
1114
1110
  }
1115
- function Se(e) {
1111
+ function Ce(e) {
1116
1112
  var t;
1117
1113
  let n = (t = this.shadowRoot) == null ? void 0 : t.querySelector(`.section#${e}`);
1118
1114
  return !!n && !n.hidden;
1119
1115
  }
1120
- function Ce() {
1121
- let e = `${i(k, this).length} event${i(k, this).length === 1 ? "" : "s"}`;
1122
- r(K, this, J).call(this, i(V, this), e), r(K, this, Y).call(this, "events-section", String(i(k, this).length));
1123
- }
1124
1116
  function we() {
1125
- let e = r(K, this, q).call(this, ".close-btn");
1126
- e == null || e.addEventListener("click", (e) => {
1127
- e.stopPropagation(), this.dispatchEvent(new CustomEvent(f.TOGGLE_DEBUG_PANEL, {
1117
+ let e = `${u(k, this).length} event${u(k, this).length === 1 ? "" : "s"}`;
1118
+ d(G, this, q).call(this, u(B, this), e), d(G, this, J).call(this, "events-section", String(u(k, this).length));
1119
+ }
1120
+ function Te() {
1121
+ let t = d(G, this, K).call(this, ".close-btn");
1122
+ t == null || t.addEventListener("click", (t) => {
1123
+ t.stopPropagation(), this.dispatchEvent(new CustomEvent(e.TOGGLE_DEBUG_PANEL, {
1128
1124
  bubbles: !0,
1129
1125
  composed: !0
1130
1126
  }));
1131
1127
  });
1132
1128
  }
1133
- function Te() {
1129
+ function Ee() {
1134
1130
  var e;
1135
1131
  let t = Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section-tab[data-target]")) || []);
1136
1132
  t.length !== 0 && t.forEach((e) => {
1137
1133
  e.addEventListener("click", (t) => {
1138
1134
  t.stopPropagation();
1139
1135
  let n = e.getAttribute("data-target");
1140
- n && r(K, this, X).call(this, n) && r(K, this, Oe).call(this, n);
1136
+ n && d(G, this, Y).call(this, n) && d(G, this, ke).call(this, n);
1141
1137
  });
1142
1138
  });
1143
1139
  }
1144
- function Ee() {
1145
- n(U, this, r(K, this, q).call(this, ".scroll-tabs-btn")), n(W, this, r(K, this, q).call(this, ".section-tabs-wrap")), n(G, this, r(K, this, q).call(this, ".section-tabs")), !(!i(U, this) || !i(G, this) || !i(W, this)) && (i(G, this).addEventListener("scroll", () => r(K, this, De).call(this), { passive: !0 }), i(U, this).addEventListener("click", (e) => {
1146
- if (e.stopPropagation(), !i(G, this)) return;
1147
- let { scrollLeft: t, scrollWidth: n, clientWidth: r } = i(G, this), a = t + r >= n - 4;
1148
- i(G, this).scrollTo({
1149
- left: a ? 0 : n,
1140
+ function De() {
1141
+ l(H, this, d(G, this, K).call(this, ".scroll-tabs-btn")), l(U, this, d(G, this, K).call(this, ".section-tabs-wrap")), l(W, this, d(G, this, K).call(this, ".section-tabs")), u(H, this) && u(W, this) && u(U, this) && (u(W, this).addEventListener("scroll", () => d(G, this, Oe).call(this), { passive: !0 }), u(H, this).addEventListener("click", (e) => {
1142
+ if (e.stopPropagation(), !u(W, this)) return;
1143
+ let { scrollLeft: t, scrollWidth: n, clientWidth: r } = u(W, this), i = t + r >= n - 4;
1144
+ u(W, this).scrollTo({
1145
+ left: i ? 0 : n,
1150
1146
  behavior: "smooth"
1151
1147
  });
1152
- }), r(K, this, De).call(this));
1148
+ }), d(G, this, Oe).call(this));
1153
1149
  }
1154
- function De() {
1155
- if (!i(U, this) || !i(G, this) || !i(W, this)) return;
1156
- let { scrollLeft: e, scrollWidth: t, clientWidth: n } = i(G, this), r = t > n + 4, a = e + n >= t - 4;
1157
- i(U, this).setAttribute("data-visible", String(r)), i(U, this).innerHTML = a ? ce : se, r && !a ? i(W, this).setAttribute("data-can-scroll-right", "") : i(W, this).removeAttribute("data-can-scroll-right");
1150
+ function Oe() {
1151
+ if (!u(H, this) || !u(W, this) || !u(U, this)) return;
1152
+ let { scrollLeft: e, scrollWidth: t, clientWidth: n } = u(W, this), r = t > n + 4, i = e + n >= t - 4;
1153
+ u(H, this).setAttribute("data-visible", String(r)), u(H, this).innerHTML = i ? le : ce, r && !i ? u(U, this).setAttribute("data-can-scroll-right", "") : u(U, this).removeAttribute("data-can-scroll-right");
1158
1154
  }
1159
- function Oe(e) {
1160
- r(K, this, ke).call(this, e, !r(K, this, Se).call(this, e));
1155
+ function ke(e) {
1156
+ d(G, this, Ae).call(this, e, !d(G, this, Ce).call(this, e));
1161
1157
  }
1162
- function ke(e, t) {
1163
- let n = r(K, this, q).call(this, `.section#${e}`);
1158
+ function Ae(e, t) {
1159
+ let n = d(G, this, K).call(this, `.section#${e}`);
1164
1160
  if (!n) return;
1165
- let a = !n.hidden;
1161
+ let r = !n.hidden;
1166
1162
  n.hidden = !t;
1167
- let o = r(K, this, q).call(this, `.section-tab[data-target="${e}"]`);
1168
- o && (o.setAttribute("data-active", String(t)), o.setAttribute("aria-pressed", String(t)), !i(de, this) && a !== t && r(K, this, Fe).call(this), e === "events-section" && t && i(H, this) && r(K, this, Et).call(this, !0), r(K, this, Ae).call(this));
1169
- }
1170
- function Ae() {
1171
- r(K, this, Me).call(this).length === 0 ? this.setAttribute("data-collapsed", "") : this.removeAttribute("data-collapsed");
1163
+ let i = d(G, this, K).call(this, `.section-tab[data-target="${e}"]`);
1164
+ i && (i.setAttribute("data-active", String(t)), i.setAttribute("aria-pressed", String(t)), !u(O, this) && r !== t && d(G, this, Ie).call(this), e === "events-section" && t && u(V, this) && d(G, this, Et).call(this, !0), d(G, this, je).call(this));
1172
1165
  }
1173
1166
  function je() {
1167
+ d(G, this, Ne).call(this).length === 0 ? this.setAttribute("data-collapsed", "") : this.removeAttribute("data-collapsed");
1168
+ }
1169
+ function Me() {
1174
1170
  var e;
1175
1171
  Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section[id]")) || []).forEach((e) => {
1176
- r(K, this, X).call(this, e.id) && r(K, this, ke).call(this, e.id, !e.hidden);
1172
+ d(G, this, Y).call(this, e.id) && d(G, this, Ae).call(this, e.id, !e.hidden);
1177
1173
  });
1178
1174
  }
1179
- function Y(e, t) {
1180
- let n = r(K, this, q).call(this, `.section-badge[data-badge-for="${e}"]`);
1175
+ function J(e, t) {
1176
+ let n = d(G, this, K).call(this, `.section-badge[data-badge-for="${e}"]`);
1181
1177
  if (!n) return;
1182
- r(K, this, J).call(this, n, t);
1183
- let i = r(K, this, q).call(this, `.section-tab[data-target="${e}"]`);
1184
- if (!i) return;
1185
- let a = `${i.getAttribute("title") || e} section (${t})`;
1186
- i.getAttribute("aria-label") !== a && i.setAttribute("aria-label", a);
1178
+ d(G, this, q).call(this, n, t);
1179
+ let r = d(G, this, K).call(this, `.section-tab[data-target="${e}"]`);
1180
+ if (!r) return;
1181
+ let i = `${r.getAttribute("title") || e} section (${t})`;
1182
+ r.getAttribute("aria-label") !== i && r.setAttribute("aria-label", i);
1187
1183
  }
1188
- function X(e) {
1189
- return y.includes(e);
1184
+ function Y(e) {
1185
+ return oe.includes(e);
1190
1186
  }
1191
- function Me() {
1187
+ function Ne() {
1192
1188
  var e;
1193
- return Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section[id]")) || []).filter((e) => r(K, this, X).call(this, e.id) && !e.hidden).map((e) => e.id);
1189
+ return Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section[id]")) || []).filter((e) => d(G, this, Y).call(this, e.id) && !e.hidden).map((e) => e.id);
1194
1190
  }
1195
- function Ne() {
1191
+ function Pe() {
1196
1192
  var e;
1197
- return Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section-tab[data-target]")) || []).map((e) => e.getAttribute("data-target")).filter((e) => typeof e == "string" && r(K, this, X).call(this, e));
1193
+ return Array.from(((e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".section-tab[data-target]")) || []).map((e) => e.getAttribute("data-target")).filter((e) => typeof e == "string" && d(G, this, Y).call(this, e));
1198
1194
  }
1199
- function Pe(e) {
1195
+ function Fe(e) {
1200
1196
  var t;
1201
1197
  let n = (t = this.shadowRoot) == null ? void 0 : t.querySelector(".section-tabs");
1202
1198
  if (!n || !this.shadowRoot) return;
1203
- let i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
1199
+ let r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map();
1204
1200
  Array.from(n.querySelectorAll(".section-tab[data-target]")).forEach((e) => {
1205
1201
  let t = e.getAttribute("data-target");
1206
- t && r(K, this, X).call(this, t) && i.set(t, e);
1207
- }), y.forEach((e) => {
1202
+ t && d(G, this, Y).call(this, t) && r.set(t, e);
1203
+ }), oe.forEach((e) => {
1208
1204
  var t;
1209
1205
  let n = (t = this.shadowRoot) == null ? void 0 : t.querySelector(`.section#${e}`);
1210
- n && a.set(e, n);
1206
+ n && i.set(e, n);
1211
1207
  });
1212
- let o = [...e, ...y.filter((t) => !e.includes(t))];
1213
- o.forEach((e) => {
1214
- let t = i.get(e);
1208
+ let a = [...e, ...oe.filter((t) => !e.includes(t))];
1209
+ a.forEach((e) => {
1210
+ let t = r.get(e);
1215
1211
  t && n.appendChild(t);
1216
- }), o.forEach((e) => {
1217
- let t = a.get(e);
1212
+ }), a.forEach((e) => {
1213
+ let t = i.get(e);
1218
1214
  if (t) {
1219
1215
  var n;
1220
1216
  (n = this.shadowRoot) == null || n.appendChild(t);
1221
1217
  }
1222
1218
  });
1223
1219
  }
1224
- function Fe() {
1220
+ function Ie() {
1225
1221
  if (!this.shadowRoot) return;
1226
1222
  let e = {
1227
1223
  version: 1,
1228
- openSections: r(K, this, Me).call(this),
1229
- sectionOrder: r(K, this, Ne).call(this)
1224
+ openSections: d(G, this, Ne).call(this),
1225
+ sectionOrder: d(G, this, Pe).call(this)
1230
1226
  };
1231
1227
  try {
1232
1228
  sessionStorage.setItem(ae, JSON.stringify(e));
1233
1229
  } catch (e) {}
1234
1230
  }
1235
- function Ie() {
1231
+ function Le() {
1236
1232
  let e = null;
1237
1233
  try {
1238
1234
  e = sessionStorage.getItem(ae);
@@ -1247,249 +1243,237 @@ function Ie() {
1247
1243
  return;
1248
1244
  }
1249
1245
  if (!t || typeof t != "object") return;
1250
- let i = Array.isArray(t.openSections) ? t.openSections.filter((e) => typeof e == "string" && r(K, this, X).call(this, e)) : [], a = Array.isArray(t.sectionOrder) ? t.sectionOrder.filter((e) => typeof e == "string" && r(K, this, X).call(this, e)) : [];
1251
- n(de, this, !0);
1246
+ let n = Array.isArray(t.openSections) ? t.openSections.filter((e) => typeof e == "string" && d(G, this, Y).call(this, e)) : [], r = Array.isArray(t.sectionOrder) ? t.sectionOrder.filter((e) => typeof e == "string" && d(G, this, Y).call(this, e)) : [];
1247
+ l(O, this, !0);
1252
1248
  try {
1253
- if (a.length > 0 && r(K, this, Pe).call(this, a), Array.isArray(t.openSections)) {
1254
- let e = new Set(i);
1255
- y.forEach((t) => {
1256
- r(K, this, ke).call(this, t, e.has(t));
1249
+ if (r.length > 0 && d(G, this, Fe).call(this, r), Array.isArray(t.openSections)) {
1250
+ let e = new Set(n);
1251
+ oe.forEach((t) => {
1252
+ d(G, this, Ae).call(this, t, e.has(t));
1257
1253
  });
1258
1254
  }
1259
- r(K, this, je).call(this);
1255
+ d(G, this, Me).call(this);
1260
1256
  } finally {
1261
- n(de, this, !1);
1257
+ l(O, this, !1);
1262
1258
  }
1263
- r(K, this, Fe).call(this);
1264
- }
1265
- function Le() {
1266
- r(K, this, Y).call(this, "latency-section", "Drift -"), r(K, this, Y).call(this, "quality-section", "Auto"), r(K, this, Y).call(this, "playback-section", "Buffer -"), r(K, this, Y).call(this, "network-section", "RTT -"), r(K, this, Y).call(this, "stats-section", "Up -"), r(K, this, Y).call(this, "events-section", `${i(k, this).length}`);
1259
+ d(G, this, Ie).call(this);
1267
1260
  }
1268
1261
  function Re() {
1269
- r(K, this, xe).call(this), i(F, this).forEach((e) => {
1262
+ d(G, this, J).call(this, "latency-section", "Drift -"), d(G, this, J).call(this, "quality-section", "Auto"), d(G, this, J).call(this, "playback-section", "Buffer -"), d(G, this, J).call(this, "network-section", "RTT -"), d(G, this, J).call(this, "stats-section", "Up -"), d(G, this, J).call(this, "events-section", `${u(k, this).length}`);
1263
+ }
1264
+ function ze() {
1265
+ d(G, this, Se).call(this), u(fe, this).forEach((e) => {
1270
1266
  e.addEventListener("click", (e) => {
1271
- e.stopPropagation(), r(K, this, Be).call(this, -r(K, this, ze).call(this, !1));
1267
+ e.stopPropagation(), d(G, this, Ve).call(this, -d(G, this, Be).call(this, !1));
1272
1268
  });
1273
- }), i(I, this).forEach((e) => {
1269
+ }), u(pe, this).forEach((e) => {
1274
1270
  e.addEventListener("click", (e) => {
1275
- e.stopPropagation(), r(K, this, Be).call(this, r(K, this, ze).call(this, !0));
1271
+ e.stopPropagation(), d(G, this, Ve).call(this, d(G, this, Be).call(this, !0));
1276
1272
  });
1277
1273
  });
1278
1274
  }
1279
- function ze(e) {
1280
- let t = i(E, this);
1281
- return e ? t >= 1e3 ? 250 : t >= 500 ? 100 : 50 : t > 1e3 ? 250 : t > 500 ? 100 : 50;
1282
- }
1283
1275
  function Be(e) {
1284
- let t = Math.max(50, Math.min(d, i(E, this) + e));
1285
- t !== i(E, this) && (n(E, this, t), r(K, this, Ve).call(this, t), r(K, this, Ue).call(this), r(K, this, Z).call(this));
1276
+ let t = u(T, this);
1277
+ return e ? t >= 1e3 ? 250 : t >= 500 ? 100 : 50 : t > 1e3 ? 250 : t > 500 ? 100 : 50;
1286
1278
  }
1287
1279
  function Ve(e) {
1288
- if (!i(b, this)) return;
1289
- let { isDynamic: t, minBuffer: n, maxBuffer: a } = r(K, this, He).call(this);
1290
- t && (e < n ? i(b, this).setAttribute("min-buffer-time", String(e)) : e > a && i(b, this).setAttribute("max-buffer-time", String(e)));
1280
+ let t = Math.max(50, Math.min(r, u(T, this) + e));
1281
+ t !== u(T, this) && (l(T, this, t), d(G, this, He).call(this, t), d(G, this, Ue).call(this), d(G, this, Z).call(this));
1291
1282
  }
1292
- function He() {
1283
+ function He(e) {
1284
+ if (!u(y, this)) return;
1285
+ let { isDynamic: t, minBuffer: n, maxBuffer: r } = d(G, this, X).call(this);
1286
+ t && (e < n ? u(y, this).setAttribute("min-buffer-time", String(e)) : e > r && u(y, this).setAttribute("max-buffer-time", String(e)));
1287
+ }
1288
+ function X() {
1293
1289
  var e, t;
1294
- let n = (e = i(b, this)) == null ? void 0 : e.getAttribute("min-buffer-time"), r = (t = i(b, this)) == null ? void 0 : t.getAttribute("max-buffer-time");
1290
+ let n = (e = u(y, this)) == null ? void 0 : e.getAttribute("min-buffer-time"), r = (t = u(y, this)) == null ? void 0 : t.getAttribute("max-buffer-time");
1295
1291
  if (!n || !r) return {
1296
1292
  isDynamic: !1,
1297
1293
  minBuffer: 0,
1298
1294
  maxBuffer: 0
1299
1295
  };
1300
- let a = Number(n), o = Number(r);
1301
- return Number.isNaN(a) || Number.isNaN(o) ? {
1296
+ let i = Number(n), a = Number(r);
1297
+ return Number.isNaN(i) || Number.isNaN(a) ? {
1302
1298
  isDynamic: !1,
1303
1299
  minBuffer: 0,
1304
1300
  maxBuffer: 0
1305
1301
  } : {
1306
- isDynamic: a !== o,
1307
- minBuffer: a,
1308
- maxBuffer: o
1302
+ isDynamic: i !== a,
1303
+ minBuffer: i,
1304
+ maxBuffer: a
1309
1305
  };
1310
1306
  }
1311
1307
  function Ue() {
1312
- this.dispatchEvent(new CustomEvent(f.SET_TARGET_BUFFER_TIME, {
1308
+ this.dispatchEvent(new CustomEvent(e.SET_TARGET_BUFFER_TIME, {
1313
1309
  bubbles: !0,
1314
1310
  composed: !0,
1315
- detail: i(E, this)
1311
+ detail: u(T, this)
1316
1312
  }));
1317
1313
  }
1318
1314
  function We(e) {
1319
- if (r(K, this, He).call(this).isDynamic) {
1320
- r(K, this, Ke).call(this, e), r(K, this, Z).call(this);
1321
- return;
1322
- }
1323
- n(E, this, e), r(K, this, Ue).call(this), r(K, this, Z).call(this);
1315
+ d(G, this, X).call(this).isDynamic ? (d(G, this, Ke).call(this, e), d(G, this, Z).call(this)) : (l(T, this, e), d(G, this, Ue).call(this), d(G, this, Z).call(this));
1324
1316
  }
1325
1317
  function Ge() {
1326
- if (r(K, this, He).call(this).isDynamic || !i(b, this)) return;
1327
- let e = Math.max(50, Math.min(d, i(E, this))), t = Math.max(50, e - 100), n = Math.min(d, e + 100);
1328
- t === n && n < 5e3 ? n = Math.min(d, n + 100) : t === n && t > 50 && (t = Math.max(50, t - 100)), i(b, this).setAttribute("min-buffer-time", String(t)), i(b, this).setAttribute("max-buffer-time", String(n)), r(K, this, Ue).call(this), r(K, this, Z).call(this);
1318
+ if (d(G, this, X).call(this).isDynamic || !u(y, this)) return;
1319
+ let e = Math.max(50, Math.min(r, u(T, this))), t = Math.max(50, e - 100), n = Math.min(r, e + 100);
1320
+ t === n && n < 5e3 ? n = Math.min(r, n + 100) : t === n && t > 50 && (t = Math.max(50, t - 100)), u(y, this).setAttribute("min-buffer-time", String(t)), u(y, this).setAttribute("max-buffer-time", String(n)), d(G, this, Ue).call(this), d(G, this, Z).call(this);
1329
1321
  }
1330
1322
  function Ke(e) {
1331
- if (!i(b, this)) return;
1332
- let t = Math.max(50, Math.min(d, e));
1333
- n(E, this, t);
1334
- let a = String(t);
1335
- i(b, this).setAttribute("min-buffer-time", a), i(b, this).setAttribute("max-buffer-time", a), r(K, this, Ue).call(this);
1323
+ if (!u(y, this)) return;
1324
+ let t = Math.max(50, Math.min(r, e));
1325
+ l(T, this, t);
1326
+ let n = String(t);
1327
+ u(y, this).setAttribute("min-buffer-time", n), u(y, this).setAttribute("max-buffer-time", n), d(G, this, Ue).call(this);
1336
1328
  }
1337
1329
  function qe() {
1338
- let e = r(K, this, q).call(this, "#latency-presets");
1330
+ let e = d(G, this, K).call(this, "#latency-presets");
1339
1331
  if (!e) return;
1340
1332
  e.innerHTML = "", v.forEach((t) => {
1341
1333
  let n = document.createElement("button");
1342
1334
  n.className = "preset-btn", n.type = "button", n.setAttribute("data-value", String(t.value)), n.setAttribute("aria-label", `${t.label} preset (${t.value}ms)`);
1335
+ let r = document.createElement("span");
1336
+ r.className = "preset-title", r.textContent = t.label, n.appendChild(r);
1343
1337
  let i = document.createElement("span");
1344
- i.className = "preset-title", i.textContent = t.label, n.appendChild(i);
1338
+ i.className = "preset-subtitle", i.textContent = t.description, n.appendChild(i);
1345
1339
  let a = document.createElement("span");
1346
- a.className = "preset-subtitle", a.textContent = t.description, n.appendChild(a);
1347
- let o = document.createElement("span");
1348
- o.className = "preset-value", o.textContent = `${t.value}ms`, n.appendChild(o), n.addEventListener("click", (e) => {
1349
- e.stopPropagation(), r(K, this, We).call(this, t.value);
1340
+ a.className = "preset-value", a.textContent = `${t.value}ms`, n.appendChild(a), n.addEventListener("click", (e) => {
1341
+ e.stopPropagation(), d(G, this, We).call(this, t.value);
1350
1342
  }), e.appendChild(n);
1351
1343
  });
1352
1344
  let t = document.createElement("button");
1353
1345
  t.type = "button", t.className = "preset-btn dynamic-btn", t.setAttribute("data-mode", "dynamic"), t.setAttribute("aria-label", "Enable dynamic buffer mode");
1354
1346
  let n = document.createElement("span");
1355
1347
  n.className = "preset-title", n.textContent = "Dynamic", t.appendChild(n);
1348
+ let r = document.createElement("span");
1349
+ r.className = "preset-subtitle dynamic-subtitle", t.appendChild(r);
1356
1350
  let i = document.createElement("span");
1357
- i.className = "preset-subtitle dynamic-subtitle", t.appendChild(i);
1358
- let a = document.createElement("span");
1359
- a.className = "preset-value dynamic-value", t.appendChild(a), t.addEventListener("click", (e) => {
1360
- e.stopPropagation(), r(K, this, Ge).call(this);
1361
- }), e.appendChild(t), r(K, this, xe).call(this), r(K, this, Z).call(this);
1351
+ i.className = "preset-value dynamic-value", t.appendChild(i), t.addEventListener("click", (e) => {
1352
+ e.stopPropagation(), d(G, this, Ge).call(this);
1353
+ }), e.appendChild(t), d(G, this, Se).call(this), d(G, this, Z).call(this);
1362
1354
  }
1363
1355
  function Z() {
1364
- i(P, this).length === 0 && r(K, this, xe).call(this);
1365
- let { isDynamic: e, minBuffer: t, maxBuffer: n } = r(K, this, He).call(this);
1366
- if (i(P, this).forEach((e) => {
1367
- r(K, this, J).call(this, e, `${i(E, this)}ms`);
1368
- }), i(F, this).forEach((e) => {
1369
- e.disabled = i(E, this) <= 50;
1370
- }), i(I, this).forEach((e) => {
1371
- e.disabled = i(E, this) >= d;
1372
- }), i(L, this) && i(L, this).setAttribute("data-active", String(e)), i(R, this) && r(K, this, J).call(this, i(R, this), e ? `${t}ms - ${n}ms` : re), i(z, this) && r(K, this, J).call(this, i(z, this), e ? "range" : ""), i(fe, this).length === 0) return;
1373
- let a = null;
1356
+ u(P, this).length === 0 && d(G, this, Se).call(this);
1357
+ let { isDynamic: e, minBuffer: t, maxBuffer: n } = d(G, this, X).call(this);
1358
+ if (u(P, this).forEach((e) => {
1359
+ d(G, this, q).call(this, e, `${u(T, this)}ms`);
1360
+ }), u(fe, this).forEach((e) => {
1361
+ e.disabled = u(T, this) <= 50;
1362
+ }), u(pe, this).forEach((e) => {
1363
+ e.disabled = u(T, this) >= r;
1364
+ }), u(I, this) && u(I, this).setAttribute("data-active", String(e)), u(L, this) && d(G, this, q).call(this, u(L, this), e ? `${t}ms - ${n}ms` : re), u(R, this) && d(G, this, q).call(this, u(R, this), e ? "range" : ""), u(F, this).length === 0) return;
1365
+ let i = null;
1374
1366
  if (!e) {
1375
- let e = v.find((e) => e.value === i(E, this)), t = ie(i(E, this)), n = v.reduce((e, t) => Math.abs(t.value - i(E, this)) < Math.abs(e.value - i(E, this)) ? t : e);
1376
- a = e || t || n;
1367
+ let e = v.find((e) => e.value === u(T, this)), t = ie(u(T, this)), n = v.reduce((e, t) => Math.abs(t.value - u(T, this)) < Math.abs(e.value - u(T, this)) ? t : e);
1368
+ i = e || t || n;
1377
1369
  }
1378
- i(fe, this).forEach((t) => {
1379
- let n = parseInt(t.getAttribute("data-value") || "0", 10), r = !e && (a == null ? void 0 : a.value) === n;
1370
+ u(F, this).forEach((t) => {
1371
+ let n = parseInt(t.getAttribute("data-value") || "0", 10), r = !e && (i == null ? void 0 : i.value) === n;
1380
1372
  t.setAttribute("data-active", String(r));
1381
1373
  });
1382
1374
  }
1383
1375
  function Je() {
1384
- let e = r(K, this, q).call(this, "#current-drift"), t = `${i(D, this).toFixed(1)}ms`;
1376
+ let e = d(G, this, K).call(this, "#current-drift"), t = `${u(E, this).toFixed(1)}ms`;
1385
1377
  if (e) {
1386
- r(K, this, J).call(this, e, t);
1387
- let n = Math.abs(i(D, this));
1378
+ d(G, this, q).call(this, e, t);
1379
+ let n = Math.abs(u(E, this));
1388
1380
  n > 200 ? e.setAttribute("data-status", "error") : n > 100 ? e.setAttribute("data-status", "warning") : e.setAttribute("data-status", "good");
1389
1381
  }
1390
- let n = i(D, this) > 0 ? `+${t}` : t;
1391
- r(K, this, Y).call(this, "latency-section", `Drift ${n}`);
1382
+ let n = u(E, this) > 0 ? `+${t}` : t;
1383
+ d(G, this, J).call(this, "latency-section", `Drift ${n}`);
1392
1384
  }
1393
1385
  function Ye() {
1394
- let e = r(K, this, q).call(this, "#abr-auto-btn"), t = r(K, this, q).call(this, "#abr-fixed-btn");
1395
- e == null || e.addEventListener("click", (e) => {
1396
- e.stopPropagation(), n(C, this, !0), r(K, this, Ze).call(this), this.dispatchEvent(new CustomEvent(f.SET_ABR_MODE, {
1386
+ let t = d(G, this, K).call(this, "#abr-auto-btn"), n = d(G, this, K).call(this, "#abr-fixed-btn");
1387
+ t == null || t.addEventListener("click", (t) => {
1388
+ t.stopPropagation(), l(S, this, !0), d(G, this, Ze).call(this), this.dispatchEvent(new CustomEvent(e.SET_ABR_MODE, {
1397
1389
  bubbles: !0,
1398
1390
  composed: !0,
1399
1391
  detail: !0
1400
- })), r(K, this, $).call(this, "Quality", "ABR mode: Auto");
1401
- }), t == null || t.addEventListener("click", (e) => {
1402
- e.stopPropagation();
1403
- let t = r(K, this, Xe).call(this);
1404
- t && this.dispatchEvent(new CustomEvent(f.SET_RENDITION, {
1392
+ })), d(G, this, $).call(this, "Quality", "ABR mode: Auto");
1393
+ }), n == null || n.addEventListener("click", (t) => {
1394
+ t.stopPropagation();
1395
+ let n = d(G, this, Xe).call(this);
1396
+ n && this.dispatchEvent(new CustomEvent(e.SET_RENDITION, {
1405
1397
  bubbles: !0,
1406
1398
  composed: !0,
1407
- detail: t
1408
- })), n(C, this, !1), r(K, this, Ze).call(this), this.dispatchEvent(new CustomEvent(f.SET_ABR_MODE, {
1399
+ detail: n
1400
+ })), l(S, this, !1), d(G, this, Ze).call(this), this.dispatchEvent(new CustomEvent(e.SET_ABR_MODE, {
1409
1401
  bubbles: !0,
1410
1402
  composed: !0,
1411
1403
  detail: !1
1412
- })), r(K, this, $).call(this, "Quality", "ABR mode: Fixed");
1404
+ })), d(G, this, $).call(this, "Quality", "ABR mode: Fixed");
1413
1405
  });
1414
- let a = r(K, this, q).call(this, "#size-cap-toggle");
1415
- a == null || a.addEventListener("click", (e) => {
1416
- e.stopPropagation(), n(w, this, !i(w, this)), r(K, this, Qe).call(this), this.dispatchEvent(new CustomEvent(f.SET_SIZE_BASED_RESOLUTION_CAP_MODE, {
1406
+ let r = d(G, this, K).call(this, "#size-cap-toggle");
1407
+ r == null || r.addEventListener("click", (t) => {
1408
+ t.stopPropagation(), l(C, this, !u(C, this)), d(G, this, Qe).call(this), this.dispatchEvent(new CustomEvent(e.SET_SIZE_BASED_RESOLUTION_CAP_MODE, {
1417
1409
  bubbles: !0,
1418
1410
  composed: !0,
1419
- detail: i(w, this)
1420
- })), r(K, this, $).call(this, "Quality", `Size cap: ${i(w, this) ? "On" : "Off"}`);
1411
+ detail: u(C, this)
1412
+ })), d(G, this, $).call(this, "Quality", `Size cap: ${u(C, this) ? "On" : "Off"}`);
1421
1413
  });
1422
1414
  }
1423
1415
  function Xe() {
1424
- let e = [...i(x, this)].sort((e, t) => {
1416
+ let e = [...u(b, this)].sort((e, t) => {
1425
1417
  var n, r;
1426
1418
  return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
1427
1419
  });
1428
1420
  return e.find((e) => {
1429
1421
  var t;
1430
- return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= i(S, this);
1422
+ return ((t = e.video) == null ? void 0 : t.bitRate) && e.video.bitRate <= u(x, this);
1431
1423
  }) || e[e.length - 1] || null;
1432
1424
  }
1433
1425
  function Ze() {
1434
- let e = r(K, this, q).call(this, "#abr-auto-btn"), t = r(K, this, q).call(this, "#abr-fixed-btn"), n = r(K, this, q).call(this, "#quality-status-text");
1435
- e == null || e.setAttribute("data-active", String(i(C, this))), t == null || t.setAttribute("data-active", String(!i(C, this))), n && r(K, this, J).call(this, n, i(C, this) ? "Select maximum allowed quality" : "Select specific quality (may cause buffering)"), r(K, this, tt).call(this);
1426
+ let e = d(G, this, K).call(this, "#abr-auto-btn"), t = d(G, this, K).call(this, "#abr-fixed-btn"), n = d(G, this, K).call(this, "#quality-status-text");
1427
+ e == null || e.setAttribute("data-active", String(u(S, this))), t == null || t.setAttribute("data-active", String(!u(S, this))), n && d(G, this, q).call(this, n, u(S, this) ? "Select maximum allowed quality" : "Select specific quality (may cause buffering)"), d(G, this, tt).call(this);
1436
1428
  }
1437
1429
  function Qe() {
1438
- let e = r(K, this, q).call(this, "#size-cap-toggle");
1439
- e && (e.textContent = i(w, this) ? "On" : "Off", e.setAttribute("data-active", String(i(w, this))), e.disabled = !i(C, this));
1430
+ let e = d(G, this, K).call(this, "#size-cap-toggle");
1431
+ e && (e.textContent = u(C, this) ? "On" : "Off", e.setAttribute("data-active", String(u(C, this))), e.disabled = !u(S, this));
1440
1432
  }
1441
1433
  function $e() {
1442
- var e;
1443
- let t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("#quality-menu");
1444
- t && (t.innerHTML = "", i(x, this).sort((e, t) => {
1434
+ var n;
1435
+ let r = (n = this.shadowRoot) == null ? void 0 : n.querySelector("#quality-menu");
1436
+ r && (r.innerHTML = "", u(b, this).sort((e, t) => {
1445
1437
  var n, r;
1446
1438
  return (n = e.video) != null && n.bitRate && (r = t.video) != null && r.bitRate ? t.video.bitRate - e.video.bitRate : 0;
1447
- }).forEach((e) => {
1448
- var n, i, a, o, l, u, ee;
1449
- let d = document.createElement("button");
1450
- d.className = "quality-item", d.type = "button", d.setAttribute("data-id", String(((n = e.video) == null ? void 0 : n.id) || 0)), d.setAttribute("data-bitrate", String(((i = e.video) == null ? void 0 : i.bitRate) || 0)), d.setAttribute("aria-label", e.video ? `Set quality to ${s(e.video)}` : "Set quality");
1439
+ }).forEach((n) => {
1440
+ var i, a, s, c, ee, l, u;
1441
+ let f = document.createElement("button");
1442
+ f.className = "quality-item", f.type = "button", f.setAttribute("data-id", String(((i = n.video) == null ? void 0 : i.id) || 0)), f.setAttribute("data-bitrate", String(((a = n.video) == null ? void 0 : a.bitRate) || 0)), f.setAttribute("aria-label", n.video ? `Set quality to ${t(n.video)}` : "Set quality");
1451
1443
  let p = document.createElement("div");
1452
1444
  p.className = "quality-item-info";
1453
1445
  let m = document.createElement("span");
1454
- m.className = "quality-item-title", m.textContent = e.video ? s(e.video) : "";
1446
+ m.className = "quality-item-title", m.textContent = n.video ? t(n.video) : "";
1455
1447
  let h = document.createElement("span");
1456
1448
  h.className = "quality-item-subtitle";
1457
- let g = r(K, this, et).call(this, (a = e.video) == null ? void 0 : a.frameRate), te = g ? `, ${g}fps` : "";
1458
- h.textContent = `${c(((o = (l = e.video) == null ? void 0 : l.bitRate) == null ? 0 : o) + ((u = (ee = e.audio) == null ? void 0 : ee.bitRate) == null ? 0 : u))}${te}`, p.appendChild(m), p.appendChild(h), d.appendChild(p);
1449
+ let g = d(G, this, et).call(this, (s = n.video) == null ? void 0 : s.frameRate), te = g ? `, ${g}fps` : "";
1450
+ h.textContent = `${o(((c = (ee = n.video) == null ? void 0 : ee.bitRate) == null ? 0 : c) + ((l = (u = n.audio) == null ? void 0 : u.bitRate) == null ? 0 : l))}${te}`, p.appendChild(m), p.appendChild(h), f.appendChild(p);
1459
1451
  let _ = document.createElement("span");
1460
- _.className = "quality-current-label", _.textContent = "Current", d.appendChild(_), d.addEventListener("click", (t) => {
1461
- t.stopPropagation(), this.dispatchEvent(new CustomEvent(f.SET_RENDITION, {
1452
+ _.className = "quality-current-label", _.textContent = "Current", f.appendChild(_), f.addEventListener("click", (r) => {
1453
+ r.stopPropagation(), this.dispatchEvent(new CustomEvent(e.SET_RENDITION, {
1462
1454
  bubbles: !0,
1463
1455
  composed: !0,
1464
- detail: e
1456
+ detail: n
1465
1457
  }));
1466
- let n = e.video ? s(e.video) : "unknown";
1467
- r(K, this, $).call(this, "Quality", `Selected: ${n}`);
1468
- }), t.appendChild(d);
1469
- }), r(K, this, tt).call(this));
1458
+ let i = n.video ? t(n.video) : "unknown";
1459
+ d(G, this, $).call(this, "Quality", `Selected: ${i}`);
1460
+ }), r.appendChild(f);
1461
+ }), d(G, this, tt).call(this));
1470
1462
  }
1471
1463
  function et(e) {
1472
1464
  return e ? e[0] % e[1] === 0 ? (e[0] / e[1]).toString() : (e[0] / e[1]).toFixed(2) : "";
1473
1465
  }
1474
1466
  function tt() {
1475
1467
  var e, t, n;
1476
- let a = (e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".quality-item"), o = (t = i(T, this)) == null || (t = t.video) == null ? void 0 : t.id, s = i(S, this), l = r(K, this, nt).call(this, a, s);
1477
- a == null || a.forEach((e) => {
1468
+ let r = (e = this.shadowRoot) == null ? void 0 : e.querySelectorAll(".quality-item"), i = (t = u(w, this)) == null || (t = t.video) == null ? void 0 : t.id, a = u(x, this), s = d(G, this, nt).call(this, r, a);
1469
+ r == null || r.forEach((e) => {
1478
1470
  let t = parseInt(e.getAttribute("data-id") || "0", 10), n = parseInt(e.getAttribute("data-bitrate") || "0", 10);
1479
- e.setAttribute("data-playing", String(t === o));
1480
- let r = l !== null && n === l;
1481
- e.setAttribute("data-selected", String(r)), e.setAttribute("aria-pressed", String(r)), i(C, this) ? e.setAttribute("data-capped", String(n > s)) : e.removeAttribute("data-capped");
1471
+ e.setAttribute("data-playing", String(t === i));
1472
+ let r = s !== null && n === s;
1473
+ e.setAttribute("data-selected", String(r)), e.setAttribute("aria-pressed", String(r)), u(S, this) ? e.setAttribute("data-capped", String(n > a)) : e.removeAttribute("data-capped");
1482
1474
  });
1483
- let u = (n = i(T, this)) == null ? void 0 : n.video;
1484
- if (u != null && u.width && u.height) {
1485
- r(K, this, Y).call(this, "quality-section", `${u.width}x${u.height}`);
1486
- return;
1487
- }
1488
- if (typeof l == "number" && l > 0) {
1489
- r(K, this, Y).call(this, "quality-section", c(l, 1));
1490
- return;
1491
- }
1492
- r(K, this, Y).call(this, "quality-section", i(C, this) ? "Auto" : "Fixed");
1475
+ let c = (n = u(w, this)) == null ? void 0 : n.video;
1476
+ c != null && c.width && c.height ? d(G, this, J).call(this, "quality-section", `${c.width}x${c.height}`) : typeof s == "number" && s > 0 ? d(G, this, J).call(this, "quality-section", o(s, 1)) : d(G, this, J).call(this, "quality-section", u(S, this) ? "Auto" : "Fixed");
1493
1477
  }
1494
1478
  function nt(e, t) {
1495
1479
  var n;
@@ -1501,46 +1485,46 @@ function nt(e, t) {
1501
1485
  }), (n = r) == null ? i : n;
1502
1486
  }
1503
1487
  function rt() {
1504
- r(K, this, it).call(this), r(K, this, ot).call(this), r(K, this, at).call(this), n(O, this, window.setInterval(() => r(K, this, at).call(this), 1e3));
1488
+ d(G, this, it).call(this), d(G, this, ot).call(this), d(G, this, at).call(this), l(D, this, window.setInterval(() => d(G, this, at).call(this), 1e3));
1505
1489
  }
1506
1490
  function it() {
1507
- i(O, this) !== null && (clearInterval(i(O, this)), n(O, this, null));
1491
+ u(D, this) !== null && (clearInterval(u(D, this)), l(D, this, null));
1508
1492
  }
1509
1493
  function at() {
1510
1494
  var e;
1511
- let t = (e = i(b, this)) == null ? void 0 : e.instance;
1495
+ let t = (e = u(y, this)) == null ? void 0 : e.instance;
1512
1496
  if (t) try {
1513
1497
  let e = t.getStatistics();
1514
- r(K, this, Z).call(this), r(K, this, Q).call(this, "#sdk-version", e.version || "-"), r(K, this, Q).call(this, "#session-id", e.sessionId || "-"), r(K, this, Q).call(this, "#client-id", e.clientId || "-"), r(K, this, Q).call(this, "#channel-id", e.channelId || "-"), r(K, this, Q).call(this, "#channel-group-id", e.channelGroupId || "-"), r(K, this, Q).call(this, "#uptime", r(K, this, ct).call(this, e.uptime)), r(K, this, Q).call(this, "#ttff", e.timeToFirstFrame ? `${e.timeToFirstFrame}ms` : "-"), r(K, this, Q).call(this, "#connection-state", t.connectionState || "-"), r(K, this, Q).call(this, "#playback-state", t.playbackState || "-");
1515
- let a = typeof t.playbackLatency == "number" ? `${Math.round(t.playbackLatency)}ms` : "-";
1516
- r(K, this, Q).call(this, "#playback-latency", a), r(K, this, Q).call(this, "#average-drift", r(K, this, lt).call(this, e.averageDrift, 1));
1517
- let o = `${Math.max(0, t.bufferFullness * 100).toFixed(0)}%`;
1518
- if (r(K, this, Q).call(this, "#playback-buffer-fullness", o), r(K, this, Y).call(this, "playback-section", `Buffer ${o}`), r(K, this, Q).call(this, "#playback-last-buffer-event", t.lastBufferEvent || "-"), r(K, this, Q).call(this, "#playback-buffering-events", typeof e.bufferingEventsCount == "number" ? e.bufferingEventsCount.toString() : "-"), r(K, this, Q).call(this, "#playback-buffering-ratio", r(K, this, ut).call(this, e.bufferingRatio)), r(K, this, Q).call(this, "#playback-time-spent-buffering", r(K, this, ct).call(this, t.timeSpentBuffering)), r(K, this, Q).call(this, "#playback-rendition-changes", r(K, this, pt).call(this, e.renditionLevelChangeCount, e.renditionChangesPerMinute)), r(K, this, Q).call(this, "#playback-seek-adjustments-rate", r(K, this, ft).call(this, e.seekAdjustmentsPerMinute, "min")), r(K, this, Q).call(this, "#playback-timeshift-adjustments-rate", r(K, this, ft).call(this, e.timeshiftAdjustmentsPerMinute, "min")), r(K, this, Q).call(this, "#playback-current-rendition", r(K, this, yt).call(this, e)), r(K, this, Q).call(this, "#playback-codecs", r(K, this, bt).call(this, e)), r(K, this, Q).call(this, "#playback-frame-drops", r(K, this, xt).call(this, e)), e.edgeUrl) try {
1519
- r(K, this, Q).call(this, "#network-edge-url", new URL(e.edgeUrl).hostname);
1498
+ d(G, this, Z).call(this), d(G, this, Q).call(this, "#sdk-version", e.version || "-"), d(G, this, Q).call(this, "#session-id", e.sessionId || "-"), d(G, this, Q).call(this, "#client-id", e.clientId || "-"), d(G, this, Q).call(this, "#channel-id", e.channelId || "-"), d(G, this, Q).call(this, "#channel-group-id", e.channelGroupId || "-"), d(G, this, Q).call(this, "#uptime", d(G, this, ct).call(this, e.uptime)), d(G, this, Q).call(this, "#ttff", e.timeToFirstFrame ? `${e.timeToFirstFrame}ms` : "-"), d(G, this, Q).call(this, "#connection-state", t.connectionState || "-"), d(G, this, Q).call(this, "#playback-state", t.playbackState || "-");
1499
+ let n = typeof t.playbackLatency == "number" ? `${Math.round(t.playbackLatency)}ms` : "-";
1500
+ d(G, this, Q).call(this, "#playback-latency", n), d(G, this, Q).call(this, "#average-drift", d(G, this, lt).call(this, e.averageDrift, 1));
1501
+ let r = `${Math.max(0, t.bufferFullness * 100).toFixed(0)}%`;
1502
+ if (d(G, this, Q).call(this, "#playback-buffer-fullness", r), d(G, this, J).call(this, "playback-section", `Buffer ${r}`), d(G, this, Q).call(this, "#playback-last-buffer-event", t.lastBufferEvent || "-"), d(G, this, Q).call(this, "#playback-buffering-events", typeof e.bufferingEventsCount == "number" ? e.bufferingEventsCount.toString() : "-"), d(G, this, Q).call(this, "#playback-buffering-ratio", d(G, this, ut).call(this, e.bufferingRatio)), d(G, this, Q).call(this, "#playback-time-spent-buffering", d(G, this, ct).call(this, t.timeSpentBuffering)), d(G, this, Q).call(this, "#playback-rendition-changes", d(G, this, pt).call(this, e.renditionLevelChangeCount, e.renditionChangesPerMinute)), d(G, this, Q).call(this, "#playback-seek-adjustments-rate", d(G, this, ft).call(this, e.seekAdjustmentsPerMinute, "min")), d(G, this, Q).call(this, "#playback-timeshift-adjustments-rate", d(G, this, ft).call(this, e.timeshiftAdjustmentsPerMinute, "min")), d(G, this, Q).call(this, "#playback-current-rendition", d(G, this, yt).call(this, e)), d(G, this, Q).call(this, "#playback-codecs", d(G, this, bt).call(this, e)), d(G, this, Q).call(this, "#playback-frame-drops", d(G, this, xt).call(this, e)), e.edgeUrl) try {
1503
+ d(G, this, Q).call(this, "#network-edge-url", new URL(e.edgeUrl).hostname);
1520
1504
  } catch (t) {
1521
- r(K, this, Q).call(this, "#network-edge-url", e.edgeUrl);
1505
+ d(G, this, Q).call(this, "#network-edge-url", e.edgeUrl);
1522
1506
  }
1523
- else r(K, this, Q).call(this, "#network-edge-url", "-");
1524
- r(K, this, Q).call(this, "#network-protocol", r(K, this, mt).call(this, e.connectionProtocol));
1525
- let s = r(K, this, ht).call(this, e.rtt);
1526
- r(K, this, Q).call(this, "#network-rtt", s), r(K, this, Q).call(this, "#network-estimated-bandwidth", r(K, this, dt).call(this, e.estimatedBandwidth)), r(K, this, Q).call(this, "#network-video-bitrate", r(K, this, dt).call(this, e.videoBitRate)), r(K, this, Q).call(this, "#network-audio-bitrate", r(K, this, dt).call(this, e.audioBitRate)), r(K, this, Q).call(this, "#network-bitrate", r(K, this, dt).call(this, e.averageBitRate)), r(K, this, Q).call(this, "#network-audio-jitter", r(K, this, _t).call(this, e.audioJitter)), r(K, this, Q).call(this, "#network-video-jitter", r(K, this, _t).call(this, e.videoJitter)), r(K, this, Q).call(this, "#network-connect-success", r(K, this, vt).call(this, e.connectCount, e.connectionAttemptCount, e.connectionSuccessRatio)), r(K, this, Q).call(this, "#network-reconnects-per-hour", r(K, this, ft).call(this, e.reconnectsPerHour, "h")), r(K, this, Y).call(this, "network-section", r(K, this, gt).call(this, e.rtt));
1527
- let c = r(K, this, ct).call(this, e.uptime);
1528
- r(K, this, Y).call(this, "stats-section", c === "-" ? "Up -" : `Up ${c}`), i(j, this) && (n(j, this, !1), r(K, this, $).call(this, "System", "Statistics stream recovered"));
1507
+ else d(G, this, Q).call(this, "#network-edge-url", "-");
1508
+ d(G, this, Q).call(this, "#network-protocol", d(G, this, mt).call(this, e.connectionProtocol));
1509
+ let i = d(G, this, ht).call(this, e.rtt);
1510
+ d(G, this, Q).call(this, "#network-rtt", i), d(G, this, Q).call(this, "#network-estimated-bandwidth", d(G, this, dt).call(this, e.estimatedBandwidth)), d(G, this, Q).call(this, "#network-video-bitrate", d(G, this, dt).call(this, e.videoBitRate)), d(G, this, Q).call(this, "#network-audio-bitrate", d(G, this, dt).call(this, e.audioBitRate)), d(G, this, Q).call(this, "#network-bitrate", d(G, this, dt).call(this, e.averageBitRate)), d(G, this, Q).call(this, "#network-audio-jitter", d(G, this, _t).call(this, e.audioJitter)), d(G, this, Q).call(this, "#network-video-jitter", d(G, this, _t).call(this, e.videoJitter)), d(G, this, Q).call(this, "#network-connect-success", d(G, this, vt).call(this, e.connectCount, e.connectionAttemptCount, e.connectionSuccessRatio)), d(G, this, Q).call(this, "#network-reconnects-per-hour", d(G, this, ft).call(this, e.reconnectsPerHour, "h")), d(G, this, J).call(this, "network-section", d(G, this, gt).call(this, e.rtt));
1511
+ let a = d(G, this, ct).call(this, e.uptime);
1512
+ d(G, this, J).call(this, "stats-section", a === "-" ? "Up -" : `Up ${a}`), u(j, this) && (l(j, this, !1), d(G, this, $).call(this, "System", "Statistics stream recovered"));
1529
1513
  } catch (e) {
1530
- i(j, this) || (n(j, this, !0), r(K, this, $).call(this, "System", "Failed to read statistics", "error"));
1514
+ u(j, this) || (l(j, this, !0), d(G, this, $).call(this, "System", "Failed to read statistics", "error"));
1531
1515
  }
1532
1516
  }
1533
1517
  function ot() {
1534
1518
  var e;
1535
- let t = (e = i(b, this)) == null ? void 0 : e.instance;
1536
- !t || i(M, this) === t || (r(K, this, st).call(this), n(M, this, t), t.on("connection state", i(pe, this)), t.on("playback state", i(me, this)), t.on("buffer state event", i(he, this)), t.on("error", i(ge, this)), t.on("rendition level", i(_e, this)), t.on("is live", i(ve, this)));
1519
+ let t = (e = u(y, this)) == null ? void 0 : e.instance;
1520
+ t && u(M, this) !== t && (d(G, this, st).call(this), l(M, this, t), t.on("connection state", u(me, this)), t.on("playback state", u(he, this)), t.on("buffer state event", u(ge, this)), t.on("error", u(_e, this)), t.on("rendition level", u(ve, this)), t.on("is live", u(ye, this)));
1537
1521
  }
1538
1522
  function st() {
1539
- let e = i(M, this);
1540
- e && (e.off("connection state", i(pe, this)), e.off("playback state", i(me, this)), e.off("buffer state event", i(he, this)), e.off("error", i(ge, this)), e.off("rendition level", i(_e, this)), e.off("is live", i(ve, this)), n(M, this, null));
1523
+ let e = u(M, this);
1524
+ e && (e.off("connection state", u(me, this)), e.off("playback state", u(he, this)), e.off("buffer state event", u(ge, this)), e.off("error", u(_e, this)), e.off("rendition level", u(ve, this)), e.off("is live", u(ye, this)), l(M, this, null));
1541
1525
  }
1542
1526
  function Q(e, t) {
1543
- r(K, this, J).call(this, r(K, this, q).call(this, e), t);
1527
+ d(G, this, q).call(this, d(G, this, K).call(this, e), t);
1544
1528
  }
1545
1529
  function ct(e) {
1546
1530
  if (!e) return "-";
@@ -1554,7 +1538,7 @@ function ut(e, t = 1) {
1554
1538
  return typeof e != "number" || Number.isNaN(e) ? "-" : `${(e * 100).toFixed(t)}%`;
1555
1539
  }
1556
1540
  function dt(e) {
1557
- return typeof e != "number" || e <= 0 || Number.isNaN(e) ? "-" : c(e, 2);
1541
+ return typeof e != "number" || e <= 0 || Number.isNaN(e) ? "-" : o(e, 2);
1558
1542
  }
1559
1543
  function ft(e, t) {
1560
1544
  return typeof e != "number" || Number.isNaN(e) ? "-" : `${e.toFixed(2)}/${t}`;
@@ -1583,8 +1567,8 @@ function vt(e, t, n) {
1583
1567
  return typeof t != "number" || t <= 0 ? "-" : `${typeof e == "number" ? e : 0}/${t} (${typeof n == "number" ? `${(n * 100).toFixed(0)}%` : "-"})`;
1584
1568
  }
1585
1569
  function yt(e) {
1586
- if (!(typeof e.videoWidth == "number" && typeof e.videoHeight == "number")) return e.audioCodec ? "Audio only" : "-";
1587
- let t = r(K, this, et).call(this, e.frameRate), n = t ? ` @ ${t}fps` : "";
1570
+ if (typeof e.videoWidth != "number" || typeof e.videoHeight != "number") return e.audioCodec ? "Audio only" : "-";
1571
+ let t = d(G, this, et).call(this, e.frameRate), n = t ? ` @ ${t}fps` : "";
1588
1572
  return `${e.videoWidth}x${e.videoHeight}${n}`;
1589
1573
  }
1590
1574
  function bt(e) {
@@ -1596,20 +1580,20 @@ function xt(e) {
1596
1580
  }
1597
1581
  function St() {
1598
1582
  var e = this;
1599
- let t = r(K, this, q).call(this, "#events-clear"), s = r(K, this, q).call(this, "#copy-events");
1600
- n(B, this, r(K, this, q).call(this, "#events-list")), n(V, this, r(K, this, q).call(this, "#events-count")), t == null || t.addEventListener("click", (e) => {
1601
- e.stopPropagation(), n(k, this, []), r(K, this, Et).call(this, !0);
1602
- }), s == null || s.addEventListener("click", function() {
1603
- var t = a(function* (t) {
1583
+ let t = d(G, this, K).call(this, "#events-clear"), n = d(G, this, K).call(this, "#copy-events");
1584
+ l(z, this, d(G, this, K).call(this, "#events-list")), l(B, this, d(G, this, K).call(this, "#events-count")), t == null || t.addEventListener("click", (e) => {
1585
+ e.stopPropagation(), l(k, this, []), d(G, this, Et).call(this, !0);
1586
+ }), n == null || n.addEventListener("click", function() {
1587
+ var t = c(function* (t) {
1604
1588
  t.stopPropagation();
1605
- let n = JSON.stringify(i(k, e).map((e) => o(o({}, e), {}, { isoTimestamp: new Date(e.timestamp).toISOString() })), null, 2);
1589
+ let r = JSON.stringify(u(k, e).map((e) => p(p({}, e), {}, { isoTimestamp: new Date(e.timestamp).toISOString() })), null, 2);
1606
1590
  try {
1607
- yield navigator.clipboard.writeText(n), s.textContent = "Copied", setTimeout(() => {
1608
- s.textContent = "Copy";
1591
+ yield navigator.clipboard.writeText(r), n.textContent = "Copied", setTimeout(() => {
1592
+ n.textContent = "Copy";
1609
1593
  }, 2e3);
1610
1594
  } catch (e) {
1611
- s.textContent = "Copy unavailable", setTimeout(() => {
1612
- s.textContent = "Copy";
1595
+ n.textContent = "Copy unavailable", setTimeout(() => {
1596
+ n.textContent = "Copy";
1613
1597
  }, 2e3);
1614
1598
  }
1615
1599
  });
@@ -1618,63 +1602,59 @@ function St() {
1618
1602
  };
1619
1603
  }());
1620
1604
  }
1621
- function $(e, t, a = "info") {
1622
- n(A, this, i(A, this) + 1);
1623
- let o = {
1624
- id: i(A, this),
1605
+ function $(e, t, n = "info") {
1606
+ l(A, this, u(A, this) + 1);
1607
+ let r = {
1608
+ id: u(A, this),
1625
1609
  timestamp: Date.now(),
1626
1610
  category: e,
1627
1611
  message: t,
1628
- level: a
1612
+ level: n
1629
1613
  };
1630
- if (i(k, this).push(o), i(k, this).length > 250 && i(k, this).splice(0, i(k, this).length - 250), r(K, this, Ce).call(this), r(K, this, Se).call(this, "events-section")) {
1631
- r(K, this, wt).call(this, o), r(K, this, Tt).call(this);
1632
- return;
1633
- }
1634
- n(H, this, !0);
1614
+ u(k, this).push(r), u(k, this).length > 250 && u(k, this).splice(0, u(k, this).length - 250), d(G, this, we).call(this), d(G, this, Ce).call(this, "events-section") ? (d(G, this, wt).call(this, r), d(G, this, Tt).call(this)) : l(V, this, !0);
1635
1615
  }
1636
1616
  function Ct(e) {
1637
1617
  let t = document.createElement("div");
1638
1618
  t.className = "event-row", t.setAttribute("data-level", e.level);
1639
1619
  let n = document.createElement("span");
1640
- n.className = "event-time", n.textContent = r(K, this, Dt).call(this, e.timestamp);
1620
+ n.className = "event-time", n.textContent = d(G, this, Dt).call(this, e.timestamp);
1621
+ let r = document.createElement("span");
1622
+ r.className = "event-category", r.textContent = e.category;
1641
1623
  let i = document.createElement("span");
1642
- i.className = "event-category", i.textContent = e.category;
1643
- let a = document.createElement("span");
1644
- return a.className = "event-message", a.textContent = e.message, t.appendChild(n), t.appendChild(i), t.appendChild(a), t;
1624
+ return i.className = "event-message", i.textContent = e.message, t.appendChild(n), t.appendChild(r), t.appendChild(i), t;
1645
1625
  }
1646
1626
  function wt(e) {
1647
- if (!i(B, this)) return;
1648
- let t = i(B, this).querySelector(".events-empty");
1627
+ if (!u(z, this)) return;
1628
+ let t = u(z, this).querySelector(".events-empty");
1649
1629
  t && t.remove();
1650
- let n = r(K, this, Ct).call(this, e);
1651
- i(B, this).prepend(n);
1630
+ let n = d(G, this, Ct).call(this, e);
1631
+ u(z, this).prepend(n);
1652
1632
  }
1653
1633
  function Tt() {
1654
- if (!i(B, this)) return;
1655
- let e = i(B, this).querySelectorAll(".event-row");
1634
+ if (!u(z, this)) return;
1635
+ let e = u(z, this).querySelectorAll(".event-row");
1656
1636
  for (let n = e.length - 1; n >= 250; n--) {
1657
1637
  var t;
1658
1638
  (t = e[n]) == null || t.remove();
1659
1639
  }
1660
1640
  }
1661
1641
  function Et(e = !1) {
1662
- if (!i(B, this) || !i(V, this)) return;
1663
- if (r(K, this, Ce).call(this), !e && !r(K, this, Se).call(this, "events-section")) {
1664
- n(H, this, !0);
1642
+ if (!u(z, this) || !u(B, this)) return;
1643
+ if (d(G, this, we).call(this), !e && !d(G, this, Ce).call(this, "events-section")) {
1644
+ l(V, this, !0);
1665
1645
  return;
1666
1646
  }
1667
- if (n(H, this, !1), i(k, this).length === 0) {
1668
- i(B, this).innerHTML = "<div class=\"events-empty\">No events yet</div>";
1647
+ if (l(V, this, !1), u(k, this).length === 0) {
1648
+ u(z, this).innerHTML = "<div class=\"events-empty\">No events yet</div>";
1669
1649
  return;
1670
1650
  }
1671
- i(B, this).innerHTML = "";
1651
+ u(z, this).innerHTML = "";
1672
1652
  let t = document.createDocumentFragment();
1673
- for (let e = i(k, this).length - 1; e >= 0; e--) {
1674
- let n = i(k, this)[e];
1675
- n && t.appendChild(r(K, this, Ct).call(this, n));
1653
+ for (let e = u(k, this).length - 1; e >= 0; e--) {
1654
+ let n = u(k, this)[e];
1655
+ n && t.appendChild(d(G, this, Ct).call(this, n));
1676
1656
  }
1677
- i(B, this).appendChild(t);
1657
+ u(z, this).appendChild(t);
1678
1658
  }
1679
1659
  function Dt(e) {
1680
1660
  return new Date(e).toLocaleTimeString([], {
@@ -1686,13 +1666,13 @@ function Dt(e) {
1686
1666
  }
1687
1667
  function Ot() {
1688
1668
  var e = this;
1689
- let t = r(K, this, q).call(this, "#copy-stats");
1669
+ let t = d(G, this, K).call(this, "#copy-stats");
1690
1670
  t == null || t.addEventListener("click", function() {
1691
- var n = a(function* (n) {
1671
+ var n = c(function* (n) {
1692
1672
  n.stopPropagation();
1693
- let i = r(K, e, kt).call(e);
1673
+ let r = d(G, e, kt).call(e);
1694
1674
  try {
1695
- yield navigator.clipboard.writeText(JSON.stringify(i, null, 2)), t.setAttribute("data-copied", "true"), t.textContent = "Copied!", setTimeout(() => {
1675
+ yield navigator.clipboard.writeText(JSON.stringify(r, null, 2)), t.setAttribute("data-copied", "true"), t.textContent = "Copied!", setTimeout(() => {
1696
1676
  t.setAttribute("data-copied", "false"), t.textContent = "Copy Stats to Clipboard";
1697
1677
  }, 2e3);
1698
1678
  } catch (e) {
@@ -1708,28 +1688,29 @@ function Ot() {
1708
1688
  }
1709
1689
  function kt() {
1710
1690
  var e;
1711
- let t = (e = i(b, this)) == null ? void 0 : e.instance;
1691
+ let t = (e = u(y, this)) == null ? void 0 : e.instance;
1712
1692
  if (!t) return {
1713
1693
  error: "Vindral instance not available",
1714
1694
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
1715
1695
  };
1716
1696
  try {
1717
- return o(o({}, t.getStatistics()), {}, {
1697
+ let e = t.getStatistics();
1698
+ return p(p({}, e), {}, {
1718
1699
  connectionState: t.connectionState,
1719
1700
  playbackState: t.playbackState,
1720
1701
  playbackLatency: t.playbackLatency,
1721
1702
  bufferFullness: t.bufferFullness,
1722
1703
  lastBufferEvent: t.lastBufferEvent,
1723
1704
  timeSpentBuffering: t.timeSpentBuffering,
1724
- currentRendition: i(T, this),
1725
- targetBufferTime: i(E, this),
1726
- drift: i(D, this),
1727
- abrEnabled: i(C, this),
1705
+ currentRendition: u(w, this),
1706
+ targetBufferTime: u(T, this),
1707
+ drift: u(E, this),
1708
+ abrEnabled: u(S, this),
1728
1709
  debugLayout: {
1729
- openSections: r(K, this, Me).call(this),
1730
- sectionOrder: r(K, this, Ne).call(this)
1710
+ openSections: d(G, this, Ne).call(this),
1711
+ sectionOrder: d(G, this, Pe).call(this)
1731
1712
  },
1732
- debugEvents: i(k, this).map((e) => o(o({}, e), {}, { isoTimestamp: new Date(e.timestamp).toISOString() })),
1713
+ debugEvents: u(k, this).map((e) => p(p({}, e), {}, { isoTimestamp: new Date(e.timestamp).toISOString() })),
1733
1714
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
1734
1715
  });
1735
1716
  } catch (e) {
@@ -1739,21 +1720,19 @@ function kt() {
1739
1720
  };
1740
1721
  }
1741
1722
  }
1742
- e(be, "observedAttributes", [
1743
- l.DEBUG_PANEL_OPEN,
1744
- l.TARGET_BUFFER_TIME,
1745
- l.DRIFT,
1746
- l.RENDITION_LEVELS,
1747
- l.MAX_VIDEO_BITRATE,
1748
- l.ABR_ENABLED,
1749
- l.SIZE_BASED_RESOLUTION_CAP_ENABLED,
1750
- l.RENDITION_LEVEL
1723
+ s(xe, "observedAttributes", [
1724
+ i.DEBUG_PANEL_OPEN,
1725
+ i.TARGET_BUFFER_TIME,
1726
+ i.DRIFT,
1727
+ i.RENDITION_LEVELS,
1728
+ i.MAX_VIDEO_BITRATE,
1729
+ i.ABR_ENABLED,
1730
+ i.SIZE_BASED_RESOLUTION_CAP_ENABLED,
1731
+ i.RENDITION_LEVEL
1751
1732
  ]);
1752
- //#endregion
1753
- //#region ../../libs/player-next/src/registerDebugComponents.ts
1733
+ // ../../libs/player-next/src/registerDebugComponents.ts
1754
1734
  var At = /* @__PURE__ */ h({ registerDebugComponents: () => jt });
1755
1735
  function jt() {
1756
- customElements.get("vindral-debug-button") || customElements.define("vindral-debug-button", ne), customElements.get("vindral-debug-panel") || customElements.define("vindral-debug-panel", be);
1736
+ customElements.get("vindral-debug-button") || customElements.define("vindral-debug-button", ne), customElements.get("vindral-debug-panel") || customElements.define("vindral-debug-panel", xe);
1757
1737
  }
1758
- //#endregion
1759
1738
  export { At as n, jt as t };