PageSourceSearch

https://www.heysaya.ai/_next/static/chunks/pages/quizzes/new-742a5bd9e8b125b5.js

js heysaya.ai collected 2026-09-24 13:38:15 UTC 30,933 bytes, 5 lines download raw bytes

1!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="d0bdb9fb-e3ea-4fca-9fc1-2343bb13500a",e._sentryDebugIdIdentifier="sentry-dbid-d0bdb9fb-e3ea-4fca-9fc1-2343bb13500a")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2304],{1792:(e,t,s)=>{"use strict";s.d(t,{A:()=>l});var a=s(37876),r=s(71028),n=s(97685),i=s(25879),o=s(37451);let l=({quiz:e,isOpen:t,onCancel:s,onConfirm:l})=>e?(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(o.lG,{open:t,onClose:s,className:"z-60","data-sentry-element":"Dialog","data-sentry-source-file":"QuizShareModal.tsx",children:[e.is_shared?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(o.L3,{children:e.title}),(0,a.jsxs)(o.rr,{children:["Shared link for `",e.title,"`"]}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 w-full bg-stone-100 p-1 rounded-md mt-4",children:[(0,a.jsx)("div",{className:"p-2 bg-white rounded-md overflow-hidden overflow-x-auto scrollbar-hide",children:(0,a.jsx)("p",{className:"text-stone-800 text-sm",children:`https://www.summarizely.app//shared/quizzes/${e.id}`})}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-stone-500 text-sm ml-2 hover:underline cursor-pointer",onClick:()=>{navigator.clipboard.writeText(`https://www.summarizely.app//shared/quizzes/${e.id}`),n.oR.success("Link copied to clipboard!")},children:[(0,a.jsx)(r.A,{width:12,height:12}),"Copy Link"]})]})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(o.L3,{children:["Share `",e.title,"` with others"]}),(0,a.jsx)(o.rr,{children:"Are you sure you want to share this quiz with others?"})]}),(0,a.jsxs)(o.ii,{"data-sentry-element":"DialogActions","data-sentry-source-file":"QuizShareModal.tsx",children:[(0,a.jsx)(i.$,{plain:!0,onClick:s,"data-sentry-element":"Button","data-sentry-source-file":"QuizShareModal.tsx",children:"Close"}),!e.is_shared&&(0,a.jsx)(i.$,{onClick:l,children:"Share"})]})]})}):null},9399:(e,t,s)=>{"use strict";s.r(t),s.d(t,{default:()=>X});var a=s(37876),r=s(14232),n=s(67914),i=s(62478),o=s(89099),l=s(97685),c=s(46706),d=s(14850),h=s(70291),u=s(29318),m=s(42418),g=s(70864),w=s(90887),x=s(16570),f=s(88959),p=s(49995),b=s(11721),y=s(8828),j=s(53422),z=s(54587),k=s.n(z),C=s(15202),v=s(29048),N=s(82381),Q=s(67768),q=s(44406),A=s(59043),S=s(66684),_=s(92499),F=s(1792),I=s(64056),D=s(69527),M=s(58655),T=s(15658),E=s(38444);function H({quizId:e}){let t=(0,o.useRouter)(),{data:s,isLoading:d,error:h,refetch:u}=(0,n.I)({queryKey:["quizResults",e],queryFn:()=>(0,c.yZ)(e),enabled:!!e,refetchInterval:e=>e.state.data?.status!=="completed"&&5e3}),[m,g]=(0,r.useState)(!1),[w,x]=(0,r.useState)(!1),f=(0,i.n)({mutationFn:c.VY,onError:e=>{console.error(e)}});(0,r.useEffect)(()=>{e&&u()},[e,u]);let p=s?.format,b=(0,r.useMemo)(()=>p===q.YM&&s?.status==="completed"?s.mcq_quiz_content.map((e,t)=>(0,a.jsx)(R,{quiz:e,shouldShowAnswer:m},t)):p===q.r3&&s?.status==="completed"?s.short_answer_quiz_content.map((e,t)=>(0,a.jsx)(L,{quiz:e,shouldShowAnswer:m},t)):null,[p,s,m]);return e?d?(0,a.jsxs)("div",{className:"text-center",children:[(0,a.jsx)(E.A,{}),(0,a.jsx)("p",{className:"mt-4 text-lg font-medium",children:"Using advanced models. This can take up to 1 minute to complete."})]}):h?(0,a.jsx)("div",{children:"Error loading quiz results"}):s?.status==="completed"?(0,a.jsxs)("div",{children:[(0,a.jsx)(F.A,{quiz:s,isOpen:w,onCancel:()=>x(!1),onConfirm:()=>{l.oR.promise(f.mutateAsync(e,{onSuccess:()=>{u()}}),{loading:"Sharing...",success:"Quiz shared successfully",error:"Failed to share quiz"})}}),(0,a.jsxs)("div",{className:"mx-4 flex items-center justify-between",children:[(0,a.jsx)("div",{className:"flex items-center",children:(0,a.jsxs)(M.by,{className:"cursor-pointer",children:[(0,a.jsx)(M.dO,{name:"show-answers",defaultChecked:!1,checked:m,className:"cursor-pointer",color:"green",onChange:()=>g(!m)}),(0,a.jsx)(D.JU,{className:"font-medium",children:"Show Answers"})]})}),(0,a.jsxs)(I.ms,{children:[(0,a.jsx)(I.gf,{outline:!0,className:"p-0 h-10 w-10",children:(0,a.jsx)(A.A,{})}),(0,a.jsxs)(I.rI,{children:[(0,a.jsxs)(I.tJ,{className:"gap-2",onClick:()=>t.push(`/quizzes/${e}`),children:[(0,a.jsx)(S.A,{width:16,height:16}),"View Quiz"]}),(0,a.jsxs)(I.tJ,{className:"gap-2",onClick:()=>x(!0),children:[(0,a.jsx)(_.A,{width:16,height:16}),"Share Quiz"]})]})]})]}),b]}):(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center text-center","data-sentry-component":"QuizResults","data-sentry-source-file":"QuizResults.tsx",children:[(0,a.jsx)($,{"data-sentry-element":"LilSpinner","data-sentry-source-file":"QuizResults.tsx"}),(0,a.jsxs)("p",{className:"text-lg font-medium",children:["Quiz is being generated using advanced models.",(0,a.jsx)("br",{}),"This can take up to a minute to complete."]})]}):null}let R=(0,r.memo)(({quiz:e,shouldShowAnswer:t})=>(0,a.jsxs)(Y,{className:"p-4",children:[(0,a.jsx)(T.OH,{className:"",children:e.question}),(0,a.jsx)("div",{className:"mt-2",children:e.options.map((s,r)=>(0,a.jsx)("div",{className:"mt-2 flex items-start",children:(0,a.jsxs)(T.EY,{children:[(0,a.jsxs)("span",{className:`mr-2 font-bold ${t&&s===e.answer?"text-green-600":""}`,children:[String.fromCharCode(65+r),"."]}
1),(0,a.jsx)("span",{className:t&&s===e.answer?"font-bold text-green-600":"",children:s})]})},s))})]}));R.displayName="MCQQuizCard";let L=(0,r.memo)(({quiz:e,shouldShowAnswer:t})=>{let[s,n]=(0,r.useState)(t);return(0,r.useEffect)(()=>{n(t)},[t]),(0,a.jsxs)(Y,{className:"p-4",children:[(0,a.jsx)("div",{children:(0,a.jsx)(T.OH,{className:"text-lg",children:e.question})}),s?(0,a.jsxs)("div",{className:"mt-1",children:[(0,a.jsxs)(T.EY,{className:"mb-2 font-medium text-zinc-900",children:[(0,a.jsx)("span",{className:"",children:"Answer:"})," ",e.answer]}),(0,a.jsx)(T.EY,{className:"mt-2 text-zinc-800",children:(0,a.jsxs)("i",{children:[(0,a.jsx)("span",{className:"",children:"Explanation:"})," ",e.explanation]})})]}):(0,a.jsx)("button",{className:"mt-2 text-blue-500 underline",onClick:()=>n(!0),children:"Show answer >"})]})});L.displayName="ShortAnswerQuizCard";let Y=(0,r.memo)(({children:e,className:t})=>(0,a.jsx)("div",{className:(0,p.A)("grid h-full w-full place-items-start justify-items-center overflow-hidden","max-w-full sm:max-w-3xl",t),children:(0,a.jsx)("div",{className:"w-full space-y-6 rounded-lg bg-[#F7F8FD] p-4 shadow-md sm:space-y-8 sm:p-6 dark:bg-zinc-800",children:e})}));Y.displayName="Card";let $=()=>(0,a.jsxs)("svg",{className:"h-12 w-12 animate-spin text-violet-400",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","data-sentry-element":"svg","data-sentry-component":"LilSpinner","data-sentry-source-file":"QuizResults.tsx",children:[(0,a.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4","data-sentry-element":"circle","data-sentry-source-file":"QuizResults.tsx"}),(0,a.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z","data-sentry-element":"path","data-sentry-source-file":"QuizResults.tsx"})]});var B=s(25879),O=s(30862),G=s(52437),J=s(80345);let K=`Near a great forest there lived a poor woodcutter with his wife and his two children. The boy was called Hansel and the girl Gretel. He had little to bite and to break, and once when great dearth fell on the land, he could no longer procure even daily bread. Now when he thought over this by night in his bed, and tossed about in his anxiety, he groaned and said to his wife:
2
3"What is to become of us? How are we to feed our poor children, when we no longer have anything even for ourselves?"
4
5"I'll tell you what, husband," answered the woman, "early tomorrow morning we will take the children out into the forest to where it is the thickest; there we will light a fire for them, and give each of them one more piece of bread, then we will go to our work and leave them alone. They will not find the way home again, and we shall be rid of them."`;function P(){let e,t=(0,o.useRouter)(),{data:s=[],isLoading:l,error:u}=(0,n.I)({queryFn:d.qu,queryKey:[v.B.allSummaries],select:e=>e.filter(e=>e.status===q.sR||e.status===q.LJ)}),[z,A]=(0,r.useState)(null),{data:S}=(0,n.I)({queryKey:["quizResults",z],queryFn:()=>(0,c.yZ)(z),enabled:!!z,refetchInterval:e=>e.state.data?.status!=="completed"&&5e3}),[_,F]=(0,r.useState)(""),[I,M]=(0,r.useState)(""),[T,R]=(0,r.useState)(0),[L,Y]=(0,r.useState)(!1),[$,P]=(0,r.useState)({format:q.YM}),[W,X]=(0,r.useState)(null),[Z,ee]=(0,r.useState)(null),et=s.filter(e=>e.title.toLowerCase().includes(_.toLowerCase())),es=(e=(0,Q.jE)(),(0,i.n)({mutationFn:c.wn,onSuccess:()=>{e.invalidateQueries({queryKey:["quizzes"]})},onError:e=>{console.error("Error creating quiz:",e)}}));return l?(0,a.jsx)("div",{children:"Loading..."}):u?(0,a.jsx)("div",{children:"Error loading summaries"}):(0,a.jsxs)("div",{className:"grid grid-cols-1 gap-6 mt-6 md:grid-cols-2 w-full","data-sentry-component":"ChooseQuizContent","data-sentry-source-file":"ChooseQuizContent.tsx",children:[(0,a.jsxs)(U,{className:"max-w-3xl","data-sentry-element":"Card","data-sentry-source-file":"ChooseQuizContent.tsx",children:[(0,a.jsx)(h.D,{"data-sentry-element":"Heading","data-sentry-source-file":"ChooseQuizContent.tsx",children:"Choose your Quiz Type"}),(0,a.jsxs)("div",{className:"flex flex-wrap gap-2 mb-4",children:[(0,a.jsx)(V,{icon:b.A,label:"MCQ Quiz",isSelected:Z===q.YM,onClick:()=>ee(q.YM),"data-sentry-element":"BubbleButton","data-sentry-source-file":"ChooseQuizContent.tsx"}),(0,a.jsx)(V,{icon:y.A,label:"Short Answer Quiz",isSelected:Z===q.r3,onClick:()=>ee(q.r3),"data-sentry-element":"BubbleButton","data-sentry-source-file":"ChooseQuizContent.tsx"})]}),(0,a.jsx)("div",{className:"pt-2",children:(0,a.jsx)(h.R,{level:1,"data-sentry-element":"Subheading","data-sentry-source-file":"ChooseQuizContent.tsx",children:"Choose Your Content"})}),(0,a.jsxs)(m.fu,{onChange:e=>{R(e),X(null)},"data-sentry-element":"TabGroup","data-sentry-source-file":"ChooseQuizContent.tsx",children:[(0,a.jsxs)(m.wb,{className:"flex p-1 space-x-1 bg-gray-100 rounded-xl","data-sentry-element":"TabList","data-sentry-source-file":"ChooseQuizContent.tsx",children:[(0,a.jsx)(m.oz,{className:({selected:e})=>(0,p.A)("w-full rounded-lg py-1 text-sm font-medium leading-5 text-gray-700","ring-white ring-opacity-60 ring-offset-2 ring-offset-blue-400 focus:outline-none focus:ring-2",e?"bg-white shadow":"text-gray-500 hover:bg-white/[0.12] hover:text-gray-700"),"data-sentry-element":"Tab","data-sentry-source-file":"ChooseQuizContent.tsx",children:"My Files"}),(0,a.jsx)(m.oz,{className:({selected:e})=>(0,p.A)("w-full rounded-lg py-1 text-sm font-medium leading-5 text-gray-700","ring-white ring-opacity-60 ring-offset-2 ring-offset-blue-400 focus:outline-none focus:ring-2",e?"bg-white shadow":"text-gray-500 hover:bg-white/[0.12] hover:text-gray-700"),"data-sentry-element":"Tab","data-sentry-source-file":"ChooseQuizContent.tsx",children:"Add Source"})]}),(0,a.jsxs)(m.T2,{"data-sentry-element":"TabPanels","data-sentry-source-file":"ChooseQuizContent.tsx",children:[(0,a.jsxs)(m.Kp,{className:"bg-white my-4 p-2 rounded-lg border border-stone-300","data-sentry-element":"TabPanel","data-sentry-source-file":"ChooseQuizContent.tsx",children:[(0,a.jsx)(g.D,{className:"mb-4","data-sentry-element":"Field","data-sentry-source-file":"ChooseQuizContent.tsx",children:(0,a.jsxs)(G.M,{className:"w-full max-w-md","data-sentry-element":"InputGroup","data-sentry-source-file":"ChooseQuizContent.tsx",children:[(0,a.jsx)(w.A,{className:"w-5 h-5 text-gray-400","data-sentry-element":"MagnifyingGlassIcon","data-sentry-source-file":"ChooseQuizContent.tsx"}),(0,a.jsx)(G.p,{name:"search",placeholder:"Search your files...",value:_,onCh
5ange:e=>F(e.target.value),"data-sentry-element":"Input","data-sentry-source-file":"ChooseQuizContent.tsx"})]})}),0===et.length&&(0,a.jsx)("div",{className:"text-gray-500 text-sm",children:"No files found."}),(0,a.jsx)("ul",{className:"space-y-4",children:et.slice(0,5).map(e=>(0,a.jsxs)("li",{onClick:()=>X(e),className:(0,p.A)("flex cursor-pointer flex-row items-center space-x-4 rounded-lg bg-white p-4 shadow",W?.id===e.id?"ring-2 ring-indigo-500":"hover:bg-gray-50"),children:[(0,a.jsx)(k(),{src:(0,N.D)(e.type),alt:"document icon",width:24,height:24,className:"w-6 h-6 2048:h-8 2048:w-8"}),(0,a.jsxs)("div",{className:"flex flex-row items-center justify-between flex-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium text-gray-900 line-clamp-1",children:e.title}),(0,a.jsx)(C.A,{format:"MMM Do, YYYY",className:"text-xs text-gray-500",children:e.created_at})]})]},e.id))})]}),(0,a.jsx)(m.Kp,{"data-sentry-element":"TabPanel","data-sentry-source-file":"ChooseQuizContent.tsx",children:(0,a.jsx)(g.D,{className:"my-4","data-sentry-element":"Field","data-sentry-source-file":"ChooseQuizContent.tsx",children:(0,a.jsx)(G.M,{className:"w-full max-w-md","data-sentry-element":"InputGroup","data-sentry-source-file":"ChooseQuizContent.tsx",children:(0,a.jsx)(J.T,{name:"source",placeholder:K,value:I,onChange:e=>M(e.target.value),rows:15,"data-sentry-element":"Textarea","data-sentry-source-file":"ChooseQuizContent.tsx"})})})})]})]}),(0,a.jsxs)("div",{className:"mt-4",children:[(0,a.jsxs)("button",{onClick:()=>Y(!L),className:"flex items-center gap-2 text-sm font-medium text-gray-700",children:["Options",L?(0,a.jsx)(x.A,{className:"w-5 h-5 transition-transform duration-300"}):(0,a.jsx)(f.A,{className:"w-5 h-5 transition-transform duration-300"})]}),(0,a.jsx)("div",{className:(0,p.A)("overflow-hidden transition-all duration-300",L?"max-h-screen opacity-100":"max-h-0 opacity-0"),children:(0,a.jsxs)(D.LB,{className:"mt-4","data-sentry-element":"Fieldset","data-sentry-source-file":"ChooseQuizContent.tsx",children:[(0,a.jsxs)(D.M_,{"data-sentry-element":"FieldGroup","data-sentry-source-file":"ChooseQuizContent.tsx",children:[(0,a.jsxs)(g.D,{"data-sentry-element":"Field","data-sentry-source-file":"ChooseQuizContent.tsx",children:[(0,a.jsx)(D.JU,{"data-sentry-element":"Label","data-sentry-source-file":"ChooseQuizContent.tsx",children:"Number of questions"}),(0,a.jsx)(G.p,{type:"number",value:$.num_questions??5,onChange:e=>{let t=Math.max(1,Math.min(50,parseInt(e.target.value,10)||5));P({...$,num_questions:t})},"data-sentry-element":"Input","data-sentry-source-file":"ChooseQuizContent.tsx"})]}),(0,a.jsxs)(g.D,{"data-sentry-element":"Field","data-sentry-source-file":"ChooseQuizContent.tsx",children:[(0,a.jsx)(D.JU,{"data-sentry-element":"Label","data-sentry-source-file":"ChooseQuizContent.tsx",children:"Custom Instructions"}),(0,a.jsx)(G.p,{type:"text",placeholder:'ex. "Focus on the first section..."',value:$.custom_instructions||"",onChange:e=>P({...$,custom_instructions:e.target.value}),"data-sentry-element":"Input","data-sentry-source-file":"ChooseQuizContent.tsx"})]})]}),(0,a.jsx)(O.c,{"data-sentry-element":"Divider","data-sentry-source-file":"ChooseQuizContent.tsx"})]})})]}),(0,a.jsx)("div",{className:"mt-4",children:S?.status!==q.zW?(0,a.jsx)(B.$,{color:"indigo",className:"w-full",disabled:!!z||!Z,onClick:()=>{let e={...$,num_questions:$.num_questions||5,format:Z};if(0===T&&W)e={...e,doc_id:W.id,input_content:void 0};else{if(1!==T||!I)return void console.error("Invalid quiz creation state");e={...e,input_content:I,doc_id:void 0}}es.mutate(e,{onSuccess:e=>{A(e.id)}})},children:z?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(E.A,{className:"w-4 h-4"}),"Loading..."]}):(0,a.jsxs)(a.Fragment,{children:["Create",(0,a.jsx)(j.A,{className:"w-4 h-4"})]})}):(0,a.jsx)(B.$,{onClick:()=>t.push(`/quizzes/${z}`),color:"indigo",className:"w-full",children:"View Quiz"})})]}),(0,a.jsx)("div",{className:"p-4 bg-white rounded-lg shadow",children:z?(0,a.jsx)(H,{quizId:z}):(0,a.jsx)("div",{className:"text-center text-gray-500",children:(0,a.jsx)("i",{children:"Create a quiz to see results here"})})})]})}let U=({children:e,className:t})=>(0,a.jsx)("div",{className:(0,p.A)("grid h-full w-full place-items-start justify-items-center overflow-hidden","max-w-full sm:max-w-3xl",t),"data-sentry-component":"Card","data-sentry-source-file":"ChooseQuizContent.tsx",children:(0,a.jsx)("div",{className:"w-full space-y-6 rounded-lg bg-[#F7F8FD] p-4 shadow-lg sm:space-y-8 sm:p-6 dar
5k:bg-zinc-800",children:e})}),V=({icon:e,label:t,isSelected:s,onClick:r})=>(0,a.jsxs)("button",{onClick:r,className:(0,p.A)("flex cursor-pointer items-center gap-2 rounded-full border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 active:bg-gray-200",s&&"bg-gray-100 ring-2 ring-indigo-500"),"data-sentry-component":"BubbleButton","data-sentry-source-file":"ChooseQuizContent.tsx",children:[(0,a.jsx)(e,{className:"w-5 h-5","data-sentry-element":"Icon","data-sentry-source-file":"ChooseQuizContent.tsx"}),t]}),W=()=>{(0,o.useRouter)();let{data:e}=(0,n.I)({queryFn:d.qu,queryKey:[v.B.allSummaries]}),[t,s]=(0,r.useState)(null),[u,m]=(0,r.useState)({format:"mcq",num_questions:3});return(0,i.n)({mutationFn:c.wn,onError:e=>{l.Ay.error("Error creating quiz!"),console.error(e)}}),(0,a.jsxs)("section",{className:"mx-auto flex max-w-screen-lg flex-col p-2","data-sentry-component":"NewQuizPage","data-sentry-source-file":"index.tsx",children:[(0,a.jsx)("div",{className:"mb-2 flex items-end justify-between gap-4",children:(0,a.jsx)(h.D,{"data-sentry-element":"Heading","data-sentry-source-file":"index.tsx",children:"Create New Quiz"})}),(0,a.jsx)(h.R,{className:"max-w-xl text-gray-500",level:1,"data-sentry-element":"Subheading","data-sentry-source-file":"index.tsx",children:"Generate Quizzes from Your Sources"}),(0,a.jsx)("div",{className:"flex w-full justify-center",children:(0,a.jsx)(P,{"data-sentry-element":"ChooseQuizContent","data-sentry-source-file":"index.tsx"})})]})},X=W;W.getLayout=e=>(0,a.jsx)(u.A,{children:(0,a.jsx)("div",{className:"mt-6 overflow-y-auto pb-10",children:e})})},30862:(e,t,s)=>{"use strict";s.d(t,{c:()=>n});var a=s(37876),r=s(49995);function n({soft:e=!1,className:t,...s}){return(0,a.jsx)("hr",{role:"presentation",...s,className:(0,r.A)(t,"w-full border-t",e&&"border-zinc-950/5 dark:border-white/5",!e&&"border-zinc-950/10 dark:border-white/10"),"data-sentry-component":"Divider","data-sentry-source-file":"divider.tsx"})}},32761:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/quizzes/new",function(){return s(9399)}])},46706:(e,t,s)=>{"use strict";s.d(t,{VY:()=>o,qY:()=>i,wn:()=>r,yZ:()=>n});var a=s(7675);let r=async e=>(await a.Ay.post("/quiz",e)).data,n=async e=>(await a.Ay.get(`/quiz/${e}`)).data,i=async()=>(await a.Ay.get("/quizzes")).data,o=async e=>(await a.Ay.patch(`/quiz/${e}/share`)).data},58655:(e,t,s)=>{"use strict";s.d(t,{by:()=>o,dO:()=>c});var a=s(37876),r=s(70864),n=s(23158),i=s(49995);function o({className:e,...t}){return(0,a.jsx)(r.D,{"data-slot":"field",...t,className:(0,i.A)(e,"grid grid-cols-[1fr_auto] items-center gap-x-8 gap-y-1 sm:grid-cols-[1fr_auto]","[&>[data-slot=control]]:col-start-2 [&>[data-slot=control]]:self-center","[&>[data-slot=label]]:col-start-1 [&>[data-slot=label]]:row-start-1 [&>[data-slot=label]]:justify-self-start","[&>[data-slot=description]]:col-start-1 [&>[data-slot=description]]:row-start-2","[&_[data-slot=label]]:has-[[data-slot=description]]:font-medium"),"data-sentry-element":"Headless.Field","data-sentry-component":"SwitchField","data-sentry-source-file":"switch.tsx"})}let l={"dark/zinc":["[--switch-bg-ring:theme(colors.zinc.950/90%)] [--switch-bg:theme(colors.zinc.900)] dark:[--switch-bg-ring:transparent] dark:[--switch-bg:theme(colors.white/25%)]","[--switch-ring:theme(colors.zinc.950/90%)] [--switch-shadow:theme(colors.black/10%)] [--switch:white] dark:[--switch-ring:theme(colors.zinc.700/90%)]"],"dark/white":["[--switch-bg-ring:theme(colors.zinc.950/90%)] [--switch-bg:theme(colors.zinc.900)] dark:[--switch-bg-ring:transparent] dark:[--switch-bg:theme(colors.white)]","[--switch-ring:theme(colors.zinc.950/90%)] [--switch-shadow:theme(colors.black/10%)] [--switch:white] dark:[--switch-ring:transparent] dark:[--switch:theme(colors.zinc.900)]"],dark:["[--switch-bg-ring:theme(colors.zinc.950/90%)] [--switch-bg:theme(colors.zinc.900)] dark:[--switch-bg-ring:theme(colors.white/15%)]","[--switch-ring:theme(colors.zinc.950/90%)] [--switch-shadow:theme(colors.black/10%)] [--switch:white]"],zinc:["[--switch-bg-ring:theme(colors.zinc.700/90%)] [--switch-bg:theme(colors.zinc.600)] dark:[--switch-bg-ring:transparent]","[--switch-shadow:theme(colors.black/10%)] [--switch:white] [--switch-ring:theme(colors.zinc.700/90%)]"],white:["[--switch-bg-ring:theme(colors.black/15%)] [--switch-bg:white] dark:[--switch-bg-ring:transparent]","[--switch-shadow:theme(colors.black/10%)] [--switch-ring:transparent] [--switch:theme(colors.zinc.950)]"],red:["[--switch-bg-ring:theme(colors.red.700/90%)] [--switch-bg:theme(colors.red.600)] dark:[--switch-bg-ring:transparent]","[--switch:white] [--switch-ring:theme(colors.red.700/90%)] [--switch-shadow:theme(colors.red.900/20%)]"],orange:["[--switch-bg-ring:theme(colors.orange.600/90%)] [--switch-bg:theme(colors.orange.500)] dark:[--switch-bg-ring:transparent]","[--switch:white] [--switch-ring:theme(colors.orange.600/90%)] [--switch-shadow:theme(colors.orange.900/20%)]"],amber:["[--switch-bg-ring:theme(colors.amber.500/80%)] [--switch-bg:theme(colors.amber.400)] dark:[--switch-bg-ring:transparent]","[--switch-ring:transparent] [--switch-shadow:transparent] [--switch:theme(colors.amber.950)]"],yellow:["[--switch-bg-ring:theme(colors.yellow.400/80%)] [--switch-bg:theme(colors.yellow.300)] dark:[--switch-bg-ring:transparent]","[--switch-ring:transparent] [--switch-shadow:transparent] [--switch:theme(colors.yellow.950)]"],lime:["[--switch-bg-ring:theme(colors.lime.400/80%)] [--switch-bg:theme(colors.lime.300)] dark:[--switch-bg-ring:transparent]","[--switch-ring:transparent] [--switch-shadow:transparent] [--switch:theme(colors.lime.950)]"],green:["[--switch-bg-ring:theme(colors.green.700/90%)] [--switch-bg:theme(colors.green.600)] dark:[--switch-bg-ring:transparent]","[--switch:white] [--switch-ring:theme(colors.green.700/90%)] [--switch-shadow:theme(colors.green.900/20%)]"],emerald:["[--switch-bg-ring:theme(colors.emerald.600/90%)] [--switch-bg:theme(colors.emerald.500)] dark:[--switch-bg-ring:transparent]","[--switch:white] [--switch-ring:theme(colors.emerald.600/90%)] [--switch-shadow:theme(colors.emerald.900/20%)]"],teal:["[--switch-bg-ring:theme(colors.teal.700/90%)] [--switch-bg:theme(colors.teal.600)] dark:[--switch-bg-ring:transparent]","[--switch:white] [--switch-ring:theme(colors.teal.700/90%)] [--switch-shadow:theme(colors.teal.900/20%)]"],cyan:["[--switch-bg-ring:theme(colors.cyan.400/80%)] [--switch-bg:theme(colors.cyan.300)] dark:[--switch-bg-ring:transparent]","[--switch-ring:transparent] [--switch-shadow:transparent] [--switch:theme(colors.cyan.950)]"],sky:["[--switch-bg-ring:theme(colors.sky.600/80%)] [--switch-bg:theme(colors.sky.500)] dark:[--switch-bg-ring:transparent]","[--switch:white] [--switch-ring:theme(colors.sky.600/80%)] [--switch-shadow:theme(colors.sky.900/20%)]"],blue:["[--switch-bg-ring:theme(colors.blue.700/90%)] [--switch-bg:theme(colors.blue.600)] dark:[--switch-bg-ring:transparent]","[--switch:white] [--switch-ring:theme(colors.blue.700/90%)] [--switch-shadow:theme(colors.blue.900/20%)]"],indigo:["[--switch-bg-ring:theme(colors.indigo.600/90%)] [--switch-bg:theme(colors.indigo.500)] dark:[--switch-bg-ring:transparent]","[--switch:white] [--switch-ring:theme(colors.indigo.600/90%)] [--switch-shadow:theme(colors.indigo.900/20%)]"],violet:["[--switch-bg-ring:theme(colors.violet.600/90%)] [--switch-bg:theme(colors.violet.500)] dark:[--switch-bg-ring:transparent]","[--switch:white] [--switch-ring:theme(colors.violet.600/90%)] [--switch-shadow:theme(colors.violet.900/20%)]"],purple:["[--switch-bg-ring:theme(colors.purple.600/90%)] [--switch-bg:theme(colors.purple.500)] dark:[--switch-bg-ring:transparent]","[--switch:white] [--switch-ring:theme(colors.purple.600/90%)] [--switch-shadow:theme(colors.purple.900/20%)]"],fuchsia:["[--switch-bg-ring:theme(colors.fuchsia.600/90%)] [--switch-bg:theme(colors.fuchsia.500)] dark:[--switch-bg-ring:transparent]","[--switch:white] [--switch-ring:theme(colors.fuchsia.600/90%)] [--switch-shadow:theme(colors.fuchsia.900/20%)]"],pink:["[--switch-bg-ring:theme(colors.pink.600/90%)] [--switch-bg:theme(colors.pink.500)] dark:[--switch-bg-ring:transparent]","[--switch:white] [--switch-ring:theme(colors.pink.600/90%)] [--switch-shadow:theme(colors.pink.900/20%)]"],rose:["[--switch-bg-ring:theme(colors.rose.600/90%)] [--switch-bg:theme(colors.rose.500)] dark:[--switch-bg-ring:transparent]","[--switch:white] [--switch-ring:theme(colors.rose.600/90%)] [--switch-shadow:theme(colors.rose.900/20%)]"]};function c({color:e="dark/zinc",className:t,...s}){return(0,a.jsx)(n.dO,{"data-slot":"control",...s,className:(0,i.A)(t,"group relative isolate inline-flex h-6 w-10 cursor-default rounded-full p-[3px] sm:h-5 sm:w-8","transition duration-0 ease-in-out data-[changing]:duration-200","forced-colors:outline forced-colors:[--switch-bg:Highlight] dark:forced-colors:[--switch-bg:Highlight]","bg-zinc-200 ring-1 ring-inset ring-black/5 dark:bg-white/5 dark:ring-white/15","data-[checked]:bg-[--switch-bg] data-[checked]:ring-[--switch-bg-ring] dark:data-[checked]:bg-[--switch-bg] dark:data-[checked]:ring-[--switch-bg-ring]","focus:outline-none data-[focus]:outline data-[focus]:outline-2 data-[focus]:outline-offset-2 data-[focus]:outline-blue-500","data-[hover]:data-[checked]:ring-[--switch-bg-ring] data-[hover]:ring-black/15","dark:data-[hover]:data-[checked]:ring-[--switch-bg-ring] dark:data-[hover]:ring-white/25","data-[disabled]:bg-zinc-200 data-[disabled]:data-[checked]:bg-zinc-200 data-[disabled]:opacity-50 data-[disabled]:data-[checked]:ring-black/5","dark:data-[disabled]:bg-white/15 dark:data-[disabled]:data-[checked]:bg-white/15 dark:data-[disabled]:data-[checked]:ring-white/15",l[e]),"data-sentry-element":"Headless.Switch","data-sentry-component":"Switch","data-sentry-source-file":"switch.tsx",children:(0,a.jsx)("span",{"aria-hidden":"true",className:(0,i.A)("pointer-events-none relative inline-block size-[1.125rem] rounded-full sm:size-3.5","translate-x-0 transition duration-200 ease-in-out","border border-transparent","bg-white shadow ring-1 ring-black/5","group-data-[checked]:bg-[--switch] group-data-[checked]:shadow-[--switch-shadow] group-data-[checked]:ring-[--switch-ring]","group-data-[checked]:translate-x-4 sm:group-data-[checked]:translate-x-3","group-data-[disabled]:group-data-[checked]:bg-white group-data-[disabled]:group-data-[checked]:shadow group-data-[disabled]:group-data-[checked]:ring-black/5")})})}},64056:(e,t,s)=>{"use strict";s.d(t,{gf:()=>c,ms:()=>l,rI:()=>d,rx:()=>u,tJ:()=>h});var a=s(37876),r=s(44572),n=s(49995),i=s(25879),o=s(89715);function l(e){return(0,a.jsx)(r.W1,{...e,"data-sentry-element":"Headless.Menu","data-sentry-component":"Dropdown","data-sentry-source-file":"dropdown.tsx"})}function c({as:e,...t}){return(0,a.jsx)(r.IU,{as:i.$,...t,"data-sentry-element":"Headless.MenuButton","data-sentry-component":"DropdownButton","data-sentry-source-file":"dropdown.tsx"})}function d({anchor:e="bottom",className:t,...s}){return(0,a.jsx)(r.c,{...s,transition:!0,anchor:e,className:(0,n.A)(t,"[--anchor-gap:theme(sp
5acing.2)] [--anchor-padding:theme(spacing.1)] data-[anchor~=start]:[--anchor-offset:-6px] data-[anchor~=end]:[--anchor-offset:6px] sm:data-[anchor~=start]:[--anchor-offset:-4px] sm:data-[anchor~=end]:[--anchor-offset:4px]","isolate w-max rounded-xl p-1","outline outline-1 outline-transparent focus:outline-none","overflow-y-auto","bg-white/75 backdrop-blur-xl dark:bg-zinc-800/75","shadow-lg ring-1 ring-zinc-950/10 dark:ring-inset dark:ring-white/10","supports-[grid-template-columns:subgrid]:grid supports-[grid-template-columns:subgrid]:grid-cols-[auto_1fr_1.5rem_0.5rem_auto]","transition data-[closed]:data-[leave]:opacity-0 data-[leave]:duration-100 data-[leave]:ease-in"),"data-sentry-element":"Headless.MenuItems","data-sentry-component":"DropdownMenu","data-sentry-source-file":"dropdown.tsx"})}function h({className:e,...t}){let s=(0,n.A)(e,"group cursor-default rounded-lg px-3.5 py-2.5 focus:outline-none sm:px-3 sm:py-1.5","text-left text-base/6 text-zinc-950 sm:text-sm/6 dark:text-white forced-colors:text-[CanvasText]","data-[focus]:bg-blue-500 data-[focus]:text-white","data-[disabled]:opacity-50","forced-color-adjust-none forced-colors:data-[focus]:bg-[Highlight] forced-colors:data-[focus]:text-[HighlightText] forced-colors:[&>[data-slot=icon]]:data-[focus]:text-[HighlightText]","col-span-full grid grid-cols-[auto_1fr_1.5rem_0.5rem_auto] items-center supports-[grid-template-columns:subgrid]:grid-cols-subgrid","[&>[data-slot=icon]]:col-start-1 [&>[data-slot=icon]]:row-start-1 [&>[data-slot=icon]]:-ml-0.5 [&>[data-slot=icon]]:mr-2.5 [&>[data-slot=icon]]:size-5 sm:[&>[data-slot=icon]]:mr-2 [&>[data-slot=icon]]:sm:size-4","[&>[data-slot=icon]]:text-zinc-500 [&>[data-slot=icon]]:data-[focus]:text-white [&>[data-slot=icon]]:dark:text-zinc-400 [&>[data-slot=icon]]:data-[focus]:dark:text-white","[&>[data-slot=avatar]]:-ml-1 [&>[data-slot=avatar]]:mr-2.5 [&>[data-slot=avatar]]:size-6 sm:[&>[data-slot=avatar]]:mr-2 sm:[&>[data-slot=avatar]]:size-5");return(0,a.jsx)(r.Dr,{"data-sentry-element":"Headless.MenuItem","data-sentry-component":"DropdownItem","data-sentry-source-file":"dropdown.tsx",children:"href"in t?(0,a.jsx)(o.N,{...t,className:s}):(0,a.jsx)("button",{type:"button",...t,className:s})})}function u({className:e,...t}){return(0,a.jsx)(r.bX,{...t,className:(0,n.A)(e,"col-span-full mx-3.5 my-1 h-px border-0 bg-zinc-950/5 sm:mx-3 dark:bg-white/10 forced-colors:bg-[CanvasText]"),"data-sentry-element":"Headless.MenuSeparator","data-sentry-component":"DropdownDivider","data-sentry-source-file":"dropdown.tsx"})}},70291:(e,t,s)=>{"use strict";s.d(t,{D:()=>n,R:()=>i});var a=s(37876),r=s(49995);function n({className:e,level:t=1,...s}){let i=`h${t}`;return(0,a.jsx)(i,{...s,className:(0,r.A)("text-2xl/8 font-semibold text-zinc-950 sm:text-xl/8 dark:text-white",e),"data-sentry-element":"Element","data-sentry-component":"Heading","data-sentry-source-file":"heading.tsx"})}function i({className:e,level:t=2,...s}){let n=`h${t}`;return(0,a.jsx)(n,{...s,className:(0,r.A)("text-base/7 font-semibold text-zinc-950 sm:text-sm/6 dark:text-white",e),"data-sentry-element":"Element","data-sentry-component":"Subheading","data-sentry-source-file":"heading.tsx"})}}},e=>{e.O(0,[3716,6701,1596,4587,3737,4407,5235,7014,1843,7914,4488,6540,5132,1357,1513,3040,8279,2244,7366,4145,9318,636,6593,8792],()=>e(e.s=32761)),_N_E=e.O()}]);

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.