PageSourceSearch

https://weversity.org/assets/InternshipApplicationPage-BdfA0HmQ.js

js weversity.org collected 2026-09-24 14:27:48 UTC 11,081 bytes, 1 lines download raw bytes

1import{j as e,H as F}from"./index-qdmhk9je.js";import{r as o}from"./vendor-react-DXfu0YkJ.js";import{u as I}from"./useRecaptcha-DJgGMUHW.js";import{P as E}from"./PhoneInput-BTwLOWOJ.js";import{i as L}from"./validation-WtNg4Brb.js";import"./vendor-pdf-v-sEuCgt.js";import"./vendor-ui--7kLNIgQ.js";import"./vendor-charts-odGm-fv0.js";import"./vendor-icons-D7Wh9KcK.js";import"./vendor-supabase-BVvKO2AB.js";const C="https://sync-brevo.weversity.org/api",y="6LchKfQrAAAAAITPzYqH22lHGTyyMfTp4vVs5NGa",R="https://verify-captcha.weversity.org/api",G=({setPage:N})=>{I(y);const[a,j]=o.useState(""),[x,l]=o.useState(!1),[w,h]=o.useState(!1),[b,n]=o.useState(null),v=async t=>{t.preventDefault();const k=t.currentTarget;l(!0),n(null),h(!1);const r=new FormData(k),d=r.get("firstName"),c=r.get("lastName"),i=r.get("email").trim();if(!d||!c||!i){n("Please fill in all required fields (First Name, Last Name, Email)."),l(!1),window.scrollTo(0,0);return}if(!a||a.length<7){n("Please enter a valid cell number."),l(!1),window.scrollTo(0,0);return}if(!L(i)){n("Please enter a valid email address."),l(!1);return}try{const m=await new Promise((P,T)=>{window.grecaptcha.ready(()=>{window.grecaptcha.execute(y,{action:"intern_app"}).then(P).catch(T)})});if(!(await(await fetch(R,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:m})})).json()).success)throw new Error("Security check failed. Bots detected.");const S=r.getAll("availability_days"),A={firstName:d,lastName:c,preferredName:r.get("preferredName"),gender_male:r.get("gender_male")==="on",gender_female:r.get("gender_female")==="on",dob:r.get("dob"),email:i,cellNumber:a,streetAddress:r.get("streetAddress"),city:r.get("city"),state:r.get("state"),work_auth:r.get("work_auth"),availability_days:S,availableHours:r.get("availableHours")},{error:f}=await window.supabase.from("form_submissions").insert({form_type:"internship",data:A});if(f)throw f;const _=39;let s=a;s&&(s=s.replace(/[\s-]/g,""),s.startsWith("0")?s="+92"+s.substring(1):s.startsWith("+")||(s="+92"+s));const p={FIRSTNAME:d,LASTNAME:c};s&&/^\+[1-9]\d{9,14}$/.test(s)&&(p.SMS=s),console.log("Syncing with Brevo (Internship):",{email:i,brevoAttributes:p});const u=await fetch(C,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:i,attributes:p,listIds:[_]})}),g=await u.json();console.log("Brevo Sync Response (Internship):",g),u.ok||console.error("Brevo Sync failed with status:",u.status,g),h(!0),window.scrollTo(0,0)}catch(m){n(m.message||"Failed to submit application"),window.scrollTo(0,0)}finally{l(!1)}};return w?e.jsx("div",{className:"bg-brand-purple-light min-h-screen py-10 sm:py-16 flex items-center justify-center",children:e.jsxs("div",{className:"bg-white rounded-[15px] shadow-lg p-8 max-w-lg w-full text-center",children:[e.jsx("div",{className:"w-20 h-20 bg-green-100 rounded-full flex items-center justify-center mx-auto mb-6",children:e.jsx("svg",{className:"w-10 h-10 text-green-600",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),e.jsx("h2",{className:"text-3xl font-bold text-gray-900 mb-4",children:"Application Submitted!"}),e.jsx("p",{className:"text-gray-600 mb-8",children:"Thank you for applying to the WeVersity Internship Program. We have received your application and will review it shortly."}),e.jsx("button",{onClick:()=>N("home"),className:"w-full bg-brand-purple text-white font-bold py-3 px-4 rounded-lg hover:bg-brand-purple-dark transition-colors",children:"Return Home"})]})}):e.jsxs("div",{className:"bg-brand-purple-light py-10 sm:py-16",children:[e.jsxs(F,{defer:!1,children:[e.jsx("title",{children:"Internship Application | WeVersity"}),e.jsx("meta",{name:"description",content:"Apply for WeVersity's 3-Month Internship Program. Kickstart your career with hands-on experience in tech, design, marketing, and more."})]}),e.jsx("div",{className:"container mx-auto px-4",children:e.jsxs("div",{className:"max-w-3xl mx-auto",children:[e.jsxs("button",{onClick:()=>window.history.back(),className:"group flex items-center text-gray-600 hover:text-brand-purple font-semibold mb-4 transition-colors",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 mr-2 transform group-hover:-translate-x-1 transition-transform",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10 19l-7-7m0 0l7-7m-7 7h18"})}),"Back to Internship Page"]}
1),e.jsxs("div",{className:"bg-white rounded-[15px] shadow-lg border-2 border-brand-purple/20 overflow-hidden",children:[e.jsx("header",{className:"bg-brand-purple text-white text-center py-6",children:e.jsx("h1",{className:"text-3xl font-bold",children:"Apply for Weversity's 3-Month Internship"})}),e.jsxs("form",{className:"p-6 sm:p-10 space-y-6",onSubmit:v,children:[b&&e.jsx("div",{className:"p-4 bg-red-100 text-red-700 rounded-lg text-sm",children:b}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"firstName",className:"block text-sm font-medium text-gray-700 mb-1",children:["First Name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",id:"firstName",name:"firstName",className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-brand-purple focus:border-brand-purple",placeholder:"First Name"})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"lastName",className:"block text-sm font-medium text-gray-700 mb-1",children:["Last Name ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",id:"lastName",name:"lastName",className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-brand-purple focus:border-brand-purple",placeholder:"Last Name"})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"preferredName",className:"block text-sm font-medium text-gray-700 mb-1",children:"Preferred Name"}),e.jsx("input",{type:"text",id:"preferredName",name:"preferredName",className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-brand-purple focus:border-brand-purple",placeholder:"Preferred Name"})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-1",children:"Gender"}),e.jsxs("div",{className:"flex items-center space-x-4 mt-2",children:[e.jsxs("label",{className:"flex items-center",children:[e.jsx("input",{type:"checkbox",name:"gender_male",className:"h-4 w-4 text-brand-purple border-gray-300 rounded focus:ring-brand-purple"}),e.jsx("span",{className:"ml-2 text-sm text-gray-700",children:"Male"})]}),e.jsxs("label",{className:"flex items-center",children:[e.jsx("input",{type:"checkbox",name:"gender_female",className:"h-4 w-4 text-brand-purple border-gray-300 rounded focus:ring-brand-purple"}),e.jsx("span",{className:"ml-2 text-sm text-gray-700",children:"Female"})]})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"dob",className:"block text-sm font-medium text-gray-700 mb-1",children:"Date of Birth"}),e.jsx("input",{type:"text",id:"dob",name:"dob",className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-brand-purple focus:border-brand-purple",placeholder:"Date of Birth",onFocus:t=>t.target.type="date",onBlur:t=>t.target.type="text"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6",children:[e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 mb-1",children:["E-mail ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"email",id:"email",name:"email",className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-brand-purple focus:border-brand-purple",placeholder:"E-mail",pattern:"^[a-zA-Z0-9]+([._-][a-zA-Z0-9]+)*@[a-zA-Z0-9.-]+\\.[a-zA-Z]{2,}$",title:"Please enter a valid email address without consecutive dots or special characters at the start/end."})]}),e.jsxs("div",{children:[e.jsxs("label",{htmlFor:"cellNumber",className:"block text-sm font-medium text-gray-700 mb-1",children:["Cell Number ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx(E,{value:a,onChange:j,required:!0})]})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"streetAddress",className:"block text-sm font-medium text-gray-700 mb-1",children:"Permanent Address"}),e.jsx("input",{type:"text",id:"streetAddress",name:"streetAddress",className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-brand-purple focus:border-brand-purple",placeholder:"Street Address"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-6 mt-4",children:[e.jsx("input",{type:"text",name:"city",defaultValue:"Totowa",className:"w-full px-4 py-2 border border-gray-300 rounded-md",placeholder:"City  / County"}),e.jsx("input",{type:"text",name:"state",defaultValue:"New Jersey (NJ)",className:"w-full px-4 py-2 border border-gray-300 rounded-md",placeholder:"State / Province"})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Are you authorized to work in the United States?"}),e.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsxs("label",{className:"flex items-center",children:[e.jsx("input",{type:"radio",name:"work_auth",value:"yes",className:"h-4 w-4 text-brand-purple border-gray-300 focus:ring-brand-purple"}),e.jsx("span",{className:"ml-2 text-sm text-gray-700",children:"Yes"})]}),e.jsxs("label",{className:"flex items-center",children:[e.jsx("input",{type:"radio",name:"work_auth",value:"no",className:"h-4 w-4 text-brand-purple border-gray-300 focus:ring-brand-purple"}),e.jsx("span",{className:"ml-2 text-sm text-gray-700",children:"No"})]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Select the day(s) you're available for work"}),e.jsx("div",{className:"space-y-2",children:["Monday","Tuesday","Wednesday","Thursday","Frid
1ay"].map(t=>e.jsxs("label",{className:"flex items-center",children:[e.jsx("input",{type:"checkbox",name:"availability_days",value:t.toLowerCase(),className:"h-4 w-4 text-brand-purple border-gray-300 rounded focus:ring-brand-purple"}),e.jsx("span",{className:"ml-3 text-sm text-gray-700",children:t})]},t))})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"availableHours",className:"block text-sm font-medium text-gray-700 mb-1",children:"List your available hours for work"}),e.jsx("input",{type:"text",id:"availableHours",name:"availableHours",className:"w-full px-4 py-2 border border-gray-300 rounded-md focus:ring-brand-purple focus:border-brand-purple"})]}),e.jsx("div",{className:"pt-4",children:e.jsx("button",{type:"submit",disabled:x,className:"w-full bg-brand-purple text-white font-bold py-3 px-4 rounded-lg hover:bg-brand-purple-dark transition-colors disabled:opacity-50",children:x?"Sending...":"Send"})})]})]})]})})]})};export{G 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.