1/*! For license information please see 8005.e51d15cd.chunk.js.LICENSE.txt */ 2"use strict";(self.webpackChunkymca_website=self.webpackChunkymca_website||[]).push([[8005],{2154:(e,s,t)=>{t.d(s,{A:()=>i});var a=t(9722);const r={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_API_URL_LIVE:"https://api.indianymca.co.uk"}.REACT_APP_API_URL||"https://api.indianymca.co.uk",n=a.A.create({baseURL:r});n.interceptors.request.use(e=>{try{const s=localStorage.getItem("authToken");s&&(e.headers.Authorization="Bearer ".concat(s),e.headers["Content-Type"]="application/json")}catch(s){console.log("Error parsing token from localStorage:",s)}return e}),n.interceptors.response.use(e=>e,e=>{if(null!==e&&void 0!==e&&e.response){var s,t;"Session Expired"===(null===e||void 0===e||null===(s=e.response)||void 0===s||null===(t=s.data)||void 0===t?void 0:t.message)&&window.dispatchEvent(new Event("SESSION_EXPIRED"))}return Promise.reject(e)});const i=n},2911:(e,s,t)=>{t.d(s,{E:()=>a,n:()=>r});const a=[{room:"Single Common",fiftyOneWeeks:13839,thirtyNineWeeks:10731},{room:"Single En-suite (Jubilee Block)",fiftyOneWeeks:26953.5,thirtyNineWeeks:20611.5},{room:"Single En-suite (Heritage Block)",fiftyOneWeeks:24480,thirtyNineWeeks:19720},{room:"Double Room En-suite (Jubilee Block)",fiftyOneWeeks:35700,thirtyNineWeeks:27300},{room:"Single Common (with Balcony)",fiftyOneWeeks:14168,thirtyNineWeeks:10976}],r=[{room:"Single Common",twentyFourWeeks:8806},{room:"Single En-suite (Jubilee Block)",twentyFourWeeks:15888},{room:"Single En-suite (Heritage Block)",twentyFourWeeks:12432},{room:"Double Room En-suite (Jubilee Block)",twentyFourWeeks:16800},{room:"Single Common (with Balcony)",twentyFourWeeks:8946}]},4805:(e,s,t)=>{t.d(s,{A:()=>a});const a=(0,t(7784).A)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]])},5807:(e,s,t)=>{t.d(s,{A:()=>r});t(5043);var a=t(579);const r=e=>{let{size:s=20}=e;const t="number"===typeof s?"".concat(s,"px"):s;return(0,a.jsx)("div",{className:"spinner-center",children:(0,a.jsxs)("svg",{className:"loader",style:{width:t},viewBox:"0 0 384 384",xmlns:"http://www.w3.org/2000/svg",children:[(0,a.jsx)("circle",{class:"active",pathLength:"360",fill:"transparent","stroke-width":"32",cx:"192",cy:"192",r:"176"}),(0,a.jsx)("circle",{class:"track",pathLength:"360",fill:"transparent","stroke-width":"32",cx:"192",cy:"192",r:"176"})]})})}},7097:(e,s,t)=>{t.d(s,{n:()=>k});var a,r,n,i,l,o=t(9379),c=t(5043),d=t(9790),m=t(5149),h=t(8458),u=t(6562),p=t(4558),x=t(5239),g=t(1454),b=t(329),y=t(9723),v=(a=new WeakMap,r=new WeakMap,n=new WeakMap,i=new WeakMap,l=new WeakSet,class extends b.Q{constructor(e,s){super(),(0,d.A)(this,l),(0,m.A)(this,a,void 0),(0,m.A)(this,r,void 0),(0,m.A)(this,n,void 0),(0,m.A)(this,i,void 0),(0,p.A)(a,this,e),this.setOptions(s),this.bindMethods(),(0,u.A)(l,this,f).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var s;const t=this.options;this.options=(0,h.A)(a,this).defaultMutationOptions(e),(0,y.f8)(this.options,t)||(0,h.A)(a,this).getMutationCache().notify({type:"observerOptionsUpdated",mutation:(0,h.A)(n,this),observer:this}),null!==t&&void 0!==t&&t.mutationKey&&this.options.mutationKey&&(0,y.EN)(t.mutationKey)!==(0,y.EN)(this.options.mutationKey)?this.reset():"pending"===(null===(s=(0,h.A)(n,this))||void 0===s?void 0:s.state.status)&&(0,h.A)(n,this).setOptions(this.options)}onUnsubscribe(){var e;this.hasListeners()||(null===(e=(0,h.A)(n,this))||void 0===e||e.removeObserver(this))}onMutationUpdate(e){(0,u.A)(l,this,f).call(this),(0,u.A)(l,this,N).call(this,e)}getCurrentResult(){return(0,h.A)(r,this)}reset(){var e;null===(e=(0,h.A)(n,this))||void 0===e||e.removeObserver(this),(0,p.A)(n,this,void 0),(0,u.A)(l,this,f).call(this),(0,u.A)(l,this,N).call(this)}mutate(e,s){var t;return(0,p.A)(i,this,s),null===(t=(0,h.A)(n,this))||void 0===t||t.removeObserver(this),(0,p.A)(n,this,(0,h.A)(a,this).getMutationCache().build((0,h.A)(a,this),this.options)),(0,h.A)(n,this).addObserver(this),(0,h.A)(n,this).execute(e)}});function f(){var e,s;const t=null!==(e=null===(s=(0,h.A)(n,this))||void 0===s?void 0:s.state)&&void 0!==e?e:(0,x.$)();(0,p.A)(r,this,(0,o.A)((0,o.A)({},t),{},{isPending:"pending"===t.status,isSuccess:"success"===t.status,isError:"error"===t.status,isIdle:"idle"===t.status,mutate:this.mutate,reset:this.reset}))}function N(e){g.jG.batch(()=>
2{if((0,h.A)(i,this)&&this.hasListeners()){const u=(0,h.A)(r,this).variables,p=(0,h.A)(r,this).context,x={client:(0,h.A)(a,this),meta:this.options.meta,mutationKey:this.options.mutationKey};var s,t,n,l;if("success"===(null===e||void 0===e?void 0:e.type))null===(s=(t=(0,h.A)(i,this)).onSuccess)||void 0===s||s.call(t,e.data,u,p,x),null===(n=(l=(0,h.A)(i,this)).onSettled)||void 0===n||n.call(l,e.data,null,u,p,x);else if("error"===(null===e||void 0===e?void 0:e.type)){var o,c,d,m;null===(o=(c=(0,h.A)(i,this)).onError)||void 0===o||o.call(c,e.error,u,p,x),null===(d=(m=(0,h.A)(i,this)).onSettled)||void 0===d||d.call(m,void 0,e.error,u,p,x)}}this.listeners.forEach(e=>{e((0,h.A)(r,this))})})}var j=t(3248);function k(e,s){const t=(0,j.jE)(s),[a]=c.useState(()=>new v(t,e));c.useEffect(()=>{a.setOptions(e)},[a,e]);const r=c.useSyncExternalStore(c.useCallback(e=>a.subscribe(g.jG.batchCalls(e)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),n=c.useCallback((e,s)=>{a.mutate(e,s).catch(y.lQ)},[a]);if(r.error&&(0,y.GU)(a.options.throwOnError,[r.error]))throw r.error;return(0,o.A)((0,o.A)({},r),{},{mutate:n,mutateAsync:r.mutate})}},7784:(e,s,t)=>{t.d(s,{A:()=>h});var a=t(9379),r=t(3986),n=t(5043);const i=e=>{const s=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,s,t)=>t?t.toUpperCase():s.toLowerCase()))(e);return s.charAt(0).toUpperCase()+s.slice(1)},l=function(){for(var e=arguments.length,s=new Array(e),t=0;t<e;t++)s[t]=arguments[t];return s.filter((e,s,t)=>Boolean(e)&&""!==e.trim()&&t.indexOf(e)===s).join(" ").trim()};var o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const c=["color","size","strokeWidth","absoluteStrokeWidth","className","children","iconNode"],d=(0,n.forwardRef)((e,s)=>{let{color:t="currentColor",size:i=24,strokeWidth:d=2,absoluteStrokeWidth:m,className:h="",children:u,iconNode:p}=e,x=(0,r.A)(e,c);return(0,n.createElement)("svg",(0,a.A)((0,a.A)((0,a.A)({ref:s},o),{},{width:i,height:i,stroke:t,strokeWidth:m?24*Number(d)/Number(i):d,className:l("lucide",h)},!u&&!(e=>{for(const s in e)if(s.startsWith("aria-")||"role"===s||"title"===s)return!0})(x)&&{"aria-hidden":"true"}),x),[...p.map(e=>{let[s,t]=e;return(0,n.createElement)(s,t)}),...Array.isArray(u)?u:[u]])}),m=["className"],h=(e,s)=>{const t=(0,n.forwardRef)((t,o)=>{let{className:c}=t,h=(0,r.A)(t,m);return(0,n.createElement)(d,(0,a.A)({ref:o,iconNode:s,className:l("lucide-".concat((u=i(e),u.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase())),"lucide-".concat(e),c)},h));var u});return t.displayName=i(e),t}},8005:(e,s,t)=>{t.r(s),t.d(s,{default:()=>p});var a=t(9379),r=t(7097),n=t(5043),i=t(3768),l=t(8163),o=t(2154),c=t(5807),d=t(2911),m=t(4805),h=t(579);const u={parentName:"",parentMobile:"",parentEmail:"",emergencyName:"",emergencyRelationship:"",emergencyMobile:"",activities:{reading:!1,sports_gym:!1,arts_and_crafts:!1,travel:!1,computers:!1,music_singing:!1,watching_movies:!1,shopping:!1,family_time:!1,cars:!1,time_with_friends:!1,cooking:!1,writing:!1},sports:{basketball:!1,soccer:!1,cricket:!1,tennis:!1,gym_fitness:!1},noSports:!1,ymcaName:"",agencyName:"",documentsPdf:[],declarationsInfoCorrect:!1,declarationsAbideRules:!1},p=()=>{var e;const[s,t]=(0,n.useState)(u),[p,x]=(0,n.useState)({}),[g,b]=(0,n.useState)(["","","",""]),y=(0,l.zy)(),v=(0,l.Zp)(),{applicantType:f,maritalStatus:N,applicationId:j,rooms:k,stayDuration:w}=y.state||{};console.log("application type rooms and stay duration",k,w);const{mutate:A,isPending:E}=(0,r.n)({mutationKey:["formThree"],mutationFn:e=>{let{payload:s,id:t}=e;return o.A.post("/require/form-three/".concat(t),s)},onSuccess:()=>{i.Ay.success("Form submitted successfully"),localStorage.removeItem("applicationId"),localStorage.removeItem("formOneComplete"),localStorage.removeItem("formTwoComplete"),sessionStorage.clear(),v("/dashboard")},onError:e=>{var s,t;i.Ay.error((null===e||void 0===e||null===(s=e.response)||void 0===s||null===(t=s.data)||void 0===t?void 0:t.message)||"Form submission failed")}}),S=e=>{x(s=>{if(!s[e])return s;const t=(0,a.A)({},s);return delete t[e],t})},C=e=>{const{name:s,value:r}=e.target;S(s),t(e=>(0,a.A)((0,a.A)({},e),{},{[s]:r}))},M=e=>{const{name:s,checked:r}=e.target;S(s),t(e=>(0,a.A)((0,a.A)({},e),{},{[s]:r}))},_=(e,s)=>{t(t=>{let r=(0,a.A)({},t);return"sports"===e&&t.noSports&&(r.noSports=!1),r[e]=(0,a.A)((0,a.A)({},t[e]),{},{[s]:!t[e][s]}),r}),S(e),"sports"===e?(S("sports"),S("noSports")):S("activities")},R="mt-1 block w-full rounded-md border border-gray-300 px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-blue-500",P="block text-sm font-medium text-gray-700",W="mt-1 text-xs text-red-500",O=(()=>{const e=("student"===f?d.E:d.n).find(e=>e.room===k);if(!e)return 0;switch(w){case"51-weeks":return e.fiftyOneWeeks;case"39-weeks":return e.thirtyNineWeeks;case"24-weeks":return e.twentyFourWeeks;default:return 0}})();return(0,h.jsx)("div",{className:"min-h-screen bg-gray-100 flex items-start justify-center py-10 px-4",children:(0,h.jsxs)("form",{onSubmit:async e=>{if(e.preventDefault(),!(()=>{const e={},t=["emergencyName","emergencyRelationship","emergencyMobile","ymcaName","agencyName"];"Married"===N&&t.push("spouseName","spouseMobile","spouseEmail"),t.forEach(t=>{const a=s[t];a&&""!==a.trim()||(e[t]="This field is required")});const a=/\S+@\S+\.\S+/;s.parentEmail&&!a.test(s.parentEmail)&&(e.parentEmail="Enter a valid email"),"Married"===N&&s.spouseEmail&&!a.test(s.spouseEmail)&&(e.spouseEmail="Enter a valid email");const r=/^[0-9]{7,15}$/;return s.parentMobile&&!r.test(s.parentMobile)&&(e.parentMobile="Enter a valid mobile number"),s.emergencyMobile&&!r.test(s.emergencyMobile)&&(e.emergencyMobile="Enter a valid mobile number"),"Married"===N&&s.spouseMobile&&!r.test(s.spouseMobile)&&(e.spouseMobile="Enter a valid mobile number"),Object.values(s.activities).some(Boolean)||(e.activities="Select at least one activity"),Object.values(s.sports).some(Boolean)||s.noSports||(e.sports="Select at least one sport or choose 'I don't like sports'"),("student"===f?s.documentsPdf&&4===s.documentsPdf.length:s.documentsPdf&&3===s.documentsPdf.length)||(e.documentsPdf="Upload All ".concat("student"===f?4:3," PDF files (MAX 4MB on each)")),s.declarationsInfoCorrect||(e.declarationsInfoCorrect="You must confirm this declaration"),s.declarationsAbideRules||(e.declarationsAbideRules="You must accept this declaration"),x(e),0===Object.keys(e).length})())return i.Ay.error("Please fill out all fields");const t={parent_name:(a=s).parentName,parent_mobile:a.parentMobile,parent_email:a.parentEmail,spouse_name:a.spouseName,spouse_mobile:a.spouseMobile,spouse_email:a.spouseEmail,emergency_contact_name:a.emergencyName,emergency_contact_relationship:a.emergencyRelationship,emergency_contact_mobile:a.emergencyMobile,activities:a.activities,sports:a.sports,no_sports:a.noSports,referred_ymca_name:a.ymcaName,referred_agency_name:a.agencyName,documents_pdf:a.documentsPdf,fees:O,declaration_info_correct:a.declarationsInfoCorrect,declaration_abide_rules:a.declarationsAbideRules};var a;A({payload:t,id:j})},className:"w-full max-w-6xl bg-white rounded-lg shadow-md p-6 md:p-8",children:[(0,h.jsx)("h1",{className:"text-xl md:text-2xl font-semibold text-blue-900 text-center",children:"APPLICATION FORM FOR LONG TERM RESIDENCE FORM - 3"}),(0,h.jsx)("h1",{className:"text-xl md:text-2xl font-semibold text-blue-900 text-center",children:"Additional Information & Document Upload"}),(0,h.jsx)("p",{className:"text-xs text-gray-500 mt-1",children:"(All columns to be filled
2in BLOCK LETTERS)"}),(0,h.jsx)("p",{className:"text-xs font-semibold text-gray-500 mt-1",children:"NOTE: By submitting this application, you agree to the minimum contract duration applicable to your category: 12 months for Students and 6 months for Trainees."}),(0,h.jsx)("h2",{className:"mt-6 mb-2 text-sm font-semibold text-gray-800",children:"Parents Contact Details"}),(0,h.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,h.jsxs)("div",{children:[(0,h.jsx)("label",{className:P,children:"Parent Name"}),(0,h.jsx)("input",{type:"text",name:"parentName",value:s.parentName,onChange:C,className:R,placeholder:"Enter your parent name"}),p.parentName&&(0,h.jsx)("p",{className:W,children:p.parentName})]}),(0,h.jsxs)("div",{children:[(0,h.jsx)("label",{className:P,children:"Mobile"}),(0,h.jsx)("input",{type:"tel",name:"parentMobile",value:s.parentMobile,onChange:C,className:R,placeholder:"Enter your parent mobile number"}),p.parentMobile&&(0,h.jsx)("p",{className:W,children:p.parentMobile})]}),(0,h.jsxs)("div",{children:[(0,h.jsx)("label",{className:P,children:"Email Address"}),(0,h.jsx)("input",{type:"email",name:"parentEmail",value:s.parentEmail,onChange:C,className:R,placeholder:"Enter your parent email address"}),p.parentEmail&&(0,h.jsx)("p",{className:W,children:p.parentEmail})]})]}),"Married"===N&&(0,h.jsx)("h2",{className:"mt-6 mb-2 text-sm font-semibold text-gray-800",children:"Spouse Contact Details"}),(0,h.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:"Married"===N&&(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("div",{children:[(0,h.jsxs)("label",{className:P,children:["Name of Spouse",(0,h.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,h.jsx)("input",{type:"text",name:"spouseName",value:s.spouseName,onChange:C,className:R,placeholder:"Enter your spouse's name"}),p.spouseName&&(0,h.jsx)("p",{className:W,children:p.spouseName})]}),(0,h.jsxs)("div",{children:[(0,h.jsxs)("label",{className:P,children:["Mobile",(0,h.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,h.jsx)("input",{type:"tel",name:"spouseMobile",value:s.spouseMobile,onChange:C,className:R,placeholder:"Enter your spouse's mobile number"}),p.spouseMobile&&(0,h.jsx)("p",{className:W,children:p.spouseMobile})]}),(0,h.jsxs)("div",{children:[(0,h.jsxs)("label",{className:P,children:["Email Address",(0,h.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,h.jsx)("input",{type:"email",name:"spouseEmail",value:s.spouseEmail,onChange:C,className:R,placeholder:"Enter your spouse's email address"}),p.spouseEmail&&(0,h.jsx)("p",{className:W,children:p.spouseEmail})]})]})}),(0,h.jsx)("h2",{className:"mt-8 mb-2 text-sm font-semibold text-gray-800",children:"In case of emergency contact details"}),(0,h.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-6",children:[(0,h.jsxs)("div",{children:[(0,h.jsxs)("label",{className:P,children:["Name",(0,h.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,h.jsx)("input",{type:"text",name:"emergencyName",value:s.emergencyName,onChange:C,className:R,placeholder:"Enter your emergency contact name"}),p.emergencyName&&(0,h.jsx)("p",{className:W,children:p.emergencyName})]}),(0,h.jsxs)("div",{children:[(0,h.jsxs)("label",{className:P,children:["Relationship",(0,h.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,h.jsx)("input",{type:"text",name:"emergencyRelationship",value:s.emergencyRelationship,onChange:C,className:R,placeholder:"Enter your emergency contact relationship"}),p.emergencyRelationship&&(0,h.jsx)("p",{className:W,children:p.emergencyRelationship})]}),(0,h.jsxs)("div",{children:[(0,h.jsxs)("label",{className:P,children:["Mobile",(0,h.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,h.jsx)("input",{type:"tel",name:"emergencyMobile",value:s.emergencyMobile,onChange:C,className:R,placeholder:"Enter your emergency contact mobile number"}),p.emergencyMobile&&(0,h.jsx)("p",{className:W,children:p.emergencyMobile})]})]}),(0,h.jsxs)("h2",{className:"mt-8 mb-2 text-sm font-semibold text-gray-800",children:["What activities do you enjoy? (Tick all that apply)",(0,h.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,h.jsx)("div",{className:"flex flex-wrap gap-4 text-sm",children:[{key:"reading",label:"Reading"},{key:"sports_gym",label:"Sports/gym"},{key:"arts_and_crafts",label:"Arts & Crafts"},{key:"travel",label:"Travel"},{key:"computers",label:"Computers"},{key:"music_singing",label:"Music / Singing"},{key:"watching_movies",label:"Watching Movies"},{key:"shopping",label:"Shopping"},{key:"family_time",label:"Family Time"},{key:"cars",label:"Cars"},{key:"time_with_friends",label:"Time with friends"},{key:"cooking",label:"Cooking"},{key:"writing",label:"Writing"}].map(e=>{let{key:t,label:a}=e;return(0,h.jsxs)("label",{className:"flex items-center gap-2",children:[(0,h.jsx)("input",{type:"checkbox",checked:s.activities[t],onChange:()=>_("activities",t)}),(0,h.jsx)("span",{children:a})]},t)})}),p.activities&&(0,h.jsx)("p",{className:W,children:p.activities}),(0,h.jsxs)("h2",{className:"mt-8 mb-2 text-sm font-semibold text-gray-800",children:["What sports do you like to play?
2(Tick all that apply)",(0,h.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,h.jsxs)("div",{className:"flex flex-wrap gap-4 text-sm",children:[[{key:"basketball",label:"Basketball"},{key:"soccer",label:"Soccer"},{key:"cricket",label:"Cricket"},{key:"tennis",label:"Tennis"},{key:"gym_fitness",label:"Gym / Fitness"}].map(e=>{let{key:t,label:a}=e;return(0,h.jsxs)("label",{className:"flex items-center gap-2",children:[(0,h.jsx)("input",{type:"checkbox",checked:s.sports[t],onChange:()=>_("sports",t),disabled:s.noSports}),(0,h.jsx)("span",{className:s.noSports?"text-gray-400":"",children:a})]},t)}),(0,h.jsxs)("label",{className:"flex items-center gap-2",children:[(0,h.jsx)("input",{type:"checkbox",name:"noSports",checked:s.noSports,onChange:e=>{const{checked:s}=e.target;t(e=>(0,a.A)((0,a.A)({},e),{},{noSports:s,sports:s?Object.fromEntries(Object.keys(e.sports).map(e=>[e,!1])):e.sports})),S("sports"),S("noSports")}}),(0,h.jsx)("span",{children:"I don't like sports"})]})]}),p.sports&&(0,h.jsx)("p",{className:W,children:p.sports}),(0,h.jsxs)("div",{className:"mt-8",children:[(0,h.jsxs)("label",{className:P,children:["Please state the name of the referred YMCA affiliated to the NCYI",(0,h.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,h.jsx)("input",{type:"text",name:"ymcaName",value:s.ymcaName,onChange:C,className:R,placeholder:"Enter the name of the referred YMCA affiliated to the NCYI"}),p.ymcaName&&(0,h.jsx)("p",{className:W,children:p.ymcaName})]}),(0,h.jsxs)("div",{className:"mt-4",children:[(0,h.jsxs)("label",{className:P,children:["Please state if referred by any agency/institution/individual",(0,h.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,h.jsx)("input",{type:"text",name:"agencyName",value:s.agencyName,onChange:C,className:R,placeholder:"Enter the name of the referred agency/institution/individual"}),p.agencyName&&(0,h.jsx)("p",{className:W,children:p.agencyName})]}),(0,h.jsxs)("div",{className:"mt-8",children:[(0,h.jsxs)("div",{className:"flex items-center justify-between mb-6",children:[(0,h.jsxs)("div",{children:[(0,h.jsxs)("h3",{className:"text-lg font-semibold text-gray-900",children:["Required Documents",(0,h.jsx)("span",{className:"text-red-500",children:"*"})]}),(0,h.jsx)("p",{className:"text-sm text-gray-500 mt-1",children:"Upload all documents in PDF format. Each document must be less than 4MB in size. You can upload up to Max 12mb Total."})]}),(0,h.jsxs)("span",{className:"text-xs text-gray-400 bg-gray-100 px-3 py-1 rounded-full",children:[(null===(e=s.documentsPdf)||void 0===e?void 0:e.filter(Boolean).length)||0,"/4 uploaded"]})]}),(0,h.jsxs)("div",{className:"space-y-3",children:[("student"===f?["Passport Size Photograph","Copy of Passport","Admission Letter","Sponsorship Letter"]:["Passport Size Photograph","Copy of Passport","Copy of offer letter from Employer/Sponsor"]).map((e,r)=>{var n;return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsxs)("div",{className:"group flex flex-col sm:flex-row sm:items-center gap-3 p-3 rounded-xl bg-gray-50 hover:bg-white hover:shadow-md transition-all duration-200 border border-transparent hover:border-gray-200",children:[(0,h.jsxs)("div",{className:"flex items-center gap-3 sm:w-48 flex-shrink-0",children:[(0,h.jsx)("span",{className:"text-xs font-mono text-gray-400 w-5",children:(r+1).toString().padStart(2,"0")}),(0,h.jsx)("span",{className:"text-sm font-medium text-gray-700",children:e})]}),(0,h.jsxs)("div",{className:"flex-1 flex flex-wrap items-center gap-2",children:[(0,h.jsxs)("label",{className:"cursor-pointer flex-1 min-w-[120px]",children:[(0,h.jsx)("input",{type:"file",accept:"application/pdf",className:"hidden",onChange:e=>((e,s)=>{var r;const n=null===(r=e.target.files)||void 0===r?void 0:r[0];if(!n)return;if(n.size>4194304){const e=[...g];return e[s]="File size must be less than 4MB",void b(e)}const i=[...g];i[s]="",b(i);const l=new FileReader;l.onloadend=()=>{const e={name:n.name,size:n.size,type:n.type,base64:l.result};t(t=>{const r=[...t.documentsPdf];return r[s]=e,(0,a.A)((0,a.A)({},t),{},{documentsPdf:r})})},l.readAsDataURL(n)})(e,r)}),(0,h.jsxs)("div",{className:"flex items-center justify-center gap-2 px-4 py-2 text-sm font-medium text-blue-600 bg-white border border-blue-200 rounded-lg hover:bg-blue-50 hover:border-blue-400 transition-all duration-200 group-hover:border-blue-300",children:[(0,h.jsx)("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,h.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",d:"M12 4v16m8-8H4"})}),"Upload"]})]}),(0,h.jsx)("div",{className:"flex-1 min-w-[100px]",children:null!==(n=s.documentsPdf)&&void 0!==n&&n[r]?(0,h.jsxs)("div",{className:"flex items-center gap-2 text-sm",children:[(0,h.jsx)("span",{className:"text-green-600",children:"\u2713"}),(0,h.jsx)("span",{className:"text-gray-600 truncate",children:s.documentsPdf[r].name})]}):(0,h.jsx)("span",{className:"text-sm text-gray-400",children:"No file selected"})})]})]},r),g[r]&&(0,h.jsx)("p",{className:"text-red-500 text-xs mt-1",children:g[r]})]})}),p.documentsPdf&&(0,h.jsx)("p",{className:W,children:p.documentsPdf})]})]}),(0,h.jsxs)("div",{className:"mt-8 overflow-hidden rounded-2xl bg-blue-50 border border-gray-200/80",children:[(0,h.jsxs)("div",{className:"flex items-center justify-between px-8 py-4 border-b border-gray-200/60",children:[(0,h.jsxs)("div",{className:"flex items-center gap-4",children:[(0,h.jsx)("div",{className:"h-10 w-1.5 rounded-full bg-blue-600"}),(0,h.jsxs)("div",{children:[(0,h.jsx)("h2",{className:"text-lg font-semibold text-gray-900 tracking-tight",children:"Accommodation Summary"}),(0,h.jsx)("p",{className:"text-sm text-gray-500 mt-0.5",children:"Review your booking details"})]})]}),(0,h.jsx)("span",{className:"inline-flex items-center rounded-full bg-blue-50 px-4 py-1.5 text-sm font-medium text-blue-700 ring-1 ring-inset ring-blue-700/10",children:f})]}),(0,h.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-5 p-6",children:[(0,h.jsxs)("div",{className:"group relative overflow-hidden rounded-xl border border-gray-200/60 bg-white p-6 transition-all hover:border-blue-200 hover:shadow-sm",children:[(0,h.jsx)("div",{className:"absolute right-0 top-0 h-20 w-20 -translate-y-8 translate-x-8 rounded-full bg-blue-50/30 blur-2xl"}),(0,h.jsxs)("div",{className:"relative",children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,h.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3 12l2-2m0 0l7-7 7 7M5 10v10a1 1 0 001 1h3m10-11l2 2m-2-2v10a1 1 0 01-1 1h-3m-6 0a1 1 0 001-1v-4a1 1 0 011-1h2a1 1 0 011 1v4a1 1 0 001 1m-6 0h6"})}),(0,h.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-400",children:"Room Type"})]}),(0,h.jsx)("p",{className:"mt-3 text-base font-semibold text-gray-900",children:k})]})]}),(0,h.jsxs)("div",{className:"group relative overflow-hidden rounded-xl border border-gray-200/60 bg-white p-6 transition-all hover:border-blue-200 hover:shadow-sm",children:[(0,h.jsx)("div",{className:"absolute right-0 top-0 h-20 w-20 -translate-y-8 translate-x-8 rounded-full bg-blue-50/30 blur-2xl"}),(0,h.jsxs)("div",{className:"relative",children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)("svg",{className:"h-4 w-4 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,h.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"})}),(0,h.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-gray-400",children:"Stay Duration"})]}),(0,h.jsx)("p",{className:"mt-3 text-base font-semibold text-gray-900",children:null===w||void 0===w?void 0:w.replace("-"," ")})]})]}),(0,h.jsxs)("div",{className:"relative overflow-hidden rounded-xl bg-gradient-to-br from-blue-600 via-blue-700 to-blue-800 p-6 shadow-lg shadow-blue-600/20",children:[(0,h.jsx)("div",{className:"absolute -right-12 -top-12 h-32 w-32 rounded-full bg-blue-400/20 blur-2xl"}),(0,h.jsx)("div",{className:"absolute -bottom-12 -left-12 h-32 w-32 rounded-full bg-blue-400/10 blur-2xl"}),(0,h.jsxs)("div",{className:"relative",children:[(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)("svg",{className:"h-4 w-4 text-blue-300",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,h.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 8c-1.657 0-3 .895-3 2s1.343 2 3 2 3 .895 3 2-1.343 2-3 2m0-8c1.11 0 2.08.402 2.599 1M12 8V7m0 1v8m0 0v1m0-1c-1.11 0-2.08-.402-2.599-1M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,h.jsx)("p",{className:"text-xs font-medium uppercase tracking-wider text-blue-300",children:"Total Amount"})]}),(0,h.jsxs)("div",{className:"mt-3 flex items-end gap-1.5",children:[(0,h.jsx)("span",{className:"text-lg font-semibold text-blue-200",children:"\xa3"}),(0,h.jsx)("span",{className:"text-3xl font-extrabold text-white tracking-tight",children:null===O||void 0===O?void 0:O.toLocaleStr
2ing()})]})]})]})]}),(0,h.jsx)("div",{className:"border-t border-gray-200/60 bg-gray-50/50 px-8 py-4",children:(0,h.jsxs)("div",{className:"flex items-center gap-2",children:[(0,h.jsx)("svg",{className:"h-3.5 w-3.5 text-gray-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:(0,h.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),(0,h.jsx)("p",{className:"text-xs text-gray-400",children:"Fees calculated based on your selected accommodation duration"})]})})]}),(0,h.jsxs)("div",{className:"mt-8 space-y-2 text-sm",children:[(0,h.jsxs)("label",{className:"flex items-start gap-2",children:[(0,h.jsx)("input",{type:"checkbox",name:"declarationsInfoCorrect",checked:s.declarationsInfoCorrect,onChange:M,className:"mt-1"}),(0,h.jsxs)("span",{children:["I hereby declare that all the information given above is correct.",(0,h.jsx)("span",{className:"text-red-500",children:"*"})]})]}),p.declarationsInfoCorrect&&(0,h.jsx)("p",{className:W,children:p.declarationsInfoCorrect}),(0,h.jsxs)("label",{className:"flex items-start gap-2",children:[(0,h.jsx)("input",{type:"checkbox",name:"declarationsAbideRules",checked:s.declarationsAbideRules,onChange:M,className:"mt-1"}),(0,h.jsxs)("span",{children:["I hereby undertake that I will abide by the rules and regulations of the Hostel.",(0,h.jsx)("span",{className:"text-red-500",children:"*"})]})]}),p.declarationsAbideRules&&(0,h.jsx)("p",{className:W,children:p.declarationsAbideRules})]}),(0,h.jsxs)("div",{className:"mt-8 flex items-center gap-4 justify-end",children:[(0,h.jsxs)("button",{type:"button",onClick:()=>{localStorage.removeItem("applicationId"),localStorage.removeItem("formOneComplete"),localStorage.removeItem("formTwoComplete"),sessionStorage.clear(),v("/form1"),window.location.reload()},className:"inline-flex items-center justify-center gap-2 rounded-lg border border-red-200 bg-red-50 px-4 py-2 text-sm font-medium text-red-600 shadow-sm transition-all duration-200 hover:border-red-300 hover:bg-red-100 hover:text-red-700 active:scale-95",children:[(0,h.jsx)(m.A,{size:16}),"Reset"]}),(0,h.jsxs)("button",{type:"submit",disabled:E,className:"".concat(E?"cursor-not-allowed opacity-50":"","px-6 py-2 rounded-md bg-blue-600 text-white text-sm font-medium hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500"),children:[" ",E?(0,h.jsxs)("div",{className:"flex items-center gap-2 px-3",children:[(0,h.jsx)(c.A,{}),(0,h.jsx)("span",{children:"Submiting..."})]}):"Submit Application"]})]})]})})}}}]); 3//# sourceMappingURL=8005.e51d15cd.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.