1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[43368],{38329:function(e,t,i){i.r(t);var r,o=i(50959);function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e}).apply(null,arguments)}t.default=e=>o.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",width:16,height:16,fill:"none",viewBox:"0 0 24 24"},e),r||(r=o.createElement("path",{stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 5s-2-2-5-2-5 2-5 2v14s2-2 5-2 5 2 5 2M12 5s2-2 5-2 5 2 5 2v14s-2-2-5-2-5 2-5 2"})))},46676:function(e,t,i){i.r(t);var r,o,n=i(50959);function a(){return(a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var r in i)({}).hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e}).apply(null,arguments)}t.default=e=>n.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:20,height:20,fill:"none",viewBox:"0 0 20 20"},e),r||(r=n.createElement("g",{stroke:"var(--stroke-color, currentColor)",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"var(--stroke-width, 1.66667)",clipPath:"url(#a)"},n.createElement("path",{d:"M10.001 18.334a8.333 8.333 0 1 0 0-16.667 8.333 8.333 0 0 0 0 16.667"}),n.createElement("path",{d:"M7.574 7.5a2.5 2.5 0 0 1 4.859.834c0 1.667-2.5 2.5-2.5 2.5M10 14.167h.008"}
1))),o||(o=n.createElement("defs",null,n.createElement("clipPath",{id:"a"},n.createElement("path",{fill:"#fff",d:"M0 0h20v20H0z"})))))},62759:function(e,t,i){i.d(t,{Af:function(){return o.ZP},ZT:function(){return n.ZP},xu:function(){return r.Z}});var r=i(65300),o=i(51766),n=i(89096)},77638:function(e,t,i){i.d(t,{Fg:function(){return n.Fg},ac:function(){return o.Z},xu:function(){return r.Z}});var r=i(65300),o=i(97618),n=i(25922)},29125:function(e,t,i){i.d(t,{Z:function(){return z}});var r=i(11527),o=i(50959),n=i(35718),a=i(61612),l=i(4553),s=i(9732),d=i(48779);let c=(0,l.F4)` 2 0%, 100% { 3 filter: drop-shadow(0 0 4px var(--badge-glow-color)) drop-shadow(0 0 8px var(--badge-glow-color)); 4 } 5 50% { 6 filter: drop-shadow(0 0 6px var(--badge-glow-color)) drop-shadow(0 0 12px var(--badge-glow-color)); 7 } 8`,u=s.Z.div({label:"badge-wrapper",position:"relative",display:"inline-flex"}),h=s.Z.div({label:"badge-disc",borderRadius:"50%",overflow:"hidden",display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative"},e=>{let t="locked"===e.state;return{"--badge-glow-color":e.glowColor,width:e.displaySize,height:e.displaySize,backgroundColor:t?"#3a3a3a":e.backgroundColor,[d._s.breakpoints.down("md")]:{width:.85*e.displaySize,height:.85*e.displaySize},[d._s.breakpoints.down("sm")]:{width:.75*e.displaySize,height:.75*e.displaySize}}}),f=s.Z.svg({label:"badge-svg-container",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",display:"block",zIndex:2,transition:"filter 0.2s ease-in-out, width 0.15s ease-in-out, height 0.15s ease-in-out"},e=>({"--badge-glow-color":e.glowColor,width:e.displaySize,height:e.displaySize,filter:e.isColorized?"none":"grayscale(100%) opacity(0.5)",animation:e.isAnimated?`${c} 2s ease-in-out infinite`:"none",...e.isColorized&&!e.noHover&&{"@media (hover: hover) and (pointer: fine)":{"&:hover":{width:2*Math.ceil(1.1*e.displaySize/2),height:2*Math.ceil(1.1*e.displaySize/2)}}}})),p=(0,l.F4)` 9 0% { 10 transform: translateY(0) translateX(0) scale(0.4); 11 opacity: 0; 12 } 13 10% { 14 opacity: 0.7; 15 } 16 50% { 17 opacity: 0.5; 18 } 19 100% { 20 transform: translateY(var(--bubble-travel)) translateX(var(--bubble-drift)) scale(1); 21 opacity: 0; 22 } 23`,m=s.Z.div({label:"bubble-container",position:"absolute",top:0,left:0,width:"100%",height:"100%",pointerEvents:"none",overflow:"visible"},e=>({zIndex:"back"===e.layer?1:3})),x=s.Z.div(e=>({label:"bubble",position:"absolute",bottom:e.startY,left:e.left,width:e.size,height:e.size,borderRadius:"50%",backgroundColor:e.color,opacity:0,"--bubble-drift":e.drift,"--bubble-travel":e.travel,animation:`${p} ${e.duration}s ease-out ${e.delay}s infinite`})),g=s.Z.div({display:"none",width:0,height:0,visibility:"hidden"}),y=s.Z.div({label:"badge-tooltip",position:"absolute",bottom:"calc(100% + 8px)",left:"50%",transform:"translateX(-50%)",padding:"8px 12px",backgroundColor:"rgba(0, 0, 0, 0.85)",color:"#ffffff",borderRadius:8,fontSize:12,fontWeight:500,whiteSpace:"nowrap",zIndex:100,opacity:0,visibility:"hidden",transition:"opacity 0.2s ease, visibility 0.2s ease",textAlign:"center","&::after":{content:'""',position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)",borderWidth:6,borderStyle:"solid",borderColor:"rgba(0, 0, 0, 0.85) transparent transparent transparent"}}),b=s.Z.div({label:"badge-with-tooltip",position:"relative",display:"inline-flex",[`&:hover ${y}`]:{opacity:1,visibility:"visible"}}),v=s.Z.span({fontWeight:700,display:"block",marginBottom:2}),w=s.Z.span(e=>({color:e.color??"#9E9E9E",fontWeight:600})),C=s.Z.span({color:"#FFD700",fontWeight:600});var z=e=>{let{badgeId:t,state:i,isEarned:l,size:s=n.OD.MD,customSize:d,isPremiumUser:c=!1,showTooltip:p=!0,noHover:z=!1,onClick:j}=e,[S,k]=(0,o.useState)(!1);(0,o.useEffect)(()=>{k(!0)},[]);let M=(0,o.useMemo)(()=>(0,n.s4)(t),[t]),$=(0,o.useMemo)(()=>i||(l?"earned":"locked"),[i,l]),Z=(0,o.useMemo)(()=>{let e=String(s);return"sm"===e?n.OD.SM:"lg"===e?n.OD.LG:n.OD.MD},[s]),E=(0,o.useMemo)(()=>(0,n.QK)(t,c),[t,c]),A=(0,o.useMemo)(()=>d??n.LO[Z].base,[Z,d]);(0,o.useEffect)(()=>
23{if(!M)return;let e=M.tier;(0,a.y)(n.jG[e]).catch(e=>{})},[M]);let D=(0,o.useMemo)(()=>M?`#${(0,n.u$)(M.id)}`:"",[M]),L=(0,o.useMemo)(()=>(0,n.sh)(t),[t]),Y=(0,o.useMemo)(()=>[{size:10,delay:0,duration:3.2,left:"22%",drift:"-14px",startY:"50%",travel:"-80px"},{size:8,delay:.9,duration:2.8,left:"48%",drift:"10px",startY:"50%",travel:"-70px"},{size:12,delay:1.6,duration:3.6,left:"72%",drift:"-8px",startY:"50%",travel:"-90px"},{size:7,delay:.4,duration:3,left:"58%",drift:"16px",startY:"50%",travel:"-75px"},{size:9,delay:2.1,duration:3.4,left:"35%",drift:"-20px",startY:"50%",travel:"-85px"}],[]),F=(0,o.useMemo)(()=>[{size:7,delay:.3,duration:2.6,left:"25%",drift:"-10px",startY:"33%",travel:"-90px"},{size:5,delay:1.1,duration:2.4,left:"50%",drift:"12px",startY:"33%",travel:"-80px"},{size:8,delay:.7,duration:3,left:"68%",drift:"-6px",startY:"33%",travel:"-100px"},{size:5,delay:1.8,duration:2.8,left:"40%",drift:"8px",startY:"33%",travel:"-85px"},{size:6,delay:.5,duration:2.5,left:"78%",drift:"-16px",startY:"33%",travel:"-95px"},{size:5,delay:1.4,duration:2.7,left:"15%",drift:"6px",startY:"33%",travel:"-75px"}],[]);if(!M)return null;if(!E)return(0,r.jsx)(g,{});if(!S)return null;let P=(0,r.jsxs)(u,{children:[(0,r.jsx)(h,{state:$,glowColor:M.glowColor,backgroundColor:M.backgroundColor,displaySize:A}),(0,r.jsx)(f,{isColorized:"locked"!==$,isAnimated:"animated"===$,glowColor:M.glowColor,displaySize:A,noHover:z,onClick:()=>{j&&j(t)},role:"img","aria-label":`${M.name} badge${"locked"===$?" - locked":" - earned"}`,children:(0,r.jsx)("use",{href:D})}),"animated"===$&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(m,{layer:"back",children:Y.map((e,t)=>(0,r.jsx)(x,{size:e.size,color:"rgba(0, 0, 0, 0.15)",delay:e.delay,duration:e.duration,left:e.left,drift:e.drift,startY:e.startY,travel:e.travel},t))}),(0,r.jsx)(m,{layer:"front",children:F.map((e,t)=>(0,r.jsx)(x,{size:e.size,color:"rgba(255, 255, 255, 0.5)",delay:e.delay,duration:e.duration,left:e.left,drift:e.drift,startY:e.startY,travel:e.travel},t))})]})]});return p?(0,r.jsxs)(b,{children:[P,(0,r.jsxs)(y,{children:[(0,r.jsx)(v,{children:M.name}),(0,r.jsx)(w,{color:L,children:M.rarity})," | ",(0,r.jsxs)(C,{children:[M.xpValue," XP"]})]})]}):P}},52800:function(e,t,i){i.d(t,{Z:function(){return C}});var r=i(11527),o=i(26159),n=i(88281),a=i(88115),l=i(15588),s=i(17312),d=i(80199),c=i(25027),u=i(97618),h=i(50959),f=i(35217),p=i(48779);let m=f.AY/2,x=(0,h.forwardRef)(function(e,t){let{certificate:i}=e,{studentName:o,chapterName:n,courseName:a,earnedAt:l,certificateType:s,userId:d,courseId:c,chapterId:u}=i,h=o.trim()||"You",p=(0,f.Zi)(s,d,c,u),x=new Date(l).toLocaleDateString("en-US",{month:"long",day:"numeric",year:"numeric"});return(0,r.jsxs)("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:f.nb,width:f.AY,height:f.GF,role:"img","aria-label":`Certificate of Achievement for ${h}`,children:[(0,r.jsx)("rect",{x:"0",y:"0",width:f.AY,height:f.GF,rx:"5",ry:"5",fill:f.cY.background}),(0,r.jsx)("rect",{x:"5",y:"5",width:f.AY-10,height:f.GF-10,rx:"5",ry:"5",fill:"none",stroke:f.cY.border,strokeWidth:"10"}),(0,r.jsx)("line",{x1:"71",y1:"442",x2:"707",y2:"442",stroke:f.cY.divider,strokeWidth:"1.25"}),(0,r.jsx)("image",{href:f.$z.logo,x:m-47,y:"40",width:"93",height:"93"}),(0,r.jsx)("image",{href:f.$z.seal,x:"600",y:"340",width:"160",transform:"rotate(-15, 640, 360)",height:"160"}),(0,r.jsx)("text",{x:m,y:"160",textAnchor:"middle",fill:f.cY.titleText,fontSize:"16",fontWeight:"400",letterSpacing:"5",children:"CERTIFICATE OF ACHIEVEMENT"}),(0,r.jsx)("text",{x:m,y:"200",textAnchor:"middle",fill:f.cY.titleText,fontSize:"16",fontWeight:"400",children:"This certificate is awarded to"}),(0,r.jsx)("text",{x:m,y:"250",textAnchor:"middle",fill:f.cY.nameText,fontSize:"42",fontWeight:"700",fontFamily:"Georgia, serif",children:h}),(0,r.jsx)("text",{x:m,y:"285",textAnchor:"middle",fill:f.cY.titleText,fontSize:"16",fontWeight:"400",children:"for completing chapter"}),(0,r.jsx)("text",{x:m,y:"330",textAnchor:"middle",fill:f.cY.chapterText,fontSize:"36",fontWeight:"700",children:n}),(0,r.jsx)("text",{x:m,y:"368",textAnchor:"middle",fill:f.cY.courseText,fontSize:"22",fontStyle:"italic",children:a}),(0,r.jsx)("text",{x:"225",y:"483",textAnchor:"middle",fill:f.cY.titleText,fontSize:"15",fontWeight:"400",children:"Date"}),(0,r.jsx)("text",{x:"225",y:"510",textAnchor:"middle",fill:f.cY.nameText,fontSize:"17.5",fontWeight:"600",children:x}),(0,r.jsx)("text",{x:"555",y:"483",textAnchor:"middle",fill:f.cY.titleText,fontSize:"15",fontWeight:"400",children:"Certificate ID"}),(0,r.jsxs)("text",{x:"555",y:"510",textAnchor:"middle",fill:f.cY.nameText,fontSize:"17.5",fontWeight:"600",children:["#",p]})]})});var g=i(9732);let y=g.Z.div({label:"certificate-modal-content",display:"flex",flexDirection:"column",alignItems:"center",gap:16,padding:"24px 48px",[p._s.breakpoints.down("sm")]:{padding:"16px"}}),b=g.Z.div({label:"certificate-actions",display:"flex",justifyContent:"center",gap:16,paddingTop:8,paddingBottom:8,[p._s.breakpoints.down("sm")]:{flexDirection:"column"}}),v=g.Z.div({label:"certificate-svg-wrapper",width:"100%",maxWidth:780,overflow:"hidden","& > svg":{display:"block",width:"100%",height:"auto"}});async function w(e){let t=e.querySelectorAll("image");await Promise.all(Array.from(t).map(async e=>{let t=e.getAttribute("href")||e.getAttributeNS("http://www.w3.org/1999/xlink","href");if(!(!t||t.startsWith("data:")))try{let i=await fetch(t,{mode:"cors"}),r=await i.blob(),o=await new Promise(e=>{let t=new FileReader;t.onloadend=()=>
23e(t.result),t.readAsDataURL(r)});e.setAttribute("href",o)}catch{}}))}function C(e){let{certificate:t,onClose:i}=e,m=(0,h.useRef)(null),{handlePrint:g,handleDownload:C,isDownloading:z}=function(e,t){let[i,r]=(0,h.useState)(!1);return{handlePrint:(0,h.useCallback)(()=>{let t=e.current;if(!t)return;let i=new XMLSerializer().serializeToString(t),r=window.open("","_blank");r&&(r.document.write(`<!DOCTYPE html> 24<html><head><title>StudyPug Certificate</title> 25<style> 26@page { size: landscape; margin: 0; } 27body { margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; background: #fff; } 28svg { max-width: 100%; max-height: 100vh; } 29</style> 30</head><body>${i}</body></html>`),r.document.close(),r.focus(),setTimeout(()=>r.print(),300))},[e]),handleDownload:(0,h.useCallback)(async()=>{let o=e.current;if(o&&!i){r(!0);try{let e=o.cloneNode(!0);await w(e);let i=new XMLSerializer().serializeToString(e),r=new Blob([i],{type:"image/svg+xml;charset=utf-8"}),n=URL.createObjectURL(r),a=new Image;a.width=2*f.AY,a.height=2*f.GF,await new Promise((e,t)=>{a.onload=()=>e(),a.onerror=()=>t(Error("Failed to load SVG as image")),a.src=n});let l=document.createElement("canvas");l.width=2*f.AY,l.height=2*f.GF;let s=l.getContext("2d");if(!s)return;s.drawImage(a,0,0,l.width,l.height),URL.revokeObjectURL(n);let d=await new Promise(e=>{l.toBlob(e,"image/png")});if(!d)return;let c=URL.createObjectURL(d),u=document.createElement("a");u.href=c,u.download=t?`${t}.png`:"StudyPug-Certificate.png",document.body.appendChild(u),u.click(),document.body.removeChild(u),URL.revokeObjectURL(c)}finally{r(!1)}}},[e,i,t]),isDownloading:i}}(m,(0,h.useMemo)(()=>t?(0,f.Zi)(t.certificateType,t.userId,t.courseId,t.chapterId):void 0,[t])),j=(0,u.Z)(p._s.breakpoints.down("sm"));return t?(0,r.jsx)(d.default,{open:!0,onClose:i,fullScreen:j,maxWidth:"md",fullWidth:!0,PaperProps:{sx:{borderRadius:j?0:"16px",margin:j?0:"16px",maxWidth:"900px",display:"flex",flexDirection:"column",justifyContent:"center"}},children:(0,r.jsxs)(y,{children:[(0,r.jsx)(c.ZP,{onClick:i,"aria-label":"Close",sx:{position:"absolute",top:4,right:4,color:"#999"},children:(0,r.jsx)(o.Z,{})}),(0,r.jsx)(v,{children:(0,r.jsx)(x,{ref:m,certificate:t})}),(0,r.jsxs)(b,{children:[(0,r.jsx)(l.ZP,{variant:"outlined",startIcon:(0,r.jsx)(a.Z,{}),onClick:g,sx:{textTransform:"none",fontWeight:600,borderRadius:"50px",px:3,fontSize:{xs:"14px",sm:"16px"}},children:"Print"}),(0,r.jsx)(l.ZP,{variant:"contained",startIcon:z?(0,r.jsx)(s.ZP,{size:18,color:"inherit"}):(0,r.jsx)(n.Z,{}),onClick:C,disabled:z,sx:{textTransform:"none",fontWeight:600,borderRadius:"50px",px:3,backgroundColor:"#4ECDC4",fontSize:{xs:"14px",sm:"16px"},"&:hover":{backgroundColor:"#3dbdb5"}},children:z?"Downloading...":"Download PNG"})]})]})}):null}},8389:function(e,t,i){i.d(t,{Z:function(){return D}});var r=i(11527),o=i(50959),n=i(52599),a=i(4860),l=i(61612),s=i(4553),d=i(9732);let c=(0,s.F4)` 31 0% { 32 opacity: 0.8; 33 transform: translate(0, 0) scale(1); 34 } 35 100% { 36 opacity: 0; 37 transform: translate(var(--dx), var(--dy)) scale(0.3); 38 } 39`,u=(0,s.F4)` 40 from { 41 transform: rotate(0deg); 42 } 43 to { 44 transform: rotate(360deg); 45 } 46`,h=(0,s.F4)` 47 0% { 48 transform: translateX(-100%) rotate(25deg); 49 opacity: 0; 50 } 51 10% { 52 opacity: 1; 53 } 54 50% { 55 transform: translateX(100%) rotate(25deg); 56 opacity: 1; 57 } 58 60%, 100% { 59 transform: translateX(100%) rotate(25deg); 60 opacity: 0; 61 } 62`,f=d.Z.div(e=>({position:"relative",display:"inline-flex",justifyContent:"center",alignItems:"center",width:e.size,height:e.size})),p=d.Z.div({position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:0,pointerEvents:"none"}),m=d.Z.div({position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:2,pointerEvents:"none"}),x=d.Z.div({position:"absolute",top:"50%",left:"50%",width:0,height:0}),g=d.Z.div(e=>({position:"absolute",width:e.size,height:e.size,backgroundColor:e.color,borderRadius:"50%","--dx":`${e.dx}px`,"--dy":`${e.dy}px`,animation:`${c} ${e.duration}s ease-out infinite`,animationDelay:`${e.delay}s`,boxShadow:`0 0 ${e.size/2}px ${e.color}`})),y=d.Z.div(e=>({position:"absolute",top:0,left:0,width:"100%",height:"100%",animation:`${u} ${e.duration}s linear infinite`,animationDirection:e.reverse?"reverse":"normal"})),b=d.Z.div(e=>({position:"absolute",left:`calc(50% + ${e.x}px)`,top:`calc(50% + ${e.y}px)`,width:e.size,height:e.size,backgroundColor:e.color,borderRadius:"50%",transform:"translate(-50%, -50%)",boxShadow:`0 0 ${e.size}px ${e.color}`}));d.Z.div(e=>({position:"absolute",top:"50%",left:"50%",width:.9*e.size,height:.9*e.size,transform:"translate(-50%, -50%)",borderRadius:"50%",overflow:"hidden",pointerEvents:"none"})),d.Z.div(e=>({position:"absolute",top:"-50%",left:"-50%",width:"200%",height:"200%",background:`linear-gradient( 63 90deg, 64 transparent 0%, 65 transparent 35%, 66 ${e.color}40 45%, 67 ${e.color}80 50%, 68 ${e.color}40 55%, 69 transparent 65%, 70 transparent 100% 71 )`,animation:`${h} ${e.duration}s ease-in-out infinite`,animationDelay:`${e.delay}s`}));let v={low:{orbits:2,particles:6},medium:{orbits:3,particles:8},high:{orbits:4,particles:12}},w={[a.C.Bronze]:` 72 M16 29.5C15.5 24.5 16.5 15.5 16.5 15.5C16.5 15.5 25 15 33.5 12C42 9 49.5 4.5 49.5 4.5C49.5 4.5 56.5 8.5 66 12C75.5 15.5 83.5 15.5 83.5 15.5C83.5 15.5 84 28.5 83 35C82 41.5 79 56 73 64C67 72 49.5 80 49.5 80C49.5 80 35 74 27.5 65C20 56 16.5 34.5 16 29.5Z 73 `,[a.C.Silver]:` 74 M49.5 5.5C68.2643 5.5 83.5 21.1565 83.5 40.5C83.5 59.8435 68.2643 75.5 49.5 75.5C30.7357 75.5 15.5 59.8435 15.5 40.5C15.5 21.1565 30.7357 5.5 49.5 5.5Z 75 `,[a.C.Gold]:` 76 M28 40.5C26 34.5 26 14 26 14C26 14 24 13 24 11.5C24 10 26 9.5 26 9.5C26 9.5 35 7.5 49.5 7.5C64 7.5 73.5 9 74 9.5C74.5 10 75.5 10.5 75.5 12C75.5 13.5 73.5 14 73.5 14C73.5 14 73 35.5 71.5 40.5C70 45.5 64 65 49.5 65C35 65 30 46.5 28 40.5Z 77 `,[a.C.Platinum]:` 78 M23.5 13.5L28.5 6.5C28.5 6.5 39 4.5 49.5 4C60 3.5 71.5 7 71.5 7L76.5 14C76.5 14 76.1667 30.5 73.5 38.5C70.8333 46.5 62 62 49.5 62C37 62 31.5 49 28 41.5C24.5 34 23.5 13.5 23.5 13.5Z 79 `,[a.C.Diamond]:` 80 M94.5 40L50.5 89.5L5.5 40.5L5 37.5L23.5 23L38 19.5L49.5 19L61.5 19.5L76.5 23L94.5 37V40Z 81 `},C=e=>{let{count:t,color:i,radius:n}=e,a=(0,o.useMemo)(()=>Array.from({length:t},(e,i)=>{let r=i/t*Math.PI*2;return{key:i,x:Math.cos(r)*n,y:Math.sin(r)*n,size:2+i%2*2}}),[t,n]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(y,{duration:8,children:a.slice(0,Math.ceil(t/2)).map(e=>(0,r.jsx)(b,{x:e.x,y:e.y,color:i,size:e.size},e.key))}),(0,r.jsx)(y,{duration:12,reverse:!0,children:a.slice(Math.ceil(t/2)).map(e=>(0,r.jsx)(b,{x:.7*e.x,y:.7*e.y,color:i,size:.8*e.size},e.key))})]})},z=e=>{let{count:t,color:i,radius:n}=e,a=(0,o.useMemo)(()=>Array.from({length:t},(e,i)=>{let r=i/t*Math.PI*2,o=.6*n+Math.random()*n*.4,a=i/t*2;return{key:i,dx:Math.cos(r)*o,dy:Math.sin(r)*o,delay:a,duration:2+1*Math.random(),size:2+2*Math.random()}}),[t,n]);return(0,r.jsx)(x,{children:a.map(e=>(0,r.jsx)(g,{dx:e.dx,dy:e.dy,delay:e.delay,duration:e.duration,color:i,size:e.size},e.key))})},j=e=>{let{color:t,size:i,medalType:o}=e,n=`shine-clip-${o}`,a=w[o];return(0,r.jsxs)("svg",{style:{position:"absolute",top:"50%",left:"50%",width:i,height:i,transform:"translate(-50%, -50%)",overflow:"visible",pointerEvents:"none"},viewBox:"0 0 100 100",children:[(0,r.jsxs)("defs",{children:[(0,r.jsx)("clipPath",{id:n,children:(0,r.jsx)("path",{d:a})}),(0,r.jsxs)("linearGradient",{id:`shine-gradient-${o}`,x1:"0%",y1:"0%",x2:"100%",y2:"0%",children:[(0,r.jsx)("stop",{offset:"0%",stopColor:"transparent"}),(0,r.jsx)("stop",{offset:"35%",stopColor:"transparent"}),(0,r.jsx)("stop",{offset:"45%",stopColor:t,stopOpacity:"0.3"}),(0,r.jsx)("stop",{offset:"50%",stopColor:t,stopOpacity:"0.6"}),(0,r.jsx)("stop",{offset:"55%",stopColor:t,stopOpacity:"0.3"}),(0,r.jsx)("stop",{offset:"65%",stopColor:"transparent"}),(0,r.jsx)("stop",{offset:"100%",stopColor:"transparent"})]})]}),(0,r.jsx)("g",{clipPath:`url(#${n})`,children:(0,r.jsx)("rect",{x:"-100",y:"-20",width:"100",height:"140",fill:`url(#shine-gradient-${o})`,transform:"rotate(25, 50, 50)",style:{animation:"shineSweepSvg 4s ease-in-out infinite"}})}),(0,r.jsx)("style",{children:` 82 @keyframes shineSweepSvg { 83 0% { transform: translateX(-100px) rotate(25deg); opacity: 0; } 84 8% { opacity: 1; }
85 40% { transform: translateX(200px) rotate(25deg); opacity: 1; } 86 48%, 100% { transform: translateX(200px) rotate(25deg); opacity: 0; } 87 } 88 `})]})};var S=e=>{let{children:t,size:i,color:o,medalType:n,intensity:a="medium",showEffects:l=!0}=e,s=v[a],d=i/2;return l?(0,r.jsxs)(f,{size:i,children:[(0,r.jsxs)(p,{children:[(0,r.jsx)(C,{count:s.orbits,color:o,radius:.85*d}),(0,r.jsx)(z,{count:s.particles,color:o,radius:d})]}),t,(0,r.jsx)(m,{children:(0,r.jsx)(j,{color:o,size:i,medalType:n})})]}):(0,r.jsx)(r.Fragment,{children:t})},k=i(48779);let M=(0,s.F4)` 89 0%, 100% { 90 filter: drop-shadow(0 0 4px var(--medal-color)) drop-shadow(0 0 8px var(--medal-color)); 91 } 92 50% { 93 filter: drop-shadow(0 0 6px var(--medal-color)) drop-shadow(0 0 12px var(--medal-color)); 94 } 95`,$=d.Z.svg({label:"medal-svg-container",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",display:"block",transition:"width 0.15s ease-in-out, height 0.15s ease-in-out",overflow:"visible"},e=>({cursor:e.clickable?"pointer":"default",width:e.displaySize??112,height:e.displaySize??112,...!e.noHover&&{"@media (hover: hover) and (pointer: fine)":{"&:hover":{width:2*Math.ceil((e.displaySize??112)*1.1/2),height:2*Math.ceil((e.displaySize??112)*1.1/2)}}},[k._s.breakpoints.down("md")]:{width:(e.displaySize??112)*.85,height:(e.displaySize??112)*.85},[k._s.breakpoints.down("sm")]:{width:(e.displaySize??112)*.75,height:(e.displaySize??112)*.75}})),Z=d.Z.div({label:"medal-wrapper",position:"relative",display:"inline-flex",zIndex:1},e=>({"--medal-color":e.medalColor??"#FFD700",animation:e.isAnimated?`${M} 2s ease-in-out infinite`:"none",width:e.displaySize,height:e.displaySize})),E=d.Z.div({label:"medal-tooltip",position:"absolute",bottom:"calc(100% + 8px)",left:"50%",transform:"translateX(-50%)",padding:"8px 12px",backgroundColor:"rgba(0, 0, 0, 0.85)",color:"#ffffff",borderRadius:8,fontSize:12,fontWeight:600,whiteSpace:"nowrap",zIndex:100,opacity:0,visibility:"hidden",transition:"opacity 0.2s ease, visibility 0.2s ease",textAlign:"center","&::after":{content:'""',position:"absolute",top:"100%",left:"50%",transform:"translateX(-50%)",borderWidth:6,borderStyle:"solid",borderColor:"rgba(0, 0, 0, 0.85) transparent transparent transparent"}}),A=d.Z.div({label:"medal-with-tooltip",position:"relative",display:"inline-flex",[`&:hover ${E}`]:{opacity:1,visibility:"visible"}});var D=e=>{let{medalType:t,state:i="default",size:s=a.W.MD,customSize:d,showTooltip:c=!0,noHover:u=!1,effectIntensity:h="medium",onClick:f}=e,p="animated"===i,[m,x]=(0,o.useState)(!1);(0,o.useEffect)(()=>{x(!0)},[]),(0,o.useEffect)(()=>{(0,l.y)(n.fj).catch(e=>{})},[]);let g=(0,o.useMemo)(()=>(0,n.PI)(t),[t]),y=(0,o.useMemo)(()=>{let e=String(s);return"sm"===e?a.W.SM:"lg"===e?a.W.LG:a.W.MD},[s]),b=(0,o.useMemo)(()=>d??n.lO[y].base,[y,d]),v=(0,o.useMemo)(()=>(0,n.Nv)(t),[t]),w=(0,o.useMemo)(()=>(0,n.d7)(t),[t]);if(!g||!m)return null;let C=(0,r.jsx)(Z,{medalColor:v,isAnimated:p,displaySize:b,children:(0,r.jsx)($,{displaySize:b,noHover:u,clickable:!!f,onClick:()=>{f&&f(t)},role:"img","aria-label":g.name,children:(0,r.jsx)("use",{href:w})})}),z=(0,r.jsx)(S,{size:b,color:v,medalType:t,intensity:h,showEffects:p,children:C});return c?(0,r.jsxs)(A,{children:[z,(0,r.jsx)(E,{children:g.name})]}):z}},35217:function(e,t,i){i.d(t,{$z:function(){return x},AY:function(){return f},Cz:function(){return n},GF:function(){return p},Zi:function(){return y},cY:function(){return m},ct:function(){return s},eq:function(){return a},nb:function(){return h},uX:function(){return u},wv:function(){return d},zm:function(){return l}});var r=i(76318),o=i(23743);let n="0 0 440 320",a=1.375,l=`${r.VL}/img/general/img_svg/v1/awards/certificate-blank.svg`,s={[o.y.SM]:64,[o.y.MD]:128,[o.y.LG]:256},d=[{id:o.n.ChapterComplete,name:"Chapter Complete",icon:{src:`${r.VL}/img/general/img_svg/v1/icon-star.svg`,width:164,height:157,x:192,y:99}},{id:o.n.CourseComplete,name:"Course Complete",icon:{src:`${r.VL}/img/general/img_svg/v1/icon-trophy.svg`,width:182,height:184,x:183,y:95}},{id:o.n.StreakMilestone,name:"Streak Milestone",icon:{src:`${r.VL}/img/general/img_svg/v1/icon-flame.svg`,width:121,height:165,x:214,y:95}}],c=new Map(d.map(e=>[e.id,e])),u=e=>c.get(e),h="0 0 780 585",f=780,p=585,m={border:"#4ECDC4",background:"#FFFFFF",titleText:"#666666",nameText:"#333333",chapterText:"#4ECDC4",courseText:"#05A7CF",divider:"#E5E5E5"},x={logo:`${r.VL}/img/general/img_svg/v1/studypug-logo.svg`,seal:`${r.VL}/img/general/img_svg/v1/studypug-seal.svg`},g={[o.n.ChapterComplete]:"C01",[o.n.CourseComplete]:"C02",[o.n.StreakMilestone]:"C03"};function y(e,t,i,r){return`SP-${g[e]}-${t}-${i}-${r}`}},52599:function(e,t,i){i.d(t,{B_:function(){return f},Mu:function(){return c},Nv:function(){return p},PI:function(){return h},d7:function(){return s},fj:function(){return a},lO:function(){return n}});var r=i(76318),o=i(4860);let n={[o.W.XS]:{base:24},[o.W.SM]:{base:48},[o.W.MD]:{base:64},[o.W.LG]:{base:96}},a=`${r.VL}/img/general/img_svg/v1/awards/medals.svg`,l={[o.C.Bronze]:"medal-bronze",[o.C.Silver]:"medal-silver",[o.C.Gold]:"medal-gold",[o.C.Platinum]:"medal-platinum",[o.C.Diamond]:"medal-diamond"},s=e=>`#${l[e]}`,d={[o.C.Bronze]:"#CD7F32",[o.C.Silver]:"#C0C0C0",[o.C.Gold]:"#FFD700",[o.C.Platinum]:"#E5E4E2",[o.C.Diamond]:"#B9F2FF"},c=[{id:o.C.Bronze,name:"Bronze",threshold:70,color:d[o.C.Bronze]},{id:o.C.Silver,name:"Silver",threshold:80,color:d[o.C.Silver]},{id:o.C.Gold,name:"Gold",threshold:90,color:d[o.C.Gold]},{id:o.C.Platinum,name:"Platinum",threshold:95,color:d[o.C.Platinum]},{id:o.C.Diamond,name:"Diamond",threshold:100,color:d[o.C.Diamond]}],u=new Map(c.map(e=>[e.id,e])),h=e=>u.get(e),f=e=>{if(!(e<70)){for(let t=c.length-1;t>=0;t--)if(e>=c[t].threshold)return c[t].id}}
95,p=e=>d[e]||d[o.C.Bronze]},2845:function(e,t,i){i.d(t,{GT:function(){return a},M5:function(){return s},MB:function(){return l},cH:function(){return o},jF:function(){return n},yA:function(){return r}});let r=[{id:"auto_height",label:"Auto height",description:"Resize the practice area to fit the question content."},{id:"auto_submit",label:"Auto submit my answers",description:"Do not make me confirm my answers when possible."},{id:"auto_listen",label:"Auto listen to question",description:"Automatically listen to each question."},{id:"hide_solutions",label:"Hide Solutions",description:"Don't show the correct answer."},{id:"hide_timer",label:"Hide Timer",description:"Hide the timer display during practice."}],o=r.filter(e=>"hide_solutions"!==e.id),n={auto_listen:!1,auto_submit:!0,hide_solutions:!1,sfx:!0,shortcut_keys:!1,auto_height:!0,hide_timer:!1},a={...n,auto_submit:!1},l="practice_settings",s="quiz_settings"},23743:function(e,t,i){var r,o,n,a;i.d(t,{n:function(){return r},y:function(){return o}}),(n=r||(r={})).ChapterComplete="chapter-complete",n.CourseComplete="course-complete",n.StreakMilestone="streak-milestone",(a=o||(o={})).SM="sm",a.MD="md",a.LG="lg"},4860:function(e,t,i){var r,o,n,a;i.d(t,{C:function(){return r},W:function(){return o}}),(n=r||(r={})).Bronze="bronze",n.Silver="silver",n.Gold="gold",n.Platinum="platinum",n.Diamond="diamond",(a=o||(o={})).XS="xs",a.SM="sm",a.MD="md",a.LG="lg"},61612:function(e,t,i){i.d(t,{y:function(){return o}});let r=new Map;function o(e){let t=r.get(e);if(t)return t;let i=fetch(e).then(t=>{if(!t.ok)throw Error(`SVG sprite fetch failed: ${t.status} ${t.statusText} (${e})`);return t.text()}).then(t=>{let i=document.createElement("div");i.setAttribute("data-svg-sprite",e),i.style.position="absolute",i.style.width="0",i.style.height="0",i.style.overflow="hidden",i.setAttribute("aria-hidden","true"),i.innerHTML=t,document.body.appendChild(i)}).catch(t=>{throw r.delete(e),t});return r.set(e,i),i}}}]);
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.