PageSourceSearch

https://www.aptechproconnect.com/assets/DigitalContentDetailPage-BH0NwWb-.js

js aptechproconnect.com collected 2026-10-09 04:42:49 UTC 84,758 bytes, 620 lines download raw bytes

1var $t=Object.defineProperty;var Bt=(e,r,t)=>r in e?$t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t;var S=(e,r,t)=>Bt(e,typeof r!="symbol"?r+"":r,t);import{g as k,f8 as gt,F as q,r as C,j as i,b as B,T as F,I as D,X as Wt,c5 as xt,s as ke,cM as E,b_ as qt,i as Te,U as mt,v as vt,c8 as Qt,_ as Jt,ac as Ht,u as bt,bR as Gt,c as Kt,e as wt,f9 as yt,fa as jt,ct as Xt,fb as It,R as de,bs as Yt,br as St,n as we,bu as Ct,d as Zt,f as en,k as tn,cD as nn,fc as on}from"./index-QgM5GAdg.js";import{d as rn,e as sn}from"./digitalContentApi-Cvb0Swsu.js";import{V as an,C as Ie}from"./CustomVideoPlayer-SynBI3iW.js";import{F as ln}from"./FullPdfViewer-CIwjpbXi.js";import{u as cn}from"./useOutsideClick-CIqprQBZ.js";import{L as dn}from"./LCCard-uxvqQiuF.js";import{a as un}from"./learningCircleApi-C2S8fp96.js";import{R as hn}from"./ReadMoreToggle-DyRkt_Gn.js";import"./v4-C6aID195.js";import"./FillMinusType1-CrRRAcON.js";import"./tiny-invariant-CopsF_GD.js";import"./pdf-DYzyHnYv.js";/* empty css                  */import"./FillPlusType1-DTgyLD9_.js";const pn=k.div`
2  background-color: #f8f8f8;
3  width: 100%;
4  box-sizing: border-box;
5`;k.div`
6  box-sizing: border-box;
7  padding: 16px 0px;
8  transition: width 1s;
9  height: auto;
10  @media (max-width: 768px) {
11    padding: 8px 0px;
12  }
13`;const fn=k.div`
14  border-radius: 16px 0px 0px 16px;
15  border: 1px solid #ecf1f4;
16  background: #fff;
17  width: 440px;
18  transition: right 1s;
19  box-shadow: none;
20  @media (max-width: 768px) {
21    border-radius: 16px;
22    width: 100%;
23  }
24`;k("div")(()=>({marginTop:"8px",borderRadius:"4px",border:"1px solid #ecf1f4",background:"#fff",display:"flex",padding:"6px 12px",width:"fit-content",alignItems:"center",cursor:"pointer",svg:{margin:"0px 4px"},position:"relative",".resourceList":{borderRadius:"8px",border:"1px solid #ECF1F4",background:" #FFF",boxShadow:" 0px 4px 12px 0px rgba(0, 0, 0, 0.25)",position:"absolute",top:"36px",left:"0px",zIndex:1,width:"300px",padding:"8px",ul:{listStyle:"none",".resource":{justifyContent:"flex-start",svg:{marginRight:"8px"},zIndex:1,color:"#4A4A68","&:hover":{color:"#F37120"}}}}}));k.div`
25  padding: 15px;
26`;k.div`
27  /* position:absolute; */
28  /* right:0px; */
29  border-radius: 8px 0px 0px 8px;
30  border: 1px solid #ecf1f4;
31  background: #fff;
32  padding: 16px;
33  padding-right: 0px;
34  display: none;
35  align-items: center;
36  justify-content: start;
37  color: #000;
38  font-size: 16px;
39  font-style: normal;
40  font-weight: 700;
41  line-height: normal;
42  z-index: 100;
43  &.content {
44    display: flex;
45  }
46  .text {
47    transition: width 1s;
48    width: 0px;
49    padding-left: 8px;
50  }
51  &:hover {
52    .text {
53      width: 80px;
54      display: block;
55    }
56  }
57  @media (max-width: 768px) {
58    &.content {
59      display: none;
60    }
61  }
62`;const gn=k.div`
63  padding: 16px 24px;
64  display: flex;
65  justify-content: space-between;
66  align-items: center;
67  color: #000;
68  font-family: "Mulish", sans-serif;
69  font-size: 16px;
70  font-style: normal;
71  font-weight: 700;
72  line-height: normal;
73  border-bottom: 1px solid rgba(140, 140, 161, 0.2);
74`,xn=k(gt)(()=>({boxShadow:"none",border:"1px solid #ECF1F4",borderRadius:"10px",background:"var(--Primary-color-text, #0D2F55)",width:"100%",margin:"0px 0px 16px","&::before":{display:"none"},".MuiAccordionSummary-root":{display:"flex",width:"100%",padding:"var(--Mobile, 16px)",alignItems:"flex-start",gap:"10px",backgroundColor:"#F8F8F8",borderRadius:"10px","&.Mui-expanded":{borderRadius:"10px",minHeight:"unset",backgroundColor:"#0D2F55",">div":{color:"white"}},">div":{color:"#0D2F55",fontSize:"16px",fontStyle:"normal",fontWeight:"700",lineHeight:"normal",margin:"0px",display:"flex",justifyContent:"space-between",alignItems:"center",svg:{minWidth:"24px"}}},".MuiAccordionDetails-root":{padding:"var(--Mobile, 16px)",ul:{listStyle:"none",margin:"0px",li:{display:"flex",width:"100%",padding:"12px 0px ",justifyContent:"space-between",alignItems:"center",color:"#4A4A68",fontSize:"14px",fontStyle:"normal",fontWeight:"500",lineHeight:"normal",cursor:"pointer",".itemTitle":{display:"flex",justifyContent:"start",alignItems:"center",".circle":{borderRadius:"40px",background:"#F37120",minWidth:"24px",height:"24px",display:"flex",textAlign:"center",justifyContent:"center",alignItems:"center",color:"white",marginRight:"8px"}},".itemArtifacts":{display:"flex",alignItems:"center",color:"#4A4A68",svg:{marginLeft:"4px"}},"&.active":{color:"#F37120"}}}},"@media (max-width: 768px)":{".MuiAccordionSummary-root":{padding:"var(--Mobile, 16px)",gap:"10px",borderRadius:"10px","&.Mu
74i-expanded":{borderRadius:"10px"},">div":{fontSize:"14px",margin:"0px",svg:{minWidth:"24px"}}},".MuiAccordionDetails-root":{padding:"var(--Mobile, 16px)",ul:{margin:"0px",li:{padding:"12px 0px ",fontSize:"14px",".itemTitle":{".circle":{borderRadius:"40px",width:"20px",height:"20px",marginRight:"8px"},p:{fontSize:"12px"}},".itemArtifacts":{svg:{marginLeft:"4px"}},"&.active":{color:"#F37120"}}}}}})),Ye=k.button`
75  display: flex;
76  align-items: center;
77  border: none;
78  background: none;
79`,mn=k.div`
80  @media (max-width: 768px) {
81    width: 120px;
82  }
83`,vn=k.div`
84  display: flex;
85  align-items: end;
86  @media (max-width: 768px) {
87    p {
88      font-size: 16px;
89    }
90  }
91`,bn=k.div`
92  display: flex;
93  flex: 1;
94  @media (max-width: 768px) {
95    font-size: 12px;
96    width: calc(100% - 120px);
97  }
98`;k.div`
99  height: 400px;
100  width: 100%;
101  // overflow-y:scroll;
102
103  // scrollbar styles
104  &::-webkit-scrollbar {
105    width: 12px;
106    background: #ecf1f4;
107  }
108
109  &::-webkit-scrollbar-thumb {
110    background-color: #4a4a68;
111    border-radius: 5px;
112  }
113  canvas {
114    margin: 0 auto;
115    width: 80% !important;
116    height: 100% !important;
117  }
118  @media (max-width: 768px) {
119    canvas {
120      width: 100% !important;
121    }
122  }
123`;const wn=k.div`
124  width: 100%;
125  height: 400px;
126  display: flex;
127  align-items: center;
128  justify-content: center;
129  flex-direction: column;
130  text-align: center;
131  border-radius: 22px;
132  background: rgba(213, 58, 57, 0.1);
133  background: url(${e=>e.img?e.img:""});
134  background-size: cover;
135  a {
136    text-decoration: none;
137    button {
138      width: auto;
139      margin-top: 16px;
140      border-radius: 24px;
141    }
142  }
143`,yn=k.div`
144  width: 100%;
145  min-height: 400px;
146  padding: 10px;
147  display: flex;
148  align-items: center;
149  justify-content: center;
150  flex-direction: column;
151  text-align: center;
152  border-radius: 22px;
153  background: #f0f0f0;
154  border: 1px solid #e6e9ed;
155  gap: 16px;
156`,jn=k(q)`
157  width: fit-content;
158  padding: 16px;
159  border-radius: 12px;
160  background: #fff;
161  box-sizing: border-box;
162  text-align: normal;
163  flex-wrap: wrap;
164  &:hover {
165    border: 1px solid #f37120;
166    background: #fffcfa;
167  }
168`,Sn=k.button`
169  padding: 10px 15px;
170  border: 1px solid #878a9c;
171  border-radius: 8px;
172`,Cn=k.div`
173  width: 100%;
174  height: 400px;
175  display: flex;
176  align-items: center;
177  justify-content: center;
178  flex-direction: column;
179  text-align: center;
180  border-radius: 22px;
181  background: rgba(13, 47, 85, 0.1);
182  background: url(${e=>e.img?e.img:""});
183  background-size: cover;
184  a {
185    text-decoration: none;
186    button {
187      width: auto;
188      margin-top: 16px;
189      border-radius: 24px;
190    }
191  }
192`,En=k(gt)(()=>({boxShadow:"none !important",borderRadius:"10px !important",width:"100%",margin:"8px 0px 12px !important",background:"#F0F0F0 !important","&::before":{display:"none"},".MuiAccordionSummary-root":{display:"flex",width:"100%",padding:"8px",alignItems:"flex-start",gap:"10px",backgroundColor:"#F8F8F8",borderRadius:"10px",boxShadow:"none",minHeight:"40px","&.Mui-expanded":{borderRadius:"10px",minHeight:"unset",backgroundColor:"#F8F8F8",">div":{color:"#0D2F55"}},">div":{color:"#0D2F55",fontSize:"16px",fontStyle:"normal",fontWeight:"700",lineHeight:"normal",margin:"0px",display:"flex",justifyContent:"space-between",alignItems:"center",svg:{minWidth:"24px"}}},".MuiAccordionDetails-root":{padding:"var(--Mobile, 16px)",ul:{listStyle:"none",margin:"0px",li:{display:"flex",width:"100%",padding:"8px 0px ",justifyContent:"space-between",alignItems:"center",color:"#4A4A68",fontSize:"14px",fontStyle:"normal",fontWeight:"500",lineHeight:"normal",cursor:"pointer",".itemTitle":{display:"flex",justifyContent:"start",alignItems:"center",".circle":{borderRadius:"40px",background:"#F37120",minWidth:"24px",height:"24px",display:"flex",textAlign:"center",justifyContent:"center",alignItems:"center",color:"white",marginRight:"8px"}},".itemArtifacts":{display:"flex",alignItems:"center",color:"#4A4A68",svg:{marginLeft:"4px"}},"&.active":{color:"#F37120"}}}},"@media (max-width: 768px)":{".MuiAccordionSummary-root":{padding:"var(--Mobile, 16px)",gap:"10px",borderRadius:"10px","&.Mu
192i-expanded":{borderRadius:"10px"},">div":{fontSize:"14px",margin:"0px",svg:{minWidth:"24px"}}},".MuiAccordionDetails-root":{padding:"var(--Mobile, 16px)",ul:{margin:"0px",li:{padding:"12px 0px ",fontSize:"14px",".itemTitle":{".circle":{borderRadius:"40px",width:"20px",height:"20px",marginRight:"8px"},p:{fontSize:"12px"}},".itemArtifacts":{svg:{marginLeft:"4px"}},"&.active":{color:"#F37120"}}}}}}));var R=(e=>(e.Correct="#39B64A",e.Wrong="#D10909",e.Selected="#F37120",e))(R||{});k.div`
193  background-color: ${e=>e!=null&&e.color?e.color:"white"};
194  margin: 10px;
195`;k.div`
196  background-color: ${e=>e!=null&&e.color?e.color:"white"};
197  margin: 10px;
198`;k.div`
199  background-color: ${e=>e!=null&&e.color?e.color:"white"};
200  margin: 10px;
201`;k.div`
202  background-color: ${e=>e!=null&&e.color?e.color:"white"};
203  margin: 10px;
204`;k.li`
205  background-color: ${e=>e!=null&&e.color?e.color:"white"};
206  margin: 10px;
207`;k.li`
208  background-color: ${e=>e!=null&&e.color?e.color:"white"};
209  margin: 10px;
210`;const kn=k.div`
211  border-radius: 16px;
212  border: 1px solid #ecf1f4;
213  background: #fff;
214  padding: 24px;
215  width: 100%;
216  box-sizing: border-box;
217`,Et=k.div`
218  padding: 64px 0px 80px;
219  display: flex;
220  justify-content: center;
221  align-items: center;
222  flex-direction: column;
223  h1 {
224    margin-top: 12px;
225    color: #11173a;
226  }
227  .title {
228    color: #4a4a68;
229    text-align: center;
230    font-size: 24px;
231    font-style: normal;
232    font-weight: 600;
233    line-height: normal;
234    margin-top: 40px;
235  }
236  .desc {
237    color: #575c74;
238    font-size: 16px;
239    font-style: normal;
240    font-weight: 400;
241    line-height: normal;
242    margin: 40px 0px;
243    text-align: center;
244  }
245  button {
246    color: #fff;
247    font-size: 16px;
248    font-style: normal;
249    font-weight: 700;
250    line-height: 24px;
251    text-transform: uppercase;
252    padding: 8px 24px;
253    background: #f37120;
254    border: 0px;
255    border-radius: 8px;
256    cursor: pointer;
257  }
258  .reset {
259    background: #f37120;
260  }
261  .score {
262    border-radius: 20px;
263    border: 2px solid #f37120;
264    background: #f3712015;
265    box-shadow: 8px 8px 0px 0px #000;
266    color: #f37120;
267    line-height: normal;
268    letter-spacing: 1.6px;
269    text-transform: uppercase;
270    text-align: center;
271    padding: 16px;
272    margin: 16px 0px 32px;
273    .s1 {
274      font-size: 40px;
275      font-style: normal;
276      font-weight: 700;
277    }
278    .s2 {
279      font-size: 24px;
280      font-style: normal;
281      font-weight: 500;
282    }
283  }
284  @media (max-width: 768px) {
285    font-size: 20px;
286    padding: 0px;
287    h1 {
288      margin-top: 8px;
289      font-size: 16px;
290    }
291    .title {
292      font-size: 16px;
293      font-weight: 600;
294      margin-top: 12px;
295    }
296    .desc {
297      font-size: 12px;
298      margin: 24px 0px 16px;
299    }
300    button {
301      font-size: 10px;
302      line-height: 20px;
303      padding: 8px 24px;
304    }
305    .reset {
306      background: #f37120;
307      font-size:14px;
308    }
309    .score {
310      padding: 24px;
311      margin: 16px 0px 32px;
312      .s1 {
313        font-size: 28px;
314      }
315      .s2 {
316        font-size: 16px;
317      }
318  }
319`,Q=k.h3`
320  color: #000;
321  font-size: 24px;
322  font-style: normal;
323  font-weight: 500;
324  line-height: normal;
325  margin-bottom: 16px;
326  @media (max-width: 768px) {
327    font-size: 16px;
328    text-align: center;
329    padding-bottom: 20px;
330    margin: 0px;
331  }
332`,Ae=k.div`
333  border: 1px solid ${e=>e!=null&&e.color?e.color:"#e8e8e8"};
334  background: ${e=>e!=null&&e.color?e.color+"12":"#fff"};
335  border-radius: 8px;
336  display: flex;
337  justify-content: space-between;
338  align-items: center;
339  position: relative;
340  margin-bottom: 12px;
341  label {
342    cursor: pointer;
343    width: 100%;
344    padding: 10px;
345  }
346  input {
347    /* position: absolute; */
348    margin-right: 16px;
349    width: 18px;
350    height: 18px;
351  }
352  input[type="checkbox"] {
353    accent-color: #e5752f;
354  }
355  input[type="radio"] {
356    accent-color: #e5752f;
357  }
358
359  @media (max-width: 768px) {
360    label {
361      font-size: 14px;
362      line-height: 24px;
363      padding: 8px 16px;
364    }
365  }
366`,Y=k.div`
367  display: flex;
368  justify-content: space-between;
369  align-items: center;
370  margin-bottom: 16px;
371`,Z=k.button`
372  display: flex;
373  height: 40px;
374  padding: 10px 16px;
375  justify-content: center;
376  align-items: center;
377  border-radius: 8px;
378  background: #f37120;
379  border: 0px;
380  color: #fff;
381  font-size: 16px;
382  font-style: normal;
383  font-weight: 600;
384  line-height: normal;
385  cursor: pointer;
386  &:disabled {
387    cursor: not-allowed;
388    opacity: 0.4;
389  }
390  @media (max-width: 768px) {
391    height: 30px;
392    padding: 8px 12px;
393    border-radius: 4px;
394    font-size: 12px;
395  }
396`,ee=k.button`
397  display: flex;
398  padding: 10px 16px;
399  flex-direction: column;
400  justify-content: center;
401  align-items: center;
402  border-radius: 8px;
403  border: 1px solid #f37120;
404  color: #f37120;
405  font-size: 16px;
406  font-style: normal;
407  font-weight: 600;
408  line-height: normal;
409  cursor: pointer;
410  margin-left: 10px;
411  background: #fff;
412  @media (max-width: 768px) {
413    height: 30px;
414    padding: 8px 12px;
415    border-radius: 4px;
416    font-size: 12px;
417  }
418`,z=k.div`
419  p {
420    font-size: 14px;
421  }
422`,Tn=k.div`
423  border: 1px solid ${e=>e!=null&&e.color?e.color:"#e8e8e8"};
424  background: ${e=>e!=null&&e.color?e.color+"12":"#fff"};
425  color: #000;
426  font-size: 20px;
427  font-style: normal;
428  font-weight: 500;
429  line-height: normal;
430  margin-bottom: 16px;
431  display: flex;
432  border-radius: 8px;
433  align-items: center;
434  padding: 8px 16px;
435  justify-content: space-between;
436  .options {
437    display: flex;
438  }
439  @media (max-width: 768px) {
440    font-size: 14px;
441    padding: 5px 16px;
442  }
443`,Ze=k.div`
444  border: 1px solid ${e=>e!=null&&e.color?e.color:"#e8e8e8"};
445  background: ${e=>e!=null&&e.color?e.color+"12":"#fff"};
446  margin-bottom: 0px;
447  border-radius: 40px;
448  color: #858585;
449  font-size: 14px;
450  font-style: normal;
451  font-weight: 500;
452  line-height: normal;
453  text-transform: capitalize;
454  padding: 4px 8px;
455  margin-right: 8px;
456  cursor: pointer;
457  input {
458    display: none;
459  }
460  @media (max-width: 768px) {
461    font-size: 14px;
462    input {
463      display: none;
464    }
465  }
466`,G=k.li`
467  border: 1px solid ${e=>e!=null&&e.color?e.color:"#e8e8e8"};
468  background: ${e=>e!=null&&e.color?e.color+"12":"#fff"};
469  border-radius: 8px;
470  display: flex;
471  justify-content: space-between;
472  align-items: center;
473  position: relative;
474  margin-bottom: 12px;
475  padding: 10px;
476  cursor: pointer;
477  max-width: 600px;
478  > div {
479    display: flex;
480    justify-content: space-between;
481    align-items: center;
482  }
483  @media (max-width: 768px) {
484    font-size: 14px;
485    padding: 5px 8px;
486  }
487`,he=k.div`
488  color: #858585;
489  font-size: 16px;
490  font-style: normal;
491  font-weight: 500;
492  line-height: normal;
493  padding-bottom: 8px;
494  @media (max-width: 768px) {
495    font-size: 14px;
496    padding-bottom: 12px;
497  }
498`,et=k.div`
499  ul {
500    display: flex;
501    flex-direction: column;
502    justify-content: space-between;
503    min-width: 300px;
504    li {
505      min-height: 30px;
506    }
507    &:first-child {
508      margin-right: 32px;
509      > li {
510        &::before {
511          content: ".";
512          position: absolute;
513          right: -32px;
514          width: 32px;
515          height: 1px;
516          background: #d9d9d9;
517          color: #fff;
518        }
519        &::after {
520          content: ".";
521          position: absolute;
522          right: -20px;
523          width: 8px;
524          height: 8px;
525          border-radius: 50%;
526          background: #d9d9d9;
527          color: #fff;
528        }
529      }
530    }
531  }
532  @media (max-width: 768px) {
533    ul {
534      min-width: 45%;
535      li {
536        min-height: unset;
537      }
538      &:first-child {
539        margin-right: 32px;
540      }
541    }
542  }
543`,te=k.div`
544  color: #858585;
545  font-size: 16px;
546  font-style: normal;
547  font-weight: 500;
548  line-height: normal;
549  padding-bottom: 16px;
550  text-align: center;
551  @media (max-width: 768px) {
552    font-size: 12px;
553    padding-bottom: 12px;
554  }
555`,An=({question:e,options:r,answer:t,handleSubmitAnswer:n,submittedAnswers:o,index:s,onNext:a,correctAnswerHandler:l,quizLength:d})=>{const[c,h]=C.useState(o[s]||""),m=!!o[s],w=()=>{n(c),c==t?l():console.log("fail")},u=p=>{if(m){if(t==p)return R.Correct;if(p==c&&c!=t)return R.Wrong}if(c==p)return R.Selected};return i.jsxs("div",{children:[i.jsxs(te,{children:["Question ",s+1," of ",d]}),i.jsxs(Q,{children:[s+1,". ",e]}),r.map((p,x)=>i.jsxs(Ae,{color:u(p),children:[i.jsx("input",{type:"radio",id:p,name:"singleSelect",value:p,checked:p===c,onChange:f=>!m&&h(f.target.value)}),i.jsx("label",{htmlFor:p,children:p})]},x)),i.jsxs(B,{gap:"40px",children:[m&&(c==t?i.jsx(z,{children:i.jsx(F,{color:"#00BA00",type:"small",children:"Correct!"})}):i.jsx(z,{children:i.jsx(F,{color:"#D10909",type:"small",children:"Incorrect!"})})),i.jsxs(Y,{children:[c?i.jsx(Z,{onClick:w,disabled:m,children:"Submit"}):i.jsx("div",{}),s in o&&i.jsx("div",{children:i.jsx(ee,{onClick:()=>a(),children:"Next"})})]})]})]})},Ln=({question:e,options:r,answer:t,handleSubmitAnswer:n,submittedAnswers:o,index:s,onNext:a,correctAnswerHandler:l,quizLength:d})=>{const[c,h]=C.useState(o[s]||[]),m=!!o[s],w=x=>{const{value:f,checked:g}=x.target;h(b=>g?[...b,f]:b.filter(v=>v!==f))},u=()=>{n(c),c.sort().toString()==t.sort().toString()?l():console.log("fail")},p=x=>
555{if(m){if(t.includes(x))return R.Correct;if(c.includes(x)&&!t.includes(x))return R.Wrong}if(c.includes(x))return R.Selected};return i.jsxs("div",{children:[i.jsxs(te,{children:["Question ",s+1," of ",d]}),i.jsxs(Q,{children:[s+1,". ",e]}),i.jsx(he,{children:"Select one or more"}),r.map((x,f)=>i.jsxs(Ae,{color:p(x),children:[i.jsx("label",{htmlFor:x,children:x}),i.jsx("input",{type:"checkbox",id:x,value:x,checked:c.includes(x),onChange:g=>!m&&w(g)})]},f)),i.jsxs(B,{gap:"40px",children:[m&&(c.sort().toString()==t.sort().toString()?i.jsx(z,{children:i.jsx(F,{color:"#00BA00",type:"small",children:"Correct!"})}):i.jsx(z,{children:i.jsx(F,{color:"#D10909",type:"small",children:"Incorrect!"})})),i.jsxs(Y,{children:[c.length?i.jsx(Z,{onClick:u,disabled:m,children:"Submit"}):i.jsx("div",{}),s in o&&i.jsx("div",{children:i.jsx(ee,{onClick:()=>a(),children:"Next"})})]})]})]})},Mn=({question:e,options:r,answer:t,handleSubmitAnswer:n,submittedAnswers:o,index:s,onNext:a,correctAnswerHandler:l,quizLength:d})=>{const[c,h]=C.useState(o[s]||""),m=!!o[s],w=()=>{n(c),c==t?l():console.log("fail")},u=p=>{if(m){if(t==p)return R.Correct;if(p==c&&c!=t)return R.Wrong}if(c==p)return R.Selected};return i.jsxs("div",{children:[i.jsxs(te,{children:["Question ",s+1," of ",d]}),i.jsxs(Q,{children:[s+1,". ",e]}),r.map((p,x)=>i.jsxs(Ae,{color:u(p),children:[i.jsx("input",{type:"radio",id:p,name:"singleSelect",value:p,checked:p===c,onChange:f=>!m&&h(f.target.value)}),i.jsx("label",{htmlFor:p,children:p})]},x)),i.jsxs(B,{gap:"40px",children:[m&&(c==t?i.jsx(z,{children:i.jsx(F,{color:"#00BA00",type:"small",children:"Correct!"})}):i.jsx(z,{children:i.jsx(F,{color:"#D10909",type:"small",children:"Incorrect!"})})),i.jsxs(Y,{children:[c?i.jsx(Z,{onClick:w,disabled:m,children:"Submit"}):i.jsx("div",{}),s in o&&i.jsx("div",{children:i.jsx(ee,{onClick:()=>a(),children:"Next"})})]})]})]})},Pn=({question:e,options:r,answer:t,handleSubmitAnswer:n,submittedAnswers:o,index:s,onNext:a,correctAnswerHandler:l,quizLength:d})=>{const[c,h]=C.useState(o[s]||r),m=!!o[s],w=m?o[s].toString()!=t.toString():!1,u=(g,b)=>{g.dataTransfer.setData("index",b.toString())},p=(g,b)=>{const v=parseInt(g.dataTransfer.getData("index")),T=[...c],[A]=T.splice(v,1);T.splice(b,0,A),h(T)},x=()=>{n(c),c.toString()==t.toString()?l():console.log("fail")},f=(g,b)=>{if(m){if(t[b]==g)return R.Correct;if(g==c[b]&&c[b]!=t[b])return R.Wrong}if(c[b]==g)return R.Selected};return i.jsxs("div",{children:[i.jsxs(te,{children:["Question ",s+1," of ",d]}),i.jsxs(Q,{children:[s+1,". ",e]}),i.jsx(he,{children:"Drag and drop the steps into the correct sequence"}),i.jsx("ul",{children:c.map((g,b)=>i.jsx(G,{color:f(g,b),draggable:!m,onDragStart:v=>u(v,b),onDrop:v=>p(v,b),onDragOver:v=>v.preventDefault(),children:i.jsxs("div",{children:[i.jsx(D,{name:"draggable"}),g]})},b))}),i.jsxs(B,{gap:"40px",children:[m&&(c.toString()==t.toString()?i.jsx(z,{children:i.jsx(F,{color:"#00BA00",type:"small",children:"Correct!"})}):i.jsx(z,{children:i.jsx(F,{color:"#D10909",type:"small",children:"Incorrect!"})})),i.jsxs(Y,{children:[i.jsx(Z,{onClick:x,disabled:m,children:"Submit"}),s in o&&i.jsx("div",{children:i.jsx(ee,{onClick:()=>a(),children:"Next"})})]})]}),w&&i.jsxs("ul",{children:[i.jsx(Q,{children:"Correct Answer"}),t.map((g,b)=>i.jsx(G,{color:f(g,b),children:g},b))]})]})},Dn=({question:e,option1:r,option2:t,answer:n,handleSubmitAnswer:o,submittedAnswers:s,index:a,onNext:l,correctAnswerHandler:d,quizLength:c})=>{const[h,m]=C.useState(s[a]||t),w=!!s[a],u=w?s[a].toString()!=n.toString():!1,p=(b,v)=>{b.dataTransfer.setData("index",v.toString())},x=(b,v)=>{const T=parseInt(b.dataTransfer.getData("index")),A=[...h],[j]=A.splice(T,1);A.splice(v,0,j),m(A)},f=()=>{o(h),h.toString()==n.toString()?d():console.log("fail")},g=(b,v)=>{if(w){if(n[v]==b)return R.Correct;if(b==h[v]&&h[v]!=n[v])return R.Wrong}if(h[v]==b)return R.Selected};return i.jsxs("div",{children:[i.jsxs(te,{children:["Question ",a+1," of ",c]}),i.jsxs(Q,{children:[a+1,". ",e]}),i.jsx(he,{children:"Drag & drop the matching options"}),i.jsxs(et,{style:{display:"flex",justifyContent:""},children:[i.jsx("ul",{children:r.map((b,v)=>i.jsx(G,{children:b},v))}),i.jsx("ul",{children:h.map((b,v)=>i.jsx(G,{color:g(b,v),draggable:!w,onDragStart:T=>p(T,v),onDrop:T=>x(T,v),onDragOver:T=>T.preventDefault(),children:i.jsxs("div",{children:[i.jsx(D,{name:"draggable"}),b]})},v))})]}),i.jsxs(B,{gap:"40px",children:[w&&(h.toString()==n.toString()?i.jsx(z,{children:i.jsx(F,{color:"#00BA00",type:"small",children:"Correct!"})}):i.jsx(z,{children:i.jsx(F,{color:"#D10909",type:"small",children:"Incorrect!"})})),i.jsxs(Y,{children:[i.jsx(Z,{onClick:f,disabled:w,children:"Submit"}),a in s&&i.jsx("div",{children:i.jsx(ee,{onClick:()=>l(),children:"Next"})})]})]}),u&&i.jsxs("ul",{children:[i.jsx(Q,{children:"Correct Answer"}),i.jsxs(et,{style:{display:"flex",justifyContent:""},children:[i.jsx("ul",{children:r.map((b,v)=>i.jsx(G,{children:b},v))}),i.jsx("ul",{children:n.map((b,v)=>i.jsx(G,{color:g(b,v),draggable:!w,onDragStart:T=>p(T,v),onDrop:T=>x(T,v),onDragOver:T=>T.preventDefault(),children:i.jsx("div",{children:b})},v))})]})]})]})},Fn=({question:e,options:r,answer:t,handleSubmitAnswer:n,submittedAnswers:o,index:s,onNext:a,correctAnswerHandler:l,quizLength:d})=>{const[c,h]=C.useState(o[s]||[]),m=!!o[s],w=(x,f)=>{h(g=>{const b=[...g];return b[x]=f,b})},u=()=>{n(c),c.toString()==t.toString()?l():console.log("fail")},p=(x,f)=>{if(m){if(t[f]==x)return R.Correct;
555if(x==c[f]&&c[f]!=t[f])return R.Wrong}if(c[f]==x)return R.Selected};return i.jsxs("div",{children:[i.jsxs(te,{children:["Question ",s+1," of ",d]}),i.jsxs(Q,{children:[s+1,". ",e]}),i.jsx(he,{children:"Select an option for each statement"}),r.map((x,f)=>i.jsxs(Tn,{color:p(c[f],f),children:[i.jsx("div",{children:x}),i.jsxs("div",{className:"options",children:[i.jsxs(Ze,{color:p("true",f),children:[i.jsx("input",{type:"radio",id:`${x}-${f}-true`,name:`${x}-${f}`,value:"true",checked:c[f]===!0,onChange:()=>!m&&w(f,"true")}),i.jsx("label",{htmlFor:`${x}-${f}-true`,children:"True"})]}),i.jsxs(Ze,{color:p("false",f),children:[i.jsx("input",{type:"radio",id:`${x}-${f}-false`,name:`${x}-${f}`,value:"false",checked:c[f]===!1,onChange:()=>!m&&w(f,"false")}),i.jsx("label",{htmlFor:`${x}-${f}-false`,children:"False"})]})]})]},f)),i.jsxs(B,{gap:"40px",children:[m&&(c.toString()==t.toString()?i.jsx(z,{children:i.jsx(F,{color:"#00BA00",type:"small",children:"Correct!"})}):i.jsx(z,{children:i.jsx(F,{color:"#D10909",type:"small",children:"Incorrect!"})})),i.jsxs(Y,{children:[c.filter(x=>x!==void 0).length==t.length?i.jsx(Z,{onClick:u,disabled:m,children:"Submit"}):i.jsx("div",{}),s in o&&i.jsx("div",{children:i.jsx(ee,{onClick:()=>a(),children:"Next"})})]})]})]})},Rn=({data:e})=>{const[r,t]=C.useState(0),[n,o]=C.useState(!1),[s,a]=C.useState(!1),[l,d]=C.useState(0),c=e==null?void 0:e.length,[h,m]=C.useState({}),w=(g,b)=>{m(v=>({...v,[g]:b}))},u=()=>{r<c-1?t(r+1):r===c-1&&(a(!0),o(!1),t(0))},p=()=>{d(l+1)},x=()=>{m({}),o(!0),d(0)};function f(){const g=e[r];switch(g.type){case"singleSelect":return i.jsx(An,{index:r,question:g.question,options:g.options||[],answer:g.answer,handleSubmitAnswer:b=>w(r,b),submittedAnswers:h,onNext:u,correctAnswerHandler:p,quizLength:c},r);case"multiSelect":return i.jsx(Ln,{index:r,question:g.question,options:g.options||[],answer:g.answer,handleSubmitAnswer:b=>w(r,b),submittedAnswers:h,onNext:u,correctAnswerHandler:p,quizLength:c},r);case"trueOrFalse":return i.jsx(Mn,{index:r,question:g.question,options:g.options||[],answer:g.answer,handleSubmitAnswer:b=>w(r,b),submittedAnswers:h,onNext:u,correctAnswerHandler:p,quizLength:c},r);case"arrangeInSequence":return i.jsx(Pn,{index:r,question:g.question,options:g.options,answer:g.answer,handleSubmitAnswer:b=>w(r,b),submittedAnswers:h,onNext:u,correctAnswerHandler:p,quizLength:c},r);case"matchColumn":return i.jsx(Dn,{index:r,question:g.question,option1:g.option1,option2:g.option2,answer:g.answer,handleSubmitAnswer:b=>w(r,b),submittedAnswers:h,onNext:u,correctAnswerHandler:p,quizLength:c},r);case"multiTrueOrFalse":return i.jsx(Fn,{index:r,question:g.question,options:g.options,answer:g.answer,handleSubmitAnswer:b=>w(r,b),submittedAnswers:h,onNext:u,correctAnswerHandler:p,quizLength:c},r)}}return i.jsx(kn,{children:n?i.jsx(f,{}):i.jsx(i.Fragment,{children:s?i.jsx(Nn,{resetQuiz:x,correctAnswers:l,totalQuestions:c}):i.jsx(On,{setShowQuestions:o,quizLength:c})})})},On=({setShowQuestions:e,quizLength:r})=>{const{warningToast:t}=Wt();return i.jsxs(Et,{children:[i.jsx(D,{name:"quizLight",color:"#F37120"}),i.jsx("h1",{children:"Quiz"}),i.jsx("div",{className:"title",children:"Welcome to the Quiz Session! "}),i.jsx("div",{className:"desc",children:"Get ready to test your knowledge with a series of fun and challenging questions. Sharpen your pencils, put on your thinking caps, and let's dive in. Good luck!"}),i.jsx("button",{onClick:()=>{r<1?t("No questions Specified"):e(!0)},children:"Let’s get started"})]})},Nn=({resetQuiz:e,correctAnswers:r,totalQuestions:t})=>i.jsxs(Et,{children:[i.jsx(D,{name:"quizLight",color:"#F37120"}),i.jsx("h1",{children:"Quiz Result"}),i.jsx("div",{className:"title",children:"Congratulations! You have scored"}),i.jsxs("div",{className:"score",children:[i.jsx("div",{className:"s1",children:r}),i.jsxs("div",{className:"s2",children:["out of ",t]})]}),i.jsx("button",{className:"reset",onClick:()=>e(),children:"Retest"})]}),_n="/assets/linkBg-D7jEw7a0.svg";function Vn({link:e}){return i.jsxs(wn,{img:_n,children:[i.jsx("div",{children:"You will be redirected to a new tab"}),i.jsx(xt,{to:e,target:"_black",children:i.jsx(ke,{buttonType:"primary",iconName:"
555copyLink",iconWidth:"20px",onHandleClick:()=>{},children:"Click here"})})]})}const zn="/assets/downloadBg-4eJyCpW2.svg";function Un({link:e}){return i.jsxs(Cn,{img:zn,children:[i.jsx("div",{children:"Click the button below to start the download"}),i.jsx(xt,{to:e,children:i.jsx(ke,{buttonType:"primary",iconName:"downloadFolder",iconWidth:"20px",onHandleClick:()=>{},children:"Download"})})]})}const kt=Object.freeze({left:0,top:0,width:16,height:16}),ue=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Le=Object.freeze({...kt,...ue}),ye=Object.freeze({...Le,body:"",hidden:!1});function $n(e,r){const t={};!e.hFlip!=!r.hFlip&&(t.hFlip=!0),!e.vFlip!=!r.vFlip&&(t.vFlip=!0);const n=((e.rotate||0)+(r.rotate||0))%4;return n&&(t.rotate=n),t}function tt(e,r){const t=$n(e,r);for(const n in ye)n in ue?n in e&&!(n in t)&&(t[n]=ue[n]):n in r?t[n]=r[n]:n in e&&(t[n]=e[n]);return t}function Bn(e,r){const t=e.icons,n=e.aliases||Object.create(null),o=Object.create(null);function s(a){if(t[a])return o[a]=[];if(!(a in o)){o[a]=null;const l=n[a]&&n[a].parent,d=l&&s(l);d&&(o[a]=[l].concat(d))}return o[a]}return Object.keys(t).concat(Object.keys(n)).forEach(s),o}function Wn(e,r,t){const n=e.icons,o=e.aliases||Object.create(null);let s={};function a(l){s=tt(n[l]||o[l],s)}return a(r),t.forEach(a),tt(e,s)}function Tt(e,r){const t=[];if(typeof e!="object"||typeof e.icons!="object")return t;e.not_found instanceof Array&&e.not_found.forEach(o=>{r(o,null),t.push(o)});const n=Bn(e);for(const o in n){const s=n[o];s&&(r(o,Wn(e,o,s)),t.push(o))}return t}const qn={provider:"",aliases:{},not_found:{},...kt};function xe(e,r){for(const t in r)if(t in e&&typeof e[t]!=typeof r[t])return!1;return!0}function At(e){if(typeof e!="object"||e===null)return null;const r=e;if(typeof r.prefix!="string"||!e.icons||typeof e.icons!="object"||!xe(e,qn))return null;const t=r.icons;for(const o in t){const s=t[o];if(!o||typeof s.body!="string"||!xe(s,ye))return null}const n=r.aliases||Object.create(null);for(const o in n){const s=n[o],a=s.parent;if(!o||typeof a!="string"||!t[a]&&!n[a]||!xe(s,ye))return null}return r}const Lt=/^[a-z0-9]+(-[a-z0-9]+)*$/,pe=(e,r,t,n="")=>{const o=e.split(":");if(e.slice(0,1)==="@"){if(o.length<2||o.length>3)return null;n=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const l=o.pop(),d=o.pop(),c={provider:o.length>0?o[0]:n,prefix:d,name:l};return r&&!le(c)?null:c}const s=o[0],a=s.split("-");if(a.length>1){const l={provider:n,prefix:a.shift(),name:a.join("-")};return r&&!le(l)?null:l}if(t&&n===""){const l={provider:n,prefix:"",name:s};return r&&!le(l,t)?null:l}return null},le=(e,r)=>e?!!((r&&e.prefix===""||e.prefix)&&e.name):!1,nt=Object.create(null);function Qn(e,r){return{provider:e,prefix:r,icons:Object.create(null),missing:new Set}}function I(e,r){const t=nt[e]||(nt[e]=Object.create(null));return t[r]||(t[r]=Qn(e,r))}function Mt(e,r){return At(r)?Tt(r,(t,n)=>{n?e.icons[t]=n:e.missing.add(t)}):[]}function Jn(e,r,t){try{if(typeof t.body=="string")return e.icons[r]={...t},!0}catch{}return!1}let se=!1;function Pt(e){return typeof e=="boolean"&&(se=e),se}function ot(e){const r=typeof e=="string"?pe(e,!0,se):e;if(r){const t=I(r.provider,r.prefix),n=r.name;return t.icons[n]||(t.missing.has(n)?null:void 0)}}function Hn(e,r){const t=pe(e,!0,se);if(!t)return!1;const n=I(t.provider,t.prefix);return r?Jn(n,t.name,r):(n.missing.add(t.name),!0)}function Gn(e,r){if(typeof e!="object")return!1;if(typeof r!="string"&&(r=e.provider||""),se&&!r&&!e.prefix){let o=!1;return At(e)&&(e.prefix="",Tt(e,(s,a)=>{Hn(s,a)&&(o=!0)})),o}const t=e.prefix;if(!le({prefix:t,name:"a"}))return!1;const n=I(r,t);return!!Mt(n,e)}const Dt=Object.freeze({width:null,height:null}),Ft=Object.freeze({...Dt,...ue}),Kn=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Xn=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function it(e,r,t){if(r===1)return e;if(t=t||100,typeof e=="number")return Math.ceil(e*r*t)/t;if(typeof e!="string")return e;const n=e.split(Kn);if(n===null||!n.length)return e;const o=[];let s=n.shift(),a=Xn.test(s);for(;;){if(a){const l=parseFloat(s);isNaN(l)?o.push(s):o.push(Math.ceil(l*r*t)/t)}else o.push(s);if(s=n.shift(),s===void 0)return o.join("");a=!a}}function In(e,r="defs"){let t="";const n=e.indexOf("<"+r);for(;n>=0;){const o=e.indexOf(">",n),s=e.indexOf("</"+r);if(o===-1||s===-1)break;const a=e.indexOf(">",s);if(a===-1)break;t+=e.slice(o+1,s).trim(),e=e.slice(0,n).trim()+e.slice(a+1)}return{defs:t,content:e}}function Yn(e,r){return e?"<defs>"+e+"</defs>"+r:r}function Zn(e,r,t){const n=In(e);return Yn(n.defs,r+n.content+t)}const eo=e=>e==="unset"||e==="undefined"||e==="none";function to(e,r){const t={...Le,...e},n={...Ft,...r},o={left:t.left,top:t.top,width:t.width,height:t.height};let s=t.body;
555[t,n].forEach(x=>{const f=[],g=x.hFlip,b=x.vFlip;let v=x.rotate;g?b?v+=2:(f.push("translate("+(o.width+o.left).toString()+" "+(0-o.top).toString()+")"),f.push("scale(-1 1)"),o.top=o.left=0):b&&(f.push("translate("+(0-o.left).toString()+" "+(o.height+o.top).toString()+")"),f.push("scale(1 -1)"),o.top=o.left=0);let T;switch(v<0&&(v-=Math.floor(v/4)*4),v=v%4,v){case 1:T=o.height/2+o.top,f.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:f.unshift("rotate(180 "+(o.width/2+o.left).toString()+" "+(o.height/2+o.top).toString()+")");break;case 3:T=o.width/2+o.left,f.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")");break}v%2===1&&(o.left!==o.top&&(T=o.left,o.left=o.top,o.top=T),o.width!==o.height&&(T=o.width,o.width=o.height,o.height=T)),f.length&&(s=Zn(s,'<g transform="'+f.join(" ")+'">',"</g>"))});const a=n.width,l=n.height,d=o.width,c=o.height;let h,m;a===null?(m=l===null?"1em":l==="auto"?c:l,h=it(m,d/c)):(h=a==="auto"?d:a,m=l===null?it(h,c/d):l==="auto"?c:l);const w={},u=(x,f)=>{eo(f)||(w[x]=f.toString())};u("width",h),u("height",m);const p=[o.left,o.top,d,c];return w.viewBox=p.join(" "),{attributes:w,viewBox:p,body:s}}const no=/\sid="(\S+)"/g,oo="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let io=0;function ro(e,r=oo){const t=[];let n;for(;n=no.exec(e);)t.push(n[1]);if(!t.length)return e;const o="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=typeof r=="function"?r(s):r+(io++).toString(),l=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+l+')([")]|\\.[a-z])',"g"),"$1"+a+o+"$3")}),e=e.replace(new RegExp(o,"g"),""),e}const je=Object.create(null);function so(e,r){je[e]=r}function Se(e){return je[e]||je[""]}function Me(e){let r;if(typeof e.resources=="string")r=[e.resources];else if(r=e.resources,!(r instanceof Array)||!r.length)return null;return{resources:r,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const Pe=Object.create(null),oe=["https://api.simplesvg.com","https://api.unisvg.com"],ce=[];for(;oe.length>0;)oe.length===1||Math.random()>.5?ce.push(oe.shift()):ce.push(oe.pop());Pe[""]=Me({resources:["https://api.iconify.design"].concat(ce)});function ao(e,r){const t=Me(r);return t===null?!1:(Pe[e]=t,!0)}function De(e){return Pe[e]}const lo=()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}};let rt=lo();function co(e,r){const t=De(e);if(!t)return 0;let n;if(!t.maxURL)n=0;else{let o=0;t.resources.forEach(a=>{o=Math.max(o,a.length)});const s=r+".json?icons=";n=t.maxURL-o-t.path.length-s.length}return n}function uo(e){return e===404}const ho=(e,r,t)=>{const n=[],o=co(e,r),s="icons";let a={type:s,provider:e,prefix:r,icons:[]},l=0;return t.forEach((d,c)=>{l+=d.length+1,l>=o&&c>0&&(n.push(a),a={type:s,provider:e,prefix:r,icons:[]},l=d.length),a.icons.push(d)}),n.push(a),n};function po(e){if(typeof e=="string"){const r=De(e);if(r)return r.path}return"/"}const fo=(e,r,t)=>{if(!rt){t("abort",424);return}let n=po(r.provider);switch(r.type){case"icons":{const s=r.prefix,l=r.icons.join(","),d=new URLSearchParams({icons:l});n+=s+".json?"+d.toString();break}case"custom":{const s=r.uri;n+=s.slice(0,1)==="/"?s.slice(1):s;break}default:t("abort",400);return}let o=503;rt(e+n).then(s=>{const a=s.status;if(a!==200){setTimeout(()=>{t(uo(a)?"abort":"next",a)});return}return o=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?t("abort",s):t("next",o)});return}setTimeout(()=>{t("success",s)})}).catch(()=>{t("next",o)})},go={prepare:ho,send:fo};function xo(e){const r={loaded:[],missing:[],pending:[]},t=Object.create(null);e.sort((o,s)=>o.provider!==s.provider?o.provider.localeCompare(s.provider):o.prefix!==s.prefix?o.prefix.localeCompare(s.prefix):o.name.localeCompare(s.name));let n={provider:"",prefix:"",name:""};return e.forEach(o=>{if(n.name===o.name&&n.prefix===o.prefix&&n.provider===o.provider)return;n=o;const s=o.provider,a=o.prefix,l=o.name,d=t[s]||(t[s]=Object.create(null)),c=d[a]||(d[a]=I(s,a));let h;l in c.icons?h=r.loaded:a===""||c.missing.has(l)?h=r.missing:h=r.pending;const m={provider:s,prefix:a,name:l};h.push(m)}),r}function Rt(e,r){e.forEach(t=>{const n=t.loaderCallbacks;n&&(t.loaderCallbacks=n.filter(o=>o.id!==r))})}
555function mo(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const r=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!r.length)return;let t=!1;const n=e.provider,o=e.prefix;r.forEach(s=>{const a=s.icons,l=a.pending.length;a.pending=a.pending.filter(d=>{if(d.prefix!==o)return!0;const c=d.name;if(e.icons[c])a.loaded.push({provider:n,prefix:o,name:c});else if(e.missing.has(c))a.missing.push({provider:n,prefix:o,name:c});else return t=!0,!0;return!1}),a.pending.length!==l&&(t||Rt([e],s.id),s.callback(a.loaded.slice(0),a.missing.slice(0),a.pending.slice(0),s.abort))})}))}let vo=0;function bo(e,r,t){const n=vo++,o=Rt.bind(null,t,n);if(!r.pending.length)return o;const s={id:n,icons:r,callback:e,abort:o};return t.forEach(a=>{(a.loaderCallbacks||(a.loaderCallbacks=[])).push(s)}),o}function wo(e,r=!0,t=!1){const n=[];return e.forEach(o=>{const s=typeof o=="string"?pe(o,r,t):o;s&&n.push(s)}),n}var yo={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function jo(e,r,t,n){const o=e.resources.length,s=e.random?Math.floor(Math.random()*o):e.index;let a;if(e.random){let j=e.resources.slice(0);for(a=[];j.length>1;){const y=Math.floor(Math.random()*j.length);a.push(j[y]),j=j.slice(0,y).concat(j.slice(y+1))}a=a.concat(j)}else a=e.resources.slice(s).concat(e.resources.slice(0,s));const l=Date.now();let d="pending",c=0,h,m=null,w=[],u=[];typeof n=="function"&&u.push(n);function p(){m&&(clearTimeout(m),m=null)}function x(){d==="pending"&&(d="aborted"),p(),w.forEach(j=>{j.status==="pending"&&(j.status="aborted")}),w=[]}function f(j,y){y&&(u=[]),typeof j=="function"&&u.push(j)}function g(){return{startTime:l,payload:r,status:d,queriesSent:c,queriesPending:w.length,subscribe:f,abort:x}}function b(){d="failed",u.forEach(j=>{j(void 0,h)})}function v(){w.forEach(j=>{j.status==="pending"&&(j.status="aborted")}),w=[]}function T(j,y,L){const P=y!=="success";switch(w=w.filter(M=>M!==j),d){case"pending":break;case"failed":if(P||!e.dataAfterTimeout)return;break;default:return}if(y==="abort"){h=L,b();return}if(P){h=L,w.length||(a.length?A():b());return}if(p(),v(),!e.random){const M=e.resources.indexOf(j.resource);M!==-1&&M!==e.index&&(e.index=M)}d="completed",u.forEach(M=>{M(L)})}function A(){if(d!=="pending")return;p();const j=a.shift();if(j===void 0){if(w.length){m=setTimeout(()=>{p(),d==="pending"&&(v(),b())},e.timeout);return}b();return}const y={status:"pending",resource:j,callback:(L,P)=>{T(y,L,P)}};w.push(y),c++,m=setTimeout(A,e.rotate),t(j,r,y.callback)}return setTimeout(A),g}function Ot(e){const r={...yo,...e};let t=[];function n(){t=t.filter(l=>l().status==="pending")}function o(l,d,c){const h=jo(r,l,d,(m,w)=>{n(),c&&c(m,w)});return t.push(h),h}function s(l){return t.find(d=>l(d))||null}return{query:o,find:s,setIndex:l=>{r.index=l},getIndex:()=>r.index,cleanup:n}}function st(){}const me=Object.create(null);function So(e){if(!me[e]){const r=De(e);if(!r)return;const t=Ot(r),n={config:r,redundancy:t};me[e]=n}return me[e]}function Co(e,r,t){let n,o;if(typeof e=="string"){const s=Se(e);if(!s)return t(void 0,424),st;o=s.send;const a=So(e);a&&(n=a.redundancy)}else{const s=Me(e);if(s){n=Ot(s);const a=e.resources?e.resources[0]:"",l=Se(a);l&&(o=l.send)}}return!n||!o?(t(void 0,424),st):n.query(r,o,t)().abort}function at(){}function Eo(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,mo(e)}))}function ko(e){const r=[],t=[];return e.forEach(n=>{(n.match(Lt)?r:t).push(n)}),{valid:r,invalid:t}}function ie(e,r,t){function n(){const o=e.pendingIcons;r.forEach(s=>{o&&o.delete(s),e.icons[s]||e.missing.add(s)})}if(t&&typeof t=="object")try{if(!Mt(e,t).length){n();return}}catch(o){console.error(o)}n(),Eo(e)}function lt(e,r){e instanceof Promise?e.then(t=>{r(t)}).catch(()=>{r(null)}):r(e)}function To(e,r){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(r).sort():e.iconsToLoad=r,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:t,prefix:n}=e,o=e.iconsToLoad;if(delete e.iconsToLoad,!o||!o.length)return;const s=e.loadIcon;if(e.loadIcons&&(o.length>1||!s)){lt(e.loadIcons(o,n,t),h=>{ie(e,o,h)});return}if(s){o.forEach(h=>{const m=s(h,n,t);lt(m,w=>{const u=w?{prefix:n,icons:{[h]:w}}:null;ie(e,[h],u)})});return}const{valid:a,invalid:l}=ko(o);if(l.length&&ie(e,l,null),!a.length)return;const d=n.match(Lt)?Se(t):null;if(!d){ie(e,a,null);return}
555d.prepare(t,n,a).forEach(h=>{Co(t,h,m=>{ie(e,h.icons,m)})})}))}const Ao=(e,r)=>{const t=wo(e,!0,Pt()),n=xo(t);if(!n.pending.length){let d=!0;return r&&setTimeout(()=>{d&&r(n.loaded,n.missing,n.pending,at)}),()=>{d=!1}}const o=Object.create(null),s=[];let a,l;return n.pending.forEach(d=>{const{provider:c,prefix:h}=d;if(h===l&&c===a)return;a=c,l=h,s.push(I(c,h));const m=o[c]||(o[c]=Object.create(null));m[h]||(m[h]=[])}),n.pending.forEach(d=>{const{provider:c,prefix:h,name:m}=d,w=I(c,h),u=w.pendingIcons||(w.pendingIcons=new Set);u.has(m)||(u.add(m),o[c][h].push(m))}),s.forEach(d=>{const c=o[d.provider][d.prefix];c.length&&To(d,c)}),r?bo(r,n,s):at};function Lo(e,r){const t={...e};for(const n in r){const o=r[n],s=typeof o;n in Dt?(o===null||o&&(s==="string"||s==="number"))&&(t[n]=o):s===typeof t[n]&&(t[n]=n==="rotate"?o%4:o)}return t}const Mo=/[\s,]+/;function Po(e,r){r.split(Mo).forEach(t=>{switch(t.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function Do(e,r=0){const t=e.replace(/^-?[0-9.]*/,"");function n(o){for(;o<0;)o+=4;return o%4}if(t===""){const o=parseInt(e);return isNaN(o)?0:n(o)}else if(t!==e){let o=0;switch(t){case"%":o=25;break;case"deg":o=90}if(o){let s=parseFloat(e.slice(0,e.length-t.length));return isNaN(s)?0:(s=s/o,s%1===0?n(s):0)}}return r}function Fo(e,r){let t=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const n in r)t+=" "+n+'="'+r[n]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+t+">"+e+"</svg>"}function Ro(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function Oo(e){return"data:image/svg+xml,"+Ro(e)}function No(e){return'url("'+Oo(e)+'")'}let re;function _o(){try{re=window.trustedTypes.createPolicy("iconify",{createHTML:e=>e})}catch{re=null}}function Vo(e){return re===void 0&&_o(),re?re.createHTML(e):e}const Nt={...Ft,inline:!1},zo={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"}
555,Uo={display:"inline-block"},Ce={backgroundColor:"currentColor"},_t={backgroundColor:"transparent"},ct={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},dt={WebkitMask:Ce,mask:Ce,background:_t};for(const e in dt){const r=dt[e];for(const t in ct)r[e+t]=ct[t]}const $o={...Nt,inline:!0};function ut(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const Bo=(e,r,t)=>{const n=r.inline?$o:Nt,o=Lo(n,r),s=r.mode||"svg",a={},l=r.style||{},d={...s==="svg"?zo:{}};if(t){const f=pe(t,!1,!0);if(f){const g=["iconify"],b=["provider","prefix"];for(const v of b)f[v]&&g.push("iconify--"+f[v]);d.className=g.join(" ")}}for(let f in r){const g=r[f];if(g!==void 0)switch(f){case"icon":case"style":case"children":case"onLoad":case"mode":case"ssr":break;case"_ref":d.ref=g;break;case"className":d[f]=(d[f]?d[f]+" ":"")+g;break;case"inline":case"hFlip":case"vFlip":o[f]=g===!0||g==="true"||g===1;break;case"flip":typeof g=="string"&&Po(o,g);break;case"color":a.color=g;break;case"rotate":typeof g=="string"?o[f]=Do(g):typeof g=="number"&&(o[f]=g);break;case"ariaHidden":case"aria-hidden":g!==!0&&g!=="true"&&delete d["aria-hidden"];break;default:n[f]===void 0&&(d[f]=g)}}const c=to(e,o),h=c.attributes;if(o.inline&&(a.verticalAlign="-0.125em"),s==="svg"){d.style={...a,...l},Object.assign(d,h);let f=0,g=r.id;return typeof g=="string"&&(g=g.replace(/-/g,"_")),d.dangerouslySetInnerHTML={__html:Vo(ro(c.body,g?()=>g+"ID"+f++:"iconifyReact"))},C.createElement("svg",d)}const{body:m,width:w,height:u}=e,p=s==="mask"||(s==="bg"?!1:m.indexOf("currentColor")!==-1),x=Fo(m,{...h,width:w+"",height:u+""});return d.style={...a,"--svg":No(x),width:ut(h.width),height:ut(h.height),...Uo,...p?Ce:_t,...l},C.createElement("span",d)};Pt(!0);so("",go);if(typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const r=e.IconifyPreload,t="Invalid IconifyPreload syntax.";typeof r=="object"&&r!==null&&(r instanceof Array?r:[r]).forEach(n=>{try{(typeof n!="object"||n===null||n instanceof Array||typeof n.icons!="object"||typeof n.prefix!="string"||!Gn(n))&&console.error(t)}catch{console.error(t)}})}if(e.IconifyProviders!==void 0){const r=e.IconifyProviders;if(typeof r=="object"&&r!==null)for(let t in r){const n="IconifyProviders["+t+"] is invalid.";try{const o=r[t];if(typeof o!="object"||!o||o.resources===void 0)continue;ao(t,o)||console.error(n)}catch{console.error(n)}}}}function Vt(e){const[r,t]=C.useState(!!e.ssr),[n,o]=C.useState({});function s(u){if(u){const p=e.icon;if(typeof p=="object")return{name:"",data:p};const x=ot(p);if(x)return{name:p,data:x}}return{name:""}}const[a,l]=C.useState(s(!!e.ssr));function d(){const u=n.callback;u&&(u(),o({}))}function c(u){if(JSON.stringify(a)!==JSON.stringify(u))return d(),l(u),!0}function h(){var u;const p=e.icon;if(typeof p=="object"){c({name:"",data:p});return}const x=ot(p);if(c({name:p,data:x}))if(x===void 0){const f=Ao([p],h);o({callback:f})}else x&&((u=e.onLoad)===null||u===void 0||u.call(e,p))}C.useEffect(()=>(t(!0),d),[]),C.useEffect(()=>{r&&h()},[e.icon,r]);const{name:m,data:w}=a;return w?Bo({...Le,...w},e,m):e.children?e.children:e.fallback?e.fallback:C.createElement("span",{})}const W=C.forwardRef((e,r)=>Vt({...e,_ref:r}));C.forwardRef((e,r)=>Vt({inline:!0,...e,_ref:r}));const Wo=e=>{switch(e){case"stacked":return"rhap_stacked";case"stacked-reverse":return"rhap_stacked-reverse";case"horizontal":return"rhap_horizontal";case"horizontal-reverse":return"rhap_horizontal-reverse";default:return"rhap_stacked"}},zt=e=>e instanceof MouseEvent?e.clientX:e.touches[0].clientX,ve=e=>e>9?e.toString():`0${e}`,X=(e,r,t)=>{if(!isFinite(e))return null;const n=Math.floor(e/60),o=ve(n),s=ve(Math.floor(e%60)),a=ve(Math.floor(n%60)),l=Math.floor(n/60),d=`${o}:${s}`,c=`${l}:${a}:${s}`;if(t==="auto")return r>=3600?c:d;if(t==="mm:ss")return d;if(t==="hh:mm:ss")return c};function Ut(e,r){let t=!1;return n=>{t||(e(n),t=!0,setTimeout(()=>t=!1,r))}}class qo extends C.Component{constructor(){super(...arguments);S(this,"timeOnMouseMove",0);S(this,"hasAddedAudioEventListener",!1);S(this,"state",{isDraggingProgress:!1,currentTimePos:"0%",hasDownloadProgressAnimation:!1,downloadProgressArr:[],waitingForSeekCallback:!1});S(this,"getCurrentProgress",t=>{const{audio:n,progressBar:o}=this.props;if(n.src.indexOf("blob:")!==0&&typeof this.props.srcDuration>"u"&&(!n.src||!isFinite(n.currentTime)||!o.current))return{currentTime:0,currentTimePos:"0%"};const a=o.current.getBoundingClientRect(),l=a.width;let d=zt(t)-a.left;return d<0?d=0:d>l&&(d=l),{currentTime:this.getDuration()*d/l,currentTimePos:`${(d/l*100).toFixed(2)}%`}});S(this,"handleContextMenu",t=>{t.preventDefault()});S(this,"handleMouseDownOrTouchStartProgressBar",t=>{t.stopPropagation();const{currentTime:n,currentTimePos:o}=this.getCurrentProgress(t.nativeEvent);isFinite(n)&&(this.timeOnMouseMove=n,this.setState({isDraggingProgress:!0,currentTimePos:o}),t.nativeEvent instanceof MouseEvent?(window.addEventListener("mousemove",this.handleWindowMouseOrTouchMove),window.addEventListener("mouseup",this.handleWindowMouseOrTouchUp)):(window.addEventListener("touchmove",this.handleWindowMouseOrTouchMove),window.addEventListener("touchend",this.handleWindowMouseOrTouchUp)))});S(this,"handleWindowMouseOrTouchMove",t=>{t instanceof MouseEvent&&t.preventDefault(),t.stopPropagation();const n=window.getSelection();n&&n.type==="Range"&&n.empty();const{isDraggingProgress:o}=this.state;if(o){const{currentTime:s,currentTimePos:a}=this.getCurrentProgress(t);this.timeOnMouseMove=s,this.setState({currentTimePos:a})}});S(this,"handleWindowMouseOrTouchUp",t=>{t.stopPropagation();const n=this.timeOnMouseMove,{audio:o,onChangeCurrentTimeError:s,onSeek:a}=this.props;if(a)this.setState({isDraggingProgress:!1,waitingForSeekCallback:!0},()=>{a(o,n).then(()=>this.setState({waitingForSeekCallback:!1}),l=>{const d=l instanceof Error?l.message:String(l);throw new Error(d)})});else{const l={isDraggingProgress:!1};if(o.readyState===o.HAVE_NOTHING||o.readyState===o.HAVE_METADATA||!isFinite(n))try{o.load()}catch(d){return l.currentTimePos="0%",s&&s(d)}o.currentTime=n,this.setState(l)}t instanceof MouseEvent?(window.removeEventListener("mousemove",this.handleWindowMouseOrTouchMove),window.removeEventListener("mouseup",this.handleWindowMouseOrTouchUp)):(window.removeEventListener("touchmove",this.handleWindowMouseOrTouchMove),window.removeEventListener("touchend",this.handleWindowMouseOrTouchUp))});S(this,"handleAudioTimeUpdate",Ut(t=>{const{isDraggingProgress:n}=this.state,o=t.target;if(n||this.state.waitingForSeekCallback===!0)return;const{currentTime:s}=o,a=this.getDuration();this.setState({currentTimePos:`${(s/a*100||0).toFixed(2)}%`})},this.props.progressUpdateInterval));S(this,"handleAudioDownloadProgressUpdate",t=>{const n=t.target,o=this.getDuration(),s=[];for(let a=0;a<n.buffered.length;a++){const l=n.buffered.start(a),d=n.buffered.end(a);s.push({left:`${Math.round(100/o*l)||0}%`,width:`${Math.round(100/o*(d-l))||0}%`})}clearTimeout(this.downloadProgressAnimationTimer),this.setState({downloadProgressArr:s,hasDownloadProgressAnimation:!0}),this.downloadProgressAnimationTimer=setTimeout(()=>{this.setState({hasDownloadProgressAnimation:!1})},200)})}getDuration(){const{audio:t,srcDuration:n}=this.props;return typeof n>"u"?t.duration:n}initialize(){const{audio:t}=this.props;t&&!this.hasAddedAudioEventListener&&(this.audio=t,this.hasAddedAudioEventListener=!0,t.addEventListener("timeupdate",this.handleAudioTimeUpdate),t.addEventListener("progress",this.handleAudioDownloadProgressUpdate))}componentDidMount(){this.initialize()}componentDidUpdate(){this.initialize()}componentWillUnmount(){this.audio&&this.hasAddedAudioEventListener&&(this.audio.removeEventListener("timeupdate",this.handleAudioTimeUpdate),this.audio.removeEventListener("progress",this.handleAudioDownloadProgressUpdate)),clearTimeout(this.downloadProgressAnimationTimer)}render(){const{showDownloadProgress:t,showFilledProgress:n,progressBar:o,i18nProgressBar:s}=this.props,{currentTimePos:a,downloadProgressArr:l,hasDownloadProgressAnimation:d}=this.state;return E.createElement("div",{className:"rhap_progress-container",ref:o,"aria-label":s,role:"progressbar","aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Number(a.split("%")[0]),tabIndex:0,onMouseDown:this.handleMouseDownOrTouchStartProgressBar,onTouchStart:this.handleMouseDownOrTouchStartProgressBar,onContextMenu:this.handleContextMenu},E.createElement("div",{className:`rhap_progress-bar ${t?"rhap_progress-bar-show-download":""}`},E.createElement("div",{className:"rhap_progress-indicator",style:{left:a}}),n&&E.createElement("div",{className:"rhap_progress-filled",style:{width:a}}),t&&l.map(({left:c,width:h},m)=>E.createElement("div",{key:m,className:"rhap_download-progress",style:{left:c,width:h,transitionDuration:d?".2s":"0s"}}))))}}const Qo=(e,r)=>E.createElement(qo,qt({},e,{progressBar:r})),Jo=C.forwardRef(Qo);
555class ht extends C.PureComponent{constructor(t){super(t);S(this,"hasAddedAudioEventListener",!1);S(this,"state",{currentTime:this.props.defaultCurrentTime});S(this,"handleAudioCurrentTimeChange",t=>{const n=t.target,{isLeftTime:o,timeFormat:s,defaultCurrentTime:a}=this.props;this.setState({currentTime:X(o?n.duration-n.currentTime:n.currentTime,n.duration,s)||a})});S(this,"addAudioEventListeners",()=>{const{audio:t}=this.props;t&&!this.hasAddedAudioEventListener&&(this.audio=t,this.hasAddedAudioEventListener=!0,t.addEventListener("timeupdate",this.handleAudioCurrentTimeChange),t.addEventListener("loadedmetadata",this.handleAudioCurrentTimeChange))});const{audio:n,defaultCurrentTime:o,isLeftTime:s,timeFormat:a}=t;let l=o;n&&(l=X(s?n.duration-n.currentTime:n.currentTime,n.duration,a)),this.state={currentTime:l}}componentDidMount(){this.addAudioEventListeners()}componentDidUpdate(){this.addAudioEventListeners()}componentWillUnmount(){this.audio&&this.hasAddedAudioEventListener&&(this.audio.removeEventListener("timeupdate",this.handleAudioCurrentTimeChange),this.audio.removeEventListener("loadedmetadata",this.handleAudioCurrentTimeChange))}render(){return this.state.currentTime}}class Ho extends C.PureComponent{constructor(t){super(t);S(this,"hasAddedAudioEventListener",!1);S(this,"state",{duration:this.props.audio?X(this.props.audio.duration,this.props.audio.duration,this.props.timeFormat):this.props.defaultDuration});S(this,"handleAudioDurationChange",t=>{const n=t.target,{timeFormat:o,defaultDuration:s}=this.props;this.setState({duration:X(n.duration,n.duration,o)||s})});S(this,"addAudioEventListeners",()=>{const{audio:t}=this.props;t&&!this.hasAddedAudioEventListener&&(this.audio=t,this.hasAddedAudioEventListener=!0,t.addEventListener("durationchange",this.handleAudioDurationChange),t.addEventListener("abort",this.handleAudioDurationChange))});const{audio:n,timeFormat:o,defaultDuration:s}=t;this.state={duration:n?X(n.duration,n.duration,o):s}}componentDidMount(){this.addAudioEventListeners()}componentDidUpdate(){this.addAudioEventListeners()}componentWillUnmount(){this.audio&&this.hasAddedAudioEventListener&&(this.audio.removeEventListener("durationchange",this.handleAudioDurationChange),this.audio.removeEventListener("abort",this.handleAudioDurationChange))}render(){return this.state.duration}}class Go extends C.Component{constructor(){super(...arguments);S(this,"hasAddedAudioEventListener",!1);S(this,"volumeBar",C.createRef());S(this,"volumeAnimationTimer",0);S(this,"lastVolume",this.props.volume);S(this,"state",{currentVolumePos:`${(this.lastVolume/1*100||0).toFixed(2)}%`,hasVolumeAnimation:!1,isDraggingVolume:!1});S(this,"getCurrentVolume",t=>{const{audio:n}=this.props;if(!this.volumeBar.current)return{currentVolume:n.volume,currentVolumePos:this.state.currentVolumePos};const o=this.volumeBar.current.getBoundingClientRect(),s=o.width,a=zt(t)-o.left;let l,d;return a<0?(l=0,d="0%"):a>o.width?(l=1,d="100%"):(l=a/s,d=`${a/s*100}%`),{currentVolume:l,currentVolumePos:d}});S(this,"handleContextMenu",t=>{t.preventDefault()});S(this,"handleClickVolumeButton",()=>{const{audio:t}=this.props;t.volume>0?(this.lastVolume=t.volume,t.volume=0):t.volume=this.lastVolume});S(this,"handleVolumnControlMouseOrTouchDown",t=>{t.stopPropagation();const{audio:n}=this.props,{currentVolume:o,currentVolumePos:s}=this.getCurrentVolume(t.nativeEvent);n.volume=o,this.setState({isDraggingVolume:!0,currentVolumePos:s}),t.nativeEvent instanceof MouseEvent?(window.addEventListener("mousemove",this.handleWindowMouseOrTouchMove),window.addEventListener("mouseup",this.handleWindowMouseOrTouchUp)):(window.addEventListener("touchmove",this.handleWindowMouseOrTouchMove),window.addEventListener("touchend",this.handleWindowMouseOrTouchUp))});S(this,"handleWindowMouseOrTouchMove",t=>{t instanceof MouseEvent&&t.preventDefault(),t.stopPropagation();const{audio:n}=this.props,o=window.getSelection();o&&o.type==="Range"&&o.empty();const{isDraggingVolume:s}=this.state;if(s){const{currentVolume:a,currentVolumePos:l}=this.getCurrentVolume(t);n.volume=a,this.setState({currentVolumePos:l})}});S(this,"handleWindowMouseOrTouchUp",t=>{t.stopPropagation(),this.setState({isDraggingVolume:!1}),t instanceof MouseEvent?(window.removeEventListener("mousemove",this.handleWindowMouseOrTouchMove),window.removeEventListener("mouseup",this.handleWindowMouseOrTouchUp)):(window.removeEventListener("touchmove",this.handleWindowMouseOrTouchMove),window.removeEventListener("touchend",this.handleWindowMouseOrTouchUp))});S(this,"handleAudioVolumeChange",t=>{const{isDraggingVolume:n}=this.state,{volume:o}=t.target;(this.lastVolume>0&&o===0||this.lastVolume===0&&o>0)&&this.props.onMuteChange(),this.lastVolume=o,!n&&(this.setState({hasVolumeAnimation:!0,currentVolumePos:`${(o/1*100||0).toFixed(2)}%`}),clearTimeout(this.volumeAnimationTimer),this.volumeAnimationTimer=setTimeout(()=>{this.setState({hasVolumeAnimation:!1})},100))})}componentDidUpdate(){const{audio:t}=this.props;t&&!this.hasAddedAudioEventListener&&(this.audio=t,this.hasAddedAudioEventListener=!0,t.addEventListener("volumechange",this.handleAudioVolumeChange))}componentWillUnmount(){this.audio&&this.hasAddedAudioEventListener&&this.audio.removeEventListener("volumechange",this.handleAudioVolumeChange),clearTimeout(this.volumeAnimationTimer)}render(){const{audio:t,showFilledVolume:n,i18nVolumeControl:o}=this.props,{currentVolumePos:s,hasVolumeAnimation:a}=this.state,{volume:l}=t||{};return E.createElement("div",{ref:this.volumeBar,onMouseDown:this.handleVolumnControlMouseOrTouchDown,onTouchStart:this.handleVolumnControlMouseOrTouchDown,onContextMenu:this.handleContextMenu,role:"progressbar","aria-label":o,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Number((l*100).toFixed(0)),tabIndex:0,className:"rhap_volume-bar-area"},E.createElement("div",{className:"rhap_volume-bar"},E.createElement("div",{className:"rhap_volume-indicator",style:{left:s,transitionDuration:a?".1s":"0s"}}),n&&E.createElement("div",{className:"rhap_volume-filled",style:{width:s}})))}}let O=function(e){return e.CURRENT_TIME="CURRENT_TIME",e.CURRENT_LEFT_TIME="CURRENT_LEFT_TIME",e.PROGRESS_BAR="PROGRESS_BAR",e.DURATION="DURATION",e.ADDITIONAL_CONTROLS="ADDITIONAL_CONTROLS",e.MAIN_CONTROLS="MAIN_CONTROLS",e.VOLUME_CONTROLS="VOLUME_CONTROLS",e.LOOP="LOOP",e.VOLUME="VOLUME",e}({});const K=class K extends C.Component{constructor(){super(...arguments);S(this,"audio",C.createRef());S(this,"progressBar",C.createRef());S(this,"container",C.createRef());S(this,"lastVolume",this.props.volume??1);S(this,"togglePlay",t=>{t.stopPropagation();const n=this.audio.current;(n.paused||n.ended)&&n.src?this.playAudioPromise():n.paused||n.pause()});S(this,"playAudioPromise",()=>{this.audio.current.error&&this.audio.current.load();const t=this.audio.current.play();
555t?t.then(null).catch(n=>{const{onPlayError:o}=this.props,s=n instanceof Error?n.message:String(n);o&&o(new Error(s))}):this.forceUpdate()});S(this,"isPlaying",()=>{const t=this.audio.current;return t?!t.paused&&!t.ended:!1});S(this,"handlePlay",t=>{this.forceUpdate(),this.props.onPlay&&this.props.onPlay(t)});S(this,"handlePause",t=>{this.audio&&(this.forceUpdate(),this.props.onPause&&this.props.onPause(t))});S(this,"handleEnded",t=>{this.audio&&(this.forceUpdate(),this.props.onEnded&&this.props.onEnded(t))});S(this,"handleAbort",t=>{this.props.onAbort&&this.props.onAbort(t)});S(this,"handleClickVolumeButton",()=>{const t=this.audio.current;t.volume>0?(this.lastVolume=t.volume,t.volume=0):t.volume=this.lastVolume});S(this,"handleMuteChange",()=>{this.forceUpdate()});S(this,"handleClickLoopButton",()=>{this.audio.current.loop=!this.audio.current.loop,this.forceUpdate()});S(this,"handleClickRewind",()=>{const{progressJumpSteps:t,progressJumpStep:n}=this.props,o=t.backward||n;this.setJumpTime(-o)});S(this,"handleClickForward",()=>{const{progressJumpSteps:t,progressJumpStep:n}=this.props,o=t.forward||n;this.setJumpTime(o)});S(this,"setJumpTime",t=>{const n=this.audio.current,{duration:o,currentTime:s}=n;if(n.readyState===n.HAVE_NOTHING||n.readyState===n.HAVE_METADATA||!isFinite(o)||!isFinite(s))try{n.load()}catch(l){return this.props.onChangeCurrentTimeError&&this.props.onChangeCurrentTimeError(l)}let a=s+t/1e3;a<0?(n.currentTime=0,a=0):a>o?(n.currentTime=o,a=o):n.currentTime=a});S(this,"setJumpVolume",t=>{const n=this.audio.current,o=Number(t),s=n==null?void 0:n.volume;if(!n||!Number.isFinite(o)||!Number.isFinite(s))return;let a=s+o;a<0?a=0:a>1&&(a=1),n.volume=a});S(this,"handleKeyDown",t=>{if(this.props.hasDefaultKeyBindings??!0)switch(t.key){case" ":(t.target===this.container.current||t.target===this.progressBar.current)&&(t.preventDefault(),this.togglePlay(t));break;case"ArrowLeft":this.handleClickRewind();break;case"ArrowRight":this.handleClickForward();break;case"ArrowUp":t.preventDefault(),this.setJumpVolume(this.props.volumeJumpStep);break;case"ArrowDown":t.preventDefault(),this.setJumpVolume(-this.props.volumeJumpStep);break;case"l":this.handleClickLoopButton();break;case"m":this.handleClickVolumeButton();break}});S(this,"renderUIModules",t=>t.map((n,o)=>this.renderUIModule(n,o)));S(this,"renderUIModule",(t,n)=>{const{defaultCurrentTime:o="--:--",progressUpdateInterval:s=20,showDownloadProgress:a=!0,showFilledProgress:l=!0,showFilledVolume:d=!1,defaultDuration:c="--:--",customIcons:h={},showSkipControls:m=!1,onClickPrevious:w,onClickNext:u,onChangeCurrentTimeError:p,showJumpControls:x=!0,customAdditionalControls:f=[O.LOOP],customVolumeControls:g=[O.VOLUME],muted:b=!1,timeFormat:v="auto",volume:T=1,loop:A=!1,mse:j,i18nAriaLabels:y=K.defaultI18nAriaLabels}=this.props;switch(t){case O.CURRENT_TIME:return E.createElement("div",{key:n,id:"rhap_current-time",className:"rhap_time rhap_current-time"},E.createElement(ht,{audio:this.audio.current,isLeftTime:!1,defaultCurrentTime:o,timeFormat:v}));case O.CURRENT_LEFT_TIME:return E.createElement("div",{key:n,id:"rhap_current-left-time",className:"rhap_time rhap_current-left-time"},E.createElement(ht,{audio:this.audio.current,isLeftTime:!0,defaultCurrentTime:o,timeFormat:v}));case O.PROGRESS_BAR:return E.createElement(Jo,{key:n,ref:this.progressBar,audio:this.audio.current,progressUpdateInterval:s,showDownloadProgress:a,showFilledProgress:l,onSeek:j&&j.onSeek,onChangeCurrentTimeError:p,srcDuration:j&&j.srcDuration,i18nProgressBar:y.progressControl});case O.DURATION:return E.createElement("div",{key:n,className:"rhap_time rhap_total-time"},j&&j.srcDuration?X(j.srcDuration,j.srcDuration,this.props.timeFormat):E.createElement(Ho,{audio:this.audio.current,defaultDuration:c,timeFormat:v}));case O.ADDITIONAL_CONTROLS:return E.createElement("div",{key:n,className:"rhap_additional-controls"},this.renderUIModules(f));case O.MAIN_CONTROLS:{const L=this.isPlaying();let P;return L?P=h.pause?h.pause:E.createElement(W,{icon:"mdi:pause-circle",ssr:!0}):P=h.play?h.play:E.createElement(W,{icon:"mdi:play-circle",ssr:!0}),E.createElement("div",{key:n,className:"rhap_main-controls"},m&&E.createElement("button",{"aria-label":y.previous,className:"rhap_button-clear rhap_main-controls-button rhap_skip-button",type:"button",onClick:w},h.previous?h.previous:E.createElement(W,{icon:"mdi:skip-previous",ssr:!0})),x&&E.createElement("button",{"aria-label":y.rewind,className:"rhap_button-clear rhap_main-controls-button rhap_rewind-button",type:"button",onClick:this.handleClickRewind},h.rewind?h.rewind:E.createElement(W,{icon:"mdi:rewind",ssr:!0})),E.createElement("button",{"aria-label":L?y.pause:y.play,className:"rhap_button-clear rhap_main-controls-button rhap_play-pause-button",type:"button",onClick:this.togglePlay},P),x&&E.createElement("button",{"aria-label":y.forward,className:"rhap_button-clear rhap_main-controls-button rhap_forward-button",type:"button",onClick:this.handleClick
555Forward},h.forward?h.forward:E.createElement(W,{icon:"mdi:fast-forward",ssr:!0})),m&&E.createElement("button",{"aria-label":y.next,className:"rhap_button-clear rhap_main-controls-button rhap_skip-button",type:"button",onClick:u},h.next?h.next:E.createElement(W,{icon:"mdi:skip-next",ssr:!0})))}case O.VOLUME_CONTROLS:return E.createElement("div",{key:n,className:"rhap_volume-controls"},this.renderUIModules(g));case O.LOOP:{const L=this.audio.current?this.audio.current.loop:A;let P;return L?P=h.loop?h.loop:E.createElement(W,{icon:"mdi:repeat",ssr:!0}):P=h.loopOff?h.loopOff:E.createElement(W,{icon:"mdi:repeat-off",ssr:!0}),E.createElement("button",{key:n,"aria-label":L?y.loop:y.loopOff,className:"rhap_button-clear rhap_repeat-button",type:"button",onClick:this.handleClickLoopButton},P)}case O.VOLUME:{const{volume:L=b?0:T}=this.audio.current||{};let P;return L?P=h.volume?h.volume:E.createElement(W,{icon:"mdi:volume-high",ssr:!0}):P=h.volume?h.volumeMute:E.createElement(W,{icon:"mdi:volume-mute",ssr:!0}),E.createElement("div",{key:n,className:"rhap_volume-container"},E.createElement("button",{"aria-label":L?y.volume:y.volumeMute,onClick:this.handleClickVolumeButton,type:"button",className:"rhap_button-clear rhap_volume-button"},P),E.createElement(Go,{audio:this.audio.current,volume:L,onMuteChange:this.handleMuteChange,showFilledVolume:d,i18nVolumeControl:y.volumeControl}))}default:return C.isValidElement(t)?t.key?t:C.cloneElement(t,{key:n}):null}})}componentDidMount(){this.forceUpdate();const t=this.audio.current;this.props.muted?t.volume=0:t.volume=this.lastVolume,t.addEventListener("error",n=>{const o=n.target;if(o.error&&o.currentTime===o.duration)return this.props.onEnded&&this.props.onEnded(n);this.props.onError&&this.props.onError(n)}),t.addEventListener("canplay",n=>{this.props.onCanPlay&&this.props.onCanPlay(n)}),t.addEventListener("canplaythrough",n=>{this.props.onCanPlayThrough&&this.props.onCanPlayThrough(n)}),t.addEventListener("play",this.handlePlay),t.addEventListener("abort",this.handleAbort),t.addEventListener("ended",this.handleEnded),t.addEventListener("playing",n=>{this.props.onPlaying&&this.props.onPlaying(n)}),t.addEventListener("seeking",n=>{this.props.onSeeking&&this.props.onSeeking(n)}),t.addEventListener("seeked",n=>{this.props.onSeeked&&this.props.onSeeked(n)}),t.addEventListener("waiting",n=>{this.props.onWaiting&&this.props.onWaiting(n)}),t.addEventListener("emptied",n=>{this.props.onEmptied&&this.props.onEmptied(n)}),t.addEventListener("stalled",n=>{this.props.onStalled&&this.props.onStalled(n)}),t.addEventListener("suspend",n=>{this.props.onSuspend&&this.props.onSuspend(n)}),t.addEventListener("loadstart",n=>{this.props.onLoadStart&&this.props.onLoadStart(n)}),t.addEventListener("loadedmetadata",n=>{this.props.onLoadedMetaData&&this.props.onLoadedMetaData(n)}),t.addEventListener("loadeddata",n=>{this.props.onLoadedData&&this.props.onLoadedData(n)}),t.addEventListener("pause",this.handlePause),t.addEventListener("timeupdate",Ut(n=>{this.props.onListen&&this.props.onListen(n)},this.props.listenInterval)),t.addEventListener("volumechange",n=>{this.props.onVolumeChange&&this.props.onVolumeChange(n)}),t.addEventListener("encrypted",n=>{const{mse:o}=this.props;o&&o.onEcrypted&&o.onEcrypted(n)})}componentDidUpdate(t){const{src:n,autoPlayAfterSrcChange:o}=this.props;t.src!==n&&(o?this.playAudioPromise():this.forceUpdate())}render(){const{className:t="",src:n,loop:o=!1,preload:s="auto",autoPlay:a=!1,crossOrigin:l,mediaGroup:d,header:c,footer:h,layout:m="stacked",customProgressBarSection:w=[O.CURRENT_TIME,O.PROGRESS_BAR,O.DURATION],customControlsSection:u=[O.ADDITIONAL_CONTROLS,O.MAIN_CONTROLS,O.VOLUME_CONTROLS],children:p,style:x,i18nAriaLabels:f=K.defaultI18nAriaLabels}=this.props,g=this.audio.current?this.audio.current.loop:o,b=g?"rhap_loop--on":"rhap_loop--off",v=this.isPlaying()?"rhap_play-status--playing":"rhap_play-status--paused";return E.createElement("div",{role:"group",tabIndex:0,"aria-label":f.player,className:`rhap_container ${b} ${v} ${t}`,onKeyDown:this.handleKeyDown,ref:this.container,style:x},E.createElement("audio",{src:n,controls:!1,loop:g,autoPlay:a,preload:s,crossOrigin:l,mediaGroup:d,ref:this.audio},p),c&&E.createElement("div",{className:"rhap_header"},c),E.createElement("div",{className:`rhap_main ${Wo(m)}`},E.createElement("div",{className:"rhap_progress-section"},this.renderUIModules(w)),E.createElement("div",{className:"rhap_controls-section"},this.renderUIModules(u))),h&&E.createElement("div",{className:"rhap_footer"},h))}};S(K,"defaultI18nAriaLabels",{player:"Audio player",progressControl:"Audio progress control",volumeControl:"Volume control",play:"Play",pause:"Pause",rewind:"Rewind",forward:"Forward",previous:"Previous",next:"Skip",loop:"Disable loop",loopOff:"Enable loop",volume:"Mute",volumeMute:"Unmute"}),S(K,"defaultProps",{progressJumpSteps:{backward:5e3,forward:5e3},progressJumpStep:5e3,volumeJumpStep:.1});let Ee=K;const Ko=k(Ee)`
556  box-shadow: none;
557  border-radius: 16px;
558  padding: 48px 16px;
559`;function Xo({src:e}){return i.jsx(Ko,{src:e||"",volume:.5})}function Io({drm:e,userData:r,ebookData:t}){const[n,o]=C.useState(null),[s,a]=C.useState(!1),{handleError:l}=Te(),{id:d}=mt(),c=vt({mutationFn:()=>rn(d,e),onSuccess:u=>{a(!1);const p={dataLayer:{event:"book_downloaded",downloadData:{student_id:r==null?void 0:r.userId,module_name:"Digital Content",course_id:t==null?void 0:t.courseId,term_id:t==null?void 0:t.termId,book_id:t==null?void 0:t.aptrack_1_book_id,book_name:t==null?void 0:t.name,platform:"WebApp"}}};Qt.dataLayer(p);const x=URL.createObjectURL(u),f=document.createElement("a");f.href=x,f.download="file.acsm",f.click(),URL.revokeObjectURL(x)},onError:u=>{a(!1),l(u.response.data)}}),h=()=>{var p,x;const u=(x=(p=window.navigator)==null?void 0:p.userAgent)==null?void 0:x.toLowerCase();return u.includes("mac")?"https://proconnect-public-s3.s3.ap-south-1.amazonaws.com/DRM/ADE_4.5_Installer.dmg":(u.includes("win"),"https://proconnect-public-s3.s3.ap-south-1.amazonaws.com/DRM/ADE_4.5_Installer.exe")},m=u=>{if(u=="acsm")a(!0),c.mutate(d,e);else if(u=="adobeId")window.open("https://account.adobe.com/","_blank","noopener,noreferrer");else if(u=="adobeDigital"){const p=h();window.open(p,"_blank","noopener,noreferrer")}},w=[{title:"Adobe Digital Edition",description:"Download and install Adobe Digital Editions to read your DRM-protected books",icon:"drmAdobeDigital",btnTitle:"Download",btnUrl:"",type:"adobeDigital"},{title:"An Adobe ID",description:"Create or sign in with your Adobe ID to access your digital library",icon:"drmAdobe",btnTitle:"Click Here",btnUrl:"",type:"adobeId"},{title:"Download .acsm file",description:"Download the ACSM file and open it with Adobe Digital Editions",icon:"drmDownloadACSM",btnTitle:"Download",btnUrl:"",type:"acsm"}];return i.jsxs(i.Fragment,{children:[s&&i.jsx(Jt,{visibility:s,children:i.jsx(Ht,{isLoading:s,title:"Preparing your file for download...",subtitle:"This might take few moments"})}),i.jsxs(yn,{children:[i.jsx(F,{type:"subtle",color:"#11173A",children:"Choose your preferred download method"}),w.map((u,p)=>i.jsxs(jn,{gap:"30px",onMouseEnter:()=>o(p),onMouseLeave:()=>o(null),children:[i.jsxs(q,{width:"fit-content",verticalalign:"start",ga
559p:"10px",style:{textAlign:"left"},children:[i.jsx("div",{children:i.jsx(D,{name:u.icon})}),i.jsxs(B,{width:"290px",horizontalalign:"start",verticalalign:"start",gap:"5px",children:[i.jsx(F,{type:"button",color:n==p?"#F37120":"#11173A",children:u.title}),i.jsx(F,{color:"#575C74",type:"small",children:u.description})]})]}),i.jsx("div",{children:i.jsx(Sn,{onClick:()=>m(u.type),style:{background:n==p?"#F37120":"#fff",color:n==p?"#fff":"#0D2F55",borderColor:n==p?"#F37120":"#878a9c",cursor:"pointer"},children:u.btnTitle})})]},p))]})]})}function Yo({document:e,ebookData:r}){const t=bt(c=>c.profile),[n]=Gt(),o=n.get("courseId"),s=n.get("termId"),a={courseId:o,termId:s,...r},l=c=>{try{return JSON.parse(c)&&!!c}catch{return!1}},d=Kt(e==null?void 0:e.value);return i.jsxs(i.Fragment,{children:[(e==null?void 0:e.type)==="videoLink"&&i.jsx(i.Fragment,{children:e.value.includes("player.vdocipher.com")?i.jsx(an,{src:(e==null?void 0:e.value)||""}):i.jsx(Ie,{src:(e==null?void 0:e.value)||""})}),(e==null?void 0:e.type)==="video"&&i.jsx(Ie,{src:d||""}),(e==null?void 0:e.type)==="pdf"&&i.jsx(ln,{url:d,fileName:e==null?void 0:e.title,ebookData:a,userData:t}),(e==null?void 0:e.type)==="quiz"&&i.jsx(Rn,{data:l(e==null?void 0:e.value)?JSON.parse(e==null?void 0:e.value):e==null?void 0:e.value}),(e==null?void 0:e.type)==="link"&&i.jsx(Vn,{link:(e==null?void 0:e.value)||""}),(e==null?void 0:e.type)==="download"&&i.jsx(Un,{link:d||""}),(e==null?void 0:e.type)==="audio"&&i.jsx(Xo,{src:d||""}),(e==null?void 0:e.type)==="drmBook"&&i.jsx(Io,{ebookData:a,userData:t,drm:d})]})}function pt({setExpanded:e,expanded:r,setSelectedCategoryIndex:t,setSelectedItemIndex:n,showMenu:o,setShowMenu:s,currentItem:a,selectedItemIndex:l,selectedCategoryIndex:d,sections:c,setSelectedSubItemIndex:h,expandedSession:m,setExpandedSession:w,selectedSubItemIndex:u}){const[p,x]=C.useState(!1),f=C.useRef(null),g=wt();cn(f,()=>x(!1));const b=A=>(j,y)=>{e(y?A:!1)},v=(A,j)=>{t(A),n(j)},T=(A,j)=>d==j&&A==l?"var(--primary)":"var(--text-full)";return i.jsxs(fn,{className:o?"showMenu":"",children:[i.jsxs(gn,{children:[i.jsx(F,{type:"contentTitle",children:o||g?"Content":""}),!g&&i.jsx("span",{onClick:()=>{s(!1)},style:{cursor:"pointer"},children:i.jsx(D,{name:"cross",color:"currentColor"})})]}),i.jsx("div",{style:{padding:"20px 16px"},children:c.map((A,j)=>i.jsxs(xn,{defaultExpanded:j==d,expanded:r===j,onChange:b(j),style:{borderRadius:"10px",boxShadow:"none"},children:[i.jsxs(yt,{"aria-controls":"panel1-content",id:"panel1-header",children:[i.jsx("span",{children:A.title}),i.jsx(D,{name:r===j?"downArrow":"upArrow",color:"currentColor",width:"24px"})]}),i.jsx(jt,{children:i.jsx("ul",{children:A==null?void 0:A.resources.map((y,L)=>i.jsx(i.Fragment,{children:y.type==="session"?i.jsx(Zo,{content:y,parentIndex:j,index:L,showMenu:o,setShowMenu:s,currentItem:a,setSelectedSubItemIndex:h,setSelectedCategoryIndex:t,setSelectedItemIndex:n,setExpandedSession:w,expandedSession:m,selectedSubItemIndex:u}):i.jsxs("li",{onClick:()=>v(j,L),className:(a==null?void 0:a.title)===(y==null?void 0:y.title)?"active":"",children:[i.jsxs("div",{className:"itemTitle",children:[i.jsx("span",{className:"circle",style:{display:"none",background:T(L,j)},children:L+1}),i.jsx(F,{color:T(L,j),type:"small",children:(y==null?void 0:y.type)=="quiz"?"Quiz":y==null?void 0:y.title})]}),i.jsx("div",{className:"itemArtifacts",children:(y==null?void 0:y.type)==="video"||(y==null?void 0:y.type)==="videoLink"?i.jsxs(i.Fragment,{children:[i.jsx("span",{children:y==null?void 0:y.duration}),i.jsx(D,{name:"videoPlayer",color:T(L,j)})]}):(y==null?void 0:y.type)==="pdf"?i.jsx(D,{name:"ebook",color:T(L,j)}):(y==null?void 0:y.type)==="quiz"?i.jsx(D,{name:"light",color:T(L,j)}):(y==null?void 0:y.type)==="link"?i.jsx(D,{name:"copyLink",color:T(L,j)}):(y==null?void 0:y.type)==="download"?i.jsx(D,{name:"downloadFolder",color:T(L,j)}):(y==null?void 0:y.type)==="audio"?i.jsx(D,{name:"audio",color:T(L,j)}):""})]},L)}))})})]},j))})]})}const Zo=({content:e,parentIndex:r,index:t,setSelectedCategoryIndex:n,setSelectedItemIndex:o,currentItem:s,setSelectedSubItemIndex:a,expandedSession:l,setExpandedSession:d,selectedSubItemIndex:c})=>{const h=u=>(p,x)=>{d(x?u:!1)},m=(u,p,x)=>{n(u),o(p),a(x)},w=u=>{var p;return s!=null&&s.sessionValue&&((p=s==null?void 0:s.sessionValue[c])==null?void 0:p.title)===(u==null?void 0:u.title)?"var(--primary)":"var(--text-full)"};
559return i.jsxs(En,{defaultExpanded:t==s,expanded:l===t,onChange:h(t),style:{borderRadius:"10px",boxShadow:"none"},children:[i.jsxs(yt,{"aria-controls":"panel2-content",id:"panel2-header",children:[i.jsx("span",{children:e.title}),i.jsx(D,{name:l===t?"downArrow":"upArrow",color:"currentColor",width:"24px"})]}),i.jsx(jt,{children:i.jsx("ul",{children:(e==null?void 0:e.sessionValue.length)&&(e==null?void 0:e.sessionValue.map((u,p)=>{var x,f;return i.jsx(i.Fragment,{children:i.jsxs("li",{onClick:()=>m(r,t,p),className:s!=null&&s.sessionValue&&((x=s==null?void 0:s.sessionValue[c])==null?void 0:x.title)===(u==null?void 0:u.title)?"active":"",children:[i.jsxs("div",{className:"itemTitle",children:[s!=null&&s.sessionValue&&((f=s==null?void 0:s.sessionValue[c])==null?void 0:f.title)===(u==null?void 0:u.title)?i.jsx("span",{className:"circle",children:p+1}):i.jsx("span",{className:"circle",style:{display:"none",background:"var(--text-fifty)"},children:p+1}),i.jsx(F,{color:w(u),type:"small",children:u==null?void 0:u.title})]}),i.jsx("div",{className:"itemArtifacts",children:(u==null?void 0:u.type)==="video"||(u==null?void 0:u.type)==="videoLink"?i.jsxs(i.Fragment,{children:[i.jsx("span",{children:u==null?void 0:u.duration}),i.jsx(D,{name:"videoPlayer",color:w(u)})]}):(u==null?void 0:u.type)==="pdf"?i.jsx(D,{name:"ebook",color:w(u)}):(u==null?void 0:u.type)==="quiz"?i.jsx(D,{name:"light",color:w(u)}):(u==null?void 0:u.type)==="link"?i.jsx(D,{name:"copyLink",color:w(u)}):(u==null?void 0:u.type)==="download"?i.jsx(D,{name:"downloadFolder",color:w(u)}):(u==null?void 0:u.type)==="audio"?i.jsx(D,{name:"audio",color:w(u)}):""})]},p)})}))})})]},t)},ei=k.div`
560  border-top: 1px solid var(--neutral-background);
561  padding: 16px 0px 0px;
562  width: 100%;
563  color: var(--text-fifty);
564
565  @media (max-width: 768px) {
566    border-top: unset;
567    border-radius: 12px;
568    background: #fff;
569    padding: 12px;
570    width: auto;
571    margin-top: 16px;
572    border: 1px solid #ecf1f4;
573    > span {
574      display: block;
575    }
576  }
577`,be=k.div`
578  display: inline-block;
579  margin: 4px 8px;
580  padding: 8px 16px;
581  background: var(--neutral-background);
582  border-radius: 20px;
583  cursor: pointer;
584  &.active {
585    background: var(--chips-20-bg);
586    color: var(--primary);
587  }
588  @media (max-width: 768px) {
589    margin: 8px 8px 0px 0px;
590    font-size: 14px;
591  }
592`,ti=k.div`
593  width: 100%;
594`;function ft({bookCode:e}){const[r,t]=C.useState(0),[n,o]=C.useState({items:[],count:0}),{handleError:s}=Te(),a=Xt(It).role,l=vt({mutationFn:()=>a==de.Admin?r?Yt({currentPage:1,type:Number(r),bookCode:e}):Promise.resolve(null):r?un({currentPage:1,type:Number(r),bookCode:e}):Promise.resolve(null),onSuccess(c){o(c||{items:[],count:0})},onError(c){var h;s((h=c==null?void 0:c.response)==null?void 0:h.data)}}),d=l.isPending;return C.useEffect(()=>{l.mutate({currentPage:1,type:+r})},[r]),i.jsxs(i.Fragment,{children:[i.jsxs(ei,{children:[i.jsx("span",{children:"Smart reads:"}),i.jsx(be,{onClick:()=>t(1),className:r===1?"active":"",children:"Related Articles"}),i.jsx(be,{onClick:()=>t(2),className:r===2?"active":"",children:"Related Blog"}),i.jsx(be,{onClick:()=>t(5),className:r===5?"active":"",children:"Related Tips and Tricks"})]}),i.jsx(ti,{children:d?i.jsx(St,{position:"relative"}):n.items.length>0?n.items.map(c=>i.jsx(dn,{lc:c,detailUrl:a==de.Admin?we.AdminLearningCircleListRoute:we.LearningCircleRoute})):i.jsx(i.Fragment,{children:r?i.jsx(Ct,{}):null})})]})}const ni=k(B)`
595  height: 80vh;
596  overflow-x: scroll;
597  position: absolute;
598  right: ${({hide:e})=>e?"-440px":"0px"};
599  transition: 0.5s ease-in-out;
600
601  @media (max-width: 768px) {
602    display: none;
603  }
604`;k(q)`
605  gap: 10px;
606  padding: 24px;
607  border-radius: 16px;
608  background: var(--primary-yellow);
609  width: 100%;
610  box-sizing: border-box;
611  flex-wrap: nowrap;
612  justify-content: space-between;
613
614  @media (max-width: 768px) {
615    padding: 10px;
616    flex-direction: column;
617    flex-wrap: wrap;
618    justify-content: center;
619  }
620`;function vi({backLink:e}){var Fe,Re,Oe,Ne,_e,Ve,ze,Ue,$e,Be,We,qe,Qe,Je,He,Ge,Ke,Xe;const r=bt(N=>N.profile),t=wt(),n=Zt(),o=en(),[s,a]=C.useState(0),[l,d]=C.useState(0),[c,h]=C.useState(0),[m,w]=C.useState(!1),[u,p]=C.useState(!1),[x,f]=C.useState(!t),{handleError:g}=Te();let{id:b}=mt();const{data:v,status:T,error:A}=tn({queryKey:[on],queryFn:()=>b?sn(b):n(e),refetchOnWindowFocus:!1,retry:!1});A&&(console.log((Fe=A==null?void 0:A.response)==null?void 0:Fe.data),n((Re=nn)==null?void 0:Re[(r==null?void 0:r.role)??""]),g((Oe=A==null?void 0:A.response)==null?void 0:Oe.data));const j=T==="pending",y=()=>{const N=M[s],$=N.resources[l];if($.type==="session")if(c<($==null?void 0:$.sessionValue.length)-1){const V=c+1;h(V)}else h(V=>V<($==null?void 0:$.sessionValue.length)-1?V+1:0),d(V=>{if(V<(N==null?void 0:N.resources.length)-1)return V+1;{const ae=s<M.length?s+1:M.length-1;return a(ae),0}});else l<N.resources.length-1?d(l+1):(a(V=>V<M.length-1?V+1:0),d(0))};C.useEffect(()=>{w(s)},[s]),C.useEffect(()=>{p(l)},[l]);const L=()=>{var V,ae;const N=M[s],$=N.resources[l];if(($==null?void 0:$.type)==="session")if(console.log("1"),c>0)h(c-1);else if(l===0){const ne=s===0?M.length-1:s-1;a(ne);const J=((V=M[ne])==null?void 0:V.resources.length)-1;d(J)}else d(l-1),h(N.resources[l-1].sessionValue.length-1);else if(console.log(2),l>0)d(l-1);else{const ne=s===0?M.length-1:s-1;a(ne);const J=M[ne].resources;d(J.length-1),((ae=J[J.length-1])==null?void 0:ae.type)==="session"&&h(J[J.length-1].sessionValue.length-1)}};if(j)return i.jsx(St,{});const P=v,M=(Ne=v==null?void 0:v.sections)==null?void 0:Ne.filter(N=>{if(N.active)return N}),_=M&&M[s],U=(_e=_==null?void 0:_.resources)==null?void 0:_e[l],H=!((Ve=_==null?void 0:_.resources[l])!=null&&Ve.value)&&((ze=_==null?void 0:_.resources[l])==null?void 0:ze.sessionValue)&&((Ue=_==null?void 0:_.resources[l])==null?void 0:Ue.sessionValue[c]),fe=M&&(M.length-1>s||(($e=M[s])==null?void 0:$e.resources.length)-1>l||!((Be=_==null?void 0:_.resources[l])!=null&&Be.value)&&((qe=(We=M[s])==null?void 0:We.resources)==null?void 0:qe.length)&&((Qe=M[s])==null?void 0:Qe.resources[l].sessionValue)&&((He=(Je=M[s])==null?void 0:Je.resources[l])==null?void 0:He.sessionValue.length)-1>c),ge=!(s===0&&l==0);return i.jsx(pn,{children:i.jsxs(B,{gap:"10px",children:[i.jsxs(q,{horizontalalign:"space-between",children:[i.jsxs(vn,{children:[i.jsx("span",{onClick:()=>{var N;return n(e+(((N=o==null?void 0:o.state)==null?void 0:N.fromQuery)||""))},style:{paddingRight:"16px",cursor:"pointer"},children:i.jsx(D,{name:"leftArrow",color:"black"})}),i.jsx(F,{type:"h3",children:P.name})]}),(r==null?void 0:r.role)===de.Admin||(r==null?void 0:r.role)===de.Moderator?i.jsx(ke,{buttonType:"secondary
620Dark",buttonStyle:{width:"fit-content"},onHandleClick:()=>{n(we.AdminBookEditRoute(b))},children:"Edit Book"}):null]}),t?i.jsx(hn,{collapsedTextLimit:18,children:P==null?void 0:P.description}):i.jsx(q,{horizontalalign:"start",width:"50%",children:i.jsx(F,{style:{paddingLeft:"8px"},type:"small",color:"var(--text-seventy)",children:P==null?void 0:P.description})}),!(v!=null&&v.sections)||((Ge=v==null?void 0:v.sections)==null?void 0:Ge.length)==0?i.jsx(Ct,{}):i.jsxs(q,{style:{flexWrap:"nowrap"},horizontalalign:"space-between",verticalalign:"flex-start",gap:"20px",children:[i.jsxs(B,{gap:"40px",style:{flexGrow:1},width:((Ke=H||U)==null?void 0:Ke.type)==="quiz"?"60%":"fit-content",children:[i.jsxs(B,{gap:"16px",children:[i.jsx(q,{style:{height:((Xe=H||U)==null?void 0:Xe.type)==="videoLink"?t?"20vh":"60vh":"auto"},children:i.jsx(Yo,{document:H||U,ebookData:v})}),i.jsxs(q,{horizontalalign:"space-between",children:[i.jsx(bn,{children:i.jsx(F,{type:"body",children:(H==null?void 0:H.title)||(U==null?void 0:U.title)})}),(U==null?void 0:U.type)!=="quiz"&&i.jsx(mn,{children:i.jsxs(q,{gap:"10px",children:[i.jsxs(Ye,{onClick:L,disabled:!ge,children:[i.jsx(D,{name:"leftArrow",color:ge?"var(--text-full)":"#a2a2aa"}),i.jsx(F,{type:"small",style:{cursor:"pointer"},color:ge?"var(--text-full)":"#a2a2aa",children:"PREV"})]}),i.jsxs(Ye,{onClick:y,disabled:!fe,children:[i.jsx(F,{type:"small",style:{cursor:"pointer"},color:fe?"var(--text-full)":"#a2a2aa",children:"NEXT"}),i.jsx(D,{name:"rightArrow",color:fe?"var(--text-full)":"#a2a2aa"})]})]})})]})]}),!t&&i.jsx(ft,{bookCode:v==null?void 0:v.aptrack_1_book_id})]}),!t&&M.length!=0&&i.jsxs(i.Fragment,{children:[i.jsx(ni,{width:"fit-content",hide:!x,children:x?i.jsx(pt,{setExpanded:w,expanded:m,showMenu:x,setShowMenu:f,setSelectedCategoryIndex:a,setSelectedItemIndex:d,currentItem:U,selectedCategoryIndex:s,sections:M,selectedItemIndex:l,selectedSubItemIndex:c,setSelectedSubItemIndex:h,setExpandedSession:p,expandedSession:u}):null}),x?null:i.jsx("div",{onClick:()=>{f(!0)},style:{cursor:"pointer"},children:i.jsx(D,{name:"backArrow",color:"currentColor"})}),x?i.jsx(q,{width:"440px"}):null]})]}),t&&i.jsxs(i.Fragment,{children:[i.jsx(pt,{setExpanded:w,expanded:m,showMenu:x,setShowMenu:f,setSelectedCategoryIndex:a,setSelectedItemIndex:d,currentItem:U,selectedCategoryIndex:s,sections:M,selectedItemIndex:l,selectedSubItemIndex:c,setSelectedSubItemIndex:h,setExpandedSession:p,expandedSession:u}),i.jsx(ft,{bookCode:v==null?void 0:v.aptrack_1_book_id})]})]})})}export{vi as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.