module.exports=[2157,(a,b,c)=>{b.exports=a.x("node:fs",()=>require("node:fs"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},57764,(a,b,c)=>{b.exports=a.x("node:url",()=>require("node:url"))},84941,(a,b,c)=>{b.exports=a.x("@prisma/client-2c3a283f134fdcb6/runtime/client",()=>require("@prisma/client-2c3a283f134fdcb6/runtime/client"))},63098,(a,b,c)=>{b.exports=a.x("better-sqlite3-3437a554bd9fca1f",()=>require("better-sqlite3-3437a554bd9fca1f"))},20643,a=>{"use strict";var b=a.i(37936),c=a.i(90365),d=a.i(19423);function e(a){return String(a.get("website")??"").length>0}async function f(a,b){if(e(b))return{success:!0,message:"Message sent successfully."};let f=d.ContactSchema.safeParse({name:b.get("name"),email:b.get("email"),phone:b.get("phone")??"",subject:b.get("subject"),message:b.get("message"),website:b.get("website")??""});if(!f.success)return{errors:f.error.flatten().fieldErrors,message:"Please fix the highlighted fields."};try{await c.prisma.contactSubmission.create({data:{name:f.data.name,email:f.data.email,phone:f.data.phone||"",subject:f.data.subject,message:f.data.message,status:"new"}})}catch{return{message:"Unable to send your message right now. Please try again."}}return{success:!0,message:"Message sent successfully."}}async function g(a,b){if(e(b))return{success:!0,message:"Application received."};let f=b.get("consent"),g=d.AdmissionSchema.safeParse({studentFirstName:b.get("studentFirstName"),studentLastName:b.get("studentLastName"),studentDob:b.get("studentDob"),studentGender:b.get("studentGender")??"",currentSchool:b.get("currentSchool")??"",gradeLevel:b.get("gradeLevel"),program:b.get("program"),startDate:b.get("startDate"),parentName:b.get("parentName"),relationship:b.get("relationship"),email:b.get("email"),phone:b.get("phone"),notes:b.get("notes")??"",consent:"on"===f||"true"===f,website:b.get("website")??""});if(!g.success)return{errors:g.error.flatten().fieldErrors,message:"Please fix the highlighted fields."};let h=g.data;try{await c.prisma.admissionSubmission.create({data:{studentFirstName:h.studentFirstName,studentLastName:h.studentLastName,studentDob:h.studentDob,studentGender:h.studentGender||"",currentSchool:h.currentSchool||"",gradeLevel:h.gradeLevel,program:h.program,startDate:h.startDate,parentName:h.parentName,relationship:h.relationship,email:h.email,phone:h.phone,notes:h.notes||"",consent:h.consent,status:"new"}})}catch{return{message:"Unable to submit your application right now. Please try again."}}return{success:!0,message:"Application received."}}(0,a.i(64961).ensureServerEntryExports)([f,g]),(0,b.registerServerReference)(f,"60a2194b5522f2a2982fda298221ffbaea747f03b6",null),(0,b.registerServerReference)(g,"60e220ede88b1640ada46e69c5064db5bdcbc2f311",null),a.s(["submitAdmission",0,g,"submitContact",0,f])},58727,a=>{"use strict";var b=a.i(20643);a.s([],78495),a.i(78495),a.s(["60e220ede88b1640ada46e69c5064db5bdcbc2f311",()=>b.submitAdmission],58727)},16005,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]_node_buffer_0063pbu._.js"].map(b=>a.l(b))).then(()=>b(51615)))},8839,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]_@prisma_client_runtime_query_compiler_fast_bg_sqlite_mjs_0ov7..a._.js"].map(b=>a.l(b))).then(()=>b(53315)))},998,a=>{a.v(b=>Promise.all(["server/chunks/ssr/07~4_@prisma_client_runtime_query_compiler_fast_bg_sqlite_wasm-base64_mjs_0wnnza3._.js"].map(b=>a.l(b))).then(()=>b(99802)))}];

//# sourceMappingURL=%5Broot-of-the-server%5D__018_rjn._.js.map