This repository was archived by the owner on Sep 17, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path2154.c25cd7af.chunk.js
1 lines (1 loc) · 7.16 KB
/
2154.c25cd7af.chunk.js
1
"use strict";(self.webpackChunkacellus=self.webpackChunkacellus||[]).push([[2154],{44505:function(t,e,r){r.d(e,{r:function(){return c}});var a,n=r(47313),i=["title","titleId"];function o(){return o=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},o.apply(this,arguments)}function s(t,e){if(null==t)return{};var r,a,n=function(t,e){if(null==t)return{};var r,a,n={},i=Object.keys(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)>=0||(n[r]=t[r]);return n}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)r=i[a],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function l(t,e){var r=t.title,l=t.titleId,c=s(t,i);return n.createElement("svg",o({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",className:"w-6 h-6",ref:e,"aria-labelledby":l},c),r?n.createElement("title",{id:l},r):null,a||(a=n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"})))}var c=n.forwardRef(l);r.p},39592:function(t,e,r){r.r(e),r.d(e,{default:function(){return B}});var a,n=r(30168),i=r(74165),o=r(1413),s=r(15861),l=r(29439),c=r(30686),u=r(43681),d=r(47313),w=r(2135),p=r(58467),h=r(40290),v=r(18492),x=r(37600),f=r(77533),m=r(41387),b=r(2727),y=r(52474),g=r(70829),k=r(4496),j=r(3874),Z=r(53086),P=r(69293),Y=r(43370),C=r(99717),O=r(54041),I=r(46417),S="H";function B(){var t=(0,d.useState)({}),e=(0,l.Z)(t,2),r=e[0],a=e[1],n=(0,w.useSearchParams)(),i=(0,l.Z)(n,1)[0].get("acellusID");return(0,d.useEffect)((function(){if(i){var t=new AbortController;h.Z.get(i,t.signal).then(a)}}),[i]),(0,I.jsx)(M,{darkMode:!1,children:(0,I.jsxs)(O.SchoolLevelContext.Provider,{value:S,children:[(0,I.jsx)(C.nz,{schoolLevel:S}),(0,I.jsx)(b.G1,{children:(0,I.jsx)(D,{student:r,acellusID:i})})]})})}function D(t){var e=t.student,r=t.acellusID,a=(0,p.TH)(),n=a.pathname,l=a.search,c=a.state,u=(0,P.Z)(),w=(0,p.s0)(),h=(0,d.useContext)(b.ZP),x=h.currentBook,f=h.currentStep,g=h.dispatch,Y=h.libraryData;return(0,d.useEffect)((function(){if(null!==c&&void 0!==c&&c.libraryID){var t=function(){var t=(0,s.Z)((0,i.Z)().mark((function t(){var a,n,s,d,p;return(0,i.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,Promise.all([v.Z.getLibraryBook(c.libraryID,r,e.signal),v.Z.getPersonalLibraryData(r,e.signal)]);case 3:a=t.sent,w(l,{replace:!0}),n=a[0],s=a[1],d=s.items.find((function(t){return t.id===c.libraryID})),g({type:m.Vr,payload:(0,o.Z)((0,o.Z)({},d),n)}),p=(0,y.gh)(u,n.theme),g({type:m.Wt,payload:p}),g({type:m.QF,payload:b.bn}),t.next=17;break;case 14:t.prev=14,t.t0=t.catch(0),"Not Found"===t.t0.message&&(w(l,{replace:!0}),g({type:m.QF,payload:b.YP}),toast.error("This book could not be found"));case 17:case"end":return t.stop()}}),t,null,[[0,14]])})));return function(){return t.apply(this,arguments)}}(),e=new AbortController;return t(),function(){return e.abort()}}}),[c,g,Y,r,w,l,u]),(0,I.jsx)(I.Fragment,{children:f===b.YP?(0,I.jsx)(F,{title:"".concat(e.firstName,"'s Books"),onBack:function(){return w(n)},children:(0,I.jsx)(Z.Z,{})}):f===b.hZ?(0,I.jsx)(F,{onBack:function(){return g({type:m.QF,payload:b.YP})},children:(0,I.jsx)(j.Z,{})}):f===b.bn?(0,I.jsx)(F,{title:x.title,onBack:function(){return g({type:m.QF,payload:b.YP})},children:(0,I.jsx)(k.Z,{})}):(0,I.jsx)(F,{title:x.title,onBack:function(){},children:(0,I.jsx)(W,{})})})}function F(t){var e=t.children,r=t.title,a=t.onBack,n=(0,d.useContext)(b.ZP).currentStep,i=(0,p.TH)().pathname,o=(0,p.s0)();return(0,I.jsxs)(z,{children:[a&&(n===b.bn||n===b.YP)&&(0,I.jsx)(L,{onClick:a,"aria-label":"Go back","data-tooltip":"title",children:(0,I.jsx)(G,{})}),(n===b.bn||n===b.YP)&&(0,I.jsx)(H,{onClick:function(){o(i)},"aria-label":"Close Modal","data-tooltip":"title",children:(0,I.jsx)(Q,{})}),(0,I.jsx)(T,{children:(0,I.jsx)(X,{children:r})}),(0,I.jsx)(E,{children:e})]})}function W(){var t=(0,d.useState)(!1),e=(0,l.Z)(t,2),r=e[0],a=e[1];(0,d.useEffect)((function(){a(!0)}),[]);return(0,I.jsx)(A,{show:r,children:(0,I.jsx)(g.Z,{back:function(t){a(!1),setTimeout(t,500)}})})}var z=u.Z.div({position:"relative",height:"100%",width:"100%"}),T=u.Z.div({display:"flex",alignItems:"center",justifyContent:"center",gap:"0.75rem",paddingTop:"1.5rem",paddingBottom:"1.5rem"}),X=u.Z.h1({maxWidth:"24rem",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textAlign:"center",fontWeight:"700","@media (min-width: 768px)":{maxWidth:"36rem"},"@media (min-width: 1024px)":{maxWidth:"48rem"},"@media (min-width: 1280px)":{maxWidth:"90rem"}}),E=u.Z.div({display:"flex",justifyContent:"center"}),L=u.Z.button({position:"absolute",left:"1.5rem",top:"1.5rem",zIndex:"51"}),G=(0,u.Z)(x.r)({height:"2.25rem",width:"2.25rem",strokeWidth:"2px","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))","--tw-drop-shadow":"drop-shadow(0 10px 8px rgb(0 0 0 / 0.04)) drop-shadow(0 4px 3px rgb(0 0 0 / 0.1))",filter:"var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"300ms",":hover":{"--tw-scale-x":"1.1","--tw-scale-y":"1.1",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))"}}),H=u.Z.button({position:"absolute",right:"1.5rem",top:"1.5rem",zIndex:"50",display:"none","@media (min-width: 640px)":{display:"block"}}),Q=(0,u.Z)(f.r)({height:"2.25rem",width:"2.25rem",strokeWidth:"2px","--tw-text-opacity":"1",color:"rgb(107 114 128 / var(--tw-text-opacity))",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"300ms",":hover":{"--tw-scale-x":"1.1","--tw-scale-y":"1.1",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))"}}),A=u.Z.div((function(t){return[{position:"fixed",inset:"0px",transitionProperty:"all",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"},t.show?{"--tw-translate-x":"0px",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))"}:{"--tw-translate-x":"100%",transform:"translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))"}]})),M=u.Z.div((function(){return[{position:"relative",height:"100%",width:"100%",overflowY:"auto"},{backgroundSize:"cover","::before":{content:"var(--tw-content)",position:"absolute",height:"100%",width:"100%",backgroundRepeat:"repeat","--tw-content":"''",backgroundSize:"400px 400px;"}},(0,c.iv)(a||(a=(0,n.Z)(["\n &::before {\n background-image: url(",");\n }, \n background-image: url(",");\n "])),Y.HSCircuitGridLight,Y.lightBG)]}))}}]);