markdown-flow-ui 0.2.26-dev.5 → 0.2.26-dev.6

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.
@@ -58,15 +58,15 @@ const No = 2e3, Do = 300, Bo = 160, Vo = 16, qn = 3e3, vt = {
58
58
  ({
59
59
  content: c,
60
60
  title: d,
61
- dragHandleAriaLabel: $,
61
+ dragHandleAriaLabel: z,
62
62
  locale: Ee,
63
- dir: z,
64
- lang: X,
63
+ dir: X,
64
+ lang: J,
65
65
  defaultButtonText: Ce,
66
- defaultInputText: se,
66
+ defaultInputText: ce,
67
67
  defaultSelectedValues: $e,
68
68
  confirmButtonText: St,
69
- copyButtonText: J,
69
+ copyButtonText: W,
70
70
  copiedButtonText: It,
71
71
  onSend: Te,
72
72
  onDragHandlePointerCancel: ze,
@@ -80,7 +80,7 @@ const No = 2e3, Do = 300, Bo = 160, Vo = 16, qn = 3e3, vt = {
80
80
  {
81
81
  type: "button",
82
82
  className: "slide-player__interaction-drag-handle",
83
- "aria-label": $,
83
+ "aria-label": z,
84
84
  onPointerCancel: ze,
85
85
  onPointerDown: bt,
86
86
  onPointerMove: At,
@@ -98,13 +98,13 @@ const No = 2e3, Do = 300, Bo = 160, Vo = 16, qn = 3e3, vt = {
98
98
  {
99
99
  content: c,
100
100
  locale: Ee,
101
- dir: z,
102
- lang: X,
101
+ dir: X,
102
+ lang: J,
103
103
  defaultButtonText: Ce,
104
- defaultInputText: se,
104
+ defaultInputText: ce,
105
105
  defaultSelectedValues: $e,
106
106
  confirmButtonText: St,
107
- copyButtonText: J,
107
+ copyButtonText: W,
108
108
  copiedButtonText: It,
109
109
  onSend: Te,
110
110
  readonly: Je,
@@ -114,21 +114,21 @@ const No = 2e3, Do = 300, Bo = 160, Vo = 16, qn = 3e3, vt = {
114
114
  ] })
115
115
  );
116
116
  Yn.displayName = "InteractionOverlayCard";
117
- const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
118
- const z = d[Ee];
119
- return $.sequence_number === z?.sequence_number && $.type === z?.type && $.content === z?.content;
117
+ const $o = (c, d) => c.length === d.length && c.every((z, Ee) => {
118
+ const X = d[Ee];
119
+ return z.sequence_number === X?.sequence_number && z.type === X?.type && z.content === X?.content;
120
120
  }), Xt = (c) => c instanceof HTMLElement && !!c.closest(qo), Oi = ({
121
121
  elementList: c = [],
122
122
  locale: d,
123
- playerEnabled: $,
123
+ playerEnabled: z,
124
124
  playerControlsVisibility: Ee,
125
- playerClassName: z,
126
- fullscreenHeader: X,
125
+ playerClassName: X,
126
+ fullscreenHeader: J,
127
127
  playerCustomActions: Ce,
128
- playerCustomActionPauseOnActive: se = !0,
128
+ playerCustomActionPauseOnActive: ce = !0,
129
129
  bufferingText: $e,
130
130
  interactionTitle: St,
131
- interactionTexts: J,
131
+ interactionTexts: W,
132
132
  playerTexts: It,
133
133
  playerAutoHideDelay: Te = 3e3,
134
134
  markerAutoAdvanceDelay: ze = No,
@@ -142,7 +142,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
142
142
  onStepChange: Zt,
143
143
  onPlaybackCheckpoint: Gn,
144
144
  playbackRestoreRequest: U = null,
145
- enableKeyboardShortcuts: ce = !0,
145
+ enableKeyboardShortcuts: ue = !0,
146
146
  enableIframeScaling: $n = !0,
147
147
  enableMarkdownScaling: zn = !0,
148
148
  disableLoadingOverlay: F = !1,
@@ -153,7 +153,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
153
153
  onFocusCapture: tn,
154
154
  ...jn
155
155
  }) => {
156
- const W = Jn ?? Zr(d), Re = Wn ?? eo(d), N = f(() => ko(d), [d]), Qn = f(
156
+ const j = Jn ?? Zr(d), Re = Wn ?? eo(d), N = f(() => ko(d), [d]), Qn = f(
157
157
  () => Yo(
158
158
  $e,
159
159
  N.bufferingText
@@ -161,11 +161,11 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
161
161
  [$e, N.bufferingText]
162
162
  ), {
163
163
  playerEnabled: Zn,
164
- playerControlsVisibility: j
164
+ playerControlsVisibility: Q
165
165
  } = Oo({
166
- playerEnabled: $,
166
+ playerEnabled: z,
167
167
  playerControlsVisibility: Ee
168
- }), We = Jr(), ue = m(null), { resolvedDirection: er } = Qr(ue, W), xt = m(null), je = m(null), nn = m(null), de = m(null), Qe = m(!1), _e = m(null), Ze = m(null), Q = m(null), Oe = m(null), Me = m(null), fe = m(null), ke = m(null), rn = m([]), me = m(!1), H = m(null), Le = m(null), on = m(0), Pt = m(null), ln = m({
168
+ }), We = Jr(), de = m(null), { resolvedDirection: er } = Qr(de, j), xt = m(null), je = m(null), nn = m(null), fe = m(null), Qe = m(!1), _e = m(null), Ze = m(null), Z = m(null), Oe = m(null), Me = m(null), me = m(null), ke = m(null), rn = m([]), pe = m(!1), H = m(null), Le = m(null), on = m(0), Pt = m(null), ln = m({
169
169
  markerCount: 0,
170
170
  currentIndex: -1,
171
171
  canGoNext: !1
@@ -175,7 +175,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
175
175
  slideElementList: S,
176
176
  currentIndex: a,
177
177
  audioList: y,
178
- audioSlideIndexes: Z,
178
+ audioSlideIndexes: ee,
179
179
  currentAudioSequenceIndexes: et,
180
180
  currentStepHasSpeakableElement: w,
181
181
  currentInteractionElement: h,
@@ -183,40 +183,40 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
183
183
  canGoNext: R,
184
184
  handlePrev: sn,
185
185
  handleNext: D,
186
- handleGoTo: pe
186
+ handleGoTo: ye
187
187
  } = so(c), Fe = f(() => {
188
188
  if (!(a < 0))
189
189
  return S[a];
190
- }, [a, S]), ye = f(
190
+ }, [a, S]), he = f(
191
191
  () => T.map(
192
192
  (e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
193
193
  ),
194
194
  [T]
195
195
  ), cn = S.length, nr = cn === 1, x = Zn && (S.length > 0 || y.length > 0 || !!h), rr = f(
196
196
  () => ({
197
- enabled: ce,
197
+ enabled: ue,
198
198
  ownerId: We
199
199
  }),
200
- [ce, We]
200
+ [ue, We]
201
201
  ), Y = r(() => {
202
- !ce || !x || fo(We);
203
- }, [ce, We, x]), _ = f(
202
+ !ue || !x || fo(We);
203
+ }, [ue, We, x]), _ = f(
204
204
  () => et.map((e) => y[e]?.audioKey).filter((e) => !!e),
205
205
  [y, et]
206
- ), [or, Ne] = p(!0), [tt, ee] = p(!1), [Ct, Tt] = p(!0), [De, un] = p(!0), [P, B] = p(null), [nt, dn] = p(null), Be = m(
206
+ ), [or, Ne] = p(!0), [tt, te] = p(!1), [Ct, Tt] = p(!0), [De, un] = p(!0), [P, B] = p(null), [nt, dn] = p(null), Be = m(
207
207
  null
208
- ), fn = m(null), [ir, mn] = p(null), [lr, I] = p(!1), [ar, Rt] = p(Wt), [O, rt] = p(!1), ot = m(/* @__PURE__ */ new Set()), [sr, it] = p(!1), [pn, cr] = p(!0), [_t, Ot] = p(!1), [b, Mt] = p(), [he, lt] = p(!1), [yn, at] = p(!1), [E, kt] = p(
208
+ ), fn = m(null), [ir, mn] = p(null), [lr, I] = p(!1), [ar, Rt] = p(Wt), [O, rt] = p(!1), ot = m(/* @__PURE__ */ new Set()), [sr, it] = p(!1), [pn, cr] = p(!0), [_t, Ot] = p(!1), [b, Mt] = p(), [ge, lt] = p(!1), [yn, at] = p(!1), [E, kt] = p(
209
209
  vt
210
210
  ), [Lt, Ft] = p(!1), [
211
211
  ur,
212
- ge
212
+ ve
213
213
  ] = p(0), [hn, dr] = p(!1), V = f(() => ro(), []), [st, Nt] = p(
214
214
  gt
215
215
  ), [gn, Dt] = p(!1), [fr, vn] = p(
216
216
  () => V ? Bn() : !1
217
- ), ve = f(() => Po(), []), {
218
- effectiveMobileViewMode: te,
219
- isImmersiveMobileFullscreen: Se,
217
+ ), Se = f(() => Po(), []), {
218
+ effectiveMobileViewMode: ne,
219
+ isImmersiveMobileFullscreen: Ie,
220
220
  isNativeMobileFullscreen: Sn,
221
221
  shouldRotateFullscreenViewport: mr
222
222
  } = f(
@@ -231,14 +231,14 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
231
231
  fr,
232
232
  st
233
233
  ]
234
- ), In = m(te), {
234
+ ), In = m(ne), {
235
235
  controlsVisible: K,
236
236
  layoutReserved: ct
237
237
  } = Mo({
238
238
  isAutoVisible: or,
239
- playerControlsVisibility: j,
239
+ playerControlsVisibility: Q,
240
240
  shouldMountPlayer: x
241
- }), pr = Se && K, yr = Se && ct, hr = Se || Sn, bn = hn && !V, gr = r(
241
+ }), pr = Ie && K, yr = Ie && ct, hr = Ie || Sn, bn = hn && !V, gr = r(
242
242
  (e) => {
243
243
  Dt(!0), Nt(e);
244
244
  },
@@ -246,13 +246,13 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
246
246
  ), An = r(() => {
247
247
  Dt(!1), Nt(gt);
248
248
  }, []), vr = r(() => {
249
- An(), X?.onBack?.();
250
- }, [X, An]), M = r(() => {
251
- Q.current !== null && (window.clearTimeout(Q.current), Q.current = null);
249
+ An(), J?.onBack?.();
250
+ }, [J, An]), M = r(() => {
251
+ Z.current !== null && (window.clearTimeout(Z.current), Z.current = null);
252
252
  }, []), k = r(() => {
253
253
  Oe.current !== null && (window.clearTimeout(Oe.current), Oe.current = null);
254
254
  }, []), ut = r(() => {
255
- M(), k(), lt(!1), ge(0);
255
+ M(), k(), lt(!1), ve(0);
256
256
  }, [M, k]), dt = r(
257
257
  (e) => {
258
258
  e && ut(), Ot(e);
@@ -260,10 +260,10 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
260
260
  [ut]
261
261
  ), wn = r(() => {
262
262
  ut(), Ot((e) => !e);
263
- }, [ut]), ne = r(() => {
263
+ }, [ut]), re = r(() => {
264
264
  kt(
265
265
  (e) => e.x === vt.x && e.y === vt.y ? e : vt
266
- ), Ft(!1), ke.current = null, fe.current = null;
266
+ ), Ft(!1), ke.current = null, me.current = null;
267
267
  }, []), { mountedStepStates: Sr, currentMountedStateIndex: Ir } = f(() => {
268
268
  const e = [], t = /* @__PURE__ */ new Map();
269
269
  return an.forEach((n, i) => {
@@ -299,13 +299,13 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
299
299
  );
300
300
  if (e < 0)
301
301
  return;
302
- const t = Z[e];
303
- t != null && (fn.current = U.id, Tt(!0), B(U.audioKey), Be.current = U, dn(U), a !== t && pe(t));
302
+ const t = ee[e];
303
+ t != null && (fn.current = U.id, Tt(!0), B(U.audioKey), Be.current = U, dn(U), a !== t && ye(t));
304
304
  }, [
305
305
  y,
306
- Z,
306
+ ee,
307
307
  a,
308
- pe,
308
+ ye,
309
309
  U
310
310
  ]);
311
311
  const br = ft?.element?.subtitle_cues ?? [], mt = f(
@@ -359,19 +359,19 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
359
359
  ]
360
360
  ), Pn = _.length > 0, En = f(() => h ? `${h.sequence_number ?? "none"}:${String(
361
361
  h.content ?? ""
362
- )}` : "none", [h]), Ie = f(
362
+ )}` : "none", [h]), be = f(
363
363
  () => [xn, En].join("|"),
364
364
  [En, xn]
365
365
  ), wr = f(
366
366
  () => [
367
- Ie,
367
+ be,
368
368
  ft?.audioKey ?? "none",
369
369
  String(C)
370
370
  ].join("|"),
371
- [C, ft?.audioKey, Ie]
371
+ [C, ft?.audioKey, be]
372
372
  ), Cn = !!f(() => !mt || mt === "none" ? "" : y.find(
373
373
  (t) => t.audioKey === mt
374
- )?.audioUrl?.trim() ?? "", [y, mt]), re = se && Kt, Ve = f(
374
+ )?.audioUrl?.trim() ?? "", [y, mt]), oe = ce && Kt, Ve = f(
375
375
  () => Co({
376
376
  canGoNext: R,
377
377
  currentAudioIndex: C,
@@ -398,24 +398,24 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
398
398
  ze
399
399
  ]
400
400
  ), Rn = Tn.delayMs, Ke = Tn.usesImageOnlyDelay, qt = f(
401
- () => `${a}:${ye.join("|")}`,
402
- [a, ye]
401
+ () => `${a}:${he.join("|")}`,
402
+ [a, he]
403
403
  ), [xr, Pr] = p(null), _n = !Ke || xr === qt, q = r(() => {
404
- de.current !== null && (window.clearTimeout(de.current), de.current = null);
405
- }, []), be = r(() => {
404
+ fe.current !== null && (window.clearTimeout(fe.current), fe.current = null);
405
+ }, []), Ae = r(() => {
406
406
  _e.current !== null && (window.clearTimeout(_e.current), _e.current = null);
407
407
  }, []), G = r(() => {
408
408
  Ze.current !== null && (window.clearTimeout(Ze.current), Ze.current = null);
409
409
  }, []), L = r(
410
410
  (e = {}) => {
411
- be(), M(), k(), G(), B(null), ve.reset(), I(!1), Rt(Wt), rt(!1), ot.current = /* @__PURE__ */ new Set(), it(!1), mn(null), e.preservePendingSubtitleJump || (Le.current = null), Mt(void 0), lt(!1), ge(0);
411
+ Ae(), M(), k(), G(), B(null), Se.reset(), I(!1), Rt(Wt), rt(!1), ot.current = /* @__PURE__ */ new Set(), it(!1), mn(null), e.preservePendingSubtitleJump || (Le.current = null), Mt(void 0), lt(!1), ve(0);
412
412
  },
413
413
  [
414
- be,
414
+ Ae,
415
415
  G,
416
416
  M,
417
417
  k,
418
- ve
418
+ Se
419
419
  ]
420
420
  ), yt = r(
421
421
  (e) => {
@@ -425,26 +425,26 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
425
425
  });
426
426
  },
427
427
  []
428
- ), Ae = r(() => {
428
+ ), we = r(() => {
429
429
  const e = vo(
430
430
  _,
431
431
  ot.current
432
432
  );
433
433
  return e ? (B(e), !0) : !1;
434
434
  }, [_]), qe = r(() => {
435
- M(), k(), lt(!1), ge(0), !Ae() && R && D();
435
+ M(), k(), lt(!1), ve(0), !we() && R && D();
436
436
  }, [
437
437
  R,
438
438
  M,
439
439
  k,
440
440
  D,
441
- Ae
441
+ we
442
442
  ]), On = r(
443
443
  (e) => {
444
444
  if (k(), !e)
445
445
  return;
446
446
  const t = () => {
447
- Oe.current = null, ge(
447
+ Oe.current = null, ve(
448
448
  Bo
449
449
  ), lt(!0), H.current = null;
450
450
  };
@@ -455,16 +455,16 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
455
455
  },
456
456
  [k]
457
457
  ), Ut = r(
458
- () => Qe.current || !!ue.current?.querySelector(".slide-player__controls:hover"),
458
+ () => Qe.current || !!de.current?.querySelector(".slide-player__controls:hover"),
459
459
  []
460
460
  ), g = r(
461
461
  (e = tt) => {
462
- !x || j === "hidden" || (Ne(!0), q(), !(j === "visible" || !e || Te <= 0 || Ut()) && (de.current = window.setTimeout(() => {
462
+ !x || Q === "hidden" || (Ne(!0), q(), !(Q === "visible" || !e || Te <= 0 || Ut()) && (fe.current = window.setTimeout(() => {
463
463
  if (Ut()) {
464
- de.current = null;
464
+ fe.current = null;
465
465
  return;
466
466
  }
467
- Ne(!1), de.current = null;
467
+ Ne(!1), fe.current = null;
468
468
  }, Te)));
469
469
  },
470
470
  [
@@ -472,12 +472,12 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
472
472
  tt,
473
473
  Ut,
474
474
  Te,
475
- j,
475
+ Q,
476
476
  x
477
477
  ]
478
- ), Ue = !!Ao(h), oe = !!h && !Ue, Er = r((e) => {
478
+ ), Ue = !!Ao(h), ie = !!h && !Ue, Er = r((e) => {
479
479
  Tt(e);
480
- }, []), we = r(
480
+ }, []), $ = r(
481
481
  (e) => {
482
482
  e && Tt(e.shouldContinuePlayback);
483
483
  },
@@ -485,18 +485,18 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
485
485
  );
486
486
  s(() => {
487
487
  un(Ct);
488
- }, [a, Ct, se]), s(() => {
489
- se && dt(!1);
488
+ }, [a, Ct, ce]), s(() => {
489
+ ce && dt(!1);
490
490
  }, [
491
491
  a,
492
- se,
492
+ ce,
493
493
  dt
494
494
  ]), s(() => {
495
495
  Vt || Ot(!1);
496
496
  }, [Vt]), s(() => () => {
497
- be(), G(), q(), M(), k();
497
+ Ae(), G(), q(), M(), k();
498
498
  }, [
499
- be,
499
+ Ae,
500
500
  G,
501
501
  M,
502
502
  k,
@@ -527,26 +527,26 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
527
527
  l();
528
528
  return;
529
529
  }
530
- const ie = [], Ye = () => {
530
+ const le = [], Ye = () => {
531
531
  e || (t !== null && window.cancelAnimationFrame(t), t = window.requestAnimationFrame(() => {
532
532
  t = null, o();
533
533
  }));
534
- }, Gt = (le, xe, ae) => {
535
- le.addEventListener(xe, ae, { once: !0 }), ie.push(
536
- () => le.removeEventListener(xe, ae)
534
+ }, Gt = (ae, xe, se) => {
535
+ ae.addEventListener(xe, se, { once: !0 }), le.push(
536
+ () => ae.removeEventListener(xe, se)
537
537
  );
538
538
  };
539
- A.forEach((le) => {
540
- const xe = le.contentDocument;
539
+ A.forEach((ae) => {
540
+ const xe = ae.contentDocument;
541
541
  if (!xe || xe.readyState !== "complete") {
542
- Gt(le, "load", Ye);
542
+ Gt(ae, "load", Ye);
543
543
  return;
544
544
  }
545
- Array.from(xe.images).filter((ae) => !ae.complete).forEach((ae) => {
546
- Gt(ae, "load", Ye), Gt(ae, "error", Ye);
545
+ Array.from(xe.images).filter((se) => !se.complete).forEach((se) => {
546
+ Gt(se, "load", Ye), Gt(se, "error", Ye);
547
547
  });
548
548
  }), n = () => {
549
- ie.forEach((le) => le());
549
+ le.forEach((ae) => ae());
550
550
  };
551
551
  };
552
552
  return t = window.requestAnimationFrame(() => {
@@ -574,9 +574,9 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
574
574
  return;
575
575
  }
576
576
  const e = () => {
577
- vn(Bn()), ne();
577
+ vn(Bn()), re();
578
578
  }, t = () => {
579
- ne();
579
+ re();
580
580
  };
581
581
  e(), window.addEventListener("orientationchange", t), window.screen?.orientation?.addEventListener?.(
582
582
  "change",
@@ -591,11 +591,11 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
591
591
  t
592
592
  );
593
593
  };
594
- }, [V, ne]), s(() => {
595
- Qt?.(te);
596
- }, [te, Qt]), s(() => {
597
- In.current !== te && ne(), In.current = te;
598
- }, [te, ne]), s(() => {
594
+ }, [V, re]), s(() => {
595
+ Qt?.(ne);
596
+ }, [ne, Qt]), s(() => {
597
+ In.current !== ne && re(), In.current = ne;
598
+ }, [ne, re]), s(() => {
599
599
  Zt?.(Fe, a);
600
600
  }, [a, Fe, Zt]), s(() => {
601
601
  const e = ln.current, t = go(
@@ -632,11 +632,11 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
632
632
  Ve,
633
633
  S.length
634
634
  ]), s(() => {
635
- if (!x || j === "hidden") {
635
+ if (!x || Q === "hidden") {
636
636
  q(), Ne(!1);
637
637
  return;
638
638
  }
639
- if (j === "visible") {
639
+ if (Q === "visible") {
640
640
  q(), Ne(!0);
641
641
  return;
642
642
  }
@@ -644,25 +644,25 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
644
644
  }, [
645
645
  q,
646
646
  tt,
647
- j,
647
+ Q,
648
648
  x,
649
649
  g
650
650
  ]), s(() => {
651
651
  if (typeof window > "u")
652
652
  return;
653
653
  const e = (t) => {
654
- t.origin === window.location.origin && jr(t.data) && t.data.eventType === "click" && x && (Y(), ee(!0), g(!0));
654
+ t.origin === window.location.origin && jr(t.data) && t.data.eventType === "click" && x && (Y(), te(!0), g(!0));
655
655
  };
656
656
  return window.addEventListener("message", e), () => {
657
657
  window.removeEventListener("message", e);
658
658
  };
659
659
  }, [Y, x, g]), co({
660
- sectionRef: ue,
660
+ sectionRef: de,
661
661
  enabled: x,
662
- keyboardShortcutsEnabled: ce,
662
+ keyboardShortcutsEnabled: ue,
663
663
  onKeyboardShortcut: Y,
664
664
  onWake: () => {
665
- Y(), ee(!0), g(!0);
665
+ Y(), te(!0), g(!0);
666
666
  }
667
667
  }), s(() => {
668
668
  if (!x) {
@@ -670,19 +670,19 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
670
670
  return;
671
671
  }
672
672
  if (Be.current) {
673
- Pt.current = Ie;
673
+ Pt.current = be;
674
674
  return;
675
675
  }
676
676
  const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = Io({
677
677
  previousResetKey: Pt.current,
678
- nextResetKey: Ie,
678
+ nextResetKey: be,
679
679
  currentAudioKey: P,
680
680
  hasCompletedCurrentStepAudio: O
681
681
  });
682
- Pt.current = Ie;
682
+ Pt.current = be;
683
683
  const n = H.current === a && !!h, i = yo({
684
684
  hasInteraction: !!h,
685
- shouldBlockPlaybackForInteraction: oe,
685
+ shouldBlockPlaybackForInteraction: ie,
686
686
  shouldOpenInteractionOverlayAfterAudio: n,
687
687
  hasPlaybackContextChanged: e,
688
688
  hasResolvedCurrentInteraction: Ue,
@@ -691,7 +691,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
691
691
  }), l = Le.current, o = l?.slideIndex === a;
692
692
  if (e && L({
693
693
  preservePendingSubtitleJump: o
694
- }), !(T.length === 0 && !h) && !re) {
694
+ }), !(T.length === 0 && !h) && !oe) {
695
695
  if (l?.slideIndex === a && Kn({
696
696
  currentIndex: a,
697
697
  resolvedCurrentInteractionElement: b,
@@ -708,7 +708,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
708
708
  On(h);
709
709
  return;
710
710
  }
711
- if (k(), H.current = null, !oe && t && !Ae()) {
711
+ if (k(), H.current = null, !ie && t && !we()) {
712
712
  if (w) {
713
713
  if (F) {
714
714
  I(!1);
@@ -721,19 +721,19 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
721
721
  return _e.current = window.setTimeout(() => {
722
722
  _e.current = null, D();
723
723
  }, Rn), () => {
724
- be();
724
+ Ae();
725
725
  };
726
726
  }
727
727
  }
728
728
  }, [
729
729
  b,
730
730
  R,
731
- be,
731
+ Ae,
732
732
  T.length,
733
733
  a,
734
734
  h,
735
735
  P,
736
- Ie,
736
+ be,
737
737
  w,
738
738
  Ke,
739
739
  _n,
@@ -744,18 +744,18 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
744
744
  De,
745
745
  Ue,
746
746
  Kt,
747
- oe,
747
+ ie,
748
748
  k,
749
749
  L,
750
750
  yt,
751
751
  On,
752
752
  x,
753
753
  S,
754
- Ae,
755
- re,
754
+ we,
755
+ oe,
756
756
  Ve
757
757
  ]), s(() => {
758
- if (F || re || !w || oe) {
758
+ if (F || oe || !w || ie) {
759
759
  I(!1);
760
760
  return;
761
761
  }
@@ -773,8 +773,8 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
773
773
  w,
774
774
  O,
775
775
  F,
776
- re,
777
- oe
776
+ oe,
777
+ ie
778
778
  ]), s(() => {
779
779
  O && So(
780
780
  _,
@@ -789,23 +789,23 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
789
789
  currentAudioSequenceLength: _.length,
790
790
  currentStepHasSpeakableElement: w,
791
791
  hasCompletedCurrentStepAudio: O,
792
- shouldBlockPlaybackForInteraction: oe,
793
- shouldPausePlaybackForCustomAction: re,
792
+ shouldBlockPlaybackForInteraction: ie,
793
+ shouldPausePlaybackForCustomAction: oe,
794
794
  shouldSkipDefaultAudioStart: e
795
- }) && Ae();
795
+ }) && we();
796
796
  }, [
797
797
  P,
798
798
  _,
799
799
  w,
800
800
  O,
801
- re,
802
801
  oe,
803
- Ae
802
+ ie,
803
+ we
804
804
  ]), s(() => {
805
805
  !P || C >= 0 || B(null);
806
806
  }, [C, P]), s(() => {
807
- C >= 0 || ve.reset();
808
- }, [C, ve]), s(() => {
807
+ C >= 0 || Se.reset();
808
+ }, [C, Se]), s(() => {
809
809
  it(!1);
810
810
  }, [wr]);
811
811
  const {
@@ -821,7 +821,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
821
821
  [b, Je]
822
822
  ), Rr = !!b?.readonly || Tr, He = po({
823
823
  hasActiveInteraction: !!b,
824
- isInteractionOverlayOpen: he
824
+ isInteractionOverlayOpen: ge
825
825
  }), _r = r(
826
826
  (e) => {
827
827
  const n = [
@@ -838,18 +838,18 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
838
838
  );
839
839
  s(() => {
840
840
  const e = () => {
841
- dr(document.fullscreenElement === ue.current);
841
+ dr(document.fullscreenElement === de.current);
842
842
  };
843
843
  return e(), document.addEventListener("fullscreenchange", e), () => {
844
844
  document.removeEventListener("fullscreenchange", e);
845
845
  };
846
846
  }, []), s(() => {
847
- b && he || at(!1);
848
- }, [b, he]), s(() => {
849
- ne();
850
- }, [b, ne]), s(() => {
847
+ b && ge || at(!1);
848
+ }, [b, ge]), s(() => {
849
+ re();
850
+ }, [b, re]), s(() => {
851
851
  if (!He) {
852
- ge(0);
852
+ ve(0);
853
853
  return;
854
854
  }
855
855
  const e = Me.current;
@@ -859,7 +859,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
859
859
  const i = Math.ceil(
860
860
  e.getBoundingClientRect().height
861
861
  );
862
- ge(
862
+ ve(
863
863
  i + Vo
864
864
  );
865
865
  };
@@ -872,16 +872,16 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
872
872
  n.disconnect();
873
873
  };
874
874
  }, [He]), s(() => {
875
- if (M(), !!he) {
875
+ if (M(), !!ge) {
876
876
  if (Ln)
877
- return Q.current = window.setTimeout(() => {
878
- Q.current = null, qe();
877
+ return Z.current = window.setTimeout(() => {
878
+ Z.current = null, qe();
879
879
  }, qn), () => {
880
880
  M();
881
881
  };
882
882
  if (!(yn || !kn))
883
- return Q.current = window.setTimeout(() => {
884
- Q.current = null, qe();
883
+ return Z.current = window.setTimeout(() => {
884
+ Z.current = null, qe();
885
885
  }, qn), () => {
886
886
  M();
887
887
  };
@@ -891,7 +891,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
891
891
  qe,
892
892
  yn,
893
893
  kn,
894
- he,
894
+ ge,
895
895
  Ln
896
896
  ]);
897
897
  const Or = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ u(zr, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ u(
@@ -901,7 +901,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
901
901
  disableLoadingOverlay: F,
902
902
  hideFullScreen: !0,
903
903
  locale: d,
904
- dir: W,
904
+ dir: j,
905
905
  lang: Re,
906
906
  mode: "blackboard",
907
907
  replaceRootScreenHeightWithFull: t.replaceRootScreenHeightWithFull,
@@ -916,7 +916,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
916
916
  disableLoadingOverlay: F,
917
917
  hideFullScreen: !0,
918
918
  locale: d,
919
- dir: W,
919
+ dir: j,
920
920
  lang: Re,
921
921
  mode: "blackboard",
922
922
  type: "markdown",
@@ -958,7 +958,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
958
958
  }
959
959
  );
960
960
  }, kr = r(() => {
961
- const e = ue.current;
961
+ const e = de.current;
962
962
  if (e) {
963
963
  if (document.fullscreenElement === e) {
964
964
  document.exitFullscreen().catch(() => {
@@ -979,66 +979,67 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
979
979
  currentIndex: a,
980
980
  resolvedCurrentInteractionElement: b,
981
981
  slideElementList: S,
982
- targetSlideIndex: Z[e.audioIndex]
982
+ targetSlideIndex: ee[e.audioIndex]
983
983
  }),
984
984
  [
985
985
  b,
986
- Z,
986
+ ee,
987
987
  a,
988
988
  S
989
989
  ]
990
990
  ), Lr = r(
991
991
  (e, t) => {
992
- const i = y[e.audioIndex]?.audioKey, l = Z[e.audioIndex];
993
- return !i || l == null || !Ht(e) ? !1 : (we(t), H.current = null, I(!1), rt(!1), it(!1), $t(t) && (ee(!0), g(!0)), l === a ? (Le.current = null, L(), B(i), yt(e), !0) : (me.current = !0, L(), Le.current = {
992
+ const i = y[e.audioIndex]?.audioKey, l = ee[e.audioIndex];
993
+ return !i || l == null || !Ht(e) ? !1 : ($(t), H.current = null, I(!1), rt(!1), it(!1), $t(t) && (te(!0), g(!0)), l === a ? (Le.current = null, L(), B(i), yt(e), !0) : (pe.current = !0, L(), Le.current = {
994
994
  audioIndex: e.audioIndex,
995
995
  audioKey: i,
996
996
  slideIndex: l,
997
997
  timeMs: e.timeMs
998
- }, pe(l), !0));
998
+ }, ye(l), !0));
999
999
  },
1000
1000
  [
1001
1001
  y,
1002
- Z,
1002
+ ee,
1003
1003
  Ht,
1004
1004
  a,
1005
- pe,
1005
+ ye,
1006
1006
  yt,
1007
1007
  L,
1008
1008
  g,
1009
- we
1009
+ $
1010
1010
  ]
1011
1011
  ), Fr = r(
1012
1012
  (e) => {
1013
- we(e), me.current = !0, H.current = null, I(!1), $t(e) && (ee(!0), g(!0)), L(), sn();
1013
+ $(e), pe.current = !0, H.current = null, I(!1), $t(e) && (te(!0), g(!0)), L(), sn();
1014
1014
  },
1015
1015
  [
1016
1016
  sn,
1017
1017
  L,
1018
1018
  g,
1019
- we
1019
+ $
1020
1020
  ]
1021
1021
  ), Nr = r(
1022
1022
  (e) => {
1023
- we(e), me.current = !0, H.current = null, I(!1), $t(e) && (ee(!0), g(!0)), L(), D();
1023
+ $(e), pe.current = !0, H.current = null, I(!1), $t(e) && (te(!0), g(!0)), L(), D();
1024
1024
  },
1025
1025
  [
1026
1026
  D,
1027
1027
  L,
1028
1028
  g,
1029
- we
1029
+ $
1030
1030
  ]
1031
1031
  ), Dr = r(
1032
- (e) => {
1033
- e < 0 || e >= S.length || e === a || (me.current = !0, H.current = null, I(!1), ee(!0), g(!0), L(), pe(e), Xe?.(S[e], e));
1032
+ (e, t) => {
1033
+ e < 0 || e >= S.length || e === a || ($(t), pe.current = !0, H.current = null, I(!1), te(!0), g(!0), L(), ye(e), Xe?.(S[e], e));
1034
1034
  },
1035
1035
  [
1036
1036
  a,
1037
- pe,
1037
+ ye,
1038
1038
  Xe,
1039
1039
  L,
1040
1040
  g,
1041
- S
1041
+ S,
1042
+ $
1042
1043
  ]
1043
1044
  ), Br = r(
1044
1045
  ({
@@ -1125,12 +1126,12 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1125
1126
  Ko(() => {
1126
1127
  const e = Me.current;
1127
1128
  if (!He || !e) {
1128
- fe.current = null;
1129
+ me.current = null;
1129
1130
  return;
1130
1131
  }
1131
- const t = fe.current, n = e.getBoundingClientRect();
1132
+ const t = me.current, n = e.getBoundingClientRect();
1132
1133
  if (!t || Lt) {
1133
- fe.current = {
1134
+ me.current = {
1134
1135
  left: n.left,
1135
1136
  top: n.top
1136
1137
  };
@@ -1138,7 +1139,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1138
1139
  }
1139
1140
  const i = t.left - n.left, l = t.top - n.top;
1140
1141
  if (!Un(i) && !Un(l)) {
1141
- fe.current = {
1142
+ me.current = {
1142
1143
  left: n.left,
1143
1144
  top: n.top
1144
1145
  };
@@ -1153,14 +1154,14 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1153
1154
  ), A = Uo(
1154
1155
  v ? Vn(o, v) : o
1155
1156
  );
1156
- fe.current = {
1157
+ me.current = {
1157
1158
  left: n.left + A.x - E.x,
1158
1159
  top: n.top + A.y - E.y
1159
1160
  }, Hn(
1160
1161
  A,
1161
1162
  E
1162
1163
  ) || kt(
1163
- (ie) => Hn(ie, A) ? ie : A
1164
+ (le) => Hn(le, A) ? le : A
1164
1165
  );
1165
1166
  }, [
1166
1167
  ht,
@@ -1221,19 +1222,19 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1221
1222
  },
1222
1223
  [Y, tn]
1223
1224
  ), $r = r(() => {
1224
- ee(!0), g(!0);
1225
+ te(!0), g(!0);
1225
1226
  }, [g]);
1226
1227
  return s(() => {
1227
- const e = rn.current, i = (e.length > 0 && e.length < ye.length && e.every((o, v) => o === ye[v]) ? T.slice(e.length) : []).some(
1228
+ const e = rn.current, i = (e.length > 0 && e.length < he.length && e.every((o, v) => o === he[v]) ? T.slice(e.length) : []).some(
1228
1229
  (o) => o.is_new === !1
1229
1230
  );
1230
- if (rn.current = ye, !i)
1231
+ if (rn.current = he, !i)
1231
1232
  return;
1232
1233
  const l = window.requestAnimationFrame(() => {
1233
1234
  const o = je.current, v = nn.current;
1234
1235
  if (!o || !v)
1235
1236
  return;
1236
- const A = o.getBoundingClientRect(), ie = v.getBoundingClientRect(), Ye = o.scrollTop + (ie.top - A.top);
1237
+ const A = o.getBoundingClientRect(), le = v.getBoundingClientRect(), Ye = o.scrollTop + (le.top - A.top);
1237
1238
  o.scrollTo({
1238
1239
  top: Math.max(Ye, 0),
1239
1240
  behavior: "smooth"
@@ -1242,8 +1243,8 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1242
1243
  return () => {
1243
1244
  window.cancelAnimationFrame(l);
1244
1245
  };
1245
- }, [T, ye]), s(() => {
1246
- if (!me.current || (me.current = !1, T.length === 0))
1246
+ }, [T, he]), s(() => {
1247
+ if (!pe.current || (pe.current = !1, T.length === 0))
1247
1248
  return;
1248
1249
  const e = window.requestAnimationFrame(() => {
1249
1250
  Fn();
@@ -1254,16 +1255,16 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1254
1255
  }, [T, Fn]), /* @__PURE__ */ Ge(
1255
1256
  "section",
1256
1257
  {
1257
- ref: ue,
1258
+ ref: de,
1258
1259
  className: Pe(
1259
1260
  "relative h-full w-full",
1260
1261
  V && "slide--mobile-device",
1261
1262
  bn && "slide--browser-fullscreen",
1262
- Se && "slide--mobile-landscape",
1263
+ Ie && "slide--mobile-landscape",
1263
1264
  Sn && "slide--mobile-landscape-native",
1264
1265
  Xn
1265
1266
  ),
1266
- dir: W,
1267
+ dir: j,
1267
1268
  lang: Re,
1268
1269
  onClick: $r,
1269
1270
  onFocusCapture: Gr,
@@ -1283,15 +1284,15 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1283
1284
  ref: xt,
1284
1285
  className: Pe(
1285
1286
  "slide__viewport relative h-full min-h-0 w-full",
1286
- Se && "slide__viewport--mobile-landscape",
1287
- Se && !mr && "slide__viewport--mobile-landscape-native"
1287
+ Ie && "slide__viewport--mobile-landscape",
1288
+ Ie && !mr && "slide__viewport--mobile-landscape-native"
1288
1289
  ),
1289
1290
  children: [
1290
1291
  pr ? /* @__PURE__ */ Ge("div", { className: "slide-landscape-header", children: [
1291
1292
  /* @__PURE__ */ u(
1292
1293
  "button",
1293
1294
  {
1294
- "aria-label": X?.backAriaLabel ?? N.fullscreenBackAriaLabel,
1295
+ "aria-label": J?.backAriaLabel ?? N.fullscreenBackAriaLabel,
1295
1296
  className: "slide-landscape-header__back",
1296
1297
  onClick: vr,
1297
1298
  type: "button",
@@ -1304,7 +1305,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1304
1305
  )
1305
1306
  }
1306
1307
  ),
1307
- X?.content ? /* @__PURE__ */ u("div", { className: "min-w-0 flex-1 overflow-hidden", children: X.content }) : null
1308
+ J?.content ? /* @__PURE__ */ u("div", { className: "min-w-0 flex-1 overflow-hidden", children: J.content }) : null
1308
1309
  ] }) : null,
1309
1310
  /* @__PURE__ */ u(
1310
1311
  "div",
@@ -1351,7 +1352,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1351
1352
  extraBottomOffset: ur,
1352
1353
  hasPlayerGap: ct,
1353
1354
  isEnabled: pn && sr,
1354
- playbackTimeStore: ve,
1355
+ playbackTimeStore: Se,
1355
1356
  subtitleCues: br
1356
1357
  }
1357
1358
  ),
@@ -1379,24 +1380,24 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1379
1380
  children: /* @__PURE__ */ u(
1380
1381
  Yn,
1381
1382
  {
1382
- dir: W,
1383
+ dir: j,
1383
1384
  lang: Re,
1384
1385
  content: String(b?.content ?? ""),
1385
- dragHandleAriaLabel: J?.dragHandleAriaLabel ?? N.interactionTexts.dragHandleAriaLabel,
1386
+ dragHandleAriaLabel: W?.dragHandleAriaLabel ?? N.interactionTexts.dragHandleAriaLabel,
1386
1387
  locale: d,
1387
1388
  defaultButtonText: Mn.buttonText ?? "",
1388
1389
  defaultInputText: Mn.inputText ?? "",
1389
1390
  defaultSelectedValues: Cr,
1390
- confirmButtonText: J?.confirmButtonText ?? N.interactionTexts.confirmButtonText,
1391
- copyButtonText: J?.copyButtonText ?? N.interactionTexts.copyButtonText,
1392
- copiedButtonText: J?.copiedButtonText ?? N.interactionTexts.copiedButtonText,
1391
+ confirmButtonText: W?.confirmButtonText ?? N.interactionTexts.confirmButtonText,
1392
+ copyButtonText: W?.copyButtonText ?? N.interactionTexts.copyButtonText,
1393
+ copiedButtonText: W?.copiedButtonText ?? N.interactionTexts.copiedButtonText,
1393
1394
  onSend: _r,
1394
1395
  onDragHandlePointerCancel: Nn,
1395
1396
  onDragHandlePointerDown: Ur,
1396
1397
  onDragHandlePointerMove: Hr,
1397
1398
  onDragHandlePointerUp: Nn,
1398
1399
  readonly: Rr,
1399
- title: J?.title ?? St ?? N.interactionTexts.title
1400
+ title: W?.title ?? St ?? N.interactionTexts.title
1400
1401
  }
1401
1402
  )
1402
1403
  }
@@ -1408,22 +1409,22 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1408
1409
  children: /* @__PURE__ */ u(
1409
1410
  io,
1410
1411
  {
1411
- dir: W === "auto" ? er : W,
1412
+ dir: j === "auto" ? er : j,
1412
1413
  lang: Re,
1413
1414
  audioList: y,
1414
1415
  className: Pe(
1415
1416
  "absolute left-1/2 z-[2] -translate-x-1/2",
1416
1417
  bn ? "bottom-3" : "-bottom-3",
1417
- z,
1418
+ X,
1418
1419
  !K && "pointer-events-none opacity-0"
1419
1420
  ),
1420
1421
  currentAudioIndex: C,
1421
1422
  defaultPlaying: Ct,
1422
- enableKeyboardShortcuts: ce,
1423
- isPlaybackPaused: re,
1423
+ enableKeyboardShortcuts: ue,
1424
+ isPlaybackPaused: oe,
1424
1425
  isAutoAdvanceEnabled: De,
1425
1426
  locale: d,
1426
- isInteractionOpen: he,
1427
+ isInteractionOpen: ge,
1427
1428
  isSubtitleEnabled: pn,
1428
1429
  onAutoAdvanceToggle: un,
1429
1430
  onLoadingChange: Br,
@@ -1438,12 +1439,12 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1438
1439
  audioKey: l.audioKey,
1439
1440
  element: l.element,
1440
1441
  isComplete: t,
1441
- stepIndex: Z[i] ?? a,
1442
+ stepIndex: ee[i] ?? a,
1442
1443
  timeMs: n
1443
1444
  });
1444
1445
  },
1445
1446
  onPlaybackPreferenceChange: Er,
1446
- onPlaybackTimeChange: ve.setTime,
1447
+ onPlaybackTimeChange: Se.setTime,
1447
1448
  onSubtitleToggle: () => {
1448
1449
  cr((e) => !e);
1449
1450
  },
@@ -1451,7 +1452,7 @@ const $o = (c, d) => c.length === d.length && c.every(($, Ee) => {
1451
1452
  onEnded: Vr,
1452
1453
  onFullscreen: kr,
1453
1454
  isFullscreen: hn,
1454
- mobileViewMode: te,
1455
+ mobileViewMode: ne,
1455
1456
  settingsPortalContainer: xt.current,
1456
1457
  onMobileViewModeChange: gr,
1457
1458
  onControlsPointerEnter: Kr,