PageSourceSearch

https://mycurriculummate.com.au/static/js/2066.d9b4889e.chunk.js

js mycurriculummate.com.au collected 2026-09-24 14:09:32 UTC 11,359 bytes, 3 lines download raw bytes

1/*! For license information please see 2066.d9b4889e.chunk.js.LICENSE.txt */
2"use strict";(globalThis.webpackChunkfrontend=globalThis.webpackChunkfrontend||[]).push([[2066],{2066(e,s,a){a.r(s),a.d(s,{default:()=>T});var r=a(5043),t=a(5621),i=a(3974),l=a(4980),n=a(6328),c=a(3390),d=a(1140),o=a(2264),u=a(556),m=a(5949),x=a(5732),h=a(3084),p=a(4204),g=a(7040),v=a(1351),b=a(5440),j=a(6099),y=a(4537),N=a(2626),f=a(6382),k=a(8326),A=a(1360),C=a(9292),w=a(7118),_=a(562),M=a(73),S=a(579);const B=["Foundation","1","2","3","4","5","6","7","8","9","10","11","12"],$=[10,15,20,25],q=["English","Mathematics","Science","History","Geography","Health & PE","Technology","Visual Arts","Music","Drama","Languages","HASS","Design & Technology","Digital Technologies"],P=[{id:"movement",label:"Movement",description:"Physical activity \u2014 star jumps, stretches, dance",icon:y.A,colour:"bg-blue-100 border-blue-300 text-blue-800",activeColour:"bg-blue-500 text-white border-blue-500"},{id:"mindfulness",label:"Mindfulness",description:"Breathing, grounding, calm resets",icon:_.A,colour:"bg-purple-100 border-purple-300 text-purple-800",activeColour:"bg-purple-600 text-white border-purple-600"},{id:"cognitive",label:"Brain Challenge",description:"Memory, vocabulary, quick mental tasks",icon:f.A,colour:"bg-green-100 border-green-300 text-green-800",activeColour:"bg-primary text-primary-foreground border-primary"},{id:"social",label:"Social",description:"Partner or group interaction activities",icon:w.A,colour:"bg-orange-100 border-orange-300 text-orange-800",activeColour:"bg-orange-500 text-white border-orange-500"}],T=()=>{const e=(0,t.Zp)(),{user:s}=(0,i.As)(),[a,y]=(0,r.useState)(!1),[f,w]=(0,r.useState)([]),[_,T]=(0,r.useState)("create"),[L,Z]=(0,r.useState)(!1),[D,E]=(0,r.useState)(""),[H,R]=(0,r.useState)({title:"",year_levels:[],categories:["movement","mindfulness","cognitive","social"],num_cards:20,subject:""}),V=(0,r.useCallback)(async()=>{try{const e=await l.A.get(`${l.n}/brain-break/`,{params:{search:D||void 0}});w(e.data.brain_break_sets||[])}catch{}},[D]);(0,r.useEffect)(()=>{V()},[V]);const F=f.filter(e=>{var s,a;return!D||(null===(s=e.title)||void 0===s?void 0:s.toLowerCase().includes(D.toLowerCase()))||(null===(a=e.subject)||void 0===a?void 0:a.toLowerCase().includes(D.toLowerCase()))});return(0,S.jsxs)(p.A,{children:[(0,S.jsx)(b.A,{}),(0,S.jsxs)("div",{className:"p-6 max-w-5xl mx-auto",children:[(0,S.jsxs)("div",{className:"flex items-center gap-3 mb-6",children:[(0,S.jsx)("div",{className:"p-2 rounded-lg bg-primary/10",children:(0,S.jsx)(M.A,{className:"w-6 h-6 text-primary"})}),(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsx)("h1",{className:"text-2xl font-bold text-foreground",children:"Brain Break Cards"}),(0,S.jsx)("p",{className:"text-sm text-muted-foreground",children:"AI-generated activity card sets \u2014 printable PDF, 4 cards per page"})]}),(0,S.jsx)(m.E,{variant:"secondary",className:"ml-auto",children:"5 credits"})]}),(0,S.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-4 gap-3 mb-6",children:P.map(e=>{let{id:s,label:a,description:r,icon:t,colour:i}=e;return(0,S.jsxs)("div",{className:`flex items-start gap-2 rounded-lg border p-3 ${i}`,children:[(0,S.jsx)(t,{className:"w-4 h-4 mt-0.5 shrink-0"}),(0,S.jsxs)("div",{children:[(0,S.jsx)("p",{className:"text-xs font-semibold",children:a}),(0,S.jsx)("p",{className:"text-xs opacity-75 mt-0.5",children:r})]})]},s)})}),(0,S.jsxs)(x.tU,{value:_,onValueChange:T,children:[(0,S.jsxs)(x.j7,{className:"mb-6",children:[(0,S.jsxs)(x.Xi,{value:"create",children:[(0,S.jsx)(A.A,{className:"w-4 h-4 mr-1"})," Create"]}),(0,S.jsxs)(x.Xi,{value:"library",children:[(0,S.jsx)(N.A,{className:"w-4 h-4 mr-1"})," My Sets (",f.length,")"]})]}),(0,S.jsx)(x.av,{value:"create",children:a?(0,S.jsx)(g.A,{title:"Building your brain break cards\u2026",steps:["Designing age-appropriate activities","Balancing activity categories","Verifying card variety","Preparing printable PDF"]}):(0,S.jsxs)(d.Zp,{children:[(0,S.jsx)(d.aR,{children:(0,S.jsx)(d.ZB,{className:"text-base",children:"Brain break card details"})}),(0,S.jsxs)(d.Wu,{className:"space-y-5",children:[(0,S.jsxs)("div",{className:"space-y-1",children:[(0,S.jsxs)(u.J,{children:["Title ",(0,S.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,S.jsx)(o.p,{placeholder:"e.g. Year 5 Science Brain Breaks",value:H.title,onChange:e=>R(s=>({...s,title:e.target.value}))})]}),(0,S.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[(0,S.jsxs)("div",{className:"space-y-1",children:[(0,S.jsxs)(u.J,{children:["Year Level ",(0,S.jsx)("span",{className:"text-destructive",children:"*"})]}),(0,S.jsxs)(h.l6,{value:H.year_levels[0]||"",onValueChange:e=>R(s=>({...s,year_levels:e?[e]:[]})),children:[(0,S.jsx)(h.bq,{children:(0,S.jsx)(h.yv,{placeholder:"Select year level"})}),(0,S.jsx)(h.gC,{children:B.map(e=>(0,S.jsx)(h.eb,{value:e,children:"Foundation"===e?"Foundation (Prep / Kindy)":`Year ${e}`},e))})]})]}),(0,S.jsxs)("div",{className:"space-y-1",children:[(0,S.jsxs)(u.J,{children:["Subject ",(0,S.jsx)("span",{className:"text-muted-foreground font-normal",children:"(optional \u2014 enables curriculum-linked breaks)"})]}),(0,S.jsxs)(h.l6,{value:H.subject||"__none__",onValueChange:e=>R(s=>({...s,subject:"__none__"===e?"":e})),children:[(0,S.jsx)(h.bq,{children:(0,S.jsx)(h.yv,{placeholder:"Any subject"})}),(0,S.jsxs)(h.gC,{children:[(0,S.jsx)(h.eb,{value:"__none__",children:"Any subject"}),q.map(e=>(0,S.jsx)(h.eb,{value:e,children:e},e))]})]})]})]}),(0,S.jsxs)("div",{className:"space-y-2",children:[(0,S.jsxs)(u.J,{children:["Activity categories ",(0,S.jsx)("span",{className:"text-muted-foreground font-normal",children:"(select at least one)"})]}),(0,S.jsx)("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-2",children:P.map(e=>{let{id:s,label:a,icon:r,colour:t,activeColour:i}=e;const l=H.categories.includes(s);return(0,S.jsxs)("button",{type:"button",onClick:()=>(e=>{R(s=>{const a=s.categories.includes(e);return a&&1===s.categories.length?s:{...s,categories:a?s.categories.filter(s=>s!==e):[...s.categories,e]}})})(s),className:`flex items-center gap-2 px-3 py-2 rounded-lg border text-sm font-medium transition-colors ${l?i:"border-border text-muted-foreground hover:border-primary/40"}`,children:[(0,S.jsx)(r,{className:"w-4 h-4 shrink-0"}),a]},s)})}),(0,S.jsx)("p",{className:"text-xs text-muted-foreground",children:"Cards will be distributed evenly across selected categories."})]}),(0,S.jsxs)("div",{className:"space-y-1 max-w-[200px]",children:[(0,S.jsx)(u.J,{children:"Number of cards"}),(0,S.jsxs)(h.l6,{value:String(H.num_cards),onValueChange:e=>R(s=>({...s,num_cards:Number(e)})),children:[(0,S.jsx)(h.bq,{children:(0,S.jsx)(h.yv,{})}),(0,S.jsx)(h.gC,{children:$.map(e=>(0,S.jsxs)(h.eb,{value:String(e),children:[e," cards"]},e))})]})]}),(0,S.jsx)("div",{className:"rounded-lg bg-primary/5 border border-primary/20 p-3 text-sm text-muted-foreground",children:"Cards are printed 4 per A4 landscape page with cut guides. A set of 20 cards = 5 pages. Each card shows the activity type, an emoji, a bold title, and clear instructions."}),(0,S.jsxs)(c.$,{onClick:async()=>{const s=[];if(H.title||s.push("Title"),0===H.year_levels.length&&s.push("Year Level"),s.length>0)n.oR.error(`Please fill in: ${s.join(", ")}.`);else{y(!0);try{const s=await l.A.post(`${l.n}/brain-break/generate`,H);n.oR.success("Brain break cards created!"),e(`/activity-studio/brain-break/${s.data.activity_id}`)}catch(x){var a,r,t,i,c,d,o,u;if(403===(null===(a=x.response)||void 0===a?void 0:a.status))if(null!==(t=x.response.data)&&void 0!==t&&null!==(i=t.includes)&&void 0!==i&&i.call(t,"credit")||null!==(c=x.response.data)&&void 0!==c&&null!==(d=c.detail)&&void 0!==d&&null!==(o=d.includes)&&void 0!==o&&o.call(
2d,"credit"))Z(!0);else n.oR.error((null===(u=x.response.data)||void 0===u?void 0:u.detail)||"Access denied.");else if(422===(null===(r=x.response)||void 0===r?void 0:r.status)){var m;n.oR.error((null===(m=x.response.data)||void 0===m?void 0:m.detail)||"Could not generate brain break cards. Try adjusting the settings.")}else n.oR.error("Generation failed. Please try again.")}finally{y(!1)}}},disabled:a,className:"w-full bg-primary hover:bg-primary/90 text-primary-foreground",size:"lg",children:[(0,S.jsx)(j.A,{className:"w-4 h-4 mr-2"}),"Generate Brain Break Cards (5 credits)"]})]})]})}),(0,S.jsxs)(x.av,{value:"library",children:[(0,S.jsx)("div",{className:"mb-4",children:(0,S.jsxs)("div",{className:"relative",children:[(0,S.jsx)(C.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),(0,S.jsx)(o.p,{className:"pl-9",placeholder:"Search brain break sets\u2026",value:D,onChange:e=>E(e.target.value)})]})}),0===F.length?(0,S.jsx)(d.Zp,{children:(0,S.jsxs)(d.Wu,{className:"py-12 text-center",children:[(0,S.jsx)(M.A,{className:"w-10 h-10 text-muted-foreground/40 mx-auto mb-3"}),(0,S.jsx)("p",{className:"text-muted-foreground",children:"No brain break sets yet. Create your first one!"}),(0,S.jsxs)(c.$,{className:"mt-4",onClick:()=>T("create"),children:[(0,S.jsx)(A.A,{className:"w-4 h-4 mr-2"})," Create Brain Break Cards"]})]})}):(0,S.jsx)("div",{className:"grid gap-3",children:F.map(s=>{var a,r;return(0,S.jsx)(d.Zp,{className:"cursor-pointer hover:border-primary/40 transition-colors",onClick:()=>e(`/activity-studio/brain-break/${s.activity_id}`),children:(0,S.jsxs)(d.Wu,{className:"flex items-center gap-4 py-4",children:[(0,S.jsx)("div",{className:"p-2 rounded-lg bg-primary/10",children:(0,S.jsx)(M.A,{className:"w-5 h-5 text-primary"})}),(0,S.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,S.jsx)("p",{className:"font-medium text-foreground truncate",children:s.title}),(0,S.jsxs)("p",{className:"text-sm text-muted-foreground",children:[s.subject?`${s.subject} \xb7 `:"","Year ",null===(a=s.year_levels)||void 0===a?void 0:a.join(", ")," \xb7 ",s.num_cards," cards"]})]}),(0,S.jsxs)("div",{className:"flex items-center gap-2",children:[null===(r=s.categories)||void 0===r?void 0:r.slice(0,3).map(e=>{const s=P.find(s=>s.id===e);return s?(0,S.jsx)(m.E,{variant:"outline",className:`text-xs hidden sm:inline-flex ${s.colour}`,children:s.label},e):null}),(0,S.jsx)(k.A,{className:"w-4 h-4 text-muted-foreground"})]})]})},s.activity_id)})})]})]})]}),L&&(0,S.jsx)(v.A,{isOpen:!0,onClose:()=>Z(!1)})]})}},6382(e,s,a){a.d(s,{A:()=>r});const r=(0,a(7784).A)("brain",[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z",key:"l5xja"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z",key:"ep3f8r"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4",key:"1p4c4q"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375",key:"tmeiqw"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5",key:"105sqy"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396",key:"ql3yin"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396",key:"1qfode"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516",key:"2e4loj"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18",key:"159ez6"}]])},562(e,s,a){a.d(s,{A:()=>r});const r=(0,a(7784).A)("wind",[["path",{d:"M12.8 19.6A2 2 0 1 0 14 16H2",key:"148xed"}],["path",{d:"M17.5 8a2.5 2.5 0 1 1 2 4H2",key:"1u4tom"}],["path",{d:"M9.8 4.4A2 2 0 1 1 11 8H2",key:"75valh"}]])}}]);
3//# sourceMappingURL=2066.d9b4889e.chunk.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.