@vindral/web-sdk 4.8.1 → 4.8.2-10-g2eaf67d3

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