markdown-flow-ui 0.2.2 → 0.2.3-dev.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 (55) hide show
  1. package/dist/components/ContentRender/SandboxApp.cjs.js +2 -2
  2. package/dist/components/ContentRender/SandboxApp.cjs.js.map +1 -1
  3. package/dist/components/ContentRender/SandboxApp.es.js +106 -95
  4. package/dist/components/ContentRender/SandboxApp.es.js.map +1 -1
  5. package/dist/components/ContentRender/utils/link-targets.cjs.js +2 -0
  6. package/dist/components/ContentRender/utils/link-targets.cjs.js.map +1 -0
  7. package/dist/components/ContentRender/utils/link-targets.d.ts +6 -0
  8. package/dist/components/ContentRender/utils/link-targets.es.js +26 -0
  9. package/dist/components/ContentRender/utils/link-targets.es.js.map +1 -0
  10. package/dist/components/ContentRender/utils/link-targets.test.d.ts +1 -0
  11. package/dist/components/Slide/Slide.cjs.js +1 -1
  12. package/dist/components/Slide/Slide.cjs.js.map +1 -1
  13. package/dist/components/Slide/Slide.es.js +785 -700
  14. package/dist/components/Slide/Slide.es.js.map +1 -1
  15. package/dist/components/Slide/Slide.stories.d.ts +4 -4
  16. package/dist/components/Slide/constants.cjs.js +2 -0
  17. package/dist/components/Slide/constants.cjs.js.map +1 -0
  18. package/dist/components/Slide/constants.d.ts +1 -0
  19. package/dist/components/Slide/constants.es.js +5 -0
  20. package/dist/components/Slide/constants.es.js.map +1 -0
  21. package/dist/components/Slide/utils/imageOnlyStepVisualReady.cjs.js +2 -0
  22. package/dist/components/Slide/utils/imageOnlyStepVisualReady.cjs.js.map +1 -0
  23. package/dist/components/Slide/utils/imageOnlyStepVisualReady.d.ts +13 -0
  24. package/dist/components/Slide/utils/imageOnlyStepVisualReady.es.js +12 -0
  25. package/dist/components/Slide/utils/imageOnlyStepVisualReady.es.js.map +1 -0
  26. package/dist/components/Slide/utils/interactionPlayback.cjs.js +1 -1
  27. package/dist/components/Slide/utils/interactionPlayback.cjs.js.map +1 -1
  28. package/dist/components/Slide/utils/interactionPlayback.d.ts +8 -0
  29. package/dist/components/Slide/utils/interactionPlayback.es.js +9 -2
  30. package/dist/components/Slide/utils/interactionPlayback.es.js.map +1 -1
  31. package/dist/components/Slide/utils/interactionResolution.cjs.js +2 -0
  32. package/dist/components/Slide/utils/interactionResolution.cjs.js.map +1 -0
  33. package/dist/components/Slide/utils/interactionResolution.d.ts +13 -0
  34. package/dist/components/Slide/utils/interactionResolution.es.js +33 -0
  35. package/dist/components/Slide/utils/interactionResolution.es.js.map +1 -0
  36. package/dist/components/Slide/utils/interactionResolution.test.d.ts +1 -0
  37. package/dist/components/Slide/utils/silentStepAutoAdvance.cjs.js +2 -0
  38. package/dist/components/Slide/utils/silentStepAutoAdvance.cjs.js.map +1 -0
  39. package/dist/components/Slide/utils/silentStepAutoAdvance.d.ts +14 -0
  40. package/dist/components/Slide/utils/silentStepAutoAdvance.es.js +37 -0
  41. package/dist/components/Slide/utils/silentStepAutoAdvance.es.js.map +1 -0
  42. package/dist/components/Slide/utils/silentStepAutoAdvance.test.d.ts +1 -0
  43. package/dist/node_modules/cose-base/cose-base.cjs.js +1 -1
  44. package/dist/node_modules/cose-base/cose-base.cjs.js.map +1 -1
  45. package/dist/node_modules/cose-base/cose-base.es.js +1 -1
  46. package/dist/node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.cjs.js +1 -1
  47. package/dist/node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.cjs.js.map +1 -1
  48. package/dist/node_modules/cytoscape-fcose/node_modules/cose-base/cose-base.es.js +1 -1
  49. package/dist/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.cjs.js +1 -1
  50. package/dist/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.cjs.js.map +1 -1
  51. package/dist/node_modules/cytoscape-fcose/node_modules/layout-base/layout-base.es.js +1 -1
  52. package/dist/node_modules/layout-base/layout-base.cjs.js +1 -1
  53. package/dist/node_modules/layout-base/layout-base.cjs.js.map +1 -1
  54. package/dist/node_modules/layout-base/layout-base.es.js +1 -1
  55. package/package.json +1 -1
@@ -1,729 +1,818 @@
1
- import { j as o } from "../../_virtual/jsx-runtime.es.js";
2
- import { memo as Hn, useMemo as i, useId as zn, useRef as f, useCallback as n, useState as m, useEffect as u } from "react";
3
- import { isSandboxInteractionMessage as Jn } from "../../lib/sandboxInteraction.es.js";
4
- import { cn as le } from "../../lib/utils.es.js";
5
- import Wn from "../ui/loading-overlay-card.es.js";
6
- import $n from "../ContentRender/ContentRender.es.js";
7
- import Gt from "../ContentRender/IframeSandbox.es.js";
1
+ import { j as l } from "../../_virtual/jsx-runtime.es.js";
2
+ import { memo as rr, useMemo as c, useId as or, useRef as f, useCallback as n, useState as m, useEffect as a } from "react";
3
+ import { isSandboxInteractionMessage as lr } from "../../lib/sandboxInteraction.es.js";
4
+ import { cn as fe } from "../../lib/utils.es.js";
5
+ import ir from "../ui/loading-overlay-card.es.js";
6
+ import sr from "../ContentRender/ContentRender.es.js";
7
+ import tn from "../ContentRender/IframeSandbox.es.js";
8
8
  import "../ui/inputGroup/input-group.es.js";
9
9
  import "../ContentRender/contentRenderI18n.es.js";
10
- import { getInteractionDefaultValues as Yn, getInteractionDefaultSelectedValues as Xn } from "../../lib/interaction-defaults.es.js";
11
- import { isMobileDevice as Qn, isLandscapeViewport as Ht, subscribeMobileDeviceChange as Zn } from "../../lib/mobileDevice.es.js";
12
- import er from "./Player.es.js";
13
- import tr from "./MarkdownSlideScaling.es.js";
14
- import nr from "./SubtitleOverlay.es.js";
15
- import rr from "./useSlide.es.js";
16
- import or from "./useWakePlayerFromIframe.es.js";
17
- import { PlayerKeyboardShortcutContext as sr } from "./utils/playerKeyboardShortcutContext.es.js";
18
- import { activatePlayerKeyboardShortcutOwner as lr } from "./utils/playerKeyboardShortcuts.es.js";
19
- import { DEFAULT_MOBILE_VIEW_MODE as je, resolveMobileViewModeState as ir } from "./utils/mobileScreenMode.es.js";
20
- import { shouldPresentInteractionOverlay as ur } from "./utils/interactionPlayback.es.js";
21
- import { resolveMarkdownScalingMode as ar } from "./utils/markdownScaling.es.js";
22
- import { shouldWakePlayerControlsAfterNavigation as rt } from "./utils/playerNavigationContext.es.js";
23
- import { shouldAutoAdvanceIntoAppendedMarker as cr } from "./utils/appendedMarkerAdvance.es.js";
24
- import { getPlaybackSequenceTransition as dr, shouldStartDefaultAudioSequence as fr } from "./utils/playbackSequence.es.js";
25
- import { hasResolvedInteractionElement as mr, canReachSubtitleJumpTarget as zt } from "./utils/subtitleJumpNavigation.es.js";
26
- import { resolvePlayerCustomActionElement as pr, getPlayerCustomActionCount as hr } from "./utils/playerCustomActions.es.js";
27
- import { createPlaybackTimeStore as vr } from "./utils/playbackTimeStore.es.js";
28
- import { shouldUseAutoAdvanceToggle as yr } from "./utils/playerToggleMode.es.js";
29
- import { resolveSlidePlayerVisibility as Sr } from "./utils/playerVisibility.es.js";
30
- import { getSlideLocaleTexts as br, DEFAULT_SLIDE_BUFFERING_TEXTS as gr } from "./slideI18n.es.js";
10
+ import { isMobileDevice as ar, isLandscapeViewport as nn, subscribeMobileDeviceChange as ur } from "../../lib/mobileDevice.es.js";
11
+ import cr from "./Player.es.js";
12
+ import dr from "./MarkdownSlideScaling.es.js";
13
+ import fr from "./SubtitleOverlay.es.js";
14
+ import mr from "./useSlide.es.js";
15
+ import pr from "./useWakePlayerFromIframe.es.js";
16
+ import { PlayerKeyboardShortcutContext as hr } from "./utils/playerKeyboardShortcutContext.es.js";
17
+ import { activatePlayerKeyboardShortcutOwner as yr } from "./utils/playerKeyboardShortcuts.es.js";
18
+ import { DEFAULT_MOBILE_VIEW_MODE as He, resolveMobileViewModeState as Sr } from "./utils/mobileScreenMode.es.js";
19
+ import { shouldRenderInteractionOverlay as vr, shouldPresentInteractionOverlay as br } from "./utils/interactionPlayback.es.js";
20
+ import { resolveMarkdownScalingMode as gr } from "./utils/markdownScaling.es.js";
21
+ import { shouldWakePlayerControlsAfterNavigation as ft } from "./utils/playerNavigationContext.es.js";
22
+ import { shouldAutoAdvanceIntoAppendedMarker as Ar } from "./utils/appendedMarkerAdvance.es.js";
23
+ import { getPlaybackSequenceTransition as Ir, shouldStartDefaultAudioSequence as xr } from "./utils/playbackSequence.es.js";
24
+ import { hasResolvedInteractionElement as wr, canReachSubtitleJumpTarget as rn } from "./utils/subtitleJumpNavigation.es.js";
25
+ import { resolvePlayerCustomActionElement as Er, getPlayerCustomActionCount as Tr } from "./utils/playerCustomActions.es.js";
26
+ import { createPlaybackTimeStore as Pr } from "./utils/playbackTimeStore.es.js";
27
+ import { resolveSlideInteractionState as Cr } from "./utils/interactionResolution.es.js";
28
+ import { shouldUseAutoAdvanceToggle as Rr } from "./utils/playerToggleMode.es.js";
29
+ import { DEFAULT_IMAGE_ONLY_VISUAL_READY_TIMEOUT_MS as _r, areImageOnlyStepIframeVisualsReady as kr } from "./utils/imageOnlyStepVisualReady.es.js";
30
+ import { resolveSilentStepAutoAdvanceBehavior as Mr } from "./utils/silentStepAutoAdvance.es.js";
31
+ import { resolveSlidePlayerVisibility as Fr } from "./utils/playerVisibility.es.js";
32
+ import { getSlideLocaleTexts as Br, DEFAULT_SLIDE_BUFFERING_TEXTS as Or } from "./slideI18n.es.js";
31
33
  /* empty css */
