@zomako/elearning-components 2.0.4 → 2.0.5
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/elearning-components.css +1 -1
- package/dist/elearning-components.es.js +499 -369
- package/dist/elearning-components.umd.js +8 -8
- package/package.json +1 -1
- package/src/components/InteractiveTimeline/InteractiveTimeline.tsx +191 -0
- package/src/components/InteractiveTimeline/index.ts +5 -0
- package/src/components/InteractiveTimeline/style.module.css +211 -0
- package/src/index.ts +6 -1
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
function
|
|
5
|
-
if (
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
function E
|
|
9
|
-
var
|
|
10
|
-
|
|
11
|
-
for (
|
|
12
|
-
if (
|
|
13
|
-
return { $$typeof:
|
|
1
|
+
import Le, { useState as X, useId as _r, useCallback as A, useRef as De, useEffect as Ae } from "react";
|
|
2
|
+
var H = { exports: {} }, U = {};
|
|
3
|
+
var Fe;
|
|
4
|
+
function gr() {
|
|
5
|
+
if (Fe) return U;
|
|
6
|
+
Fe = 1;
|
|
7
|
+
var s = Le, _ = /* @__PURE__ */ Symbol.for("react.element"), y = /* @__PURE__ */ Symbol.for("react.fragment"), p = Object.prototype.hasOwnProperty, k = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, R = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
8
|
+
function x(E, o, u) {
|
|
9
|
+
var d, h = {}, T = null, C = null;
|
|
10
|
+
u !== void 0 && (T = "" + u), o.key !== void 0 && (T = "" + o.key), o.ref !== void 0 && (C = o.ref);
|
|
11
|
+
for (d in o) p.call(o, d) && !R.hasOwnProperty(d) && (h[d] = o[d]);
|
|
12
|
+
if (E && E.defaultProps) for (d in o = E.defaultProps, o) h[d] === void 0 && (h[d] = o[d]);
|
|
13
|
+
return { $$typeof: _, type: E, key: T, ref: C, props: h, _owner: k.current };
|
|
14
14
|
}
|
|
15
|
-
return
|
|
15
|
+
return U.Fragment = y, U.jsx = x, U.jsxs = x, U;
|
|
16
16
|
}
|
|
17
|
-
var
|
|
18
|
-
var
|
|
19
|
-
function
|
|
20
|
-
return
|
|
21
|
-
var
|
|
22
|
-
function
|
|
17
|
+
var V = {};
|
|
18
|
+
var Ie;
|
|
19
|
+
function br() {
|
|
20
|
+
return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
21
|
+
var s = Le, _ = /* @__PURE__ */ Symbol.for("react.element"), y = /* @__PURE__ */ Symbol.for("react.portal"), p = /* @__PURE__ */ Symbol.for("react.fragment"), k = /* @__PURE__ */ Symbol.for("react.strict_mode"), R = /* @__PURE__ */ Symbol.for("react.profiler"), x = /* @__PURE__ */ Symbol.for("react.provider"), E = /* @__PURE__ */ Symbol.for("react.context"), o = /* @__PURE__ */ Symbol.for("react.forward_ref"), u = /* @__PURE__ */ Symbol.for("react.suspense"), d = /* @__PURE__ */ Symbol.for("react.suspense_list"), h = /* @__PURE__ */ Symbol.for("react.memo"), T = /* @__PURE__ */ Symbol.for("react.lazy"), C = /* @__PURE__ */ Symbol.for("react.offscreen"), O = Symbol.iterator, F = "@@iterator";
|
|
22
|
+
function Z(e) {
|
|
23
23
|
if (e === null || typeof e != "object")
|
|
24
24
|
return null;
|
|
25
|
-
var r =
|
|
25
|
+
var r = O && e[O] || e[F];
|
|
26
26
|
return typeof r == "function" ? r : null;
|
|
27
27
|
}
|
|
28
|
-
var N =
|
|
29
|
-
function
|
|
28
|
+
var N = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
29
|
+
function n(e) {
|
|
30
30
|
{
|
|
31
|
-
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0),
|
|
32
|
-
t[
|
|
33
|
-
|
|
31
|
+
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), a = 1; a < r; a++)
|
|
32
|
+
t[a - 1] = arguments[a];
|
|
33
|
+
I("error", e, t);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function I(e, r, t) {
|
|
37
37
|
{
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
var
|
|
41
|
-
return String(
|
|
38
|
+
var a = N.ReactDebugCurrentFrame, f = a.getStackAddendum();
|
|
39
|
+
f !== "" && (r += "%s", t = t.concat([f]));
|
|
40
|
+
var v = t.map(function(l) {
|
|
41
|
+
return String(l);
|
|
42
42
|
});
|
|
43
|
-
|
|
43
|
+
v.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, v);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
var
|
|
47
|
-
|
|
48
|
-
function
|
|
49
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
46
|
+
var $ = !1, Q = !1, Ye = !1, We = !1, ze = !1, ce;
|
|
47
|
+
ce = /* @__PURE__ */ Symbol.for("react.module.reference");
|
|
48
|
+
function Me(e) {
|
|
49
|
+
return !!(typeof e == "string" || typeof e == "function" || e === p || e === R || ze || e === k || e === u || e === d || We || e === C || $ || Q || Ye || typeof e == "object" && e !== null && (e.$$typeof === T || e.$$typeof === h || e.$$typeof === x || e.$$typeof === E || e.$$typeof === o || // This needs to include all possible module reference object
|
|
50
50
|
// types supported by any Flight configuration anywhere since
|
|
51
51
|
// we don't know which Flight build this will end up being used
|
|
52
52
|
// with.
|
|
53
|
-
e.$$typeof ===
|
|
53
|
+
e.$$typeof === ce || e.getModuleId !== void 0));
|
|
54
54
|
}
|
|
55
|
-
function
|
|
56
|
-
var
|
|
57
|
-
if (
|
|
58
|
-
return
|
|
59
|
-
var
|
|
60
|
-
return
|
|
55
|
+
function Be(e, r, t) {
|
|
56
|
+
var a = e.displayName;
|
|
57
|
+
if (a)
|
|
58
|
+
return a;
|
|
59
|
+
var f = r.displayName || r.name || "";
|
|
60
|
+
return f !== "" ? t + "(" + f + ")" : t;
|
|
61
61
|
}
|
|
62
|
-
function
|
|
62
|
+
function le(e) {
|
|
63
63
|
return e.displayName || "Context";
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function D(e) {
|
|
66
66
|
if (e == null)
|
|
67
67
|
return null;
|
|
68
|
-
if (typeof e.tag == "number" &&
|
|
68
|
+
if (typeof e.tag == "number" && n("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
69
69
|
return e.displayName || e.name || null;
|
|
70
70
|
if (typeof e == "string")
|
|
71
71
|
return e;
|
|
72
72
|
switch (e) {
|
|
73
|
-
case
|
|
73
|
+
case p:
|
|
74
74
|
return "Fragment";
|
|
75
|
-
case
|
|
75
|
+
case y:
|
|
76
76
|
return "Portal";
|
|
77
|
-
case
|
|
77
|
+
case R:
|
|
78
78
|
return "Profiler";
|
|
79
|
-
case
|
|
79
|
+
case k:
|
|
80
80
|
return "StrictMode";
|
|
81
|
-
case
|
|
81
|
+
case u:
|
|
82
82
|
return "Suspense";
|
|
83
|
-
case
|
|
83
|
+
case d:
|
|
84
84
|
return "SuspenseList";
|
|
85
85
|
}
|
|
86
86
|
if (typeof e == "object")
|
|
87
87
|
switch (e.$$typeof) {
|
|
88
|
-
case R:
|
|
89
|
-
var r = e;
|
|
90
|
-
return te(r) + ".Consumer";
|
|
91
88
|
case E:
|
|
89
|
+
var r = e;
|
|
90
|
+
return le(r) + ".Consumer";
|
|
91
|
+
case x:
|
|
92
92
|
var t = e;
|
|
93
|
-
return
|
|
93
|
+
return le(t._context) + ".Provider";
|
|
94
94
|
case o:
|
|
95
|
-
return
|
|
95
|
+
return Be(e, e.render, "ForwardRef");
|
|
96
96
|
case h:
|
|
97
|
-
var
|
|
98
|
-
return
|
|
99
|
-
case
|
|
100
|
-
var
|
|
97
|
+
var a = e.displayName || null;
|
|
98
|
+
return a !== null ? a : D(e.type) || "Memo";
|
|
99
|
+
case T: {
|
|
100
|
+
var f = e, v = f._payload, l = f._init;
|
|
101
101
|
try {
|
|
102
|
-
return
|
|
102
|
+
return D(l(v));
|
|
103
103
|
} catch {
|
|
104
104
|
return null;
|
|
105
105
|
}
|
|
@@ -107,18 +107,18 @@ function gr() {
|
|
|
107
107
|
}
|
|
108
108
|
return null;
|
|
109
109
|
}
|
|
110
|
-
var
|
|
111
|
-
function
|
|
110
|
+
var L = Object.assign, M = 0, ue, fe, de, ve, pe, he, me;
|
|
111
|
+
function _e() {
|
|
112
112
|
}
|
|
113
|
-
|
|
113
|
+
_e.__reactDisabledLog = !0;
|
|
114
114
|
function Ue() {
|
|
115
115
|
{
|
|
116
|
-
if (
|
|
117
|
-
|
|
116
|
+
if (M === 0) {
|
|
117
|
+
ue = console.log, fe = console.info, de = console.warn, ve = console.error, pe = console.group, he = console.groupCollapsed, me = console.groupEnd;
|
|
118
118
|
var e = {
|
|
119
119
|
configurable: !0,
|
|
120
120
|
enumerable: !0,
|
|
121
|
-
value:
|
|
121
|
+
value: _e,
|
|
122
122
|
writable: !0
|
|
123
123
|
};
|
|
124
124
|
Object.defineProperties(console, {
|
|
@@ -131,250 +131,250 @@ function gr() {
|
|
|
131
131
|
groupEnd: e
|
|
132
132
|
});
|
|
133
133
|
}
|
|
134
|
-
|
|
134
|
+
M++;
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
function Ve() {
|
|
138
138
|
{
|
|
139
|
-
if (
|
|
139
|
+
if (M--, M === 0) {
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
143
143
|
writable: !0
|
|
144
144
|
};
|
|
145
145
|
Object.defineProperties(console, {
|
|
146
|
-
log:
|
|
147
|
-
value:
|
|
146
|
+
log: L({}, e, {
|
|
147
|
+
value: ue
|
|
148
148
|
}),
|
|
149
|
-
info:
|
|
150
|
-
value:
|
|
149
|
+
info: L({}, e, {
|
|
150
|
+
value: fe
|
|
151
151
|
}),
|
|
152
|
-
warn:
|
|
153
|
-
value:
|
|
152
|
+
warn: L({}, e, {
|
|
153
|
+
value: de
|
|
154
154
|
}),
|
|
155
|
-
error:
|
|
156
|
-
value:
|
|
155
|
+
error: L({}, e, {
|
|
156
|
+
value: ve
|
|
157
157
|
}),
|
|
158
|
-
group:
|
|
159
|
-
value:
|
|
158
|
+
group: L({}, e, {
|
|
159
|
+
value: pe
|
|
160
160
|
}),
|
|
161
|
-
groupCollapsed:
|
|
162
|
-
value:
|
|
161
|
+
groupCollapsed: L({}, e, {
|
|
162
|
+
value: he
|
|
163
163
|
}),
|
|
164
|
-
groupEnd:
|
|
165
|
-
value:
|
|
164
|
+
groupEnd: L({}, e, {
|
|
165
|
+
value: me
|
|
166
166
|
})
|
|
167
167
|
});
|
|
168
168
|
}
|
|
169
|
-
|
|
169
|
+
M < 0 && n("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
170
170
|
}
|
|
171
171
|
}
|
|
172
|
-
var
|
|
173
|
-
function
|
|
172
|
+
var ee = N.ReactCurrentDispatcher, re;
|
|
173
|
+
function q(e, r, t) {
|
|
174
174
|
{
|
|
175
|
-
if (
|
|
175
|
+
if (re === void 0)
|
|
176
176
|
try {
|
|
177
177
|
throw Error();
|
|
178
|
-
} catch (
|
|
179
|
-
var
|
|
180
|
-
|
|
178
|
+
} catch (f) {
|
|
179
|
+
var a = f.stack.trim().match(/\n( *(at )?)/);
|
|
180
|
+
re = a && a[1] || "";
|
|
181
181
|
}
|
|
182
182
|
return `
|
|
183
|
-
` +
|
|
183
|
+
` + re + e;
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
-
var
|
|
186
|
+
var te = !1, J;
|
|
187
187
|
{
|
|
188
|
-
var
|
|
189
|
-
|
|
188
|
+
var Xe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
189
|
+
J = new Xe();
|
|
190
190
|
}
|
|
191
|
-
function
|
|
192
|
-
if (!e ||
|
|
191
|
+
function ge(e, r) {
|
|
192
|
+
if (!e || te)
|
|
193
193
|
return "";
|
|
194
194
|
{
|
|
195
|
-
var t =
|
|
195
|
+
var t = J.get(e);
|
|
196
196
|
if (t !== void 0)
|
|
197
197
|
return t;
|
|
198
198
|
}
|
|
199
|
-
var
|
|
200
|
-
|
|
201
|
-
var
|
|
199
|
+
var a;
|
|
200
|
+
te = !0;
|
|
201
|
+
var f = Error.prepareStackTrace;
|
|
202
202
|
Error.prepareStackTrace = void 0;
|
|
203
|
-
var
|
|
204
|
-
|
|
203
|
+
var v;
|
|
204
|
+
v = ee.current, ee.current = null, Ue();
|
|
205
205
|
try {
|
|
206
206
|
if (r) {
|
|
207
|
-
var
|
|
207
|
+
var l = function() {
|
|
208
208
|
throw Error();
|
|
209
209
|
};
|
|
210
|
-
if (Object.defineProperty(
|
|
210
|
+
if (Object.defineProperty(l.prototype, "props", {
|
|
211
211
|
set: function() {
|
|
212
212
|
throw Error();
|
|
213
213
|
}
|
|
214
214
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
215
215
|
try {
|
|
216
|
-
Reflect.construct(
|
|
217
|
-
} catch (
|
|
218
|
-
|
|
216
|
+
Reflect.construct(l, []);
|
|
217
|
+
} catch (w) {
|
|
218
|
+
a = w;
|
|
219
219
|
}
|
|
220
|
-
Reflect.construct(e, [],
|
|
220
|
+
Reflect.construct(e, [], l);
|
|
221
221
|
} else {
|
|
222
222
|
try {
|
|
223
|
-
|
|
224
|
-
} catch (
|
|
225
|
-
|
|
223
|
+
l.call();
|
|
224
|
+
} catch (w) {
|
|
225
|
+
a = w;
|
|
226
226
|
}
|
|
227
|
-
e.call(
|
|
227
|
+
e.call(l.prototype);
|
|
228
228
|
}
|
|
229
229
|
} else {
|
|
230
230
|
try {
|
|
231
231
|
throw Error();
|
|
232
|
-
} catch (
|
|
233
|
-
|
|
232
|
+
} catch (w) {
|
|
233
|
+
a = w;
|
|
234
234
|
}
|
|
235
235
|
e();
|
|
236
236
|
}
|
|
237
|
-
} catch (
|
|
238
|
-
if (
|
|
239
|
-
for (var
|
|
240
|
-
`),
|
|
241
|
-
`),
|
|
242
|
-
|
|
243
|
-
for (;
|
|
244
|
-
if (
|
|
245
|
-
if (
|
|
237
|
+
} catch (w) {
|
|
238
|
+
if (w && a && typeof w.stack == "string") {
|
|
239
|
+
for (var c = w.stack.split(`
|
|
240
|
+
`), j = a.stack.split(`
|
|
241
|
+
`), m = c.length - 1, g = j.length - 1; m >= 1 && g >= 0 && c[m] !== j[g]; )
|
|
242
|
+
g--;
|
|
243
|
+
for (; m >= 1 && g >= 0; m--, g--)
|
|
244
|
+
if (c[m] !== j[g]) {
|
|
245
|
+
if (m !== 1 || g !== 1)
|
|
246
246
|
do
|
|
247
|
-
if (
|
|
248
|
-
var
|
|
249
|
-
` +
|
|
250
|
-
return e.displayName &&
|
|
247
|
+
if (m--, g--, g < 0 || c[m] !== j[g]) {
|
|
248
|
+
var S = `
|
|
249
|
+
` + c[m].replace(" at new ", " at ");
|
|
250
|
+
return e.displayName && S.includes("<anonymous>") && (S = S.replace("<anonymous>", e.displayName)), typeof e == "function" && J.set(e, S), S;
|
|
251
251
|
}
|
|
252
|
-
while (
|
|
252
|
+
while (m >= 1 && g >= 0);
|
|
253
253
|
break;
|
|
254
254
|
}
|
|
255
255
|
}
|
|
256
256
|
} finally {
|
|
257
|
-
|
|
257
|
+
te = !1, ee.current = v, Ve(), Error.prepareStackTrace = f;
|
|
258
258
|
}
|
|
259
|
-
var
|
|
260
|
-
return typeof e == "function" &&
|
|
259
|
+
var z = e ? e.displayName || e.name : "", Y = z ? q(z) : "";
|
|
260
|
+
return typeof e == "function" && J.set(e, Y), Y;
|
|
261
261
|
}
|
|
262
262
|
function qe(e, r, t) {
|
|
263
|
-
return
|
|
263
|
+
return ge(e, !1);
|
|
264
264
|
}
|
|
265
265
|
function Je(e) {
|
|
266
266
|
var r = e.prototype;
|
|
267
267
|
return !!(r && r.isReactComponent);
|
|
268
268
|
}
|
|
269
|
-
function
|
|
269
|
+
function G(e, r, t) {
|
|
270
270
|
if (e == null)
|
|
271
271
|
return "";
|
|
272
272
|
if (typeof e == "function")
|
|
273
|
-
return
|
|
273
|
+
return ge(e, Je(e));
|
|
274
274
|
if (typeof e == "string")
|
|
275
|
-
return
|
|
275
|
+
return q(e);
|
|
276
276
|
switch (e) {
|
|
277
|
+
case u:
|
|
278
|
+
return q("Suspense");
|
|
277
279
|
case d:
|
|
278
|
-
return
|
|
279
|
-
case c:
|
|
280
|
-
return L("SuspenseList");
|
|
280
|
+
return q("SuspenseList");
|
|
281
281
|
}
|
|
282
282
|
if (typeof e == "object")
|
|
283
283
|
switch (e.$$typeof) {
|
|
284
284
|
case o:
|
|
285
285
|
return qe(e.render);
|
|
286
286
|
case h:
|
|
287
|
-
return
|
|
288
|
-
case
|
|
289
|
-
var
|
|
287
|
+
return G(e.type, r, t);
|
|
288
|
+
case T: {
|
|
289
|
+
var a = e, f = a._payload, v = a._init;
|
|
290
290
|
try {
|
|
291
|
-
return
|
|
291
|
+
return G(v(f), r, t);
|
|
292
292
|
} catch {
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
return "";
|
|
297
297
|
}
|
|
298
|
-
var
|
|
299
|
-
function
|
|
298
|
+
var B = Object.prototype.hasOwnProperty, be = {}, ye = N.ReactDebugCurrentFrame;
|
|
299
|
+
function K(e) {
|
|
300
300
|
if (e) {
|
|
301
|
-
var r = e._owner, t =
|
|
302
|
-
|
|
301
|
+
var r = e._owner, t = G(e.type, e._source, r ? r.type : null);
|
|
302
|
+
ye.setExtraStackFrame(t);
|
|
303
303
|
} else
|
|
304
|
-
|
|
304
|
+
ye.setExtraStackFrame(null);
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function Ge(e, r, t, a, f) {
|
|
307
307
|
{
|
|
308
|
-
var
|
|
309
|
-
for (var
|
|
310
|
-
if (
|
|
311
|
-
var
|
|
308
|
+
var v = Function.call.bind(B);
|
|
309
|
+
for (var l in e)
|
|
310
|
+
if (v(e, l)) {
|
|
311
|
+
var c = void 0;
|
|
312
312
|
try {
|
|
313
|
-
if (typeof e[
|
|
314
|
-
var
|
|
315
|
-
throw
|
|
313
|
+
if (typeof e[l] != "function") {
|
|
314
|
+
var j = Error((a || "React class") + ": " + t + " type `" + l + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[l] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
315
|
+
throw j.name = "Invariant Violation", j;
|
|
316
316
|
}
|
|
317
|
-
|
|
318
|
-
} catch (
|
|
319
|
-
|
|
317
|
+
c = e[l](r, l, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
318
|
+
} catch (m) {
|
|
319
|
+
c = m;
|
|
320
320
|
}
|
|
321
|
-
|
|
321
|
+
c && !(c instanceof Error) && (K(f), n("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", t, l, typeof c), K(null)), c instanceof Error && !(c.message in be) && (be[c.message] = !0, K(f), n("Failed %s type: %s", t, c.message), K(null));
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
var
|
|
326
|
-
function
|
|
327
|
-
return
|
|
325
|
+
var Ke = Array.isArray;
|
|
326
|
+
function ne(e) {
|
|
327
|
+
return Ke(e);
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function He(e) {
|
|
330
330
|
{
|
|
331
331
|
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
332
332
|
return t;
|
|
333
333
|
}
|
|
334
334
|
}
|
|
335
|
-
function
|
|
335
|
+
function Ze(e) {
|
|
336
336
|
try {
|
|
337
|
-
return
|
|
337
|
+
return Ee(e), !1;
|
|
338
338
|
} catch {
|
|
339
339
|
return !0;
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
|
-
function
|
|
342
|
+
function Ee(e) {
|
|
343
343
|
return "" + e;
|
|
344
344
|
}
|
|
345
|
-
function
|
|
346
|
-
if (
|
|
347
|
-
return
|
|
345
|
+
function Re(e) {
|
|
346
|
+
if (Ze(e))
|
|
347
|
+
return n("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", He(e)), Ee(e);
|
|
348
348
|
}
|
|
349
|
-
var
|
|
349
|
+
var xe = N.ReactCurrentOwner, Qe = {
|
|
350
350
|
key: !0,
|
|
351
351
|
ref: !0,
|
|
352
352
|
__self: !0,
|
|
353
353
|
__source: !0
|
|
354
|
-
},
|
|
355
|
-
function
|
|
356
|
-
if (
|
|
354
|
+
}, je, ke;
|
|
355
|
+
function er(e) {
|
|
356
|
+
if (B.call(e, "ref")) {
|
|
357
357
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
358
358
|
if (r && r.isReactWarning)
|
|
359
359
|
return !1;
|
|
360
360
|
}
|
|
361
361
|
return e.ref !== void 0;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
364
|
-
if (
|
|
363
|
+
function rr(e) {
|
|
364
|
+
if (B.call(e, "key")) {
|
|
365
365
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
366
366
|
if (r && r.isReactWarning)
|
|
367
367
|
return !1;
|
|
368
368
|
}
|
|
369
369
|
return e.key !== void 0;
|
|
370
370
|
}
|
|
371
|
-
function
|
|
372
|
-
typeof e.ref == "string" &&
|
|
371
|
+
function tr(e, r) {
|
|
372
|
+
typeof e.ref == "string" && xe.current;
|
|
373
373
|
}
|
|
374
|
-
function
|
|
374
|
+
function nr(e, r) {
|
|
375
375
|
{
|
|
376
376
|
var t = function() {
|
|
377
|
-
|
|
377
|
+
je || (je = !0, n("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
378
378
|
};
|
|
379
379
|
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
380
380
|
get: t,
|
|
@@ -382,10 +382,10 @@ function gr() {
|
|
|
382
382
|
});
|
|
383
383
|
}
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function ar(e, r) {
|
|
386
386
|
{
|
|
387
387
|
var t = function() {
|
|
388
|
-
|
|
388
|
+
ke || (ke = !0, n("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
389
389
|
};
|
|
390
390
|
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
391
391
|
get: t,
|
|
@@ -393,70 +393,70 @@ function gr() {
|
|
|
393
393
|
});
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
var
|
|
397
|
-
var
|
|
396
|
+
var ir = function(e, r, t, a, f, v, l) {
|
|
397
|
+
var c = {
|
|
398
398
|
// This tag allows us to uniquely identify this as a React Element
|
|
399
|
-
$$typeof:
|
|
399
|
+
$$typeof: _,
|
|
400
400
|
// Built-in properties that belong on the element
|
|
401
401
|
type: e,
|
|
402
402
|
key: r,
|
|
403
403
|
ref: t,
|
|
404
|
-
props:
|
|
404
|
+
props: l,
|
|
405
405
|
// Record the component responsible for creating this element.
|
|
406
|
-
_owner:
|
|
406
|
+
_owner: v
|
|
407
407
|
};
|
|
408
|
-
return
|
|
408
|
+
return c._store = {}, Object.defineProperty(c._store, "validated", {
|
|
409
409
|
configurable: !1,
|
|
410
410
|
enumerable: !1,
|
|
411
411
|
writable: !0,
|
|
412
412
|
value: !1
|
|
413
|
-
}), Object.defineProperty(
|
|
413
|
+
}), Object.defineProperty(c, "_self", {
|
|
414
414
|
configurable: !1,
|
|
415
415
|
enumerable: !1,
|
|
416
416
|
writable: !1,
|
|
417
|
-
value:
|
|
418
|
-
}), Object.defineProperty(
|
|
417
|
+
value: a
|
|
418
|
+
}), Object.defineProperty(c, "_source", {
|
|
419
419
|
configurable: !1,
|
|
420
420
|
enumerable: !1,
|
|
421
421
|
writable: !1,
|
|
422
|
-
value:
|
|
423
|
-
}), Object.freeze && (Object.freeze(
|
|
422
|
+
value: f
|
|
423
|
+
}), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
|
|
424
424
|
};
|
|
425
|
-
function
|
|
425
|
+
function or(e, r, t, a, f) {
|
|
426
426
|
{
|
|
427
|
-
var
|
|
428
|
-
t !== void 0 && (
|
|
429
|
-
for (
|
|
430
|
-
|
|
427
|
+
var v, l = {}, c = null, j = null;
|
|
428
|
+
t !== void 0 && (Re(t), c = "" + t), rr(r) && (Re(r.key), c = "" + r.key), er(r) && (j = r.ref, tr(r, f));
|
|
429
|
+
for (v in r)
|
|
430
|
+
B.call(r, v) && !Qe.hasOwnProperty(v) && (l[v] = r[v]);
|
|
431
431
|
if (e && e.defaultProps) {
|
|
432
|
-
var
|
|
433
|
-
for (
|
|
434
|
-
|
|
432
|
+
var m = e.defaultProps;
|
|
433
|
+
for (v in m)
|
|
434
|
+
l[v] === void 0 && (l[v] = m[v]);
|
|
435
435
|
}
|
|
436
|
-
if (
|
|
437
|
-
var
|
|
438
|
-
|
|
436
|
+
if (c || j) {
|
|
437
|
+
var g = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
438
|
+
c && nr(l, g), j && ar(l, g);
|
|
439
439
|
}
|
|
440
|
-
return
|
|
440
|
+
return ir(e, c, j, f, a, xe.current, l);
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
var
|
|
444
|
-
function
|
|
443
|
+
var ae = N.ReactCurrentOwner, we = N.ReactDebugCurrentFrame;
|
|
444
|
+
function W(e) {
|
|
445
445
|
if (e) {
|
|
446
|
-
var r = e._owner, t =
|
|
447
|
-
|
|
446
|
+
var r = e._owner, t = G(e.type, e._source, r ? r.type : null);
|
|
447
|
+
we.setExtraStackFrame(t);
|
|
448
448
|
} else
|
|
449
|
-
|
|
449
|
+
we.setExtraStackFrame(null);
|
|
450
450
|
}
|
|
451
|
-
var
|
|
452
|
-
|
|
453
|
-
function
|
|
454
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
451
|
+
var ie;
|
|
452
|
+
ie = !1;
|
|
453
|
+
function oe(e) {
|
|
454
|
+
return typeof e == "object" && e !== null && e.$$typeof === _;
|
|
455
455
|
}
|
|
456
|
-
function
|
|
456
|
+
function Te() {
|
|
457
457
|
{
|
|
458
|
-
if (
|
|
459
|
-
var e =
|
|
458
|
+
if (ae.current) {
|
|
459
|
+
var e = D(ae.current.type);
|
|
460
460
|
if (e)
|
|
461
461
|
return `
|
|
462
462
|
|
|
@@ -465,13 +465,13 @@ Check the render method of \`` + e + "`.";
|
|
|
465
465
|
return "";
|
|
466
466
|
}
|
|
467
467
|
}
|
|
468
|
-
function
|
|
468
|
+
function sr(e) {
|
|
469
469
|
return "";
|
|
470
470
|
}
|
|
471
|
-
var
|
|
472
|
-
function
|
|
471
|
+
var Se = {};
|
|
472
|
+
function cr(e) {
|
|
473
473
|
{
|
|
474
|
-
var r =
|
|
474
|
+
var r = Te();
|
|
475
475
|
if (!r) {
|
|
476
476
|
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
477
477
|
t && (r = `
|
|
@@ -481,39 +481,39 @@ Check the top-level render call using <` + t + ">.");
|
|
|
481
481
|
return r;
|
|
482
482
|
}
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function Pe(e, r) {
|
|
485
485
|
{
|
|
486
486
|
if (!e._store || e._store.validated || e.key != null)
|
|
487
487
|
return;
|
|
488
488
|
e._store.validated = !0;
|
|
489
|
-
var t =
|
|
490
|
-
if (
|
|
489
|
+
var t = cr(r);
|
|
490
|
+
if (Se[t])
|
|
491
491
|
return;
|
|
492
|
-
|
|
493
|
-
var
|
|
494
|
-
e && e._owner && e._owner !==
|
|
492
|
+
Se[t] = !0;
|
|
493
|
+
var a = "";
|
|
494
|
+
e && e._owner && e._owner !== ae.current && (a = " It was passed a child from " + D(e._owner.type) + "."), W(e), n('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, a), W(null);
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function Ce(e, r) {
|
|
498
498
|
{
|
|
499
499
|
if (typeof e != "object")
|
|
500
500
|
return;
|
|
501
|
-
if (
|
|
501
|
+
if (ne(e))
|
|
502
502
|
for (var t = 0; t < e.length; t++) {
|
|
503
|
-
var
|
|
504
|
-
|
|
503
|
+
var a = e[t];
|
|
504
|
+
oe(a) && Pe(a, r);
|
|
505
505
|
}
|
|
506
|
-
else if (
|
|
506
|
+
else if (oe(e))
|
|
507
507
|
e._store && (e._store.validated = !0);
|
|
508
508
|
else if (e) {
|
|
509
|
-
var
|
|
510
|
-
if (typeof
|
|
511
|
-
for (var
|
|
512
|
-
|
|
509
|
+
var f = Z(e);
|
|
510
|
+
if (typeof f == "function" && f !== e.entries)
|
|
511
|
+
for (var v = f.call(e), l; !(l = v.next()).done; )
|
|
512
|
+
oe(l.value) && Pe(l.value, r);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function lr(e) {
|
|
517
517
|
{
|
|
518
518
|
var r = e.type;
|
|
519
519
|
if (r == null || typeof r == "string")
|
|
@@ -528,185 +528,185 @@ Check the top-level render call using <` + t + ">.");
|
|
|
528
528
|
else
|
|
529
529
|
return;
|
|
530
530
|
if (t) {
|
|
531
|
-
var
|
|
532
|
-
|
|
533
|
-
} else if (r.PropTypes !== void 0 && !
|
|
534
|
-
|
|
535
|
-
var
|
|
536
|
-
|
|
531
|
+
var a = D(r);
|
|
532
|
+
Ge(t, e.props, "prop", a, e);
|
|
533
|
+
} else if (r.PropTypes !== void 0 && !ie) {
|
|
534
|
+
ie = !0;
|
|
535
|
+
var f = D(r);
|
|
536
|
+
n("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", f || "Unknown");
|
|
537
537
|
}
|
|
538
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved &&
|
|
538
|
+
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && n("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
539
539
|
}
|
|
540
540
|
}
|
|
541
|
-
function
|
|
541
|
+
function ur(e) {
|
|
542
542
|
{
|
|
543
543
|
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
544
|
-
var
|
|
545
|
-
if (
|
|
546
|
-
|
|
544
|
+
var a = r[t];
|
|
545
|
+
if (a !== "children" && a !== "key") {
|
|
546
|
+
W(e), n("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", a), W(null);
|
|
547
547
|
break;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
e.ref !== null && (
|
|
550
|
+
e.ref !== null && (W(e), n("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
|
-
var
|
|
554
|
-
function
|
|
553
|
+
var Oe = {};
|
|
554
|
+
function Ne(e, r, t, a, f, v) {
|
|
555
555
|
{
|
|
556
|
-
var
|
|
557
|
-
if (!
|
|
558
|
-
var
|
|
559
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
560
|
-
var
|
|
561
|
-
|
|
562
|
-
var
|
|
563
|
-
e === null ?
|
|
556
|
+
var l = Me(e);
|
|
557
|
+
if (!l) {
|
|
558
|
+
var c = "";
|
|
559
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (c += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
560
|
+
var j = sr();
|
|
561
|
+
j ? c += j : c += Te();
|
|
562
|
+
var m;
|
|
563
|
+
e === null ? m = "null" : ne(e) ? m = "array" : e !== void 0 && e.$$typeof === _ ? (m = "<" + (D(e.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : m = typeof e, n("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", m, c);
|
|
564
564
|
}
|
|
565
|
-
var
|
|
566
|
-
if (
|
|
567
|
-
return
|
|
568
|
-
if (
|
|
569
|
-
var
|
|
570
|
-
if (
|
|
571
|
-
if (
|
|
572
|
-
if (
|
|
573
|
-
for (var
|
|
574
|
-
|
|
575
|
-
Object.freeze && Object.freeze(
|
|
565
|
+
var g = or(e, r, t, f, v);
|
|
566
|
+
if (g == null)
|
|
567
|
+
return g;
|
|
568
|
+
if (l) {
|
|
569
|
+
var S = r.children;
|
|
570
|
+
if (S !== void 0)
|
|
571
|
+
if (a)
|
|
572
|
+
if (ne(S)) {
|
|
573
|
+
for (var z = 0; z < S.length; z++)
|
|
574
|
+
Ce(S[z], e);
|
|
575
|
+
Object.freeze && Object.freeze(S);
|
|
576
576
|
} else
|
|
577
|
-
|
|
577
|
+
n("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
578
578
|
else
|
|
579
|
-
|
|
579
|
+
Ce(S, e);
|
|
580
580
|
}
|
|
581
|
-
if (
|
|
582
|
-
var
|
|
583
|
-
return
|
|
584
|
-
}),
|
|
585
|
-
if (!
|
|
586
|
-
var
|
|
587
|
-
|
|
581
|
+
if (B.call(r, "key")) {
|
|
582
|
+
var Y = D(e), w = Object.keys(r).filter(function(mr) {
|
|
583
|
+
return mr !== "key";
|
|
584
|
+
}), se = w.length > 0 ? "{key: someKey, " + w.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
585
|
+
if (!Oe[Y + se]) {
|
|
586
|
+
var hr = w.length > 0 ? "{" + w.join(": ..., ") + ": ...}" : "{}";
|
|
587
|
+
n(`A props object containing a "key" prop is being spread into JSX:
|
|
588
588
|
let props = %s;
|
|
589
589
|
<%s {...props} />
|
|
590
590
|
React keys must be passed directly to JSX without using spread:
|
|
591
591
|
let props = %s;
|
|
592
|
-
<%s key={someKey} {...props} />`,
|
|
592
|
+
<%s key={someKey} {...props} />`, se, Y, hr, Y), Oe[Y + se] = !0;
|
|
593
593
|
}
|
|
594
594
|
}
|
|
595
|
-
return e ===
|
|
595
|
+
return e === p ? ur(g) : lr(g), g;
|
|
596
596
|
}
|
|
597
597
|
}
|
|
598
|
-
function
|
|
599
|
-
return
|
|
598
|
+
function fr(e, r, t) {
|
|
599
|
+
return Ne(e, r, t, !0);
|
|
600
600
|
}
|
|
601
|
-
function
|
|
602
|
-
return
|
|
601
|
+
function dr(e, r, t) {
|
|
602
|
+
return Ne(e, r, t, !1);
|
|
603
603
|
}
|
|
604
|
-
var
|
|
605
|
-
|
|
606
|
-
})()),
|
|
604
|
+
var vr = dr, pr = fr;
|
|
605
|
+
V.Fragment = p, V.jsx = vr, V.jsxs = pr;
|
|
606
|
+
})()), V;
|
|
607
607
|
}
|
|
608
|
-
var
|
|
609
|
-
function
|
|
610
|
-
return
|
|
608
|
+
var $e;
|
|
609
|
+
function yr() {
|
|
610
|
+
return $e || ($e = 1, process.env.NODE_ENV === "production" ? H.exports = gr() : H.exports = br()), H.exports;
|
|
611
611
|
}
|
|
612
|
-
var
|
|
613
|
-
const
|
|
614
|
-
const [
|
|
615
|
-
if (!
|
|
616
|
-
return /* @__PURE__ */
|
|
617
|
-
const
|
|
618
|
-
|
|
612
|
+
var i = yr();
|
|
613
|
+
const Gr = ({ cards: s = [] }) => {
|
|
614
|
+
const [_, y] = X(0), [p, k] = X(!1);
|
|
615
|
+
if (!s || s.length === 0)
|
|
616
|
+
return /* @__PURE__ */ i.jsx("div", { className: "flashcard-deck-container", children: /* @__PURE__ */ i.jsx("p", { className: "flashcard-empty-message", children: "No cards available" }) });
|
|
617
|
+
const R = s[_], x = _ > 0, E = _ < s.length - 1, o = () => {
|
|
618
|
+
x && (y(_ - 1), k(!1));
|
|
619
|
+
}, u = () => {
|
|
620
|
+
E && (y(_ + 1), k(!1));
|
|
619
621
|
}, d = () => {
|
|
620
|
-
|
|
621
|
-
}, c = () => {
|
|
622
|
-
T(!y);
|
|
622
|
+
k(!p);
|
|
623
623
|
};
|
|
624
|
-
return /* @__PURE__ */
|
|
625
|
-
/* @__PURE__ */
|
|
624
|
+
return /* @__PURE__ */ i.jsxs("div", { className: "flashcard-deck-container", children: [
|
|
625
|
+
/* @__PURE__ */ i.jsx("div", { className: "flashcard-deck-header", children: /* @__PURE__ */ i.jsxs("span", { className: "flashcard-counter", children: [
|
|
626
626
|
"Card ",
|
|
627
|
-
|
|
627
|
+
_ + 1,
|
|
628
628
|
" of ",
|
|
629
|
-
|
|
629
|
+
s.length
|
|
630
630
|
] }) }),
|
|
631
|
-
/* @__PURE__ */
|
|
631
|
+
/* @__PURE__ */ i.jsx("div", { className: "flashcard-wrapper", children: /* @__PURE__ */ i.jsxs(
|
|
632
632
|
"div",
|
|
633
633
|
{
|
|
634
|
-
className: `flashcard ${
|
|
635
|
-
onClick:
|
|
634
|
+
className: `flashcard ${p ? "flashcard--flipped" : ""}`,
|
|
635
|
+
onClick: d,
|
|
636
636
|
children: [
|
|
637
|
-
/* @__PURE__ */
|
|
638
|
-
/* @__PURE__ */
|
|
637
|
+
/* @__PURE__ */ i.jsx("div", { className: "flashcard-face flashcard-front", children: /* @__PURE__ */ i.jsx("div", { className: "flashcard-content", children: R.front }) }),
|
|
638
|
+
/* @__PURE__ */ i.jsx("div", { className: "flashcard-face flashcard-back", children: /* @__PURE__ */ i.jsx("div", { className: "flashcard-content", children: R.back }) })
|
|
639
639
|
]
|
|
640
640
|
},
|
|
641
|
-
|
|
641
|
+
_
|
|
642
642
|
) }),
|
|
643
|
-
/* @__PURE__ */
|
|
644
|
-
/* @__PURE__ */
|
|
643
|
+
/* @__PURE__ */ i.jsxs("div", { className: "flashcard-controls", children: [
|
|
644
|
+
/* @__PURE__ */ i.jsx(
|
|
645
645
|
"button",
|
|
646
646
|
{
|
|
647
647
|
className: "flashcard-button flashcard-button-previous",
|
|
648
648
|
onClick: o,
|
|
649
|
-
disabled: !
|
|
649
|
+
disabled: !x,
|
|
650
650
|
"aria-label": "Previous card",
|
|
651
651
|
children: "Previous"
|
|
652
652
|
}
|
|
653
653
|
),
|
|
654
|
-
/* @__PURE__ */
|
|
654
|
+
/* @__PURE__ */ i.jsx(
|
|
655
655
|
"button",
|
|
656
656
|
{
|
|
657
657
|
className: "flashcard-button flashcard-button-next",
|
|
658
|
-
onClick:
|
|
659
|
-
disabled: !
|
|
658
|
+
onClick: u,
|
|
659
|
+
disabled: !E,
|
|
660
660
|
"aria-label": "Next card",
|
|
661
661
|
children: "Next"
|
|
662
662
|
}
|
|
663
663
|
)
|
|
664
664
|
] })
|
|
665
665
|
] });
|
|
666
|
-
},
|
|
667
|
-
accordion:
|
|
668
|
-
empty:
|
|
669
|
-
item:
|
|
670
|
-
heading:
|
|
671
|
-
trigger:
|
|
672
|
-
title:
|
|
673
|
-
icon:
|
|
674
|
-
panelWrapper:
|
|
675
|
-
panel:
|
|
676
|
-
content:
|
|
666
|
+
}, Er = "_accordion_1rfb4_1", Rr = "_empty_1rfb4_17", xr = "_item_1rfb4_31", jr = "_heading_1rfb4_73", kr = "_trigger_1rfb4_85", wr = "_title_1rfb4_145", Tr = "_icon_1rfb4_155", Sr = "_panelWrapper_1rfb4_187", Pr = "_panel_1rfb4_187", Cr = "_content_1rfb4_217", P = {
|
|
667
|
+
accordion: Er,
|
|
668
|
+
empty: Rr,
|
|
669
|
+
item: xr,
|
|
670
|
+
heading: jr,
|
|
671
|
+
trigger: kr,
|
|
672
|
+
title: wr,
|
|
673
|
+
icon: Tr,
|
|
674
|
+
panelWrapper: Sr,
|
|
675
|
+
panel: Pr,
|
|
676
|
+
content: Cr
|
|
677
677
|
};
|
|
678
|
-
function
|
|
679
|
-
return
|
|
678
|
+
function Or(s) {
|
|
679
|
+
return s == null ? /* @__PURE__ */ new Set() : typeof s == "string" ? /* @__PURE__ */ new Set([s]) : new Set(s);
|
|
680
680
|
}
|
|
681
|
-
const
|
|
682
|
-
items:
|
|
683
|
-
allowMultiple:
|
|
684
|
-
defaultOpenId:
|
|
681
|
+
const Kr = ({
|
|
682
|
+
items: s,
|
|
683
|
+
allowMultiple: _ = !1,
|
|
684
|
+
defaultOpenId: y
|
|
685
685
|
}) => {
|
|
686
|
-
const
|
|
686
|
+
const p = _r(), [k, R] = X(() => Or(y)), x = A(
|
|
687
687
|
(o) => {
|
|
688
|
-
|
|
689
|
-
const
|
|
690
|
-
return
|
|
688
|
+
R((u) => {
|
|
689
|
+
const d = new Set(u);
|
|
690
|
+
return d.has(o) ? d.delete(o) : (_ || d.clear(), d.add(o)), d;
|
|
691
691
|
});
|
|
692
692
|
},
|
|
693
|
-
[
|
|
694
|
-
),
|
|
695
|
-
(o,
|
|
693
|
+
[_]
|
|
694
|
+
), E = A(
|
|
695
|
+
(o, u) => {
|
|
696
696
|
const h = o.currentTarget.closest("[data-accordion]")?.querySelectorAll("[data-accordion-trigger]");
|
|
697
697
|
if (h?.length)
|
|
698
698
|
switch (o.key) {
|
|
699
699
|
case "Enter":
|
|
700
700
|
case " ":
|
|
701
|
-
o.preventDefault(),
|
|
701
|
+
o.preventDefault(), s[u] && x(s[u].id);
|
|
702
702
|
break;
|
|
703
703
|
case "ArrowDown":
|
|
704
704
|
case "ArrowRight":
|
|
705
|
-
o.preventDefault(),
|
|
705
|
+
o.preventDefault(), u < s.length - 1 && h[u + 1]?.focus();
|
|
706
706
|
break;
|
|
707
707
|
case "ArrowUp":
|
|
708
708
|
case "ArrowLeft":
|
|
709
|
-
o.preventDefault(),
|
|
709
|
+
o.preventDefault(), u > 0 && h[u - 1]?.focus();
|
|
710
710
|
break;
|
|
711
711
|
case "Home":
|
|
712
712
|
o.preventDefault(), h[0]?.focus();
|
|
@@ -716,50 +716,50 @@ const kr = ({
|
|
|
716
716
|
break;
|
|
717
717
|
}
|
|
718
718
|
},
|
|
719
|
-
[
|
|
719
|
+
[s, x]
|
|
720
720
|
);
|
|
721
|
-
return
|
|
721
|
+
return s?.length ? /* @__PURE__ */ i.jsx(
|
|
722
722
|
"div",
|
|
723
723
|
{
|
|
724
|
-
className:
|
|
724
|
+
className: P.accordion,
|
|
725
725
|
role: "region",
|
|
726
726
|
"aria-label": "Accordion",
|
|
727
727
|
"data-accordion": !0,
|
|
728
|
-
children:
|
|
729
|
-
const
|
|
730
|
-
return /* @__PURE__ */
|
|
728
|
+
children: s.map((o, u) => {
|
|
729
|
+
const d = k.has(o.id), h = `${p}-header-${u}`, T = `${p}-panel-${u}`;
|
|
730
|
+
return /* @__PURE__ */ i.jsxs(
|
|
731
731
|
"div",
|
|
732
732
|
{
|
|
733
|
-
className:
|
|
734
|
-
"data-open":
|
|
733
|
+
className: P.item,
|
|
734
|
+
"data-open": d,
|
|
735
735
|
children: [
|
|
736
|
-
/* @__PURE__ */
|
|
736
|
+
/* @__PURE__ */ i.jsx("h3", { className: P.heading, children: /* @__PURE__ */ i.jsxs(
|
|
737
737
|
"button",
|
|
738
738
|
{
|
|
739
739
|
type: "button",
|
|
740
740
|
id: h,
|
|
741
|
-
className:
|
|
742
|
-
"aria-expanded":
|
|
743
|
-
"aria-controls":
|
|
741
|
+
className: P.trigger,
|
|
742
|
+
"aria-expanded": d,
|
|
743
|
+
"aria-controls": T,
|
|
744
744
|
"data-accordion-trigger": !0,
|
|
745
|
-
onClick: () =>
|
|
746
|
-
onKeyDown: (
|
|
745
|
+
onClick: () => x(o.id),
|
|
746
|
+
onKeyDown: (C) => E(C, u),
|
|
747
747
|
children: [
|
|
748
|
-
/* @__PURE__ */
|
|
749
|
-
/* @__PURE__ */
|
|
748
|
+
/* @__PURE__ */ i.jsx("span", { className: P.title, children: o.title }),
|
|
749
|
+
/* @__PURE__ */ i.jsx("span", { className: P.icon, "aria-hidden": !0, children: "▼" })
|
|
750
750
|
]
|
|
751
751
|
}
|
|
752
752
|
) }),
|
|
753
|
-
/* @__PURE__ */
|
|
753
|
+
/* @__PURE__ */ i.jsx(
|
|
754
754
|
"div",
|
|
755
755
|
{
|
|
756
|
-
id:
|
|
756
|
+
id: T,
|
|
757
757
|
role: "region",
|
|
758
758
|
"aria-labelledby": h,
|
|
759
|
-
"aria-hidden": !
|
|
760
|
-
className:
|
|
761
|
-
"data-open":
|
|
762
|
-
children: /* @__PURE__ */
|
|
759
|
+
"aria-hidden": !d,
|
|
760
|
+
className: P.panelWrapper,
|
|
761
|
+
"data-open": d,
|
|
762
|
+
children: /* @__PURE__ */ i.jsx("div", { className: P.panel, children: /* @__PURE__ */ i.jsx("div", { className: P.content, children: o.content }) })
|
|
763
763
|
}
|
|
764
764
|
)
|
|
765
765
|
]
|
|
@@ -768,9 +768,139 @@ const kr = ({
|
|
|
768
768
|
);
|
|
769
769
|
})
|
|
770
770
|
}
|
|
771
|
-
) : /* @__PURE__ */
|
|
771
|
+
) : /* @__PURE__ */ i.jsx("div", { className: P.accordion, role: "region", "aria-label": "Accordion", children: /* @__PURE__ */ i.jsx("p", { className: P.empty, children: "No items to display." }) });
|
|
772
|
+
}, Nr = "_wrapper_ip42z_3", Dr = "_contentPanel_ip42z_39", Ar = "_contentSlide_ip42z_57", Fr = "_contentYear_ip42z_87", Ir = "_contentTitle_ip42z_107", $r = "_contentBody_ip42z_123", Lr = "_timelineSection_ip42z_153", Yr = "_navButton_ip42z_165", Wr = "_track_ip42z_223", zr = "_dragging_ip42z_247", Mr = "_trackInner_ip42z_283", Br = "_marker_ip42z_299", Ur = "_markerActive_ip42z_347", Vr = "_markerYear_ip42z_375", Xr = "_markerTitle_ip42z_387", qr = "_empty_ip42z_409", b = {
|
|
773
|
+
wrapper: Nr,
|
|
774
|
+
contentPanel: Dr,
|
|
775
|
+
contentSlide: Ar,
|
|
776
|
+
contentYear: Fr,
|
|
777
|
+
contentTitle: Ir,
|
|
778
|
+
contentBody: $r,
|
|
779
|
+
timelineSection: Lr,
|
|
780
|
+
navButton: Yr,
|
|
781
|
+
track: Wr,
|
|
782
|
+
dragging: zr,
|
|
783
|
+
trackInner: Mr,
|
|
784
|
+
marker: Br,
|
|
785
|
+
markerActive: Ur,
|
|
786
|
+
markerYear: Vr,
|
|
787
|
+
markerTitle: Xr,
|
|
788
|
+
empty: qr
|
|
789
|
+
}, Hr = ({
|
|
790
|
+
events: s,
|
|
791
|
+
defaultActiveId: _
|
|
792
|
+
}) => {
|
|
793
|
+
const y = De(null), [p, k] = X(() => _ && s.some((n) => n.id === _) ? _ : s.length > 0 ? s[0].id : null), [R, x] = X(!1), E = De({ startX: 0, scrollLeft: 0 }), o = s.find((n) => n.id === p) ?? s[0], u = s.findIndex((n) => n.id === p), d = A(
|
|
794
|
+
(n) => {
|
|
795
|
+
k(n);
|
|
796
|
+
},
|
|
797
|
+
[]
|
|
798
|
+
), h = A(() => {
|
|
799
|
+
u > 0 && k(s[u - 1].id);
|
|
800
|
+
}, [u, s]), T = A(() => {
|
|
801
|
+
u < s.length - 1 && u >= 0 && k(s[u + 1].id);
|
|
802
|
+
}, [u, s]), C = A(
|
|
803
|
+
(n) => {
|
|
804
|
+
if (!y.current || n.target.closest(`.${b.marker}`)) return;
|
|
805
|
+
const $ = "touches" in n ? n.touches[0].clientX : n.clientX;
|
|
806
|
+
x(!0), E.current = {
|
|
807
|
+
startX: $,
|
|
808
|
+
scrollLeft: y.current.scrollLeft
|
|
809
|
+
};
|
|
810
|
+
},
|
|
811
|
+
[]
|
|
812
|
+
), O = A(
|
|
813
|
+
(n) => {
|
|
814
|
+
if (!R || !y.current) return;
|
|
815
|
+
n.preventDefault();
|
|
816
|
+
const I = "touches" in n ? n.touches[0].clientX : n.clientX, $ = E.current.startX - I;
|
|
817
|
+
y.current.scrollLeft = E.current.scrollLeft + $;
|
|
818
|
+
},
|
|
819
|
+
[R]
|
|
820
|
+
), F = A(() => {
|
|
821
|
+
x(!1);
|
|
822
|
+
}, []);
|
|
823
|
+
if (Ae(() => {
|
|
824
|
+
if (R)
|
|
825
|
+
return window.addEventListener("mousemove", O, { passive: !1 }), window.addEventListener("mouseup", F), window.addEventListener("touchmove", O, { passive: !1 }), window.addEventListener("touchend", F), () => {
|
|
826
|
+
window.removeEventListener("mousemove", O), window.removeEventListener("mouseup", F), window.removeEventListener("touchmove", O), window.removeEventListener("touchend", F);
|
|
827
|
+
};
|
|
828
|
+
}, [R, O, F]), Ae(() => {
|
|
829
|
+
if (!y.current || !p) return;
|
|
830
|
+
const n = y.current.querySelector(
|
|
831
|
+
`[data-event-id="${p}"]`
|
|
832
|
+
);
|
|
833
|
+
if (n) {
|
|
834
|
+
const I = y.current, $ = I.clientWidth / 2, Q = n.offsetLeft - $ + n.offsetWidth / 2;
|
|
835
|
+
I.scrollTo({
|
|
836
|
+
left: Math.max(0, Q),
|
|
837
|
+
behavior: "smooth"
|
|
838
|
+
});
|
|
839
|
+
}
|
|
840
|
+
}, [p]), !s || s.length === 0)
|
|
841
|
+
return /* @__PURE__ */ i.jsx("div", { className: b.wrapper, children: /* @__PURE__ */ i.jsx("p", { className: b.empty, children: "No events to display." }) });
|
|
842
|
+
const Z = u > 0, N = u >= 0 && u < s.length - 1;
|
|
843
|
+
return /* @__PURE__ */ i.jsxs("div", { className: b.wrapper, children: [
|
|
844
|
+
/* @__PURE__ */ i.jsx("div", { className: b.contentPanel, children: /* @__PURE__ */ i.jsx("div", { className: b.contentSlide, children: o && /* @__PURE__ */ i.jsxs(i.Fragment, { children: [
|
|
845
|
+
/* @__PURE__ */ i.jsx("span", { className: b.contentYear, children: o.year }),
|
|
846
|
+
/* @__PURE__ */ i.jsx("h2", { className: b.contentTitle, children: o.title }),
|
|
847
|
+
/* @__PURE__ */ i.jsx("div", { className: b.contentBody, children: o.content })
|
|
848
|
+
] }) }, p) }),
|
|
849
|
+
/* @__PURE__ */ i.jsxs("div", { className: b.timelineSection, children: [
|
|
850
|
+
/* @__PURE__ */ i.jsx(
|
|
851
|
+
"button",
|
|
852
|
+
{
|
|
853
|
+
type: "button",
|
|
854
|
+
className: b.navButton,
|
|
855
|
+
onClick: h,
|
|
856
|
+
disabled: !Z,
|
|
857
|
+
"aria-label": "Previous event",
|
|
858
|
+
children: "‹"
|
|
859
|
+
}
|
|
860
|
+
),
|
|
861
|
+
/* @__PURE__ */ i.jsx(
|
|
862
|
+
"div",
|
|
863
|
+
{
|
|
864
|
+
ref: y,
|
|
865
|
+
className: `${b.track} ${R ? b.dragging : ""}`,
|
|
866
|
+
onMouseDown: C,
|
|
867
|
+
onTouchStart: C,
|
|
868
|
+
role: "list",
|
|
869
|
+
"aria-label": "Timeline events",
|
|
870
|
+
children: /* @__PURE__ */ i.jsx("div", { className: b.trackInner, children: s.map((n) => /* @__PURE__ */ i.jsxs(
|
|
871
|
+
"button",
|
|
872
|
+
{
|
|
873
|
+
type: "button",
|
|
874
|
+
"data-event-id": n.id,
|
|
875
|
+
className: `${b.marker} ${n.id === p ? b.markerActive : ""}`,
|
|
876
|
+
onClick: () => d(n.id),
|
|
877
|
+
"aria-pressed": n.id === p,
|
|
878
|
+
"aria-label": `${n.year}: ${n.title}`,
|
|
879
|
+
children: [
|
|
880
|
+
/* @__PURE__ */ i.jsx("span", { className: b.markerYear, children: n.year }),
|
|
881
|
+
/* @__PURE__ */ i.jsx("span", { className: b.markerTitle, children: n.title })
|
|
882
|
+
]
|
|
883
|
+
},
|
|
884
|
+
n.id
|
|
885
|
+
)) })
|
|
886
|
+
}
|
|
887
|
+
),
|
|
888
|
+
/* @__PURE__ */ i.jsx(
|
|
889
|
+
"button",
|
|
890
|
+
{
|
|
891
|
+
type: "button",
|
|
892
|
+
className: b.navButton,
|
|
893
|
+
onClick: T,
|
|
894
|
+
disabled: !N,
|
|
895
|
+
"aria-label": "Next event",
|
|
896
|
+
children: "›"
|
|
897
|
+
}
|
|
898
|
+
)
|
|
899
|
+
] })
|
|
900
|
+
] });
|
|
772
901
|
};
|
|
773
902
|
export {
|
|
774
|
-
|
|
775
|
-
|
|
903
|
+
Kr as Accordion,
|
|
904
|
+
Gr as FlashcardDeck,
|
|
905
|
+
Hr as InteractiveTimeline
|
|
776
906
|
};
|