@sapia-ai/chatbot-v3 1.0.0 → 1.0.2

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.
Files changed (44) hide show
  1. package/dist/{EmbeddedVideoPlayer-SaMMfDIW.js → EmbeddedVideoPlayer-CNcds-dW.js} +283 -282
  2. package/dist/Preview-Dmns6UWL.js +84 -0
  3. package/dist/api.js +1 -1
  4. package/dist/{dist-DGBYKC8c.js → dist-B9SbMqZU.js} +2693 -2693
  5. package/dist/embed/createChatbot.d.ts +2 -0
  6. package/dist/{fix-webm-duration-BW9Fbdzt.js → fix-webm-duration-BWL-ZRDX.js} +2 -2
  7. package/dist/index.d.ts +0 -1
  8. package/dist/index.js +15479 -2067
  9. package/dist/jsx-runtime-8QqjHL5t.js +24 -0
  10. package/dist/messages-Czlp86gl.js +1963 -0
  11. package/dist/react-B0K-sClg.js +295 -0
  12. package/dist/{react-Bujo1aK5.js → react-ChCcxVnw.js} +90 -89
  13. package/dist/{react-GXf8sbzf.js → react-DJysvNxz.js} +72 -71
  14. package/dist/{react-BVzcquey.js → react-Dbs-sPBo.js} +93 -92
  15. package/dist/{react-lp7yfM94.js → react-NauLB_WU.js} +91 -90
  16. package/dist/{react-BGJ7Szvq.js → react-QrtEtv1G.js} +76 -74
  17. package/dist/{react-BrCGR7Ca.js → react-be7q6yw_.js} +312 -310
  18. package/dist/{react-CRTg4gz8.js → react-czRIxT0g.js} +85 -84
  19. package/dist/{react-BMxM8TWJ.js → react-dE7BdGuR.js} +49 -48
  20. package/dist-umd/sapia-chatbot.umd.js +1 -1
  21. package/package.json +14 -25
  22. package/dist/EmbeddedVideoPlayer-SaMMfDIW.js.map +0 -1
  23. package/dist/Preview-Db-hgkTh.js +0 -83
  24. package/dist/Preview-Db-hgkTh.js.map +0 -1
  25. package/dist/dash.all.min-DZ1yEcJk.js.map +0 -1
  26. package/dist/dist-BSi28_cP.js.map +0 -1
  27. package/dist/dist-DGBYKC8c.js.map +0 -1
  28. package/dist/dist-FvHBWiRa.js.map +0 -1
  29. package/dist/fix-webm-duration-BW9Fbdzt.js.map +0 -1
  30. package/dist/hls-mBncGwsE.js.map +0 -1
  31. package/dist/index.js.map +0 -1
  32. package/dist/max-Btet1snX.js.map +0 -1
  33. package/dist/messages-C4jqrtSG.js +0 -187
  34. package/dist/messages-C4jqrtSG.js.map +0 -1
  35. package/dist/react-BGJ7Szvq.js.map +0 -1
  36. package/dist/react-BMxM8TWJ.js.map +0 -1
  37. package/dist/react-BVzcquey.js.map +0 -1
  38. package/dist/react-BrCGR7Ca.js.map +0 -1
  39. package/dist/react-Bujo1aK5.js.map +0 -1
  40. package/dist/react-CRTg4gz8.js.map +0 -1
  41. package/dist/react-GXf8sbzf.js.map +0 -1
  42. package/dist/react-lp7yfM94.js.map +0 -1
  43. package/dist/sapia-chatbot.css +0 -3
  44. package/dist-umd/sapia-chatbot.umd.js.map +0 -1
@@ -1,14 +1,15 @@
1
- import { a as e, i as t, n, r, t as i } from "./classPrivateFieldSet2-DtQPURVD.js";
2
- import { t as a } from "./defineProperty-DiFpLzd2.js";
3
- import o from "react";
1
+ import { b as e } from "./messages-Czlp86gl.js";
2
+ import { t } from "./react-B0K-sClg.js";
3
+ import { a as n, i as r, n as i, r as a, t as o } from "./classPrivateFieldSet2-DtQPURVD.js";
4
+ import { t as s } from "./defineProperty-DiFpLzd2.js";
4
5
  //#region ../../node_modules/.pnpm/twitch-video-element@0.1.6/node_modules/twitch-video-element/dist/twitch-video-element.js
