PageSourceSearch

https://ausa.io/assets/CurrentOfferings-cea0e774.js

js ausa.io collected 2026-10-10 02:37:47 UTC 15,094 bytes, 1 lines download raw bytes

1import{j as e}from"./vendor-radix-875c64d9.js";import{r as t,L as s}from"./vendor-react-87e4ed35.js";import{c as a,k as r,a9 as n,S as i,J as l,B as o,e as d,aa as c,ab as m,G as x,u as h,a as p,ac as g,b as u,d as f,i as b}from"./index-32609c1a.js";import{C as j,I as _}from"./InstructorBio-6da62375.js";import{S as y,E as w}from"./EnrollmentModal-abeb38f0.js";import{S as N}from"./sequences-88045ba2.js";import{u as v,Z as k}from"./useSelfPacedOfferings-b96fa476.js";import{i as $,d as C,r as S}from"./offeringWindow-fc2a86fb.js";import{m as M}from"./vendor-motion-99b4a1fb.js";import{S as E}from"./shield-check-541762bd.js";import"./vendor-supabase-53a323e3.js";import"./vendor-recharts-b4f8f6f6.js";import"./vendor-auth-52eda190.js";import"./input-4cc1d9c4.js";import"./razorpayCheckout-44e52567.js";import"./validation-1233a6e8.js";import"./schoolCodes-1784d99a.js";import"./PaymentsPausedNotice-ee514fc2.js";const q=a("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]),P=a("LayoutList",[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}],["path",{d:"M14 4h7",key:"3xa0d5"}],["path",{d:"M14 9h7",key:"1icrd9"}],["path",{d:"M14 15h7",key:"1mj8o2"}],["path",{d:"M14 20h7",key:"11slyb"}]]),F=["General Education & Skill-Building","Humanities & Fine Arts","Business & Commerce","STEMM"],I=e=>{var t;return(null==(t=N.find(t=>t.id===e))?void 0:t.name)||null},L=e=>{const t=new Date(`${e}T00:00:00`);return t.setMonth(t.getMonth()+1,1),t.toLocaleDateString("en-IN",{month:"long",year:"numeric"})},B="text-[10px] font-bold uppercase tracking-wider rounded-full px-2.5 py-0.5";function A(){const[a,c]=t.useState(null),[m,x]=t.useState(null),h=v(),p=$();t.useEffect(()=>{let e=!1;return(async()=>{const{data:t,error:s}=await r.from("offerings").select("*").eq("audience","public").neq("product_type","assessment").neq("product_type","credit_course").neq("product_type","self_paced").in("status",["open","full"]).or(`start_date.gte.${p},is_league.eq.true`).order("start_date",{ascending:!0});e||c(s?[]:t||[])})(),()=>{e=!0}},[p]);const g=t.useMemo(()=>{const e=new Map;for(const t of a||[]){const s=t.cohort_label||`${n(t.start_date)} Cohort`;e.has(s)||e.set(s,{label:s,offerings:[]}),e.get(s).offerings.push(t)}return[...e.values()].map(e=>{const t=e.offerings.filter(e=>!e.is_league),s=e.offerings.filter(e=>e.is_league),a=[...F,...new Set(t.map(e=>e.department))].filter((e,t,s)=>s.indexOf(e)===t).map(e=>({department:e,offerings:t.filter(t=>t.department===e)})).filter(e=>e.offerings.length>0),r=t[0]||s[0];return{...e,workshops:t,leagues:s,depts:a,lead:r}}).sort((e,t)=>{var s,a;return((null==(s=e.lead)?void 0:s.start_date)||"").localeCompare((null==(a=t.lead)?void 0:a.start_date)||"")})},[a]);return e.jsxs(e.Fragment,{children:[e.jsx(i,{title:"Current Offerings — Enroll in Upcoming Cohorts",description:"Scheduled online workshop cohorts you can enroll in and pay for today. Every workshop counts toward Keystone Certification."}),e.jsx("section",{className:"bg-gradient-to-br from-midnight-navy to-indigo text-white py-16 md:py-24",children:e.jsx("div",{className:"container mx-auto px-4 text-center",children:e.jsxs(M.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.6},children:[e.jsx("p",{className:"text-sm font-semibold tracking-widest uppercase text-white/70 mb-4",children:"Online Programs · Current Offerings"}),e.jsx("h1",{className:"font-serif text-4xl md:text-5xl font-bold mb-4 text-warm-gold",children:"Enroll in an Upcoming Cohort"}),e.jsx("p",{className:"max-w-2xl mx-auto text-lg text-white/80",children:"Start with a single course — every one counts toward certification. Live online courses — workshop courses (6–8 sessions over 3–4 weeks) and university courses. Pick a start date, enroll, and pay securely with Razorpay."}),e.jsx("p",{className:"mt-4 inline-block text-sm font-semibold text-warm-gold bg-white/10 border border-warm-gold/40 rounded-full px-5 py-2",children:"AUSA members: included courses at no charge · 50% off beyond your allowance · members register first"})]})})}),e.jsx("section",{className:"py-12 md:py-16 bg-gray-50/70 min-h-[40vh]",children:e.jsxs("div",{className:"container mx-auto px-4 max-w-5xl",children:[null===a&&e.jsxs("p",{className:"text-center text-slate-gray flex items-center justify-center gap-2",children:[e.jsx(l,{className:"w-4 h-4 animate-spin"})," Loading current offerings…"]}),null!==a&&0===g.length&&e.jsxs("div",{className:"text-center py-12 max-w-3xl mx-auto",children:[e.jsx("h2",{className:"font-serif text-2xl md:text-3xl font-bold text-midnight-navy mb-3",children:"Next cohort coming soon"}
1),e.jsx("p",{className:"text-slate-gray mb-8",children:"Dates and registration for the next cohort will be posted here."}),e.jsxs("div",{className:"flex flex-wrap justify-center gap-3",children:[e.jsx(o,{asChild:!0,children:e.jsx(s,{to:"/course-finder",children:"Use the Course Finder"})}),e.jsx(o,{asChild:!0,variant:"outline",children:e.jsx(s,{to:"/workshops",children:"Browse the Catalog"})})]})]}),g.map(t=>e.jsxs("div",{className:"mb-16","data-cohort":t.label,children:[e.jsx(O,{cohort:t,today:p}),t.depts.map(({department:t,offerings:s})=>e.jsxs("div",{className:"mb-10","data-department":t,children:[e.jsxs("h3",{className:"font-serif text-xl md:text-2xl font-bold text-midnight-navy mb-4 flex items-center gap-2",children:[e.jsx(P,{className:"w-5 h-5 text-indigo"})," ",t]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:s.map(t=>e.jsx(R,{offering:t,today:p,onEnroll:()=>x(t)},t.id))})]},t)),t.leagues.length>0&&e.jsxs("div",{className:"mb-4 pt-8 border-t border-slate-200","data-department":"Leagues",children:[e.jsxs("h3",{className:"font-serif text-xl md:text-2xl font-bold text-midnight-navy mb-1 flex items-center gap-2",children:[e.jsx(E,{className:"w-5 h-5 text-indigo"})," Leagues"]}),e.jsx("p",{className:"text-sm text-slate-gray mb-4 max-w-3xl",children:"Year-round, cohort-based programs on their own schedule and pricing — they run beyond the standard 3–4 week course format and count toward Keystone Certification like any workshop."}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:t.leagues.map(t=>e.jsx(R,{offering:t,today:p,onEnroll:()=>x(t)},t.id))})]})]},t.label)),e.jsxs("div",{className:"mt-16 pt-10 border-t-2 border-dashed border-amber-300",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(k,{className:"w-6 h-6 text-amber-500"}),e.jsx("h2",{className:"font-serif text-2xl md:text-3xl font-bold text-midnight-navy",children:"Self-Paced · Start Anytime"})]}),e.jsxs("p",{className:"text-slate-gray mb-6 max-w-2xl",children:["A different kind of offering: these have ",e.jsx("span",{className:"font-semibold",children:"no fixed start date and no cohort"}),". Register and begin immediately, then work at your own pace with feedback on every submission."]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:y.map(t=>e.jsxs("div",{className:"bg-amber-50/60 rounded-2xl border border-amber-200 p-6 flex flex-col",children:[e.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[e.jsx("span",{className:`${B} bg-amber-400 text-amber-950`,children:"Self-Paced"}),e.jsx("span",{className:`${B} bg-white text-amber-700 border border-amber-200`,children:"Start anytime"})]}),e.jsx("h3",{className:"text-lg font-bold text-midnight-navy mb-1",children:t.title}),e.jsx("p",{className:"text-xs text-slate-gray mb-3",children:t.blurb}),e.jsxs("div",{className:"flex items-center justify-between mt-auto pt-3 border-t border-amber-200",children:[e.jsx("p",{className:"text-sm font-bold text-amber-700",children:t.price}),h[t.sequenceId]?e.jsx(o,{variant:"outline",className:"border-amber-400 text-amber-800 hover:bg-amber-100",onClick:()=>x(h[t.sequenceId]),children:"Enroll"}):e.jsx(o,{variant:"outline",disabled:!0,children:"Opening soon"})]})]},t.id))}),e.jsx("p",{className:"text-center text-sm text-slate-gray mt-6",children:e.jsxs(s,{to:"/available-anytime",className:"text-indigo hover:underline font-semibold",children:["More about self-paced courses ",e.jsx(d,{className:"w-3 h-3 inline"})]})})]})]})}),m&&e.jsx(w,{offering:m,onClose:()=>x(null),unit:"self_paced"===m.product_type?"course":m.is_league?"league":"cohort"})]})}function O({cohort:t,today:s}){const a=t.workshops[0]||null,r=null==a?void 0:a.registration_closes_on,n=r?C(r,s):null,i=(null==a?void 0:a.registration_opens_on)&&s<a.registration_opens_on,l=a?[["Members register",a.registration_opens_on],["Public registration",a.public_opens_on],["Registration closes",a.registration_closes_on],["Payment due",a.payment_due_on],["Timings confirmed",a.timings_confirmed_by,"by "],["First session",a.start_date],["Courses conclude",a.end_date,"by "]].filter(([,e])=>e):[];return e.jsxs("div",{className:"rounded-2xl bg-midnight-navy text-white p-6 md:p-8 mb-8 shadow-soft",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsxs("h2",{className:"font-serif text-2xl md:text-3xl font-bold text-warm-gold flex items-center gap-2",children:[e.jsx(j,{className:"w-6 h-6"})," ",t.label]}),a&&e.jsxs("p",{className:"text-white/80 mt-1",children:["First session ",c(a.start_date),a.end_date?` · courses conclude by ${c(a.end_date)}`:""]})]}),r&&e.jsxs("div",{className:"rounded-xl px-4 py-3 text-sm font-semibold border "+(n<0?"bg-white/10 border-white/20 text-white/80":"bg-warm-gold/15 border-warm-gold/50 text-warm-gold"),"data-testid":"deadline-banner",children:[e.jsx(q,{className:"w-4 h-4 inline mr-1.5 -mt-0.5"}),n<0?"Registration for this cohort has closed.":e.jsxs(e.Fragment,{children:["Registration closes ",c(r),", end of day IST",0===n?" — today":` — ${n} day${1===n?"":"s"} left`]})]})]}),l.length>0&&e.jsx("dl",{className:"grid grid-cols-2 sm:grid-cols-4 lg:grid-cols-7 gap-3 mt-6",children:l.map(([t,s,a])=>e.jsxs("div",{className:"rounded-lg bg-white/5 border border-white/10 px-3 py-2",children:[e.jsx("dt",{className:"text-[10px] uppercase tracking-wider text-white/60",children:t}),e.jsxs("dd",{className:"text-sm font-semibold text-white",children:[a||"",m(s)]})]},t))}),e.jsxs("div",{className:"mt-5 grid gap-2 text-sm text-white/80",children:[(null==a?void 0:a.schedule_text)&&e.jsxs("p",{children:[e.jsx(q,{className:"w-4 h-4 inline mr-1.5 -mt-0.5 text-warm-gold"})," ",a.schedule_text]}),i&&e.jsxs("p",{children:[e.jsx(x,{className:"w-4 h-4 inline mr-1.5 -mt-0.5 text-warm-gold"})," AUSA members register first, from ",m(a.registration_opens_on),"; public registration opens ",m(a.public_opens_on),"."]}),(null==a?void 0:a.min_to_run)&&e.jsxs("p",{"data-testid":"cohort-policy",children:[e.jsx(h,{className:"w-4 h-4 inline mr-1.5 -mt-0.5 text-warm-gold"}),"Cohort size ",a.seats_total," · minimum ",a.min_to_run," registered students to run. If a cohort does not form, registered families are offered a place in the ",L(a.start_date)," cohort or a full refund."]})]})]})}function R({offering:t,today:s,onEnroll:a}){const r=S(t,s),n=t.unlimited_seats?null:Math.max(0,t.seats_total-t.seats_taken),i=Boolean(t.junior_title)&&t.junior_title!==t.course_title,l=t.grades_label||(t.track?p[t.track]:null),d={full:{label:"Full",disabled:!0},closed:{label:"Registration closed",disabled:!0},not_yet_open:{label:`Members register from ${g(t.registration_opens_on)}`,disabled:!0},members_only:{label:"Members enroll now",disabled:!1},open:{label:"Enroll & Pay",disabled:!1}}
1[r],c=[t.instructor&&["Instructor",t.instructor],t.format_text&&["Format",t.format_text],!t.unlimited_seats&&t.seats_total&&["Cohort size",`${t.seats_total} seats${t.min_to_run?` · minimum ${t.min_to_run} to run`:""}`],t.is_league?["Schedule",`Starts ${m(t.start_date)}${t.schedule_text?` · ${t.schedule_text}`:""}`]:["Dates",`First session ${m(t.start_date)}${t.end_date?` · concludes by ${m(t.end_date)}`:""}${!t.cohort_label&&t.schedule_text?` · ${t.schedule_text}`:""}`],(t.registration_opens_on||t.public_opens_on||t.registration_closes_on)&&["Registration",[t.registration_opens_on&&`members from ${g(t.registration_opens_on)}`,t.public_opens_on&&`public from ${g(t.public_opens_on)}`,t.registration_closes_on&&`closes ${g(t.registration_closes_on)}`].filter(Boolean).join(" · ")]].filter(Boolean);return e.jsxs(M.div,{initial:{opacity:0,y:16},whileInView:{opacity:1,y:0},viewport:{once:!0},transition:{duration:.4},className:"bg-white rounded-2xl shadow-soft border border-slate-200/80 p-6 flex flex-col","data-testid":"offering-card","data-state":r,children:[e.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[t.is_league?e.jsx("span",{className:`${B} bg-indigo/10 text-indigo`,children:"League"}):e.jsxs("span",{className:`${B} ${u[t.level]}`,children:[t.level," ",f[t.level]]}),t.department&&e.jsx("span",{className:`${B} bg-gray-100 text-gray-600`,children:t.department}),I(t.sequence_id)&&e.jsx("span",{className:`${B} bg-indigo/10 text-indigo`,children:I(t.sequence_id)}),!i&&l&&e.jsx("span",{className:`${B} bg-warm-gold/20 text-amber-800`,children:l})]}),i?e.jsxs("div",{className:"mb-1",children:[e.jsxs("h3",{className:"text-lg font-bold text-midnight-navy leading-snug",children:[e.jsx("span",{className:"text-slate-400 font-semibold text-sm",children:"Senior:"})," ",t.course_title,t.grades_label&&e.jsx("span",{className:"ml-2 text-xs font-semibold text-amber-800",children:t.grades_label})]}),e.jsxs("h3",{className:"text-lg font-bold text-midnight-navy leading-snug",children:[e.jsx("span",{className:"text-slate-400 font-semibold text-sm",children:"Junior:"})," ",t.junior_title,t.junior_grades_label&&e.jsx("span",{className:"ml-2 text-xs font-semibold text-amber-800",children:t.junior_grades_label})]}),e.jsx("p",{className:"text-[11px] text-slate-500 mt-1",children:"One cohort, two titles — students in Grades 6–8 enroll under the Junior title, Grades 9–12 under the Senior title."})]}):e.jsx("h3",{className:"text-lg font-bold text-midnight-navy mb-1",children:t.course_title}),t.description&&e.jsx("p",{className:"text-xs text-slate-gray mb-3",children:t.description}),e.jsx(_,{bio:t.instructor_bio}),e.jsx("dl",{className:"text-sm text-slate-gray space-y-1 mb-3",children:c.map(([t,s])=>e.jsxs("div",{className:"flex gap-2",children:[e.jsx("dt",{className:"w-24 shrink-0 text-[11px] uppercase tracking-wider text-slate-400 pt-0.5",children:t}),e.jsx("dd",{children:s})]},t))}),e.jsxs("div",{className:"flex items-center justify-between gap-3 mt-auto pt-3 border-t border-slate-100",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-xl font-bold text-indigo",children:b(t.price_inr_minor)}),null!==n&&e.jsxs("p",{className:"text-[11px] text-slate-500 flex items-center gap-1",children:[e.jsx(h,{className:"w-3 h-3"})," ","full"===r?"Cohort full":`${n} seat${1===n?"":"s"} left`]})]}),e.jsx(o,{onClick:a,disabled:d.disabled,className:"text-right whitespace-normal h-auto py-2",children:d.label})]})]})}export{A as default};

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.