mario-teacher-student-client 2.2.11-release → 2.2.12-release

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.
@@ -0,0 +1,4327 @@
1
+ import { jsxs as w, jsx as o, Fragment as aa } from "react/jsx-runtime";
2
+ import { useState as q, useRef as it, useCallback as na, useEffect as _e, useMemo as je, Fragment as ht, memo as ra } from "react";
3
+ import { s as g } from "./plp.module-BzFzQk1L.js";
4
+ import { u as Ln } from "./useChartOneToOne-oJwZFycq.js";
5
+ import { a as Pn, b as Mn, c as An, d as On, u as Hn, S as ia } from "./StudentPressureChart-1zrgcnA8.js";
6
+ import { useDispatch as ut, useSelector as Le } from "react-redux";
7
+ import { setAlert as pe, initAmplitude as Rn, useTranslation as ve, getFileUrl as st, getStaticFileUrl as ot, setLoading as Ae, utcToLocalTime as sa } from "mario-core";
8
+ import { G as zt } from "./constantsLearning-BGD8JbLv.js";
9
+ import G from "moment";
10
+ import { a8 as In, a9 as zn, g as Bn, aa as En, ab as Yn, ac as jn, ad as Un, ae as oa, af as qn } from "./MyStudent-B4O9AlQs.js";
11
+ import { useNavigate as Qn } from "react-router-dom";
12
+ import { c as la, I as Bt, i as Et, b as ze, f as Me, a as et, e as $t, h as Re, j as da, k as ca, l as Vn, m as ha, o as Gn, r as ua, C as Yt, s as tt, n as bt, p as at, t as jt, q as Jn } from "./constant-CXFGaEII.js";
13
+ import { u as Kn } from "./useStudentList-CPg6JEoj.js";
14
+ import { Grid as S, FormControl as ga, InputLabel as ma, Select as fa, MenuItem as pa, Checkbox as va, ListItemText as ya, Button as Tt, Typography as K, Accordion as Xn, AccordionSummary as Zn, AccordionDetails as er, Box as rt, LinearProgress as tr, Table as lt, TableHead as Sa, TableRow as Ee, TableCell as ge, TableSortLabel as xt, TableBody as Ca, Popover as ar } from "@mui/material";
15
+ import { A as nr } from "./ArrowDropDown-n7GwyJ4U.js";
16
+ import { S as wa } from "./StudentMultiSelector-Bj6MKHmQ.js";
17
+ import { C as rr } from "./Clear-BRALrnl7.js";
18
+ import { C as Wt } from "./CalendarSelect-BPY7n2p2.js";
19
+ import { F as ba } from "./FilterDateRange-Df3VOcxg.js";
20
+ import { A as xa } from "./AutocompleteField-Bgk9My_t.js";
21
+ import { u as ir } from "./useAutoCompleteStyle-CL_ULKu3.js";
22
+ import { E as sr } from "./ExpandMore-DsHMn6AM.js";
23
+ import { G as be, a as Da, u as or, f as lr, T as nt, g as dr } from "./GenerateTrendQuestion-BvTAX5cF.js";
24
+ import { s as cr } from "./styled-CzsEt7al.js";
25
+ import { A as hr } from "./ArrowRightIcon-gBYRjS1Q.js";
26
+ import { S as _a } from "./SimpleDialog-Bp-mjW0P.js";
27
+ import { L as Oe } from "./Loading-9Xhwui4j.js";
28
+ import { r as Ut } from "./constantsFn-C9OIbD7i.js";
29
+ import { B as Fa } from "./BubbleChartCustom-4hRwc_ZC.js";
30
+ import { A as At } from "./ArrowForward-C3EcamfR.js";
31
+ import { L as ur, Q as Dt } from "./types-nDoTEIhd.js";
32
+ import { A as gr } from "./ArrowUpward-BGzXxprs.js";
33
+ import { A as mr } from "./ArrowDownward-B-h6hrvY.js";
34
+ import { u as fr } from "./useFontStyles-KKLzbYUX.js";
35
+ import { Button as Na, Modal as pr, ModalHeader as vr, ModalBody as yr, FormGroup as Sr, Input as Cr, Label as wr, ModalFooter as br } from "reactstrap";
36
+ import { s as qt } from "./dashboard.module-DFtlVjy0.js";
37
+ import xr from "jspdf";
38
+ import De from "html2canvas";
39
+ import { o as Be, q as Dr, r as _r, z as Qt } from "./utils-DZF9RdS_.js";
40
+ import Fr from "axios";
41
+ import { D as Nr } from "./constants-jQb--ivI.js";
42
+ import { N as kr } from "./NoteDetail-Cj8QeeTR.js";
43
+ const $r = (t, e, n, a, r) => {
44
+ const i = ut(), l = Le(
45
+ ($) => $?.common?.user.roles
46
+ ), [d, c] = q([]), [s, u] = q([]), [m, v] = q([]), [b, N] = q([]), [D, x] = q([]), [_, T] = q(0);
47
+ return {
48
+ getMetricData: async () => {
49
+ r && r(($) => ({ ...$, metricData: !1 }));
50
+ try {
51
+ const M = (await In({
52
+ startDate: e.startDate,
53
+ endDate: e.endDate,
54
+ optionDate: e?.optionDate || "",
55
+ studentId: t,
56
+ grade: n || [],
57
+ roles: l,
58
+ academicYearId: a
59
+ })).data || [];
60
+ c(M?.weeks || []), u(M?.months || []), v(M?.metricWeekData || []), N(M?.metricMonthData || []), x(M?.lowMetricStudents || []), T(M?.studentMetricPercent || 0);
61
+ } catch ($) {
62
+ i(
63
+ pe({
64
+ type: "danger",
65
+ message: $.response?.data?.title || $.message
66
+ })
67
+ );
68
+ }
69
+ r && r(($) => ({ ...$, metricData: !0 }));
70
+ },
71
+ metricWeeks: d,
72
+ metricDataWeeks: m,
73
+ metricMonths: s,
74
+ metricDataMonths: b,
75
+ lowMetricStudents: D,
76
+ studentMetricPercent: _
77
+ };
78
+ }, Tr = () => {
79
+ const t = Qn(), e = Le((f) => f?.common?.user), n = e.roles.includes("Student"), a = e.roles.includes("Student") || e.roles.includes("Teacher"), r = Le((f) => f.common.language), [i, l] = q(zt), [d, c] = q(
80
+ n ? e : null
81
+ ), [s, u] = q([]), [m, v] = q(0), [b, N] = q(), [D, x] = q(!1), [_, T] = q(la), [C, $] = q({
82
+ pageSize: 5,
83
+ currentPage: 1,
84
+ sortBy: "Date",
85
+ sortOrder: "DESC"
86
+ }), [M, J] = q(!1), E = ut(), oe = it(!1), ie = it([]), [I, R] = q(null), [A, O] = q(!1), [ne, X] = q([]), ue = Le((f) => f?.common?.user?.schoolName), [xe, ke] = q(
87
+ Bt
88
+ ), [Z, ee] = q(Et), [p, y] = q([]), [k, Q] = q({
89
+ ...ze,
90
+ roles: e.roles
91
+ }), [h, te] = q("Monthly"), [Ce, L] = q({
92
+ academicYears: !1,
93
+ conferenceData: !1,
94
+ dataChart: !1,
95
+ gradeList: !0,
96
+ listStudent: !1,
97
+ metricData: !1,
98
+ overallReadinessToLearn: !1,
99
+ readinessToLearn: !1,
100
+ skillQuestion: !1,
101
+ skippedSessions: !1,
102
+ studentPressure: !1,
103
+ summarizeReport: !0,
104
+ topLearningStrategies: !1,
105
+ totalDashboard: !1,
106
+ dataStudentConversation: !0
107
+ }), { studentData: $e } = Kn(m, void 0, L), ae = s?.find((f) => f.id == k.academicYearId) || null, F = () => {
108
+ localStorage.removeItem(Me);
109
+ const f = s?.find((Y) => Y.isCurrent);
110
+ f && (Q({
111
+ ...ze,
112
+ startDate: G(f?.startTime).startOf("day").valueOf(),
113
+ endDate: G(f?.endTime).endOf("day").valueOf(),
114
+ academicYearId: f?.id
115
+ }), te("Monthly"));
116
+ }, V = () => {
117
+ localStorage.setItem(Me, JSON.stringify(k)), E(
118
+ pe({
119
+ type: "success",
120
+ message: "Filter saved successfully!"
121
+ })
122
+ );
123
+ }, H = () => {
124
+ X([]), A || Dn(), O(!A);
125
+ }, P = (f) => {
126
+ let Y = [...ne];
127
+ Y?.find(
128
+ (U) => U == f
129
+ ) ? Y = Y.filter((U) => U != f) : Y.push(f), X(Y);
130
+ }, j = (f) => {
131
+ R(f.currentTarget);
132
+ }, re = () => {
133
+ R(null);
134
+ }, z = !!I, se = z ? "export_popover" : void 0, he = (f) => {
135
+ ie.current.includes(f) || (ie.current = [...ie.current, f].filter((Y, ce, U) => U.indexOf(Y) === ce), E(Rn({
136
+ name: e.email,
137
+ event: `Chart interaction: ${f}`,
138
+ chart: f,
139
+ roles: e?.roles
140
+ })));
141
+ }, de = (f) => {
142
+ $({
143
+ ...C,
144
+ sortOrder: C.sortOrder === "ASC" || C.sortBy != f ? "DESC" : "ASC",
145
+ sortBy: f
146
+ });
147
+ }, W = () => {
148
+ localStorage.setItem(Me, JSON.stringify(k)), localStorage.setItem(et, "open_field_questions"), t(`/summarize-question-list?startTime=${k.startDate}&endTime=${k.endDate}&grade=${k.grades?.toString()}&academicYearId=${m}&studentId=${d?.studentId}`);
149
+ }, B = (f) => {
150
+ Q({
151
+ ...k,
152
+ ...f
153
+ }), te("Monthly");
154
+ }, le = async (f) => {
155
+ if (h !== "Monthly" && te("Monthly"), f != null) {
156
+ c(f);
157
+ const Y = await It(f.id, m);
158
+ Q({
159
+ ...k,
160
+ studentId: f?.studentId,
161
+ grades: Y && Y.length > 0 ? Y : []
162
+ });
163
+ return;
164
+ }
165
+ c(null), l(zt), Q({
166
+ ...k,
167
+ studentId: void 0,
168
+ grades: []
169
+ });
170
+ }, we = (f) => {
171
+ f && B({
172
+ startDate: f.startOf("day").valueOf(),
173
+ optionDate: ""
174
+ });
175
+ }, me = (f) => {
176
+ f && B({
177
+ endDate: f.endOf("day").valueOf(),
178
+ optionDate: ""
179
+ });
180
+ }, mt = (f) => {
181
+ if (f) {
182
+ B({
183
+ startDate: f.startDate,
184
+ endDate: f.endDate,
185
+ optionDate: f.value
186
+ });
187
+ const Y = s.filter((ce) => ce.isCurrent)[0];
188
+ v(Y.id);
189
+ }
190
+ }, Ue = (f) => {
191
+ c(f || null), f || Rt([]);
192
+ }, {
193
+ getMetricData: qe,
194
+ metricWeeks: Qe,
195
+ metricDataWeeks: fe,
196
+ metricMonths: Ie,
197
+ metricDataMonths: ft,
198
+ lowMetricStudents: Ve,
199
+ studentMetricPercent: Ge
200
+ } = $r(d?.studentId, k, k.grades, m, L), {
201
+ activeColumnPreparedness: Je,
202
+ monthsOneToOne: pt,
203
+ avgQuestionLastMonth: vt,
204
+ dayOfWeekOneToOne: Ke,
205
+ stressData: yt,
206
+ safetyData: St,
207
+ preparednessData: Pe,
208
+ successIndicatorsData: Ct,
209
+ studentSkillQuestion: wt,
210
+ getDataStudentSkillServices: Te,
211
+ getDataOneToOne: Xe,
212
+ successIndicatorWeeklyData: Ot,
213
+ weeksOneToOne: Ze,
214
+ preparednessWeeklyData: ye,
215
+ stressValue: ja,
216
+ dayOfWeekStress: Ua,
217
+ dayOfWeekReadiness: qa,
218
+ safetyValue: Qa,
219
+ activeColumnReadiness: Va,
220
+ activeColumnIndicators: Ga,
221
+ handleActiveColumn: Ja
222
+ } = Ln(d?.studentId, k, k.grades, m, !0, k.optionDate, h, L), {
223
+ seriesConference: Ka,
224
+ monthsConference: Xa,
225
+ activeColumnConference: Za,
226
+ handleActiveColumnConference: en,
227
+ dayOfWeekConference: tn,
228
+ avgConferenceLastMonth: an,
229
+ getChartConferenceData: nn
230
+ } = Pn(d?.studentId, k, k.grades, m, L), {
231
+ topLearningStrategiesData: rn,
232
+ getTopLearningStrategiesData: sn,
233
+ strategyUsage: on,
234
+ getStrategyUsage: Ht,
235
+ qualityFeedbackStudents: ln,
236
+ openQualityFeedbackModal: dn,
237
+ handleOpenQualityFeedbackModal: cn,
238
+ handleCloseQualityFeedbackModal: hn,
239
+ noteSelected: un,
240
+ openDetailNote: gn,
241
+ handleViewDetailNote: mn,
242
+ handleCloseDetailNote: fn
243
+ } = Mn(d?.studentId, k, k.grades, m, L), { dataOverallReadyToLearn: pn, getDataOverallReadinessToLearn: vn } = An(d?.studentId, k, k.grades, m, L), { studentPressure: yn, getDataStudentPressure: Sn } = On(
244
+ d?.studentId,
245
+ k,
246
+ k.grades,
247
+ m,
248
+ L
249
+ ), Cn = (f) => {
250
+ te("Monthly"), Q({
251
+ ...k,
252
+ startDate: G(f?.startTime).startOf("day").valueOf(),
253
+ endDate: G(f?.endTime).endOf("day").valueOf(),
254
+ academicYearId: f?.id,
255
+ optionDate: ""
256
+ }), v(f?.id || 0);
257
+ }, Rt = (f) => {
258
+ f.length === 0 ? B({ grades: [] }) : B({ grades: f });
259
+ }, wn = async () => {
260
+ L((Y) => ({ ...Y, academicYears: !1 }));
261
+ try {
262
+ var f = {
263
+ pageSize: -1,
264
+ currentPage: 1
265
+ };
266
+ const ce = (await Bn(f)).data.items.map((U) => ({
267
+ id: U.id,
268
+ title: `${G(U.startTime).year()} - ${G(U.endTime).year()} (${G(U.startTime).format("MM/YYYY")} - ${G(U.endTime).format("MM/YYYY")})`,
269
+ startTime: U.startTime,
270
+ endTime: U.endTime,
271
+ isCurrent: U.isCurrent
272
+ }));
273
+ u(ce);
274
+ } catch (Y) {
275
+ E(
276
+ pe({
277
+ type: "danger",
278
+ message: Y.response?.data?.title || Y.message
279
+ })
280
+ );
281
+ }
282
+ L((Y) => ({ ...Y, academicYears: !0 }));
283
+ }, bn = async () => {
284
+ L((f) => ({ ...f, totalDashboard: !1 }));
285
+ try {
286
+ const f = await Yn({ ...k, roles: e.roles ?? [], grade: k.grades ?? [] });
287
+ ke(f?.data || Bt);
288
+ } catch (f) {
289
+ E(
290
+ pe({
291
+ type: "danger",
292
+ message: f.response?.data?.title || f.message
293
+ })
294
+ );
295
+ }
296
+ L((f) => ({ ...f, totalDashboard: !0 }));
297
+ }, xn = async () => {
298
+ L((f) => ({ ...f, skippedSessions: !1 }));
299
+ try {
300
+ const f = await jn({ ...k, roles: e.roles ?? [], grade: k.grades ?? [] });
301
+ ee(f?.data || Et);
302
+ } catch (f) {
303
+ E(
304
+ pe({
305
+ type: "danger",
306
+ message: f.response?.data?.title || f.message
307
+ })
308
+ );
309
+ }
310
+ L((f) => ({ ...f, skippedSessions: !0 }));
311
+ }, Dn = async () => {
312
+ L((f) => ({ ...f, dataStudentConversation: !1 }));
313
+ try {
314
+ const f = await oa({ ...k, roles: e.roles ?? [], grade: k.grades ?? [] });
315
+ y(f?.data || []);
316
+ } catch (f) {
317
+ E(
318
+ pe({
319
+ type: "danger",
320
+ message: f.response?.data?.title || f.message
321
+ })
322
+ );
323
+ }
324
+ L((f) => ({ ...f, dataStudentConversation: !0 }));
325
+ }, _n = (f) => {
326
+ if (f != null) {
327
+ var Y = G(f.startTime).startOf("day").valueOf(), ce = G(f.endTime).endOf("day").valueOf();
328
+ B({
329
+ startDate: Y,
330
+ endDate: ce,
331
+ optionDate: "",
332
+ academicYearId: f.id
333
+ }), v(f.id);
334
+ } else
335
+ v(0);
336
+ }, It = async (f, Y) => {
337
+ L((ce) => ({ ...ce, gradeList: !1 }));
338
+ try {
339
+ const ce = await Un(f, Y);
340
+ return l(ce.data), L((U) => ({ ...U, gradeList: !0 })), ce?.data?.length ? ce?.data : [];
341
+ } catch (ce) {
342
+ return E(
343
+ pe({
344
+ type: "danger",
345
+ message: ce.response?.data?.title || ce.message
346
+ })
347
+ ), L((U) => ({ ...U, gradeList: !0 })), [];
348
+ }
349
+ }, Fn = (f, Y) => {
350
+ t(`/result-session/${f}/${Y}`);
351
+ }, Nn = na(() => {
352
+ localStorage.setItem(Me, JSON.stringify(k)), localStorage.setItem(et, _);
353
+ }, [k, _]), kn = async () => {
354
+ try {
355
+ const f = await En();
356
+ f && f.data && x(!0);
357
+ } catch {
358
+ }
359
+ }, $n = async () => {
360
+ L((f) => ({ ...f, summarizeReport: !1 }));
361
+ try {
362
+ const f = await zn({
363
+ ...k,
364
+ ...C,
365
+ studentId: d?.studentId,
366
+ grade: k?.grades?.filter((Y) => Y != null) || [],
367
+ roles: e.roles ?? []
368
+ });
369
+ f.data && N(f.data);
370
+ } catch (f) {
371
+ E(
372
+ pe({
373
+ type: "danger",
374
+ message: f.response?.data?.title || f.message
375
+ })
376
+ );
377
+ }
378
+ L((f) => ({ ...f, summarizeReport: !0 }));
379
+ };
380
+ _e(() => {
381
+ s && s.length > 0 && m != 0 && D && $n();
382
+ }, [k, k.grades, s, m, C, D]), _e(() => {
383
+ wn(), kn(), window.document.title = "Data Dashboard";
384
+ }, []);
385
+ const {
386
+ dataReadinessOfChart: Tn
387
+ } = Hn(d?.studentId, k, k.grades, m, L), Wn = () => {
388
+ J(!M);
389
+ };
390
+ return _e(() => {
391
+ s && s.length > 0 && m != 0 && (Te(), sn(), Ht(), Sn());
392
+ }, [k, s, m]), _e(() => {
393
+ s && s.length > 0 && m != 0 && e.roles && (bn(), n ? L((f) => ({ ...f, skippedSessions: !0 })) : xn());
394
+ }, [k, m, e.roles, n]), _e(() => {
395
+ s && s.length > 0 && m != 0 && (Xe(r), nn(r), vn(r), qe());
396
+ }, [k, s, m, r, h]), _e(() => {
397
+ const f = async () => {
398
+ const Y = localStorage.getItem(Me);
399
+ if (Y) {
400
+ try {
401
+ const U = JSON.parse(Y), Se = $e.find((We) => We.studentId === U.studentId);
402
+ if (Se && !n) {
403
+ c(Se);
404
+ const We = await It(Se.id, m || U.academicYearId);
405
+ Q({
406
+ ...U,
407
+ grades: We && We.length > 0 ? We : U.grades || []
408
+ });
409
+ } else
410
+ Q(U), Se && c(Se);
411
+ v(U.academicYearId || 0);
412
+ } catch (U) {
413
+ console.warn("Error parse filter from storage", U);
414
+ const Se = s?.find((We) => We.isCurrent);
415
+ Se ? (Q({
416
+ ...ze,
417
+ startDate: G(Se?.startTime).startOf("day").valueOf(),
418
+ endDate: G(Se?.endTime).endOf("day").valueOf(),
419
+ academicYearId: Se?.id
420
+ }), v(Se?.id || 0)) : (Q(ze), v(0)), c(null);
421
+ }
422
+ te("Monthly"), localStorage.removeItem(Me);
423
+ } else {
424
+ const U = s?.find((Se) => Se.isCurrent);
425
+ U && (Q({
426
+ ...ze,
427
+ startDate: G(U?.startTime).startOf("day").valueOf(),
428
+ endDate: G(U?.endTime).endOf("day").valueOf(),
429
+ academicYearId: U?.id
430
+ }), v(U?.id || 0), te("Monthly"));
431
+ }
432
+ const ce = localStorage.getItem(et);
433
+ ce && (T(ce), localStorage.removeItem(et)), oe.current = !0;
434
+ };
435
+ Ce.academicYears && (n || Ce.listStudent) && !oe.current && s.length > 0 && (oe.current = !0, f());
436
+ }, [$e, s, Ce.academicYears, Ce.listStudent, n]), {
437
+ handleChangeFilterGrade: Rt,
438
+ gradeList: i,
439
+ student: d,
440
+ isStudent: n,
441
+ setStudent: c,
442
+ topLearningStrategiesData: rn,
443
+ activeColumnPreparedness: Je,
444
+ monthsOneToOne: pt,
445
+ stressData: yt,
446
+ safetyData: St,
447
+ preparednessData: Pe,
448
+ successIndicatorsData: Ct,
449
+ avgQuestionLastMonth: vt,
450
+ handleChangeStartDateChart: we,
451
+ handleChangeEndDateChart: me,
452
+ filter: k,
453
+ dayOfWeekOneToOne: Ke,
454
+ changeFilter: B,
455
+ handleChangeFilterCalendar: mt,
456
+ dataOverallReadyToLearn: pn,
457
+ studentSkillQuestion: wt,
458
+ academicYearList: s,
459
+ handleChangeAcademicYear: _n,
460
+ studentPressure: yn,
461
+ expandedFilter: M,
462
+ onToggleChart: Wn,
463
+ dataReadinessOfChart: Tn,
464
+ seriesConference: Ka,
465
+ monthsConference: Xa,
466
+ activeColumnConference: Za,
467
+ handleActiveColumnConference: en,
468
+ dayOfWeekConference: tn,
469
+ avgConferenceLastMonth: an,
470
+ handleChangeStudent: Ue,
471
+ summarizeQuestions: b,
472
+ goToSession: Fn,
473
+ questionFilters: C,
474
+ handleChangeQuestionFilter: de,
475
+ handleRedirectAllAnswer: W,
476
+ isExistQuestion: D,
477
+ isStudentOrTeacher: a,
478
+ setIsExistQuestion: x,
479
+ handleHoverTooltip: he,
480
+ activeTab: _,
481
+ setActiveTab: T,
482
+ successIndicatorWeeklyData: Ot,
483
+ weeksOneToOne: Ze,
484
+ preparednessWeeklyData: ye,
485
+ metricWeeks: Qe,
486
+ handleClick: j,
487
+ handleClose: re,
488
+ anchorEl: I,
489
+ id_export: se,
490
+ openPopoverExport: z,
491
+ toggle: H,
492
+ handleSelectToPrint: P,
493
+ selectedToPrint: ne,
494
+ modal: A,
495
+ schoolName: ue,
496
+ metricDataWeeks: fe,
497
+ metricMonths: Ie,
498
+ metricDataMonths: ft,
499
+ lowMetricStudents: Ve,
500
+ studentMetricPercent: Ge,
501
+ stressValue: ja,
502
+ listTotalTime: xe,
503
+ conversationKpi: Z,
504
+ onSaveFilter: V,
505
+ onClearFilter: F,
506
+ handleChangeAcademicYearFilters: Cn,
507
+ studentData: $e,
508
+ handleFilterStudent: le,
509
+ academicYearItem: ae,
510
+ setConversationKpi: ee,
511
+ dayOfWeekStress: Ua,
512
+ setOptionDate: te,
513
+ dayOfWeekReadiness: qa,
514
+ safetyValue: Qa,
515
+ activeColumnReadiness: Va,
516
+ activeColumnIndicators: Ga,
517
+ handleActiveColumn: Ja,
518
+ loadingComplete: Ce,
519
+ strategyUsage: on,
520
+ getStrategyUsage: Ht,
521
+ qualityFeedbackStudents: ln,
522
+ openQualityFeedbackModal: dn,
523
+ handleOpenQualityFeedbackModal: cn,
524
+ handleCloseQualityFeedbackModal: hn,
525
+ noteSelected: un,
526
+ openDetailNote: gn,
527
+ handleViewDetailNote: mn,
528
+ handleCloseDetailNote: fn,
529
+ studentConversations: p,
530
+ onBeforeViewCheckIn: Nn
531
+ };
532
+ }, Wr = ({
533
+ gradeList: t,
534
+ onChangeFilterGrade: e,
535
+ fontSizeInputSelect: n,
536
+ gradeFilter: a,
537
+ endDate: r,
538
+ startDate: i,
539
+ student: l,
540
+ onChangeStudent: d,
541
+ studentData: c,
542
+ academicYearList: s,
543
+ valueAcademicYear: u,
544
+ onChangeAcademicYear: m,
545
+ onChangeEndDateChart: v,
546
+ onChangeStartDateChart: b,
547
+ optionDate: N,
548
+ onChangeFilterCalendar: D,
549
+ onClearFilter: x,
550
+ onSaveFilter: _,
551
+ isStudent: T,
552
+ loadingComplete: C
553
+ }) => {
554
+ const { t: $ } = ve(), [M, J] = q(a || []), [E, oe] = q(!1), ie = it(!1);
555
+ _e(() => {
556
+ J(a || []);
557
+ }, [a]);
558
+ const I = (X) => {
559
+ J(
560
+ (ue) => ue.includes(X) ? ue.filter((xe) => xe !== X) : [...ue, X]
561
+ );
562
+ }, R = () => {
563
+ ie.current = !0, e(M), oe(!1);
564
+ }, A = () => {
565
+ ie.current = !1, ie.current = !1, oe(!0);
566
+ }, O = () => {
567
+ oe(!1), ie.current || J(a);
568
+ }, ne = je(() => C?.academicYears && C?.dataChart && C?.gradeList && (T || C?.listStudent) && C?.metricData && C?.overallReadinessToLearn && C?.readinessToLearn && C?.skillQuestion && C?.skippedSessions && C?.studentPressure && C?.summarizeReport && C?.topLearningStrategies && C?.totalDashboard, [C, T]);
569
+ return /* @__PURE__ */ w(S, { className: `${g["plp-filter-desktop"]}`, children: [
570
+ /* @__PURE__ */ w(S, { className: `${g["select-filter-top"]}`, children: [
571
+ !T && /* @__PURE__ */ w(ht, { children: [
572
+ /* @__PURE__ */ o(S, { className: `${g["filter-item"]}`, children: /* @__PURE__ */ w(ga, { variant: "outlined", fullWidth: !0, children: [
573
+ /* @__PURE__ */ o(ma, { style: { background: "#fff" }, htmlFor: "filter_grade_dashboard_label", children: $("grade") }),
574
+ /* @__PURE__ */ w(
575
+ fa,
576
+ {
577
+ open: E,
578
+ onOpen: A,
579
+ onClose: O,
580
+ labelId: "filter_grade_dashboard_label",
581
+ id: "filter_grade_dashboard",
582
+ multiple: !0,
583
+ value: M,
584
+ MenuProps: {
585
+ PaperProps: {
586
+ sx: {
587
+ maxHeight: 300,
588
+ width: 180,
589
+ display: "flex",
590
+ flexDirection: "column",
591
+ position: "relative"
592
+ }
593
+ },
594
+ // getContentAnchorEl: null,
595
+ anchorOrigin: { vertical: "bottom", horizontal: "center" }
596
+ },
597
+ renderValue: (X) => X.join(", "),
598
+ sx: {
599
+ height: 48,
600
+ display: "flex",
601
+ alignItems: "center",
602
+ "& .MuiSelect-select:focus": {
603
+ backgroundColor: "transparent"
604
+ }
605
+ },
606
+ disabled: !ne,
607
+ children: [
608
+ /* @__PURE__ */ o("div", { style: { flex: 1, overflowY: "auto" }, children: t.map((X) => /* @__PURE__ */ w(pa, { value: X, onClick: () => I(X), children: [
609
+ /* @__PURE__ */ o(va, { disabled: !ne, checked: M.includes(X), color: "primary" }),
610
+ /* @__PURE__ */ o(ya, { primary: X })
611
+ ] }, X)) }),
612
+ /* @__PURE__ */ o("div", { style: {
613
+ position: "sticky",
614
+ bottom: 0,
615
+ background: "#fff",
616
+ borderTop: "1px solid #ddd",
617
+ textAlign: "center",
618
+ padding: "8px",
619
+ display: "flex",
620
+ justifyContent: "flex-end",
621
+ alignItems: "center",
622
+ zIndex: 1
623
+ }, children: /* @__PURE__ */ o(
624
+ "button",
625
+ {
626
+ style: {
627
+ display: "flex",
628
+ justifyContent: "center",
629
+ alignItems: "center",
630
+ padding: "8px 12px",
631
+ borderRadius: 8,
632
+ background: "#316CD9",
633
+ color: "#fff",
634
+ cursor: "pointer",
635
+ border: "none"
636
+ },
637
+ type: "button",
638
+ onClick: () => ne && R(),
639
+ children: $("apply")
640
+ }
641
+ ) })
642
+ ]
643
+ }
644
+ )
645
+ ] }) }),
646
+ /* @__PURE__ */ o(S, { className: `${g["filter-item"]}`, children: /* @__PURE__ */ o(
647
+ wa,
648
+ {
649
+ student: l,
650
+ grades: a,
651
+ setStudent: d,
652
+ studentData: c,
653
+ fontSizeInputSelect: n,
654
+ inputStyleProps: { height: 48 },
655
+ disabled: !ne
656
+ }
657
+ ) })
658
+ ] }),
659
+ /* @__PURE__ */ o(S, { className: `${g["filter-item"]}`, children: /* @__PURE__ */ o(
660
+ xa,
661
+ {
662
+ fullWidth: !0,
663
+ options: s,
664
+ getOptionLabel: (X) => X?.title,
665
+ value: u || null,
666
+ onChange: (X, ue) => {
667
+ m(ue);
668
+ },
669
+ label: $("academic_year"),
670
+ placeholder: $("select_academic_year"),
671
+ fontSizeInputSelect: n,
672
+ disabled: !ne
673
+ }
674
+ ) }),
675
+ T && /* @__PURE__ */ o(S, { className: `${g["filter-item"]}`, children: /* @__PURE__ */ o(
676
+ Wt,
677
+ {
678
+ options: $t,
679
+ value: N,
680
+ onChange: D,
681
+ disabled: !ne
682
+ }
683
+ ) })
684
+ ] }),
685
+ /* @__PURE__ */ w(S, { className: `${g["filter-box"]}`, children: [
686
+ !T && /* @__PURE__ */ o(S, { className: `${g["filter-item"]}`, children: /* @__PURE__ */ o(
687
+ Wt,
688
+ {
689
+ options: $t,
690
+ value: N,
691
+ onChange: D,
692
+ disabled: !ne
693
+ }
694
+ ) }),
695
+ /* @__PURE__ */ o(S, { className: `${g["filter-item"]}`, children: /* @__PURE__ */ o(
696
+ ba,
697
+ {
698
+ endDate: r,
699
+ startDate: i,
700
+ onChangeEndDate: v,
701
+ onChangeStartDate: b,
702
+ fontSizeInputSelect: n,
703
+ disabled: !ne
704
+ }
705
+ ) }),
706
+ /* @__PURE__ */ o(
707
+ Tt,
708
+ {
709
+ className: `${g["save-filter"]}`,
710
+ onClick: () => _(),
711
+ children: /* @__PURE__ */ o(K, { className: `${g["save-filter-title"]}`, children: $("save_filters") })
712
+ }
713
+ ),
714
+ /* @__PURE__ */ o(
715
+ Tt,
716
+ {
717
+ className: `${g["clear-filter"]}`,
718
+ onClick: () => ne && x(),
719
+ children: /* @__PURE__ */ w(S, { className: `${g["clear-filter-content"]}`, children: [
720
+ /* @__PURE__ */ o(
721
+ rr,
722
+ {
723
+ className: `${g["clear-filter-icon"]}`
724
+ }
725
+ ),
726
+ /* @__PURE__ */ o(
727
+ K,
728
+ {
729
+ className: `${g["clear-filter-text"]}`,
730
+ children: $("clear_all_filters")
731
+ }
732
+ )
733
+ ] })
734
+ }
735
+ )
736
+ ] })
737
+ ] });
738
+ }, Lr = ({
739
+ gradeList: t,
740
+ onChangeFilterGrade: e,
741
+ fontSizeInputSelect: n,
742
+ gradeFilter: a,
743
+ endDate: r,
744
+ startDate: i,
745
+ student: l,
746
+ onChangeStudent: d,
747
+ studentData: c,
748
+ academicYearList: s,
749
+ valueAcademicYear: u,
750
+ onChangeAcademicYear: m,
751
+ onChangeEndDateChart: v,
752
+ onChangeStartDateChart: b,
753
+ onChangeFilterCalendar: N,
754
+ optionDate: D,
755
+ expandedFilter: x,
756
+ onToggleChart: _,
757
+ isStudent: T,
758
+ loadingComplete: C
759
+ }) => {
760
+ const { t: $ } = ve(), M = ir(), [J, E] = q(a || []);
761
+ _e(() => {
762
+ E(a || []);
763
+ }, [a]);
764
+ const oe = (R) => {
765
+ E(
766
+ (A) => A.includes(R) ? A.filter((O) => O !== R) : [...A, R]
767
+ );
768
+ }, ie = () => {
769
+ e(J);
770
+ }, I = je(() => C?.academicYears && C?.dataChart && C?.gradeList && (T || C?.listStudent) && C?.metricData && C?.overallReadinessToLearn && C?.readinessToLearn && C?.skillQuestion && C?.skippedSessions && C?.studentPressure && C?.summarizeReport && C?.topLearningStrategies && C?.totalDashboard, [C, T]);
771
+ return /* @__PURE__ */ o(S, { className: `${g["plp-filter-mobile"]}`, children: /* @__PURE__ */ w(
772
+ Xn,
773
+ {
774
+ expanded: x,
775
+ className: `${g.accordion} ${!x && g["oveview-style"]}`,
776
+ children: [
777
+ /* @__PURE__ */ o(
778
+ Zn,
779
+ {
780
+ onClick: () => _(),
781
+ expandIcon: /* @__PURE__ */ o(sr, {}),
782
+ "aria-controls": "panel1a-content",
783
+ id: "panel1a-header",
784
+ className: `${g["expanded-summary"]}`,
785
+ children: /* @__PURE__ */ o(K, { className: `${g["expanded-title"]}`, children: $("filter") })
786
+ }
787
+ ),
788
+ /* @__PURE__ */ w(er, { className: `${g["expanded-detail"]}`, children: [
789
+ /* @__PURE__ */ w(S, { item: !0, className: `${g["select-filter-top"]}`, children: [
790
+ !T && /* @__PURE__ */ w(ht, { children: [
791
+ /* @__PURE__ */ o(S, { className: `${g["select-student"]}`, children: /* @__PURE__ */ o(
792
+ wa,
793
+ {
794
+ student: l,
795
+ setStudent: d,
796
+ studentData: c,
797
+ fontSizeInputSelect: n,
798
+ disabled: !I
799
+ }
800
+ ) }),
801
+ /* @__PURE__ */ w(ga, { variant: "outlined", fullWidth: !0, children: [
802
+ /* @__PURE__ */ o(ma, { style: { background: "#fff" }, htmlFor: "filter_grade_dashboard_label_mobile", children: $("grade") }),
803
+ /* @__PURE__ */ w(
804
+ fa,
805
+ {
806
+ labelId: "filter_grade_dashboard_label_mobile",
807
+ id: "filter_grade_dashboard_mobile",
808
+ multiple: !0,
809
+ value: J,
810
+ MenuProps: {
811
+ PaperProps: {
812
+ sx: {
813
+ maxHeight: 300,
814
+ width: 180,
815
+ display: "flex",
816
+ flexDirection: "column",
817
+ position: "relative"
818
+ }
819
+ },
820
+ anchorOrigin: { vertical: "bottom", horizontal: "center" }
821
+ },
822
+ renderValue: (R) => R.join(", "),
823
+ sx: {
824
+ height: 48,
825
+ display: "flex",
826
+ alignItems: "center"
827
+ },
828
+ disabled: !I,
829
+ children: [
830
+ /* @__PURE__ */ o("div", { style: { flex: 1, overflowY: "auto" }, children: t.map((R) => /* @__PURE__ */ w(pa, { value: R, onClick: () => oe(R), children: [
831
+ /* @__PURE__ */ o(va, { disabled: !I, checked: J.includes(R), color: "primary" }),
832
+ /* @__PURE__ */ o(ya, { primary: R })
833
+ ] }, R)) }),
834
+ /* @__PURE__ */ o("div", { style: {
835
+ borderTop: "1px solid #ddd",
836
+ textAlign: "center",
837
+ padding: "8px",
838
+ display: "flex",
839
+ justifyContent: "flex-end",
840
+ alignItems: "center"
841
+ }, children: /* @__PURE__ */ o(
842
+ "button",
843
+ {
844
+ style: {
845
+ display: "flex",
846
+ justifyContent: "center",
847
+ alignItems: "center",
848
+ padding: "8px 12px",
849
+ borderRadius: 8,
850
+ background: "#316CD9",
851
+ color: "#fff",
852
+ cursor: "pointer",
853
+ border: "none"
854
+ },
855
+ type: "button",
856
+ onClick: () => I && ie(),
857
+ children: $("apply")
858
+ }
859
+ ) })
860
+ ]
861
+ }
862
+ )
863
+ ] })
864
+ ] }),
865
+ /* @__PURE__ */ o(
866
+ xa,
867
+ {
868
+ fullWidth: !0,
869
+ slotProps: { popper: { className: M.popper } },
870
+ options: s,
871
+ getOptionLabel: (R) => R?.title,
872
+ value: u || null,
873
+ onChange: (R, A) => m(A),
874
+ label: $("academic_year"),
875
+ placeholder: $("select_academic_year"),
876
+ fontSizeInputSelect: n,
877
+ disabled: !I
878
+ }
879
+ )
880
+ ] }),
881
+ /* @__PURE__ */ w(
882
+ S,
883
+ {
884
+ container: !0,
885
+ spacing: 2,
886
+ className: `${g["filter-box"]}`,
887
+ children: [
888
+ /* @__PURE__ */ o(
889
+ ba,
890
+ {
891
+ endDate: r,
892
+ startDate: i,
893
+ onChangeEndDate: v,
894
+ onChangeStartDate: b,
895
+ fontSizeInputSelect: n,
896
+ disabled: !I
897
+ }
898
+ ),
899
+ /* @__PURE__ */ o(S, { item: !0, xs: 12, sm: 4, children: /* @__PURE__ */ o(
900
+ Wt,
901
+ {
902
+ options: $t,
903
+ value: D,
904
+ onChange: N,
905
+ disabled: !I
906
+ }
907
+ ) })
908
+ ]
909
+ }
910
+ )
911
+ ] })
912
+ ]
913
+ }
914
+ ) });
915
+ }, Pr = ({
916
+ studentSkillQuestion: t,
917
+ classFontSize: e,
918
+ safetyData: n,
919
+ stressData: a,
920
+ monthsOneToOne: r,
921
+ dayOfWeekOneToOne: i,
922
+ handleHoverTooltip: l,
923
+ avgQuestionLastMonth: d,
924
+ studentPressure: c,
925
+ timeOfDay: s,
926
+ metricWeeks: u,
927
+ lowMetricStudents: m,
928
+ metricDataMonths: v,
929
+ metricDataWeeks: b,
930
+ metricMonths: N,
931
+ studentMetricPercent: D,
932
+ stressValue: x,
933
+ dayOfWeekStress: _,
934
+ safetyValue: T,
935
+ loadingComplete: C,
936
+ onBeforeViewCheckIn: $
937
+ }) => {
938
+ const { t: M } = ve(), J = Le((I) => I.common.menuBar), E = it(null), [oe, ie] = q(0);
939
+ return _e(() => {
940
+ const I = () => {
941
+ E.current && ie(E.current.offsetWidth);
942
+ };
943
+ return window.addEventListener("resize", I), I(), () => {
944
+ window.removeEventListener("resize", I);
945
+ };
946
+ }, [J]), /* @__PURE__ */ w(S, { children: [
947
+ /* @__PURE__ */ w(S, { className: `${g.explain}`, children: [
948
+ /* @__PURE__ */ o(
949
+ "img",
950
+ {
951
+ src: Re,
952
+ alt: "",
953
+ className: `${g["explain-icon"]}`
954
+ }
955
+ ),
956
+ /* @__PURE__ */ o(K, { className: `${g["explain-text"]}`, children: M("the_data_presented_here_comes_from_the_check_ins") })
957
+ ] }),
958
+ /* @__PURE__ */ w(S, { className: `${g["partition-chart"]} ${g["space-chart"]}`, children: [
959
+ /* @__PURE__ */ o(S, { className: `${g["partition-chart-item"]}`, children: /* @__PURE__ */ o(
960
+ be,
961
+ {
962
+ hiddenKpi: !0,
963
+ colors: ["#0F9655"],
964
+ name: da,
965
+ typeChart: "area",
966
+ activeColumn: [!0],
967
+ series: n,
968
+ months: r,
969
+ dayOfWeek: _,
970
+ avgQuestionLastMonth: d,
971
+ studentCount: t.studentSafetyQuestionCount,
972
+ studentPercentage: t.studentPercentageUnsafe,
973
+ responseStudent: t.responseStudentSafety,
974
+ classFontSize: e,
975
+ handleHoverTooltip: l,
976
+ timeOfDay: s,
977
+ skillClass: "full-width",
978
+ stressValue: T,
979
+ loadingComplete: C.dataChart && C.skillQuestion,
980
+ onBeforeViewCheckIn: $
981
+ }
982
+ ) }),
983
+ /* @__PURE__ */ o(S, { className: `${g["partition-chart-item"]}`, children: /* @__PURE__ */ o(
984
+ be,
985
+ {
986
+ hiddenKpi: !0,
987
+ min: -100,
988
+ colors: ["#C44140"],
989
+ name: ca,
990
+ typeChart: "area",
991
+ activeColumn: [!0],
992
+ series: a,
993
+ months: r,
994
+ dayOfWeek: _,
995
+ avgQuestionLastMonth: d,
996
+ studentCount: t.studentStressQuestionCount,
997
+ studentPercentage: t.studentPercentageStress,
998
+ responseStudent: t.responseStudentStress,
999
+ classFontSize: e,
1000
+ handleHoverTooltip: l,
1001
+ timeOfDay: s,
1002
+ skillClass: "full-width",
1003
+ stressValue: x,
1004
+ loadingComplete: C.dataChart && C.skillQuestion,
1005
+ onBeforeViewCheckIn: $
1006
+ }
1007
+ ) })
1008
+ ] }),
1009
+ /* @__PURE__ */ o(S, { className: `${g["space-chart"]}`, children: /* @__PURE__ */ o(
1010
+ be,
1011
+ {
1012
+ hiddenKpi: !0,
1013
+ colors: ["#C4D4F3"],
1014
+ name: ha,
1015
+ description: Vn,
1016
+ typeChart: "bar",
1017
+ weeks: u,
1018
+ activeColumn: [!0],
1019
+ series: [{
1020
+ name: "",
1021
+ data: v
1022
+ }],
1023
+ weeklySeries: [{
1024
+ name: "",
1025
+ data: b
1026
+ }],
1027
+ months: N,
1028
+ dayOfWeek: i,
1029
+ avgQuestionLastMonth: d,
1030
+ classFontSize: e,
1031
+ handleHoverTooltip: l,
1032
+ timeOfDay: s,
1033
+ lowMetricStudents: m,
1034
+ studentMetricPercent: D,
1035
+ loadingComplete: C.metricData,
1036
+ onBeforeViewCheckIn: $
1037
+ }
1038
+ ) }),
1039
+ /* @__PURE__ */ w(S, { className: `${g["plp-box-chart"]}`, children: [
1040
+ /* @__PURE__ */ w(S, { className: `${g["header-chart-container"]}`, children: [
1041
+ /* @__PURE__ */ o(K, { className: `${g["title-chart"]}`, children: M("student_stress_by_zone") }),
1042
+ /* @__PURE__ */ o(
1043
+ "div",
1044
+ {
1045
+ className: g["description-chart-distribution-stress"],
1046
+ dangerouslySetInnerHTML: { __html: M("the_data_presented_in_this_chart_reflects_the_student_s_most_recent_check_in") }
1047
+ }
1048
+ )
1049
+ ] }),
1050
+ /* @__PURE__ */ o(
1051
+ S,
1052
+ {
1053
+ ref: E,
1054
+ className: `${g["box-chart-pressure"]}`,
1055
+ style: { padding: 0 },
1056
+ children: /* @__PURE__ */ o(
1057
+ ia,
1058
+ {
1059
+ width: oe,
1060
+ studentPressure: c,
1061
+ changeLanguage: M("student_stress_by_zone"),
1062
+ handleHoverTooltip: l,
1063
+ loadingComplete: C.studentPressure
1064
+ }
1065
+ )
1066
+ }
1067
+ )
1068
+ ] })
1069
+ ] });
1070
+ };
1071
+ function Mr(t, e) {
1072
+ return JSON.stringify(t) === JSON.stringify(e);
1073
+ }
1074
+ const Ar = ra(Pr, Mr), Or = cr(tr)({
1075
+ height: 16,
1076
+ borderRadius: 10,
1077
+ backgroundColor: "#F6F6F6",
1078
+ "& .MuiLinearProgress-bar": {
1079
+ borderRadius: 10,
1080
+ backgroundColor: "#316CD9"
1081
+ }
1082
+ }), Hr = (t) => /* @__PURE__ */ o(S, { children: /* @__PURE__ */ w(rt, { display: "flex", alignItems: "center", children: [
1083
+ /* @__PURE__ */ o(rt, { width: "100%", mr: 1, children: /* @__PURE__ */ o(
1084
+ Or,
1085
+ {
1086
+ variant: "determinate",
1087
+ ...t,
1088
+ value: Math.min(t.value, 100)
1089
+ }
1090
+ ) }),
1091
+ /* @__PURE__ */ o(rt, { minWidth: 35, children: /* @__PURE__ */ o(K, { variant: "body2", color: "textSecondary", children: `${Math.round(t.value) || 0}%` }) })
1092
+ ] }) }), Rr = ot("/images/image-default.png"), Ir = ({ students: t, openPopoverListStudent: e, handleCloseListStudentModal: n }) => {
1093
+ const { t: a } = ve();
1094
+ return /* @__PURE__ */ o(
1095
+ _a,
1096
+ {
1097
+ open: e,
1098
+ onClose: n,
1099
+ scroll: "body",
1100
+ maxWidth: "md",
1101
+ children: /* @__PURE__ */ w("div", { className: g["metric-modal"], children: [
1102
+ /* @__PURE__ */ w("div", { className: g["metric-modal__title-missed-conversation"], children: [
1103
+ a("students_missing_a_conversation"),
1104
+ " (",
1105
+ t?.length,
1106
+ ")"
1107
+ ] }),
1108
+ /* @__PURE__ */ w("div", { className: g["metric-modal__body"], children: [
1109
+ /* @__PURE__ */ w("div", { className: g["metric-modal__body--header"], children: [
1110
+ /* @__PURE__ */ o(
1111
+ "div",
1112
+ {
1113
+ className: `${g.item} ${g["not-grade"]}`,
1114
+ children: a("student")
1115
+ }
1116
+ ),
1117
+ /* @__PURE__ */ o("div", { className: `${g.item} ${g.grade}`, style: { maxWidth: "20%" }, children: a("grade") })
1118
+ ] }),
1119
+ /* @__PURE__ */ o("div", { className: g["metric-modal__body--content"], children: t?.length && t.map((r) => /* @__PURE__ */ w(
1120
+ "div",
1121
+ {
1122
+ className: g.item,
1123
+ children: [
1124
+ /* @__PURE__ */ w(
1125
+ "div",
1126
+ {
1127
+ className: `${g.item__data} ${g["item__not-grade"]} ${g["item__student-information"]}`,
1128
+ children: [
1129
+ /* @__PURE__ */ o(
1130
+ "img",
1131
+ {
1132
+ src: r?.studentProfileImage ? st(
1133
+ r?.studentProfileImage
1134
+ ) : Rr,
1135
+ alt: r?.studentName
1136
+ }
1137
+ ),
1138
+ r?.studentName
1139
+ ]
1140
+ }
1141
+ ),
1142
+ /* @__PURE__ */ o(
1143
+ "div",
1144
+ {
1145
+ className: `${g.item__data} ${g.item__grade}`,
1146
+ style: { maxWidth: "20%" },
1147
+ children: r?.grade
1148
+ }
1149
+ )
1150
+ ]
1151
+ },
1152
+ r?.studentId
1153
+ )) })
1154
+ ] })
1155
+ ] })
1156
+ }
1157
+ );
1158
+ }, zr = ({ conversationKpi: t, loadingComplete: e = !0 }) => {
1159
+ const { t: n } = ve(), [a, r] = q(!1);
1160
+ return /* @__PURE__ */ w(S, { children: [
1161
+ /* @__PURE__ */ w(S, { className: `${g.explain}`, children: [
1162
+ /* @__PURE__ */ o(
1163
+ "img",
1164
+ {
1165
+ src: Re,
1166
+ alt: "",
1167
+ className: `${g["explain-icon"]}`
1168
+ }
1169
+ ),
1170
+ /* @__PURE__ */ o(K, { className: `${g["explain-text"]}`, children: n("the_data_presented_here_comes_from_the_conversations_logs") })
1171
+ ] }),
1172
+ /* @__PURE__ */ w(S, { className: `${g["conversation-list-card"]}`, children: [
1173
+ /* @__PURE__ */ w(S, { className: `${g["card-item"]}`, children: [
1174
+ /* @__PURE__ */ w(S, { className: `${g["card-item-header"]}`, children: [
1175
+ /* @__PURE__ */ o(K, { className: `${g["card-item-title"]}`, children: n("average_student_review") }),
1176
+ /* @__PURE__ */ o("img", { src: "/images/star-icon.png", alt: "" })
1177
+ ] }),
1178
+ /* @__PURE__ */ w(S, { className: `${g["card-item-content"]}`, children: [
1179
+ e ? /* @__PURE__ */ o(K, { className: `${g["card-item-score"]}`, children: t.avgStudentReview }) : /* @__PURE__ */ o(Oe, { size: 24 }),
1180
+ /* @__PURE__ */ o(K, { className: `${g["rating-scale"]}`, children: "/10" })
1181
+ ] })
1182
+ ] }),
1183
+ /* @__PURE__ */ w(S, { className: `${g["card-item"]}`, children: [
1184
+ /* @__PURE__ */ w(S, { className: `${g["card-item-header"]}`, children: [
1185
+ /* @__PURE__ */ o(K, { className: `${g["card-item-title"]}`, children: n("monthly_conversation_target") }),
1186
+ /* @__PURE__ */ o("img", { src: "/images/target-icon.png", alt: "" })
1187
+ ] }),
1188
+ /* @__PURE__ */ o(S, { className: `${g["card-item-content"]}`, children: e ? /* @__PURE__ */ w(ht, { children: [
1189
+ /* @__PURE__ */ o(K, { className: `${g["card-item-score"]}`, children: t.conversationTeacherAvg }),
1190
+ /* @__PURE__ */ o(K, { className: `${g["rating-scale"]}`, children: `/${t.conversationTarget}` })
1191
+ ] }) : /* @__PURE__ */ o(Oe, { size: 24 }) }),
1192
+ /* @__PURE__ */ o(
1193
+ Hr,
1194
+ {
1195
+ value: t.conversationTeacherAvg / t.conversationTarget * 100
1196
+ }
1197
+ )
1198
+ ] }),
1199
+ /* @__PURE__ */ w(S, { className: `${g["card-item"]}`, children: [
1200
+ /* @__PURE__ */ w(S, { className: `${g["card-item-header"]}`, children: [
1201
+ /* @__PURE__ */ o(K, { className: `${g["card-item-title"]}`, children: n("students_missing_a_conversation") }),
1202
+ /* @__PURE__ */ o("img", { src: "/images/conversation-icon.png", alt: "" })
1203
+ ] }),
1204
+ /* @__PURE__ */ o(S, { className: `${g["card-item-content"]}`, children: /* @__PURE__ */ w("div", { className: `${g["card-item-score"]}`, children: [
1205
+ e ? /* @__PURE__ */ o("span", { className: `${g["card-item-score__kpi"]}`, children: t.sessionReviewSkipped }) : /* @__PURE__ */ o(Oe, { size: 24 }),
1206
+ /* @__PURE__ */ o("span", { className: `${g["card-item-score__student"]}`, children: n("students") }),
1207
+ !!t?.sessionReviewSkipped && e && /* @__PURE__ */ w(
1208
+ "button",
1209
+ {
1210
+ type: "button",
1211
+ className: `${g["card-item-score__view-list"]}`,
1212
+ onClick: () => r(!0),
1213
+ children: [
1214
+ n("view_list"),
1215
+ /* @__PURE__ */ o(hr, {})
1216
+ ]
1217
+ }
1218
+ )
1219
+ ] }) })
1220
+ ] })
1221
+ ] }),
1222
+ /* @__PURE__ */ o(
1223
+ Ir,
1224
+ {
1225
+ students: t.missedReviewStudents,
1226
+ openPopoverListStudent: a,
1227
+ handleCloseListStudentModal: () => r(!1)
1228
+ }
1229
+ )
1230
+ ] });
1231
+ };
1232
+ function Br(t, e) {
1233
+ return JSON.stringify(t) === JSON.stringify(e);
1234
+ }
1235
+ const Er = ra(zr, Br), Yr = ({
1236
+ dataReadinessOfChart: t,
1237
+ handleHoverTooltip: e,
1238
+ classFontSize: n,
1239
+ dataOverallReadyToLearn: a,
1240
+ dayOfWeekOneToOne: r,
1241
+ monthsOneToOne: i,
1242
+ avgQuestionLastMonth: l,
1243
+ preparednessData: d,
1244
+ preparednessWeeklyData: c,
1245
+ weeksOneToOne: s,
1246
+ setOptionDate: u,
1247
+ activeColumn: m,
1248
+ onActiveColumn: v,
1249
+ timeOfDay: b,
1250
+ loadingComplete: N,
1251
+ onBeforeViewCheckIn: D
1252
+ }) => {
1253
+ const { t: x } = ve(), _ = ["Energy", "Happiness", "Focus"], T = [...t].sort((C, $) => _.indexOf(Ut(C.questionText)) - _.indexOf(Ut($.questionText)));
1254
+ return /* @__PURE__ */ w(S, { children: [
1255
+ /* @__PURE__ */ w(S, { className: `${g.explain}`, children: [
1256
+ /* @__PURE__ */ o(
1257
+ "img",
1258
+ {
1259
+ src: Re,
1260
+ alt: "",
1261
+ className: `${g["explain-icon"]}`
1262
+ }
1263
+ ),
1264
+ /* @__PURE__ */ o(K, { className: `${g["explain-text"]}`, children: x("the_data_presented_here_comes_from_the_check_ins") })
1265
+ ] }),
1266
+ /* @__PURE__ */ o(S, { className: `${g["space-chart"]}`, children: /* @__PURE__ */ o(
1267
+ Da,
1268
+ {
1269
+ avgQuestionLastMonth: l,
1270
+ series: d,
1271
+ timeOfDay: b,
1272
+ icons: [
1273
+ "home/energy.png",
1274
+ "home/focus.png",
1275
+ "home/happiness.png"
1276
+ ],
1277
+ trendLabels: [
1278
+ "Feeling Okay",
1279
+ "Generally focused",
1280
+ "More positives than negatives"
1281
+ ],
1282
+ className: "trend-item-icon-large",
1283
+ loadingComplete: N.dataChart
1284
+ }
1285
+ ) }),
1286
+ /* @__PURE__ */ w(
1287
+ S,
1288
+ {
1289
+ className: `${g["partition-chart"]} ${g["space-chart"]}`,
1290
+ children: [
1291
+ /* @__PURE__ */ o(
1292
+ S,
1293
+ {
1294
+ className: `${g["partition-chart-item"]} ${g["partition-chart-item-1"]}`,
1295
+ children: /* @__PURE__ */ o(
1296
+ be,
1297
+ {
1298
+ colors: ["#D9EEE4", "#FAF0F0"],
1299
+ name: Gn,
1300
+ typeChart: "donut",
1301
+ months: [],
1302
+ activeColumn: [!0, !0],
1303
+ avgQuestionLastMonth: a.overViewQuestionLastMonth,
1304
+ studentCount: a?.studentNotReadyToLearn?.length || void 0,
1305
+ responseStudent: a?.studentNotReadyToLearn,
1306
+ series: a.resultQuestion,
1307
+ classFontSize: n,
1308
+ handleHoverTooltip: e,
1309
+ kpiClassName: "column-reverse",
1310
+ loadingComplete: N.overallReadinessToLearn,
1311
+ onBeforeViewCheckIn: D
1312
+ }
1313
+ )
1314
+ }
1315
+ ),
1316
+ /* @__PURE__ */ o(
1317
+ S,
1318
+ {
1319
+ className: `${g["partition-chart-item"]} ${g["partition-chart-item-2"]}`,
1320
+ children: /* @__PURE__ */ o(
1321
+ be,
1322
+ {
1323
+ colors: ["#169490", "#316CD9", "#FFB04F"],
1324
+ name: ua,
1325
+ typeChart: "area",
1326
+ series: d,
1327
+ months: i,
1328
+ dayOfWeek: r,
1329
+ avgQuestionLastMonth: l,
1330
+ classFontSize: n,
1331
+ handleHoverTooltip: e,
1332
+ weeks: s,
1333
+ weeklySeries: c,
1334
+ noGradient: !0,
1335
+ setOptionDate: u,
1336
+ noAvgTotal: !0,
1337
+ activeColumn: m || [!0, !0, !0],
1338
+ onActiveColumn: v,
1339
+ loadingComplete: N.dataChart,
1340
+ onBeforeViewCheckIn: D
1341
+ }
1342
+ )
1343
+ }
1344
+ )
1345
+ ]
1346
+ }
1347
+ ),
1348
+ /* @__PURE__ */ o(
1349
+ S,
1350
+ {
1351
+ className: `${g["plp-box-chart"]} ${g["distribution-chart"]}`,
1352
+ children: /* @__PURE__ */ o(
1353
+ Fa,
1354
+ {
1355
+ data: T,
1356
+ handleHoverTooltip: e,
1357
+ hiddenRightLegend: !0,
1358
+ hiddenDescription: !0,
1359
+ idDistribution: "chart_bubble_custom",
1360
+ loadingComplete: N.readinessToLearn
1361
+ }
1362
+ )
1363
+ }
1364
+ )
1365
+ ] });
1366
+ }, jr = ({
1367
+ handleRedirectAllAnswer: t,
1368
+ summarizeQuestions: e,
1369
+ goToSession: n,
1370
+ handleChangeQuestionFilter: a,
1371
+ questionFilters: r,
1372
+ loadingComplete: i = !0
1373
+ }) => {
1374
+ const { t: l } = ve();
1375
+ return /* @__PURE__ */ w(S, { children: [
1376
+ /* @__PURE__ */ w(S, { className: `${g.explain}`, children: [
1377
+ /* @__PURE__ */ o(
1378
+ "img",
1379
+ {
1380
+ src: Re,
1381
+ alt: "",
1382
+ className: `${g["explain-icon"]}`
1383
+ }
1384
+ ),
1385
+ /* @__PURE__ */ o(K, { className: `${g["explain-text"]}`, children: l("the_data_presented_here_comes_from_the_check_ins") })
1386
+ ] }),
1387
+ /* @__PURE__ */ w(
1388
+ S,
1389
+ {
1390
+ className: `${g["plp-box-chart"]} ${g["box-chart-container"]}`,
1391
+ children: [
1392
+ /* @__PURE__ */ o(K, { className: `${g["title-chart"]}`, children: l("open_field_questions") }),
1393
+ /* @__PURE__ */ o(
1394
+ K,
1395
+ {
1396
+ className: g["description-chart-distribution-stress"],
1397
+ children: l(
1398
+ "these_are_the_last_5_comments_from_recent_check_ins_filtered_by_the_selected_criteria_above"
1399
+ )
1400
+ }
1401
+ ),
1402
+ /* @__PURE__ */ w(S, { className: "d-flex align-items-center", children: [
1403
+ /* @__PURE__ */ w(S, { className: "d-flex align-items-center", children: [
1404
+ /* @__PURE__ */ w(K, { className: `${g["total-text"]}`, children: [
1405
+ l("total_responses"),
1406
+ ":"
1407
+ ] }),
1408
+ i ? /* @__PURE__ */ o(K, { className: `${g["total-value"]}`, children: e?.totalItems ?? 0 }) : /* @__PURE__ */ o(Oe, { size: 24 })
1409
+ ] }),
1410
+ /* @__PURE__ */ w(
1411
+ S,
1412
+ {
1413
+ onClick: () => i && t(),
1414
+ className: `d-flex align-items-center ${g["view-response-action"]}`,
1415
+ children: [
1416
+ /* @__PURE__ */ o(K, { className: `${g["action-text"]}`, children: l("view_all_responses") }),
1417
+ /* @__PURE__ */ o(At, {})
1418
+ ]
1419
+ }
1420
+ )
1421
+ ] }),
1422
+ i ? /* @__PURE__ */ o(
1423
+ ur,
1424
+ {
1425
+ items: e?.items || [],
1426
+ onOder: a,
1427
+ filter: r,
1428
+ goToSession: n
1429
+ }
1430
+ ) : /* @__PURE__ */ o("div", { style: { width: "100%", height: 400, display: "flex", justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ o(Oe, {}) })
1431
+ ]
1432
+ }
1433
+ )
1434
+ ] });
1435
+ }, Ur = ({
1436
+ successIndicatorsData: t,
1437
+ avgQuestionLastMonth: e,
1438
+ dayOfWeekOneToOne: n,
1439
+ monthsOneToOne: a,
1440
+ timeOfDay: r,
1441
+ classFontSize: i,
1442
+ handleHoverTooltip: l,
1443
+ successIndicatorWeeklyData: d,
1444
+ weeksOneToOne: c,
1445
+ activeColumn: s,
1446
+ onActiveColumn: u,
1447
+ loadingComplete: m,
1448
+ onBeforeViewCheckIn: v
1449
+ }) => {
1450
+ const { t: b } = ve();
1451
+ return /* @__PURE__ */ w(S, { children: [
1452
+ /* @__PURE__ */ w(S, { className: `${g.explain}`, children: [
1453
+ /* @__PURE__ */ o(
1454
+ "img",
1455
+ {
1456
+ src: Re,
1457
+ alt: "",
1458
+ className: `${g["explain-icon"]}`
1459
+ }
1460
+ ),
1461
+ /* @__PURE__ */ o(K, { className: `${g["explain-text"]}`, children: b("the_data_presented_here_comes_from_the_check_ins") })
1462
+ ] }),
1463
+ /* @__PURE__ */ o(S, { className: `${g["space-chart"]}`, children: /* @__PURE__ */ o(
1464
+ Da,
1465
+ {
1466
+ avgQuestionLastMonth: e,
1467
+ series: t,
1468
+ timeOfDay: r,
1469
+ icons: [
1470
+ "well-being-icon.png",
1471
+ "growth-icon.png",
1472
+ "relationship-icon.png",
1473
+ "personal-icon-quests.svg",
1474
+ "academic-icon.png",
1475
+ "self-efficacy-icon.png"
1476
+ ],
1477
+ trendLabels: [
1478
+ "Generally okay",
1479
+ "Good growth overall",
1480
+ "All key relationships are positive",
1481
+ "Meeting some deadlines",
1482
+ "On target in most areas",
1483
+ "Lacking some self-belief"
1484
+ ],
1485
+ noAvgText: !0,
1486
+ loadingComplete: m.dataChart
1487
+ }
1488
+ ) }),
1489
+ /* @__PURE__ */ o(
1490
+ be,
1491
+ {
1492
+ colors: [
1493
+ "#73C8E5",
1494
+ "#FFB04F",
1495
+ "#D7B0DE",
1496
+ "#E56362",
1497
+ "#5A7F05",
1498
+ "#D3D3D3"
1499
+ ],
1500
+ name: b("success_indicators"),
1501
+ typeChart: "area",
1502
+ series: t,
1503
+ weeklySeries: d,
1504
+ months: a,
1505
+ dayOfWeek: n,
1506
+ avgQuestionLastMonth: e,
1507
+ timeOfDay: r,
1508
+ classFontSize: i,
1509
+ handleHoverTooltip: l,
1510
+ weeks: c,
1511
+ noGradient: !0,
1512
+ noAvgTotal: !0,
1513
+ activeColumn: s,
1514
+ onActiveColumn: u,
1515
+ loadingComplete: m.dataChart,
1516
+ onBeforeViewCheckIn: v
1517
+ }
1518
+ )
1519
+ ] });
1520
+ }, ka = ({ learningStrategies: t, handleOpenQualityFeedbackModal: e, isPrint: n }) => {
1521
+ const { t: a } = ve(), [r, i] = q("desc"), [l, d] = q("timesUsed"), c = (u) => {
1522
+ if (n) return;
1523
+ i(l === u && r === "asc" ? "desc" : "asc"), d(u);
1524
+ }, s = je(() => t ? [...t].sort((u, m) => {
1525
+ const v = u[l], b = m[l];
1526
+ return b < v ? r === "desc" ? -1 : 1 : b > v ? r === "desc" ? 1 : -1 : 0;
1527
+ }) : [], [t, r, l]);
1528
+ return /* @__PURE__ */ w(S, { className: `${g["table-container"]}`, children: [
1529
+ /* @__PURE__ */ o(lt, { "aria-label": "simple table", children: /* @__PURE__ */ o(Sa, { className: `${g["table-head"]}`, children: /* @__PURE__ */ w(Ee, { children: [
1530
+ /* @__PURE__ */ o(ge, { align: "left", width: n ? "40%" : "37%", className: `${g["header-cell"]}`, children: /* @__PURE__ */ o(
1531
+ xt,
1532
+ {
1533
+ active: l === "learningStrategyName",
1534
+ direction: l === "learningStrategyName" ? r : "asc",
1535
+ onClick: () => c("learningStrategyName"),
1536
+ hideSortIcon: n,
1537
+ children: /* @__PURE__ */ o(S, { className: "d-flex align-items-center", children: a("learning_strategy_name") })
1538
+ }
1539
+ ) }),
1540
+ /* @__PURE__ */ o(ge, { align: "center", width: n ? "30%" : "20%", className: `${g["header-cell"]}`, children: /* @__PURE__ */ o(
1541
+ xt,
1542
+ {
1543
+ active: l === "timesUsed",
1544
+ direction: l === "timesUsed" ? r : "asc",
1545
+ onClick: () => c("timesUsed"),
1546
+ hideSortIcon: n,
1547
+ children: /* @__PURE__ */ o(S, { className: "d-flex align-items-center justify-content-center", children: a("times_used") })
1548
+ }
1549
+ ) }),
1550
+ /* @__PURE__ */ o(ge, { align: "left", width: n ? "30%" : "25%", className: `${g["header-cell"]}`, children: /* @__PURE__ */ o(
1551
+ xt,
1552
+ {
1553
+ active: l === "studentFeedBackAvg",
1554
+ direction: l === "studentFeedBackAvg" ? r : "asc",
1555
+ onClick: () => c("studentFeedBackAvg"),
1556
+ hideSortIcon: n,
1557
+ children: /* @__PURE__ */ o(S, { className: "d-flex align-items-center", children: a("student_feedback") })
1558
+ }
1559
+ ) }),
1560
+ !n && /* @__PURE__ */ o(
1561
+ ge,
1562
+ {
1563
+ align: "left",
1564
+ width: "18%",
1565
+ className: `${g["header-cell"]}`,
1566
+ children: /* @__PURE__ */ o(S, { className: "d-flex align-items-center", children: a("action") })
1567
+ }
1568
+ )
1569
+ ] }) }) }),
1570
+ /* @__PURE__ */ o(S, { className: `${g["table-body-container"]}`, children: /* @__PURE__ */ o(lt, { children: /* @__PURE__ */ o(Ca, { className: `${g["table-body"]}`, children: s?.map((u) => /* @__PURE__ */ w(
1571
+ Ee,
1572
+ {
1573
+ className: `${g["table-row"]}`,
1574
+ children: [
1575
+ /* @__PURE__ */ o(ge, { align: "left", height: 52, style: { width: n ? "40%" : "37%" }, className: `${g["body-cell"]}`, children: /* @__PURE__ */ o(S, { className: "d-flex align-items-start h-100", children: /* @__PURE__ */ o(S, { className: "d-flex align-items-center", children: u.learningStrategyName }) }) }),
1576
+ /* @__PURE__ */ o(ge, { align: "center", height: 52, style: { width: n ? "30%" : "20%" }, className: `${g["body-cell"]}`, children: /* @__PURE__ */ o(S, { className: "d-flex align-items-center h-100 justify-content-center", children: u.timesUsed }) }),
1577
+ /* @__PURE__ */ o(ge, { align: "left", height: 52, style: { width: n ? "30%" : "25%" }, className: `${g["body-cell"]}`, children: /* @__PURE__ */ o(S, { className: "d-flex align-items-center h-100", children: u.studentFeedBackAvg === 0 ? "Not done yet" : /* @__PURE__ */ w(aa, { children: [
1578
+ u.studentFeedBackAvg,
1579
+ " ",
1580
+ /* @__PURE__ */ o("span", { className: `${g["tail-average"]}`, children: " / 10" })
1581
+ ] }) }) }),
1582
+ !n && /* @__PURE__ */ o(ge, { align: "left", height: 52, style: { width: "18%" }, className: `${g["body-cell"]}`, children: /* @__PURE__ */ o(S, { className: "d-flex align-items-start h-100", children: /* @__PURE__ */ w(
1583
+ S,
1584
+ {
1585
+ onClick: () => e && e(u.learningStrategyId),
1586
+ className: `d-flex align-items-center ${g["view-response-action"]}`,
1587
+ children: [
1588
+ /* @__PURE__ */ o(K, { className: `${g["action-text"]}`, children: a("view_students") }),
1589
+ /* @__PURE__ */ o(At, {})
1590
+ ]
1591
+ }
1592
+ ) }) })
1593
+ ]
1594
+ },
1595
+ u.learningStrategyId
1596
+ )) }) }) })
1597
+ ] });
1598
+ }, qr = (t) => {
1599
+ const [e, n] = q({
1600
+ sortBy: "grade",
1601
+ sortOrder: "DESC"
1602
+ }), a = na((i) => {
1603
+ n((l) => ({
1604
+ sortBy: i,
1605
+ sortOrder: l.sortBy === i && l.sortOrder === "ASC" ? "DESC" : "ASC"
1606
+ }));
1607
+ }, []);
1608
+ return {
1609
+ sortedStudents: je(() => t ? e.sortBy ? [...t].sort((i, l) => {
1610
+ const { sortBy: d, sortOrder: c } = e;
1611
+ let s = i[d] ?? "", u = l[d] ?? "";
1612
+ if (d === "grade") {
1613
+ const m = parseInt(String(s).replace(/\D/g, ""), 10), v = parseInt(String(u).replace(/\D/g, ""), 10);
1614
+ !isNaN(m) && !isNaN(v) && (s = m, u = v);
1615
+ }
1616
+ return typeof s == "number" && typeof u == "number" ? c === "ASC" ? s - u : u - s : s < u ? c === "ASC" ? -1 : 1 : s > u ? c === "ASC" ? 1 : -1 : 0;
1617
+ }) : t : [], [t, e]),
1618
+ sortConfig: e,
1619
+ handleSort: a,
1620
+ setSortConfig: n
1621
+ };
1622
+ }, Qr = ot("/images/image-default.png");
1623
+ function Vr({ students: t, openPopoverListStudent: e, handleCloseListStudentModal: n, handleViewDetailNote: a }) {
1624
+ const { t: r } = ve(), { sortedStudents: i, sortConfig: l, handleSort: d, setSortConfig: c } = qr(t);
1625
+ _e(() => {
1626
+ e || c({ sortBy: "grade", sortOrder: "DESC" });
1627
+ }, [e]);
1628
+ const s = (u, m) => u ? m === "ASC" ? /* @__PURE__ */ o(gr, { style: { width: 16, height: 16, marginLeft: 4 } }) : /* @__PURE__ */ o(mr, { style: { width: 16, height: 16, marginLeft: 4 } }) : null;
1629
+ return /* @__PURE__ */ o(
1630
+ _a,
1631
+ {
1632
+ open: e,
1633
+ onClose: n,
1634
+ scroll: "body",
1635
+ maxWidth: "md",
1636
+ isHiddenIconClose: !0,
1637
+ children: /* @__PURE__ */ w("div", { className: `${g["metric-modal"]} position-relative`, children: [
1638
+ /* @__PURE__ */ w("div", { className: `d-flex justify-content-between align-items-center ${g["metric-modal__title-missed-conversation"]}`, children: [
1639
+ /* @__PURE__ */ o("div", { className: g["quality-feedback-title"], children: r("quality_feedback") }),
1640
+ /* @__PURE__ */ o(
1641
+ "span",
1642
+ {
1643
+ className: g["modal-close-icon"],
1644
+ onClick: n,
1645
+ children: /* @__PURE__ */ o(
1646
+ "svg",
1647
+ {
1648
+ xmlns: "http://www.w3.org/2000/svg",
1649
+ width: "34",
1650
+ height: "34",
1651
+ viewBox: "0 0 54 54",
1652
+ fill: "none",
1653
+ children: /* @__PURE__ */ o(
1654
+ "path",
1655
+ {
1656
+ d: "M49 7L28 28M28 28L49 49M28 28L7 7M28 28L7 49",
1657
+ stroke: "#9E9E9E",
1658
+ strokeWidth: "2.5",
1659
+ strokeLinecap: "round",
1660
+ strokeLinejoin: "round"
1661
+ }
1662
+ )
1663
+ }
1664
+ )
1665
+ }
1666
+ )
1667
+ ] }),
1668
+ /* @__PURE__ */ o("div", { className: g["metric-modal__body"], children: /* @__PURE__ */ w(S, { className: `${g["table-container"]}`, children: [
1669
+ /* @__PURE__ */ o(lt, { "aria-label": "simple table", children: /* @__PURE__ */ o(Sa, { className: `${g["table-head"]}`, children: /* @__PURE__ */ w(Ee, { children: [
1670
+ /* @__PURE__ */ o(
1671
+ ge,
1672
+ {
1673
+ align: "left",
1674
+ width: "30%",
1675
+ className: `${g["header-cell"]}`,
1676
+ onClick: () => d?.("studentUserName"),
1677
+ style: { cursor: "pointer" },
1678
+ children: /* @__PURE__ */ w(S, { className: "d-flex align-items-center", children: [
1679
+ r("student"),
1680
+ s(l?.sortBy === "studentUserName", l?.sortOrder || "ASC")
1681
+ ] })
1682
+ }
1683
+ ),
1684
+ /* @__PURE__ */ o(
1685
+ ge,
1686
+ {
1687
+ align: "center",
1688
+ width: "20%",
1689
+ className: `${g["header-cell"]}`,
1690
+ onClick: () => d?.("grade"),
1691
+ style: { cursor: "pointer" },
1692
+ children: /* @__PURE__ */ w(S, { className: "d-flex align-items-center justify-content-start", children: [
1693
+ r("grade"),
1694
+ s(l?.sortBy === "grade", l?.sortOrder || "ASC")
1695
+ ] })
1696
+ }
1697
+ ),
1698
+ /* @__PURE__ */ o(
1699
+ ge,
1700
+ {
1701
+ align: "left",
1702
+ width: "25%",
1703
+ className: `${g["header-cell"]}`,
1704
+ onClick: () => d?.("average"),
1705
+ style: { cursor: "pointer" },
1706
+ children: /* @__PURE__ */ w(S, { className: "d-flex align-items-center", children: [
1707
+ r("student_feedback"),
1708
+ s(l?.sortBy === "average", l?.sortOrder || "ASC")
1709
+ ] })
1710
+ }
1711
+ ),
1712
+ /* @__PURE__ */ o(
1713
+ ge,
1714
+ {
1715
+ align: "left",
1716
+ width: "25%",
1717
+ className: `${g["header-cell"]}`,
1718
+ children: /* @__PURE__ */ o(S, { className: "d-flex align-items-center", children: r("action") })
1719
+ }
1720
+ )
1721
+ ] }) }) }),
1722
+ /* @__PURE__ */ o(S, { className: `${g["table-body-container"]}`, children: /* @__PURE__ */ o(lt, { children: /* @__PURE__ */ o(Ca, { className: `${g["table-body"]}`, children: i != null && i.length > 0 ? i.map((u, m) => /* @__PURE__ */ w(
1723
+ Ee,
1724
+ {
1725
+ className: `${g["table-row"]} ${g["quality-feedback-row"]}`,
1726
+ children: [
1727
+ /* @__PURE__ */ o(ge, { align: "left", height: 52, style: { width: "30%" }, className: `${g["body-cell"]}`, children: /* @__PURE__ */ w(S, { className: "d-flex align-items-center h-100", children: [
1728
+ /* @__PURE__ */ o(
1729
+ "img",
1730
+ {
1731
+ src: u.avatarStudent ? st(u.avatarStudent) : Qr,
1732
+ alt: "",
1733
+ className: `${g.avatar_user} ${g["quality-feedback-avatar"]}`
1734
+ }
1735
+ ),
1736
+ u.studentUserName
1737
+ ] }) }),
1738
+ /* @__PURE__ */ o(ge, { align: "center", height: 52, style: { width: "20%" }, className: `${g["body-cell"]}`, children: /* @__PURE__ */ o(S, { className: "d-flex align-items-center h-100 justify-content-start", children: u.grade }) }),
1739
+ /* @__PURE__ */ o(ge, { align: "left", height: 52, style: { width: "25%" }, className: `${g["body-cell"]}`, children: /* @__PURE__ */ o(S, { className: "d-flex align-items-center h-100", children: u.average === 0 ? "Not done yet" : /* @__PURE__ */ w(aa, { children: [
1740
+ u.average,
1741
+ " ",
1742
+ /* @__PURE__ */ o("span", { className: `${g["tail-average"]}`, children: "/ 10" })
1743
+ ] }) }) }),
1744
+ /* @__PURE__ */ o(ge, { align: "left", height: 52, style: { width: "25%" }, className: `${g["body-cell"]}`, children: /* @__PURE__ */ o(S, { className: "d-flex align-center h-100", children: /* @__PURE__ */ w(
1745
+ S,
1746
+ {
1747
+ className: `d-flex align-items-center ${g["view-response-action"]}`,
1748
+ onClick: () => a(u),
1749
+ children: [
1750
+ /* @__PURE__ */ o(K, { className: `${g["action-text"]}`, children: r("view_1_1_note") }),
1751
+ /* @__PURE__ */ o(At, {})
1752
+ ]
1753
+ }
1754
+ ) }) })
1755
+ ]
1756
+ },
1757
+ m
1758
+ )) : /* @__PURE__ */ o(Ee, { children: /* @__PURE__ */ o(ge, { colSpan: 4, align: "center", children: r("no_data") }) }) }) }) })
1759
+ ] }) })
1760
+ ] })
1761
+ }
1762
+ );
1763
+ }
1764
+ const Gr = ({
1765
+ learningStrategies: t,
1766
+ classFontSize: e,
1767
+ print: n,
1768
+ loadingComplete: a = !0,
1769
+ students: r,
1770
+ openQualityFeedbackModal: i,
1771
+ handleOpenQualityFeedbackModal: l,
1772
+ handleCloseQualityFeedbackModal: d,
1773
+ handleViewDetailNote: c
1774
+ }) => {
1775
+ const { t: s } = ve(), m = (window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth) < 576;
1776
+ return /* @__PURE__ */ w(S, { children: [
1777
+ !n && /* @__PURE__ */ w(S, { className: `${g.explain}`, children: [
1778
+ /* @__PURE__ */ o(
1779
+ "img",
1780
+ {
1781
+ src: Re,
1782
+ alt: "",
1783
+ className: `${g["explain-icon"]}`
1784
+ }
1785
+ ),
1786
+ /* @__PURE__ */ o(K, { className: `${g["explain-text"]}`, children: s("the_data_presented_here_comes_from_the_1_1_conversations") })
1787
+ ] }),
1788
+ /* @__PURE__ */ o(
1789
+ S,
1790
+ {
1791
+ className: `${g["box-strategy"]} ${g[e]}`,
1792
+ style: n ? { flexDirection: "column" } : {},
1793
+ children: /* @__PURE__ */ w(S, { className: `${g["strategy-bar-chart"]}`, children: [
1794
+ /* @__PURE__ */ o(S, { className: `${g["block-header-chart"]}`, children: /* @__PURE__ */ w(S, { className: `${g["block-header-name"]}`, children: [
1795
+ /* @__PURE__ */ o("p", { className: `${g["title-chart"]}`, children: s("learning_strategies_usage_feedback") }),
1796
+ !n && /* @__PURE__ */ o("p", { className: `${g["description-chart"]}`, children: s("overview_of_learning_strategies_with_usage_stats_and_feedback") })
1797
+ ] }) }),
1798
+ /* @__PURE__ */ o(S, { className: "w-100 h-100", children: /* @__PURE__ */ o(
1799
+ S,
1800
+ {
1801
+ style: { marginLeft: m ? -410 : 0 },
1802
+ children: a ? /* @__PURE__ */ o(
1803
+ ka,
1804
+ {
1805
+ learningStrategies: t,
1806
+ handleOpenQualityFeedbackModal: l
1807
+ }
1808
+ ) : /* @__PURE__ */ o("div", { style: { width: "100%", height: 400, display: "flex", justifyContent: "center", alignItems: "center" }, children: /* @__PURE__ */ o(Oe, {}) })
1809
+ }
1810
+ ) })
1811
+ ] })
1812
+ }
1813
+ ),
1814
+ /* @__PURE__ */ o(
1815
+ Vr,
1816
+ {
1817
+ students: r,
1818
+ openPopoverListStudent: i,
1819
+ handleCloseListStudentModal: d,
1820
+ handleViewDetailNote: c
1821
+ }
1822
+ )
1823
+ ] });
1824
+ }, Jr = () => {
1825
+ const t = ut(), n = window.location.hostname.includes("iskenya"), a = Le((D) => D?.common?.user?.schoolName) || "", r = Le((D) => D?.common?.user), i = async (D) => {
1826
+ t(Ae(!0));
1827
+ try {
1828
+ const _ = (await qn({ ...D, grade: D.grades, roles: r.roles ?? [] })).data, T = l(_, D.startDate, D.endDate), C = document.createElement("a");
1829
+ C.href = T, C.download = `${a}_CheckIns_Report.csv`, C.click(), t(
1830
+ pe({
1831
+ type: "success",
1832
+ message: "Download Completed"
1833
+ })
1834
+ );
1835
+ } catch (x) {
1836
+ t(
1837
+ pe({
1838
+ type: "danger",
1839
+ message: x.response?.data?.title || x.message
1840
+ })
1841
+ );
1842
+ }
1843
+ t(Ae(!1));
1844
+ }, l = (D, x, _) => {
1845
+ let T = "Student Name,ID/Email,Question,Answer,Teacher,Start Time";
1846
+ (x || _) && (T = `"${G(x).isValid() ? "From: " + G(x).format("DD/MM/YYYY") : ""}${G(x).isValid() && G(_).isValid() ? " - " : ""}${G(_).isValid() ? "To: " + G(_).format("DD/MM/YYYY") : ""}"
1847
+ ${T}`);
1848
+ const {
1849
+ questions: C,
1850
+ strategyQuestions: $,
1851
+ sessions: M
1852
+ } = D, J = C.filter(
1853
+ (A) => A.type == Dt.Rating && !!A.isBeforeSession
1854
+ ).slice(0, 6), E = C.filter(
1855
+ (A) => A.type == Dt.Summarize && !!A.isBeforeSession
1856
+ ), oe = C.filter((A) => !!A.isBeforeSession).slice(7, n ? 12 : 13), ie = C.filter((A) => !A.isBeforeSession).slice(0, 4);
1857
+ let I = [];
1858
+ E.length > 0 && I.push(E[0]), I = [
1859
+ ...I,
1860
+ ...J,
1861
+ ...oe
1862
+ ];
1863
+ const R = M.map((A) => {
1864
+ const {
1865
+ answers: O,
1866
+ isUnlocked: ne,
1867
+ startTime: X,
1868
+ studentId: ue,
1869
+ studentName: xe,
1870
+ teacherName: ke,
1871
+ studentEmail: Z,
1872
+ strategyAnswers: ee,
1873
+ isOneToOneConversation: p
1874
+ } = A, y = c(xe), k = c(Z || `${ue}`), Q = c(ke), h = sa(X, "dd-MM-yyyy HH:mm:ss"), te = u(I, O, y, k, Q, h), Ce = p ? m($, ee, y, k, Q, h) : "", L = p && ne ? u(ie, O, y, k, Q, h) : "";
1875
+ return `${te}${Ce}${L}`;
1876
+ }).join("");
1877
+ return `${Yt}${T}${encodeURIComponent(R)}`;
1878
+ }, d = (D) => {
1879
+ const x = [
1880
+ ["amp", "&"],
1881
+ ["apos", "'"],
1882
+ ["#x27", "'"],
1883
+ ["#x2F", "/"],
1884
+ ["#39", "'"],
1885
+ ["#47", "/"],
1886
+ ["lt", "<"],
1887
+ ["gt", ">"],
1888
+ ["nbsp", " "],
1889
+ ["quot", '"']
1890
+ ];
1891
+ let _ = D.replace(/<[^>]+>/g, "");
1892
+ return x.forEach((T) => {
1893
+ _ = _.replace(new RegExp("&" + T[0] + ";", "g"), T[1]);
1894
+ }), _;
1895
+ }, c = (D) => D ? `"${D.replace(/"/g, '""').replaceAll(/\n/g, " ")}"` : "", s = (D) => D ? `"${D.replace(/"/g, '""')}"` : "", u = (D, x, _, T, C, $) => D.map((M) => {
1896
+ const J = x.find((E) => E.questionId === M.id);
1897
+ return `
1898
+ ${_},${T},${c(d(M.text))},${v(M.type, J?.text)},${C},${$}`;
1899
+ }).join(""), m = (D, x, _, T, C, $) => x.map((M) => {
1900
+ const { text: J } = M;
1901
+ return (J?.split(";") || []).map((ie) => {
1902
+ const I = ie.split("|"), R = I.length ? D.find((ne) => `${ne.id}` == I?.[0]) : null, A = R ? `${R.text}${R.questionText ? `/${R.questionText}` : ""}` : "", O = I.length > 1 ? I?.[1] : "";
1903
+ return A ? `
1904
+ ${_},${T},${c(A)},${O?.length > 0 ? `${O}%` : ""},${C},${$}` : "";
1905
+ }).join("");
1906
+ }), v = (D, x) => D === Dt.Rating ? x?.length ? `${x}%` : "" : c(x || ""), b = (D, x, _) => {
1907
+ let T = "Name of Student,Grade,Name of Educator,Number of Conversations,Conversations Date";
1908
+ (x || _) && (T = `"${G(x).isValid() ? "From: " + G(x).format("DD/MM/YYYY") : ""}${G(x).isValid() && G(_).isValid() ? " - " : ""}${G(_).isValid() ? "To: " + G(_).format("DD/MM/YYYY") : ""}"
1909
+ ${T}`);
1910
+ const C = D.map(($) => {
1911
+ const M = s($.studentName), J = s($.educatorNames.join(`
1912
+ `)), E = s($.gradeLevel), oe = $.conversationCount, ie = s($.conversationDates.map((I) => G(I).format("Do MMMM YYYY")).join(`
1913
+ `));
1914
+ return `
1915
+ ${M},${E},${J},${oe},${ie}`;
1916
+ }).join("");
1917
+ return `${Yt}${T}${encodeURIComponent(C)}`;
1918
+ };
1919
+ return {
1920
+ exportSessionsCsv: i,
1921
+ exportStudentConversationCsv: async (D) => {
1922
+ t(Ae(!0));
1923
+ try {
1924
+ const _ = (await oa({ ...D, roles: r.roles ?? [], grade: D.grades ?? [] })).data;
1925
+ if (_ && _.length > 0) {
1926
+ const T = b(_, D.startDate, D.endDate), C = document.createElement("a");
1927
+ C.href = T, C.download = `${a}_Conversations_Report.csv`, C.click(), t(
1928
+ pe({
1929
+ type: "success",
1930
+ message: "Download Completed"
1931
+ })
1932
+ );
1933
+ } else
1934
+ t(
1935
+ pe({
1936
+ type: "warning",
1937
+ message: "No data to export"
1938
+ })
1939
+ );
1940
+ } catch (x) {
1941
+ t(
1942
+ pe({
1943
+ type: "danger",
1944
+ message: x.response?.data?.title || x.message
1945
+ })
1946
+ );
1947
+ }
1948
+ t(Ae(!1));
1949
+ }
1950
+ };
1951
+ };
1952
+ function $a(t, e, n, a, r) {
1953
+ a = a || {};
1954
+ var i = 1.15, l = r.internal.scaleFactor, d = r.internal.getFontSize() / l, c = r.getLineHeightFactor ? r.getLineHeightFactor() : i, s = d * c, u = /\r\n|\r|\n/g, m = "", v = 1;
1955
+ if ((a.valign === "middle" || a.valign === "bottom" || a.halign === "center" || a.halign === "right") && (m = typeof t == "string" ? t.split(u) : t, v = m.length || 1), n += d * (2 - i), a.valign === "middle" ? n -= v / 2 * s : a.valign === "bottom" && (n -= v * s), a.halign === "center" || a.halign === "right") {
1956
+ var b = d;
1957
+ if (a.halign === "center" && (b *= 0.5), m && v >= 1) {
1958
+ for (var N = 0; N < m.length; N++)
1959
+ r.text(m[N], e - r.getStringUnitWidth(m[N]) * b, n), n += s;
1960
+ return r;
1961
+ }
1962
+ e -= r.getStringUnitWidth(t) * b;
1963
+ }
1964
+ return a.halign === "justify" ? r.text(t, e, n, { maxWidth: a.maxWidth || 100, align: "justify" }) : r.text(t, e, n), r;
1965
+ }
1966
+ var Vt = {}, He = (
1967
+ /** @class */
1968
+ (function() {
1969
+ function t(e) {
1970
+ this.jsPDFDocument = e, this.userStyles = {
1971
+ // Black for versions of jspdf without getTextColor
1972
+ textColor: e.getTextColor ? this.jsPDFDocument.getTextColor() : 0,
1973
+ fontSize: e.internal.getFontSize(),
1974
+ fontStyle: e.internal.getFont().fontStyle,
1975
+ font: e.internal.getFont().fontName,
1976
+ // 0 for versions of jspdf without getLineWidth
1977
+ lineWidth: e.getLineWidth ? this.jsPDFDocument.getLineWidth() : 0,
1978
+ // Black for versions of jspdf without getDrawColor
1979
+ lineColor: e.getDrawColor ? this.jsPDFDocument.getDrawColor() : 0
1980
+ };
1981
+ }
1982
+ return t.setDefaults = function(e, n) {
1983
+ n === void 0 && (n = null), n ? n.__autoTableDocumentDefaults = e : Vt = e;
1984
+ }, t.unifyColor = function(e) {
1985
+ return Array.isArray(e) ? e : typeof e == "number" ? [e, e, e] : typeof e == "string" ? [e] : null;
1986
+ }, t.prototype.applyStyles = function(e, n) {
1987
+ var a, r, i;
1988
+ n === void 0 && (n = !1), e.fontStyle && this.jsPDFDocument.setFontStyle && this.jsPDFDocument.setFontStyle(e.fontStyle);
1989
+ var l = this.jsPDFDocument.internal.getFont(), d = l.fontStyle, c = l.fontName;
1990
+ if (e.font && (c = e.font), e.fontStyle) {
1991
+ d = e.fontStyle;
1992
+ var s = this.getFontList()[c];
1993
+ s && s.indexOf(d) === -1 && this.jsPDFDocument.setFontStyle && (this.jsPDFDocument.setFontStyle(s[0]), d = s[0]);
1994
+ }
1995
+ if (this.jsPDFDocument.setFont(c, d), e.fontSize && this.jsPDFDocument.setFontSize(e.fontSize), !n) {
1996
+ var u = t.unifyColor(e.fillColor);
1997
+ u && (a = this.jsPDFDocument).setFillColor.apply(a, u), u = t.unifyColor(e.textColor), u && (r = this.jsPDFDocument).setTextColor.apply(r, u), u = t.unifyColor(e.lineColor), u && (i = this.jsPDFDocument).setDrawColor.apply(i, u), typeof e.lineWidth == "number" && this.jsPDFDocument.setLineWidth(e.lineWidth);
1998
+ }
1999
+ }, t.prototype.splitTextToSize = function(e, n, a) {
2000
+ return this.jsPDFDocument.splitTextToSize(e, n, a);
2001
+ }, t.prototype.rect = function(e, n, a, r, i) {
2002
+ return this.jsPDFDocument.rect(e, n, a, r, i);
2003
+ }, t.prototype.getLastAutoTable = function() {
2004
+ return this.jsPDFDocument.lastAutoTable || null;
2005
+ }, t.prototype.getTextWidth = function(e) {
2006
+ return this.jsPDFDocument.getTextWidth(e);
2007
+ }, t.prototype.getDocument = function() {
2008
+ return this.jsPDFDocument;
2009
+ }, t.prototype.setPage = function(e) {
2010
+ this.jsPDFDocument.setPage(e);
2011
+ }, t.prototype.addPage = function() {
2012
+ return this.jsPDFDocument.addPage();
2013
+ }, t.prototype.getFontList = function() {
2014
+ return this.jsPDFDocument.getFontList();
2015
+ }, t.prototype.getGlobalOptions = function() {
2016
+ return Vt || {};
2017
+ }, t.prototype.getDocumentOptions = function() {
2018
+ return this.jsPDFDocument.__autoTableDocumentDefaults || {};
2019
+ }, t.prototype.pageSize = function() {
2020
+ var e = this.jsPDFDocument.internal.pageSize;
2021
+ return e.width == null && (e = { width: e.getWidth(), height: e.getHeight() }), e;
2022
+ }, t.prototype.scaleFactor = function() {
2023
+ return this.jsPDFDocument.internal.scaleFactor;
2024
+ }, t.prototype.getLineHeightFactor = function() {
2025
+ var e = this.jsPDFDocument;
2026
+ return e.getLineHeightFactor ? e.getLineHeightFactor() : 1.15;
2027
+ }, t.prototype.getLineHeight = function(e) {
2028
+ return e / this.scaleFactor() * this.getLineHeightFactor();
2029
+ }, t.prototype.pageNumber = function() {
2030
+ var e = this.jsPDFDocument.internal.getCurrentPageInfo();
2031
+ return e ? e.pageNumber : this.jsPDFDocument.internal.getNumberOfPages();
2032
+ }, t;
2033
+ })()
2034
+ ), Lt = function(t, e) {
2035
+ return Lt = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, a) {
2036
+ n.__proto__ = a;
2037
+ } || function(n, a) {
2038
+ for (var r in a) Object.prototype.hasOwnProperty.call(a, r) && (n[r] = a[r]);
2039
+ }, Lt(t, e);
2040
+ };
2041
+ function Ta(t, e) {
2042
+ if (typeof e != "function" && e !== null)
2043
+ throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
2044
+ Lt(t, e);
2045
+ function n() {
2046
+ this.constructor = t;
2047
+ }
2048
+ t.prototype = e === null ? Object.create(e) : (n.prototype = e.prototype, new n());
2049
+ }
2050
+ var Wa = (
2051
+ /** @class */
2052
+ (function(t) {
2053
+ Ta(e, t);
2054
+ function e(n) {
2055
+ var a = t.call(this) || this;
2056
+ return a._element = n, a;
2057
+ }
2058
+ return e;
2059
+ })(Array)
2060
+ );
2061
+ function Kr(t) {
2062
+ return {
2063
+ font: "helvetica",
2064
+ // helvetica, times, courier
2065
+ fontStyle: "normal",
2066
+ // normal, bold, italic, bolditalic
2067
+ overflow: "linebreak",
2068
+ // linebreak, ellipsize, visible or hidden
2069
+ fillColor: !1,
2070
+ // Either false for transparent, rbg array e.g. [255, 255, 255] or gray level e.g 200
2071
+ textColor: 20,
2072
+ halign: "left",
2073
+ // left, center, right, justify
2074
+ valign: "top",
2075
+ // top, middle, bottom
2076
+ fontSize: 10,
2077
+ cellPadding: 5 / t,
2078
+ // number or {top,left,right,left,vertical,horizontal}
2079
+ lineColor: 200,
2080
+ lineWidth: 0,
2081
+ cellWidth: "auto",
2082
+ // 'auto'|'wrap'|number
2083
+ minCellHeight: 0,
2084
+ minCellWidth: 0
2085
+ };
2086
+ }
2087
+ function Xr(t) {
2088
+ var e = {
2089
+ striped: {
2090
+ table: { fillColor: 255, textColor: 80, fontStyle: "normal" },
2091
+ head: { textColor: 255, fillColor: [41, 128, 185], fontStyle: "bold" },
2092
+ body: {},
2093
+ foot: { textColor: 255, fillColor: [41, 128, 185], fontStyle: "bold" },
2094
+ alternateRow: { fillColor: 245 }
2095
+ },
2096
+ grid: {
2097
+ table: {
2098
+ fillColor: 255,
2099
+ textColor: 80,
2100
+ fontStyle: "normal",
2101
+ lineWidth: 0.1
2102
+ },
2103
+ head: {
2104
+ textColor: 255,
2105
+ fillColor: [26, 188, 156],
2106
+ fontStyle: "bold",
2107
+ lineWidth: 0
2108
+ },
2109
+ body: {},
2110
+ foot: {
2111
+ textColor: 255,
2112
+ fillColor: [26, 188, 156],
2113
+ fontStyle: "bold",
2114
+ lineWidth: 0
2115
+ },
2116
+ alternateRow: {}
2117
+ },
2118
+ plain: { head: { fontStyle: "bold" }, foot: { fontStyle: "bold" } }
2119
+ };
2120
+ return e[t];
2121
+ }
2122
+ function dt(t, e, n) {
2123
+ n.applyStyles(e, !0);
2124
+ var a = Array.isArray(t) ? t : [t], r = a.map(function(i) {
2125
+ return n.getTextWidth(i);
2126
+ }).reduce(function(i, l) {
2127
+ return Math.max(i, l);
2128
+ }, 0);
2129
+ return r;
2130
+ }
2131
+ function La(t, e, n, a) {
2132
+ var r = e.settings.tableLineWidth, i = e.settings.tableLineColor;
2133
+ t.applyStyles({ lineWidth: r, lineColor: i });
2134
+ var l = Pa(r, !1);
2135
+ l && t.rect(n.x, n.y, e.getWidth(t.pageSize().width), a.y - n.y, l);
2136
+ }
2137
+ function Pa(t, e) {
2138
+ var n = t > 0, a = e || e === 0;
2139
+ return n && a ? "DF" : n ? "S" : a ? "F" : null;
2140
+ }
2141
+ function gt(t, e) {
2142
+ var n, a, r, i;
2143
+ if (t = t || e, Array.isArray(t)) {
2144
+ if (t.length >= 4)
2145
+ return {
2146
+ top: t[0],
2147
+ right: t[1],
2148
+ bottom: t[2],
2149
+ left: t[3]
2150
+ };
2151
+ if (t.length === 3)
2152
+ return {
2153
+ top: t[0],
2154
+ right: t[1],
2155
+ bottom: t[2],
2156
+ left: t[1]
2157
+ };
2158
+ if (t.length === 2)
2159
+ return {
2160
+ top: t[0],
2161
+ right: t[1],
2162
+ bottom: t[0],
2163
+ left: t[1]
2164
+ };
2165
+ t.length === 1 ? t = t[0] : t = e;
2166
+ }
2167
+ return typeof t == "object" ? (typeof t.vertical == "number" && (t.top = t.vertical, t.bottom = t.vertical), typeof t.horizontal == "number" && (t.right = t.horizontal, t.left = t.horizontal), {
2168
+ left: (n = t.left) !== null && n !== void 0 ? n : e,
2169
+ top: (a = t.top) !== null && a !== void 0 ? a : e,
2170
+ right: (r = t.right) !== null && r !== void 0 ? r : e,
2171
+ bottom: (i = t.bottom) !== null && i !== void 0 ? i : e
2172
+ }) : (typeof t != "number" && (t = e), { top: t, right: t, bottom: t, left: t });
2173
+ }
2174
+ function Ma(t, e) {
2175
+ var n = gt(e.settings.margin, 0);
2176
+ return t.pageSize().width - (n.left + n.right);
2177
+ }
2178
+ function Zr(t, e, n, a, r) {
2179
+ var i = {}, l = 1.3333333333333333, d = _t(e, function(C) {
2180
+ return r.getComputedStyle(C).backgroundColor;
2181
+ });
2182
+ d != null && (i.fillColor = d);
2183
+ var c = _t(e, function(C) {
2184
+ return r.getComputedStyle(C).color;
2185
+ });
2186
+ c != null && (i.textColor = c);
2187
+ var s = ti(a, n);
2188
+ s && (i.cellPadding = s);
2189
+ var u = "borderTopColor", m = l * n, v = a.borderTopWidth;
2190
+ if (a.borderBottomWidth === v && a.borderRightWidth === v && a.borderLeftWidth === v) {
2191
+ var b = (parseFloat(v) || 0) / m;
2192
+ b && (i.lineWidth = b);
2193
+ } else
2194
+ i.lineWidth = {
2195
+ top: (parseFloat(a.borderTopWidth) || 0) / m,
2196
+ right: (parseFloat(a.borderRightWidth) || 0) / m,
2197
+ bottom: (parseFloat(a.borderBottomWidth) || 0) / m,
2198
+ left: (parseFloat(a.borderLeftWidth) || 0) / m
2199
+ }, i.lineWidth.top || (i.lineWidth.right ? u = "borderRightColor" : i.lineWidth.bottom ? u = "borderBottomColor" : i.lineWidth.left && (u = "borderLeftColor"));
2200
+ var N = _t(e, function(C) {
2201
+ return r.getComputedStyle(C)[u];
2202
+ });
2203
+ N != null && (i.lineColor = N);
2204
+ var D = ["left", "right", "center", "justify"];
2205
+ D.indexOf(a.textAlign) !== -1 && (i.halign = a.textAlign), D = ["middle", "bottom", "top"], D.indexOf(a.verticalAlign) !== -1 && (i.valign = a.verticalAlign);
2206
+ var x = parseInt(a.fontSize || "");
2207
+ isNaN(x) || (i.fontSize = x / l);
2208
+ var _ = ei(a);
2209
+ _ && (i.fontStyle = _);
2210
+ var T = (a.fontFamily || "").toLowerCase();
2211
+ return t.indexOf(T) !== -1 && (i.font = T), i;
2212
+ }
2213
+ function ei(t) {
2214
+ var e = "";
2215
+ return (t.fontWeight === "bold" || t.fontWeight === "bolder" || parseInt(t.fontWeight) >= 700) && (e = "bold"), (t.fontStyle === "italic" || t.fontStyle === "oblique") && (e += "italic"), e;
2216
+ }
2217
+ function _t(t, e) {
2218
+ var n = Aa(t, e);
2219
+ if (!n)
2220
+ return null;
2221
+ var a = n.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d*\.?\d*))?\)$/);
2222
+ if (!a || !Array.isArray(a))
2223
+ return null;
2224
+ var r = [
2225
+ parseInt(a[1]),
2226
+ parseInt(a[2]),
2227
+ parseInt(a[3])
2228
+ ], i = parseInt(a[4]);
2229
+ return i === 0 || isNaN(r[0]) || isNaN(r[1]) || isNaN(r[2]) ? null : r;
2230
+ }
2231
+ function Aa(t, e) {
2232
+ var n = e(t);
2233
+ return n === "rgba(0, 0, 0, 0)" || n === "transparent" || n === "initial" || n === "inherit" ? t.parentElement == null ? null : Aa(t.parentElement, e) : n;
2234
+ }
2235
+ function ti(t, e) {
2236
+ var n = [
2237
+ t.paddingTop,
2238
+ t.paddingRight,
2239
+ t.paddingBottom,
2240
+ t.paddingLeft
2241
+ ], a = 96 / (72 / e), r = (parseInt(t.lineHeight) - parseInt(t.fontSize)) / e / 2, i = n.map(function(d) {
2242
+ return parseInt(d || "0") / a;
2243
+ }), l = gt(i, 0);
2244
+ return r > l.top && (l.top = r), r > l.bottom && (l.bottom = r), l;
2245
+ }
2246
+ function Oa(t, e, n, a, r) {
2247
+ var i, l;
2248
+ a === void 0 && (a = !1), r === void 0 && (r = !1);
2249
+ var d;
2250
+ typeof e == "string" ? d = n.document.querySelector(e) : d = e;
2251
+ var c = Object.keys(t.getFontList()), s = t.scaleFactor(), u = [], m = [], v = [];
2252
+ if (!d)
2253
+ return console.error("Html table could not be found with input: ", e), { head: u, body: m, foot: v };
2254
+ for (var b = 0; b < d.rows.length; b++) {
2255
+ var N = d.rows[b], D = (l = (i = N?.parentElement) === null || i === void 0 ? void 0 : i.tagName) === null || l === void 0 ? void 0 : l.toLowerCase(), x = ai(c, s, n, N, a, r);
2256
+ x && (D === "thead" ? u.push(x) : D === "tfoot" ? v.push(x) : m.push(x));
2257
+ }
2258
+ return { head: u, body: m, foot: v };
2259
+ }
2260
+ function ai(t, e, n, a, r, i) {
2261
+ for (var l = new Wa(a), d = 0; d < a.cells.length; d++) {
2262
+ var c = a.cells[d], s = n.getComputedStyle(c);
2263
+ if (r || s.display !== "none") {
2264
+ var u = void 0;
2265
+ i && (u = Zr(t, c, e, s, n)), l.push({
2266
+ rowSpan: c.rowSpan,
2267
+ colSpan: c.colSpan,
2268
+ styles: u,
2269
+ _element: c,
2270
+ content: ni(c)
2271
+ });
2272
+ }
2273
+ }
2274
+ var m = n.getComputedStyle(a);
2275
+ if (l.length > 0 && (r || m.display !== "none"))
2276
+ return l;
2277
+ }
2278
+ function ni(t) {
2279
+ var e = t.cloneNode(!0);
2280
+ return e.innerHTML = e.innerHTML.replace(/\n/g, "").replace(/ +/g, " "), e.innerHTML = e.innerHTML.split(/<br.*?>/).map(function(n) {
2281
+ return n.trim();
2282
+ }).join(`
2283
+ `), e.innerText || e.textContent || "";
2284
+ }
2285
+ function ri(t, e, n) {
2286
+ for (var a = 0, r = [t, e, n]; a < r.length; a++) {
2287
+ var i = r[a];
2288
+ i && typeof i != "object" && console.error("The options parameter should be of type object, is: " + typeof i), i.startY && typeof i.startY != "number" && (console.error("Invalid value for startY option", i.startY), delete i.startY);
2289
+ }
2290
+ }
2291
+ function Fe(t, e, n, a, r) {
2292
+ if (t == null)
2293
+ throw new TypeError("Cannot convert undefined or null to object");
2294
+ for (var i = Object(t), l = 1; l < arguments.length; l++) {
2295
+ var d = arguments[l];
2296
+ if (d != null)
2297
+ for (var c in d)
2298
+ Object.prototype.hasOwnProperty.call(d, c) && (i[c] = d[c]);
2299
+ }
2300
+ return i;
2301
+ }
2302
+ function Ha(t, e) {
2303
+ var n = new He(t), a = n.getDocumentOptions(), r = n.getGlobalOptions();
2304
+ ri(r, a, e);
2305
+ var i = Fe({}, r, a, e), l;
2306
+ typeof window < "u" && (l = window);
2307
+ var d = ii(r, a, e), c = si(r, a, e), s = oi(n, i), u = di(n, i, l);
2308
+ return { id: e.tableId, content: u, hooks: c, styles: d, settings: s };
2309
+ }
2310
+ function ii(t, e, n) {
2311
+ for (var a = {
2312
+ styles: {},
2313
+ headStyles: {},
2314
+ bodyStyles: {},
2315
+ footStyles: {},
2316
+ alternateRowStyles: {},
2317
+ columnStyles: {}
2318
+ }, r = function(c) {
2319
+ if (c === "columnStyles") {
2320
+ var s = t[c], u = e[c], m = n[c];
2321
+ a.columnStyles = Fe({}, s, u, m);
2322
+ } else {
2323
+ var v = [t, e, n], b = v.map(function(N) {
2324
+ return N[c] || {};
2325
+ });
2326
+ a[c] = Fe({}, b[0], b[1], b[2]);
2327
+ }
2328
+ }, i = 0, l = Object.keys(a); i < l.length; i++) {
2329
+ var d = l[i];
2330
+ r(d);
2331
+ }
2332
+ return a;
2333
+ }
2334
+ function si(t, e, n) {
2335
+ for (var a = [t, e, n], r = {
2336
+ didParseCell: [],
2337
+ willDrawCell: [],
2338
+ didDrawCell: [],
2339
+ willDrawPage: [],
2340
+ didDrawPage: []
2341
+ }, i = 0, l = a; i < l.length; i++) {
2342
+ var d = l[i];
2343
+ d.didParseCell && r.didParseCell.push(d.didParseCell), d.willDrawCell && r.willDrawCell.push(d.willDrawCell), d.didDrawCell && r.didDrawCell.push(d.didDrawCell), d.willDrawPage && r.willDrawPage.push(d.willDrawPage), d.didDrawPage && r.didDrawPage.push(d.didDrawPage);
2344
+ }
2345
+ return r;
2346
+ }
2347
+ function oi(t, e) {
2348
+ var n, a, r, i, l, d, c, s, u, m, v, b, N = gt(e.margin, 40 / t.scaleFactor()), D = (n = li(t, e.startY)) !== null && n !== void 0 ? n : N.top, x;
2349
+ e.showFoot === !0 ? x = "everyPage" : e.showFoot === !1 ? x = "never" : x = (a = e.showFoot) !== null && a !== void 0 ? a : "everyPage";
2350
+ var _;
2351
+ e.showHead === !0 ? _ = "everyPage" : e.showHead === !1 ? _ = "never" : _ = (r = e.showHead) !== null && r !== void 0 ? r : "everyPage";
2352
+ var T = (i = e.useCss) !== null && i !== void 0 ? i : !1, C = e.theme || (T ? "plain" : "striped"), $ = !!e.horizontalPageBreak, M = (l = e.horizontalPageBreakRepeat) !== null && l !== void 0 ? l : null;
2353
+ return {
2354
+ includeHiddenHtml: (d = e.includeHiddenHtml) !== null && d !== void 0 ? d : !1,
2355
+ useCss: T,
2356
+ theme: C,
2357
+ startY: D,
2358
+ margin: N,
2359
+ pageBreak: (c = e.pageBreak) !== null && c !== void 0 ? c : "auto",
2360
+ rowPageBreak: (s = e.rowPageBreak) !== null && s !== void 0 ? s : "auto",
2361
+ tableWidth: (u = e.tableWidth) !== null && u !== void 0 ? u : "auto",
2362
+ showHead: _,
2363
+ showFoot: x,
2364
+ tableLineWidth: (m = e.tableLineWidth) !== null && m !== void 0 ? m : 0,
2365
+ tableLineColor: (v = e.tableLineColor) !== null && v !== void 0 ? v : 200,
2366
+ horizontalPageBreak: $,
2367
+ horizontalPageBreakRepeat: M,
2368
+ horizontalPageBreakBehaviour: (b = e.horizontalPageBreakBehaviour) !== null && b !== void 0 ? b : "afterAllRows"
2369
+ };
2370
+ }
2371
+ function li(t, e) {
2372
+ var n = t.getLastAutoTable(), a = t.scaleFactor(), r = t.pageNumber(), i = !1;
2373
+ if (n && n.startPageNumber) {
2374
+ var l = n.startPageNumber + n.pageNumber - 1;
2375
+ i = l === r;
2376
+ }
2377
+ return typeof e == "number" ? e : (e == null || e === !1) && i && n?.finalY != null ? n.finalY + 20 / a : null;
2378
+ }
2379
+ function di(t, e, n) {
2380
+ var a = e.head || [], r = e.body || [], i = e.foot || [];
2381
+ if (e.html) {
2382
+ var l = e.includeHiddenHtml;
2383
+ if (n) {
2384
+ var d = Oa(t, e.html, n, l, e.useCss) || {};
2385
+ a = d.head || a, r = d.body || a, i = d.foot || a;
2386
+ } else
2387
+ console.error("Cannot parse html in non browser environment");
2388
+ }
2389
+ var c = e.columns || ci(a, r, i);
2390
+ return { columns: c, head: a, body: r, foot: i };
2391
+ }
2392
+ function ci(t, e, n) {
2393
+ var a = t[0] || e[0] || n[0] || [], r = [];
2394
+ return Object.keys(a).filter(function(i) {
2395
+ return i !== "_element";
2396
+ }).forEach(function(i) {
2397
+ var l = 1, d;
2398
+ Array.isArray(a) ? d = a[parseInt(i)] : d = a[i], typeof d == "object" && !Array.isArray(d) && (l = d?.colSpan || 1);
2399
+ for (var c = 0; c < l; c++) {
2400
+ var s = void 0;
2401
+ Array.isArray(a) ? s = r.length : s = i + (c > 0 ? "_".concat(c) : "");
2402
+ var u = { dataKey: s };
2403
+ r.push(u);
2404
+ }
2405
+ }), r;
2406
+ }
2407
+ var Pt = (
2408
+ /** @class */
2409
+ /* @__PURE__ */ (function() {
2410
+ function t(e, n, a) {
2411
+ this.table = n, this.pageNumber = n.pageNumber, this.settings = n.settings, this.cursor = a, this.doc = e.getDocument();
2412
+ }
2413
+ return t;
2414
+ })()
2415
+ ), hi = (
2416
+ /** @class */
2417
+ (function(t) {
2418
+ Ta(e, t);
2419
+ function e(n, a, r, i, l, d) {
2420
+ var c = t.call(this, n, a, d) || this;
2421
+ return c.cell = r, c.row = i, c.column = l, c.section = i.section, c;
2422
+ }
2423
+ return e;
2424
+ })(Pt)
2425
+ ), ui = (
2426
+ /** @class */
2427
+ (function() {
2428
+ function t(e, n) {
2429
+ this.pageNumber = 1, this.id = e.id, this.settings = e.settings, this.styles = e.styles, this.hooks = e.hooks, this.columns = n.columns, this.head = n.head, this.body = n.body, this.foot = n.foot;
2430
+ }
2431
+ return t.prototype.getHeadHeight = function(e) {
2432
+ return this.head.reduce(function(n, a) {
2433
+ return n + a.getMaxCellHeight(e);
2434
+ }, 0);
2435
+ }, t.prototype.getFootHeight = function(e) {
2436
+ return this.foot.reduce(function(n, a) {
2437
+ return n + a.getMaxCellHeight(e);
2438
+ }, 0);
2439
+ }, t.prototype.allRows = function() {
2440
+ return this.head.concat(this.body).concat(this.foot);
2441
+ }, t.prototype.callCellHooks = function(e, n, a, r, i, l) {
2442
+ for (var d = 0, c = n; d < c.length; d++) {
2443
+ var s = c[d], u = new hi(e, this, a, r, i, l), m = s(u) === !1;
2444
+ if (a.text = Array.isArray(a.text) ? a.text : [a.text], m)
2445
+ return !1;
2446
+ }
2447
+ return !0;
2448
+ }, t.prototype.callEndPageHooks = function(e, n) {
2449
+ e.applyStyles(e.userStyles);
2450
+ for (var a = 0, r = this.hooks.didDrawPage; a < r.length; a++) {
2451
+ var i = r[a];
2452
+ i(new Pt(e, this, n));
2453
+ }
2454
+ }, t.prototype.callWillDrawPageHooks = function(e, n) {
2455
+ for (var a = 0, r = this.hooks.willDrawPage; a < r.length; a++) {
2456
+ var i = r[a];
2457
+ i(new Pt(e, this, n));
2458
+ }
2459
+ }, t.prototype.getWidth = function(e) {
2460
+ if (typeof this.settings.tableWidth == "number")
2461
+ return this.settings.tableWidth;
2462
+ if (this.settings.tableWidth === "wrap") {
2463
+ var n = this.columns.reduce(function(r, i) {
2464
+ return r + i.wrappedWidth;
2465
+ }, 0);
2466
+ return n;
2467
+ } else {
2468
+ var a = this.settings.margin;
2469
+ return e - a.left - a.right;
2470
+ }
2471
+ }, t;
2472
+ })()
2473
+ ), Ra = (
2474
+ /** @class */
2475
+ (function() {
2476
+ function t(e, n, a, r, i) {
2477
+ i === void 0 && (i = !1), this.height = 0, this.raw = e, e instanceof Wa && (this.raw = e._element, this.element = e._element), this.index = n, this.section = a, this.cells = r, this.spansMultiplePages = i;
2478
+ }
2479
+ return t.prototype.getMaxCellHeight = function(e) {
2480
+ var n = this;
2481
+ return e.reduce(function(a, r) {
2482
+ var i;
2483
+ return Math.max(a, ((i = n.cells[r.index]) === null || i === void 0 ? void 0 : i.height) || 0);
2484
+ }, 0);
2485
+ }, t.prototype.hasRowSpan = function(e) {
2486
+ var n = this;
2487
+ return e.filter(function(a) {
2488
+ var r = n.cells[a.index];
2489
+ return r ? r.rowSpan > 1 : !1;
2490
+ }).length > 0;
2491
+ }, t.prototype.canEntireRowFit = function(e, n) {
2492
+ return this.getMaxCellHeight(n) <= e;
2493
+ }, t.prototype.getMinimumRowHeight = function(e, n) {
2494
+ var a = this;
2495
+ return e.reduce(function(r, i) {
2496
+ var l = a.cells[i.index];
2497
+ if (!l)
2498
+ return 0;
2499
+ var d = n.getLineHeight(l.styles.fontSize), c = l.padding("vertical"), s = c + d;
2500
+ return s > r ? s : r;
2501
+ }, 0);
2502
+ }, t;
2503
+ })()
2504
+ ), Ia = (
2505
+ /** @class */
2506
+ (function() {
2507
+ function t(e, n, a) {
2508
+ var r;
2509
+ this.contentHeight = 0, this.contentWidth = 0, this.wrappedWidth = 0, this.minReadableWidth = 0, this.minWidth = 0, this.width = 0, this.height = 0, this.x = 0, this.y = 0, this.styles = n, this.section = a, this.raw = e;
2510
+ var i = e;
2511
+ e != null && typeof e == "object" && !Array.isArray(e) ? (this.rowSpan = e.rowSpan || 1, this.colSpan = e.colSpan || 1, i = (r = e.content) !== null && r !== void 0 ? r : e, e._element && (this.raw = e._element)) : (this.rowSpan = 1, this.colSpan = 1);
2512
+ var l = i != null ? "" + i : "", d = /\r\n|\r|\n/g;
2513
+ this.text = l.split(d);
2514
+ }
2515
+ return t.prototype.getTextPos = function() {
2516
+ var e;
2517
+ if (this.styles.valign === "top")
2518
+ e = this.y + this.padding("top");
2519
+ else if (this.styles.valign === "bottom")
2520
+ e = this.y + this.height - this.padding("bottom");
2521
+ else {
2522
+ var n = this.height - this.padding("vertical");
2523
+ e = this.y + n / 2 + this.padding("top");
2524
+ }
2525
+ var a;
2526
+ if (this.styles.halign === "right")
2527
+ a = this.x + this.width - this.padding("right");
2528
+ else if (this.styles.halign === "center") {
2529
+ var r = this.width - this.padding("horizontal");
2530
+ a = this.x + r / 2 + this.padding("left");
2531
+ } else
2532
+ a = this.x + this.padding("left");
2533
+ return { x: a, y: e };
2534
+ }, t.prototype.getContentHeight = function(e, n) {
2535
+ n === void 0 && (n = 1.15);
2536
+ var a = Array.isArray(this.text) ? this.text.length : 1, r = this.styles.fontSize / e * n, i = a * r + this.padding("vertical");
2537
+ return Math.max(i, this.styles.minCellHeight);
2538
+ }, t.prototype.padding = function(e) {
2539
+ var n = gt(this.styles.cellPadding, 0);
2540
+ return e === "vertical" ? n.top + n.bottom : e === "horizontal" ? n.left + n.right : n[e];
2541
+ }, t;
2542
+ })()
2543
+ ), gi = (
2544
+ /** @class */
2545
+ (function() {
2546
+ function t(e, n, a) {
2547
+ this.wrappedWidth = 0, this.minReadableWidth = 0, this.minWidth = 0, this.width = 0, this.dataKey = e, this.raw = n, this.index = a;
2548
+ }
2549
+ return t.prototype.getMaxCustomCellWidth = function(e) {
2550
+ for (var n = 0, a = 0, r = e.allRows(); a < r.length; a++) {
2551
+ var i = r[a], l = i.cells[this.index];
2552
+ l && typeof l.styles.cellWidth == "number" && (n = Math.max(n, l.styles.cellWidth));
2553
+ }
2554
+ return n;
2555
+ }, t;
2556
+ })()
2557
+ );
2558
+ function mi(t, e) {
2559
+ fi(t, e);
2560
+ var n = [], a = 0;
2561
+ e.columns.forEach(function(i) {
2562
+ var l = i.getMaxCustomCellWidth(e);
2563
+ l ? i.width = l : (i.width = i.wrappedWidth, n.push(i)), a += i.width;
2564
+ });
2565
+ var r = e.getWidth(t.pageSize().width) - a;
2566
+ r && (r = Mt(n, r, function(i) {
2567
+ return Math.max(i.minReadableWidth, i.minWidth);
2568
+ })), r && (r = Mt(n, r, function(i) {
2569
+ return i.minWidth;
2570
+ })), r = Math.abs(r), !e.settings.horizontalPageBreak && r > 0.1 / t.scaleFactor() && (r = r < 1 ? r : Math.round(r), console.log("Of the table content, ".concat(r, " units width could not fit page"))), vi(e), yi(e, t), pi(e);
2571
+ }
2572
+ function fi(t, e) {
2573
+ var n = t.scaleFactor(), a = e.settings.horizontalPageBreak, r = Ma(t, e);
2574
+ e.allRows().forEach(function(i) {
2575
+ for (var l = 0, d = e.columns; l < d.length; l++) {
2576
+ var c = d[l], s = i.cells[c.index];
2577
+ if (s) {
2578
+ var u = e.hooks.didParseCell;
2579
+ e.callCellHooks(t, u, s, i, c, null);
2580
+ var m = s.padding("horizontal");
2581
+ s.contentWidth = dt(s.text, s.styles, t) + m;
2582
+ var v = dt(s.text.join(" ").split(/[^\S\u00A0]+/), s.styles, t);
2583
+ if (s.minReadableWidth = v + s.padding("horizontal"), typeof s.styles.cellWidth == "number")
2584
+ s.minWidth = s.styles.cellWidth, s.wrappedWidth = s.styles.cellWidth;
2585
+ else if (s.styles.cellWidth === "wrap" || a === !0)
2586
+ s.contentWidth > r ? (s.minWidth = r, s.wrappedWidth = r) : (s.minWidth = s.contentWidth, s.wrappedWidth = s.contentWidth);
2587
+ else {
2588
+ var b = 10 / n;
2589
+ s.minWidth = s.styles.minCellWidth || b, s.wrappedWidth = s.contentWidth, s.minWidth > s.wrappedWidth && (s.wrappedWidth = s.minWidth);
2590
+ }
2591
+ }
2592
+ }
2593
+ }), e.allRows().forEach(function(i) {
2594
+ for (var l = 0, d = e.columns; l < d.length; l++) {
2595
+ var c = d[l], s = i.cells[c.index];
2596
+ if (s && s.colSpan === 1)
2597
+ c.wrappedWidth = Math.max(c.wrappedWidth, s.wrappedWidth), c.minWidth = Math.max(c.minWidth, s.minWidth), c.minReadableWidth = Math.max(c.minReadableWidth, s.minReadableWidth);
2598
+ else {
2599
+ var u = e.styles.columnStyles[c.dataKey] || e.styles.columnStyles[c.index] || {}, m = u.cellWidth || u.minCellWidth;
2600
+ m && typeof m == "number" && (c.minWidth = m, c.wrappedWidth = m);
2601
+ }
2602
+ s && (s.colSpan > 1 && !c.minWidth && (c.minWidth = s.minWidth), s.colSpan > 1 && !c.wrappedWidth && (c.wrappedWidth = s.minWidth));
2603
+ }
2604
+ });
2605
+ }
2606
+ function Mt(t, e, n) {
2607
+ for (var a = e, r = t.reduce(function(b, N) {
2608
+ return b + N.wrappedWidth;
2609
+ }, 0), i = 0; i < t.length; i++) {
2610
+ var l = t[i], d = l.wrappedWidth / r, c = a * d, s = l.width + c, u = n(l), m = s < u ? u : s;
2611
+ e -= m - l.width, l.width = m;
2612
+ }
2613
+ if (e = Math.round(e * 1e10) / 1e10, e) {
2614
+ var v = t.filter(function(b) {
2615
+ return e < 0 ? b.width > n(b) : !0;
2616
+ });
2617
+ v.length && (e = Mt(v, e, n));
2618
+ }
2619
+ return e;
2620
+ }
2621
+ function pi(t) {
2622
+ for (var e = {}, n = 1, a = t.allRows(), r = 0; r < a.length; r++)
2623
+ for (var i = a[r], l = 0, d = t.columns; l < d.length; l++) {
2624
+ var c = d[l], s = e[c.index];
2625
+ if (n > 1)
2626
+ n--, delete i.cells[c.index];
2627
+ else if (s)
2628
+ s.cell.height += i.height, n = s.cell.colSpan, delete i.cells[c.index], s.left--, s.left <= 1 && delete e[c.index];
2629
+ else {
2630
+ var u = i.cells[c.index];
2631
+ if (!u)
2632
+ continue;
2633
+ if (u.height = i.height, u.rowSpan > 1) {
2634
+ var m = a.length - r, v = u.rowSpan > m ? m : u.rowSpan;
2635
+ e[c.index] = { cell: u, left: v, row: i };
2636
+ }
2637
+ }
2638
+ }
2639
+ }
2640
+ function vi(t) {
2641
+ for (var e = t.allRows(), n = 0; n < e.length; n++)
2642
+ for (var a = e[n], r = null, i = 0, l = 0, d = 0; d < t.columns.length; d++) {
2643
+ var c = t.columns[d];
2644
+ if (l -= 1, l > 1 && t.columns[d + 1])
2645
+ i += c.width, delete a.cells[c.index];
2646
+ else if (r) {
2647
+ var s = r;
2648
+ delete a.cells[c.index], r = null, s.width = c.width + i;
2649
+ } else {
2650
+ var s = a.cells[c.index];
2651
+ if (!s)
2652
+ continue;
2653
+ if (l = s.colSpan, i = 0, s.colSpan > 1) {
2654
+ r = s, i += c.width;
2655
+ continue;
2656
+ }
2657
+ s.width = c.width + i;
2658
+ }
2659
+ }
2660
+ }
2661
+ function yi(t, e) {
2662
+ for (var n = { count: 0, height: 0 }, a = 0, r = t.allRows(); a < r.length; a++) {
2663
+ for (var i = r[a], l = 0, d = t.columns; l < d.length; l++) {
2664
+ var c = d[l], s = i.cells[c.index];
2665
+ if (s) {
2666
+ e.applyStyles(s.styles, !0);
2667
+ var u = s.width - s.padding("horizontal");
2668
+ if (s.styles.overflow === "linebreak")
2669
+ s.text = e.splitTextToSize(s.text, u + 1 / e.scaleFactor(), { fontSize: s.styles.fontSize });
2670
+ else if (s.styles.overflow === "ellipsize")
2671
+ s.text = Gt(s.text, u, s.styles, e, "...");
2672
+ else if (s.styles.overflow === "hidden")
2673
+ s.text = Gt(s.text, u, s.styles, e, "");
2674
+ else if (typeof s.styles.overflow == "function") {
2675
+ var m = s.styles.overflow(s.text, u);
2676
+ typeof m == "string" ? s.text = [m] : s.text = m;
2677
+ }
2678
+ s.contentHeight = s.getContentHeight(e.scaleFactor(), e.getLineHeightFactor());
2679
+ var v = s.contentHeight / s.rowSpan;
2680
+ s.rowSpan > 1 && n.count * n.height < v * s.rowSpan ? n = { height: v, count: s.rowSpan } : n && n.count > 0 && n.height > v && (v = n.height), v > i.height && (i.height = v);
2681
+ }
2682
+ }
2683
+ n.count--;
2684
+ }
2685
+ }
2686
+ function Gt(t, e, n, a, r) {
2687
+ return t.map(function(i) {
2688
+ return Si(i, e, n, a, r);
2689
+ });
2690
+ }
2691
+ function Si(t, e, n, a, r) {
2692
+ var i = 1e4 * a.scaleFactor();
2693
+ if (e = Math.ceil(e * i) / i, e >= dt(t, n, a))
2694
+ return t;
2695
+ for (; e < dt(t + r, n, a) && !(t.length <= 1); )
2696
+ t = t.substring(0, t.length - 1);
2697
+ return t.trim() + r;
2698
+ }
2699
+ function za(t, e) {
2700
+ var n = new He(t), a = Ci(e, n.scaleFactor()), r = new ui(e, a);
2701
+ return mi(n, r), n.applyStyles(n.userStyles), r;
2702
+ }
2703
+ function Ci(t, e) {
2704
+ var n = t.content, a = bi(n.columns);
2705
+ if (n.head.length === 0) {
2706
+ var r = Jt(a, "head");
2707
+ r && n.head.push(r);
2708
+ }
2709
+ if (n.foot.length === 0) {
2710
+ var r = Jt(a, "foot");
2711
+ r && n.foot.push(r);
2712
+ }
2713
+ var i = t.settings.theme, l = t.styles;
2714
+ return {
2715
+ columns: a,
2716
+ head: Ft("head", n.head, a, l, i, e),
2717
+ body: Ft("body", n.body, a, l, i, e),
2718
+ foot: Ft("foot", n.foot, a, l, i, e)
2719
+ };
2720
+ }
2721
+ function Ft(t, e, n, a, r, i) {
2722
+ var l = {}, d = e.map(function(c, s) {
2723
+ for (var u = 0, m = {}, v = 0, b = 0, N = 0, D = n; N < D.length; N++) {
2724
+ var x = D[N];
2725
+ if (l[x.index] == null || l[x.index].left === 0)
2726
+ if (b === 0) {
2727
+ var _ = void 0;
2728
+ Array.isArray(c) ? _ = c[x.index - v - u] : _ = c[x.dataKey];
2729
+ var T = {};
2730
+ typeof _ == "object" && !Array.isArray(_) && (T = _?.styles || {});
2731
+ var C = xi(t, x, s, r, a, i, T), $ = new Ia(_, C, t);
2732
+ m[x.dataKey] = $, m[x.index] = $, b = $.colSpan - 1, l[x.index] = {
2733
+ left: $.rowSpan - 1,
2734
+ times: b
2735
+ };
2736
+ } else
2737
+ b--, v++;
2738
+ else
2739
+ l[x.index].left--, b = l[x.index].times, u++;
2740
+ }
2741
+ return new Ra(c, s, t, m);
2742
+ });
2743
+ return d;
2744
+ }
2745
+ function Jt(t, e) {
2746
+ var n = {};
2747
+ return t.forEach(function(a) {
2748
+ if (a.raw != null) {
2749
+ var r = wi(e, a.raw);
2750
+ r != null && (n[a.dataKey] = r);
2751
+ }
2752
+ }), Object.keys(n).length > 0 ? n : null;
2753
+ }
2754
+ function wi(t, e) {
2755
+ if (t === "head") {
2756
+ if (typeof e == "object")
2757
+ return e.header || null;
2758
+ if (typeof e == "string" || typeof e == "number")
2759
+ return e;
2760
+ } else if (t === "foot" && typeof e == "object")
2761
+ return e.footer;
2762
+ return null;
2763
+ }
2764
+ function bi(t) {
2765
+ return t.map(function(e, n) {
2766
+ var a, r;
2767
+ return typeof e == "object" ? r = (a = e.dataKey) !== null && a !== void 0 ? a : n : r = n, new gi(r, e, n);
2768
+ });
2769
+ }
2770
+ function xi(t, e, n, a, r, i, l) {
2771
+ var d = Xr(a), c;
2772
+ t === "head" ? c = r.headStyles : t === "body" ? c = r.bodyStyles : t === "foot" && (c = r.footStyles);
2773
+ var s = Fe({}, d.table, d[t], r.styles, c), u = r.columnStyles[e.dataKey] || r.columnStyles[e.index] || {}, m = t === "body" ? u : {}, v = t === "body" && n % 2 === 0 ? Fe({}, d.alternateRow, r.alternateRowStyles) : {}, b = Kr(i), N = Fe({}, b, s, v, m);
2774
+ return Fe(N, l);
2775
+ }
2776
+ function Di(t, e, n) {
2777
+ var a;
2778
+ n === void 0 && (n = {});
2779
+ var r = Ma(t, e), i = /* @__PURE__ */ new Map(), l = [], d = [], c = [];
2780
+ Array.isArray(e.settings.horizontalPageBreakRepeat) ? c = e.settings.horizontalPageBreakRepeat : (typeof e.settings.horizontalPageBreakRepeat == "string" || typeof e.settings.horizontalPageBreakRepeat == "number") && (c = [e.settings.horizontalPageBreakRepeat]), c.forEach(function(v) {
2781
+ var b = e.columns.find(function(N) {
2782
+ return N.dataKey === v || N.index === v;
2783
+ });
2784
+ b && !i.has(b.index) && (i.set(b.index, !0), l.push(b.index), d.push(e.columns[b.index]), r -= b.wrappedWidth);
2785
+ });
2786
+ for (var s = !0, u = (a = n?.start) !== null && a !== void 0 ? a : 0; u < e.columns.length; ) {
2787
+ if (i.has(u)) {
2788
+ u++;
2789
+ continue;
2790
+ }
2791
+ var m = e.columns[u].wrappedWidth;
2792
+ if (s || r >= m)
2793
+ s = !1, l.push(u), d.push(e.columns[u]), r -= m;
2794
+ else
2795
+ break;
2796
+ u++;
2797
+ }
2798
+ return { colIndexes: l, columns: d, lastIndex: u - 1 };
2799
+ }
2800
+ function _i(t, e) {
2801
+ for (var n = [], a = 0; a < e.columns.length; a++) {
2802
+ var r = Di(t, e, { start: a });
2803
+ r.columns.length && (n.push(r), a = r.lastIndex);
2804
+ }
2805
+ return n;
2806
+ }
2807
+ function Ba(t, e) {
2808
+ var n = e.settings, a = n.startY, r = n.margin, i = { x: r.left, y: a }, l = e.getHeadHeight(e.columns) + e.getFootHeight(e.columns), d = a + r.bottom + l;
2809
+ if (n.pageBreak === "avoid") {
2810
+ var c = e.body, s = c.reduce(function(v, b) {
2811
+ return v + b.height;
2812
+ }, 0);
2813
+ d += s;
2814
+ }
2815
+ var u = new He(t);
2816
+ (n.pageBreak === "always" || n.startY != null && d > u.pageSize().height) && (Ya(u), i.y = r.top), e.callWillDrawPageHooks(u, i);
2817
+ var m = Fe({}, i);
2818
+ e.startPageNumber = u.pageNumber(), n.horizontalPageBreak ? Fi(u, e, m, i) : (u.applyStyles(u.userStyles), (n.showHead === "firstPage" || n.showHead === "everyPage") && e.head.forEach(function(v) {
2819
+ return Ne(u, e, v, i, e.columns);
2820
+ }), u.applyStyles(u.userStyles), e.body.forEach(function(v, b) {
2821
+ var N = b === e.body.length - 1;
2822
+ ct(u, e, v, N, m, i, e.columns);
2823
+ }), u.applyStyles(u.userStyles), (n.showFoot === "lastPage" || n.showFoot === "everyPage") && e.foot.forEach(function(v) {
2824
+ return Ne(u, e, v, i, e.columns);
2825
+ })), La(u, e, m, i), e.callEndPageHooks(u, i), e.finalY = i.y, t.lastAutoTable = e, u.applyStyles(u.userStyles);
2826
+ }
2827
+ function Fi(t, e, n, a) {
2828
+ var r = _i(t, e), i = e.settings;
2829
+ if (i.horizontalPageBreakBehaviour === "afterAllRows")
2830
+ r.forEach(function(s, u) {
2831
+ t.applyStyles(t.userStyles), u > 0 ? Ye(t, e, n, a, s.columns, !0) : Kt(t, e, a, s.columns), Ni(t, e, n, a, s.columns), Nt(t, e, a, s.columns);
2832
+ });
2833
+ else
2834
+ for (var l = -1, d = r[0], c = function() {
2835
+ var s = l;
2836
+ if (d) {
2837
+ t.applyStyles(t.userStyles);
2838
+ var u = d.columns;
2839
+ l >= 0 ? Ye(t, e, n, a, u, !0) : Kt(t, e, a, u), s = Xt(t, e, l + 1, a, u), Nt(t, e, a, u);
2840
+ }
2841
+ var m = s - l;
2842
+ r.slice(1).forEach(function(v) {
2843
+ t.applyStyles(t.userStyles), Ye(t, e, n, a, v.columns, !0), Xt(t, e, l + 1, a, v.columns, m), Nt(t, e, a, v.columns);
2844
+ }), l = s;
2845
+ }; l < e.body.length - 1; )
2846
+ c();
2847
+ }
2848
+ function Kt(t, e, n, a) {
2849
+ var r = e.settings;
2850
+ t.applyStyles(t.userStyles), (r.showHead === "firstPage" || r.showHead === "everyPage") && e.head.forEach(function(i) {
2851
+ return Ne(t, e, i, n, a);
2852
+ });
2853
+ }
2854
+ function Ni(t, e, n, a, r) {
2855
+ t.applyStyles(t.userStyles), e.body.forEach(function(i, l) {
2856
+ var d = l === e.body.length - 1;
2857
+ ct(t, e, i, d, n, a, r);
2858
+ });
2859
+ }
2860
+ function Xt(t, e, n, a, r, i) {
2861
+ t.applyStyles(t.userStyles), i = i ?? e.body.length;
2862
+ var l = Math.min(n + i, e.body.length), d = -1;
2863
+ return e.body.slice(n, l).forEach(function(c, s) {
2864
+ var u = n + s === e.body.length - 1, m = Ea(t, e, u, a);
2865
+ c.canEntireRowFit(m, r) && (Ne(t, e, c, a, r), d = n + s);
2866
+ }), d;
2867
+ }
2868
+ function Nt(t, e, n, a) {
2869
+ var r = e.settings;
2870
+ t.applyStyles(t.userStyles), (r.showFoot === "lastPage" || r.showFoot === "everyPage") && e.foot.forEach(function(i) {
2871
+ return Ne(t, e, i, n, a);
2872
+ });
2873
+ }
2874
+ function ki(t, e, n) {
2875
+ var a = n.getLineHeight(t.styles.fontSize), r = t.padding("vertical"), i = Math.floor((e - r) / a);
2876
+ return Math.max(0, i);
2877
+ }
2878
+ function $i(t, e, n, a) {
2879
+ var r = {};
2880
+ t.spansMultiplePages = !0, t.height = 0;
2881
+ for (var i = 0, l = 0, d = n.columns; l < d.length; l++) {
2882
+ var c = d[l], s = t.cells[c.index];
2883
+ if (s) {
2884
+ Array.isArray(s.text) || (s.text = [s.text]);
2885
+ var u = new Ia(s.raw, s.styles, s.section);
2886
+ u = Fe(u, s), u.text = [];
2887
+ var m = ki(s, e, a);
2888
+ s.text.length > m && (u.text = s.text.splice(m, s.text.length));
2889
+ var v = a.scaleFactor(), b = a.getLineHeightFactor();
2890
+ s.contentHeight = s.getContentHeight(v, b), s.contentHeight >= e && (s.contentHeight = e, u.styles.minCellHeight -= e), s.contentHeight > t.height && (t.height = s.contentHeight), u.contentHeight = u.getContentHeight(v, b), u.contentHeight > i && (i = u.contentHeight), r[c.index] = u;
2891
+ }
2892
+ }
2893
+ var N = new Ra(t.raw, -1, t.section, r, !0);
2894
+ N.height = i;
2895
+ for (var D = 0, x = n.columns; D < x.length; D++) {
2896
+ var c = x[D], u = N.cells[c.index];
2897
+ u && (u.height = N.height);
2898
+ var s = t.cells[c.index];
2899
+ s && (s.height = t.height);
2900
+ }
2901
+ return N;
2902
+ }
2903
+ function Ti(t, e, n, a) {
2904
+ var r = t.pageSize().height, i = a.settings.margin, l = i.top + i.bottom, d = r - l;
2905
+ e.section === "body" && (d -= a.getHeadHeight(a.columns) + a.getFootHeight(a.columns));
2906
+ var c = e.getMinimumRowHeight(a.columns, t), s = c < n;
2907
+ if (c > d)
2908
+ return console.log("Will not be able to print row ".concat(e.index, " correctly since it's minimum height is larger than page height")), !0;
2909
+ if (!s)
2910
+ return !1;
2911
+ var u = e.hasRowSpan(a.columns), m = e.getMaxCellHeight(a.columns) > d;
2912
+ return m ? (u && console.log("The content of row ".concat(e.index, " will not be drawn correctly since drawing rows with a height larger than the page height and has cells with rowspans is not supported.")), !0) : !(u || a.settings.rowPageBreak === "avoid");
2913
+ }
2914
+ function ct(t, e, n, a, r, i, l) {
2915
+ var d = Ea(t, e, a, i);
2916
+ if (n.canEntireRowFit(d, l))
2917
+ Ne(t, e, n, i, l);
2918
+ else if (Ti(t, n, d, e)) {
2919
+ var c = $i(n, d, e, t);
2920
+ Ne(t, e, n, i, l), Ye(t, e, r, i, l), ct(t, e, c, a, r, i, l);
2921
+ } else
2922
+ Ye(t, e, r, i, l), ct(t, e, n, a, r, i, l);
2923
+ }
2924
+ function Ne(t, e, n, a, r) {
2925
+ a.x = e.settings.margin.left;
2926
+ for (var i = 0, l = r; i < l.length; i++) {
2927
+ var d = l[i], c = n.cells[d.index];
2928
+ if (!c) {
2929
+ a.x += d.width;
2930
+ continue;
2931
+ }
2932
+ t.applyStyles(c.styles), c.x = a.x, c.y = a.y;
2933
+ var s = e.callCellHooks(t, e.hooks.willDrawCell, c, n, d, a);
2934
+ if (s === !1) {
2935
+ a.x += d.width;
2936
+ continue;
2937
+ }
2938
+ Wi(t, c, a);
2939
+ var u = c.getTextPos();
2940
+ $a(c.text, u.x, u.y, {
2941
+ halign: c.styles.halign,
2942
+ valign: c.styles.valign,
2943
+ maxWidth: Math.ceil(c.width - c.padding("left") - c.padding("right"))
2944
+ }, t.getDocument()), e.callCellHooks(t, e.hooks.didDrawCell, c, n, d, a), a.x += d.width;
2945
+ }
2946
+ a.y += n.height;
2947
+ }
2948
+ function Wi(t, e, n) {
2949
+ var a = e.styles;
2950
+ if (t.getDocument().setFillColor(t.getDocument().getFillColor()), typeof a.lineWidth == "number") {
2951
+ var r = Pa(a.lineWidth, a.fillColor);
2952
+ r && t.rect(e.x, n.y, e.width, e.height, r);
2953
+ } else typeof a.lineWidth == "object" && (a.fillColor && t.rect(e.x, n.y, e.width, e.height, "F"), Li(t, e, n, a.lineWidth));
2954
+ }
2955
+ function Li(t, e, n, a) {
2956
+ var r, i, l, d;
2957
+ a.top && (r = n.x, i = n.y, l = n.x + e.width, d = n.y, a.right && (l += 0.5 * a.right), a.left && (r -= 0.5 * a.left), c(a.top, r, i, l, d)), a.bottom && (r = n.x, i = n.y + e.height, l = n.x + e.width, d = n.y + e.height, a.right && (l += 0.5 * a.right), a.left && (r -= 0.5 * a.left), c(a.bottom, r, i, l, d)), a.left && (r = n.x, i = n.y, l = n.x, d = n.y + e.height, a.top && (i -= 0.5 * a.top), a.bottom && (d += 0.5 * a.bottom), c(a.left, r, i, l, d)), a.right && (r = n.x + e.width, i = n.y, l = n.x + e.width, d = n.y + e.height, a.top && (i -= 0.5 * a.top), a.bottom && (d += 0.5 * a.bottom), c(a.right, r, i, l, d));
2958
+ function c(s, u, m, v, b) {
2959
+ t.getDocument().setLineWidth(s), t.getDocument().line(u, m, v, b, "S");
2960
+ }
2961
+ }
2962
+ function Ea(t, e, n, a) {
2963
+ var r = e.settings.margin.bottom, i = e.settings.showFoot;
2964
+ return (i === "everyPage" || i === "lastPage" && n) && (r += e.getFootHeight(e.columns)), t.pageSize().height - a.y - r;
2965
+ }
2966
+ function Ye(t, e, n, a, r, i) {
2967
+ r === void 0 && (r = []), i === void 0 && (i = !1), t.applyStyles(t.userStyles), e.settings.showFoot === "everyPage" && !i && e.foot.forEach(function(d) {
2968
+ return Ne(t, e, d, a, r);
2969
+ }), e.callEndPageHooks(t, a);
2970
+ var l = e.settings.margin;
2971
+ La(t, e, n, a), Ya(t), e.pageNumber++, a.x = l.left, a.y = l.top, n.y = l.top, e.callWillDrawPageHooks(t, a), e.settings.showHead === "everyPage" && (e.head.forEach(function(d) {
2972
+ return Ne(t, e, d, a, r);
2973
+ }), t.applyStyles(t.userStyles));
2974
+ }
2975
+ function Ya(t) {
2976
+ var e = t.pageNumber();
2977
+ t.setPage(e + 1);
2978
+ var n = t.pageNumber();
2979
+ return n === e ? (t.addPage(), !0) : !1;
2980
+ }
2981
+ function Pi(t) {
2982
+ t.API.autoTable = function() {
2983
+ for (var e = [], n = 0; n < arguments.length; n++)
2984
+ e[n] = arguments[n];
2985
+ var a = e[0], r = Ha(this, a), i = za(this, r);
2986
+ return Ba(this, i), this;
2987
+ }, t.API.lastAutoTable = !1, t.API.autoTableText = function(e, n, a, r) {
2988
+ $a(e, n, a, r, this);
2989
+ }, t.API.autoTableSetDefaults = function(e) {
2990
+ return He.setDefaults(e, this), this;
2991
+ }, t.autoTableSetDefaults = function(e, n) {
2992
+ He.setDefaults(e, n);
2993
+ }, t.API.autoTableHtmlToJson = function(e, n) {
2994
+ var a;
2995
+ if (n === void 0 && (n = !1), typeof window > "u")
2996
+ return console.error("Cannot run autoTableHtmlToJson in non browser environment"), null;
2997
+ var r = new He(this), i = Oa(r, e, window, n, !1), l = i.head, d = i.body, c = ((a = l[0]) === null || a === void 0 ? void 0 : a.map(function(s) {
2998
+ return s.content;
2999
+ })) || [];
3000
+ return { columns: c, rows: d, data: d };
3001
+ };
3002
+ }
3003
+ var kt;
3004
+ function Zt(t, e) {
3005
+ var n = Ha(t, e), a = za(t, n);
3006
+ Ba(t, a);
3007
+ }
3008
+ try {
3009
+ if (typeof window < "u" && window) {
3010
+ var ea = window, ta = ea.jsPDF || ((kt = ea.jspdf) === null || kt === void 0 ? void 0 : kt.jsPDF);
3011
+ ta && Pi(ta);
3012
+ }
3013
+ } catch (t) {
3014
+ console.error("Could not apply autoTable plugin", t);
3015
+ }
3016
+ const Mi = "/images/horizontal-logo-blue.svg", Ai = (t) => {
3017
+ const {
3018
+ startTime: e,
3019
+ endTime: n,
3020
+ selectedToPDF: a,
3021
+ avgQuestionLastMonth: r,
3022
+ dayOfWeekOneToOne: i,
3023
+ monthsOneToOne: l,
3024
+ preparednessData: d,
3025
+ safetyData: c,
3026
+ stressData: s,
3027
+ successIndicatorsData: u,
3028
+ readinessToLearning: m,
3029
+ studentPressure: v,
3030
+ dataOverallReadyToLearn: b,
3031
+ schoolName: N,
3032
+ metricWeeks: D,
3033
+ metricDataWeeks: x,
3034
+ metricMonths: _,
3035
+ metricDataMonths: T,
3036
+ lowMetricStudents: C,
3037
+ studentMetricPercent: $,
3038
+ weeksOneToOne: M,
3039
+ preparednessWeeklyData: J,
3040
+ successIndicatorWeeklyData: E,
3041
+ learningStrategiesUsage: oe,
3042
+ optionDate: ie,
3043
+ onClose: I,
3044
+ studentConversations: R
3045
+ } = t, A = ie || "Monthly", { t: O } = ve(), ne = ut(), X = (Z, ee, p) => {
3046
+ var y = document.createElement("span");
3047
+ y.style.visibility = "hidden", y.style.position = "absolute", y.style.whiteSpace = "nowrap", y.style.fontSize = ee, y.style.fontWeight = p, y.innerHTML = Z, document.body.appendChild(y);
3048
+ var k = y.offsetWidth;
3049
+ return document.body.removeChild(y), k;
3050
+ }, ue = async (Z, ee) => {
3051
+ try {
3052
+ const y = (await Fr.get(Z, {
3053
+ responseType: "blob",
3054
+ timeout: 1e3
3055
+ })).data, k = new FileReader();
3056
+ return k.readAsDataURL(y), await new Promise((Q) => {
3057
+ k.onloadend = () => Q(k.result);
3058
+ });
3059
+ } catch {
3060
+ return ee;
3061
+ }
3062
+ }, xe = (Z) => Z?.startsWith("data:image/png") ? "PNG" : Z?.startsWith("data:image/jpeg") || Z?.startsWith("data:image/jpg") ? "JPEG" : "PNG", ke = async () => {
3063
+ ne(Ae(!0)), await new Promise((h) => setTimeout(h, 100));
3064
+ try {
3065
+ const h = new xr({
3066
+ orientation: "p",
3067
+ unit: "px",
3068
+ format: "a4"
3069
+ });
3070
+ var Z = h.internal.pageSize.width, ee = h.internal.pageSize.height;
3071
+ const te = 200, Ce = h.splitTextToSize(
3072
+ N,
3073
+ 120
3074
+ );
3075
+ let L = 0;
3076
+ const $e = N.length <= 18 ? X(N, "18px", "bold") : X(Ce.join(""), "18px", "bold"), ae = async () => {
3077
+ const F = document.getElementById("header-logo"), V = await De(
3078
+ F
3079
+ );
3080
+ h.addImage(
3081
+ V.toDataURL("image/png", 1),
3082
+ "png",
3083
+ 10,
3084
+ 20,
3085
+ 90,
3086
+ 25
3087
+ ), h.setFontSize(18), h.setFont("Helvetica", "normal", "bold"), h.text(
3088
+ N.length <= 18 ? N : `${Ce[0]}...`,
3089
+ (Z - $e) / 2 + 15,
3090
+ 40
3091
+ ), h.setFontSize(10), h.setFont("Helvetica", "italic", "normal"), h.text(
3092
+ `From: ${G(e).format("DD/MM/YYYY")}`,
3093
+ 310,
3094
+ 40
3095
+ ), h.text(`To: ${G(n).format("DD/MM/YYYY")}`, 380, 40), h.setDrawColor(128, 128, 128), h.line(0, 50, Z, 50), h.setLineWidth(0.1);
3096
+ };
3097
+ var p = 85, y = 20;
3098
+ if (a.includes("average_safety")) {
3099
+ await ae(), h.setFontSize(14), h.setFont("Helvetica", "normal", "bold"), h.text(O("average_safety"), y, 70);
3100
+ const F = document.getElementById("average_safety"), V = await De(F);
3101
+ p += 20;
3102
+ let H = p;
3103
+ h.setFontSize(8);
3104
+ const P = c.map((z) => z.name);
3105
+ for (var k = 0; k < l.length; k++) {
3106
+ let z = p;
3107
+ h.setFontSize(12), h.setFont("Helvetica", "normal", "bold"), h.text(l[k], y, z), h.setFontSize(8);
3108
+ for (var Q = 0; Q < c?.length; Q++) {
3109
+ const se = c[Q].data[k];
3110
+ if (se != 0) {
3111
+ const he = P[Q];
3112
+ he != "" && (h.setDrawColor(0), h.setFillColor("#0F9655"), h.roundedRect(
3113
+ y,
3114
+ z + 5,
3115
+ 5,
3116
+ 5,
3117
+ 1,
3118
+ 1,
3119
+ "F"
3120
+ ), h.setFont("Helvetica", "normal", "bold"), h.text(
3121
+ `${he}:`,
3122
+ y + 8,
3123
+ z + 10
3124
+ ), h.setFont("Helvetica", "normal", "normal"), h.text(
3125
+ `${se?.toFixed(2)}%`,
3126
+ y + he?.length * 2.5 + 20.5,
3127
+ z + 10
3128
+ )), z += 10, z > H && (H = z);
3129
+ }
3130
+ }
3131
+ y += 100, y + 105 > Z && (y = 20, p = H + 20), p + 150 > ee && (h.addPage(), await ae(), p = 80, y = 20);
3132
+ }
3133
+ y = 20;
3134
+ const j = 420, re = F && F.clientWidth ? j * F.clientHeight / F.clientWidth : te;
3135
+ h.addImage(
3136
+ V.toDataURL("image/png"),
3137
+ 10,
3138
+ p + 20,
3139
+ j,
3140
+ re
3141
+ ), L++, L < a.length && (h.addPage(), p = 80, y = 20);
3142
+ }
3143
+ if (a.includes("average_stress")) {
3144
+ await ae(), h.setFontSize(14), h.setFont("Helvetica", "normal", "bold"), h.text(O(Dr), y, p), p += 20;
3145
+ const F = document.getElementById("average_stress"), V = await De(F);
3146
+ p += 20;
3147
+ let H = p;
3148
+ h.setFontSize(8);
3149
+ const P = s.map((z) => z.name);
3150
+ for (var k = 0; k < l.length; k++) {
3151
+ let se = p;
3152
+ h.setFontSize(12), h.setFont("Helvetica", "normal", "bold"), h.text(l[k], y, se), h.setFontSize(8);
3153
+ for (var Q = 0; Q < s?.length; Q++) {
3154
+ const de = s[Q].data[k];
3155
+ if (de != 0) {
3156
+ const W = P[Q];
3157
+ W != "" && (h.setDrawColor(0), h.setFillColor("#C44140"), h.roundedRect(
3158
+ y,
3159
+ se + 5,
3160
+ 5,
3161
+ 5,
3162
+ 1,
3163
+ 1,
3164
+ "F"
3165
+ ), h.setFont("Helvetica", "normal", "bold"), h.text(
3166
+ `${W}:`,
3167
+ y + 8,
3168
+ se + 10
3169
+ ), h.setFont("Helvetica", "normal", "normal"), h.text(
3170
+ `${de?.toFixed(2)}%`,
3171
+ y + W?.length * 2.5 + 20.5,
3172
+ se + 10
3173
+ )), se += 10, se > H && (H = se);
3174
+ }
3175
+ }
3176
+ y += 100, y + 105 > Z && (y = 20, p = H + 20), p + 150 > ee && (h.addPage(), await ae(), p = 80, y = 20);
3177
+ }
3178
+ y = 20;
3179
+ const j = 420, re = F && F.clientWidth ? j * F.clientHeight / F.clientWidth : te;
3180
+ h.addImage(
3181
+ V.toDataURL("image/png"),
3182
+ 10,
3183
+ p + 20,
3184
+ j,
3185
+ re
3186
+ ), L++, L < a.length && (h.addPage(), p = 80, y = 20);
3187
+ }
3188
+ if (a.includes("number_of_students_with_at_least_one_very_low_metric")) {
3189
+ p > ee / 2 && (p = 80, y = 20, h.addPage()), p <= 85 && await ae(), h.setFontSize(14), h.setFont("Helvetica", "normal", "bold"), h.text(O("number_of_students_with_at_least_one_very_low_metric"), y, p <= 85 ? 70 : p);
3190
+ const F = document.getElementById("metric"), V = await De(F);
3191
+ h.setFontSize(8), y = 20;
3192
+ const H = 420, P = F && F.clientWidth ? H * F.clientHeight / F.clientWidth : te;
3193
+ if (h.addImage(
3194
+ V.toDataURL("image/png"),
3195
+ 10,
3196
+ p,
3197
+ H,
3198
+ P
3199
+ ), p += P + 10, C?.length > 0) {
3200
+ p + 100 > ee && (h.addPage(), await ae(), p = 80);
3201
+ const j = or(C?.map((W) => W.studentName)).length || 0;
3202
+ h.setFontSize(14), h.setTextColor("#000"), h.setFont("Helvetica", "normal", "bold"), h.text(O("students_with_at_least_one_concerned_metric", {
3203
+ number: j
3204
+ }), y, p + 15);
3205
+ const re = C.map((W) => [
3206
+ W?.studentName || "-",
3207
+ W?.grade || "-",
3208
+ W?.matchedGroupNames ? lr(W?.matchedGroupNames) : "-",
3209
+ W?.metrics?.join(", ") || "-",
3210
+ G(W?.startTime).format("DD MMMM YYYY hh:mm A")
3211
+ ]), z = {}, se = ot("/images/image-default.png"), he = await ue(se, "");
3212
+ (await Promise.all(C.map(async (W) => {
3213
+ const B = W?.profileImage ? st(W?.profileImage) : he;
3214
+ return await ue(B, he);
3215
+ }))).forEach((W, B) => {
3216
+ z[B] = W;
3217
+ }), Zt(h, {
3218
+ startY: p + 30,
3219
+ margin: { left: 16 },
3220
+ head: [[
3221
+ O("student"),
3222
+ O("grade"),
3223
+ O("concerned_metrics"),
3224
+ O("metrics"),
3225
+ O("check_in_date")
3226
+ ]],
3227
+ body: re,
3228
+ didDrawCell: (W) => {
3229
+ if (W.section === "body" && W.column.index === 0) {
3230
+ const B = z[W.row.index];
3231
+ if (B) {
3232
+ const le = xe(B);
3233
+ h.addImage(
3234
+ B,
3235
+ le,
3236
+ W.cell.x + 6,
3237
+ W.cell.y + 6,
3238
+ 12,
3239
+ 12
3240
+ );
3241
+ }
3242
+ }
3243
+ },
3244
+ styles: {
3245
+ fontSize: 9,
3246
+ cellPadding: { top: 8, left: 8, right: 8, bottom: 8 },
3247
+ valign: "top"
3248
+ },
3249
+ headStyles: {
3250
+ fillColor: [240, 240, 240],
3251
+ textColor: 0,
3252
+ fontStyle: "bold"
3253
+ },
3254
+ columnStyles: {
3255
+ 0: {
3256
+ cellWidth: 100,
3257
+ cellPadding: { top: 8, left: 22, right: 8, bottom: 8 }
3258
+ },
3259
+ 1: {
3260
+ cellWidth: 40,
3261
+ halign: "center"
3262
+ },
3263
+ 2: { cellWidth: 90 },
3264
+ 3: { cellWidth: 90 },
3265
+ 4: { cellWidth: 85 }
3266
+ },
3267
+ theme: "grid"
3268
+ }), p = h.lastAutoTable.finalY + 20;
3269
+ }
3270
+ L++, L < a.length && (h.addPage(), p = 80, y = 20);
3271
+ }
3272
+ if (a.includes(_r)) {
3273
+ await ae(), h.setFontSize(14), h.setFont("Helvetica", "normal", "bold"), h.text(O("readiness_to_learn"), y, p), p += 20;
3274
+ const F = document.getElementById("preparedness"), V = await De(F);
3275
+ p += 20;
3276
+ const H = A !== "Monthly";
3277
+ let P = p;
3278
+ h.setFontSize(8);
3279
+ const j = d.map((de) => de.name), re = H ? M : l, z = H ? J : d;
3280
+ if (z?.length)
3281
+ for (let de = 0; de < re.length; de++) {
3282
+ let W = p;
3283
+ h.setFontSize(12), h.setFont("Helvetica", "normal", "bold"), h.text(re[de], y, W), h.setFontSize(8);
3284
+ const B = ["#169490", "#316CD9", "#FFB04F"];
3285
+ for (let le = 0; le < z?.length; le++) {
3286
+ const we = z[le].data[de];
3287
+ if (we != 0) {
3288
+ const me = j[le];
3289
+ me != "" && (h.setDrawColor(0), h.setFillColor(
3290
+ B[le]
3291
+ ), h.roundedRect(
3292
+ y,
3293
+ W + 5,
3294
+ 5,
3295
+ 5,
3296
+ 1,
3297
+ 1,
3298
+ "F"
3299
+ ), h.setFont("Helvetica", "normal", "bold"), h.text(
3300
+ `${me}:`,
3301
+ y + 8,
3302
+ W + 10
3303
+ ), h.setFont("Helvetica", "normal", "normal"), h.text(
3304
+ `${we?.toFixed(2)}%`,
3305
+ y + me?.length * 2.5 + 20.5,
3306
+ W + 10
3307
+ )), W += 10, W > P && (P = W);
3308
+ }
3309
+ }
3310
+ y += 100, y + 105 > Z && (y = 20, p = P + 20), p + 150 > ee && (h.addPage(), await ae(), p = 80, y = 20);
3311
+ }
3312
+ y = 20, p += j.length * 10;
3313
+ const se = 420, he = F && F.clientWidth ? se * F.clientHeight / F.clientWidth : te;
3314
+ p + he + 20 > ee && (h.addPage(), await ae(), p = 80, y = 20, h.setFontSize(14), h.setFont("Helvetica", "normal", "bold"), h.text(O("readiness_to_learn"), y, p), p += 10), h.addImage(
3315
+ V.toDataURL("image/png"),
3316
+ 10,
3317
+ p + 20,
3318
+ se,
3319
+ he
3320
+ ), L++, L < a.length && (h.addPage(), p = 80, y = 20);
3321
+ }
3322
+ if (a.includes(Be)) {
3323
+ await ae(), h.setFontSize(14), h.setFont("Helvetica", "normal", "bold"), h.text(O(Be), y, 70);
3324
+ const F = document.getElementById(Be), V = await De(F);
3325
+ y = 20;
3326
+ const H = 420, P = F && F.clientWidth ? H * F.clientHeight / F.clientWidth : te;
3327
+ h.addImage(
3328
+ V.toDataURL("image/png"),
3329
+ 10,
3330
+ p,
3331
+ H,
3332
+ P
3333
+ ), L++, p += te + 20;
3334
+ }
3335
+ if (a.includes(tt)) {
3336
+ p > ee / 2 && (p = 80, y = 20, h.addPage()), p <= 85 && await ae(), h.setFontSize(14), h.setFont("Helvetica", "normal", "bold"), h.text(O(tt), y, p <= 85 ? 70 : p);
3337
+ const F = document.getElementById(tt), V = await De(F), H = 420;
3338
+ p += 20;
3339
+ const P = F && F.clientWidth ? H * F.clientHeight / F.clientWidth : te;
3340
+ h.addImage(
3341
+ V.toDataURL("image/png"),
3342
+ 10,
3343
+ p,
3344
+ H,
3345
+ P
3346
+ ), L++, p += te, L < a.length && !a.includes(bt) && (h.addPage(), p = 80, y = 20);
3347
+ }
3348
+ if (a.includes(bt)) {
3349
+ p > ee / 2 && (p = 80, y = 20, h.addPage()), p <= 85 && await ae(), h.setFontSize(14), h.setFont("Helvetica", "normal", "bold"), h.text(O(bt), y, p <= 85 ? 70 : p), p += 20;
3350
+ const F = document.getElementById("student_stress_by_zone"), V = await De(F), H = 460, P = F && F.clientWidth ? H * F.clientHeight / F.clientWidth : te;
3351
+ h.addImage(
3352
+ V.toDataURL("image/png"),
3353
+ 10,
3354
+ p,
3355
+ H,
3356
+ P
3357
+ ), L++, L < a.length && (h.addPage(), p = 80, y = 20);
3358
+ }
3359
+ if (a.includes(at)) {
3360
+ await ae(), h.setFontSize(14), h.setFont("Helvetica", "normal", "bold"), h.text(O(at), y, p), p += 40;
3361
+ const F = document.getElementById("success_indicators"), V = await De(F);
3362
+ let H = p;
3363
+ h.setFontSize(8);
3364
+ const P = u.map((W) => W.name), j = A !== "Monthly", re = j ? M : l, z = j ? E : u, se = [
3365
+ "#73C8E5",
3366
+ "#FFB04F",
3367
+ "#D7B0DE",
3368
+ "#E56362",
3369
+ "#5A7F05",
3370
+ "#D3D3D3"
3371
+ ];
3372
+ if (z?.length)
3373
+ for (let W = 0; W < re.length; W++) {
3374
+ let B = p;
3375
+ h.setFontSize(12), h.setFont("Helvetica", "normal", "bold"), h.text(re[W], y, B), h.setFontSize(8);
3376
+ for (let le = 0; le < z?.length; le++) {
3377
+ const we = z[le].data[W];
3378
+ if (we != 0) {
3379
+ const me = P[le];
3380
+ me != "" && (h.setDrawColor(0), h.setFillColor(
3381
+ se[le]
3382
+ ), h.roundedRect(
3383
+ y,
3384
+ B + 5,
3385
+ 5,
3386
+ 5,
3387
+ 1,
3388
+ 1,
3389
+ "F"
3390
+ ), h.setFont("Helvetica", "normal", "bold"), h.text(
3391
+ `${me}:`,
3392
+ y + 8,
3393
+ B + 10
3394
+ ), h.setFont("Helvetica", "normal", "normal"), h.text(
3395
+ `${we?.toFixed(2)}%`,
3396
+ y + me?.length * 2.5 + 20.5,
3397
+ B + 10
3398
+ )), B += 10, B > H && (H = B);
3399
+ }
3400
+ }
3401
+ y += 100, y + 105 > Z && (y = 20, p = H + 20), p + 150 > ee && (h.addPage(), await ae(), p = 80, y = 20);
3402
+ }
3403
+ y = 20, p += P.length * 10;
3404
+ const he = 420, de = F && F.clientWidth ? he * F.clientHeight / F.clientWidth : te;
3405
+ p + de + 20 > ee && (h.addPage(), await ae(), p = 80, y = 20, h.setFontSize(14), h.setFont("Helvetica", "normal", "bold"), h.text(O(at), y, p), p += 10), h.addImage(
3406
+ V.toDataURL("image/png"),
3407
+ 10,
3408
+ p + 20,
3409
+ he,
3410
+ de
3411
+ ), L++, L < a.length && (h.addPage(), p = 80, y = 20);
3412
+ }
3413
+ if (a.includes("readiness_trends")) {
3414
+ await ae(), h.setFontSize(14), h.setFont("Helvetica", "normal", "bold"), h.text(O("readiness_trends"), y, p), p += 40;
3415
+ const F = document.getElementById("readiness_trends"), V = await De(F);
3416
+ let H = p;
3417
+ h.setFontSize(8);
3418
+ const P = d.map((W) => W.name), j = A !== "Monthly", re = j ? M : l, z = j ? J : d, se = [
3419
+ "#73C8E5",
3420
+ "#FFB04F",
3421
+ "#D7B0DE",
3422
+ "#E56362",
3423
+ "#5A7F05",
3424
+ "#D3D3D3"
3425
+ ];
3426
+ if (z?.length)
3427
+ for (let W = 0; W < re.length; W++) {
3428
+ let B = p;
3429
+ h.setFontSize(12), h.setFont("Helvetica", "normal", "bold"), h.text(re[W], y, B), h.setFontSize(8);
3430
+ for (let le = 0; le < z?.length; le++) {
3431
+ const we = z[le].data[W];
3432
+ if (we != 0) {
3433
+ const me = P[le];
3434
+ me != "" && (h.setDrawColor(0), h.setFillColor(
3435
+ se[le]
3436
+ ), h.roundedRect(
3437
+ y,
3438
+ B + 5,
3439
+ 5,
3440
+ 5,
3441
+ 1,
3442
+ 1,
3443
+ "F"
3444
+ ), h.setFont("Helvetica", "normal", "bold"), h.text(
3445
+ `${me}:`,
3446
+ y + 8,
3447
+ B + 10
3448
+ ), h.setFont("Helvetica", "normal", "normal"), h.text(
3449
+ `${we?.toFixed(2)}%`,
3450
+ y + me?.length * 2.5 + 20.5,
3451
+ B + 10
3452
+ )), B += 10, B > H && (H = B);
3453
+ }
3454
+ }
3455
+ y += 100, y + 105 > Z && (y = 20, p = H + 20), p + 150 > ee && (h.addPage(), await ae(), p = 80, y = 20);
3456
+ }
3457
+ y = 20, p += P.length * 10;
3458
+ const he = 420, de = F && F.clientWidth ? he * F.clientHeight / F.clientWidth : te;
3459
+ p + de + 20 > ee && (h.addPage(), await ae(), p = 80, y = 20, h.setFontSize(14), h.setFont("Helvetica", "normal", "bold"), h.text(O(at), y, p), p += 10), h.addImage(
3460
+ V.toDataURL("image/png"),
3461
+ 10,
3462
+ p + 20,
3463
+ he,
3464
+ de
3465
+ ), L++, L < a.length && (h.addPage(), p = 80, y = 20);
3466
+ }
3467
+ if (a.includes(jt)) {
3468
+ await ae(), h.setFontSize(14), h.setTextColor("#000"), h.setFont("Helvetica", "normal", "bold"), h.text(O(jt), y, 70), h.setFontSize(12), h.setTextColor("#3D3D3D"), h.setFont("Helvetica", "normal", "normal"), h.text(O("Learning Strategies Usage & Feedback"), y, p + 4);
3469
+ const F = document.getElementById("learning_strategies_table_pdf"), V = await De(F, {
3470
+ scale: 2,
3471
+ useCORS: !0,
3472
+ logging: !1
3473
+ });
3474
+ p += 12, y = 20;
3475
+ const H = 420, P = F && F.clientWidth ? H * F.clientHeight / F.clientWidth : 300;
3476
+ let j = P, re = p;
3477
+ h.addImage(
3478
+ V.toDataURL("image/png"),
3479
+ 10,
3480
+ re,
3481
+ H,
3482
+ P
3483
+ ), j -= h.internal.pageSize.height - re;
3484
+ let z = h.internal.pageSize.height - re;
3485
+ for (; j > 0; )
3486
+ h.addPage(), h.addImage(
3487
+ V.toDataURL("image/png"),
3488
+ 10,
3489
+ 80 - z,
3490
+ H,
3491
+ P
3492
+ ), h.setFillColor(255, 255, 255), h.rect(0, 0, h.internal.pageSize.width, 80, "F"), await ae(), z += h.internal.pageSize.height - 80, j -= h.internal.pageSize.height - 80;
3493
+ L++, L < a.length && (h.addPage(), p = 80, y = 20);
3494
+ }
3495
+ if (a.includes(Qt)) {
3496
+ await ae(), h.setFontSize(14), h.setTextColor("#000"), h.setFont("Helvetica", "bold"), h.text(O(Qt), y, 70), h.setFontSize(12), h.setTextColor("#3D3D3D"), h.setFont("Helvetica", "normal"), h.text(O("Student Conversations"), y, p + 4);
3497
+ const F = R.map((P) => [
3498
+ P.studentName,
3499
+ P.gradeLevel,
3500
+ P.educatorNames.join(`
3501
+ `),
3502
+ P.conversationCount,
3503
+ P.conversationDates.map(
3504
+ (j) => sa(j, "do MMMM yyyy").toString()
3505
+ ).join(`
3506
+ `)
3507
+ ]), V = {}, H = await ue(Nr, "");
3508
+ await Promise.all(
3509
+ R.map(async (P, j) => {
3510
+ V[j] = P.profileImage ? await ue(st(P.profileImage), H) : H;
3511
+ })
3512
+ ), Zt(h, {
3513
+ startY: p + 20,
3514
+ head: [[
3515
+ "Name of Student",
3516
+ O("grade"),
3517
+ "Name of Educator",
3518
+ `Number of
3519
+ Conversations`,
3520
+ "Conversations Date"
3521
+ ]],
3522
+ body: F,
3523
+ didDrawCell: (P) => {
3524
+ if (P.section === "body" && P.column.index === 0) {
3525
+ const j = V[P.row.index], re = xe(j);
3526
+ j && h.addImage(
3527
+ j,
3528
+ re,
3529
+ P.cell.x + 6,
3530
+ P.cell.y + 6,
3531
+ 12,
3532
+ 12
3533
+ );
3534
+ }
3535
+ },
3536
+ styles: {
3537
+ fontSize: 9,
3538
+ cellPadding: { top: 8, left: 8, right: 8, bottom: 8 },
3539
+ valign: "top"
3540
+ },
3541
+ headStyles: {
3542
+ fillColor: [240, 240, 240],
3543
+ textColor: 0,
3544
+ fontStyle: "bold"
3545
+ },
3546
+ columnStyles: {
3547
+ 0: {
3548
+ cellWidth: 100,
3549
+ cellPadding: { top: 8, left: 22, right: 8, bottom: 8 }
3550
+ },
3551
+ 1: {
3552
+ cellWidth: 40,
3553
+ halign: "center"
3554
+ },
3555
+ 2: { cellWidth: 90 },
3556
+ 3: {
3557
+ cellWidth: 70,
3558
+ halign: "center"
3559
+ },
3560
+ 4: { cellWidth: 85 }
3561
+ },
3562
+ theme: "grid"
3563
+ });
3564
+ }
3565
+ h.save("DashBoard.pdf"), ne(
3566
+ pe({
3567
+ type: "success",
3568
+ message: "Download Completed"
3569
+ })
3570
+ ), I?.();
3571
+ } catch (h) {
3572
+ ne(
3573
+ pe({
3574
+ type: "danger",
3575
+ message: h.message
3576
+ })
3577
+ );
3578
+ }
3579
+ ne(Ae(!1));
3580
+ };
3581
+ return /* @__PURE__ */ w("div", { children: [
3582
+ /* @__PURE__ */ w("div", { className: `${qt["chart-to-canvas"]}`, children: [
3583
+ /* @__PURE__ */ o("div", { id: "average_safety", children: /* @__PURE__ */ o(
3584
+ be,
3585
+ {
3586
+ colors: ["#0F9655"],
3587
+ typeChart: "area",
3588
+ activeColumn: [!0],
3589
+ series: c,
3590
+ months: l,
3591
+ dayOfWeek: i,
3592
+ avgQuestionLastMonth: r,
3593
+ skillClass: "full-width",
3594
+ name: da,
3595
+ optionDate: A
3596
+ }
3597
+ ) }),
3598
+ /* @__PURE__ */ o("div", { id: "average_stress", children: /* @__PURE__ */ o(
3599
+ be,
3600
+ {
3601
+ min: -100,
3602
+ colors: ["#C44140"],
3603
+ typeChart: "area",
3604
+ activeColumn: [!0],
3605
+ series: s.map((Z) => ({ ...Z, data: Z.data.map((ee) => ee / 2 + 50) })),
3606
+ months: l,
3607
+ dayOfWeek: i,
3608
+ avgQuestionLastMonth: r,
3609
+ skillClass: "full-width",
3610
+ print: !0,
3611
+ name: ca,
3612
+ optionDate: A
3613
+ }
3614
+ ) }),
3615
+ /* @__PURE__ */ o("div", { id: "metric", children: /* @__PURE__ */ o(
3616
+ be,
3617
+ {
3618
+ colors: ["#C4D4F3"],
3619
+ name: ha,
3620
+ typeChart: "bar",
3621
+ weeks: D,
3622
+ activeColumn: [!0],
3623
+ series: [{
3624
+ name: "",
3625
+ data: T
3626
+ }],
3627
+ weeklySeries: [{
3628
+ name: "",
3629
+ data: x
3630
+ }],
3631
+ months: _,
3632
+ dayOfWeek: i,
3633
+ avgQuestionLastMonth: r,
3634
+ print: !0,
3635
+ optionDate: A,
3636
+ lowMetricStudents: C,
3637
+ studentMetricPercent: $
3638
+ }
3639
+ ) }),
3640
+ /* @__PURE__ */ o(
3641
+ "div",
3642
+ {
3643
+ id: "success_indicators",
3644
+ children: /* @__PURE__ */ o(
3645
+ be,
3646
+ {
3647
+ colors: [
3648
+ "#73C8E5",
3649
+ "#FFB04F",
3650
+ "#D7B0DE",
3651
+ "#E56362",
3652
+ "#5A7F05",
3653
+ "#D3D3D3"
3654
+ ],
3655
+ name: O("success_indicators"),
3656
+ typeChart: "area",
3657
+ activeColumn: [!0, !0, !0, !0, !0, !0],
3658
+ series: u,
3659
+ weeklySeries: E,
3660
+ months: l,
3661
+ dayOfWeek: i,
3662
+ avgQuestionLastMonth: r,
3663
+ weeks: M,
3664
+ print: !0,
3665
+ optionDate: A
3666
+ }
3667
+ )
3668
+ }
3669
+ ),
3670
+ /* @__PURE__ */ o(
3671
+ "div",
3672
+ {
3673
+ id: Be,
3674
+ children: /* @__PURE__ */ o(
3675
+ be,
3676
+ {
3677
+ colors: ["#D9EEE4", "#FAF0F0"],
3678
+ name: Be,
3679
+ typeChart: "donut",
3680
+ months: [],
3681
+ activeColumn: [!0, !0],
3682
+ avgQuestionLastMonth: b.overViewQuestionLastMonth,
3683
+ studentCount: b?.studentNotReadyToLearn?.length || void 0,
3684
+ responseStudent: b?.studentNotReadyToLearn,
3685
+ series: b.resultQuestion,
3686
+ print: !0,
3687
+ optionDate: A
3688
+ }
3689
+ )
3690
+ }
3691
+ ),
3692
+ /* @__PURE__ */ o(
3693
+ "div",
3694
+ {
3695
+ id: "readiness_trends",
3696
+ children: /* @__PURE__ */ o(
3697
+ be,
3698
+ {
3699
+ colors: ["#169490", "#316CD9", "#FFB04F"],
3700
+ name: ua,
3701
+ typeChart: "area",
3702
+ activeColumn: [!0, !0, !0],
3703
+ series: d,
3704
+ months: l,
3705
+ dayOfWeek: i,
3706
+ avgQuestionLastMonth: r,
3707
+ weeks: M,
3708
+ weeklySeries: J,
3709
+ print: !0,
3710
+ optionDate: A
3711
+ }
3712
+ )
3713
+ }
3714
+ ),
3715
+ /* @__PURE__ */ o(
3716
+ "div",
3717
+ {
3718
+ id: tt,
3719
+ children: /* @__PURE__ */ o(Fa, { data: m, print: !0 })
3720
+ }
3721
+ ),
3722
+ /* @__PURE__ */ o(
3723
+ "div",
3724
+ {
3725
+ id: "student_stress_by_zone",
3726
+ style: {
3727
+ width: "175%"
3728
+ },
3729
+ children: /* @__PURE__ */ o(ia, { studentPressure: v, width: 1280, print: !0 })
3730
+ }
3731
+ ),
3732
+ /* @__PURE__ */ o("div", { id: "learning_strategies_table_pdf", style: { width: 800, border: "1px solid #dcdcdc", borderRadius: "8px", overflow: "hidden" }, children: /* @__PURE__ */ o(
3733
+ ka,
3734
+ {
3735
+ learningStrategies: oe,
3736
+ isPrint: !0
3737
+ }
3738
+ ) })
3739
+ ] }),
3740
+ /* @__PURE__ */ o("div", { className: `${qt["image-logo"]}`, id: "header-logo", children: /* @__PURE__ */ o("img", { src: ot(Mi), alt: "" }) }),
3741
+ /* @__PURE__ */ o(
3742
+ Na,
3743
+ {
3744
+ color: "success",
3745
+ onClick: () => {
3746
+ a.length > 0 && ke();
3747
+ },
3748
+ children: O("export")
3749
+ }
3750
+ )
3751
+ ] });
3752
+ }, Oi = ({
3753
+ modal: t,
3754
+ toggle: e,
3755
+ selectedToPrint: n,
3756
+ handleSelectToPrint: a,
3757
+ safetyData: r,
3758
+ stressData: i,
3759
+ monthsOneToOne: l,
3760
+ dayOfWeekOneToOne: d,
3761
+ studentPressure: c,
3762
+ metricWeeks: s,
3763
+ metricDataWeeks: u,
3764
+ metricMonths: m,
3765
+ metricDataMonths: v,
3766
+ lowMetricStudents: b,
3767
+ studentMetricPercent: N,
3768
+ dataReadinessOfChart: D,
3769
+ dataOverallReadyToLearn: x,
3770
+ preparednessData: _,
3771
+ preparednessWeeklyData: T,
3772
+ weeksOneToOne: C,
3773
+ avgQuestionLastMonth: $,
3774
+ successIndicatorsData: M,
3775
+ successIndicatorWeeklyData: J,
3776
+ filter: E,
3777
+ schoolName: oe,
3778
+ learningStrategiesUsage: ie,
3779
+ studentConversations: I
3780
+ }) => {
3781
+ const { t: R } = ve();
3782
+ return /* @__PURE__ */ w(
3783
+ pr,
3784
+ {
3785
+ isOpen: t,
3786
+ toggle: e,
3787
+ style: { overflow: "hidden" },
3788
+ centered: !0,
3789
+ children: [
3790
+ /* @__PURE__ */ w(vr, { children: [
3791
+ /* @__PURE__ */ o("p", { className: `${g["title-modal"]}`, children: R("export_to_pdf") }),
3792
+ /* @__PURE__ */ w("p", { className: `${g["header-desc-modal"]}`, children: [
3793
+ R("the_data_is_taken_from_the_home_screen"),
3794
+ "."
3795
+ ] }),
3796
+ /* @__PURE__ */ o("p", { className: `${g["header-desc-modal"]}`, children: R(
3797
+ "make_sure_everything_is_set_correctly_before_exporting"
3798
+ ) })
3799
+ ] }),
3800
+ /* @__PURE__ */ o(yr, { children: Jn?.map((A) => /* @__PURE__ */ w(
3801
+ Sr,
3802
+ {
3803
+ check: !0,
3804
+ className: `${g["form-checkbox"]}`,
3805
+ children: [
3806
+ /* @__PURE__ */ o(
3807
+ Cr,
3808
+ {
3809
+ type: "checkbox",
3810
+ checked: n.includes(A),
3811
+ onChange: () => a(A)
3812
+ }
3813
+ ),
3814
+ /* @__PURE__ */ o(
3815
+ wr,
3816
+ {
3817
+ check: !0,
3818
+ className: `${g["checkbox-content"]}`,
3819
+ children: R(`${A}`)
3820
+ }
3821
+ )
3822
+ ]
3823
+ },
3824
+ A
3825
+ )) }),
3826
+ /* @__PURE__ */ w(br, { children: [
3827
+ /* @__PURE__ */ o(Na, { color: "light", onClick: e, children: R("cancel") }),
3828
+ /* @__PURE__ */ o(
3829
+ Ai,
3830
+ {
3831
+ startTime: E?.startDate,
3832
+ endTime: E?.endDate,
3833
+ selectedToPDF: n,
3834
+ avgQuestionLastMonth: $,
3835
+ dayOfWeekOneToOne: d,
3836
+ monthsOneToOne: l,
3837
+ preparednessData: _,
3838
+ safetyData: r,
3839
+ stressData: i,
3840
+ successIndicatorsData: M,
3841
+ studentPressure: c,
3842
+ dataOverallReadyToLearn: x,
3843
+ schoolName: oe,
3844
+ metricWeeks: s,
3845
+ metricDataWeeks: u,
3846
+ metricDataMonths: v,
3847
+ metricMonths: m,
3848
+ lowMetricStudents: b,
3849
+ studentMetricPercent: N,
3850
+ preparednessWeeklyData: T,
3851
+ weeksOneToOne: C,
3852
+ successIndicatorWeeklyData: J,
3853
+ readinessToLearning: D,
3854
+ learningStrategiesUsage: ie,
3855
+ optionDate: E?.optionDate || "Monthly",
3856
+ onClose: e,
3857
+ studentConversations: I
3858
+ }
3859
+ )
3860
+ ] })
3861
+ ]
3862
+ }
3863
+ );
3864
+ }, _s = () => {
3865
+ const { t } = ve(), {
3866
+ student: e,
3867
+ isStudent: n,
3868
+ stressData: a,
3869
+ safetyData: r,
3870
+ preparednessData: i,
3871
+ successIndicatorsData: l,
3872
+ monthsOneToOne: d,
3873
+ gradeList: c,
3874
+ handleChangeFilterGrade: s,
3875
+ handleChangeStartDateChart: u,
3876
+ handleChangeEndDateChart: m,
3877
+ filter: v,
3878
+ dayOfWeekOneToOne: b,
3879
+ avgQuestionLastMonth: N,
3880
+ handleChangeFilterCalendar: D,
3881
+ dataOverallReadyToLearn: x,
3882
+ studentSkillQuestion: _,
3883
+ studentPressure: T,
3884
+ expandedFilter: C,
3885
+ onToggleChart: $,
3886
+ dataReadinessOfChart: M,
3887
+ activeTab: J,
3888
+ setActiveTab: E,
3889
+ summarizeQuestions: oe,
3890
+ goToSession: ie,
3891
+ questionFilters: I,
3892
+ handleChangeQuestionFilter: R,
3893
+ handleRedirectAllAnswer: A,
3894
+ handleHoverTooltip: O,
3895
+ successIndicatorWeeklyData: ne,
3896
+ weeksOneToOne: X,
3897
+ preparednessWeeklyData: ue,
3898
+ metricWeeks: xe,
3899
+ metricDataWeeks: ke,
3900
+ metricMonths: Z,
3901
+ metricDataMonths: ee,
3902
+ lowMetricStudents: p,
3903
+ studentMetricPercent: y,
3904
+ stressValue: k,
3905
+ listTotalTime: Q,
3906
+ handleClick: h,
3907
+ handleClose: te,
3908
+ anchorEl: Ce,
3909
+ id_export: L,
3910
+ openPopoverExport: $e,
3911
+ toggle: ae,
3912
+ conversationKpi: F,
3913
+ onSaveFilter: V,
3914
+ onClearFilter: H,
3915
+ handleChangeAcademicYearFilters: P,
3916
+ studentData: j,
3917
+ handleFilterStudent: re,
3918
+ academicYearList: z,
3919
+ academicYearItem: se,
3920
+ modal: he,
3921
+ selectedToPrint: de,
3922
+ handleSelectToPrint: W,
3923
+ schoolName: B,
3924
+ dayOfWeekStress: le,
3925
+ dayOfWeekReadiness: we,
3926
+ setOptionDate: me,
3927
+ safetyValue: mt,
3928
+ activeColumnReadiness: Ue,
3929
+ activeColumnIndicators: qe,
3930
+ handleActiveColumn: Qe,
3931
+ loadingComplete: fe,
3932
+ strategyUsage: Ie,
3933
+ qualityFeedbackStudents: ft,
3934
+ openQualityFeedbackModal: Ve,
3935
+ handleOpenQualityFeedbackModal: Ge,
3936
+ handleCloseQualityFeedbackModal: Je,
3937
+ noteSelected: pt,
3938
+ openDetailNote: vt,
3939
+ handleViewDetailNote: Ke,
3940
+ handleCloseDetailNote: yt,
3941
+ studentConversations: St,
3942
+ onBeforeViewCheckIn: Pe
3943
+ } = Tr(), { exportSessionsCsv: Ct, exportStudentConversationCsv: wt } = Jr(), { classFontSize: Te, fontSizeInputSelect: Xe } = fr(), Ze = je(
3944
+ () => [
3945
+ {
3946
+ label: la,
3947
+ component: /* @__PURE__ */ o(
3948
+ Ar,
3949
+ {
3950
+ studentSkillQuestion: _,
3951
+ classFontSize: Te,
3952
+ safetyData: r,
3953
+ stressData: a,
3954
+ monthsOneToOne: d,
3955
+ dayOfWeekOneToOne: b,
3956
+ dayOfWeekStress: le,
3957
+ handleHoverTooltip: O,
3958
+ avgQuestionLastMonth: N,
3959
+ studentPressure: T,
3960
+ timeOfDay: v.optionDate,
3961
+ metricWeeks: xe,
3962
+ metricDataWeeks: ke,
3963
+ metricMonths: Z,
3964
+ metricDataMonths: ee,
3965
+ lowMetricStudents: p,
3966
+ studentMetricPercent: y,
3967
+ stressValue: k,
3968
+ safetyValue: mt,
3969
+ loadingComplete: fe,
3970
+ onBeforeViewCheckIn: Pe
3971
+ }
3972
+ )
3973
+ },
3974
+ {
3975
+ label: "conversations",
3976
+ component: /* @__PURE__ */ o(
3977
+ Er,
3978
+ {
3979
+ conversationKpi: F,
3980
+ loadingComplete: fe.skippedSessions
3981
+ }
3982
+ ),
3983
+ hiddenForStudent: !0
3984
+ },
3985
+ {
3986
+ label: "readiness_to_learn",
3987
+ component: /* @__PURE__ */ o(
3988
+ Yr,
3989
+ {
3990
+ dataReadinessOfChart: M,
3991
+ handleHoverTooltip: O,
3992
+ classFontSize: Te,
3993
+ dataOverallReadyToLearn: x,
3994
+ avgQuestionLastMonth: N,
3995
+ preparednessData: i,
3996
+ monthsOneToOne: d,
3997
+ dayOfWeekOneToOne: we,
3998
+ preparednessWeeklyData: ue,
3999
+ weeksOneToOne: X,
4000
+ setOptionDate: me,
4001
+ onActiveColumn: Qe,
4002
+ activeColumn: Ue,
4003
+ timeOfDay: v.optionDate,
4004
+ loadingComplete: fe,
4005
+ onBeforeViewCheckIn: Pe
4006
+ }
4007
+ )
4008
+ },
4009
+ {
4010
+ label: "open_field_questions",
4011
+ component: /* @__PURE__ */ o(
4012
+ jr,
4013
+ {
4014
+ goToSession: ie,
4015
+ handleChangeQuestionFilter: R,
4016
+ handleRedirectAllAnswer: A,
4017
+ questionFilters: I,
4018
+ summarizeQuestions: oe,
4019
+ loadingComplete: fe.summarizeReport
4020
+ }
4021
+ )
4022
+ },
4023
+ {
4024
+ label: "success_indicators",
4025
+ component: /* @__PURE__ */ o(
4026
+ Ur,
4027
+ {
4028
+ avgQuestionLastMonth: N,
4029
+ dayOfWeekOneToOne: b,
4030
+ monthsOneToOne: d,
4031
+ successIndicatorsData: l,
4032
+ timeOfDay: v.optionDate,
4033
+ classFontSize: Te,
4034
+ handleHoverTooltip: O,
4035
+ successIndicatorWeeklyData: ne,
4036
+ weeksOneToOne: X,
4037
+ onActiveColumn: Qe,
4038
+ activeColumn: qe,
4039
+ loadingComplete: fe,
4040
+ onBeforeViewCheckIn: Pe
4041
+ }
4042
+ )
4043
+ },
4044
+ {
4045
+ label: "learning_strategies",
4046
+ component: /* @__PURE__ */ o(
4047
+ Gr,
4048
+ {
4049
+ learningStrategies: Ie,
4050
+ classFontSize: Te,
4051
+ handleHoverTooltip: O,
4052
+ loadingComplete: fe.topLearningStrategies,
4053
+ students: ft,
4054
+ openQualityFeedbackModal: Ve,
4055
+ handleOpenQualityFeedbackModal: Ge,
4056
+ handleCloseQualityFeedbackModal: Je,
4057
+ handleViewDetailNote: Ke
4058
+ }
4059
+ )
4060
+ }
4061
+ ],
4062
+ [
4063
+ p,
4064
+ _.responseStudentSafety,
4065
+ _.responseStudentStress,
4066
+ _.studentPercentageStress,
4067
+ _.studentPercentageUnsafe,
4068
+ _.studentSafetyQuestionCount,
4069
+ _.studentStressQuestionCount,
4070
+ T,
4071
+ N,
4072
+ a,
4073
+ r,
4074
+ l,
4075
+ ne,
4076
+ oe,
4077
+ i,
4078
+ x,
4079
+ ue,
4080
+ v,
4081
+ Ue,
4082
+ qe,
4083
+ fe,
4084
+ Ie,
4085
+ Ve,
4086
+ Ge,
4087
+ Je,
4088
+ Ke,
4089
+ Pe
4090
+ ]
4091
+ ).filter((ye) => !(n && ye.hiddenForStudent));
4092
+ return vt ? /* @__PURE__ */ o(
4093
+ kr,
4094
+ {
4095
+ note: pt,
4096
+ backBtnName: "Back to Dashboard",
4097
+ handleBack: yt
4098
+ }
4099
+ ) : /* @__PURE__ */ w(S, { className: `${g["plp-container"]}`, children: [
4100
+ /* @__PURE__ */ w(S, { className: `${g["plp-header"]}`, children: [
4101
+ /* @__PURE__ */ w(
4102
+ Tt,
4103
+ {
4104
+ className: `${g["plp-export"]}`,
4105
+ onClick: h,
4106
+ children: [
4107
+ /* @__PURE__ */ o("div", { children: t("export") }),
4108
+ /* @__PURE__ */ o(
4109
+ nr,
4110
+ {
4111
+ opacity: 0.56
4112
+ }
4113
+ )
4114
+ ]
4115
+ }
4116
+ ),
4117
+ /* @__PURE__ */ o(
4118
+ ar,
4119
+ {
4120
+ id: L,
4121
+ open: $e,
4122
+ anchorEl: Ce,
4123
+ onClose: te,
4124
+ anchorOrigin: {
4125
+ vertical: "bottom",
4126
+ horizontal: "right"
4127
+ },
4128
+ transformOrigin: {
4129
+ vertical: "top",
4130
+ horizontal: "right"
4131
+ },
4132
+ children: /* @__PURE__ */ w(
4133
+ rt,
4134
+ {
4135
+ p: 2,
4136
+ display: "flex",
4137
+ flexDirection: "column",
4138
+ style: { gap: 8 },
4139
+ children: [
4140
+ /* @__PURE__ */ o(
4141
+ "button",
4142
+ {
4143
+ className: `${g["plp-export__btn"]}`,
4144
+ type: "button",
4145
+ onClick: () => {
4146
+ Ct(v), te();
4147
+ },
4148
+ children: t("export_check_ins_to_csv")
4149
+ }
4150
+ ),
4151
+ /* @__PURE__ */ o(
4152
+ "button",
4153
+ {
4154
+ className: `${g["plp-export__btn"]}`,
4155
+ type: "button",
4156
+ onClick: () => {
4157
+ wt(v), te();
4158
+ },
4159
+ children: t("export_conversations_to_csv")
4160
+ }
4161
+ ),
4162
+ /* @__PURE__ */ o(
4163
+ "button",
4164
+ {
4165
+ className: `${g["plp-export__btn"]}`,
4166
+ type: "button",
4167
+ onClick: () => {
4168
+ ae(), te();
4169
+ },
4170
+ children: t("export_to_pdf")
4171
+ }
4172
+ )
4173
+ ]
4174
+ }
4175
+ )
4176
+ }
4177
+ ),
4178
+ /* @__PURE__ */ o(S, { className: `${g["header-top"]}`, children: /* @__PURE__ */ o(K, { className: `${g["plp-title"]}`, children: t("data_dashboard") }) }),
4179
+ /* @__PURE__ */ o(K, { className: `${g["plp-description"]}`, children: t("understand_the_metrics_about_the_students_wellness_and_environment") }),
4180
+ /* @__PURE__ */ o(
4181
+ Wr,
4182
+ {
4183
+ gradeList: c,
4184
+ onChangeFilterGrade: s,
4185
+ fontSizeInputSelect: Xe,
4186
+ gradeFilter: v.grades || [],
4187
+ endDate: v.endDate || null,
4188
+ startDate: v.startDate || null,
4189
+ student: e,
4190
+ onChangeStudent: re,
4191
+ studentData: j,
4192
+ academicYearList: z,
4193
+ valueAcademicYear: se,
4194
+ onChangeAcademicYear: P,
4195
+ onChangeFilterCalendar: D,
4196
+ onChangeEndDateChart: m,
4197
+ onChangeStartDateChart: u,
4198
+ expandedFilter: C,
4199
+ onToggleChart: $,
4200
+ optionDate: v.optionDate,
4201
+ onClearFilter: H,
4202
+ onSaveFilter: V,
4203
+ isStudent: n,
4204
+ loadingComplete: fe
4205
+ }
4206
+ ),
4207
+ /* @__PURE__ */ o(
4208
+ Lr,
4209
+ {
4210
+ gradeList: c,
4211
+ onChangeFilterGrade: s,
4212
+ fontSizeInputSelect: Xe,
4213
+ gradeFilter: v.grades || [],
4214
+ endDate: v.endDate || null,
4215
+ startDate: v.startDate || null,
4216
+ student: e,
4217
+ onChangeStudent: re,
4218
+ studentData: j,
4219
+ academicYearList: z,
4220
+ valueAcademicYear: se,
4221
+ onChangeAcademicYear: P,
4222
+ onChangeFilterCalendar: D,
4223
+ onChangeEndDateChart: m,
4224
+ onChangeStartDateChart: u,
4225
+ expandedFilter: C,
4226
+ onToggleChart: $,
4227
+ optionDate: v.optionDate,
4228
+ onClearFilter: H,
4229
+ onSaveFilter: V,
4230
+ isStudent: n,
4231
+ loadingComplete: fe
4232
+ }
4233
+ ),
4234
+ /* @__PURE__ */ w(S, { className: `${g["list-total"]}`, children: [
4235
+ /* @__PURE__ */ o(
4236
+ nt,
4237
+ {
4238
+ iconSrc: "total-checkin-icon.png",
4239
+ label: "Total Check-ins",
4240
+ value: Q.totalCheckIn,
4241
+ loadingComplete: fe.totalDashboard
4242
+ }
4243
+ ),
4244
+ /* @__PURE__ */ o(
4245
+ nt,
4246
+ {
4247
+ iconSrc: "total-conversation-icon.png",
4248
+ label: "Total 1-1 Conversations",
4249
+ value: Q.totalOneToOne,
4250
+ loadingComplete: fe.totalDashboard
4251
+ }
4252
+ ),
4253
+ /* @__PURE__ */ o(
4254
+ nt,
4255
+ {
4256
+ iconSrc: "total-time-icon.png",
4257
+ label: "Total 1-1 Time",
4258
+ value: dr(Q.totalTimeOneToOne),
4259
+ loadingComplete: fe.totalDashboard
4260
+ }
4261
+ ),
4262
+ /* @__PURE__ */ o(
4263
+ nt,
4264
+ {
4265
+ iconSrc: "total-conference-icon.png",
4266
+ label: "Total Conferences",
4267
+ value: Q.totalConference,
4268
+ loadingComplete: fe.totalDashboard
4269
+ }
4270
+ )
4271
+ ] })
4272
+ ] }),
4273
+ /* @__PURE__ */ o(
4274
+ S,
4275
+ {
4276
+ className: `${g["plp-content"]} ${g[Te]}`,
4277
+ children: /* @__PURE__ */ w(S, { className: g["content-container"], children: [
4278
+ /* @__PURE__ */ o(S, { className: g["content-navigation"], children: Ze.map((ye) => /* @__PURE__ */ o(
4279
+ K,
4280
+ {
4281
+ onClick: () => E(ye.label),
4282
+ className: `${g["nav-item"]} ${g[J === ye.label ? "nav-item-active" : "nav-label"]}`,
4283
+ children: t(ye.label)
4284
+ },
4285
+ ye.label
4286
+ )) }),
4287
+ /* @__PURE__ */ o(S, { className: g["content-component"], children: Ze.filter((ye) => ye.label == J).map((ye) => /* @__PURE__ */ o(ht, { children: ye.component }, ye.label)) })
4288
+ ] })
4289
+ }
4290
+ ),
4291
+ /* @__PURE__ */ o(
4292
+ Oi,
4293
+ {
4294
+ toggle: ae,
4295
+ modal: he,
4296
+ selectedToPrint: de,
4297
+ handleSelectToPrint: W,
4298
+ safetyData: r,
4299
+ stressData: a,
4300
+ monthsOneToOne: d,
4301
+ dayOfWeekOneToOne: b,
4302
+ studentPressure: T,
4303
+ metricWeeks: xe,
4304
+ metricDataWeeks: ke,
4305
+ metricMonths: Z,
4306
+ metricDataMonths: ee,
4307
+ lowMetricStudents: p,
4308
+ studentMetricPercent: y,
4309
+ dataReadinessOfChart: M,
4310
+ dataOverallReadyToLearn: x,
4311
+ preparednessData: i,
4312
+ preparednessWeeklyData: ue,
4313
+ weeksOneToOne: X,
4314
+ avgQuestionLastMonth: N,
4315
+ successIndicatorsData: l,
4316
+ successIndicatorWeeklyData: ne,
4317
+ filter: v,
4318
+ schoolName: B,
4319
+ learningStrategiesUsage: Ie,
4320
+ studentConversations: St
4321
+ }
4322
+ )
4323
+ ] });
4324
+ };
4325
+ export {
4326
+ _s as default
4327
+ };