@aigamo/nostalgic-diva 1.5.1 → 1.5.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.
package/dist/index.es.js CHANGED
@@ -1,23 +1,18 @@
1
- var W = Object.defineProperty;
2
- var Y = (r, a, e) => a in r ? W(r, a, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[a] = e;
3
- var y = (r, a, e) => (Y(r, typeof a != "symbol" ? a + "" : a, e), e);
4
- import s, { useRef as V } from "react";
5
- var d = /* @__PURE__ */ ((r) => (r[r.Trace = 0] = "Trace", r[r.Debug = 1] = "Debug", r[r.Information = 2] = "Information", r[r.Warning = 3] = "Warning", r[r.Error = 4] = "Error", r[r.Critical = 5] = "Critical", r[r.None = 6] = "None", r))(d || {});
1
+ var R = Object.defineProperty;
2
+ var F = (r, e, t) => e in r ? R(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var v = (r, e, t) => (F(r, typeof e != "symbol" ? e + "" : e, t), t);
4
+ import i, { useRef as V } from "react";
5
+ var c = /* @__PURE__ */ ((r) => (r[r.Trace = 0] = "Trace", r[r.Debug = 1] = "Debug", r[r.Information = 2] = "Information", r[r.Warning = 3] = "Warning", r[r.Error = 4] = "Error", r[r.Critical = 5] = "Critical", r[r.None = 6] = "None", r))(c || {});
6
6
  class E {
7
- constructor(a, e, t) {
8
- this.logger = a, this.playerElementRef = e, this.options = t, this.logger.log(d.Debug, "ctor");
7
+ constructor(e, t, a) {
8
+ this.logger = e, this.player = t, this.options = a, this.logger.log(c.Debug, "ctor");
9
9
  }
10
10
  }
11
- class j extends E {
12
- constructor(e, t, i) {
13
- super(e, t, i);
14
- y(this, "player");
15
- this.player = t.current;
16
- }
11
+ class Y extends E {
17
12
  async attach() {
18
13
  this.player.onerror = (e) => {
19
- var t, i;
20
- return (i = (t = this.options) == null ? void 0 : t.onError) == null ? void 0 : i.call(t, e);
14
+ var t, a;
15
+ return (a = (t = this.options) == null ? void 0 : t.onError) == null ? void 0 : a.call(t, e);
21
16
  }, this.player.onloadeddata = () => {
22
17
  var e, t;
23
18
  return (t = (e = this.options) == null ? void 0 : e.onLoaded) == null ? void 0 : t.call(e, { id: this.player.src });
@@ -70,40 +65,39 @@ class j extends E {
70
65
  return this.player.volume;
71
66
  }
72
67
  }
73
- const S = class {
74
- constructor(a, e, t, i, c, u) {
75
- y(this, "id");
76
- y(this, "impl");
77
- this.logger = a, this.type = e, this.playerElementRef = t, this.options = i, this.loadScript = c, this.playerApiFactory = u, this.id = S.nextId++;
68
+ const N = class {
69
+ constructor(e, t, a, s, o) {
70
+ v(this, "id");
71
+ v(this, "impl");
72
+ this.logger = e, this.type = t, this.player = a, this.options = s, this.playerApiFactory = o, this.id = N.nextId++;
78
73
  }
79
- createMessage(a) {
80
- return `${this.type}#${this.id} ${a}`;
74
+ createMessage(e) {
75
+ return `${this.type}#${this.id} ${e}`;
81
76
  }
82
- debug(a, ...e) {
77
+ debug(e, ...t) {
83
78
  this.logger.log(
84
- d.Debug,
85
- this.createMessage(a),
86
- ...e
79
+ c.Debug,
80
+ this.createMessage(e),
81
+ ...t
87
82
  );
88
83
  }
89
- error(a, ...e) {
84
+ error(e, ...t) {
90
85
  this.logger.log(
91
- d.Error,
92
- this.createMessage(a),
93
- ...e
86
+ c.Error,
87
+ this.createMessage(e),
88
+ ...t
94
89
  );
95
90
  }
96
- async attach(a) {
97
- var e;
98
- if (this.debug("attach", a), this.impl) {
91
+ async attach(e) {
92
+ if (this.debug("attach", e), this.impl) {
99
93
  this.debug("player is already attached");
100
94
  return;
101
95
  }
102
- await ((e = this.loadScript) == null ? void 0 : e.call(this)), this.debug("Attaching player..."), this.impl = new this.playerApiFactory(
96
+ this.debug("Attaching player..."), this.impl = new this.playerApiFactory(
103
97
  this.logger,
104
- this.playerElementRef,
98
+ this.player,
105
99
  this.options
106
- ), await this.impl.attach(a), this.debug("player attached");
100
+ ), await this.impl.attach(e), this.debug("player attached");
107
101
  }
108
102
  createPlayerNotAttachedError() {
109
103
  return new Error("player is not attached");
@@ -113,10 +107,10 @@ const S = class {
113
107
  throw this.createPlayerNotAttachedError();
114
108
  await this.impl.detach(), this.impl = void 0;
115
109
  }
116
- async loadVideo(a) {
117
- if (this.debug("loadVideo", a), this.impl === void 0)
110
+ async loadVideo(e) {
111
+ if (this.debug("loadVideo", e), this.impl === void 0)
118
112
  throw this.createPlayerNotAttachedError();
119
- this.debug("Loading video..."), await this.impl.loadVideo(a), this.debug("video loaded", a);
113
+ this.debug("Loading video..."), await this.impl.loadVideo(e), this.debug("video loaded", e);
120
114
  }
121
115
  play() {
122
116
  if (this.debug("play"), this.impl === void 0)
@@ -128,20 +122,20 @@ const S = class {
128
122
  throw this.createPlayerNotAttachedError();
129
123
  return this.impl.pause();
130
124
  }
131
- setCurrentTime(a) {
132
- if (this.debug("setCurrentTime", a), this.impl === void 0)
125
+ setCurrentTime(e) {
126
+ if (this.debug("setCurrentTime", e), this.impl === void 0)
133
127
  throw this.createPlayerNotAttachedError();
134
- return this.impl.setCurrentTime(a);
128
+ return this.impl.setCurrentTime(e);
135
129
  }
136
- setVolume(a) {
137
- if (this.debug("setVolume", a), this.impl === void 0)
130
+ setVolume(e) {
131
+ if (this.debug("setVolume", e), this.impl === void 0)
138
132
  throw this.createPlayerNotAttachedError();
139
- return this.impl.setVolume(a);
133
+ return this.impl.setVolume(e);
140
134
  }
141
- setMuted(a) {
142
- if (this.debug("setMuted", a), this.impl === void 0)
135
+ setMuted(e) {
136
+ if (this.debug("setMuted", e), this.impl === void 0)
143
137
  throw this.createPlayerNotAttachedError();
144
- return this.impl.setMuted(a);
138
+ return this.impl.setMuted(e);
145
139
  }
146
140
  getDuration() {
147
141
  if (this.debug("getDuration"), this.impl === void 0)
@@ -159,63 +153,85 @@ const S = class {
159
153
  return this.impl.getVolume();
160
154
  }
161
155
  };
162
- let f = S;
163
- y(f, "nextId", 1);
164
- function $() {
156
+ let C = N;
157
+ v(C, "nextId", 1);
158
+ function W() {
165
159
  const r = V(!0);
166
160
  return r.current ? (r.current = !1, !0) : r.current;
167
161
  }
168
- const x = (r, a) => r === a;
169
- function G(r, a = x) {
170
- const e = V(), t = V(r);
171
- return !$() && !a(t.current, r) && (e.current = t.current, t.current = r), e.current;
162
+ const j = (r, e) => r === e;
163
+ function $(r, e = j) {
164
+ const t = V(), a = V(r);
165
+ return !W() && !e(a.current, r) && (t.current = a.current, a.current = r), t.current;
172
166
  }
173
- const b = ({
167
+ const f = ({
174
168
  logger: r,
175
- type: a,
176
- playerApiRef: e,
177
- videoId: t,
178
- options: i,
179
- loadScript: c,
169
+ type: e,
170
+ loadScript: t,
171
+ playerFactory: a,
172
+ playerApiRef: s,
173
+ videoId: o,
174
+ options: n,
180
175
  playerApiFactory: u,
181
- children: o
176
+ children: d
182
177
  }) => {
183
- r.log(d.Debug, "PlayerContainer");
184
- const l = s.useRef(t), p = s.useRef(void 0), [h, w] = s.useState();
185
- s.useEffect(() => {
186
- const n = new f(
178
+ r.log(c.Debug, "PlayerContainer");
179
+ const y = i.useRef(o), p = i.useRef(void 0), [g, m] = i.useState(), [l, h] = i.useState();
180
+ i.useEffect(() => {
181
+ ((t == null ? void 0 : t()) ?? Promise.resolve()).then(() => {
182
+ a(p.current).then((b) => {
183
+ m(b);
184
+ });
185
+ });
186
+ }, [t, a]), i.useEffect(() => {
187
+ if (g === void 0)
188
+ return;
189
+ const b = new C(
187
190
  r,
188
- a,
189
- p,
190
- i,
191
- c,
191
+ e,
192
+ g,
193
+ n,
192
194
  u
193
195
  );
194
- return e && (e.current = n), n.attach(l.current).then(() => w(n)), () => {
195
- if (e && n !== e.current)
196
+ return s && (s.current = b), b.attach(y.current).then(() => h(b)), () => {
197
+ if (s && b !== s.current)
196
198
  throw new Error("playerApi differs");
197
- n.detach().then(() => w(void 0));
199
+ b.detach().finally(() => h(void 0));
198
200
  };
199
- }, [r, a, i, c, u, e]);
200
- const g = G(t);
201
- return s.useEffect(() => {
202
- g !== void 0 && (h == null || h.loadVideo(t));
203
- }, [g, t, h]), /* @__PURE__ */ s.createElement(s.Fragment, null, o(p, l.current));
204
- }, B = s.memo(
201
+ }, [
202
+ r,
203
+ e,
204
+ t,
205
+ g,
206
+ n,
207
+ u,
208
+ s
209
+ ]);
210
+ const w = $(o);
211
+ return i.useEffect(() => {
212
+ w !== void 0 && (l == null || l.loadVideo(o));
213
+ }, [w, o, l]), /* @__PURE__ */ i.createElement(i.Fragment, null, d(p, y.current));
214
+ }, x = i.memo(
205
215
  ({ ...r }) => {
206
- const { logger: a } = r;
207
- return a.log(d.Debug, "AudioPlayer"), /* @__PURE__ */ s.createElement(
208
- b,
216
+ const { logger: e } = r;
217
+ e.log(c.Debug, "AudioPlayer");
218
+ const t = i.useCallback(
219
+ (a) => Promise.resolve(a),
220
+ []
221
+ );
222
+ return /* @__PURE__ */ i.createElement(
223
+ f,
209
224
  {
210
225
  ...r,
211
226
  loadScript: void 0,
212
- playerApiFactory: j
227
+ playerFactory: t,
228
+ playerApiFactory: Y
213
229
  },
214
- (e, t) => /* @__PURE__ */ s.createElement(
230
+ (a, s) => /* @__PURE__ */ i.createElement(
215
231
  "audio",
216
232
  {
217
- ref: e,
218
- src: t,
233
+ ref: a,
234
+ src: s,
219
235
  style: { width: "100%", height: "100%" },
220
236
  preload: "auto",
221
237
  autoPlay: !0,
@@ -226,69 +242,67 @@ const b = ({
226
242
  }
227
243
  );
228
244
  var I = /* @__PURE__ */ ((r) => (r[r.Play = 2] = "Play", r[r.Pause = 3] = "Pause", r[r.End = 4] = "End", r))(I || {});
229
- const D = class extends E {
230
- constructor(e, t, i) {
231
- super(e, t, i);
232
- y(this, "player");
233
- y(this, "duration");
234
- y(this, "currentTime");
235
- y(this, "volume");
236
- y(this, "handleMessage", (e) => {
237
- var i, c, u, o, l, p, h, w, g, n, m, U, v, M;
238
- if (e.origin !== D.origin)
245
+ const P = class extends E {
246
+ constructor() {
247
+ super(...arguments);
248
+ v(this, "duration");
249
+ v(this, "currentTime");
250
+ v(this, "volume");
251
+ v(this, "handleMessage", (t) => {
252
+ var s, o, n, u, d, y, p, g, m, l, h, w, b, U;
253
+ if (t.origin !== P.origin)
239
254
  return;
240
- const t = e.data;
241
- switch (t.eventName) {
255
+ const a = t.data;
256
+ switch (a.eventName) {
242
257
  case "playerStatusChange":
243
258
  this.logger.log(
244
- d.Debug,
245
- `player status changed: ${I[t.data.playerStatus] ?? t.data.playerStatus}`
259
+ c.Debug,
260
+ `player status changed: ${I[a.data.playerStatus] ?? a.data.playerStatus}`
246
261
  );
247
262
  break;
248
263
  case "statusChange":
249
264
  switch (this.logger.log(
250
- d.Debug,
251
- `status changed: ${I[t.data.playerStatus] ?? t.data.playerStatus}`
252
- ), t.data.playerStatus) {
265
+ c.Debug,
266
+ `status changed: ${I[a.data.playerStatus] ?? a.data.playerStatus}`
267
+ ), a.data.playerStatus) {
253
268
  case 2:
254
- (c = (i = this.options) == null ? void 0 : i.onPlay) == null || c.call(i);
269
+ (o = (s = this.options) == null ? void 0 : s.onPlay) == null || o.call(s);
255
270
  break;
256
271
  case 3:
257
- (o = (u = this.options) == null ? void 0 : u.onPause) == null || o.call(u);
272
+ (u = (n = this.options) == null ? void 0 : n.onPause) == null || u.call(n);
258
273
  break;
259
274
  case 4:
260
- (p = (l = this.options) == null ? void 0 : l.onEnded) == null || p.call(l);
275
+ (y = (d = this.options) == null ? void 0 : d.onEnded) == null || y.call(d);
261
276
  break;
262
277
  }
263
278
  break;
264
279
  case "playerMetadataChange":
265
- t.data.duration !== void 0 && (this.duration = t.data.duration / 1e3), this.currentTime = t.data.currentTime === void 0 ? void 0 : t.data.currentTime / 1e3, this.volume = t.data.volume, (w = (h = this.options) == null ? void 0 : h.onTimeUpdate) == null || w.call(h, {
280
+ a.data.duration !== void 0 && (this.duration = a.data.duration / 1e3), this.currentTime = a.data.currentTime === void 0 ? void 0 : a.data.currentTime / 1e3, this.volume = a.data.volume, (g = (p = this.options) == null ? void 0 : p.onTimeUpdate) == null || g.call(p, {
266
281
  duration: this.duration,
267
282
  percent: this.currentTime !== void 0 && this.duration !== void 0 ? this.currentTime / this.duration : void 0,
268
283
  seconds: this.currentTime
269
284
  });
270
285
  break;
271
286
  case "loadComplete":
272
- this.logger.log(d.Debug, "load completed"), this.duration = t.data.videoInfo.lengthInSeconds, (n = (g = this.options) == null ? void 0 : g.onLoaded) == null || n.call(g, { id: t.data.videoInfo.watchId });
287
+ this.logger.log(c.Debug, "load completed"), this.duration = a.data.videoInfo.lengthInSeconds, (l = (m = this.options) == null ? void 0 : m.onLoaded) == null || l.call(m, { id: a.data.videoInfo.watchId });
273
288
  break;
274
289
  case "error":
275
- (U = (m = this.options) == null ? void 0 : m.onError) == null || U.call(m, t);
290
+ (w = (h = this.options) == null ? void 0 : h.onError) == null || w.call(h, a);
276
291
  break;
277
292
  case "player-error:video:play":
278
293
  case "player-error:video:seek":
279
- (M = (v = this.options) == null ? void 0 : v.onError) == null || M.call(v, t);
294
+ (U = (b = this.options) == null ? void 0 : b.onError) == null || U.call(b, a);
280
295
  break;
281
296
  default:
282
297
  this.logger.log(
283
- d.Debug,
298
+ c.Debug,
284
299
  "message",
285
- t.eventName,
286
- t.data
300
+ a.eventName,
301
+ a.data
287
302
  );
288
303
  break;
289
304
  }
290
305
  });
291
- this.player = t.current;
292
306
  }
293
307
  async attach() {
294
308
  window.addEventListener("message", this.handleMessage);
@@ -296,23 +310,23 @@ const D = class extends E {
296
310
  async detach() {
297
311
  window.removeEventListener("message", this.handleMessage);
298
312
  }
299
- async loadVideo(e) {
300
- return new Promise((t, i) => {
313
+ async loadVideo(t) {
314
+ return new Promise((a, s) => {
301
315
  this.duration = void 0, this.currentTime = void 0, this.player.onload = () => {
302
- this.player.onload = null, t();
303
- }, this.player.src = `https://embed.nicovideo.jp/watch/${e}?jsapi=1&playerId=1`;
316
+ this.player.onload = null, a();
317
+ }, this.player.src = `https://embed.nicovideo.jp/watch/${t}?jsapi=1&playerId=1`;
304
318
  });
305
319
  }
306
320
  // https://blog.hayu.io/web/create/nicovideo-embed-player-api/.
307
- postMessage(e) {
308
- var t;
309
- (t = this.player.contentWindow) == null || t.postMessage(
321
+ postMessage(t) {
322
+ var a;
323
+ (a = this.player.contentWindow) == null || a.postMessage(
310
324
  {
311
- ...e,
325
+ ...t,
312
326
  playerId: "1",
313
327
  sourceConnectorType: 1
314
328
  },
315
- D.origin
329
+ P.origin
316
330
  );
317
331
  }
318
332
  async play() {
@@ -321,19 +335,19 @@ const D = class extends E {
321
335
  async pause() {
322
336
  this.postMessage({ eventName: "pause" });
323
337
  }
324
- async setCurrentTime(e) {
325
- this.postMessage({ eventName: "seek", data: { time: e * 1e3 } });
338
+ async setCurrentTime(t) {
339
+ this.postMessage({ eventName: "seek", data: { time: t * 1e3 } });
326
340
  }
327
- async setVolume(e) {
341
+ async setVolume(t) {
328
342
  this.postMessage({
329
343
  eventName: "volumeChange",
330
- data: { volume: e }
344
+ data: { volume: t }
331
345
  });
332
346
  }
333
- async setMuted(e) {
347
+ async setMuted(t) {
334
348
  this.postMessage({
335
349
  eventName: "mute",
336
- data: { mute: e }
350
+ data: { mute: t }
337
351
  });
338
352
  }
339
353
  async getDuration() {
@@ -346,23 +360,29 @@ const D = class extends E {
346
360
  return this.volume;
347
361
  }
348
362
  };
349
- let C = D;
350
- y(C, "origin", "https://embed.nicovideo.jp");
351
- const O = s.memo(
363
+ let T = P;
364
+ v(T, "origin", "https://embed.nicovideo.jp");
365
+ const G = i.memo(
352
366
  ({ ...r }) => {
353
- const { logger: a } = r;
354
- return a.log(d.Debug, "NiconicoPlayer"), /* @__PURE__ */ s.createElement(
355
- b,
367
+ const { logger: e } = r;
368
+ e.log(c.Debug, "NiconicoPlayer");
369
+ const t = i.useCallback(
370
+ (a) => Promise.resolve(a),
371
+ []
372
+ );
373
+ return /* @__PURE__ */ i.createElement(
374
+ f,
356
375
  {
357
376
  ...r,
358
377
  loadScript: void 0,
359
- playerApiFactory: C
378
+ playerFactory: t,
379
+ playerApiFactory: T
360
380
  },
361
- (e, t) => /* @__PURE__ */ s.createElement("div", { style: { width: "100%", height: "100%" } }, /* @__PURE__ */ s.createElement(
381
+ (a, s) => /* @__PURE__ */ i.createElement("div", { style: { width: "100%", height: "100%" } }, /* @__PURE__ */ i.createElement(
362
382
  "iframe",
363
383
  {
364
- ref: e,
365
- src: `https://embed.nicovideo.jp/watch/${t}?jsapi=1&playerId=1`,
384
+ ref: a,
385
+ src: `https://embed.nicovideo.jp/watch/${s}?jsapi=1&playerId=1`,
366
386
  width: "100%",
367
387
  height: "100%",
368
388
  allowFullScreen: !0,
@@ -372,168 +392,163 @@ const O = s.memo(
372
392
  ))
373
393
  );
374
394
  }
375
- ), R = s.createContext(
395
+ ), M = i.createContext(
376
396
  // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
377
397
  void 0
378
- ), H = new class {
398
+ ), B = new class {
379
399
  constructor() {
380
- y(this, "title", "nostalgic-diva");
400
+ v(this, "title", "nostalgic-diva");
381
401
  }
382
402
  createMessage(r) {
383
403
  return `[${this.title}] ${r}`;
384
404
  }
385
- debug(r, ...a) {
386
- console.debug(this.createMessage(r), ...a);
405
+ debug(r, ...e) {
406
+ console.debug(this.createMessage(r), ...e);
387
407
  }
388
- error(r, ...a) {
389
- console.error(this.createMessage(r), ...a);
408
+ error(r, ...e) {
409
+ console.error(this.createMessage(r), ...e);
390
410
  }
391
- warn(r, ...a) {
392
- console.warn(this.createMessage(r), ...a);
411
+ warn(r, ...e) {
412
+ console.warn(this.createMessage(r), ...e);
393
413
  }
394
414
  isEnabled() {
395
415
  return !0;
396
416
  }
397
- log(r, a, ...e) {
417
+ log(r, e, ...t) {
398
418
  switch (r) {
399
- case d.Debug:
400
- this.debug(a, ...e);
419
+ case c.Debug:
420
+ this.debug(e, ...t);
401
421
  break;
402
- case d.Warning:
403
- this.warn(a, ...e);
422
+ case c.Warning:
423
+ this.warn(e, ...t);
404
424
  break;
405
- case d.Error:
406
- this.error(a, ...e);
425
+ case c.Error:
426
+ this.error(e, ...t);
407
427
  break;
408
428
  }
409
429
  }
410
430
  }(), ee = ({
411
- logger: r = H,
412
- children: a
431
+ logger: r = B,
432
+ children: e
413
433
  }) => {
414
- const e = s.useRef(), t = s.useCallback(async (n) => {
415
- var m;
416
- await ((m = e.current) == null ? void 0 : m.loadVideo(n));
417
- }, []), i = s.useCallback(async () => {
418
- var n;
419
- await ((n = e.current) == null ? void 0 : n.play());
420
- }, []), c = s.useCallback(async () => {
421
- var n;
422
- await ((n = e.current) == null ? void 0 : n.pause());
423
- }, []), u = s.useCallback(async (n) => {
424
- const m = e.current;
425
- m && (await m.setCurrentTime(n), await m.play());
426
- }, []), o = s.useCallback(async (n) => {
427
- var m;
428
- await ((m = e.current) == null ? void 0 : m.setVolume(n));
429
- }, []), l = s.useCallback(async (n) => {
430
- var m;
431
- await ((m = e.current) == null ? void 0 : m.setMuted(n));
432
- }, []), p = s.useCallback(async () => {
433
- var n;
434
- return await ((n = e.current) == null ? void 0 : n.getDuration());
435
- }, []), h = s.useCallback(async () => {
436
- var n;
437
- return await ((n = e.current) == null ? void 0 : n.getCurrentTime());
438
- }, []), w = s.useCallback(async () => {
439
- var n;
440
- return await ((n = e.current) == null ? void 0 : n.getVolume());
441
- }, []), g = s.useMemo(
434
+ const t = i.useRef(), a = i.useCallback(async (l) => {
435
+ var h;
436
+ await ((h = t.current) == null ? void 0 : h.loadVideo(l));
437
+ }, []), s = i.useCallback(async () => {
438
+ var l;
439
+ await ((l = t.current) == null ? void 0 : l.play());
440
+ }, []), o = i.useCallback(async () => {
441
+ var l;
442
+ await ((l = t.current) == null ? void 0 : l.pause());
443
+ }, []), n = i.useCallback(async (l) => {
444
+ const h = t.current;
445
+ h && (await h.setCurrentTime(l), await h.play());
446
+ }, []), u = i.useCallback(async (l) => {
447
+ var h;
448
+ await ((h = t.current) == null ? void 0 : h.setVolume(l));
449
+ }, []), d = i.useCallback(async (l) => {
450
+ var h;
451
+ await ((h = t.current) == null ? void 0 : h.setMuted(l));
452
+ }, []), y = i.useCallback(async () => {
453
+ var l;
454
+ return await ((l = t.current) == null ? void 0 : l.getDuration());
455
+ }, []), p = i.useCallback(async () => {
456
+ var l;
457
+ return await ((l = t.current) == null ? void 0 : l.getCurrentTime());
458
+ }, []), g = i.useCallback(async () => {
459
+ var l;
460
+ return await ((l = t.current) == null ? void 0 : l.getVolume());
461
+ }, []), m = i.useMemo(
442
462
  () => ({
443
463
  logger: r,
444
- playerApiRef: e,
445
- loadVideo: t,
446
- play: i,
447
- pause: c,
448
- setCurrentTime: u,
449
- setVolume: o,
450
- setMuted: l,
451
- getDuration: p,
452
- getCurrentTime: h,
453
- getVolume: w
464
+ playerApiRef: t,
465
+ loadVideo: a,
466
+ play: s,
467
+ pause: o,
468
+ setCurrentTime: n,
469
+ setVolume: u,
470
+ setMuted: d,
471
+ getDuration: y,
472
+ getCurrentTime: p,
473
+ getVolume: g
454
474
  }),
455
475
  [
456
476
  r,
457
- t,
458
- i,
459
- c,
460
- u,
477
+ a,
478
+ s,
461
479
  o,
462
- l,
480
+ n,
481
+ u,
482
+ d,
483
+ y,
463
484
  p,
464
- h,
465
- w
485
+ g
466
486
  ]
467
487
  );
468
- return /* @__PURE__ */ s.createElement(R.Provider, { value: g }, a);
469
- }, q = () => s.useContext(R);
470
- class A extends E {
471
- constructor(e, t, i) {
472
- super(e, t, i);
473
- y(this, "player");
474
- this.player = SC.Widget(this.playerElementRef.current);
475
- }
488
+ return /* @__PURE__ */ i.createElement(M.Provider, { value: m }, e);
489
+ }, O = () => i.useContext(M);
490
+ class k extends E {
476
491
  getDurationCore() {
477
492
  return new Promise((e, t) => {
478
493
  this.player.getDuration(e);
479
494
  });
480
495
  }
481
496
  attach(e) {
482
- return new Promise((t, i) => {
497
+ return new Promise((t, a) => {
483
498
  this.player.bind(SC.Widget.Events.READY, () => {
484
- var c, u;
499
+ var s, o;
485
500
  this.player.bind(
486
501
  SC.Widget.Events.PLAY_PROGRESS,
487
- async (o) => {
488
- var p, h;
489
- const l = await this.getDurationCore();
490
- (h = (p = this.options) == null ? void 0 : p.onTimeUpdate) == null || h.call(p, {
491
- duration: l / 1e3,
492
- percent: o.currentPosition / l,
493
- seconds: o.currentPosition / 1e3
502
+ async (n) => {
503
+ var d, y;
504
+ const u = await this.getDurationCore();
505
+ (y = (d = this.options) == null ? void 0 : d.onTimeUpdate) == null || y.call(d, {
506
+ duration: u / 1e3,
507
+ percent: n.currentPosition / u,
508
+ seconds: n.currentPosition / 1e3
494
509
  });
495
510
  }
496
511
  ), this.player.bind(
497
512
  SC.Widget.Events.ERROR,
498
- (o) => {
499
- var l, p;
500
- return (p = (l = this.options) == null ? void 0 : l.onError) == null ? void 0 : p.call(l, o);
513
+ (n) => {
514
+ var u, d;
515
+ return (d = (u = this.options) == null ? void 0 : u.onError) == null ? void 0 : d.call(u, n);
501
516
  }
502
517
  ), this.player.bind(
503
518
  SC.Widget.Events.PLAY,
504
519
  () => {
505
- var o, l;
506
- return (l = (o = this.options) == null ? void 0 : o.onPlay) == null ? void 0 : l.call(o);
520
+ var n, u;
521
+ return (u = (n = this.options) == null ? void 0 : n.onPlay) == null ? void 0 : u.call(n);
507
522
  }
508
523
  ), this.player.bind(
509
524
  SC.Widget.Events.PAUSE,
510
525
  () => {
511
- var o, l;
512
- return (l = (o = this.options) == null ? void 0 : o.onPause) == null ? void 0 : l.call(o);
526
+ var n, u;
527
+ return (u = (n = this.options) == null ? void 0 : n.onPause) == null ? void 0 : u.call(n);
513
528
  }
514
529
  ), this.player.bind(
515
530
  SC.Widget.Events.FINISH,
516
531
  () => {
517
- var o, l;
518
- return (l = (o = this.options) == null ? void 0 : o.onEnded) == null ? void 0 : l.call(o);
532
+ var n, u;
533
+ return (u = (n = this.options) == null ? void 0 : n.onEnded) == null ? void 0 : u.call(n);
519
534
  }
520
- ), (u = (c = this.options) == null ? void 0 : c.onLoaded) == null || u.call(c, { id: e }), t();
535
+ ), (o = (s = this.options) == null ? void 0 : s.onLoaded) == null || o.call(s, { id: e }), t();
521
536
  });
522
537
  });
523
538
  }
524
539
  async detach() {
525
540
  this.player.unbind(SC.Widget.Events.READY), this.player.unbind(SC.Widget.Events.PLAY_PROGRESS), this.player.unbind(SC.Widget.Events.ERROR), this.player.unbind(SC.Widget.Events.PLAY), this.player.unbind(SC.Widget.Events.PAUSE), this.player.unbind(SC.Widget.Events.FINISH);
526
541
  }
527
- static playerLoadAsync(e, t, i) {
528
- return new Promise((c, u) => {
529
- e.load(t, { ...i, callback: c });
542
+ static playerLoadAsync(e, t, a) {
543
+ return new Promise((s, o) => {
544
+ e.load(t, { ...a, callback: s });
530
545
  });
531
546
  }
532
547
  async loadVideo(e) {
533
- var t, i;
534
- await A.playerLoadAsync(this.player, e, {
548
+ var t, a;
549
+ await k.playerLoadAsync(this.player, e, {
535
550
  auto_play: !0
536
- }), (i = (t = this.options) == null ? void 0 : t.onLoaded) == null || i.call(t, { id: e });
551
+ }), (a = (t = this.options) == null ? void 0 : t.onLoaded) == null || a.call(t, { id: e });
537
552
  }
538
553
  async play() {
539
554
  this.player.play();
@@ -573,49 +588,53 @@ class A extends E {
573
588
  return await this.getVolumeCore() / 100;
574
589
  }
575
590
  }
576
- function z(r) {
577
- return new Promise((a, e) => {
578
- const t = document.createElement("script");
579
- t.src = r, t.async = !0, t.onerror = e, t.onload = t.onreadystatechange = function() {
580
- const i = this.readyState;
581
- i && i !== "loaded" && i !== "complete" || (t.onload = t.onreadystatechange = null, a());
582
- }, document.head.appendChild(t);
591
+ function H(r) {
592
+ return new Promise((e, t) => {
593
+ const a = document.createElement("script");
594
+ a.src = r, a.async = !0, a.onerror = t, a.onload = a.onreadystatechange = function() {
595
+ const s = this.readyState;
596
+ s && s !== "loaded" && s !== "complete" || (a.onload = a.onreadystatechange = null, e());
597
+ }, document.head.appendChild(a);
583
598
  });
584
599
  }
585
- const P = [];
586
- async function k(r, a) {
587
- if (P.includes(r))
588
- return a.log(d.Debug, r, "script is already loaded"), !1;
600
+ const D = [];
601
+ async function A(r, e) {
602
+ if (D.includes(r))
603
+ return e.log(c.Debug, r, "script is already loaded"), !1;
589
604
  try {
590
- return a.log(d.Debug, r, "Loading script..."), await z(r), P.includes(r) ? (a.log(d.Debug, r, "script is already loaded"), !1) : (P.push(r), a.log(d.Debug, r, "script loaded"), !0);
591
- } catch (e) {
592
- throw a.log(d.Error, r, "Failed to load script"), e;
605
+ return e.log(c.Debug, r, "Loading script..."), await H(r), D.includes(r) ? (e.log(c.Debug, r, "script is already loaded"), !1) : (D.push(r), e.log(c.Debug, r, "script loaded"), !0);
606
+ } catch (t) {
607
+ throw e.log(c.Error, r, "Failed to load script"), t;
593
608
  }
594
609
  }
595
- const J = s.memo(
610
+ const q = i.memo(
596
611
  ({ ...r }) => {
597
- const { logger: a } = r;
598
- a.log(d.Debug, "SoundCloudPlayer");
599
- const e = s.useCallback(async () => {
600
- await k(
612
+ const { logger: e } = r;
613
+ e.log(c.Debug, "SoundCloudPlayer");
614
+ const t = i.useCallback(async () => {
615
+ await A(
601
616
  "https://w.soundcloud.com/player/api.js",
602
- a
617
+ e
603
618
  );
604
- }, [a]);
605
- return /* @__PURE__ */ s.createElement(
606
- b,
619
+ }, [e]), a = i.useCallback(
620
+ (s) => Promise.resolve(SC.Widget(s)),
621
+ []
622
+ );
623
+ return /* @__PURE__ */ i.createElement(
624
+ f,
607
625
  {
608
626
  ...r,
609
- loadScript: e,
610
- playerApiFactory: A
627
+ loadScript: t,
628
+ playerFactory: a,
629
+ playerApiFactory: k
611
630
  },
612
- (t, i) => (
631
+ (s, o) => (
613
632
  // eslint-disable-next-line jsx-a11y/iframe-has-title
614
- /* @__PURE__ */ s.createElement(
633
+ /* @__PURE__ */ i.createElement(
615
634
  "iframe",
616
635
  {
617
- ref: t,
618
- src: `https://w.soundcloud.com/player/?url=${i}`,
636
+ ref: s,
637
+ src: `https://w.soundcloud.com/player/?url=${o}`,
619
638
  frameBorder: 0,
620
639
  allow: "autoplay",
621
640
  style: { width: "100%", height: "100%" }
@@ -625,21 +644,16 @@ const J = s.memo(
625
644
  );
626
645
  }
627
646
  );
628
- class K extends E {
629
- constructor(e, t, i) {
630
- super(e, t, i);
631
- y(this, "player");
632
- this.player = new Vimeo.Player(this.playerElementRef.current);
633
- }
647
+ class z extends E {
634
648
  async attach() {
635
649
  await this.player.ready(), this.player.on("error", (e) => {
636
- var t, i;
637
- return (i = (t = this.options) == null ? void 0 : t.onError) == null ? void 0 : i.call(t, e);
650
+ var t, a;
651
+ return (a = (t = this.options) == null ? void 0 : t.onError) == null ? void 0 : a.call(t, e);
638
652
  }), this.player.on(
639
653
  "loaded",
640
654
  (e) => {
641
- var t, i;
642
- return (i = (t = this.options) == null ? void 0 : t.onLoaded) == null ? void 0 : i.call(t, { id: e.id.toString() });
655
+ var t, a;
656
+ return (a = (t = this.options) == null ? void 0 : t.onLoaded) == null ? void 0 : a.call(t, { id: e.id.toString() });
643
657
  }
644
658
  ), this.player.on("play", () => {
645
659
  var e, t;
@@ -651,8 +665,8 @@ class K extends E {
651
665
  var e, t;
652
666
  return (t = (e = this.options) == null ? void 0 : e.onEnded) == null ? void 0 : t.call(e);
653
667
  }), this.player.on("timeupdate", (e) => {
654
- var t, i;
655
- (i = (t = this.options) == null ? void 0 : t.onTimeUpdate) == null || i.call(t, {
668
+ var t, a;
669
+ (a = (t = this.options) == null ? void 0 : t.onTimeUpdate) == null || a.call(t, {
656
670
  duration: e.duration,
657
671
  percent: e.percent,
658
672
  seconds: e.seconds
@@ -690,30 +704,34 @@ class K extends E {
690
704
  return await this.player.getVolume();
691
705
  }
692
706
  }
693
- const Q = s.memo(
707
+ const J = i.memo(
694
708
  ({ ...r }) => {
695
- const { logger: a } = r;
696
- a.log(d.Debug, "VimeoPlayer");
697
- const e = s.useCallback(async () => {
698
- await k(
709
+ const { logger: e } = r;
710
+ e.log(c.Debug, "VimeoPlayer");
711
+ const t = i.useCallback(async () => {
712
+ await A(
699
713
  "https://player.vimeo.com/api/player.js",
700
- a
714
+ e
701
715
  );
702
- }, [a]);
703
- return /* @__PURE__ */ s.createElement(
704
- b,
716
+ }, [e]), a = i.useCallback(
717
+ (s) => Promise.resolve(new Vimeo.Player(s)),
718
+ []
719
+ );
720
+ return /* @__PURE__ */ i.createElement(
721
+ f,
705
722
  {
706
723
  ...r,
707
- loadScript: e,
708
- playerApiFactory: K
724
+ loadScript: t,
725
+ playerFactory: a,
726
+ playerApiFactory: z
709
727
  },
710
- (t, i) => (
728
+ (s, o) => (
711
729
  // eslint-disable-next-line jsx-a11y/iframe-has-title
712
- /* @__PURE__ */ s.createElement(
730
+ /* @__PURE__ */ i.createElement(
713
731
  "iframe",
714
732
  {
715
- ref: t,
716
- src: `https://player.vimeo.com/video/${i}`,
733
+ ref: s,
734
+ src: `https://player.vimeo.com/video/${o}`,
717
735
  frameBorder: 0,
718
736
  allow: "autoplay",
719
737
  style: { width: "100%", height: "100%" }
@@ -723,88 +741,82 @@ const Q = s.memo(
723
741
  );
724
742
  }
725
743
  );
726
- var F = /* @__PURE__ */ ((r) => (r[r.UNSTARTED = -1] = "UNSTARTED", r[r.ENDED = 0] = "ENDED", r[r.PLAYING = 1] = "PLAYING", r[r.PAUSED = 2] = "PAUSED", r[r.BUFFERING = 3] = "BUFFERING", r[r.CUED = 5] = "CUED", r))(F || {});
727
- const N = class extends E {
728
- constructor(e, t, i) {
729
- super(e, t, i);
730
- y(this, "player");
731
- y(this, "previousTime");
732
- y(this, "timeUpdateIntervalId");
733
- this.player = new YT.Player(this.playerElementRef.current, {
734
- host: N.origin,
735
- width: "100%",
736
- height: "100%"
737
- });
744
+ var S = /* @__PURE__ */ ((r) => (r[r.UNSTARTED = -1] = "UNSTARTED", r[r.ENDED = 0] = "ENDED", r[r.PLAYING = 1] = "PLAYING", r[r.PAUSED = 2] = "PAUSED", r[r.BUFFERING = 3] = "BUFFERING", r[r.CUED = 5] = "CUED", r))(S || {});
745
+ class K extends E {
746
+ constructor() {
747
+ super(...arguments);
748
+ v(this, "previousTime");
749
+ v(this, "timeUpdateIntervalId");
738
750
  }
739
751
  clearTimeUpdateInterval() {
740
752
  this.logger.log(
741
- d.Debug,
753
+ c.Debug,
742
754
  "clearTimeUpdateInterval",
743
755
  this.timeUpdateIntervalId
744
756
  ), window.clearInterval(this.timeUpdateIntervalId), this.timeUpdateIntervalId = void 0;
745
757
  }
746
- invokeTimeUpdate(e) {
747
- var c, u;
748
- const t = e.getCurrentTime();
749
- if (t === this.previousTime)
758
+ invokeTimeUpdate(t) {
759
+ var o, n;
760
+ const a = t.getCurrentTime();
761
+ if (a === this.previousTime)
750
762
  return;
751
- const i = e.getDuration();
752
- (u = (c = this.options) == null ? void 0 : c.onTimeUpdate) == null || u.call(c, {
753
- duration: i,
754
- percent: t / i,
755
- seconds: t
756
- }), this.previousTime = t;
763
+ const s = t.getDuration();
764
+ (n = (o = this.options) == null ? void 0 : o.onTimeUpdate) == null || n.call(o, {
765
+ duration: s,
766
+ percent: a / s,
767
+ seconds: a
768
+ }), this.previousTime = a;
757
769
  }
758
770
  setTimeUpdateInterval() {
759
- this.logger.log(d.Debug, "setTimeUpdateInterval"), this.clearTimeUpdateInterval(), this.timeUpdateIntervalId = window.setInterval(
771
+ this.logger.log(c.Debug, "setTimeUpdateInterval"), this.clearTimeUpdateInterval(), this.timeUpdateIntervalId = window.setInterval(
760
772
  () => this.invokeTimeUpdate(this.player),
761
773
  250
762
774
  ), this.logger.log(
763
- d.Debug,
775
+ c.Debug,
764
776
  "timeUpdateIntervalId",
765
777
  this.timeUpdateIntervalId
766
778
  ), this.invokeTimeUpdate(this.player);
767
779
  }
768
- attach(e) {
769
- return new Promise((t, i) => {
780
+ attach(t) {
781
+ return new Promise((a, s) => {
770
782
  this.player.addEventListener("onReady", async () => {
771
783
  this.player.addEventListener(
772
784
  "onError",
773
- (c) => {
774
- var u, o;
775
- return (o = (u = this.options) == null ? void 0 : u.onError) == null ? void 0 : o.call(u, c.data);
785
+ (o) => {
786
+ var n, u;
787
+ return (u = (n = this.options) == null ? void 0 : n.onError) == null ? void 0 : u.call(n, o.data);
776
788
  }
777
789
  ), this.player.addEventListener(
778
790
  "onStateChange",
779
- (c) => {
780
- var u, o, l, p, h, w, g, n;
791
+ (o) => {
792
+ var n, u, d, y, p, g, m, l;
781
793
  switch (this.logger.log(
782
- d.Debug,
783
- `state changed: ${F[c.data]}`
784
- ), c.data) {
794
+ c.Debug,
795
+ `state changed: ${S[o.data]}`
796
+ ), o.data) {
785
797
  case YT.PlayerState.CUED:
786
- (o = (u = this.options) == null ? void 0 : u.onLoaded) == null || o.call(u, { id: e });
798
+ (u = (n = this.options) == null ? void 0 : n.onLoaded) == null || u.call(n, { id: t });
787
799
  break;
788
800
  case YT.PlayerState.PLAYING:
789
- (p = (l = this.options) == null ? void 0 : l.onPlay) == null || p.call(l), this.setTimeUpdateInterval();
801
+ (y = (d = this.options) == null ? void 0 : d.onPlay) == null || y.call(d), this.setTimeUpdateInterval();
790
802
  break;
791
803
  case YT.PlayerState.PAUSED:
792
- (w = (h = this.options) == null ? void 0 : h.onPause) == null || w.call(h), this.clearTimeUpdateInterval();
804
+ (g = (p = this.options) == null ? void 0 : p.onPause) == null || g.call(p), this.clearTimeUpdateInterval();
793
805
  break;
794
806
  case YT.PlayerState.ENDED:
795
- (n = (g = this.options) == null ? void 0 : g.onEnded) == null || n.call(g), this.clearTimeUpdateInterval();
807
+ (l = (m = this.options) == null ? void 0 : m.onEnded) == null || l.call(m), this.clearTimeUpdateInterval();
796
808
  break;
797
809
  }
798
810
  }
799
- ), await this.loadVideo(e), t();
811
+ ), await this.loadVideo(t), a();
800
812
  });
801
813
  });
802
814
  }
803
815
  async detach() {
804
816
  this.clearTimeUpdateInterval();
805
817
  }
806
- async loadVideo(e) {
807
- this.previousTime = void 0, this.player.cueVideoById(e);
818
+ async loadVideo(t) {
819
+ this.previousTime = void 0, this.player.cueVideoById(t);
808
820
  }
809
821
  async play() {
810
822
  this.player.playVideo();
@@ -812,14 +824,14 @@ const N = class extends E {
812
824
  async pause() {
813
825
  this.player.pauseVideo();
814
826
  }
815
- async setCurrentTime(e) {
816
- this.player.seekTo(e), this.invokeTimeUpdate(this.player);
827
+ async setCurrentTime(t) {
828
+ this.player.seekTo(t), this.invokeTimeUpdate(this.player);
817
829
  }
818
- async setVolume(e) {
819
- this.player.setVolume(e * 100);
830
+ async setVolume(t) {
831
+ this.player.setVolume(t * 100);
820
832
  }
821
- async setMuted(e) {
822
- e ? this.player.mute() : this.player.unMute();
833
+ async setMuted(t) {
834
+ t ? this.player.mute() : this.player.unMute();
823
835
  }
824
836
  async getDuration() {
825
837
  return this.player.getDuration();
@@ -830,68 +842,76 @@ const N = class extends E {
830
842
  async getVolume() {
831
843
  return this.player.getVolume() / 100;
832
844
  }
833
- };
834
- let T = N;
835
- y(T, "origin", "https://www.youtube-nocookie.com");
836
- const X = s.memo(
845
+ }
846
+ const Q = "https://www.youtube-nocookie.com", X = i.memo(
837
847
  ({ ...r }) => {
838
- const { logger: a } = r;
839
- a.log(d.Debug, "YouTubePlayer");
840
- const e = s.useCallback(() => new Promise(async (t, i) => {
841
- await k(
848
+ const { logger: e } = r;
849
+ e.log(c.Debug, "YouTubePlayer");
850
+ const t = i.useCallback(() => new Promise(async (s, o) => {
851
+ await A(
842
852
  "https://www.youtube.com/iframe_api",
843
- a
853
+ e
844
854
  ) ? window.onYouTubeIframeAPIReady = () => {
845
- a.log(d.Debug, "YouTube iframe API ready"), t();
846
- } : t();
847
- }), [a]);
848
- return /* @__PURE__ */ s.createElement(
849
- b,
855
+ e.log(c.Debug, "YouTube iframe API ready"), s();
856
+ } : s();
857
+ }), [e]), a = i.useCallback(
858
+ (s) => Promise.resolve(
859
+ new YT.Player(s, {
860
+ host: Q,
861
+ width: "100%",
862
+ height: "100%"
863
+ })
864
+ ),
865
+ []
866
+ );
867
+ return /* @__PURE__ */ i.createElement(
868
+ f,
850
869
  {
851
870
  ...r,
852
- loadScript: e,
853
- playerApiFactory: T
871
+ loadScript: t,
872
+ playerFactory: a,
873
+ playerApiFactory: K
854
874
  },
855
- (t) => /* @__PURE__ */ s.createElement("div", { style: { width: "100%", height: "100%" } }, /* @__PURE__ */ s.createElement("div", { ref: t }))
875
+ (s) => /* @__PURE__ */ i.createElement("div", { style: { width: "100%", height: "100%" } }, /* @__PURE__ */ i.createElement("div", { ref: s }))
856
876
  );
857
877
  }
858
878
  ), Z = {
859
- Audio: B,
860
- Niconico: O,
861
- SoundCloud: J,
862
- Vimeo: Q,
879
+ Audio: x,
880
+ Niconico: G,
881
+ SoundCloud: q,
882
+ Vimeo: J,
863
883
  YouTube: X
864
- }, te = s.memo(
865
- ({ type: r, videoId: a, options: e }) => {
866
- const { logger: t, playerApiRef: i } = q();
867
- t.log(d.Debug, "NostalgicDiva");
868
- const c = Z[r];
869
- return /* @__PURE__ */ s.createElement(
870
- c,
884
+ }, te = i.memo(
885
+ ({ type: r, videoId: e, options: t }) => {
886
+ const { logger: a, playerApiRef: s } = O();
887
+ a.log(c.Debug, "NostalgicDiva");
888
+ const o = Z[r];
889
+ return /* @__PURE__ */ i.createElement(
890
+ o,
871
891
  {
872
- logger: t,
892
+ logger: a,
873
893
  type: r,
874
- playerApiRef: i,
875
- videoId: a,
876
- options: e
894
+ playerApiRef: s,
895
+ videoId: e,
896
+ options: t
877
897
  }
878
898
  );
879
899
  }
880
900
  );
881
901
  export {
882
- B as AudioPlayer,
883
- j as AudioPlayerApi,
884
- O as NiconicoPlayer,
885
- C as NiconicoPlayerApi,
902
+ x as AudioPlayer,
903
+ Y as AudioPlayerApi,
904
+ G as NiconicoPlayer,
905
+ T as NiconicoPlayerApi,
886
906
  te as NostalgicDiva,
887
907
  ee as NostalgicDivaProvider,
888
- f as PlayerApi,
889
- J as SoundCloudPlayer,
890
- A as SoundCloudPlayerApi,
891
- Q as VimeoPlayer,
892
- K as VimeoPlayerApi,
908
+ C as PlayerApi,
909
+ q as SoundCloudPlayer,
910
+ k as SoundCloudPlayerApi,
911
+ J as VimeoPlayer,
912
+ z as VimeoPlayerApi,
893
913
  X as YouTubePlayer,
894
- T as YouTubePlayerApi,
895
- q as useNostalgicDiva
914
+ K as YouTubePlayerApi,
915
+ O as useNostalgicDiva
896
916
  };
897
917
  //# sourceMappingURL=index.es.js.map