32
- import xr from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
33
- const Ir = 2e3, Ar = 300, wr = 160, Pr = 16, ot = "waitingForAudio", Cr = (v, p) => typeof v == "string" ? v : v[p] ?? v[ot] ?? gr[p], Tr = (v, p) => typeof v == "string" ? v : {
34
+ import Nr from "../../node_modules/lucide-react/dist/esm/icons/chevron-left.es.js";
35
+ const Lr = 2e3, Vr = 300, jr = 160, qr = 16, mt = "waitingForAudio", Kr = (y, p) => typeof y == "string" ? y : y[p] ?? y[mt] ?? Or[p], Dr = (y, p) => typeof y == "string" ? y : {
34
36
  ...p,
35
- ...v
36
- }, Er = (v, p) => p ? v !== "loadingAudio" : !1, Jt = Hn(
37
+ ...y
38
+ }, Ur = (y, p) => p ? y !== "loadingAudio" : !1, on = rr(
37
39
  ({
38
- content: v,
40
+ content: y,
39
41
  title: p,
40
- locale: q,
41
- defaultButtonText: ie,
42
- defaultInputText: D,
43
- defaultSelectedValues: U,
44
- confirmButtonText: J,
45
- copyButtonText: ue,
46
- copiedButtonText: Ae,
47
- onSend: Ve,
48
- readonly: W = !1
49
- }) => /* @__PURE__ */ o.jsxs("div", { className: "slide-player__interaction-card", children: [
50
- /* @__PURE__ */ o.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ o.jsx("p", { className: "slide-player__interaction-title", children: p }) }),
51
- /* @__PURE__ */ o.jsx("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ o.jsx(
52
- $n,
42
+ locale: U,
43
+ defaultButtonText: me,
44
+ defaultInputText: G,
45
+ defaultSelectedValues: H,
46
+ confirmButtonText: Q,
47
+ copyButtonText: Z,
48
+ copiedButtonText: Re,
49
+ onSend: $e,
50
+ readonly: ee = !1
51
+ }) => /* @__PURE__ */ l.jsxs("div", { className: "slide-player__interaction-card", children: [
52
+ /* @__PURE__ */ l.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ l.jsx("p", { className: "slide-player__interaction-title", children: p }) }),
53
+ /* @__PURE__ */ l.jsx("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ l.jsx(
54
+ sr,
53
55
  {
54
- content: v,
55
- locale: q,
56
- defaultButtonText: ie,
57
- defaultInputText: D,
58
- defaultSelectedValues: U,
59
- confirmButtonText: J,
60
- copyButtonText: ue,
61
- copiedButtonText: Ae,
62
- onSend: Ve,
63
- readonly: W,
56
+ content: y,
57
+ locale: U,
58
+ defaultButtonText: me,
59
+ defaultInputText: G,
60
+ defaultSelectedValues: H,
61
+ confirmButtonText: Q,
62
+ copyButtonText: Z,
63
+ copiedButtonText: Re,
64
+ onSend: $e,
65
+ readonly: ee,
64
66
  sandboxMode: "content"
65
67
  }
66
68
  ) })
67
69
  ] })
68
70
  );
