@sapia-ai/chatbot-v3 1.0.0 → 1.0.1

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 (43) 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/package.json +14 -25
  21. package/dist/EmbeddedVideoPlayer-SaMMfDIW.js.map +0 -1
  22. package/dist/Preview-Db-hgkTh.js +0 -83
  23. package/dist/Preview-Db-hgkTh.js.map +0 -1
  24. package/dist/dash.all.min-DZ1yEcJk.js.map +0 -1
  25. package/dist/dist-BSi28_cP.js.map +0 -1
  26. package/dist/dist-DGBYKC8c.js.map +0 -1
  27. package/dist/dist-FvHBWiRa.js.map +0 -1
  28. package/dist/fix-webm-duration-BW9Fbdzt.js.map +0 -1
  29. package/dist/hls-mBncGwsE.js.map +0 -1
  30. package/dist/index.js.map +0 -1
  31. package/dist/max-Btet1snX.js.map +0 -1
  32. package/dist/messages-C4jqrtSG.js +0 -187
  33. package/dist/messages-C4jqrtSG.js.map +0 -1
  34. package/dist/react-BGJ7Szvq.js.map +0 -1
  35. package/dist/react-BMxM8TWJ.js.map +0 -1
  36. package/dist/react-BVzcquey.js.map +0 -1
  37. package/dist/react-BrCGR7Ca.js.map +0 -1
  38. package/dist/react-Bujo1aK5.js.map +0 -1
  39. package/dist/react-CRTg4gz8.js.map +0 -1
  40. package/dist/react-GXf8sbzf.js.map +0 -1
  41. package/dist/react-lp7yfM94.js.map +0 -1
  42. package/dist/sapia-chatbot.css +0 -3
  43. package/dist-umd/sapia-chatbot.umd.js.map +0 -1
@@ -1,10 +1,11 @@
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 { t as o } from "./dist-FvHBWiRa.js";
4
- import s 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";
5
+ import { t as c } from "./dist-FvHBWiRa.js";
5
6
  //#region ../../node_modules/.pnpm/youtube-video-element@1.9.0/node_modules/youtube-video-element/dist/youtube-video-element.js
