markdown-flow-ui 0.1.100-beta.47 → 0.1.100-beta.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/hast-util-to-jsx-runtime@2.3.6/node_modules/hast-util-to-jsx-runtime/lib/index.es.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-input@1.8.0_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-input/es/BaseInput.es.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/ResizableTextArea.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/ResizableTextArea.es.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/TextArea.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/TextArea.es.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/index.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/rc-textarea@1.10.2_react-dom@19.0.1_react@19.0.1__react@19.0.1/node_modules/rc-textarea/es/index.es.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/style-to-object@1.0.11/node_modules/style-to-object/cjs/index.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/style-to-object@1.0.11/node_modules/style-to-object/cjs/index.es.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.cjs.js +1 -1
- package/dist/Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/unified@11.0.5/node_modules/unified/lib/index.es.js +1 -1
- package/dist/_virtual/index.cjs4.js +1 -1
- package/dist/_virtual/index.cjs5.js +1 -1
- package/dist/_virtual/index.cjs6.js +1 -1
- package/dist/_virtual/index.cjs7.js +1 -1
- package/dist/_virtual/index.es4.js +4 -4
- package/dist/_virtual/index.es5.js +4 -4
- package/dist/_virtual/index.es6.js +2 -5
- package/dist/_virtual/index.es6.js.map +1 -1
- package/dist/_virtual/index.es7.js +5 -2
- package/dist/_virtual/index.es7.js.map +1 -1
- package/dist/components/ContentRender/plugins/CustomVariable.cjs.js +1 -1
- package/dist/components/ContentRender/plugins/CustomVariable.cjs.js.map +1 -1
- package/dist/components/ContentRender/plugins/CustomVariable.es.js +109 -105
- package/dist/components/ContentRender/plugins/CustomVariable.es.js.map +1 -1
- package/dist/components/Slide/Slide.cjs.js +1 -1
- package/dist/components/Slide/Slide.cjs.js.map +1 -1
- package/dist/components/Slide/Slide.es.js +159 -151
- package/dist/components/Slide/Slide.es.js.map +1 -1
- package/dist/components/ui/inputGroup/textarea.cjs.js +1 -1
- package/dist/components/ui/inputGroup/textarea.es.js +1 -1
- package/dist/lib/interaction-defaults.cjs.js +1 -1
- package/dist/lib/interaction-defaults.cjs.js.map +1 -1
- package/dist/lib/interaction-defaults.es.js +84 -58
- package/dist/lib/interaction-defaults.es.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as n } from "../../_virtual/jsx-runtime.es.js";
|
|
2
|
-
import { memo as lt, useRef as _, useMemo as c, useState as
|
|
2
|
+
import { memo as lt, useRef as _, useMemo as c, useState as R, useCallback as i, useEffect as m } from "react";
|
|
3
3
|
import { isSandboxInteractionMessage as st } from "../../lib/sandboxInteraction.es.js";
|
|
4
4
|
import { cn as Q } from "../../lib/utils.es.js";
|
|
5
5
|
import it from "../ContentRender/ContentRender.es.js";
|
|
@@ -12,32 +12,32 @@ import ft from "./useWakePlayerFromIframe.es.js";
|
|
|
12
12
|
import { getPlayerCustomActionCount as mt } from "./utils/playerCustomActions.es.js";
|
|
13
13
|
/* empty css */
|
|
14
14
|
import pt from "../../Documents/ai-shifu/markdown-flow-ui/node_modules/.pnpm/lucide-react@0.525.0_react@19.0.1/node_modules/lucide-react/dist/esm/icons/loader-circle.es.js";
|
|
15
|
-
const ht = 1e3,
|
|
15
|
+
const ht = 1e3, Fe = lt(
|
|
16
16
|
({
|
|
17
|
-
content:
|
|
18
|
-
title:
|
|
17
|
+
content: B,
|
|
18
|
+
title: C,
|
|
19
19
|
defaultButtonText: h,
|
|
20
20
|
defaultInputText: z,
|
|
21
21
|
defaultSelectedValues: I,
|
|
22
22
|
confirmButtonText: se,
|
|
23
23
|
copyButtonText: ie,
|
|
24
|
-
copiedButtonText:
|
|
24
|
+
copiedButtonText: j,
|
|
25
25
|
onSend: D,
|
|
26
|
-
readonly:
|
|
26
|
+
readonly: N = !1
|
|
27
27
|
}) => /* @__PURE__ */ n.jsxs("div", { className: "slide-player__interaction-card", children: [
|
|
28
|
-
/* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ n.jsx("p", { className: "slide-player__interaction-title", children:
|
|
28
|
+
/* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-header", children: /* @__PURE__ */ n.jsx("p", { className: "slide-player__interaction-title", children: C }) }),
|
|
29
29
|
/* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-body", children: /* @__PURE__ */ n.jsx(
|
|
30
30
|
it,
|
|
31
31
|
{
|
|
32
|
-
content:
|
|
32
|
+
content: B,
|
|
33
33
|
defaultButtonText: h,
|
|
34
34
|
defaultInputText: z,
|
|
35
35
|
defaultSelectedValues: I,
|
|
36
36
|
confirmButtonText: se,
|
|
37
37
|
copyButtonText: ie,
|
|
38
|
-
copiedButtonText:
|
|
38
|
+
copiedButtonText: j,
|
|
39
39
|
onSend: D,
|
|
40
|
-
readonly:
|
|
40
|
+
readonly: N,
|
|
41
41
|
enableTypewriter: !1,
|
|
42
42
|
sandboxMode: "content"
|
|
43
43
|
}
|
|
@@ -45,63 +45,63 @@ const ht = 1e3, Be = lt(
|
|
|
45
45
|
/* @__PURE__ */ n.jsx("div", { className: "slide-player__interaction-arrow" })
|
|
46
46
|
] })
|
|
47
47
|
);
|
|
48
|
-
|
|
49
|
-
const gt = (
|
|
50
|
-
const I =
|
|
48
|
+
Fe.displayName = "InteractionOverlayCard";
|
|
49
|
+
const gt = (B, C) => B.length === C.length && B.every((h, z) => {
|
|
50
|
+
const I = C[z];
|
|
51
51
|
return h.sequence_number === I?.sequence_number && h.type === I?.type && h.content === I?.content;
|
|
52
|
-
}),
|
|
53
|
-
elementList:
|
|
54
|
-
showPlayer:
|
|
52
|
+
}), Nt = ({
|
|
53
|
+
elementList: B = [],
|
|
54
|
+
showPlayer: C = !0,
|
|
55
55
|
playerAlwaysVisible: h = !1,
|
|
56
56
|
playerClassName: z,
|
|
57
57
|
playerCustomActions: I,
|
|
58
58
|
bufferingText: se = "Buffering...",
|
|
59
59
|
interactionTitle: ie,
|
|
60
|
-
interactionTexts:
|
|
60
|
+
interactionTexts: j,
|
|
61
61
|
playerAutoHideDelay: D = 3e3,
|
|
62
|
-
interactionDefaultValueOptions:
|
|
63
|
-
onSend:
|
|
62
|
+
interactionDefaultValueOptions: N,
|
|
63
|
+
onSend: me,
|
|
64
64
|
onPlayerVisibilityChange: ue,
|
|
65
|
-
onStepChange:
|
|
66
|
-
className:
|
|
67
|
-
onPointerDown:
|
|
68
|
-
...
|
|
65
|
+
onStepChange: pe,
|
|
66
|
+
className: Ke,
|
|
67
|
+
onPointerDown: he,
|
|
68
|
+
...ke
|
|
69
69
|
}) => {
|
|
70
|
-
const ae = _(null), ce = _(null),
|
|
70
|
+
const ae = _(null), ce = _(null), ge = _(null), V = _(null), W = _(null), G = _(null), xe = _([]), X = _(!1), F = _(null), {
|
|
71
71
|
currentElementList: b,
|
|
72
|
-
stepElementLists:
|
|
72
|
+
stepElementLists: ye,
|
|
73
73
|
slideElementList: K,
|
|
74
74
|
currentIndex: d,
|
|
75
75
|
audioList: y,
|
|
76
|
-
currentAudioSequenceIndexes:
|
|
76
|
+
currentAudioSequenceIndexes: ve,
|
|
77
77
|
currentStepHasSpeakableElement: A,
|
|
78
78
|
currentInteractionElement: u,
|
|
79
|
-
canGoPrev:
|
|
80
|
-
canGoNext:
|
|
79
|
+
canGoPrev: qe,
|
|
80
|
+
canGoNext: P,
|
|
81
81
|
handlePrev: Se,
|
|
82
82
|
handleNext: T
|
|
83
|
-
} = dt(
|
|
83
|
+
} = dt(B), Ie = c(() => {
|
|
84
84
|
if (!(d < 0))
|
|
85
85
|
return K[d];
|
|
86
|
-
}, [d, K]),
|
|
86
|
+
}, [d, K]), Le = K.filter(
|
|
87
87
|
(e) => e.is_renderable !== !1
|
|
88
|
-
).length === 1,
|
|
89
|
-
() =>
|
|
90
|
-
[y,
|
|
91
|
-
), [
|
|
88
|
+
).length === 1, v = C && (K.length > 0 || y.length > 0 || !!u), g = c(
|
|
89
|
+
() => ve.map((e) => y[e]?.audioKey).filter((e) => !!e),
|
|
90
|
+
[y, ve]
|
|
91
|
+
), [be, Z] = R(!0), [ee, Y] = R(!1), [S, k] = R(null), [Oe, p] = R(!1), [q, we] = R(!1), [o, te] = R(), [ne, J] = R(!1), L = v && (h || be), _e = c(
|
|
92
92
|
() => mt(I),
|
|
93
93
|
[I]
|
|
94
94
|
), Me = c(
|
|
95
95
|
() => ({
|
|
96
|
-
"--slide-player-custom-action-count": String(
|
|
96
|
+
"--slide-player-custom-action-count": String(_e)
|
|
97
97
|
}),
|
|
98
|
-
[
|
|
99
|
-
), { mountedStepStates:
|
|
98
|
+
[_e]
|
|
99
|
+
), { mountedStepStates: He, currentMountedStateIndex: $e } = c(() => {
|
|
100
100
|
const e = [], t = /* @__PURE__ */ new Map();
|
|
101
|
-
return
|
|
101
|
+
return ye.forEach((s, a) => {
|
|
102
102
|
const r = e.findIndex(
|
|
103
|
-
(
|
|
104
|
-
|
|
103
|
+
(l) => gt(
|
|
104
|
+
l.elementList,
|
|
105
105
|
s
|
|
106
106
|
)
|
|
107
107
|
);
|
|
@@ -117,95 +117,95 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
|
|
|
117
117
|
mountedStepStates: e,
|
|
118
118
|
currentMountedStateIndex: d >= 0 ? t.get(d) ?? -1 : -1
|
|
119
119
|
};
|
|
120
|
-
}, [d,
|
|
121
|
-
(e) => (e.audioKey ?? "") ===
|
|
122
|
-
) : -1, [y,
|
|
120
|
+
}, [d, ye]), Ae = c(() => String(d), [d]), de = c(() => S ? y.findIndex(
|
|
121
|
+
(e) => (e.audioKey ?? "") === S
|
|
122
|
+
) : -1, [y, S]), re = c(
|
|
123
123
|
() => g[0] ?? "none",
|
|
124
124
|
[g]
|
|
125
|
-
),
|
|
125
|
+
), Te = c(() => u ? `${u.sequence_number ?? "none"}:${String(
|
|
126
126
|
u.content ?? ""
|
|
127
|
-
)}` : "none", [u]),
|
|
128
|
-
() => [
|
|
129
|
-
[
|
|
130
|
-
),
|
|
127
|
+
)}` : "none", [u]), Ue = c(
|
|
128
|
+
() => [Ae, Te].join("|"),
|
|
129
|
+
[Te, Ae]
|
|
130
|
+
), O = !!c(() => !re || re === "none" ? "" : y.find(
|
|
131
131
|
(t) => t.audioKey === re
|
|
132
|
-
)?.audioUrl?.trim() ?? "", [y, re]),
|
|
132
|
+
)?.audioUrl?.trim() ?? "", [y, re]), E = i(() => {
|
|
133
133
|
V.current !== null && (window.clearTimeout(V.current), V.current = null);
|
|
134
134
|
}, []), w = i(() => {
|
|
135
135
|
G.current !== null && (window.clearTimeout(G.current), G.current = null);
|
|
136
|
-
}, []),
|
|
136
|
+
}, []), M = i(() => {
|
|
137
137
|
W.current !== null && (window.clearTimeout(W.current), W.current = null);
|
|
138
138
|
}, []), H = i(() => {
|
|
139
|
-
|
|
140
|
-
}, [
|
|
139
|
+
M(), w(), k(null), p(!1), we(!1), te(void 0), J(!1);
|
|
140
|
+
}, [M, w]), $ = i(() => {
|
|
141
141
|
const e = g[0];
|
|
142
142
|
return e ? (k(e), !0) : !1;
|
|
143
143
|
}, [g]), oe = i(() => {
|
|
144
|
-
w(), J(!1), !$() &&
|
|
144
|
+
w(), J(!1), !$() && P && T();
|
|
145
145
|
}, [
|
|
146
|
-
|
|
146
|
+
P,
|
|
147
147
|
w,
|
|
148
148
|
T,
|
|
149
149
|
$
|
|
150
150
|
]), f = i(
|
|
151
151
|
(e = ee) => {
|
|
152
|
-
|
|
152
|
+
v && (Z(!0), E(), !(h || !e || D <= 0) && (V.current = window.setTimeout(() => {
|
|
153
153
|
Z(!1), V.current = null;
|
|
154
154
|
}, D)));
|
|
155
155
|
},
|
|
156
156
|
[
|
|
157
|
-
|
|
157
|
+
E,
|
|
158
158
|
ee,
|
|
159
159
|
h,
|
|
160
160
|
D,
|
|
161
|
-
|
|
161
|
+
v
|
|
162
162
|
]
|
|
163
|
-
),
|
|
163
|
+
), fe = !!(u?.readonly || u?.user_input?.trim()), U = !!u && !fe;
|
|
164
164
|
m(() => () => {
|
|
165
|
-
|
|
165
|
+
M(), E(), w();
|
|
166
166
|
}, [
|
|
167
|
-
|
|
167
|
+
M,
|
|
168
168
|
w,
|
|
169
|
-
|
|
169
|
+
E
|
|
170
170
|
]), m(() => (ue?.(L), () => {
|
|
171
171
|
ue?.(!1);
|
|
172
172
|
}), [ue, L]), m(() => {
|
|
173
|
-
|
|
174
|
-
}, [d,
|
|
175
|
-
if (!
|
|
176
|
-
|
|
173
|
+
pe?.(Ie, d);
|
|
174
|
+
}, [d, Ie, pe]), m(() => {
|
|
175
|
+
if (!v) {
|
|
176
|
+
E(), Z(!1);
|
|
177
177
|
return;
|
|
178
178
|
}
|
|
179
179
|
if (h) {
|
|
180
|
-
|
|
180
|
+
E(), Z(!0);
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
183
|
ee || f(!0);
|
|
184
184
|
}, [
|
|
185
|
-
|
|
185
|
+
E,
|
|
186
186
|
ee,
|
|
187
187
|
h,
|
|
188
|
-
|
|
188
|
+
v,
|
|
189
189
|
f
|
|
190
190
|
]), m(() => {
|
|
191
191
|
if (typeof window > "u")
|
|
192
192
|
return;
|
|
193
193
|
const e = (t) => {
|
|
194
|
-
t.origin === window.location.origin && st(t.data) &&
|
|
194
|
+
t.origin === window.location.origin && st(t.data) && v && (Y(!0), f(!0));
|
|
195
195
|
};
|
|
196
196
|
return window.addEventListener("message", e), () => {
|
|
197
197
|
window.removeEventListener("message", e);
|
|
198
198
|
};
|
|
199
|
-
}, [
|
|
199
|
+
}, [v, f]), ft({
|
|
200
200
|
sectionRef: ae,
|
|
201
|
-
enabled:
|
|
201
|
+
enabled: v,
|
|
202
202
|
onWake: () => {
|
|
203
203
|
Y(!0), f(!0);
|
|
204
204
|
}
|
|
205
205
|
}), m(() => {
|
|
206
|
-
const e = F.current === d && !!u;
|
|
206
|
+
const e = F.current === d && !!u, t = !!u && (U || e || fe);
|
|
207
207
|
if (H(), !(b.length === 0 && !u)) {
|
|
208
|
-
if (
|
|
208
|
+
if (t) {
|
|
209
209
|
te(u), J(!0), F.current = null;
|
|
210
210
|
return;
|
|
211
211
|
}
|
|
@@ -214,22 +214,23 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
|
|
|
214
214
|
p(!0);
|
|
215
215
|
return;
|
|
216
216
|
}
|
|
217
|
-
if (
|
|
217
|
+
if (P)
|
|
218
218
|
return W.current = window.setTimeout(() => {
|
|
219
219
|
W.current = null, T();
|
|
220
220
|
}, ht), () => {
|
|
221
|
-
|
|
221
|
+
M();
|
|
222
222
|
};
|
|
223
223
|
}
|
|
224
224
|
}
|
|
225
225
|
}, [
|
|
226
|
-
|
|
227
|
-
|
|
226
|
+
P,
|
|
227
|
+
M,
|
|
228
228
|
b.length,
|
|
229
229
|
u,
|
|
230
|
-
|
|
230
|
+
Ue,
|
|
231
231
|
A,
|
|
232
232
|
T,
|
|
233
|
+
fe,
|
|
233
234
|
U,
|
|
234
235
|
H,
|
|
235
236
|
$
|
|
@@ -249,31 +250,38 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
|
|
|
249
250
|
q,
|
|
250
251
|
U
|
|
251
252
|
]), m(() => {
|
|
252
|
-
|
|
253
|
+
S || g.length === 0 || !A || U || q || $();
|
|
253
254
|
}, [
|
|
254
|
-
|
|
255
|
+
S,
|
|
255
256
|
g,
|
|
256
257
|
A,
|
|
257
258
|
q,
|
|
258
259
|
U,
|
|
259
260
|
$
|
|
260
261
|
]), m(() => {
|
|
261
|
-
!
|
|
262
|
-
}, [de,
|
|
263
|
-
|
|
264
|
-
}, [
|
|
265
|
-
const
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
262
|
+
!S || de >= 0 || k(null);
|
|
263
|
+
}, [de, S]), m(() => {
|
|
264
|
+
O && p(!1);
|
|
265
|
+
}, [O]);
|
|
266
|
+
const Pe = c(() => {
|
|
267
|
+
if (!o)
|
|
268
|
+
return {};
|
|
269
|
+
const e = !!o.user_input?.trim();
|
|
270
|
+
return ut(
|
|
271
|
+
typeof o.content == "string" ? o.content : void 0,
|
|
272
|
+
o.user_input,
|
|
273
|
+
e ? void 0 : N
|
|
274
|
+
);
|
|
275
|
+
}, [o, N]), ze = c(() => {
|
|
276
|
+
if (!o)
|
|
277
|
+
return;
|
|
278
|
+
const e = !!o.user_input?.trim();
|
|
279
|
+
return at(
|
|
280
|
+
typeof o.content == "string" ? o.content : void 0,
|
|
281
|
+
o.user_input,
|
|
282
|
+
e ? void 0 : N
|
|
283
|
+
);
|
|
284
|
+
}, [o, N]), Ee = !!o?.user_input?.trim(), Re = !!o?.readonly || Ee, Be = Re || Ee, De = i(
|
|
277
285
|
(e) => {
|
|
278
286
|
const s = [
|
|
279
287
|
...e.selectedValues ?? [],
|
|
@@ -283,12 +291,12 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
|
|
|
283
291
|
te((a) => !a || !s ? a : {
|
|
284
292
|
...a,
|
|
285
293
|
user_input: s
|
|
286
|
-
}),
|
|
294
|
+
}), me?.(e, o), oe();
|
|
287
295
|
},
|
|
288
|
-
[
|
|
296
|
+
[o, oe, me]
|
|
289
297
|
);
|
|
290
298
|
m(() => {
|
|
291
|
-
if (w(), !(!ne || !
|
|
299
|
+
if (w(), !(!ne || !Be))
|
|
292
300
|
return G.current = window.setTimeout(() => {
|
|
293
301
|
G.current = null, oe();
|
|
294
302
|
}, 2e3), () => {
|
|
@@ -298,7 +306,7 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
|
|
|
298
306
|
w,
|
|
299
307
|
oe,
|
|
300
308
|
ne,
|
|
301
|
-
|
|
309
|
+
Be
|
|
302
310
|
]);
|
|
303
311
|
const Ve = (e, t = {}) => e ? e.type === "slot" ? /* @__PURE__ */ n.jsx(n.Fragment, { children: e.content }) : e.type === "html" ? /* @__PURE__ */ n.jsx(
|
|
304
312
|
Ne,
|
|
@@ -325,15 +333,15 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
|
|
|
325
333
|
const s = e.filter(
|
|
326
334
|
(r) => r.is_renderable !== !1
|
|
327
335
|
).length, a = e.reduce(
|
|
328
|
-
(r,
|
|
336
|
+
(r, l, x) => l.is_renderable !== !1 ? x : r,
|
|
329
337
|
-1
|
|
330
338
|
);
|
|
331
|
-
return /* @__PURE__ */ n.jsx("div", { className: "slide-stage__content flex w-full flex-col gap-4", children: e.map((r,
|
|
339
|
+
return /* @__PURE__ */ n.jsx("div", { className: "slide-stage__content flex w-full flex-col gap-4", children: e.map((r, l) => {
|
|
332
340
|
const x = r.type === "html" && r.is_renderable === !1;
|
|
333
341
|
return /* @__PURE__ */ n.jsx(
|
|
334
342
|
"div",
|
|
335
343
|
{
|
|
336
|
-
ref: t &&
|
|
344
|
+
ref: t && l === a ? ge : null,
|
|
337
345
|
"aria-hidden": x || void 0,
|
|
338
346
|
className: Q(
|
|
339
347
|
"w-full shrink-0",
|
|
@@ -344,7 +352,7 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
|
|
|
344
352
|
replaceRootScreenHeightWithFull: s === 1 && r.type === "html" && r.is_renderable !== !1
|
|
345
353
|
})
|
|
346
354
|
},
|
|
347
|
-
r.sequence_number ?? `${r.type}-${
|
|
355
|
+
r.sequence_number ?? `${r.type}-${l}`
|
|
348
356
|
);
|
|
349
357
|
}) });
|
|
350
358
|
}, Ge = () => {
|
|
@@ -358,7 +366,7 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
|
|
|
358
366
|
e.requestFullscreen?.().catch(() => {
|
|
359
367
|
});
|
|
360
368
|
}
|
|
361
|
-
},
|
|
369
|
+
}, Ce = i(() => {
|
|
362
370
|
const e = ce.current;
|
|
363
371
|
e && e.scrollTo({
|
|
364
372
|
top: e.scrollHeight,
|
|
@@ -370,7 +378,7 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
|
|
|
370
378
|
X.current = !0, F.current = null, Y(!0), p(!1), f(!0), H(), T();
|
|
371
379
|
}, [T, H, f]), Qe = i(
|
|
372
380
|
(e) => {
|
|
373
|
-
if (
|
|
381
|
+
if (O) {
|
|
374
382
|
p(!1);
|
|
375
383
|
return;
|
|
376
384
|
}
|
|
@@ -383,15 +391,15 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
|
|
|
383
391
|
[
|
|
384
392
|
A,
|
|
385
393
|
q,
|
|
386
|
-
|
|
394
|
+
O
|
|
387
395
|
]
|
|
388
396
|
), Xe = i(
|
|
389
397
|
(e) => {
|
|
390
398
|
const t = y[e]?.audioKey;
|
|
391
|
-
if (!t || !
|
|
399
|
+
if (!t || !S || t !== S)
|
|
392
400
|
return;
|
|
393
401
|
const s = g.findIndex(
|
|
394
|
-
(
|
|
402
|
+
(l) => l === t
|
|
395
403
|
);
|
|
396
404
|
if (s < 0) {
|
|
397
405
|
k(null);
|
|
@@ -402,51 +410,51 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
|
|
|
402
410
|
k(r);
|
|
403
411
|
return;
|
|
404
412
|
}
|
|
405
|
-
if (k(null),
|
|
406
|
-
const
|
|
407
|
-
|
|
413
|
+
if (k(null), we(!0), p(!1), P) {
|
|
414
|
+
const l = d + 1, x = K[l];
|
|
415
|
+
O && x?.type === "interaction" && (F.current = l), T();
|
|
408
416
|
}
|
|
409
417
|
},
|
|
410
418
|
[
|
|
411
419
|
y,
|
|
412
|
-
|
|
420
|
+
P,
|
|
413
421
|
d,
|
|
414
|
-
|
|
422
|
+
S,
|
|
415
423
|
g,
|
|
416
424
|
T,
|
|
417
|
-
|
|
425
|
+
O,
|
|
418
426
|
K
|
|
419
427
|
]
|
|
420
428
|
), Ze = i(() => {
|
|
421
|
-
|
|
422
|
-
}, [
|
|
429
|
+
o && J((e) => !e);
|
|
430
|
+
}, [o]), je = i(
|
|
423
431
|
(e) => {
|
|
424
432
|
e.stopPropagation(), L && f(!0);
|
|
425
433
|
},
|
|
426
|
-
[
|
|
434
|
+
[be, f]
|
|
427
435
|
), et = i(
|
|
428
436
|
(e) => {
|
|
429
|
-
|
|
437
|
+
he?.(e), Y(!0), f(!0);
|
|
430
438
|
},
|
|
431
|
-
[
|
|
432
|
-
), tt = !!
|
|
439
|
+
[he, f]
|
|
440
|
+
), tt = !!o && ne, le = c(
|
|
433
441
|
() => b.map(
|
|
434
442
|
(e, t) => `${e.sequence_number ?? `${e.type}-${t}`}:${String(e.is_new ?? "")}`
|
|
435
443
|
),
|
|
436
444
|
[b]
|
|
437
445
|
);
|
|
438
446
|
return m(() => {
|
|
439
|
-
const e =
|
|
440
|
-
(
|
|
447
|
+
const e = xe.current, a = (e.length > 0 && e.length < le.length && e.every((l, x) => l === le[x]) ? b.slice(e.length) : []).some(
|
|
448
|
+
(l) => l.is_new === !1
|
|
441
449
|
);
|
|
442
|
-
if (
|
|
450
|
+
if (xe.current = le, !a)
|
|
443
451
|
return;
|
|
444
452
|
const r = window.requestAnimationFrame(() => {
|
|
445
|
-
const
|
|
446
|
-
if (!
|
|
453
|
+
const l = ce.current, x = ge.current;
|
|
454
|
+
if (!l || !x)
|
|
447
455
|
return;
|
|
448
|
-
const nt =
|
|
449
|
-
|
|
456
|
+
const nt = l.getBoundingClientRect(), rt = x.getBoundingClientRect(), ot = l.scrollTop + (rt.top - nt.top);
|
|
457
|
+
l.scrollTo({
|
|
450
458
|
top: Math.max(ot, 0),
|
|
451
459
|
behavior: "smooth"
|
|
452
460
|
});
|
|
@@ -458,29 +466,29 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
|
|
|
458
466
|
if (!X.current || (X.current = !1, b.length === 0))
|
|
459
467
|
return;
|
|
460
468
|
const e = window.requestAnimationFrame(() => {
|
|
461
|
-
|
|
469
|
+
Ce();
|
|
462
470
|
});
|
|
463
471
|
return () => {
|
|
464
472
|
window.cancelAnimationFrame(e);
|
|
465
473
|
};
|
|
466
|
-
}, [b,
|
|
474
|
+
}, [b, Ce]), /* @__PURE__ */ n.jsxs(
|
|
467
475
|
"section",
|
|
468
476
|
{
|
|
469
477
|
ref: ae,
|
|
470
|
-
className: Q("relative h-full w-full",
|
|
478
|
+
className: Q("relative h-full w-full", Ke),
|
|
471
479
|
onPointerDown: et,
|
|
472
|
-
...
|
|
480
|
+
...ke,
|
|
473
481
|
children: [
|
|
474
482
|
/* @__PURE__ */ n.jsx(
|
|
475
483
|
"div",
|
|
476
484
|
{
|
|
477
485
|
className: Q(
|
|
478
486
|
"h-full min-h-0 w-full",
|
|
479
|
-
|
|
487
|
+
Le ? "slide-content--single" : "grid gap-4"
|
|
480
488
|
),
|
|
481
|
-
children: b.length > 0 ? /* @__PURE__ */ n.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ n.jsx("div", { ref: ce, className: "slide-stage__layer w-full", children:
|
|
489
|
+
children: b.length > 0 ? /* @__PURE__ */ n.jsx("div", { className: "slide-stage", children: /* @__PURE__ */ n.jsx("div", { ref: ce, className: "slide-stage__layer w-full", children: He.map(
|
|
482
490
|
(e, t) => {
|
|
483
|
-
const s = t ===
|
|
491
|
+
const s = t === $e;
|
|
484
492
|
return /* @__PURE__ */ n.jsx(
|
|
485
493
|
"div",
|
|
486
494
|
{
|
|
@@ -498,7 +506,7 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
|
|
|
498
506
|
) }) }) : null
|
|
499
507
|
}
|
|
500
508
|
),
|
|
501
|
-
|
|
509
|
+
Oe ? /* @__PURE__ */ n.jsxs("div", { className: "pointer-events-none absolute left-1/2 top-1/2 z-[3] flex size-28 -translate-x-1/2 -translate-y-1/2 flex-col items-center justify-center gap-2 rounded-2xl bg-foreground/65 px-3 py-4 text-center text-xs leading-4 font-medium text-background shadow-lg backdrop-blur-sm", children: [
|
|
502
510
|
/* @__PURE__ */ n.jsx(pt, { className: "size-5 animate-spin text-background" }),
|
|
503
511
|
/* @__PURE__ */ n.jsx("span", { children: se })
|
|
504
512
|
] }) : null,
|
|
@@ -507,29 +515,29 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
|
|
|
507
515
|
{
|
|
508
516
|
className: Q(
|
|
509
517
|
"slide-interaction-overlay",
|
|
510
|
-
L &&
|
|
518
|
+
L && v ? "slide-interaction-overlay--with-player" : "slide-interaction-overlay--standalone"
|
|
511
519
|
),
|
|
512
520
|
onClick: je,
|
|
513
521
|
onPointerDown: je,
|
|
514
522
|
style: Me,
|
|
515
523
|
children: /* @__PURE__ */ n.jsx(
|
|
516
|
-
|
|
524
|
+
Fe,
|
|
517
525
|
{
|
|
518
|
-
content: String(
|
|
519
|
-
defaultButtonText:
|
|
520
|
-
defaultInputText:
|
|
526
|
+
content: String(o?.content ?? ""),
|
|
527
|
+
defaultButtonText: Pe.buttonText ?? "",
|
|
528
|
+
defaultInputText: Pe.inputText ?? "",
|
|
521
529
|
defaultSelectedValues: ze,
|
|
522
|
-
confirmButtonText:
|
|
523
|
-
copyButtonText:
|
|
524
|
-
copiedButtonText:
|
|
530
|
+
confirmButtonText: j?.confirmButtonText,
|
|
531
|
+
copyButtonText: j?.copyButtonText,
|
|
532
|
+
copiedButtonText: j?.copiedButtonText,
|
|
525
533
|
onSend: De,
|
|
526
|
-
readonly:
|
|
527
|
-
title:
|
|
534
|
+
readonly: Re,
|
|
535
|
+
title: j?.title ?? ie ?? "Submit the content below to continue."
|
|
528
536
|
}
|
|
529
537
|
)
|
|
530
538
|
}
|
|
531
539
|
) : null,
|
|
532
|
-
|
|
540
|
+
v ? /* @__PURE__ */ n.jsx(
|
|
533
541
|
ct,
|
|
534
542
|
{
|
|
535
543
|
audioList: y,
|
|
@@ -540,16 +548,16 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
|
|
|
540
548
|
),
|
|
541
549
|
currentAudioIndex: de,
|
|
542
550
|
defaultPlaying: !0,
|
|
543
|
-
hasInteraction: !!
|
|
551
|
+
hasInteraction: !!o,
|
|
544
552
|
isInteractionOpen: ne,
|
|
545
553
|
onLoadingChange: Qe,
|
|
546
|
-
nextDisabled: !
|
|
554
|
+
nextDisabled: !P,
|
|
547
555
|
onEnded: Xe,
|
|
548
556
|
onFullscreen: Ge,
|
|
549
557
|
onInteractionToggle: Ze,
|
|
550
558
|
onNext: Je,
|
|
551
559
|
onPrev: Ye,
|
|
552
|
-
prevDisabled: !
|
|
560
|
+
prevDisabled: !qe,
|
|
553
561
|
showControls: L,
|
|
554
562
|
customActions: I
|
|
555
563
|
}
|
|
@@ -559,6 +567,6 @@ const gt = (R, j) => R.length === j.length && R.every((h, z) => {
|
|
|
559
567
|
);
|
|
560
568
|
};
|
|
561
569
|
export {
|
|
562
|
-
|
|
570
|
+
Nt as default
|
|
563
571
|
};
|
|
564
572
|
//# sourceMappingURL=Slide.es.js.map
|