PageSourceSearch

https://elespaciodemaximo.es/assets/extraescolares-5e4k8Qhk.js

js elespaciodemaximo.es collected 2026-10-09 22:02:56 UTC 12,727 bytes, 1 lines download raw bytes

1import{a as e,n as t,t as n}from"./jsx-runtime-C27Mmbu5.js";import{t as r}from"./client-lPr_3eCt.js";import{t as i}from"./useSuspenseQuery-B494D1re.js";import{C as a,J as o,S as s,d as c,h as l,l as u,m as d,p as f,u as p,z as m}from"./index-CWriCK7i.js";import{t as h}from"./SiteLayout-Biqze3vT.js";import{n as g,t as _}from"./BirthDatePicker-CSpE8A_E.js";import{t as v}from"./input-CyYkCVHR.js";import{t as y}from"./label-CA8o8cDM.js";import{a as b,n as x,o as S,t as C}from"./dialog-BXs_eQGP.js";import{n as w}from"./dist-B7xAHQ9d.js";import{t as T}from"./textarea-CpEu_TnM.js";import{t as E}from"./LoopVideo-Dr5by8Ez.js";import{n as D,t as O}from"./phone-input-CFGpiflH.js";import{t as k}from"./tx-TzFv7RHF.js";var A=e(t(),1),j=n(),M={parent_first_name:``,parent_last_name:``,email:``,phone:``,id_number:``,address:``,child_first_name:``,child_last_name:``,child_birth_date:``,health_notes:``};function N({kind:e,selection:t}){let{t:n}=o(),[i,c]=(0,A.useState)(!1),[l,u]=(0,A.useState)(M),d=(e,t)=>u(n=>({...n,[e]:t})),f=s({parent_first_name:a().trim().min(2,n(`pre.err.parent_first`)).max(100),parent_last_name:a().trim().min(2,n(`pre.err.parent_last`)).max(100),email:a().trim().email(n(`pre.err.email`)).max(255),phone:a().trim().min(6,n(`pre.err.phone`)).max(30).refine(e=>D(e),n(`pre.err.phone`)),id_number:a().trim().min(4,n(`pre.err.id`)).max(40),address:a().trim().min(5,n(`pre.err.address`)).max(255),child_first_name:a().trim().min(2,n(`pre.err.child_first`)).max(100),child_last_name:a().trim().min(2,n(`pre.err.child_last`)).max(100),child_birth_date:a().regex(/^\d{4}-\d{2}-\d{2}$/,n(`pre.err.child_dob`)),health_notes:a().max(1e3).optional()});return(0,j.jsxs)(`form`,{onSubmit:async i=>{i.preventDefault();let a=f.safeParse(l);if(!a.success){w.error(a.error.issues[0]?.message??n(`pre.err.generic`));return}let o=a.data;c(!0);let{error:s}=await r.from(`interest_signups`).insert({kind:e,selection:t??null,parent_name:`${o.parent_first_name} ${o.parent_last_name}`,parent_last_name:o.parent_last_name,phone:o.phone,email:o.email,parent_id_number:o.id_number,address:o.address,child_first_name:o.child_first_name,child_last_name:o.child_last_name,child_birth_date:o.child_birth_date,child_age:g(o.child_birth_date),health_notes:o.health_notes?.trim()||null});if(c(!1),s){w.error(s.message);return}w.success(n(`pre.sent`)),u(M)},className:`mt-4 grid gap-3 rounded-3xl border-2 border-border bg-card p-5 sm:grid-cols-2`,children:[(0,j.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,j.jsxs)(y,{children:[n(`pre.parent_first`),` *`]}),(0,j.jsx)(v,{value:l.parent_first_name,onChange:e=>d(`parent_first_name`,e.target.value),maxLength:100,required:!0})]}),(0,j.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,j.jsxs)(y,{children:[n(`pre.parent_last`),` *`]}),(0,j.jsx)(v,{value:l.parent_last_name,onChange:e=>d(`parent_last_name`,e.target.value),maxLength:100,required:!0})]}),(0,j.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,j.jsxs)(y,{children:[n(`pre.email`),` *`]}),(0,j.jsx)(v,{type:`email`,value:l.email,onChange:e=>d(`email`,e.target.value),maxLength:255,required:!0})]}),(0,j.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,j.jsxs)(y,{children:[n(`pre.phone`),` *`]}),(0,j.jsx)(O,{value:l.phone||void 0,onChange:e=>d(`phone`,e??``),required:!0,invalid:!!l.phone&&!D(l.phone)})]}),(0,j.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,j.jsxs)(y,{children:[n(`pre.id_number`),` *`]}),(0,j.jsx)(v,{value:l.id_number,onChange:e=>d(`id_number`,e.target.value),maxLength:40,required:!0})]}),(0,j.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,j.jsxs)(y,{children:[n(`pre.address`),` *`]}),(0,j.jsx)(v,{value:l.address,onChange:e=>d(`address`,e.target.value),maxLength:255,required:!0})]}),(0,j.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,j.jsxs)(y,{children:[n(`pre.child_first`),` *`]}),(0,j.jsx)(v,{value:l.child_first_name,onChange:e=>d(`child_first_name`,e.target.value),maxLength:100,required:!0})]}),(0,j.jsxs)(`div`,{className:`grid gap-1.5`,children:[(0,j.jsxs)(y,{children:[n(`pre.child_last`),` *`]}),(0,j.jsx)(v,{value:l.child_last_name,onChange:e=>d(`child_last_name`,e.target.value),maxLength:100,required:!0})]}),(0,j.jsxs)(`div`,{className:`grid gap-1.5 sm:col-span-2`,children:[(0,j.jsxs)(y,{children:[n(`pre.child_dob`),` *`]}),(0,j.jsx)(_,{value:l.child_birth_date,onChange:e=>d(`child_birth_date`,e)})]}),(0,j.jsxs)(`div`,{className:`grid gap-1.5 sm:col-span-2`,children:[(0,j.jsx)(y,{children:n(`pre.health`)}),(0,j.jsx)(T,{value:l.health_notes,onChange:e=>d(`health_notes`,e.target.value),maxLength:1e3,rows:3})]}),(0,j.jsx)(`div`,{className:`sm:col-span-2`,children:(0,j.jsx)(m,{disabled:i,className:`w-full rounded-full sm:w-auto`,children:i?`...`:n(`pre.send`)})})]})}function P({activities:e,onSelect:t}){let{lang:n,pt:r}=o();return(0,j.jsxs)(`section`,{"data-section":`timetable`,className:`mt-10`,children:[(0,j.jsx)(`h2`,{className:`font-display text-2xl font-bold`,children:r({es:`Horario semanal`,en:`Weekly timetable`,nl:`Weekrooster`,fr:`Programme hebdomadaire`,uk:`Тижневий розклад`,de
1:`Wochenplan`})}),(0,j.jsx)(`div`,{className:`mt-5 grid gap-6 md:grid-cols-3 xl:grid-cols-5`,children:u[n].map((i,a)=>(0,j.jsxs)(`div`,{className:`min-w-0 border-t-4 border-primary pt-3`,children:[(0,j.jsx)(`h3`,{className:`font-display text-lg font-bold`,children:i}),(0,j.jsxs)(`div`,{className:`mt-3 space-y-3`,children:[l(e,a+1).map(({activity:e,session:r},i)=>(0,j.jsxs)(m,{variant:`outline`,onClick:()=>t(e),className:`h-auto w-full flex-col items-start gap-2 whitespace-normal rounded-lg p-3 text-left`,children:[(0,j.jsxs)(`span`,{className:`font-bold text-primary`,children:[r.start,`–`,r.end]}),(0,j.jsx)(`span`,{className:`break-words`,children:c(e,`name`,n)}),r.minAge!=null&&(0,j.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:d(r,n,!1).split(` · `)[1]}),(0,j.jsx)(`span`,{className:`text-xs font-semibold`,children:f(e,n)})]},`${e.id}-${i}`)),a===4&&(0,j.jsxs)(`div`,{className:`rounded-lg border border-accent bg-accent/10 p-3 text-sm`,children:[(0,j.jsx)(`p`,{className:`font-bold`,children:`16:00–19:00`}),(0,j.jsx)(`p`,{className:`mt-2 font-semibold`,children:r({es:`Reservas de cumpleaños`,en:`Birthday reservations`,nl:`Verjaardagsreserveringen`,fr:`Réservations d’anniversaire`,uk:`Бронювання днів народження`,de:`Geburtstagsreservierungen`})}),(0,j.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:r({es:`También disponibles otros días, incluidos fines de semana.`,en:`Also available on other days, including weekends.`,nl:`Ook beschikbaar op andere dagen, inclusief het weekend.`,fr:`Également disponibles d’autres jours, y compris le week-end.`,uk:`Також доступні в інші дні, зокрема у вихідні.`,de:`Auch an anderen Tagen verfügbar, einschließlich Wochenenden.`})})]})]})]},a))})]})}var F={version:1,asset_id:`5b24e801-9779-4af5-85e3-51a2a6ddd753`,project_id:`bebd953c-b963-44b2-94b5-971290e07b38`,url:`/__l5e/assets-v1/5b24e801-9779-4af5-85e3-51a2a6ddd753/painting-portrait.mp4`,r2_key:`a/v1/bebd953c-b963-44b2-94b5-971290e07b38/5b24e801-9779-4af5-85e3-51a2a6ddd753/painting-portrait.mp4`,original_filename:`painting-portrait.mp4`,size:1134572,content_type:`video/mp4`,created_at:`2026-06-29T12:16:48Z`},I={version:1,asset_id:`c45939db-4fd0-4139-9684-d3cb695cf2cd`,project_id:`bebd953c-b963-44b2-94b5-971290e07b38`,url:`/__l5e/assets-v1/c45939db-4fd0-4139-9684-d3cb695cf2cd/painting-portrait.webm`,r2_key:`a/v1/bebd953c-b963-44b2-94b5-971290e07b38/c45939db-4fd0-4139-9684-d3cb695cf2cd/painting-portrait.webm`,original_filename:`painting-portrait.webm`,size:1270633,content_type:`video/webm`,created_at:`2026-06-29T12:16:52Z`},L={version:1,asset_id:`b65f34aa-b545-4772-bfd0-3fe35f2f2ac3`,project_id:`bebd953c-b963-44b2-94b5-971290e07b38`,url:`/__l5e/assets-v1/b65f34aa-b545-4772-bfd0-3fe35f2f2ac3/painting-portrait.jpg`,r2_key:`a/v1/bebd953c-b963-44b2-94b5-971290e07b38/b65f34aa-b545-4772-bfd0-3fe35f2f2ac3/painting-portrait.jpg`,original_filename:`painting-portrait.jpg`,size:154196,content_type:`image/jpeg`,created_at:`2026-06-29T12:16:57Z`};function R(){let{t:e,lang:t}=o(),n=k(),{data:r}=i(p),[a,s]=(0,A.useState)(null);return(0,j.jsx)(h,{children:(0,j.jsxs)(`section`,{className:`mx-auto max-w-5xl px-4 py-8 sm:py-10`,children:[(0,j.jsx)(`div`,{className:`mb-6 overflow-hidden rounded-3xl border-2 border-border shadow-sm`,children:(0,j.jsx)(E,{mp4:F.url,webm:I.url,poster:L.url,ariaLabel:`${n(`Niña pintando en el taller de arte`,`Child painting in the art workshop`)} — El Espacio de Máximo`,aspect:`h-36 sm:h-44 md:h-56`,preload:`auto`})}),(0,j.jsxs)(`div`,{"data-section":`intro`,children:[(0,j.jsx)(`h1`,{className:`font-display text-3xl font-bold sm:text-4xl md:text-5xl`,children:e(`extra.title`)}),(0,j.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground sm:text-base`,children:e(`extra.sub`)})]}),(0,j.jsx)(P,{activities:r,onSelect:s}),(0,j.jsx)(`div`,{className:`mt-8 grid gap-3 md:grid-cols-2`,children:r.map(r=>{let i=c(r,`name`,t),a=c(r,`schedule`,t);return(0,j.jsxs)(m,{variant:`outline`,onClick:()=>s(r),className:`group flex h-auto flex-col items-start whitespace-normal rounded-2xl border border-border bg-card p-5 text-left transition-all hover:border-primary/50 hover:shadow-md`,children:[(0,j.jsxs)(`div`,{className:`flex w-full flex-wrap items-start justify-between gap-3`,children:[(0,j.jsx)(`div`,{className:`font-display text-lg font-bold group-hover:text-primary transition-colors`,children:i}),(0,j.jsx)(`div`,{className:`rounded-lg bg-primary/10 px-3 py-1 text-sm font-bold text-primary`,children:f(r,t)})]}),a&&(0,j.jsx)(`div`,{className:`mt-1 text-sm text-muted-foreground`,children:a}),(0,j.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-3 text-xs font-semibold`,children:[(0,j.jsxs)(`span`,{className:`text-primary underline-offset-4 group-hover:underline`,children:[n(`Ver detalles e inscribirse`,`See details and register`),` →`]}),r.video_url&&(0,j.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-full bg-muted px-2 py-1 text-muted-foreground`,children:[`▶ `,e(`extra.video.badge`)]})]})]},r.id)})}),(0,j.jsx)(C,{open:!!a,onOpenChange:e=>!e&&s(null),children:(0,j.jsx)(x,{className:`max-h-[90vh] w-[95vw] overflow-y-auto rounded-3xl sm:max-w-2xl`,children:a&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(b,{children:(0,j.jsx)(S,{className:`font-display text-2xl font-bold`,children:c(a,`name`,t)})}),(0,j.jsxs)(`div`,{className:`mt-4`,children:[(0,j.jsxs)(`div`,{className:`rounded-2xl bg-muted/50 p-4`,children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 font-bold`,children:[(0,j.jsx)(`span`,{className:`text-sm uppercase tracking-wider text-muted-foreground`,children:n(`Horario`,`Schedule`)}),(0,j.jsx)(`span`,{className:`text-primary`,children:f(a,t)})]}),(0,j.jsx)(`div`,{className:`mt-1`,children:c(a,`schedule`,t)}),c(a,`description`,t)&&(0,j.jsx)(`p`,{className:`mt-4 text-sm leading-relaxed text-muted-foreground`,children:c(a,`description`,t)})]}),a.video_url&&(0,j.jsxs)(`a`,{href:a.video_url,target:`_blank`,rel:`noopener noreferrer`,className:`mt-4 inline-flex items-center gap-2 rounded-full bg-primary px-5 py-2.5 text-sm font-bold text-primary-foreground transition-opacity hover:opacity-90`,children:[`▶ `,e(`extra.video.button`)]}),(0,j.jsxs)(`div`,{className:`mt-8`,children:[(0,j.jsx)(`h3`,{className:`font-display text-xl font-bold`,children:e(`pre.title`)}),(0,j.jsx)(`div`,{className:`mt-2 text-sm text-muted-foreground`,children:`${n(`Formulario de pre-inscripción para`,`Pre-registration form for`)} ${c(a,`name`,t)}.`}),(0,j.jsx)(N,{kind:`extraescolar`,selection:a.name_es})]})]})]})})}),(0,j.jsx)(`div`,{className:`mt-10`,children:(0,j.jsx)(`div`,{className:`overflow-hidden rounded-3xl border-2 border-border bg-card shadow-sm`,children:(0,j.jsxs)(`div`,{className:`p-4`,children:[(0,j.jsx)(`div`,{className:`font-display text-lg font-bold`,children:n(`Taller de pintura 🎨`,`Painting workshop 🎨`)}),(0,j.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:n(`Caballetes, témperas y paletas: los peques crean su propia obra cada semana.`,`Easels, paints and palettes: kids create their own artwork every week.`)})]})})}),(0,j.jsxs)(`div`,{className:`mt-10`,children:[(0,j.jsx)(`h2`,{className:`font-display text-2xl font-bold`,children:e(`pre.title`)}),(0,j.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:n(`Si tienes dudas o prefieres inscribirte de forma general, usa este formulario.`,`If you have questions or prefer to register generally, use this form.`)}),(0,j.jsx)(N,{kind:`extraescolar`})]})]})})}export{R as component};

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.