1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6132],{67432:function(e,s,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/templates/quizTemplatePage",function(){return t(14699)}])},59618:function(e,s,t){"use strict";t.d(s,{x:function(){return c}});var i=t(47842),n=t(52322);t(2784);var l=t(72779),r=t.n(l),a=t(2902);function c(e){var s,t=e.children,l=e.className,c=e.ignorePadding,o=e.ignoreVertical,d=e.borderSizing,u=(0,a.Z)(),$=r()("bg-white border-gray-200 border mb-3 text-passport ".concat(u?"min-w-[280px]":""," "),void 0===d?"rounded-[12px]":d,l,(s={},(0,i.Z)(s,"px-3 sm:px-4 md:px-10",!(void 0!==c&&c)),(0,i.Z)(s,"py-8",!(void 0!==o&&o)),s));return(0,n.jsx)("div",{className:$,children:t})}c.Title=function(e){var s=e.children,t=e.className,i=e.defaultMargin,l=e.textClassName,a=r()(void 0===i?"mb-2":i,t),c=r()(void 0===l?"text-lg text-passport":l);return(0,n.jsx)("div",{className:a,children:(0,n.jsx)("h2",{className:c,children:s})})},c.Subtitle=function(e){var s=e.children,t=e.className,l=void 0===t?"text-sm":t,a=r()((0,i.Z)({},l,l));return(0,n.jsx)("div",{className:"mb-6 text-sm text-passport",children:(0,n.jsx)("p",{className:a,children:s})})},c.Content=function(e){var s=e.children,t=e.className,i=r()("w-full flex flex-grow text-passport",t);return(0,n.jsx)("div",{className:i,children:s})},c.HeadDivider=function(e){var s=e.children,t=e.className,i=r()("flex justify-between pb-5 border-b border-gray-200 text-passport",t);return(0,n.jsx)("div",{className:i,children:s})}},92483:function(e,s,t){"use strict";t.d(s,{k:function(){return r}});var i=t(52322),n=t(18235);t(2784);var l=t(5632);function r(e){var s=e.feature,t=e.isOwner,r=(0,l.useRouter)();return(0,i.jsx)(n.Y,{type:"upgrade",title:"course"==s?"Access Restricted":t?"Youâve reached your plans limit":"Contact the course owner",body:(0,i.jsx)(i.Fragment,{children:"course"==s?(0,i.jsx)("div",{className:"px-16",children:(0,i.jsx)("p",{children:t?"Access to this course is temporarily restricted. Please upgrade your plan to regain access.":"Access to this course is temporarily restricted. Please contact the course owner for further details."})}):(0,i.jsxs)("div",{className:"px-16",children:[(0,i.jsxs)("p",{children:["You've reached the maximum number of",(0,i.jsx)("span",{className:"font-medium mx-1",children:function(e){switch(e){case"students":return"students";case"leaders":return"course leaders";case"activities":return"Assignments and Quizzes";case"courses":return"new courses"}}(s)}),"that can be added to","courses"===s?" your account":" this course",!t&&" based on the course owner's plan"]}),(0,i.jsx)("br",{}),t?(0,i.jsxs)("p",{children:["But don't let that stop you from sharing your knowledge with students.",(0,i.jsx)("a",{href:"/account/billing",className:"underline mx-1 hover:text-teal-600",children:"Upgrade"}),"for higher limits and other great features."]}):(0,i.jsx)("p",{children:"Please contact the course owner to upgrade their plan and increase course limits."})]})}),confirmLabel:"course"!=s||t?"View Plans":"Okay",cancelLabel:"course"!=s||t?"Cancel":null,onConfirm:function(){r.push("/account/billing",void 0,{shallow:!0})}})}},14699:function(e,s,t){"use strict";t.r(s),t.d(s,{default:function(){return A}});var i=t(70865),n=t(96670),l=t(87394),r=t(52322),a=t(2784),c=t(5632),o=t(24330),d=t.n(o),u=t(96577),$=t.n(u),m=t(28879),x=t.n(m),p=t(52789),v=t(78616),h=t(54230),f=t(47614),j=t(59618),g=t(23357),b=t(71191),N=t(19313),y=t(7989),w=t(39708),_=t(54933),C=t(49929),T=t(82056),M=t(34867),k=t(50446),z=t(82066),E=t(5845),Y=t(20444);function A(){var e,s,t=(0,c.useRouter)(),n=(0,l.Z)((0,T.EC)(),1)[0],a=t.query.id,o=(0,f.Xt)().toggle,d=(0,v.Xjx)((0,p.s3)("templates"),{ids:[a.toString()]}),u=d.data,$=d.isLoading;d.isFetching;var m=(0,l.Z)(null!==(s=null==u?void 0:u.quizTemplates)&&void 0!==s?s:[],1)[0],x=(0,y.fe)(),h=x.enrolls.leadingCourses;x.loading;var E=(0,z.useQueryClient)(),A=function(e){E.invalidateQueries("QuizTemplates",{refetchInactive:!0,refetchActive:!0}),t.push("/templates")},P=(0,k.$)({onQuizSuccess:A}),q=P.deleteModalProps;return $?(0,r.jsx)("div",{className:"py-20",children:(0,r.jsx)(Y.I,{})}):(0,r.jsxs)("div",{className:"w-full h-full overflow-scroll",children:[(0,r.jsx)("div",{className:"flex justify-center w-full p-20",children:(0,r.jsxs)(j.x,{className:"w-[70%] max-w-[800px] mb-0 h-auto pt-8",ignorePadding:!0,ignoreVertical:!0,children:[(0,r.jsxs)("div",{className:"px-6",children:[(0,r.jsx)("p",{className:"text-sm text-gray-500 hover:text-gray-700 cursor-pointer font-500",onClick:function(){return t.push("/templates")}
1,children:"< Back to templates"}),(0,r.jsxs)("div",{className:"flex justify-between gap-x-2 mt-2",children:[(0,r.jsxs)("div",{className:"flex gap-x-2 items-center mt-2",children:[(0,r.jsx)(N.p,{className:"w-6 h-6"}),(0,r.jsx)("p",{className:"text-2xl font-medium",children:null==m?void 0:m.title})]}),(0,r.jsxs)("div",{className:"flex gap-x-2 items-center mt-2",children:[(0,r.jsx)(g.zx,{size:"medium",variant:"primary",className:"py-2",type:"button",onClick:function(){var e;return o(!0,(0,r.jsx)(b.D,{originalCourseId:null==m?void 0:null===(e=m.templateInCourse)||void 0===e?void 0:e.id,templateTitle:null==m?void 0:m.title,templateId:parseInt(null==m?void 0:m.id),coursesList:h,setLoad:function(){},isQuiz:!0}))},children:"Use template"}),(0,r.jsx)(r.Fragment,{children:(null==n?void 0:n.id)===(null==m?void 0:null===(e=m.author)||void 0===e?void 0:e.id)&&(0,r.jsxs)(w.v,{as:g.Fe,children:[(0,r.jsx)(w.v.Button,{as:g.zx,variant:"textOnlyDark",size:"medium",className:"gap-x-2",children:(0,r.jsx)(g.zx,{size:"medium",variant:"white",className:"py-2",type:"button",onClick:function(){},children:(0,r.jsx)(C.G,{icon:_.S6C})})}),(0,r.jsx)(w.v.Items,{as:g.s8,css:{mt:"0px"},children:(0,r.jsx)(w.v.Item,{children:function(e){var s=e.active;return(0,r.jsx)(g.E_,{active:s,onClick:P.onClick,children:(0,r.jsx)("div",{className:"flex w-full items-center gap-x-2",children:"Delete template"})})}})})]})})]})]})]}),(0,r.jsx)(I,{template:m})]})}),(0,r.jsx)(M.u_,(0,i.Z)({onConfirm:function(){P.onConfirm(parseInt(null==m?void 0:m.id),"QuizTemplate")},onCancel:P.onCancel,open:P.open,setOpen:function(){return P.setOpen}},q))]})}var I=function(e){var s=e.template,t=[{id:"questions",title:"Questions"},{id:"about",title:"About"},],i=(0,a.useState)(t[0]),n=i[0],l=i[1];return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"flex w-full justify-start items-center gap-x-4 border-b border-gray-200 px-6",children:t.map(function(e){return(0,r.jsx)("div",{onClick:function(){return l(e)},className:"py-4 px-1 text-sm flex items-center gap-x-2 cursor-pointer ".concat(n.id===e.id?"text-teal-600 border-b-2 border-teal-600":"text-gray-500"),children:e.title},e.id)})}),(0,r.jsxs)("div",{className:"w-full h-content",children:["questions"===n.id&&(0,r.jsx)(P,{template:s}),"about"===n.id&&(0,r.jsx)(q,{template:s}),"sources"===n.id&&(0,r.jsx)(L,{template:s})]})]})},P=function(e){var s,t=e.template,l=E.Ti,c=(0,a.useMemo)(function(){return(null==t?void 0:t.instructions)?d()(t.instructions,{allowedTags:d().defaults.allowedTags.concat(["iframe","img","p","span"]),allowedAttributes:(0,n.Z)((0,i.Z)({},d().defaults.allowedAttributes),{iframe:["*"],img:["*"],p:["*"],span:["*"]})}):""},[t]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"px-6 ".concat(c?"py-4":""),dangerouslySetInnerHTML:{__html:c}}),(0,r.jsx)("div",{className:"flex flex-col border border-gray-200 rounded-lg",children:null==t?void 0:null===(s=t.questions)||void 0===s?void 0:s.map(function(e,s){var t,i,n;return(0,r.jsxs)("div",{className:"flex gap-x-3 items-center w-full py-6 px-6 ".concat(s%2==0?"bg-gray-50":"bg-white"),children:[(0,r.jsx)($(),{src:(null===(t=l.find(function(s){return(null==s?void 0:s.blockType)===(null==e?void 0:e.questionType)}))||void 0===t?void 0:t.imgMini)||"",layout:"fixed",width:25,height:25}),(null==e?void 0:e.questionType)!=="fill"?(0,r.jsx)("div",{className:"",dangerouslySetInnerHTML:{__html:null==e?void 0:null===(i=e.content)||void 0===i?void 0:i.statement}}):(0,r.jsx)("div",{className:"",dangerouslySetInnerHTML:{__html:null==e?void 0:null===(n=e.content)||void 0===n?void 0:n.begin}})]},"question_".concat(s))})})]})},q=function(e){var s,t,i,n,l,o=e.template;(0,c.useRouter)();var d=(0,a.useMemo)(function(){return(null==o?void 0:o.visibleTo)===v.EEb.Me?"Just me":(0,h.f)(null==o?void 0:o.visibleTo)},[o]),u=(0,a.useMemo)(function(){return(null==o?void 0:o.copyableBy)===v.EEb.Me?"Just me":(0,h.f)(null==o?void 0:o.copyableBy)},[o]);return(0,r.jsx)(r.Fragment,{children:(0,r.jsxs)("div",{className:"mt-6 px-6 pb-8",children:[(0,r.jsx)("p",{className:"text-lg font-medium",children:"License"}),(0,r.jsxs)("div",{className:"grid grid-cols-8 mt-6",children:[(0,r.jsxs)("div",{className:"col-span-4 flex flex-col",children:[(0,r.jsx)("p",{className:"text-sm text-gray-700 mb-1",children:"Visible To"}),(0,r.jsx)("p",{children:(0,h.f)(d)})]}),(0,r.jsxs)("div",{className:"col-span-4 flex flex-col",children:[(0,r.jsx)("p",{className:"text-sm text-gray-700 mb-1",children:"Copyable by"}),(0,r.jsx)("p",{children:(0,h.f)(u)})]})]}),(0,r.jsxs)("div",{className:"grid grid-cols-8 mt-6",children:[(0,r.jsxs)("div",{className:"col-span-4 flex flex-col",children:[(0,r.jsx)("p",{className:"text-sm text-gray-700 mb-1",children:"Date created"}),(0,r.jsx)("p",{children:x()(null==o?void 0:o.createdAt).format("MMMM D, YYYY")})]}),(0,r.jsxs)("div",{className:"col-span-4 flex flex-col",children:[(0,r.jsx)("p",{className:"text-sm text-gray-700 mb-1",children:"Updated"}),(0,r.jsx)("p",{children:x()(null==o?void 0:o.createdAt).format("MMMM D, YYYY")})]})]}),(0,r.jsx)("div",{className:"grid grid-cols-8 mt-6",children:(0,r.jsxs)("div",{className:"col-span-4 flex flex-col",children:[(0,r.jsx)("p",{className:"text-sm text-gray-700 mb-1",children:"Created by"}),(0,r.jsxs)("div",{className:"flex gap-x-2 items-center text-gray-700",children:[(0,r.jsx)(g.dd,{initials:null==o?void 0:null===(s=o.author)||void 0===s?void 0:s.initials,calendarColor:null==o?void 0:null===(t=o.author)||void 0===t?void 0:t.calendarColor,imageUrl:null==o?void 0:null===(i=o.author)||void 0===i?void 0:null===(n=i.imageFileEntry)||void 0===n?void 0:n.url,size:"medium"}),null==o?void 0:null===(l=o.author)||void 0===l?void 0:l.fullName]})]})})]})})},L=function(e){return e.template,(0,r.jsx)("div",{})};A.useDefault=!0},70764:function(){},45158:function(){},58635:function(){},30139:function(){}},function(e){e.O(0,[4330,5423,9774,2888,179],function(){return e(e.s=67432)}),_N_E=e.O()}]); 2//# sourceMappingURL=quizTemplatePage-d9d610dfef8a1295.js.map
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.