69
- Jt.displayName = "InteractionOverlayCard";
70
- const _r = (v, p) => v.length === p.length && v.every((q, ie) => {
71
- const D = p[ie];
72
- return q.sequence_number === D?.sequence_number && q.type === D?.type && q.content === D?.content;
73
- }), co = ({
74
- elementList: v = [],
71
+ on.displayName = "InteractionOverlayCard";
72
+ const Gr = (y, p) => y.length === p.length && y.every((U, me) => {
73
+ const G = p[me];
74
+ return U.sequence_number === G?.sequence_number && U.type === G?.type && U.content === G?.content;
75
+ }), Co = ({
76
+ elementList: y = [],
75
77
  locale: p,
76
- playerEnabled: q,
77
- playerControlsVisibility: ie,
78
- playerClassName: D,
79
- fullscreenHeader: U,
80
- playerCustomActions: J,
81
- playerCustomActionPauseOnActive: ue = !0,
82
- bufferingText: Ae,
83
- interactionTitle: Ve,
84
- interactionTexts: W,
85
- playerTexts: Wt,
86
- playerAutoHideDelay: Ke = 3e3,
87
- markerAutoAdvanceDelay: st = Ir,
88
- interactionDefaultValueOptions: we,
89
- onSend: lt,
90
- onPlayerVisibilityChange: qe,
91
- onMobileViewModeChange: it,
92
- onStepChange: ut,
93
- enableKeyboardShortcuts: $ = !0,
94
- enableIframeScaling: $t = !0,
95
- enableMarkdownScaling: Yt = !0,
96
- disableLoadingOverlay: E = !1,
97
- className: Xt,
98
- onPointerDown: at,
99
- onFocusCapture: ct,
100
- ...Qt
78
+ playerEnabled: U,
79
+ playerControlsVisibility: me,
80
+ playerClassName: G,
81
+ fullscreenHeader: H,
82
+ playerCustomActions: Q,
83
+ playerCustomActionPauseOnActive: Z = !0,
84
+ bufferingText: Re,
85
+ interactionTitle: $e,
86
+ interactionTexts: ee,
87
+ playerTexts: ln,
88
+ playerAutoHideDelay: ze = 3e3,
89
+ markerAutoAdvanceDelay: pt = Lr,
90
+ interactionDefaultValueOptions: ht,
91
+ onSend: yt,
92
+ onPlayerVisibilityChange: Je,
93
+ onMobileViewModeChange: St,
94
+ onStepChange: vt,
95
+ enableKeyboardShortcuts: te = !0,
96
+ enableIframeScaling: sn = !0,
97
+ enableMarkdownScaling: an = !0,
98
+ disableLoadingOverlay: R = !1,
99
+ className: un,
100
+ onPointerDown: bt,
101
+ onFocusCapture: gt,
102
+ ...cn
101
103
  }) => {
102
- const G = i(() => br(p), [p]), Zt = i(
103
- () => Tr(
104
- Ae,
105
- G.bufferingText
104
+ const $ = c(() => Br(p), [p]), dn = c(
105
+ () => Dr(
106
+ Re,
107
+ $.bufferingText
106
108
  ),
107
- [Ae, G.bufferingText]
109
+ [Re, $.bufferingText]
108
110
  ), {
109
- playerEnabled: en,
111
+ playerEnabled: fn,
110
112
  playerControlsVisibility: j
111
- } = Sr({
112
- playerEnabled: q,
113
- playerControlsVisibility: ie
114
- }), Pe = zn(), ae = f(null), dt = f(null), De = f(null), ft = f(null), Y = f(null), Ce = f(!1), ce = f(null), de = f(null), fe = f(null), mt = f(null), pt = f([]), me = f(!1), H = f(null), pe = f(null), ht = f(0), vt = f(null), yt = f({
113
+ } = Fr({
114
+ playerEnabled: U,
115
+ playerControlsVisibility: me
116
+ }), _e = or(), pe = f(null), At = f(null), ke = f(null), It = f(null), ne = f(null), Me = f(!1), he = f(null), Fe = f(null), ye = f(null), Se = f(null), xt = f(null), wt = f([]), ve = f(!1), z = f(null), be = f(null), Et = f(0), Tt = f(null), Pt = f({
115
117
  markerCount: 0,
116
118
  currentIndex: -1,
117
119
  canGoNext: !1
118
- }), Ue = f(!1), {
119
- currentElementList: F,
120
- stepElementLists: St,
121
- slideElementList: A,
122
- currentIndex: l,
123
- audioList: b,
124
- audioSlideIndexes: Te,
125
- currentAudioSequenceIndexes: Ee,
126
- currentStepHasSpeakableElement: w,
127
- currentInteractionElement: h,
128
- canGoPrev: tn,
120
+ }), We = f(!1), {
121
+ currentElementList: P,
122
+ stepElementLists: Ct,
123
+ slideElementList: T,
124
+ currentIndex: o,
125
+ audioList: v,
126
+ audioSlideIndexes: Be,
127
+ currentAudioSequenceIndexes: Oe,
128
+ currentStepHasSpeakableElement: b,
129
+ currentInteractionElement: d,
130
+ canGoPrev: mn,
129
131
  canGoNext: C,
130
- handlePrev: bt,
132
+ handlePrev: Rt,
131
133
  handleNext: _,
132
- handleGoTo: gt
133
- } = rr(v), he = i(() => {
134
- if (!(l < 0))
135
- return A[l];
136
- }, [l, A]), nn = A.filter(
134
+ handleGoTo: _t
135
+ } = mr(y), ge = c(() => {
136
+ if (!(o < 0))
137
+ return T[o];
138
+ }, [o, T]), re = c(
139
+ () => P.map(
140
+ (e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
141
+ ),
142
+ [P]
143
+ ), pn = T.filter(
137
144
  (e) => e.is_renderable !== !1
138
- ).length === 1, y = en && (A.length > 0 || b.length > 0 || !!h), rn = i(
145
+ ).length === 1, h = fn && (T.length > 0 || v.length > 0 || !!d), hn = c(
139
146
  () => ({
140
- enabled: $,
141
- ownerId: Pe
147
+ enabled: te,
148
+ ownerId: _e
142
149
  }),
143
- [$, Pe]
144
- ), V = n(() => {
145
- !$ || !y || lr(Pe);
146
- }, [$, Pe, y]), R = i(
147
- () => Ee.map((e) => b[e]?.audioKey).filter((e) => !!e),
148
- [b, Ee]
149
- ), [on, ve] = m(!0), [_e, X] = m(!1), [ye, xt] = m(!0), [Se, It] = m(!0), [x, K] = m(null), [sn, At] = m(null), [ln, g] = m(!1), [un, Ge] = m(ot), [k, He] = m(!1), [an, Re] = m(!1), [wt, cn] = m(!0), [ze, Je] = m(!1), [s, We] = m(), [ke, Me] = m(!1), [
150
- dn,
151
- be
152
- ] = m(0), [Pt, fn] = m(!1), N = i(() => Qn(), []), [Be, $e] = m(
153
- je
154
- ), [Ct, Ye] = m(!1), [mn, Tt] = m(
155
- () => N ? Ht() : !1
156
- ), Q = i(() => vr(), []), {
157
- effectiveMobileViewMode: Z,
158
- isImmersiveMobileFullscreen: ee,
159
- isNativeMobileFullscreen: Et,
160
- shouldRotateFullscreenViewport: pn
161
- } = i(
162
- () => ir({
163
- hasManualMobileViewMode: Ct,
150
+ [te, _e]
151
+ ), q = n(() => {
152
+ !te || !h || yr(_e);
153
+ }, [te, _e, h]), k = c(
154
+ () => Oe.map((e) => v[e]?.audioKey).filter((e) => !!e),
155
+ [v, Oe]
156
+ ), [yn, Ae] = m(!0), [Ne, oe] = m(!1), [Ye, kt] = m(!0), [Ie, Mt] = m(!0), [I, K] = m(null), [Sn, Ft] = m(null), [vn, g] = m(!1), [bn, Xe] = m(mt), [M, Qe] = m(!1), [gn, Le] = m(!1), [Bt, An] = m(!0), [Ze, et] = m(!1), [A, tt] = m(), [Ve, je] = m(!1), [
157
+ In,
158
+ xe
159
+ ] = m(0), [Ot, xn] = m(!1), N = c(() => ar(), []), [qe, nt] = m(
160
+ He
161
+ ), [Nt, rt] = m(!1), [wn, Lt] = m(
162
+ () => N ? nn() : !1
163
+ ), le = c(() => Pr(), []), {
164
+ effectiveMobileViewMode: ie,
165
+ isImmersiveMobileFullscreen: se,
166
+ isNativeMobileFullscreen: Vt,
167
+ shouldRotateFullscreenViewport: En
168
+ } = c(
169
+ () => Sr({
170
+ hasManualMobileViewMode: Nt,
164
171
  isMobileDevice: N,
165
- mobileViewMode: Be
172
+ mobileViewMode: qe
166
173
  }),
167
174
  [
168
- Ct,
175
+ Nt,
169
176
  N,
170
- mn,
171
- Be
177
+ wn,
178
+ qe
172
179
  ]
173
- ), hn = f(Z), P = y && j !== "hidden" && (j === "visible" || on), vn = ee && P, yn = ee && P, Sn = ee || Et, _t = Pt && !N, bn = n(
180
+ ), Tn = f(ie), x = h && j !== "hidden" && (j === "visible" || yn), Pn = se && x, Cn = se && x, Rn = se || Vt, jt = Ot && !N, _n = n(
174
181
  (e) => {
175
- Ye(!0), $e(e);
182
+ rt(!0), nt(e);
176
183
  },
177
184
  []
178
- ), Rt = n(() => {
179
- Ye(!1), $e(je);
180
- }, []), gn = n(() => {
181
- Rt(), U?.onBack?.();
182
- }, [U, Rt]), kt = n((e) => {
183
- Je(e);
184
- }, []), Mt = n(() => {
185
- Je((e) => !e);
186
- }, []), { mountedStepStates: xn, currentMountedStateIndex: In } = i(() => {
185
+ ), qt = n(() => {
186
+ rt(!1), nt(He);
187
+ }, []), kn = n(() => {
188
+ qt(), H?.onBack?.();
189
+ }, [H, qt]), Kt = n((e) => {
190
+ et(e);
191
+ }, []), Dt = n(() => {
192
+ et((e) => !e);
193
+ }, []), { mountedStepStates: Mn, currentMountedStateIndex: Fn } = c(() => {
187
194
  const e = [], t = /* @__PURE__ */ new Map();
188
- return St.forEach((a, c) => {
189
- const d = e.findIndex(
190
- (r) => _r(
195
+ return Ct.forEach((i, s) => {
196
+ const u = e.findIndex(
197
+ (r) => Gr(
191
198
  r.elementList,
192
- a
199
+ i
193
200
  )
194
201
  );
195
- if (d >= 0) {
196
- e[d]?.sourceStepIndexes.push(c), t.set(c, d);
202
+ if (u >= 0) {
203
+ e[u]?.sourceStepIndexes.push(s), t.set(s, u);
197
204
  return;
198
205
  }
199
206
  e.push({
200
- elementList: a,
201
- sourceStepIndexes: [c]
202
- }), t.set(c, e.length - 1);
207
+ elementList: i,
208
+ sourceStepIndexes: [s]
209
+ }), t.set(s, e.length - 1);
203
210
  }), {
204
211
  mountedStepStates: e,
205
- currentMountedStateIndex: l >= 0 ? t.get(l) ?? -1 : -1
212
+ currentMountedStateIndex: o >= 0 ? t.get(o) ?? -1 : -1
206
213
  };
207
- }, [l, St]), Bt = i(() => String(l), [l]), I = i(() => x ? b.findIndex(
208
- (e) => (e.audioKey ?? "") === x
209
- ) : -1, [b, x]), Xe = i(
210
- () => I >= 0 ? b[I] : void 0,
211
- [b, I]
212
- ), An = Xe?.element?.subtitle_cues ?? [], Fe = i(
213
- () => R[0] ?? "none",
214
- [R]
215
- ), Qe = i(
214
+ }, [o, Ct]), Ut = c(() => String(o), [o]), w = c(() => I ? v.findIndex(
215
+ (e) => (e.audioKey ?? "") === I
216
+ ) : -1, [v, I]), ot = c(
217
+ () => w >= 0 ? v[w] : void 0,
218
+ [v, w]
219
+ ), Bn = ot?.element?.subtitle_cues ?? [], Ke = c(
220
+ () => k[0] ?? "none",
221
+ [k]
222
+ ), lt = c(
216
223
  () => ({
217
- currentElement: pr({
218
- currentAudioIndex: I,
219
- currentAudioSequenceIndexes: Ee,
220
- audioList: b,
221
- currentInteractionElement: s,
222
- currentStepElement: he
224
+ currentElement: Er({
225
+ currentAudioIndex: w,
226
+ currentAudioSequenceIndexes: Oe,
227
+ audioList: v,
228
+ currentInteractionElement: A,
229
+ currentStepElement: ge
223
230
  }),
224
- currentIndex: l,
225
- currentStepElement: he,
226
- isActive: ze,
227
- setActive: kt,
228
- toggleActive: Mt
231
+ currentIndex: o,
232
+ currentStepElement: ge,
233
+ isActive: Ze,
234
+ setActive: Kt,
235
+ toggleActive: Dt
229
236
  }),
230
237
  [
231
- s,
232
- b,
233
- I,
234
- Ee,
235
- l,
236
- he,
237
- ze,
238
- kt,
239
- Mt
238
+ A,
239
+ v,
240
+ w,
241
+ Oe,
242
+ o,
243
+ ge,
244
+ Ze,
245
+ Kt,
246
+ Dt
240
247
  ]
241
- ), Ze = i(
242
- () => hr(
243
- J,
244
- Qe
248
+ ), it = c(
249
+ () => Tr(
250
+ Q,
251
+ lt
245
252
  ),
246
- [Qe, J]
247
- ), wn = i(
253
+ [lt, Q]
254
+ ), On = c(
248
255
  () => ({
249
- "--slide-player-custom-action-count": String(Ze),
256
+ "--slide-player-custom-action-count": String(it),
250
257
  "--slide-player-mobile-control-count": String(
251
- Ze + 4
258
+ it + 4
252
259
  )
253
260
  }),
254
- [Ze]
255
- ), Ft = R.length > 0, Nt = i(() => h ? `${h.sequence_number ?? "none"}:${String(
256
- h.content ?? ""
257
- )}` : "none", [h]), ge = i(
258
- () => [Bt, Nt].join("|"),
259
- [Nt, Bt]
260
- ), Pn = i(
261
+ [it]
262
+ ), Gt = k.length > 0, Ht = c(() => d ? `${d.sequence_number ?? "none"}:${String(
263
+ d.content ?? ""
264
+ )}` : "none", [d]), we = c(
265
+ () => [Ut, Ht].join("|"),
266
+ [Ht, Ut]
267
+ ), Nn = c(
261
268
  () => [
262
- ge,
263
- Xe?.audioKey ?? "none",
264
- String(I)
269
+ we,
270
+ ot?.audioKey ?? "none",
271
+ String(w)
265
272
  ].join("|"),
266
- [I, Xe?.audioKey, ge]
267
- ), Ot = !!i(() => !Fe || Fe === "none" ? "" : b.find(
268
- (t) => t.audioKey === Fe
269
- )?.audioUrl?.trim() ?? "", [b, Fe]), z = ue && !!J && ze, xe = i(
270
- () => yr({
273
+ [w, ot?.audioKey, we]
274
+ ), $t = !!c(() => !Ke || Ke === "none" ? "" : v.find(
275
+ (t) => t.audioKey === Ke
276
+ )?.audioUrl?.trim() ?? "", [v, Ke]), J = Z && !!Q && Ze, Ee = c(
277
+ () => Rr({
271
278
  canGoNext: C,
272
- currentAudioIndex: I,
273
- currentStepHasSpeakableElement: w,
274
- hasInteraction: !!h
279
+ currentAudioIndex: w,
280
+ currentStepHasSpeakableElement: b,
281
+ hasInteraction: !!d
275
282
  }),
276
283
  [
277
284
  C,
278
- I,
279
- h,
280
- w
285
+ w,
286
+ d,
287
+ b
288
+ ]
289
+ ), zt = c(
290
+ () => Mr({
291
+ currentElementList: P,
292
+ currentStepHasSpeakableElement: b,
293
+ currentInteractionElement: d,
294
+ markerAutoAdvanceDelay: pt
295
+ }),
296
+ [
297
+ P,
298
+ d,
299
+ b,
300
+ pt
281
301
  ]
282
- ), O = n(() => {
283
- Y.current !== null && (window.clearTimeout(Y.current), Y.current = null);
284
- }, []), L = n(() => {
285
- de.current !== null && (window.clearTimeout(de.current), de.current = null);
286
- }, []), M = n(() => {
287
- fe.current !== null && (window.clearTimeout(fe.current), fe.current = null);
288
- }, []), te = n(() => {
289
- ce.current !== null && (window.clearTimeout(ce.current), ce.current = null);
302
+ ), Jt = zt.delayMs, Te = zt.usesImageOnlyDelay, st = c(
303
+ () => `${o}:${re.join("|")}`,
304
+ [o, re]
305
+ ), [Ln, Vn] = m(null), Wt = !Te || Ln === st, L = n(() => {
306
+ ne.current !== null && (window.clearTimeout(ne.current), ne.current = null);
307
+ }, []), V = n(() => {
308
+ ye.current !== null && (window.clearTimeout(ye.current), ye.current = null);
309
+ }, []), F = n(() => {
310
+ Se.current !== null && (window.clearTimeout(Se.current), Se.current = null);
311
+ }, []), ae = n(() => {
312
+ he.current !== null && (window.clearTimeout(he.current), he.current = null);
313
+ }, []), D = n(() => {
314
+ Fe.current !== null && (window.clearTimeout(Fe.current), Fe.current = null);
290
315
  }, []), B = n(
291
316
  (e = {}) => {
292
- te(), L(), M(), K(null), Q.reset(), g(!1), Ge(ot), He(!1), Re(!1), At(null), e.preservePendingSubtitleJump || (pe.current = null), We(void 0), Me(!1), be(0);
317
+ ae(), V(), F(), D(), K(null), le.reset(), g(!1), Xe(mt), Qe(!1), Le(!1), Ft(null), e.preservePendingSubtitleJump || (be.current = null), tt(void 0), je(!1), xe(0);
293
318
  },
294
319
  [
295
- te,
296
- L,
297
- M,
298
- Q
320
+ ae,
321
+ D,
322
+ V,
323
+ F,
324
+ le
299
325
  ]
300
- ), Ne = n(
326
+ ), De = n(
301
327
  (e) => {
302
- ht.current += 1, At({
328
+ Et.current += 1, Ft({
303
329
  ...e,
304
- id: ht.current
330
+ id: Et.current
305
331
  });
306
332
  },
307
333
  []
308
- ), ne = n(() => {
309
- const e = R[0];
334
+ ), ue = n(() => {
335
+ const e = k[0];
310
336
  return e ? (K(e), !0) : !1;
311
- }, [R]), Oe = n(() => {
312
- L(), M(), Me(!1), be(0), !ne() && C && _();
337
+ }, [k]), Ue = n(() => {
338
+ V(), F(), je(!1), xe(0), !ue() && C && _();
313
339
  }, [
314
340
  C,
315
- L,
316
- M,
341
+ V,
342
+ F,
317
343
  _,
318
- ne
319
- ]), Lt = n(
344
+ ue
345
+ ]), Yt = n(
320
346
  (e) => {
321
- if (M(), !e)
347
+ if (F(), !e)
322
348
  return;
323
349
  const t = () => {
324
- fe.current = null, be(
325
- wr
326
- ), Me(!0), H.current = null;
350
+ Se.current = null, xe(
351
+ jr
352
+ ), je(!0), z.current = null;
327
353
  };
328
- fe.current = window.setTimeout(
354
+ Se.current = window.setTimeout(
329
355
  t,
330
- Ar
356
+ Vr
331
357
  );
332
358
  },
333
- [M]
334
- ), et = n(
335
- () => Ce.current || !!ae.current?.querySelector(".slide-player__controls:hover"),
359
+ [F]
360
+ ), at = n(
361
+ () => Me.current || !!pe.current?.querySelector(".slide-player__controls:hover"),
336
362
  []
337
363
  ), S = n(
338
- (e = _e) => {
339
- !y || j === "hidden" || (ve(!0), O(), !(j === "visible" || !e || Ke <= 0 || et()) && (Y.current = window.setTimeout(() => {
340
- if (et()) {
341
- Y.current = null;
364
+ (e = Ne) => {
365
+ !h || j === "hidden" || (Ae(!0), L(), !(j === "visible" || !e || ze <= 0 || at()) && (ne.current = window.setTimeout(() => {
366
+ if (at()) {
367
+ ne.current = null;
342
368
  return;
343
369
  }
344
- ve(!1), Y.current = null;
345
- }, Ke)));
370
+ Ae(!1), ne.current = null;
371
+ }, ze)));
346
372
  },
347
373
  [
348
- O,
349
- _e,
350
- et,
351
- Ke,
374
+ L,
375
+ Ne,
376
+ at,
377
+ ze,
352
378
  j,
353
- y
379
+ h
354
380
  ]
355
- ), Ie = !!mr(h), re = !!h && !Ie, Cn = n((e) => {
356
- xt(e);
357
- }, []), oe = n(
381
+ ), Pe = !!wr(d), W = !!d && !Pe, jn = n((e) => {
382
+ kt(e);
383
+ }, []), ce = n(
358
384
  (e) => {
359
- const t = e?.shouldContinuePlayback ?? ye;
360
- xt(t);
385
+ e && kt(e.shouldContinuePlayback);
361
386
  },
362
- [ye]
387
+ []
363
388
  );
364
- u(() => {
365
- It(ye), ue && Je(!1);
366
- }, [l, ye, ue]), u(() => () => {
367
- te(), O(), L(), M();
389
+ a(() => {
390
+ Mt(Ye);
391
+ }, [o, Ye, Z]), a(() => {
392
+ Z && et(!1);
393
+ }, [o, Z]), a(() => () => {
394
+ ae(), D(), L(), V(), F();
368
395
  }, [
369
- te,
370
- L,
371
- M,
372
- O
373
- ]), u(() => (qe?.(P), () => {
374
- qe?.(!1);
375
- }), [qe, P]), u(() => {
376
- P || (Ce.current = !1);
377
- }, [P]), u(() => {
378
- N || Be === je || (Ye(!1), $e(je));
379
- }, [N, Be]), u(() => {
396
+ ae,
397
+ D,
398
+ V,
399
+ F,
400
+ L
401
+ ]), a(() => {
402
+ if (!Te) {
403
+ D();
404
+ return;
405
+ }
406
+ let e = !1, t = null, i = null;
407
+ const s = () => {
408
+ i?.(), i = null;
409
+ }, u = () => {
410
+ e || (s(), D(), Vn(st));
411
+ }, r = () => {
412
+ if (e)
413
+ return;
414
+ s();
415
+ const E = ke.current?.querySelector(
416
+ '[data-active-step="true"]'
417
+ );
418
+ if (!E)
419
+ return;
420
+ const O = Array.from(
421
+ E.querySelectorAll("iframe")
422
+ );
423
+ if (O.length === 0 || kr(O)) {
424
+ u();
425
+ return;
426
+ }
427
+ const Ge = [], Ce = () => {
428
+ e || (t !== null && window.cancelAnimationFrame(t), t = window.requestAnimationFrame(() => {
429
+ t = null, r();
430
+ }));
431
+ }, dt = (Y, de, X) => {
432
+ Y.addEventListener(de, X, { once: !0 }), Ge.push(
433
+ () => Y.removeEventListener(de, X)
434
+ );
435
+ };
436
+ O.forEach((Y) => {
437
+ const de = Y.contentDocument;
438
+ if (!de || de.readyState !== "complete") {
439
+ dt(Y, "load", Ce);
440
+ return;
441
+ }
442
+ Array.from(de.images).filter((X) => !X.complete).forEach((X) => {
443
+ dt(X, "load", Ce), dt(X, "error", Ce);
444
+ });
445
+ }), i = () => {
446
+ Ge.forEach((Y) => Y());
447
+ };
448
+ };
449
+ return t = window.requestAnimationFrame(() => {
450
+ t = null, r();
451
+ }), Fe.current = window.setTimeout(() => {
452
+ u();
453
+ }, _r), () => {
454
+ e = !0, s(), D(), t !== null && window.cancelAnimationFrame(t);
455
+ };
456
+ }, [
457
+ D,
458
+ P,
459
+ o,
460
+ st,
461
+ Te
462
+ ]), a(() => (Je?.(x), () => {
463
+ Je?.(!1);
464
+ }), [Je, x]), a(() => {
465
+ x || (Me.current = !1);
466
+ }, [x]), a(() => {
467
+ N || qe === He || (rt(!1), nt(He));
468
+ }, [N, qe]), a(() => {
380
469
  if (!N) {
381
- Tt(!1);
470
+ Lt(!1);
382
471
  return;
383
472
  }
384
473
  const e = () => {
385
- Tt(Ht());
474
+ Lt(nn());
386
475
  };
387
- return e(), Zn(e);
388
- }, [N]), u(() => {
389
- it?.(Z);
390
- }, [Z, it]), u(() => {
391
- hn.current = Z;
392
- }, [Z]), u(() => {
393
- ut?.(he, l);
394
- }, [l, he, ut]), u(() => {
395
- const e = yt.current, t = cr(
476
+ return e(), ur(e);
477
+ }, [N]), a(() => {
478
+ St?.(ie);
479
+ }, [ie, St]), a(() => {
480
+ Tn.current = ie;
481
+ }, [ie]), a(() => {
482
+ vt?.(ge, o);
483
+ }, [o, ge, vt]), a(() => {
484
+ const e = Pt.current, t = Ar(
396
485
  {
397
486
  previousMarkerCount: e.markerCount,
398
- nextMarkerCount: A.length,
487
+ nextMarkerCount: T.length,
399
488
  previousIndex: e.currentIndex,
400
489
  previousCanGoNext: e.canGoNext,
401
490
  nextCanGoNext: C,
402
- currentAudioKey: x,
403
- hasCompletedCurrentStepAudio: k,
404
- hasResolvedCurrentInteraction: Ie,
405
- currentStepHasSpeakableElement: w,
406
- currentInteractionElement: h,
407
- isAutoAdvanceEnabled: Se,
408
- shouldUseSilentStepAutoAdvanceToggle: xe
491
+ currentAudioKey: I,
492
+ hasCompletedCurrentStepAudio: M,
493
+ hasResolvedCurrentInteraction: Pe,
494
+ currentStepHasSpeakableElement: b,
495
+ currentInteractionElement: d,
496
+ isAutoAdvanceEnabled: Ie,
497
+ shouldUseSilentStepAutoAdvanceToggle: Ee
409
498
  }
410
499
  );
411
- yt.current = {
412
- markerCount: A.length,
413
- currentIndex: l,
500
+ Pt.current = {
501
+ markerCount: T.length,
502
+ currentIndex: o,
414
503
  canGoNext: C
415
504
  }, t && _();
416
505
  }, [
417
506
  C,
418
- x,
419
- l,
420
- h,
421
- w,
507
+ I,
508
+ o,
509
+ d,
510
+ b,
422
511
  _,
423
- k,
512
+ M,
513
+ Pe,
424
514
  Ie,
425
- Se,
426
- xe,
427
- A.length
428
- ]), u(() => {
429
- if (!y || j === "hidden") {
430
- O(), ve(!1);
515
+ Ee,
516
+ T.length
517
+ ]), a(() => {
518
+ if (!h || j === "hidden") {
519
+ L(), Ae(!1);
431
520
  return;
432
521
  }
433
522
  if (j === "visible") {
434
- O(), ve(!0);
523
+ L(), Ae(!0);
435
524
  return;
436
525
  }
437
- _e || S(!0);
526
+ Ne || S(!0);
438
527
  }, [
439
- O,
440
- _e,
528
+ L,
529
+ Ne,
441
530
  j,
442
- y,
531
+ h,
443
532
  S
444
- ]), u(() => {
533
+ ]), a(() => {
445
534
  if (typeof window > "u")
446
535
  return;
447
536
  const e = (t) => {
448
- t.origin === window.location.origin && Jn(t.data) && t.data.eventType === "click" && y && (V(), X(!0), S(!0));
537
+ t.origin === window.location.origin && lr(t.data) && t.data.eventType === "click" && h && (q(), oe(!0), S(!0));
449
538
  };
450
539
  return window.addEventListener("message", e), () => {
451
540
  window.removeEventListener("message", e);
452
541
  };
453
- }, [V, y, S]), or({
454
- sectionRef: ae,
455
- enabled: y,
456
- keyboardShortcutsEnabled: $,
457
- onKeyboardShortcut: V,
542
+ }, [q, h, S]), pr({
543
+ sectionRef: pe,
544
+ enabled: h,
545
+ keyboardShortcutsEnabled: te,
546
+ onKeyboardShortcut: q,
458
547
  onWake: () => {
459
- V(), X(!0), S(!0);
548
+ q(), oe(!0), S(!0);
460
549
  }
461
- }), u(() => {
462
- if (!y) {
550
+ }), a(() => {
551
+ if (!h) {
463
552
  B();
464
553
  return;
465
554
  }
466
- const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = dr({
467
- previousResetKey: vt.current,
468
- nextResetKey: ge,
469
- currentAudioKey: x,
470
- hasCompletedCurrentStepAudio: k
555
+ const { hasPlaybackContextChanged: e, shouldInitializeAudioSequence: t } = Ir({
556
+ previousResetKey: Tt.current,
557
+ nextResetKey: we,
558
+ currentAudioKey: I,
559
+ hasCompletedCurrentStepAudio: M
471
560
  });
472
- vt.current = ge;
473
- const a = H.current === l && !!h, c = ur({
474
- hasInteraction: !!h,
475
- shouldBlockPlaybackForInteraction: re,
476
- shouldOpenInteractionOverlayAfterAudio: a,
561
+ Tt.current = we;
562
+ const i = z.current === o && !!d, s = br({
563
+ hasInteraction: !!d,
564
+ shouldBlockPlaybackForInteraction: W,
565
+ shouldOpenInteractionOverlayAfterAudio: i,
477
566
  hasPlaybackContextChanged: e,
478
- hasResolvedCurrentInteraction: Ie,
479
- currentStepHasSpeakableElement: w
480
- }), d = pe.current, r = d?.slideIndex === l;
567
+ hasResolvedCurrentInteraction: Pe,
568
+ currentStepHasSpeakableElement: b
569
+ }), u = be.current, r = u?.slideIndex === o;
481
570
  if (e && B({
482
571
  preservePendingSubtitleJump: r
483
- }), !(F.length === 0 && !h) && !z) {
484
- if (d?.slideIndex === l && zt({
485
- currentIndex: l,
486
- resolvedCurrentInteractionElement: s,
487
- slideElementList: A,
488
- targetSlideIndex: d.slideIndex
572
+ }), !(P.length === 0 && !d) && !J) {
573
+ if (u?.slideIndex === o && rn({
574
+ currentIndex: o,
575
+ resolvedCurrentInteractionElement: A,
576
+ slideElementList: T,
577
+ targetSlideIndex: u.slideIndex
489
578
  })) {
490
- pe.current = null, Ue.current = !0, K(d.audioKey), Ne({
491
- audioIndex: d.audioIndex,
492
- timeMs: d.timeMs
579
+ be.current = null, We.current = !0, K(u.audioKey), De({
580
+ audioIndex: u.audioIndex,
581
+ timeMs: u.timeMs
493
582
  });
494
583
  return;
495
584
  }
496
- if (h && We(h), c) {
497
- Lt(h);
585
+ if (d && tt(d), s) {
586
+ Yt(d);
498
587
  return;
499
588
  }
500
- if (M(), H.current = null, !!t && !ne()) {
501
- if (w) {
502
- if (E) {
589
+ if (F(), z.current = null, !!t && !ue()) {
590
+ if (b) {
591
+ if (R) {
503
592
  g(!1);
504
593
  return;
505
594
  }
506
595
  g(!0);
507
596
  return;
508
597
  }
509
- if (C && !(xe && !Se))
510
- return ce.current = window.setTimeout(() => {
511
- ce.current = null, _();
512
- }, st), () => {
513
- te();
598
+ if (C && !(Ee && !Ie) && !(Te && !Wt))
599
+ return he.current = window.setTimeout(() => {
600
+ he.current = null, _();
601
+ }, Jt), () => {
602
+ ae();
514
603
  };
515
604
  }
516
605
  }
517
606
  }, [
518
- s,
607
+ A,
519
608
  C,
520
- te,
521
- F.length,
522
- l,
523
- h,
524
- x,
525
- ge,
526
- w,
527
- st,
609
+ ae,
610
+ P.length,
611
+ o,
612
+ d,
613
+ I,
614
+ we,
615
+ b,
616
+ Te,
617
+ Wt,
618
+ Jt,
528
619
  _,
529
- k,
530
- E,
531
- Se,
532
- Ie,
533
- re,
534
620
  M,
621
+ R,
622
+ Ie,
623
+ Pe,
624
+ W,
625
+ F,
535
626
  B,
536
- Ne,
537
- Lt,
538
- y,
539
- A,
540
- ne,
541
- z,
542
- xe
543
- ]), u(() => {
544
- if (E || z || !w || re) {
627
+ De,
628
+ Yt,
629
+ h,
630
+ T,
631
+ ue,
632
+ J,
633
+ Ee
634
+ ]), a(() => {
635
+ if (R || J || !b || W) {
545
636
  g(!1);
546
637
  return;
547
638
  }
548
- if (k) {
639
+ if (M) {
549
640
  g(!1);
550
641
  return;
551
642
  }
552
- if (Ft) {
643
+ if (Gt) {
553
644
  g(!1);
554
645
  return;
555
646
  }
556
- Ge("waitingForAudio"), g(!0);
647
+ Xe("waitingForAudio"), g(!0);
557
648
  }, [
558
- Ft,
559
- w,
560
- k,
561
- E,
562
- z,
563
- re
564
- ]), u(() => {
565
- const e = Ue.current;
566
- Ue.current = !1, fr({
567
- currentAudioKey: x,
568
- currentAudioSequenceLength: R.length,
569
- currentStepHasSpeakableElement: w,
570
- hasCompletedCurrentStepAudio: k,
571
- shouldBlockPlaybackForInteraction: re,
572
- shouldPausePlaybackForCustomAction: z,
649
+ Gt,
650
+ b,
651
+ M,
652
+ R,
653
+ J,
654
+ W
655
+ ]), a(() => {
656
+ const e = We.current;
657
+ We.current = !1, xr({
658
+ currentAudioKey: I,
659
+ currentAudioSequenceLength: k.length,
660
+ currentStepHasSpeakableElement: b,
661
+ hasCompletedCurrentStepAudio: M,
662
+ shouldBlockPlaybackForInteraction: W,
663
+ shouldPausePlaybackForCustomAction: J,
573
664
  shouldSkipDefaultAudioStart: e
574
- }) && ne();
665
+ }) && ue();
575
666
  }, [
576
- x,
577
- R,
578
- w,
667
+ I,
579
668
  k,
580
- z,
581
- re,
582
- ne
583
- ]), u(() => {
584
- !x || I >= 0 || K(null);
585
- }, [I, x]), u(() => {
586
- I >= 0 || Q.reset();
587
- }, [I, Q]), u(() => {
588
- Re(!1);
589
- }, [Pn]);
590
- const jt = i(() => {
591
- if (!s)
592
- return {};
593
- const e = !!s.user_input?.trim();
594
- return Yn(
595
- typeof s.content == "string" ? s.content : void 0,
596
- s.user_input,
597
- e ? void 0 : we
598
- );
599
- }, [s, we]), Tn = i(() => {
600
- if (!s)
601
- return;
602
- const e = !!s.user_input?.trim();
603
- return Xn(
604
- typeof s.content == "string" ? s.content : void 0,
605
- s.user_input,
606
- e ? void 0 : we
607
- );
608
- }, [s, we]), Vt = !!s?.user_input?.trim(), Kt = !!s?.readonly || Vt, qt = Kt || Vt, tt = !!s && ke, En = n(
669
+ b,
670
+ M,
671
+ J,
672
+ W,
673
+ ue
674
+ ]), a(() => {
675
+ !I || w >= 0 || K(null);
676
+ }, [w, I]), a(() => {
677
+ w >= 0 || le.reset();
678
+ }, [w, le]), a(() => {
679
+ Le(!1);
680
+ }, [Nn]);
681
+ const {
682
+ interactionDefaults: Xt,
683
+ interactionDefaultSelectedValues: qn,
684
+ isInteractionReadonly: Kn,
685
+ shouldAutoContinueInteraction: Qt
686
+ } = c(
687
+ () => Cr(A, {
688
+ interactionDefaultValueOptions: ht
689
+ }),
690
+ [A, ht]
691
+ ), ut = vr({
692
+ hasActiveInteraction: !!A,
693
+ isInteractionOverlayOpen: Ve,
694
+ shouldBlockPlaybackForInteraction: W,
695
+ playerControlsVisible: x,
696
+ shouldMountPlayer: h
697
+ }), Dn = n(
609
698
  (e) => {
610
- const a = [
699
+ const i = [
611
700
  ...e.selectedValues ?? [],
612
701
  e.inputText?.trim() ?? "",
613
702
  e.buttonText?.trim() ?? ""
614
703
  ].filter(Boolean).join(", ");
615
- We((c) => !c || !a ? c : {
616
- ...c,
617
- user_input: a
618
- }), lt?.(e, s), Oe();
704
+ tt((s) => !s || !i ? s : {
705
+ ...s,
706
+ user_input: i
707
+ }), yt?.(e, A), Ue();
619
708
  },
620
- [s, Oe, lt]
709
+ [A, Ue, yt]
621
710
  );
622
- u(() => {
711
+ a(() => {
623
712
  const e = () => {
624
- fn(document.fullscreenElement === ae.current);
713
+ xn(document.fullscreenElement === pe.current);
625
714
  };
626
715
  return e(), document.addEventListener("fullscreenchange", e), () => {
627
716
  document.removeEventListener("fullscreenchange", e);
628
717
  };
629
- }, []), u(() => {
630
- if (!tt) {
631
- be(0);
718
+ }, []), a(() => {
719
+ if (!ut) {
720
+ xe(0);
632
721
  return;
633
722
  }
634
- const e = mt.current;
723
+ const e = xt.current;
635
724
  if (!e)
636
725
  return;
637
726
  const t = () => {
638
- const c = Math.ceil(
727
+ const s = Math.ceil(
639
728
  e.getBoundingClientRect().height
640
729
  );
641
- be(
642
- c + Pr
730
+ xe(
731
+ s + qr
643
732
  );
644
733
  };
645
734
  if (t(), typeof ResizeObserver > "u")
646
735
  return;
647
- const a = new ResizeObserver(() => {
736
+ const i = new ResizeObserver(() => {
648
737
  t();
649
738
  });
650
- return a.observe(e), () => {
651
- a.disconnect();
739
+ return i.observe(e), () => {
740
+ i.disconnect();
652
741
  };
653
- }, [tt]), u(() => {
654
- if (L(), !(!ke || !qt))
655
- return de.current = window.setTimeout(() => {
656
- de.current = null, Oe();
742
+ }, [ut]), a(() => {
743
+ if (V(), !(!Ve || !Qt))
744
+ return ye.current = window.setTimeout(() => {
745
+ ye.current = null, Ue();
657
746
  }, 2e3), () => {
658
- L();
747
+ V();
659
748
  };
660
749
  }, [
661
- L,
662
- Oe,
663
- ke,
664
- qt
750
+ V,
751
+ Ue,
752
+ Ve,
753
+ Qt
665
754
  ]);
666
- const _n = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ o.jsx(o.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ o.jsx(
667
- Gt,
755
+ const Un = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ l.jsx(l.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ l.jsx(
756
+ tn,
668
757
  {
669
758
  className: "content-render-iframe",
670
- disableLoadingOverlay: E,
759
+ disableLoadingOverlay: R,
671
760
  hideFullScreen: !0,
672
761
  locale: p,
673
762
  mode: "blackboard",
674
763
  replaceRootScreenHeightWithFull: t.replaceRootScreenHeightWithFull,
675
764
  type: "sandbox",
676
765
  content: e.content,
677
- enableScaling: $t
766
+ enableScaling: sn
678
767
  }
679
- ) : /* @__PURE__ */ o.jsx(
680
- Gt,
768
+ ) : /* @__PURE__ */ l.jsx(
769
+ tn,
681
770
  {
682
771
  className: "content-render-iframe",
683
- disableLoadingOverlay: E,
772
+ disableLoadingOverlay: R,
684
773
  hideFullScreen: !0,
685
774
  locale: p,
686
775
  mode: "blackboard",
687
776
  type: "markdown",
688
777
  content: e.content
689
778
  }
690
- ) : null, Rn = (e = [], t = !1) => {
779
+ ) : null, Gn = (e = [], t = !1) => {
691
780
  if (e.length === 0)
692
781
  return null;
693
- const a = e.filter(
782
+ const i = e.filter(
694
783
  (r) => r.is_renderable !== !1
695
- ).length, c = t && Yt ? ar(e) : "disabled", d = e.reduce(
696
- (r, T, se) => T.is_renderable !== !1 ? se : r,
784
+ ).length, s = t && an ? gr(e) : "disabled", u = e.reduce(
785
+ (r, E, O) => E.is_renderable !== !1 ? O : r,
697
786
  -1
698
787
  );
699
- return /* @__PURE__ */ o.jsx(
700
- tr,
788
+ return /* @__PURE__ */ l.jsx(
789
+ dr,
701
790
  {
702
791
  className: "slide-stage__content flex w-full flex-col gap-4",
703
- mode: c,
704
- children: e.map((r, T) => {
705
- const se = r.type === "html" && r.is_renderable === !1;
706
- return /* @__PURE__ */ o.jsx(
792
+ mode: s,
793
+ children: e.map((r, E) => {
794
+ const O = r.type === "html" && r.is_renderable === !1;
795
+ return /* @__PURE__ */ l.jsx(
707
796
  "div",
708
797
  {
709
- ref: t && T === d ? ft : null,
710
- "aria-hidden": se || void 0,
711
- className: le(
798
+ ref: t && E === u ? It : null,
799
+ "aria-hidden": O || void 0,
800
+ className: fe(
712
801
  "w-full shrink-0",
713
- a === 1 && r.is_renderable !== !1 && "slide-element--single",
714
- se ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : r.is_renderable === !1 && "hidden"
802
+ i === 1 && r.is_renderable !== !1 && "slide-element--single",
803
+ O ? "pointer-events-none fixed left-[-200vw] top-0 -z-10 h-[100dvh] w-[100vw] overflow-hidden opacity-0" : r.is_renderable === !1 && "hidden"
715
804
  ),
716
- children: _n(r, {
717
- replaceRootScreenHeightWithFull: a === 1 && r.type === "html" && r.is_renderable !== !1
805
+ children: Un(r, {
806
+ replaceRootScreenHeightWithFull: i === 1 && r.type === "html" && r.is_renderable !== !1
718
807
  })
719
808
  },
720
- r.sequence_number ?? `${r.type}-${T}`
809
+ r.sequence_number ?? `${r.type}-${E}`
721
810
  );
722
811
  })
723
812
  }
724
813
  );
725
- }, kn = n(() => {
726
- const e = ae.current;
814
+ }, Hn = n(() => {
815
+ const e = pe.current;
727
816
  if (e) {
728
817
  if (document.fullscreenElement === e) {
729
818
  document.exitFullscreen().catch(() => {
@@ -733,224 +822,219 @@ const _r = (v, p) => v.length === p.length && v.every((q, ie) => {
733
822
  e.requestFullscreen?.().catch(() => {
734
823
  });
735
824
  }
736
- }, []), Dt = n(() => {
737
- const e = De.current;
825
+ }, []), Zt = n(() => {
826
+ const e = ke.current;
738
827
  e && e.scrollTo({
739
828
  top: e.scrollHeight,
740
829
  behavior: "smooth"
741
830
  });
742
- }, []), nt = n(
743
- (e) => zt({
744
- currentIndex: l,
745
- resolvedCurrentInteractionElement: s,
746
- slideElementList: A,
747
- targetSlideIndex: Te[e.audioIndex]
831
+ }, []), ct = n(
832
+ (e) => rn({
833
+ currentIndex: o,
834
+ resolvedCurrentInteractionElement: A,
835
+ slideElementList: T,
836
+ targetSlideIndex: Be[e.audioIndex]
748
837
  }),
749
838
  [
750
- s,
751
- Te,
752
- l,
753
- A
839
+ A,
840
+ Be,
841
+ o,
842
+ T
754
843
  ]
755
- ), Mn = n(
844
+ ), $n = n(
756
845
  (e, t) => {
757
- const c = b[e.audioIndex]?.audioKey, d = Te[e.audioIndex];
758
- return !c || d == null || !nt(e) ? !1 : (oe(t), H.current = null, g(!1), He(!1), Re(!1), rt(t) && (X(!0), S(!0)), d === l ? (pe.current = null, B(), K(c), Ne(e), !0) : (me.current = !0, B(), pe.current = {
846
+ const s = v[e.audioIndex]?.audioKey, u = Be[e.audioIndex];
847
+ return !s || u == null || !ct(e) ? !1 : (ce(t), z.current = null, g(!1), Qe(!1), Le(!1), ft(t) && (oe(!0), S(!0)), u === o ? (be.current = null, B(), K(s), De(e), !0) : (ve.current = !0, B(), be.current = {
759
848
  audioIndex: e.audioIndex,
760
- audioKey: c,
761
- slideIndex: d,
849
+ audioKey: s,
850
+ slideIndex: u,
762
851
  timeMs: e.timeMs
763
- }, gt(d), !0));
852
+ }, _t(u), !0));
764
853
  },
765
854
  [
766
- b,
767
- Te,
768
- nt,
769
- l,
770
- gt,
771
- Ne,
855
+ v,
856
+ Be,
857
+ ct,
858
+ o,
859
+ _t,
860
+ De,
772
861
  B,
773
862
  S,
774
- oe
863
+ ce
775
864
  ]
776
- ), Bn = n(
865
+ ), zn = n(
777
866
  (e) => {
778
- oe(e), me.current = !0, H.current = null, g(!1), rt(e) && (X(!0), S(!0)), B(), bt();
867
+ ce(e), ve.current = !0, z.current = null, g(!1), ft(e) && (oe(!0), S(!0)), B(), Rt();
779
868
  },
780
869
  [
781
- bt,
870
+ Rt,
782
871
  B,
783
872
  S,
784
- oe
873
+ ce
785
874
  ]
786
- ), Fn = n(
875
+ ), Jn = n(
787
876
  (e) => {
788
- oe(e), me.current = !0, H.current = null, g(!1), rt(e) && (X(!0), S(!0)), B(), _();
877
+ ce(e), ve.current = !0, z.current = null, g(!1), ft(e) && (oe(!0), S(!0)), B(), _();
789
878
  },
790
879
  [
791
880
  _,
792
881
  B,
793
882
  S,
794
- oe
883
+ ce
795
884
  ]
796
- ), Nn = n(
885
+ ), Wn = n(
797
886
  ({
798
887
  loading: e,
799
888
  reason: t
800
889
  }) => {
801
- if (E) {
890
+ if (R) {
802
891
  g(!1);
803
892
  return;
804
893
  }
805
- if (!w || k) {
894
+ if (!b || M) {
806
895
  g(!1);
807
896
  return;
808
897
  }
809
- e && t && Ge(t), g(Er(t, e));
898
+ e && t && Xe(t), g(Ur(t, e));
810
899
  },
811
900
  [
812
- w,
813
- k,
814
- E
901
+ b,
902
+ M,
903
+ R
815
904
  ]
816
905
  );
817
- u(() => {
818
- E && g(!1);
819
- }, [E]);
820
- const On = n(
906
+ a(() => {
907
+ R && g(!1);
908
+ }, [R]);
909
+ const Yn = n(
821
910
  (e) => {
822
- const t = b[e]?.audioKey;
823
- if (!t || !x || t !== x)
911
+ const t = v[e]?.audioKey;
912
+ if (!t || !I || t !== I)
824
913
  return;
825
- const a = R.findIndex(
914
+ const i = k.findIndex(
826
915
  (r) => r === t
827
916
  );
828
- if (a < 0) {
917
+ if (i < 0) {
829
918
  K(null);
830
919
  return;
831
920
  }
832
- const c = a + 1, d = R[c];
833
- if (d) {
834
- K(d);
921
+ const s = i + 1, u = k[s];
922
+ if (u) {
923
+ K(u);
835
924
  return;
836
925
  }
837
- if (K(null), He(!0), g(!1), C) {
838
- const r = l + 1, T = A[r];
839
- Ot && T?.type === "interaction" && (H.current = r), _();
926
+ if (K(null), Qe(!0), g(!1), C) {
927
+ const r = o + 1, E = T[r];
928
+ $t && E?.type === "interaction" && (z.current = r), _();
840
929
  return;
841
930
  }
842
931
  },
843
932
  [
844
- b,
933
+ v,
845
934
  C,
846
- l,
847
- x,
848
- R,
935
+ o,
936
+ I,
937
+ k,
849
938
  _,
850
- Ot,
851
- A
939
+ $t,
940
+ T
852
941
  ]
853
- ), Ln = n(() => {
854
- s && Me((e) => !e);
855
- }, [s]), jn = n(() => {
856
- Ce.current = !0, O(), y && ve(!0);
857
- }, [O, y]), Vn = n(() => {
858
- Ce.current = !1, S(!0);
859
- }, [S]), Ut = n(
942
+ ), Xn = n(() => {
943
+ A && je((e) => !e);
944
+ }, [A]), Qn = n(() => {
945
+ Me.current = !0, L(), h && Ae(!0);
946
+ }, [L, h]), Zn = n(() => {
947
+ Me.current = !1, S(!0);
948
+ }, [S]), en = n(
860
949
  (e) => {
861
- e.stopPropagation(), P && S(!0);
950
+ e.stopPropagation(), x && S(!0);
862
951
  },
863
- [P, S]
864
- ), Kn = n(
952
+ [x, S]
953
+ ), er = n(
865
954
  (e) => {
866
- V(), at?.(e);
955
+ q(), bt?.(e);
867
956
  },
868
- [V, at]
869
- ), qn = n(
957
+ [q, bt]
958
+ ), tr = n(
870
959
  (e) => {
871
- V(), ct?.(e);
960
+ q(), gt?.(e);
872
961
  },
873
- [V, ct]
874
- ), Dn = n(() => {
875
- X(!0), S(!0);
876
- }, [S]), Le = i(
877
- () => F.map(
878
- (e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
879
- ),
880
- [F]
881
- );
882
- return u(() => {
883
- const e = pt.current, c = (e.length > 0 && e.length < Le.length && e.every((r, T) => r === Le[T]) ? F.slice(e.length) : []).some(
962
+ [q, gt]
963
+ ), nr = n(() => {
964
+ oe(!0), S(!0);
965
+ }, [S]);
966
+ return a(() => {
967
+ const e = wt.current, s = (e.length > 0 && e.length < re.length && e.every((r, E) => r === re[E]) ? P.slice(e.length) : []).some(
884
968
  (r) => r.is_new === !1
885
969
  );
886
- if (pt.current = Le, !c)
970
+ if (wt.current = re, !s)
887
971
  return;
888
- const d = window.requestAnimationFrame(() => {
889
- const r = De.current, T = ft.current;
890
- if (!r || !T)
972
+ const u = window.requestAnimationFrame(() => {
973
+ const r = ke.current, E = It.current;
974
+ if (!r || !E)
891
975
  return;
892
- const se = r.getBoundingClientRect(), Un = T.getBoundingClientRect(), Gn = r.scrollTop + (Un.top - se.top);
976
+ const O = r.getBoundingClientRect(), Ge = E.getBoundingClientRect(), Ce = r.scrollTop + (Ge.top - O.top);
893
977
  r.scrollTo({
894
- top: Math.max(Gn, 0),
978
+ top: Math.max(Ce, 0),
895
979
  behavior: "smooth"
896
980
  });
897
981
  });
898
982
  return () => {
899
- window.cancelAnimationFrame(d);
983
+ window.cancelAnimationFrame(u);
900
984
  };
901
- }, [F, Le]), u(() => {
902
- if (!me.current || (me.current = !1, F.length === 0))
985
+ }, [P, re]), a(() => {
986
+ if (!ve.current || (ve.current = !1, P.length === 0))
903
987
  return;
904
988
  const e = window.requestAnimationFrame(() => {
905
- Dt();
989
+ Zt();
906
990
  });
907
991
  return () => {
908
992
  window.cancelAnimationFrame(e);
909
993
  };
910
- }, [F, Dt]), /* @__PURE__ */ o.jsxs(
994
+ }, [P, Zt]), /* @__PURE__ */ l.jsxs(
911
995
  "section",
912
996
  {
913
- ref: ae,
914
- className: le(
997
+ ref: pe,
998
+ className: fe(
915
999
  "relative h-full w-full",
916
1000
  N && "slide--mobile-device",
917
- _t && "slide--browser-fullscreen",
918
- ee && "slide--mobile-landscape",
919
- Et && "slide--mobile-landscape-native",
920
- Xt
1001
+ jt && "slide--browser-fullscreen",
1002
+ se && "slide--mobile-landscape",
1003
+ Vt && "slide--mobile-landscape-native",
1004
+ un
921
1005
  ),
922
- onClick: Dn,
923
- onFocusCapture: qn,
924
- onPointerDown: Kn,
925
- ...Qt,
1006
+ onClick: nr,
1007
+ onFocusCapture: tr,
1008
+ onPointerDown: er,
1009
+ ...cn,
926
1010
  children: [
927
- Sn ? /* @__PURE__ */ o.jsx(
1011
+ Rn ? /* @__PURE__ */ l.jsx(
928
1012
  "div",
929
1013
  {
930
1014
  "aria-hidden": "true",
931
1015
  className: "pointer-events-none fixed left-0 top-0 z-[9999] h-[100vh] max-h-[100vh] w-[100vw]"
932
1016
  }
933
1017
  ) : null,
934
- /* @__PURE__ */ o.jsxs(
1018
+ /* @__PURE__ */ l.jsxs(
935
1019
  "div",
936
1020
  {
937
- ref: dt,
938
- className: le(
1021
+ ref: At,
1022
+ className: fe(
939
1023
  "slide__viewport relative h-full min-h-0 w-full",
940
- ee && "slide__viewport--mobile-landscape",
941
- ee && !pn && "slide__viewport--mobile-landscape-native"
1024
+ se && "slide__viewport--mobile-landscape",
1025
+ se && !En && "slide__viewport--mobile-landscape-native"
942
1026
  ),
943
1027
  children: [
944
- vn ? /* @__PURE__ */ o.jsxs("div", { className: "slide-landscape-header", children: [
945
- /* @__PURE__ */ o.jsx(
1028
+ Pn ? /* @__PURE__ */ l.jsxs("div", { className: "slide-landscape-header", children: [
1029
+ /* @__PURE__ */ l.jsx(
946
1030
  "button",
947
1031
  {
948
- "aria-label": U?.backAriaLabel ?? G.fullscreenBackAriaLabel,
1032
+ "aria-label": H?.backAriaLabel ?? $.fullscreenBackAriaLabel,
949
1033
  className: "slide-landscape-header__back",
950
- onClick: gn,
1034
+ onClick: kn,
951
1035
  type: "button",
952
- children: /* @__PURE__ */ o.jsx(
953
- xr,
1036
+ children: /* @__PURE__ */ l.jsx(
1037
+ Nr,
954
1038
  {
955
1039
  className: "slide-landscape-header__icon h-6 w-6",
956
1040
  strokeWidth: 2.25
@@ -958,28 +1042,29 @@ const _r = (v, p) => v.length === p.length && v.every((q, ie) => {
958
1042
  )
959
1043
  }
960
1044
  ),
961
- U?.content ? /* @__PURE__ */ o.jsx("div", { className: "min-w-0 flex-1 overflow-hidden", children: U.content }) : null
1045
+ H?.content ? /* @__PURE__ */ l.jsx("div", { className: "min-w-0 flex-1 overflow-hidden", children: H.content }) : null
962
1046
  ] }) : null,
963
- /* @__PURE__ */ o.jsx(
1047
+ /* @__PURE__ */ l.jsx(
964
1048
  "div",
965
1049
  {
966
- className: le(
1050
+ className: fe(
967
1051
  "h-full min-h-0 w-full",
968
- yn && "slide__viewport-content--with-header",
969
- nn ? "slide-content--single" : "grid gap-4"
1052
+ Cn && "slide__viewport-content--with-header",
1053
+ pn ? "slide-content--single" : "grid gap-4"
970
1054
  ),
971
- children: F.length > 0 ? /* @__PURE__ */ o.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ o.jsx("div", { ref: De, className: "slide-stage__layer w-full", children: xn.map(
1055
+ children: P.length > 0 ? /* @__PURE__ */ l.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ l.jsx("div", { ref: ke, className: "slide-stage__layer w-full", children: Mn.map(
972
1056
  (e, t) => {
973
- const a = t === In;
974
- return /* @__PURE__ */ o.jsx(
1057
+ const i = t === Fn;
1058
+ return /* @__PURE__ */ l.jsx(
975
1059
  "div",
976
1060
  {
977
- "aria-hidden": !a || void 0,
1061
+ "data-active-step": i ? "true" : void 0,
1062
+ "aria-hidden": !i || void 0,
978
1063
  className: "w-full h-full",
979
- style: { display: a ? void 0 : "none" },
980
- children: Rn(
1064
+ style: { display: i ? void 0 : "none" },
1065
+ children: Gn(
981
1066
  e.elementList,
982
- a
1067
+ i
983
1068
  )
984
1069
  },
985
1070
  e.sourceStepIndexes[0] ?? t
@@ -988,111 +1073,111 @@ const _r = (v, p) => v.length === p.length && v.every((q, ie) => {
988
1073
  ) }) }) : null
989
1074
  }
990
1075
  ),
991
- ln ? /* @__PURE__ */ o.jsx(
992
- Wn,
1076
+ vn ? /* @__PURE__ */ l.jsx(
1077
+ ir,
993
1078
  {
994
- message: Cr(
995
- Zt,
996
- un
1079
+ message: Kr(
1080
+ dn,
1081
+ bn
997
1082
  ),
998
1083
  className: "absolute left-1/2 top-1/2 z-[3] -translate-x-1/2 -translate-y-1/2"
999
1084
  }
1000
1085
  ) : null,
1001
- /* @__PURE__ */ o.jsx(
1002
- nr,
1086
+ /* @__PURE__ */ l.jsx(
1087
+ fr,
1003
1088
  {
1004
- extraBottomOffset: dn,
1005
- hasPlayerGap: P,
1006
- isEnabled: wt && an,
1007
- isPlayerHidden: y && !P,
1008
- playbackTimeStore: Q,
1009
- subtitleCues: An
1089
+ extraBottomOffset: In,
1090
+ hasPlayerGap: x,
1091
+ isEnabled: Bt && gn,
1092
+ isPlayerHidden: h && !x,
1093
+ playbackTimeStore: le,
1094
+ subtitleCues: Bn
1010
1095
  }
1011
1096
  ),
1012
- tt ? /* @__PURE__ */ o.jsx(
1097
+ ut ? /* @__PURE__ */ l.jsx(
1013
1098
  "div",
1014
1099
  {
1015
- ref: mt,
1100
+ ref: xt,
1016
1101
  "data-player-keyboard-shortcuts-ignore": "true",
1017
- className: le(
1102
+ className: fe(
1018
1103
  "slide-interaction-overlay",
1019
- P && y ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
1104
+ x && h ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
1020
1105
  ),
1021
- onClick: Ut,
1022
- onPointerDown: Ut,
1023
- style: wn,
1024
- children: /* @__PURE__ */ o.jsx(
1025
- Jt,
1106
+ onClick: en,
1107
+ onPointerDown: en,
1108
+ style: On,
1109
+ children: /* @__PURE__ */ l.jsx(
1110
+ on,
1026
1111
  {
1027
- content: String(s?.content ?? ""),
1112
+ content: String(A?.content ?? ""),
1028
1113
  locale: p,
1029
- defaultButtonText: jt.buttonText ?? "",
1030
- defaultInputText: jt.inputText ?? "",
1031
- defaultSelectedValues: Tn,
1032
- confirmButtonText: W?.confirmButtonText ?? G.interactionTexts.confirmButtonText,
1033
- copyButtonText: W?.copyButtonText ?? G.interactionTexts.copyButtonText,
1034
- copiedButtonText: W?.copiedButtonText ?? G.interactionTexts.copiedButtonText,
1035
- onSend: En,
1036
- readonly: Kt,
1037
- title: W?.title ?? Ve ?? G.interactionTexts.title
1114
+ defaultButtonText: Xt.buttonText ?? "",
1115
+ defaultInputText: Xt.inputText ?? "",
1116
+ defaultSelectedValues: qn,
1117
+ confirmButtonText: ee?.confirmButtonText ?? $.interactionTexts.confirmButtonText,
1118
+ copyButtonText: ee?.copyButtonText ?? $.interactionTexts.copyButtonText,
1119
+ copiedButtonText: ee?.copiedButtonText ?? $.interactionTexts.copiedButtonText,
1120
+ onSend: Dn,
1121
+ readonly: Kn,
1122
+ title: ee?.title ?? $e ?? $.interactionTexts.title
1038
1123
  }
1039
1124
  )
1040
1125
  }
1041
1126
  ) : null,
1042
- y ? /* @__PURE__ */ o.jsx(
1043
- sr.Provider,
1127
+ h ? /* @__PURE__ */ l.jsx(
1128
+ hr.Provider,
1044
1129
  {
1045
- value: rn,
1046
- children: /* @__PURE__ */ o.jsx(
1047
- er,
1130
+ value: hn,
1131
+ children: /* @__PURE__ */ l.jsx(
1132
+ cr,
1048
1133
  {
1049
- audioList: b,
1050
- className: le(
1134
+ audioList: v,
1135
+ className: fe(
1051
1136
  "absolute left-1/2 z-[2] -translate-x-1/2",
1052
- _t ? "bottom-3" : "-bottom-3",
1053
- D,
1054
- !P && "pointer-events-none opacity-0"
1137
+ jt ? "bottom-3" : "-bottom-3",
1138
+ G,
1139
+ !x && "pointer-events-none opacity-0"
1055
1140
  ),
1056
- currentAudioIndex: I,
1057
- defaultPlaying: ye,
1058
- enableKeyboardShortcuts: $,
1059
- isPlaybackPaused: z,
1060
- isAutoAdvanceEnabled: Se,
1141
+ currentAudioIndex: w,
1142
+ defaultPlaying: Ye,
1143
+ enableKeyboardShortcuts: te,
1144
+ isPlaybackPaused: J,
1145
+ isAutoAdvanceEnabled: Ie,
1061
1146
  locale: p,
1062
- hasInteraction: !!s,
1063
- isInteractionOpen: ke,
1064
- isSubtitleEnabled: wt,
1065
- onAutoAdvanceToggle: It,
1066
- onLoadingChange: Nn,
1147
+ hasInteraction: !!A,
1148
+ isInteractionOpen: Ve,
1149
+ isSubtitleEnabled: Bt,
1150
+ onAutoAdvanceToggle: Mt,
1151
+ onLoadingChange: Wn,
1067
1152
  onPlaybackStarted: () => {
1068
- Re(!0);
1153
+ Le(!0);
1069
1154
  },
1070
- onPlaybackPreferenceChange: Cn,
1071
- onPlaybackTimeChange: Q.setTime,
1155
+ onPlaybackPreferenceChange: jn,
1156
+ onPlaybackTimeChange: le.setTime,
1072
1157
  onSubtitleToggle: () => {
1073
- cn((e) => !e);
1158
+ An((e) => !e);
1074
1159
  },
1075
1160
  nextDisabled: !C,
1076
- onEnded: On,
1077
- onFullscreen: kn,
1078
- isFullscreen: Pt,
1079
- mobileViewMode: Z,
1080
- settingsPortalContainer: dt.current,
1081
- onMobileViewModeChange: bn,
1082
- onControlsPointerEnter: jn,
1083
- onControlsPointerLeave: Vn,
1084
- onInteractionToggle: Ln,
1085
- onNext: Fn,
1086
- onPrev: Bn,
1087
- onSubtitleJump: Mn,
1088
- canJumpToSubtitleTarget: nt,
1089
- prevDisabled: !tn,
1090
- showControls: P,
1091
- subtitleSeekRequest: sn,
1092
- texts: Wt,
1093
- customActionContext: Qe,
1094
- customActions: J,
1095
- useAutoAdvanceToggle: xe
1161
+ onEnded: Yn,
1162
+ onFullscreen: Hn,
1163
+ isFullscreen: Ot,
1164
+ mobileViewMode: ie,
1165
+ settingsPortalContainer: At.current,
1166
+ onMobileViewModeChange: _n,
1167
+ onControlsPointerEnter: Qn,
1168
+ onControlsPointerLeave: Zn,
1169
+ onInteractionToggle: Xn,
1170
+ onNext: Jn,
1171
+ onPrev: zn,
1172
+ onSubtitleJump: $n,
1173
+ canJumpToSubtitleTarget: ct,
1174
+ prevDisabled: !mn,
1175
+ showControls: x,
1176
+ subtitleSeekRequest: Sn,
1177
+ texts: ln,
1178
+ customActionContext: lt,
1179
+ customActions: Q,
1180
+ useAutoAdvanceToggle: Ee
1096
1181
  }
1097
1182
  )
1098
1183
  }
@@ -1105,6 +1190,6 @@ const _r = (v, p) => v.length === p.length && v.every((q, ie) => {
1105
1190
  );
1106
1191
  };
1107
1192
  export {
1108
- co as default
1193
+ Co as default
1109
1194
  };
1110
1195
  //# sourceMappingURL=Slide.es.js.map