5
- var s, c = "https://player.twitch.tv", l = /(?:www\.|go\.)?twitch\.tv\/(?:videos?\/|\?video=)(\d+)($|\?)/, u = /(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/, d = {
6
+ var c = /* @__PURE__ */ e(t(), 1), l, u = "https://player.twitch.tv", d = /(?:www\.|go\.)?twitch\.tv\/(?:videos?\/|\?video=)(\d+)($|\?)/, f = /(?:www\.|go\.)?twitch\.tv\/([a-zA-Z0-9_]+)($|\?)/, p = {
6
7
  IDLE: "Idle",
7
8
  READY: "Ready",
8
9
  BUFFERING: "Buffering",
9
10
  PLAYING: "Playing",
10
11
  ENDED: "Ended"
11
- }, f = {
12
+ }, m = {
12
13
  DISABLE_CAPTIONS: 0,
13
14
  ENABLE_CAPTIONS: 1,
14
15
  PAUSE: 2,
@@ -22,9 +23,9 @@ var s, c = "https://player.twitch.tv", l = /(?:www\.|go\.)?twitch\.tv\/(?:videos
22
23
  SET_MUTED: 10,
23
24
  SET_VOLUME: 11
24
25
  };
25
- function p(e, t = {}) {
26
+ function h(e, t = {}) {
26
27
  let n = {
27
- src: m(e, t),
28
+ src: g(e, t),
28
29
  frameborder: "0",
29
30
  width: "100%",
30
31
  height: "100%",
@@ -51,13 +52,13 @@ function p(e, t = {}) {
51
52
  pointer-events: none;
52
53
  }
53
54
  </style>
54
- <iframe${M(n)}></iframe>
55
+ <iframe${P(n)}></iframe>
55
56
  `;
56
57
  }
57
- function m(e, t) {
58
+ function g(e, t) {
58
59
  var n;
59
60
  if (!e.src) return;
60
- let r = e.src.match(l), i = e.src.match(u), a = {
61
+ let r = e.src.match(d), i = e.src.match(f), a = {
61
62
  parent: (n = globalThis.location) == null ? void 0 : n.hostname,
62
63
  controls: e.controls === "" ? null : !1,
63
64
  autoplay: e.autoplay === "" ? null : !1,
@@ -65,43 +66,43 @@ function m(e, t) {
65
66
  preload: e.preload,
66
67
  ...t.config
67
68
  };
68
- return r ? `${c}/?video=v${r[1]}&${P(a)}` : i ? `${c}/?channel=${i[1]}&${P(a)}` : "";
69
+ return r ? `${u}/?video=v${r[1]}&${I(a)}` : i ? `${u}/?channel=${i[1]}&${I(a)}` : "";
69
70
  }
70
- var h = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap(), _ = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), 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 WeakSet(), O = class extends ((s = globalThis.HTMLElement) == null ? class {} : s) {
71
+ var _ = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), 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 WeakSet(), A = class extends ((l = globalThis.HTMLElement) == null ? class {} : l) {
71
72
  constructor() {
72
- super(), e(this, D), a(this, "loadComplete", new I()), t(this, h, void 0), t(this, g, void 0), t(this, _, void 0), t(this, v, {}), t(this, y, 0), t(this, b, !1), t(this, x, 1), t(this, S, !this.autoplay), t(this, C, !1), t(this, w, 0), t(this, T, null), t(this, E, async (e) => {
73
- var t, r, a, o;
74
- if (!n(_, this).contentWindow) return;
73
+ super(), n(this, k), s(this, "loadComplete", new R()), r(this, _, void 0), r(this, v, void 0), r(this, y, void 0), r(this, b, {}), r(this, x, 0), r(this, S, !1), r(this, C, 1), r(this, w, !this.autoplay), r(this, T, !1), r(this, E, 0), r(this, D, null), r(this, O, async (e) => {
74
+ var t, n, r, a;
75
+ if (!i(y, this).contentWindow) return;
75
76
  let { data: s, source: c } = e;
76
- if (c === n(_, this).contentWindow) {
77
- if (s.namespace === "twitch-embed") await new Promise((e) => setTimeout(e, 10)), s.eventName === "ready" ? (this.dispatchEvent(new Event("loadcomplete")), this.loadComplete.resolve(), i(w, this, 1), this.dispatchEvent(new Event("loadedmetadata"))) : s.eventName === "seek" ? (i(C, this, !0), this.dispatchEvent(new Event("seeking"))) : s.eventName === "playing" ? (n(C, this) && (i(C, this, !1), this.dispatchEvent(new Event("seeked"))), i(w, this, 3), this.dispatchEvent(new Event("playing"))) : this.dispatchEvent(new Event(s.eventName));
77
+ if (c === i(y, this).contentWindow) {
78
+ if (s.namespace === "twitch-embed") await new Promise((e) => setTimeout(e, 10)), s.eventName === "ready" ? (this.dispatchEvent(new Event("loadcomplete")), this.loadComplete.resolve(), o(E, this, 1), this.dispatchEvent(new Event("loadedmetadata"))) : s.eventName === "seek" ? (o(T, this, !0), this.dispatchEvent(new Event("seeking"))) : s.eventName === "playing" ? (i(T, this) && (o(T, this, !1), this.dispatchEvent(new Event("seeked"))), o(E, this, 3), this.dispatchEvent(new Event("playing"))) : this.dispatchEvent(new Event(s.eventName));
78
79
  else if (s.namespace === "twitch-embed-player-proxy" && s.eventName === "UPDATE_STATE") {
79
- let e = n(v, this).duration, c = n(v, this).currentTime, l = n(v, this).volume, u = n(v, this).muted, d = (r = (t = n(v, this).stats) == null ? void 0 : t.videoStats) == null ? void 0 : r.bufferSize;
80
- i(v, this, {
81
- ...n(v, this),
80
+ let e = i(b, this).duration, c = i(b, this).currentTime, l = i(b, this).volume, u = i(b, this).muted, d = (n = (t = i(b, this).stats) == null ? void 0 : t.videoStats) == null ? void 0 : n.bufferSize;
81
+ o(b, this, {
82
+ ...i(b, this),
82
83
  ...s.params
83
- }), e !== n(v, this).duration && this.dispatchEvent(new Event("durationchange")), c !== n(v, this).currentTime && this.dispatchEvent(new Event("timeupdate")), (l !== n(v, this).volume || u !== n(v, this).muted) && (n(v, this).volume !== void 0 && i(x, this, n(v, this).volume), n(v, this).muted !== void 0 && i(b, this, n(v, this).muted), this.dispatchEvent(new Event("volumechange"))), d !== ((o = (a = n(v, this).stats) == null ? void 0 : a.videoStats) == null ? void 0 : o.bufferSize) && this.dispatchEvent(new Event("progress"));
84
+ }), e !== i(b, this).duration && this.dispatchEvent(new Event("durationchange")), c !== i(b, this).currentTime && this.dispatchEvent(new Event("timeupdate")), (l !== i(b, this).volume || u !== i(b, this).muted) && (i(b, this).volume !== void 0 && o(C, this, i(b, this).volume), i(b, this).muted !== void 0 && o(S, this, i(b, this).muted), this.dispatchEvent(new Event("volumechange"))), d !== ((a = (r = i(b, this).stats) == null ? void 0 : r.videoStats) == null ? void 0 : a.bufferSize) && this.dispatchEvent(new Event("progress"));
84
85
  }
85
86
  }
86
- }), r(D, this, A).call(this, "config");
87
+ }), a(k, this, M).call(this, "config");
87
88
  }
88
89
  get config() {
89
- return n(T, this);
90
+ return i(D, this);
90
91
  }
91
92
  set config(e) {
92
- i(T, this, e);
93
+ o(D, this, e);
93
94
  }
94
95
  async load() {
95
- if (n(h, this)) return;
96
+ if (i(_, this)) return;
96
97
  this.shadowRoot || this.attachShadow({ mode: "open" });
97
- let e = !n(g, this);
98
- if (n(g, this) && (this.loadComplete = new I()), i(g, this, !0), await i(h, this, Promise.resolve()), i(h, this, null), i(w, this, 0), this.dispatchEvent(new Event("emptied")), !this.src) {
99
- this.shadowRoot.innerHTML = "", globalThis.removeEventListener("message", n(E, this));
98
+ let e = !i(v, this);
99
+ if (i(v, this) && (this.loadComplete = new R()), o(v, this, !0), await o(_, this, Promise.resolve()), o(_, this, null), o(E, this, 0), this.dispatchEvent(new Event("emptied")), !this.src) {
100
+ this.shadowRoot.innerHTML = "", globalThis.removeEventListener("message", i(O, this));
100
101
  return;
101
102
  }
102
103
  this.dispatchEvent(new Event("loadstart"));
103
- let t = this.shadowRoot.querySelector("iframe"), r = j(this.attributes);
104
- e && t && i(T, this, JSON.parse(t.getAttribute("data-config") || "{}")), (!(t != null && t.src) || t.src !== m(r, this)) && (this.shadowRoot.innerHTML = p(r, this), t = this.shadowRoot.querySelector("iframe")), i(_, this, t), globalThis.addEventListener("message", n(E, this));
104
+ let t = this.shadowRoot.querySelector("iframe"), n = N(this.attributes);
105
+ e && t && o(D, this, JSON.parse(t.getAttribute("data-config") || "{}")), (!(t != null && t.src) || t.src !== g(n, this)) && (this.shadowRoot.innerHTML = h(n, this), t = this.shadowRoot.querySelector("iframe")), o(y, this, t), globalThis.addEventListener("message", i(O, this));
105
106
  }
106
107
  attributeChangedCallback(e, t, n) {
107
108
  if (t !== n) switch (e) {
@@ -112,7 +113,7 @@ var h = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap(), _ = /*
112
113
  }
113
114
  }
114
115
  getVideoPlaybackQuality() {
115
- return n(v, this).stats.videoStats;
116
+ return i(b, this).stats.videoStats;
116
117
  }
117
118
  get src() {
118
119
  return this.getAttribute("src");
@@ -121,24 +122,24 @@ var h = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap(), _ = /*
121
122
  this.setAttribute("src", e);
122
123
  }
123
124
  get readyState() {
124
- return n(w, this);
125
+ return i(E, this);
125
126
  }
126
127
  get seeking() {
127
- return n(C, this);
128
+ return i(T, this);
128
129
  }
129
130
  get buffered() {
130
- var e, t, r;
131
- return L(0, (e = (r = (t = n(v, this).stats) == null ? void 0 : t.videoStats) == null ? void 0 : r.bufferSize) == null ? 0 : e);
131
+ var e, t, n;
132
+ return z(0, (e = (n = (t = i(b, this).stats) == null ? void 0 : t.videoStats) == null ? void 0 : n.bufferSize) == null ? 0 : e);
132
133
  }
133
134
  get paused() {
134
- return n(v, this).playback ? n(v, this).playback === d.IDLE : n(S, this);
135
+ return i(b, this).playback ? i(b, this).playback === p.IDLE : i(w, this);
135
136
  }
136
137
  get ended() {
137
- return n(v, this).playback ? n(v, this).playback === d.ENDED : !1;
138
+ return i(b, this).playback ? i(b, this).playback === p.ENDED : !1;
138
139
  }
139
140
  get duration() {
140
141
  var e;
141
- return (e = n(v, this).duration) == null ? NaN : e;
142
+ return (e = i(b, this).duration) == null ? NaN : e;
142
143
  }
143
144
  get autoplay() {
144
145
  return this.hasAttribute("autoplay");
@@ -153,11 +154,11 @@ var h = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap(), _ = /*
153
154
  this.controls != e && this.toggleAttribute("controls", !!e);
154
155
  }
155
156
  get currentTime() {
156
- return n(v, this).currentTime ? n(v, this).currentTime : n(y, this);
157
+ return i(b, this).currentTime ? i(b, this).currentTime : i(x, this);
157
158
  }
158
159
  set currentTime(e) {
159
- i(y, this, e), this.loadComplete.then(() => {
160
- r(D, this, k).call(this, f.SEEK, e);
160
+ o(x, this, e), this.loadComplete.then(() => {
161
+ a(k, this, j).call(this, m.SEEK, e);
161
162
  });
162
163
  }
163
164
  get defaultMuted() {
@@ -173,19 +174,19 @@ var h = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap(), _ = /*
173
174
  this.toggleAttribute("loop", !!e);
174
175
  }
175
176
  get muted() {
176
- return n(b, this);
177
+ return i(S, this);
177
178
  }
178
179
  set muted(e) {
179
- i(b, this, e), this.loadComplete.then(() => {
180
- r(D, this, k).call(this, f.SET_MUTED, e);
180
+ o(S, this, e), this.loadComplete.then(() => {
181
+ a(k, this, j).call(this, m.SET_MUTED, e);
181
182
  });
182
183
  }
183
184
  get volume() {
184
- return n(x, this);
185
+ return i(C, this);
185
186
  }
186
187
  set volume(e) {
187
- i(x, this, e), this.loadComplete.then(() => {
188
- r(D, this, k).call(this, f.SET_VOLUME, e);
188
+ o(C, this, e), this.loadComplete.then(() => {
189
+ a(k, this, j).call(this, m.SET_VOLUME, e);
189
190
  });
190
191
  }
191
192
  get playsInline() {
@@ -195,28 +196,28 @@ var h = /* @__PURE__ */ new WeakMap(), g = /* @__PURE__ */ new WeakMap(), _ = /*
195
196
  this.toggleAttribute("playsinline", !!e);
196
197
  }
197
198
  play() {
198
- i(S, this, !1), r(D, this, k).call(this, f.PLAY);
199
+ o(w, this, !1), a(k, this, j).call(this, m.PLAY);
199
200
  }
200
201
  pause() {
201
- i(S, this, !0), r(D, this, k).call(this, f.PAUSE);
202
+ o(w, this, !0), a(k, this, j).call(this, m.PAUSE);
202
203
  }
203
204
  };
204
- function k(e, t) {
205
- if (!n(_, this).contentWindow) return;
206
- let r = {
205
+ function j(e, t) {
206
+ if (!i(y, this).contentWindow) return;
207
+ let n = {
207
208
  eventName: e,
208
209
  params: t,
209
210
  namespace: "twitch-embed-player-proxy"
210
211
  };
211
- n(_, this).contentWindow.postMessage(r, c);
212
+ i(y, this).contentWindow.postMessage(n, u);
212
213
  }
213
- function A(e) {
214
+ function M(e) {
214
215
  if (Object.prototype.hasOwnProperty.call(this, e)) {
215
216
  let t = this[e];
216
217
  delete this[e], this[e] = t;
217
218
  }
218
219
  }
219
- a(O, "getTemplateHTML", p), a(O, "shadowRootOptions", { mode: "open" }), a(O, "observedAttributes", [
220
+ s(A, "getTemplateHTML", h), s(A, "shadowRootOptions", { mode: "open" }), s(A, "observedAttributes", [
220
221
  "autoplay",
221
222
  "controls",
222
223
  "loop",
@@ -225,26 +226,26 @@ a(O, "getTemplateHTML", p), a(O, "shadowRootOptions", { mode: "open" }), a(O, "o
225
226
  "preload",
226
227
  "src"
227
228
  ]);
228
- function j(e) {
229
+ function N(e) {
229
230
  let t = {};
230
231
  for (let n of e) t[n.name] = n.value;
231
232
  return t;
232
233
  }
233
- function M(e) {
234
+ function P(e) {
234
235
  let t = "";
235
236
  for (let n in e) {
236
237
  let r = e[n];
237
- r === "" ? t += ` ${N(n)}` : t += ` ${N(n)}="${N(`${r}`)}"`;
238
+ r === "" ? t += ` ${F(n)}` : t += ` ${F(n)}="${F(`${r}`)}"`;
238
239
  }
239
240
  return t;
240
241
  }
241
- function N(e) {
242
+ function F(e) {
242
243
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/`/g, "&#x60;");
243
244
  }
244
- function P(e) {
245
- return String(new URLSearchParams(F(e)));
245
+ function I(e) {
246
+ return String(new URLSearchParams(L(e)));
246
247
  }
247
- function F(e) {
248
+ function L(e) {
248
249
  let t = {};
249
250
  for (let n in e) {
250
251
  let r = e[n];
@@ -252,7 +253,7 @@ function F(e) {
252
253
  }
253
254
  return t;
254
255
  }
255
- var I = class extends Promise {
256
+ var R = class extends Promise {
256
257
  constructor(e = () => {}) {
257
258
  let t, n;
258
259
  super((r, i) => {
@@ -260,17 +261,17 @@ var I = class extends Promise {
260
261
  }), this.resolve = t, this.reject = n;
261
262
  }
262
263
  };
263
- function L(e, t) {
264
- return R(Array.isArray(e) ? e : e == null || t == null || e === 0 && t === 0 ? [[0, 0]] : [[e, t]]);
264
+ function z(e, t) {
265
+ return B(Array.isArray(e) ? e : e == null || t == null || e === 0 && t === 0 ? [[0, 0]] : [[e, t]]);
265
266
  }
266
- function R(e) {
267
+ function B(e) {
267
268
  return Object.defineProperties(e, {
268
269
  start: { value: (t) => e[t][0] },
269
270
  end: { value: (t) => e[t][1] }
270
271
  }), e;
271
272
  }
272
- globalThis.customElements && !globalThis.customElements.get("twitch-video") && globalThis.customElements.define("twitch-video", O);
273
- var z = O, B = /* @__PURE__ */ new Set([
273
+ globalThis.customElements && !globalThis.customElements.get("twitch-video") && globalThis.customElements.define("twitch-video", A);
274
+ var V = A, H = /* @__PURE__ */ new Set([
274
275
  "style",
275
276
  "children",
276
277
  "ref",
@@ -278,28 +279,28 @@ var z = O, B = /* @__PURE__ */ new Set([
278
279
  "suppressContentEditableWarning",
279
280
  "suppressHydrationWarning",
280
281
  "dangerouslySetInnerHTML"
281
- ]), V = {
282
+ ]), U = {
282
283
  className: "class",
283
284
  htmlFor: "for"
284
285
  };
285
- function H(e) {
286
+ function W(e) {
286
287
  return e.toLowerCase();
287
288
  }
288
- function U(e) {
289
+ function G(e) {
289
290
  if (typeof e == "boolean") return e ? "" : void 0;
290
291
  if (typeof e != "function" && !(typeof e == "object" && e)) return e;
291
292
  }
292
- function W({ react: e, tagName: t, elementClass: n, events: r, displayName: i, defaultProps: a, toAttributeName: o = H, toAttributeValue: s = U }) {
293
+ function K({ react: e, tagName: t, elementClass: n, events: r, displayName: i, defaultProps: a, toAttributeName: o = W, toAttributeValue: s = G }) {
293
294
  let c = Number.parseInt(e.version) >= 19, l = e.forwardRef((i, l) => {
294
295
  var u, d;
295
296
  let f = e.useRef(null), p = e.useRef(/* @__PURE__ */ new Map()), m = {}, h = {}, g = {}, _ = {};
296
297
  for (let [e, t] of Object.entries(i)) {
297
298
  var v, y;
298
- if (B.has(e)) {
299
+ if (H.has(e)) {
299
300
  g[e] = t;
300
301
  continue;
301
302
  }
302
- let r = o((v = V[e]) == null ? e : v);
303
+ let r = o((v = U[e]) == null ? e : v);
303
304
  if (n.prototype && e in n.prototype && !(e in ((y = (u = globalThis.HTMLElement) == null ? void 0 : u.prototype) == null ? {} : y)) && !((d = n.observedAttributes) != null && d.some((e) => e === r))) {
304
305
  _[e] = t;
305
306
  continue;
@@ -309,7 +310,7 @@ function W({ react: e, tagName: t, elementClass: n, events: r, displayName: i, d
309
310
  continue;
310
311
  }
311
312
  let i = s(t);
312
- r && i != null && (h[r] = String(i), c || (g[r] = i)), r && c && (i === U(t) ? g[r] = t : g[r] = i);
313
+ r && i != null && (h[r] = String(i), c || (g[r] = i)), r && c && (i === G(t) ? g[r] = t : g[r] = i);
313
314
  }
314
315
  if (typeof window < "u") {
315
316
  for (let t in m) {
@@ -325,8 +326,8 @@ function W({ react: e, tagName: t, elementClass: n, events: r, displayName: i, d
325
326
  e.useLayoutEffect(() => {
326
327
  if (f.current === null) return;
327
328
  let e = /* @__PURE__ */ new Map();
328
- for (let t in _) G(f.current, t, _[t]), p.current.delete(t), e.set(t, _[t]);
329
- for (let [e, t] of p.current) G(f.current, e, void 0);
329
+ for (let t in _) q(f.current, t, _[t]), p.current.delete(t), e.set(t, _[t]);
330
+ for (let [e, t] of p.current) q(f.current, e, void 0);
330
331
  p.current = e;
331
332
  });
332
333
  }
@@ -349,19 +350,19 @@ function W({ react: e, tagName: t, elementClass: n, events: r, displayName: i, d
349
350
  });
350
351
  return l.displayName = i == null ? n.name : i, l;
351
352
  }
352
- function G(e, t, n) {
353
+ function q(e, t, n) {
353
354
  var r, i;
354
355
  e[t] = n, n == null && t in ((r = (i = globalThis.HTMLElement) == null ? void 0 : i.prototype) == null ? {} : r) && e.removeAttribute(t);
355
356
  }
356
- var K = W({
357
- react: o,
357
+ var J = K({
358
+ react: c.default,
358
359
  tagName: "twitch-video",
359
- elementClass: z,
360
+ elementClass: V,
360
361
  toAttributeName(e) {
361
- return e === "muted" ? "" : e === "defaultMuted" ? "muted" : H(e);
362
+ return e === "muted" ? "" : e === "defaultMuted" ? "muted" : W(e);
362
363
  }
363
364
  });
364
365
  //#endregion
365
- export { K as default };
366
+ export { J as default };
366
367
 
367
- //# sourceMappingURL=react-CRTg4gz8.js.map
368
+ //# sourceMappingURL=react-czRIxT0g.js.map
@@ -1,11 +1,12 @@
1
- import { i as e, n as t, t as n } from "./classPrivateFieldSet2-DtQPURVD.js";
2
- import { t as r } from "./defineProperty-DiFpLzd2.js";
3
- import { n as i, t as a } from "./dist-BSi28_cP.js";
4
- import o from "react";
1
+ import { b as e } from "./messages-Czlp86gl.js";
2
+ import { t } from "./react-B0K-sClg.js";
3
+ import { i as n, n as r, t as i } from "./classPrivateFieldSet2-DtQPURVD.js";
4
+ import { t as a } from "./defineProperty-DiFpLzd2.js";
5
+ import { n as o, t as s } from "./dist-BSi28_cP.js";
5
6
  //#region ../../node_modules/.pnpm/dash-video-element@0.3.2_@svta+cml-cta@1.0.6_@svta+cml-structured-field-values@1.1.3_@s_1d417b19612eff304477e3f6272644a6/node_modules/dash-video-element/dist/dash-video-element.js
6
- var s = /* @__PURE__ */ new WeakMap(), c = class extends a(i) {
7
- constructor(...t) {
8
- super(...t), e(this, s, void 0);
7
+ var c = /* @__PURE__ */ e(t(), 1), l = /* @__PURE__ */ new WeakMap(), u = class extends s(o) {
8
+ constructor(...e) {
9
+ super(...e), n(this, l, void 0);
9
10
  }
10
11
  attributeChangedCallback(e, t, n) {
11
12
  e !== "src" && super.attributeChangedCallback(e, t, n), e === "src" && t != n && this.load();
@@ -14,7 +15,7 @@ var s = /* @__PURE__ */ new WeakMap(), c = class extends a(i) {
14
15
  let t = async (t, n) => {
15
16
  let r = [], i = e.timescale || 1, a = e.startNumber || 1, o = e.presentationTimeOffset ? e.presentationTimeOffset / i : 0, s = e.segmentDuration;
16
17
  for (let e = 0; e < t; e++) {
17
- let i = u({
18
+ let i = f({
18
19
  thIndex: e,
19
20
  thduration: n,
20
21
  ttiles: t,
@@ -33,19 +34,19 @@ var s = /* @__PURE__ */ new WeakMap(), c = class extends a(i) {
33
34
  r.push(l);
34
35
  }
35
36
  return await Promise.all(r).catch((e) => console.error("Error processing thumbnails", e));
36
- }, { totalThumbnails: n, thumbnailDuration: r } = l(e), i = await t(n, r), a = this.nativeEl.querySelector("track[label=\"thumbnails\"]");
37
+ }, { totalThumbnails: n, thumbnailDuration: r } = d(e), i = await t(n, r), a = this.nativeEl.querySelector("track[label=\"thumbnails\"]");
37
38
  if (!a) {
38
- a = d(), this.nativeEl.appendChild(a);
39
- let e = f(i);
39
+ a = p(), this.nativeEl.appendChild(a);
40
+ let e = m(i);
40
41
  a.src = e, a.dispatchEvent(new Event("change"));
41
42
  }
42
43
  }
43
44
  async load() {
44
- if (t(s, this)) {
45
+ if (r(l, this)) {
45
46
  this.api.attachSource(this.src);
46
47
  return;
47
48
  }
48
- n(s, this, !0);
49
+ i(l, this, !0);
49
50
  let e = await import("./dash.all.min-DZ1yEcJk.js");
50
51
  this.api = e.MediaPlayer().create(), this.api.initialize(this.nativeEl, this.src, this.autoplay), this.api.on(e.MediaPlayer.events.STREAM_INITIALIZED, () => {
51
52
  let e = this.api.getRepresentationsByType("video"), t = this.videoTracks.getTrackById("main");
@@ -62,11 +63,11 @@ var s = /* @__PURE__ */ new WeakMap(), c = class extends a(i) {
62
63
  });
63
64
  }
64
65
  };
65
- r(c, "shadowRootOptions", { ...i.shadowRootOptions }), r(c, "getTemplateHTML", (e) => {
66
+ a(u, "shadowRootOptions", { ...o.shadowRootOptions }), a(u, "getTemplateHTML", (e) => {
66
67
  let { src: t, ...n } = e;
67
- return i.getTemplateHTML(n);
68
+ return o.getTemplateHTML(n);
68
69
  });
69
- function l(e) {
70
+ function d(e) {
70
71
  var t, n;
71
72
  let [r, i] = e.essentialProperties[0].value.split("x").map(Number), a = r * i, o = ((n = (t = e.adaptation) == null ? void 0 : t.period) == null ? void 0 : n.duration) || null, s = e.segmentDuration, c = s / (e.timescale || 1) / a;
72
73
  return {
@@ -74,15 +75,15 @@ function l(e) {
74
75
  thumbnailDuration: c
75
76
  };
76
77
  }
77
- function u({ thIndex: e, tduration: t, thduration: n, ttiles: r, startNumber: i, pto: a }) {
78
+ function f({ thIndex: e, tduration: t, thduration: n, ttiles: r, startNumber: i, pto: a }) {
78
79
  let o = Math.floor(e / r) + i, s = e % r + 1;
79
80
  return (o - 1) * t - a + (s - 1) * n;
80
81
  }
81
- function d() {
82
+ function p() {
82
83
  let e = document.createElement("track");
83
84
  return e.kind = "metadata", e.label = "thumbnails", e.srclang = "en", e.mode = "hidden", e.default = !0, e;
84
85
  }
85
- function f(e) {
86
+ function m(e) {
86
87
  let t = "WEBVTT\n\n";
87
88
  for (let n of e) t += `${r(n.startTime)} --> ${r(n.endTime)}
88
89
  `, t += `${n.text}
@@ -94,8 +95,8 @@ function f(e) {
94
95
  return `${String(Math.floor(e / 3600)).padStart(2, "0")}:${String(Math.floor(e % 3600 / 60)).padStart(2, "0")}:${(e % 60).toFixed(3).padStart(6, "0")}`;
95
96
  }
96
97
  }
97
- globalThis.customElements && !globalThis.customElements.get("dash-video") && globalThis.customElements.define("dash-video", c);
98
- var p = c, m = /* @__PURE__ */ new Set([
98
+ globalThis.customElements && !globalThis.customElements.get("dash-video") && globalThis.customElements.define("dash-video", u);
99
+ var h = u, g = /* @__PURE__ */ new Set([
99
100
  "style",
100
101
  "children",
101
102
  "ref",
@@ -103,43 +104,43 @@ var p = c, m = /* @__PURE__ */ new Set([
103
104
  "suppressContentEditableWarning",
104
105
  "suppressHydrationWarning",
105
106
  "dangerouslySetInnerHTML"
106
- ]), h = {
107
+ ]), _ = {
107
108
  className: "class",
108
109
  htmlFor: "for"
109
110
  };
110
- function g(e) {
111
+ function v(e) {
111
112
  return e.toLowerCase();
112
113
  }
113
- function _(e) {
114
+ function y(e) {
114
115
  if (typeof e == "boolean") return e ? "" : void 0;
115
116
  if (typeof e != "function" && !(typeof e == "object" && e)) return e;
116
117
  }
117
- function v({ react: e, tagName: t, elementClass: n, events: r, displayName: i, defaultProps: a, toAttributeName: o = g, toAttributeValue: s = _ }) {
118
+ function b({ react: e, tagName: t, elementClass: n, events: r, displayName: i, defaultProps: a, toAttributeName: o = v, toAttributeValue: s = y }) {
118
119
  let c = Number.parseInt(e.version) >= 19, l = e.forwardRef((i, l) => {
119
120
  var u, d;
120
- let f = e.useRef(null), p = e.useRef(/* @__PURE__ */ new Map()), g = {}, v = {}, b = {}, x = {};
121
+ let f = e.useRef(null), p = e.useRef(/* @__PURE__ */ new Map()), m = {}, h = {}, v = {}, b = {};
121
122
  for (let [e, t] of Object.entries(i)) {
122
123
  var S, C;
123
- if (m.has(e)) {
124
- b[e] = t;
124
+ if (g.has(e)) {
125
+ v[e] = t;
125
126
  continue;
126
127
  }
127
- let r = o((S = h[e]) == null ? e : S);
128
+ let r = o((S = _[e]) == null ? e : S);
128
129
  if (n.prototype && e in n.prototype && !(e in ((C = (u = globalThis.HTMLElement) == null ? void 0 : u.prototype) == null ? {} : C)) && !((d = n.observedAttributes) != null && d.some((e) => e === r))) {
129
- x[e] = t;
130
+ b[e] = t;
130
131
  continue;
131
132
  }
132
133
  if (e.startsWith("on")) {
133
- g[e] = t;
134
+ m[e] = t;
134
135
  continue;
135
136
  }
136
137
  let i = s(t);
137
- r && i != null && (v[r] = String(i), c || (b[r] = i)), r && c && (i === _(t) ? b[r] = t : b[r] = i);
138
+ r && i != null && (h[r] = String(i), c || (v[r] = i)), r && c && (i === y(t) ? v[r] = t : v[r] = i);
138
139
  }
139
140
  if (typeof window < "u") {
140
- for (let t in g) {
141
+ for (let t in m) {
141
142
  var w;
142
- let n = g[t], i = t.endsWith("Capture"), a = ((w = r == null ? void 0 : r[t]) == null ? t.slice(2).toLowerCase() : w).slice(0, i ? -7 : void 0);
143
+ let n = m[t], i = t.endsWith("Capture"), a = ((w = r == null ? void 0 : r[t]) == null ? t.slice(2).toLowerCase() : w).slice(0, i ? -7 : void 0);
143
144
  e.useLayoutEffect(() => {
144
145
  let e = f == null ? void 0 : f.current;
145
146
  if (!(!e || typeof n != "function")) return e.addEventListener(a, n, i), () => {
@@ -150,43 +151,43 @@ function v({ react: e, tagName: t, elementClass: n, events: r, displayName: i, d
150
151
  e.useLayoutEffect(() => {
151
152
  if (f.current === null) return;
152
153
  let e = /* @__PURE__ */ new Map();
153
- for (let t in x) y(f.current, t, x[t]), p.current.delete(t), e.set(t, x[t]);
154
- for (let [e, t] of p.current) y(f.current, e, void 0);
154
+ for (let t in b) x(f.current, t, b[t]), p.current.delete(t), e.set(t, b[t]);
155
+ for (let [e, t] of p.current) x(f.current, e, void 0);
155
156
  p.current = e;
156
157
  });
157
158
  }
158
159
  if (typeof window > "u" && n != null && n.getTemplateHTML && n != null && n.shadowRootOptions) {
159
160
  let { mode: t, delegatesFocus: r } = n.shadowRootOptions;
160
- b.children = [e.createElement("template", {
161
+ v.children = [e.createElement("template", {
161
162
  shadowrootmode: t,
162
163
  shadowrootdelegatesfocus: r,
163
- dangerouslySetInnerHTML: { __html: n.getTemplateHTML(v, i) },
164
+ dangerouslySetInnerHTML: { __html: n.getTemplateHTML(h, i) },
164
165
  key: "ce-la-react-ssr-template-shadow-root"
165
- }), b.children];
166
+ }), v.children];
166
167
  }
167
168
  return e.createElement(t, {
168
169
  ...a,
169
- ...b,
170
+ ...v,
170
171
  ref: e.useCallback((e) => {
171
172
  f.current = e, typeof l == "function" ? l(e) : l !== null && (l.current = e);
172
173
  }, [l])
173
- }, b.children);
174
+ }, v.children);
174
175
  });
175
176
  return l.displayName = i == null ? n.name : i, l;
176
177
  }
177
- function y(e, t, n) {
178
+ function x(e, t, n) {
178
179
  var r, i;
179
180
  e[t] = n, n == null && t in ((r = (i = globalThis.HTMLElement) == null ? void 0 : i.prototype) == null ? {} : r) && e.removeAttribute(t);
180
181
  }
181
- var b = v({
182
- react: o,
182
+ var S = b({
183
+ react: c.default,
183
184
  tagName: "dash-video",
184
- elementClass: p,
185
+ elementClass: h,
185
186
  toAttributeName(e) {
186
- return e === "muted" ? "" : e === "defaultMuted" ? "muted" : g(e);
187
+ return e === "muted" ? "" : e === "defaultMuted" ? "muted" : v(e);
187
188
  }
188
189
  });
189
190
  //#endregion
190
- export { b as default };
191
+ export { S as default };
191
192
 
192
- //# sourceMappingURL=react-BMxM8TWJ.js.map
193
+ //# sourceMappingURL=react-dE7BdGuR.js.map