6
- var c, l = "https://www.youtube.com/embed", u = "https://www.youtube-nocookie.com/embed", d = "https://www.youtube.com/iframe_api", f = "YT", p = "onYouTubeIframeAPIReady", m = /(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})/, h = /(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/.*?[?&]list=)([\w_-]+)/;
7
- function g(e) {
7
+ var l = /* @__PURE__ */ e(t(), 1), u, d = "https://www.youtube.com/embed", f = "https://www.youtube-nocookie.com/embed", p = "https://www.youtube.com/iframe_api", m = "YT", h = "onYouTubeIframeAPIReady", g = /(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/(?:embed\/|v\/|watch\?v=|watch\?.+&v=|shorts\/|live\/))((\w|-){11})/, _ = /(?:youtu\.be\/|youtube(?:-nocookie)?\.com\/.*?[?&]list=)([\w_-]+)/;
8
+ function v(e) {
8
9
  if (!e) return;
9
10
  let t = e.match(/[?&]t=([\dms]+)/i);
10
11
  if (!t) return;
@@ -13,10 +14,10 @@ function g(e) {
13
14
  let o = n.match(/(\d+)s?$/);
14
15
  return o && (r += parseInt(o[1], 10), i = !0), i ? r : void 0;
15
16
  }
16
- function _(e, t = {}) {
17
+ function y(e, t = {}) {
17
18
  var n;
18
19
  let r = {
19
- src: v(e, t),
20
+ src: b(e, t),
20
21
  frameborder: 0,
21
22
  width: "100%",
22
23
  height: "100%",
@@ -37,13 +38,13 @@ function _(e, t = {}) {
37
38
  left: 0;
38
39
  }
39
40
  </style>
40
- <iframe${j(r)}></iframe>
41
+ <iframe${N(r)}></iframe>
41
42
  `;
42
43
  }
43
- function v(e, t) {
44
+ function b(e, t) {
44
45
  var n;
45
46
  if (!e.src) return;
46
- let r = e.src.includes("-nocookie") ? u : l, i = {
47
+ let r = e.src.includes("-nocookie") ? f : d, i = {
47
48
  controls: e.controls === "" ? null : 0,
48
49
  autoplay: e.autoplay,
49
50
  loop: e.loop,
@@ -56,55 +57,55 @@ function v(e, t) {
56
57
  rel: 0,
57
58
  iv_load_policy: 3,
58
59
  modestbranding: 1,
59
- start: g(e.src),
60
+ start: v(e.src),
60
61
  ...t.config
61
62
  };
62
- if (m.test(e.src)) {
63
- let t = e.src.match(m);
64
- return `${r}/${t && t[1]}?${N(i)}`;
63
+ if (g.test(e.src)) {
64
+ let t = e.src.match(g);
65
+ return `${r}/${t && t[1]}?${F(i)}`;
65
66
  }
66
- let a = e.src.match(h);
67
- return `${r}?${N({
67
+ let a = e.src.match(_);
68
+ return `${r}?${F({
68
69
  listType: "playlist",
69
70
  list: a && a[1],
70
71
  ...i
71
72
  })}`;
72
73
  }
73
- var 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 WeakSet(), k = class extends o((c = globalThis.HTMLElement) == null ? class {} : c) {
74
+ var 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 WeakSet(), j = class extends c((u = globalThis.HTMLElement) == null ? class {} : u) {
74
75
  constructor() {
75
- super(), e(this, O), a(this, "loadComplete", new V()), t(this, y, void 0), t(this, b, void 0), t(this, x, 0), t(this, S, !1), t(this, C, void 0), a(this, "isLoaded", !1), t(this, w, null), t(this, T, null), t(this, E, null), t(this, D, 1), r(O, this, A).call(this, "config");
76
+ super(), n(this, A), s(this, "loadComplete", new U()), r(this, x, void 0), r(this, S, void 0), r(this, C, 0), r(this, w, !1), r(this, T, void 0), s(this, "isLoaded", !1), r(this, E, null), r(this, D, null), r(this, O, null), r(this, k, 1), a(A, this, M).call(this, "config");
76
77
  }
77
78
  get config() {
78
- return n(T, this);
79
+ return i(D, this);
79
80
  }
80
81
  set config(e) {
81
- i(T, this, e);
82
+ o(D, this, e);
82
83
  }
83
84
  async load() {
84
- if (n(y, this)) return;
85
+ if (i(x, this)) return;
85
86
  this.shadowRoot || this.attachShadow({ mode: "open" });
86
- let e = !n(b, this);
87
- n(b, this) && (this.loadComplete = new V(), this.isLoaded = !1), i(b, this, !0), await i(y, this, Promise.resolve()), i(y, this, null), i(x, this, 0), this.dispatchEvent(new Event("emptied"));
87
+ let e = !i(S, this);
88
+ i(S, this) && (this.loadComplete = new U(), this.isLoaded = !1), o(S, this, !0), await o(x, this, Promise.resolve()), o(x, this, null), o(C, this, 0), this.dispatchEvent(new Event("emptied"));
88
89
  let t = this.api;
89
90
  if (this.api = null, !this.src) {
90
91
  t == null || t.destroy();
91
92
  return;
92
93
  }
93
- i(E, this, document.createElement("video")), this.textTracks = n(E, this).textTracks, this.textTracks.addEventListener("change", () => {
94
+ o(O, this, document.createElement("video")), this.textTracks = i(O, this).textTracks, this.textTracks.addEventListener("change", () => {
94
95
  var e;
95
96
  let t = Array.from(this.textTracks).find((e) => e.mode === "showing");
96
97
  (e = this.api) == null || e.setOption("captions", "track", t ? { languageCode: t.language } : {});
97
98
  }), this.dispatchEvent(new Event("loadstart"));
98
- let r = this.shadowRoot.querySelector("iframe"), a = F(this.attributes);
99
- e && r && i(T, this, JSON.parse(r.getAttribute("data-config") || "{}")), (!(r != null && r.src) || r.src !== v(a, this)) && (this.shadowRoot.innerHTML = _(a, this), r = this.shadowRoot.querySelector("iframe"));
100
- let o = await L(d, f, p);
101
- this.api = new o.Player(r, { events: {
99
+ let n = this.shadowRoot.querySelector("iframe"), r = L(this.attributes);
100
+ e && n && o(D, this, JSON.parse(n.getAttribute("data-config") || "{}")), (!(n != null && n.src) || n.src !== b(r, this)) && (this.shadowRoot.innerHTML = y(r, this), n = this.shadowRoot.querySelector("iframe"));
101
+ let a = await z(p, m, h);
102
+ this.api = new a.Player(n, { events: {
102
103
  onReady: () => {
103
104
  var e;
104
- i(x, this, 1), this.dispatchEvent(new Event("loadedmetadata")), this.dispatchEvent(new Event("durationchange")), n(D, this) !== 1 && ((e = this.api) == null || e.setVolume(n(D, this) * 100)), this.dispatchEvent(new Event("volumechange")), this.dispatchEvent(new Event("loadcomplete")), this.isLoaded = !0, this.loadComplete.resolve();
105
+ o(C, this, 1), this.dispatchEvent(new Event("loadedmetadata")), this.dispatchEvent(new Event("durationchange")), i(k, this) !== 1 && ((e = this.api) == null || e.setVolume(i(k, this) * 100)), this.dispatchEvent(new Event("volumechange")), this.dispatchEvent(new Event("loadcomplete")), this.isLoaded = !0, this.loadComplete.resolve();
105
106
  },
106
107
  onError: (e) => {
107
- console.error(e), i(w, this, {
108
+ console.error(e), o(E, this, {
108
109
  code: e.data,
109
110
  message: `YouTube iframe player error #${e.data}; visit https://developers.google.com/youtube/iframe_api_reference#onError for the full error message.`
110
111
  }), this.dispatchEvent(new Event("error"));
@@ -113,33 +114,33 @@ var y = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), x = /*
113
114
  let s = !1;
114
115
  this.api.addEventListener("onStateChange", (e) => {
115
116
  var t;
116
- let r = e.data;
117
- if ((r === o.PlayerState.PLAYING || r === o.PlayerState.BUFFERING) && (s || (s = !0, this.dispatchEvent(new Event("play"))), (this.api.getOption("captions", "tracklist") || []).forEach((e) => {
118
- [...this.textTracks].some((t) => t.language === e.languageCode) || n(E, this).addTextTrack("subtitles", e.displayName, e.languageCode), this.textTracks = n(E, this).textTracks;
119
- }), this.dispatchEvent(new Event("loadstart"))), r === o.PlayerState.PLAYING) this.seeking && (i(S, this, !1), (t = n(C, this)) == null || t.resolve(), this.dispatchEvent(new Event("seeked"))), i(x, this, 3), this.dispatchEvent(new Event("playing"));
120
- else if (r === o.PlayerState.PAUSED) {
117
+ let n = e.data;
118
+ if ((n === a.PlayerState.PLAYING || n === a.PlayerState.BUFFERING) && (s || (s = !0, this.dispatchEvent(new Event("play"))), (this.api.getOption("captions", "tracklist") || []).forEach((e) => {
119
+ [...this.textTracks].some((t) => t.language === e.languageCode) || i(O, this).addTextTrack("subtitles", e.displayName, e.languageCode), this.textTracks = i(O, this).textTracks;
120
+ }), this.dispatchEvent(new Event("loadstart"))), n === a.PlayerState.PLAYING) this.seeking && (o(w, this, !1), (t = i(T, this)) == null || t.resolve(), this.dispatchEvent(new Event("seeked"))), o(C, this, 3), this.dispatchEvent(new Event("playing"));
121
+ else if (n === a.PlayerState.PAUSED) {
121
122
  let e = Math.abs(this.currentTime - c);
122
- !this.seeking && e > .1 && (i(S, this, !0), this.dispatchEvent(new Event("seeking"))), s = !1, this.dispatchEvent(new Event("pause"));
123
+ !this.seeking && e > .1 && (o(w, this, !0), this.dispatchEvent(new Event("seeking"))), s = !1, this.dispatchEvent(new Event("pause"));
123
124
  }
124
- r === o.PlayerState.ENDED && (s = !1, this.dispatchEvent(new Event("pause")), this.dispatchEvent(new Event("ended")), this.loop && this.play());
125
+ n === a.PlayerState.ENDED && (s = !1, this.dispatchEvent(new Event("pause")), this.dispatchEvent(new Event("ended")), this.loop && this.play());
125
126
  }), this.api.addEventListener("onPlaybackRateChange", () => {
126
127
  this.dispatchEvent(new Event("ratechange"));
127
128
  }), this.api.addEventListener("onVolumeChange", () => {
128
129
  var e;
129
130
  let t = ((e = this.api) == null ? void 0 : e.getVolume()) / 100;
130
- i(D, this, t), this.dispatchEvent(new Event("volumechange"));
131
+ o(k, this, t), this.dispatchEvent(new Event("volumechange"));
131
132
  }), this.api.addEventListener("onVideoProgress", () => {
132
133
  this.dispatchEvent(new Event("timeupdate"));
133
134
  }), await this.loadComplete;
134
135
  let c = 0;
135
136
  setInterval(() => {
136
137
  var e;
137
- let t = Math.abs(this.currentTime - c), r = this.buffered.end(this.buffered.length - 1);
138
- this.seeking && r > .1 ? (i(S, this, !1), (e = n(C, this)) == null || e.resolve(), this.dispatchEvent(new Event("seeked"))) : !this.seeking && t > .1 && (i(S, this, !0), this.dispatchEvent(new Event("seeking"))), c = this.currentTime;
138
+ let t = Math.abs(this.currentTime - c), n = this.buffered.end(this.buffered.length - 1);
139
+ this.seeking && n > .1 ? (o(w, this, !1), (e = i(T, this)) == null || e.resolve(), this.dispatchEvent(new Event("seeked"))) : !this.seeking && t > .1 && (o(w, this, !0), this.dispatchEvent(new Event("seeking"))), c = this.currentTime;
139
140
  }, 50);
140
141
  let l, u = setInterval(() => {
141
142
  let e = this.buffered.end(this.buffered.length - 1);
142
- e >= this.duration && (clearInterval(u), i(x, this, 4)), l != e && (l = e, this.dispatchEvent(new Event("progress")));
143
+ e >= this.duration && (clearInterval(u), o(C, this, 4)), l != e && (l = e, this.dispatchEvent(new Event("progress")));
143
144
  }, 100);
144
145
  }
145
146
  async attributeChangedCallback(e, t, n) {
@@ -153,17 +154,17 @@ var y = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), x = /*
153
154
  }
154
155
  async play() {
155
156
  var e;
156
- return i(C, this, null), await this.loadComplete, (e = this.api) == null || e.playVideo(), B(this);
157
+ return o(T, this, null), await this.loadComplete, (e = this.api) == null || e.playVideo(), H(this);
157
158
  }
158
159
  async pause() {
159
160
  var e;
160
161
  return await this.loadComplete, (e = this.api) == null ? void 0 : e.pauseVideo();
161
162
  }
162
163
  get seeking() {
163
- return n(S, this);
164
+ return i(w, this);
164
165
  }
165
166
  get readyState() {
166
- return n(x, this);
167
+ return i(C, this);
167
168
  }
168
169
  get src() {
169
170
  return this.getAttribute("src");
@@ -172,7 +173,7 @@ var y = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), x = /*
172
173
  this.src != e && this.setAttribute("src", e);
173
174
  }
174
175
  get error() {
175
- return n(w, this);
176
+ return i(E, this);
176
177
  }
177
178
  get paused() {
178
179
  var e, t;
@@ -195,9 +196,9 @@ var y = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), x = /*
195
196
  }
196
197
  get buffered() {
197
198
  var e, t;
198
- if (!this.isLoaded) return H();
199
+ if (!this.isLoaded) return W();
199
200
  let n = ((e = this.api) == null ? void 0 : e.getVideoLoadedFraction()) * ((t = this.api) == null ? void 0 : t.getDuration());
200
- return n > 0 ? H(0, n) : H();
201
+ return n > 0 ? W(0, n) : W();
201
202
  }
202
203
  get controls() {
203
204
  return this.hasAttribute("controls");
@@ -210,11 +211,11 @@ var y = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), x = /*
210
211
  return (e = (n = (t = this.api) == null ? void 0 : t.getCurrentTime) == null ? void 0 : n.call(t)) == null ? 0 : e;
211
212
  }
212
213
  set currentTime(e) {
213
- this.currentTime != e && (i(C, this, new V()), this.loadComplete.then(() => {
214
- var t, r;
215
- (t = this.api) == null || t.seekTo(e, !0), this.paused && ((r = n(C, this)) == null || r.then(() => {
214
+ this.currentTime != e && (o(T, this, new U()), this.loadComplete.then(() => {
215
+ var t, n;
216
+ (t = this.api) == null || t.seekTo(e, !0), this.paused && ((n = i(T, this)) == null || n.then(() => {
216
217
  var e;
217
- n(C, this) && ((e = this.api) == null || e.pauseVideo());
218
+ i(T, this) && ((e = this.api) == null || e.pauseVideo());
218
219
  }));
219
220
  }));
220
221
  }
@@ -263,23 +264,23 @@ var y = /* @__PURE__ */ new WeakMap(), b = /* @__PURE__ */ new WeakMap(), x = /*
263
264
  this.poster != e && this.setAttribute("poster", `${e}`);
264
265
  }
265
266
  set volume(e) {
266
- this.volume != e && (i(D, this, e), this.loadComplete.then(() => {
267
+ this.volume != e && (o(k, this, e), this.loadComplete.then(() => {
267
268
  var t;
268
269
  (t = this.api) == null || t.setVolume(e * 100);
269
270
  }));
270
271
  }
271
272
  get volume() {
272
273
  var e;
273
- return this.isLoaded ? ((e = this.api) == null ? void 0 : e.getVolume()) / 100 : n(D, this);
274
+ return this.isLoaded ? ((e = this.api) == null ? void 0 : e.getVolume()) / 100 : i(k, this);
274
275
  }
275
276
  };
276
- function A(e) {
277
+ function M(e) {
277
278
  if (Object.prototype.hasOwnProperty.call(this, e)) {
278
279
  let t = this[e];
279
280
  delete this[e], this[e] = t;
280
281
  }
281
282
  }
282
- a(k, "getTemplateHTML", _), a(k, "shadowRootOptions", { mode: "open" }), a(k, "observedAttributes", [
283
+ s(j, "getTemplateHTML", y), s(j, "shadowRootOptions", { mode: "open" }), s(j, "observedAttributes", [
283
284
  "autoplay",
284
285
  "controls",
285
286
  "crossorigin",
@@ -290,21 +291,21 @@ a(k, "getTemplateHTML", _), a(k, "shadowRootOptions", { mode: "open" }), a(k, "o
290
291
  "preload",
291
292
  "src"
292
293
  ]);
293
- function j(e) {
294
+ function N(e) {
294
295
  let t = "";
295
296
  for (let n in e) {
296
297
  let r = e[n];
297
- r === "" ? t += ` ${M(n)}` : t += ` ${M(n)}="${M(`${r}`)}"`;
298
+ r === "" ? t += ` ${P(n)}` : t += ` ${P(n)}="${P(`${r}`)}"`;
298
299
  }
299
300
  return t;
300
301
  }
301
- function M(e) {
302
+ function P(e) {
302
303
  return e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/`/g, "&#x60;");
303
304
  }
304
- function N(e) {
305
- return String(new URLSearchParams(P(e)));
305
+ function F(e) {
306
+ return String(new URLSearchParams(I(e)));
306
307
  }
307
- function P(e) {
308
+ function I(e) {
308
309
  let t = {};
309
310
  for (let n in e) {
310
311
  let r = e[n];
@@ -312,37 +313,37 @@ function P(e) {
312
313
  }
313
314
  return t;
314
315
  }
315
- function F(e) {
316
+ function L(e) {
316
317
  let t = {};
317
318
  for (let n of e) t[n.name] = n.value;
318
319
  return t;
319
320
  }
320
- var I = {};
321
- async function L(e, t, n) {
322
- return I[e] ? I[e] : t && self[t] ? (await R(0), self[t]) : I[e] = new Promise(function(r, i) {
321
+ var R = {};
322
+ async function z(e, t, n) {
323
+ return R[e] ? R[e] : t && self[t] ? (await B(0), self[t]) : R[e] = new Promise(function(r, i) {
323
324
  let a = document.createElement("script");
324
325
  a.src = e;
325
326
  let o = () => r(self[t]);
326
327
  n && (self[n] = o), a.onload = () => !n && o(), a.onerror = i, document.head.append(a);
327
328
  });
328
329
  }
329
- var R = (e) => new Promise((t) => setTimeout(t, e));
330
- function z(e) {
330
+ var B = (e) => new Promise((t) => setTimeout(t, e));
331
+ function V(e) {
331
332
  return (...t) => new Promise((n) => {
332
333
  e(...t, (...e) => {
333
334
  e.length > 1 ? n(e) : n(e[0]);
334
335
  });
335
336
  });
336
337
  }
337
- function B(e) {
338
- return z((t, n) => {
338
+ function H(e) {
339
+ return V((t, n) => {
339
340
  let r;
340
341
  e.addEventListener(t, r = () => {
341
342
  e.removeEventListener(t, r), n();
342
343
  });
343
344
  })("playing");
344
345
  }
345
- var V = class extends Promise {
346
+ var U = class extends Promise {
346
347
  constructor(e = () => {}) {
347
348
  let t, n;
348
349
  super((r, i) => {
@@ -350,17 +351,17 @@ var V = class extends Promise {
350
351
  }), this.resolve = t, this.reject = n;
351
352
  }
352
353
  };
353
- function H(e, t) {
354
- return U(Array.isArray(e) ? e : e == null || t == null || e === 0 && t === 0 ? [[0, 0]] : [[e, t]]);
354
+ function W(e, t) {
355
+ return G(Array.isArray(e) ? e : e == null || t == null || e === 0 && t === 0 ? [[0, 0]] : [[e, t]]);
355
356
  }
356
- function U(e) {
357
+ function G(e) {
357
358
  return Object.defineProperties(e, {
358
359
  start: { value: (t) => e[t][0] },
359
360
  end: { value: (t) => e[t][1] }
360
361
  }), e;
361
362
  }
362
- globalThis.customElements && !globalThis.customElements.get("youtube-video") && globalThis.customElements.define("youtube-video", k);
363
- var W = k, G = /* @__PURE__ */ new Set([
363
+ globalThis.customElements && !globalThis.customElements.get("youtube-video") && globalThis.customElements.define("youtube-video", j);
364
+ var K = j, q = /* @__PURE__ */ new Set([
364
365
  "style",
365
366
  "children",
366
367
  "ref",
@@ -368,28 +369,28 @@ var W = k, G = /* @__PURE__ */ new Set([
368
369
  "suppressContentEditableWarning",
369
370
  "suppressHydrationWarning",
370
371
  "dangerouslySetInnerHTML"
371
- ]), K = {
372
+ ]), J = {
372
373
  className: "class",
373
374
  htmlFor: "for"
374
375
  };
375
- function q(e) {
376
+ function Y(e) {
376
377
  return e.toLowerCase();
377
378
  }
378
- function J(e) {
379
+ function X(e) {
379
380
  if (typeof e == "boolean") return e ? "" : void 0;
380
381
  if (typeof e != "function" && !(typeof e == "object" && e)) return e;
381
382
  }
382
- function Y({ react: e, tagName: t, elementClass: n, events: r, displayName: i, defaultProps: a, toAttributeName: o = q, toAttributeValue: s = J }) {
383
+ function Z({ react: e, tagName: t, elementClass: n, events: r, displayName: i, defaultProps: a, toAttributeName: o = Y, toAttributeValue: s = X }) {
383
384
  let c = Number.parseInt(e.version) >= 19, l = e.forwardRef((i, l) => {
384
385
  var u, d;
385
386
  let f = e.useRef(null), p = e.useRef(/* @__PURE__ */ new Map()), m = {}, h = {}, g = {}, _ = {};
386
387
  for (let [e, t] of Object.entries(i)) {
387
388
  var v, y;
388
- if (G.has(e)) {
389
+ if (q.has(e)) {
389
390
  g[e] = t;
390
391
  continue;
391
392
  }
392
- let r = o((v = K[e]) == null ? e : v);
393
+ let r = o((v = J[e]) == null ? e : v);
393
394
  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))) {
394
395
  _[e] = t;
395
396
  continue;
@@ -399,7 +400,7 @@ function Y({ react: e, tagName: t, elementClass: n, events: r, displayName: i, d
399
400
  continue;
400
401
  }
401
402
  let i = s(t);
402
- r && i != null && (h[r] = String(i), c || (g[r] = i)), r && c && (i === J(t) ? g[r] = t : g[r] = i);
403
+ r && i != null && (h[r] = String(i), c || (g[r] = i)), r && c && (i === X(t) ? g[r] = t : g[r] = i);
403
404
  }
404
405
  if (typeof window < "u") {
405
406
  for (let t in m) {
@@ -415,8 +416,8 @@ function Y({ react: e, tagName: t, elementClass: n, events: r, displayName: i, d
415
416
  e.useLayoutEffect(() => {
416
417
  if (f.current === null) return;
417
418
  let e = /* @__PURE__ */ new Map();
418
- for (let t in _) X(f.current, t, _[t]), p.current.delete(t), e.set(t, _[t]);
419
- for (let [e, t] of p.current) X(f.current, e, void 0);
419
+ for (let t in _) Q(f.current, t, _[t]), p.current.delete(t), e.set(t, _[t]);
420
+ for (let [e, t] of p.current) Q(f.current, e, void 0);
420
421
  p.current = e;
421
422
  });
422
423
  }
@@ -439,19 +440,19 @@ function Y({ react: e, tagName: t, elementClass: n, events: r, displayName: i, d
439
440
  });
440
441
  return l.displayName = i == null ? n.name : i, l;
441
442
  }
442
- function X(e, t, n) {
443
+ function Q(e, t, n) {
443
444
  var r, i;
444
445
  e[t] = n, n == null && t in ((r = (i = globalThis.HTMLElement) == null ? void 0 : i.prototype) == null ? {} : r) && e.removeAttribute(t);
445
446
  }
446
- var Z = Y({
447
- react: s,
447
+ var $ = Z({
448
+ react: l.default,
448
449
  tagName: "youtube-video",
449
- elementClass: W,
450
+ elementClass: K,
450
451
  toAttributeName(e) {
451
- return e === "muted" ? "" : e === "defaultMuted" ? "muted" : q(e);
452
+ return e === "muted" ? "" : e === "defaultMuted" ? "muted" : Y(e);
452
453
  }
453
454
  });
454
455
  //#endregion
455
- export { Z as default };
456
+ export { $ as default };
456
457
 
457
- //# sourceMappingURL=react-BVzcquey.js.map
458
+ //# sourceMappingURL=react-Dbs-sPBo.js.map