1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1941,5284],{95370:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/member/register",function(){return t(67920)}])},89610:function(e,n,t){"use strict";var a=t(47568),i=t(26042),r=t(69396),l=t(70655),s=t(85893),o=t(67294),c=t(86664),u=t(23279),d=t.n(u),m=t(367),p=t(45197);n.Z=function(e){e.fieldName,e.fieldLabel,e.isRequired;var n,t,u=e.formData,f=e.setFormData,h=e.price,v=e.handlePriceChange,x=(0,o.useState)(0),g=x[0],y=x[1],_=(0,o.useState)(""),b=_[0],w=_[1],j=(0,o.useState)(!1),N=j[0],Z=j[1],S=(0,o.useState)(!1),C=S[0],k=S[1],L=new URLSearchParams(null===window||void 0===window||null===(n=window.location)||void 0===n?void 0:n.search).get("periodicity"),P=new URLSearchParams(null===window||void 0===window||null===(t=window.location)||void 0===t?void 0:t.search).get("license"),D=m.h.dispatch,E=(0,o.useMemo)((function(){return Math.max(0,h-g)}),[h,g]),F=(function(e,n){var t=new Date(e);"monthly"===n?t.setMonth(t.getMonth()+1):t.setFullYear(t.getFullYear()+1);var a=String(t.getDate()).padStart(2,"0"),i=String(t.getMonth()+1).padStart(2,"0"),r=t.getFullYear();"".concat(a,"/").concat(i,"/").concat(r)}(new Date,L),d()(function(){var e=(0,a.Z)((function(e){var n;return(0,l.__generator)(this,(function(t){return n=e.target.value,R(n),[2]}))}
1));return function(n){return e.apply(this,arguments)}}(),500)),R=function(){var e=(0,a.Z)((function(e){var n,t,a,s,o,c,d;return(0,l.__generator)(this,(function(l){switch(l.label){case 0:if(!(n=(null!==e&&void 0!==e?e:"").slice(0,35).trim()))return w(""),Z(!1),y(0),f((0,r.Z)((0,i.Z)({},u),{coupon_code:""})),[2];l.label=1;case 1:return l.trys.push([1,3,4,5]),"LiTChapter2024"===n?(w("This coupon is only available for existing Chapter Leaders with an annual Premium membership."),Z(!0),f((0,r.Z)((0,i.Z)({},u),{coupon_code:""})),y(0),[2]):(Z(!1),k(!0),[4,D((0,p.$l)({data:{coupon_code:n}}))]);case 2:if(s=l.sent(),null===(t=s.payload.CouponRetrieve)||void 0===t||null===(a=t.data)||void 0===a?void 0:a.valid){if("amount_off"===(c=null===(o=s.payload.CouponRetrieve)||void 0===o?void 0:o.data).type){if(c.amount_off>h)return w("Coupon is not valid for this plan."),f((0,r.Z)((0,i.Z)({},u),{coupon_code:""})),Z(!0),y(0),[2];y(c.amount_off)}else if("percent_off"===c.type){if((d=h*c.percent_off/100)>h)return w("Coupon is not valid for this plan."),f((0,r.Z)((0,i.Z)({},u),{coupon_code:""})),Z(!0),y(0),[2];y(d)}w("Coupon successfully applied."),Z(!1),f((0,r.Z)((0,i.Z)({},u),{coupon_code:n}))}else w("Coupon is not valid."),f((0,r.Z)((0,i.Z)({},u),{coupon_code:""})),Z(!0),y(0);return[3,5];case 3:return l.sent(),w("Invalid Coupon Code."),f((0,r.Z)((0,i.Z)({},u),{coupon_code:""})),Z(!0),y(0),[3,5];case 4:return k(!1),[7];case 5:return[2]}}
1))}));return function(n){return e.apply(this,arguments)}}();(0,o.useEffect)((function(){!u.coupon_code||"annual"!==L||b?"annual"!==L&&f((0,r.Z)((0,i.Z)({},u),{coupon_code:""})):R(u.coupon_code)}),[u.coupon_code]),(0,o.useEffect)((function(){v(E)}),[E]);return(0,s.jsxs)("div",{className:"flex flex-col",children:[(0,s.jsx)("h4",{className:"mt-2 mb-3 font-semibold text-litLightGray",children:"Payment Details:"}),"annual"===L?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("label",{htmlFor:"coupon",children:"Coupon code"}),(0,s.jsx)("input",{type:"text",name:"coupon",id:"coupon",maxLength:35,onChange:function(e){var n,t=(null!==(n=e.target.value)&&void 0!==n?n:"").slice(0,35);if(e.target.value!==t&&(e.target.value=t),!t)return"function"===typeof F.cancel&&F.cancel(),w(""),Z(!1),y(0),void f((0,r.Z)((0,i.Z)({},u),{coupon_code:""}));F({target:{value:t}})},defaultValue:u.coupon_code,autoComplete:"off",inputMode:"text"}),b&&!C?(0,s.jsx)("p",{className:"mt-2 ".concat(N?"text-red-500":"text-green-400"),children:b}):null]}):null,(0,s.jsxs)("h6",{className:"mt-2 mb-3 font-semibold text-litLightGray",children:["Total:"," ",(0,s.jsxs)("span",{className:"text-green-400",children:["$",E," ","Free"!==P?"monthly"===L?"/per month":"/year":""]})]}),E>0?(0,s.jsx)(s.Fragment,{children:(0,s.jsxs)("div",{className:"w-full",children:[(0,s.jsx)(c.CardElement,{options:{hidePostalCode:!0}})," ",(0,s.jsx)("span",{className:"text-litPink",children:"*"})]})}):null,"Free"!==P?(0,s.jsx)("p",{className:"font-normal text-xs mt-6 text-justify",children:"Your subscription will automatically renew in one year. You will receive an email notification within 30 days prior to the renewal date. Any changes to your subscription must be made prior to the date of renewal."}):null]})}},51073:function(e,n,t){"use strict";var a=t(47568),i=t(26042),r=t(69396),l=t(29815),s=t(70655),o=t(85893),c=t(67294),u=t(94789),d=t(84539),m=t(19042),p=t(87771),f=t(9669),h=t.n(f),v=t(67746),x=t(80129),g=t(63044),y=t(23279),_=t.n(y),b=function(e){return"other"===function(e){return(null!==e&&void 0!==e?e:"").trim().toLowerCase()}(e)};n.Z=function(e){var n=e.children,t=e.endpoint,f=e.inputValue,y=e.name,w=void 0===y?"":y,j=e.initialValue,N=void 0===j?"":j,Z=e.filters,S=e.OptionOther,C=void 0===S||S,k=e.hiddeOtherFromList,L=void 0!==k&&k,P=e.placeholder,D=void 0===P?"Select one option":P,E=e.paginate,F=void 0!==E&&E,R=e.otherAllowedId,A=void 0===R?null:R,I=N&&N.name&&b(N.name)&&N.id!==A,O=(0,c.useState)([]),q=O[0],T=O[1],V=(0,c.useState)(!1),M=V[0],B=V[1],Y={page:1,paginate:F},z=(0,c.useState)(Y),U=z[0],H=z[1],W=(0,c.useState)(null),$=W[0],G=W[1],J=(0,c.useState)(I?"":N&&N.name||""),K=J[0],X=J[1],Q=(0,c.useState)(I?void 0:N&&N.id),ee=Q[0],ne=Q[1],te=(0,c.useState)(!1),ae=te[0],ie=te[1],re=(0,c.useState)(null),le=re[0],se=re[1],oe=(0,c.useRef)(null),ce=function(){var e=(0,a.Z)((function(){var e,n,a,i,r,o,c,u,d,m,p,f;return(0,s.__generator)(this,(function(s){switch(s.label){case 0:e=x.stringify(U,{arrayFormat:"brackets"}),B(!0),s.label=1;case 1:return s.trys.push([1,3,,4]),[4,h().get("".concat("https://api.latinasintech.org","/").concat(t,"?").concat(e,"&").concat(Z||""),{withCredentials:!0})];case 2:return u=s.sent(),m=null!==(d=null===u||void 0===u||null===(n=u.data)||void 0===n||null===(a=n.data)||void 0===a?void 0:a.data)&&void 0!==d?d:[],null!==A&&void 0!==A?m=m.filter((function(e){var n,t=null!==(n=null===e||void 0===e?void 0:e.name)&&void 0!==n?n:null===e||void 0===e?void 0:e.label;return!b(t)||(null===e||void 0===e?void 0:e.id)===A})):L&&(m=m.filter((function(e){var n,t=null!==(n=null===e||void 0===e?void 0:e.name)&&void 0!==n?n:null===e||void 0===e?void 0:e.label;return!b(t)}))),m=m.map((function(e){return{id:e.id,name:e.name||e.label}})),T((function(e){var n=(0,l.Z)(e).concat((0,l.Z)(m));return Array.from(new Map(n.map((function(e){return[String(e.id),e]}))).values())})),G(null!==(p=null===u||void 0===u||null===(i=u.data)||void 0===i||null===(r=i.data)||void 0===r?void 0:r.total)&&void 0!==p?p:null),se(null!==(f=null===u||void 0===u||null===(o=u.data)||void 0===o||null===(c=o.data)||void 0===c?void 0:c.current_page)&&void 0!==f?f:null),[3,4];case 3:return s.sent(),T([]),G(null),[3,4];case 4:return B(!1),[2]}}))}));return function(){return e.apply(this,arguments)}}(),ue=_()((function(e){e.length<=0||""===e.trim()?(T([]),H(Y)):(T([]),H((0,r.Z)((0,i.Z)({},U),{page:1,name:e})))}),600);(0,c.useEffect)((function(){ce()}),[U]),(0,c.useEffect)((function(){ee&&"company_id"!==w&&!I&&f(w,ee)}),[]);var de=n&&c.cloneElement(n,{showModal:ae,setShowModal:ie});return(0,o.jsx)(o.Fragment,{children:(0,o.jsxs)("div",{className:"relative w-full",children:[(0,o.jsx)(u.h,{value:K,onChange:function(e){e&&e.id&&f(w,e.id,e.name),X((null===e||void 0===e?void 0:e.name)||""),ne(null===e||void 0===e?void 0:e.id)},children:(0,o.jsxs)("div",{className:"relative",children:[(0,o.jsxs)("div",{className:"relative w-full text-left",children:[(0,o.jsx)(u.h.Input,{name:w,className:"w-full",placeholder:D,displayValue:function(){return K},onChange:function(e){ue(e.target.value)},onClick:function(){var e;null===(e=oe.current)||void 0===e||e.click(),U.name&&(T([]),H(Y))}}),(0,o.jsx)(u.h.Button,{ref:oe,onClick:function(){U.name&&(T([]),H(Y))},className:"absolute inset-y-0 right-0 flex items-center pr-2",children:(0,o.jsx)(m.HiChevronDown,{className:"w-5 h-5 text-gray-400","aria-hidden":"true"})})]}),(0,o.jsx)(d.u,{as:c.Fragment,leave:"transition ease-in duration-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,o.jsxs)(u.h.Options,{className:"absolute z-10 w-full py-1 mt-1 overflow-auto text-base bg-white rounded-md shadow-lg max-h-40 ring-1 ring-black ring-opacity-5 focus:outline-none sm:text-sm divide-y divide-white",children:[n&&(0,o.jsx)(u.h.Option,{className:"relative cursor-pointer select-none py-2 pl-4 pr-4 bg-gray-100 text-litGray hover:bg-litPink hover:text-white",value:null,onClick:function(){return ie(!0)},children:(0,o.jsxs)("span",{className:"flex items-center gap-1 py-1",children:[(0,o.jsx)(m.HiPlus,{size:15,className:"inline-block"}),(0,o.jsx)("p",{className:"inline-block leading-3",children:"Add a new item"})]})}),C&&(null===A||void 0===A)&&(0,o.jsx)(u.h.Option,{className:"relative cursor-pointer select-none py-2 pl-4 pr-4 bg-gray-100 text-litGray hover:bg-litPink hover:text-white",value:null,onClick:function(){X("Other"),ne(void 0),f(w,null)},children:(0,o.jsx)("span",{className:"flex items-center gap-1 py-1",children:(0,o.jsx)("p",{className:"inline-block leading-3",children:"Other"})})}),0!==q.length||M?(0,o.jsx)(o.Fragment,{children:q.map((function(e){return(0,o.jsx)(u.h.Option,{className:function(e){var n=e.active;return"cursor-default select-none py-2 pl-4 pr-4 ".concat(n?"bg-litPink text-white":"text-gray-500")},value:e,children:function(){return(0,o.jsx)(g.u,{style:"dark",placement:"top",animation:"duration-700",arrow:!1,content:e&&e.name,children:(0,o.jsx)("span",{className:"block truncate",children:e.name})})}},e.id)}))}):(0,o.jsx)("div",{className:"relative h-40 px-4 py-2 text-gray-500 cursor-default select-none",children:"Nothing found."}),M&&(0,o.jsx)("span",{className:"flex items-center justify-center w-full h-40",children:(0,o.jsx)(p.Z7b,{size:24,className:"animate-spin text-litPink"})}),!M&&F&&(0,o.jsx)("div",{className:"h-40"}),!M&&F?(0,o.jsx)(v.default,{currentPage:le,total:$,onPageChange:function(){var e=(0,a.Z)((function(e){return(0,s.__generator)(this,(function(n){return H((0,r.Z)((0,i.Z)({},U),{page:e+1})),[2]}))}
1));return function(n){return e.apply(this,arguments)}}()}):null]})})]})}),ae&&de]})})}},67920:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSP:function(){return Y},default:function(){return z}});var a=t(85893),i=t(2962),r=t(11163),l=t(8080),s=t(40481),o=t(9473),c=t(47568),u=t(26042),d=t(69396),m=t(828),p=t(70655),f=t(86664),h=t(67294),v=function(e){var n,t=e.formStep,i=e.registrationSteps,r=Object.keys(i).map((function(e){return(0,d.Z)((0,u.Z)({},i[e]),{index:Number(e)})})).sort((function(e,n){return e.index-n.index}));return(0,a.jsx)("div",{className:"flex gap-3 items-center justify-center",children:r.map((function(e,i){return(0,a.jsxs)(h.Fragment,{children:[(0,a.jsxs)("div",{className:"flex justify-center items-center flex-col gap-2",children:[(0,a.jsx)("span",{className:"h-[27px] w-[27px] ".concat(t===e.index?"bg-[#555555]":"bg-[#A3A3A3]"," rounded-[50%] flex justify-center items-center text-white"),children:e.key}),(0,a.jsx)("span",{className:"max-w-lg flex justify-center text-center",children:e.label})]}),i<r.length-1&&(0,a.jsx)("hr",{className:"border-1 border-black w-1/6"})]},null!==(n=e.id)&&void 0!==n?n:e.index)}))})},x=t(14924),g=function(e){var n=e.formData,t=e.setFormData,i=e.fieldName,r=void 0===i?"":i,l=e.fieldLabel,s=void 0===l?"":l,o=e.validationRules,c=void 0===o?{}:o,m=e.isRequired,p=void 0!==m&&m,f=e.customValidation,v=void 0===f?null:f,g=e.setInputErrors,y=void 0===g?null:g,_=(0,h.useState)(""),b=_[0],w=_[1],j=(0,h.useState)(!1),N=j[0],Z=j[1],S=function(e){var t="";if(p&&!e&&(t="This field is required."),"email"===c.type&&(/\S+@\S+\.\S+/.test(e)||(t="Please enter a valid email.")),"number"===c.type&&(isNaN(e)&&(t="Please enter a valid number."),c.min&&e<c.min&&(t="The number must be greater than or equal to ".concat(c.min,".")),c.max&&e>c.max&&(t="The number must be less than or equal to ".concat(c.max,"."))),"text"===c.type&&(c.minLength&&e.length<c.minLength&&(t="The minimum length is ".concat(c.minLength," characters.")),c.maxLength&&e.length>c.maxLength&&(t="The maximum length is ".concat(c.maxLength," characters."))),"password"===c.type){/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^A-Za-z\d])[A-Za-z\d@$!%*?&\W_]{8,}$/.test(e)||(t="Password must be at least 8 characters, including uppercase, lowercase, numbers, and special characters."),"c_password"===r&&e!==n.password&&(t="Passwords do not match.")}if(v){var a=v(e);a&&(t=a)}return t};return(0,a.jsxs)("div",{className:"flex flex-col",children:[(0,a.jsxs)("label",{htmlFor:r,children:[s,p?(0,a.jsx)("span",{className:"text-litPink text-xl font-bold",children:"*"}):""]}),(0,a.jsx)("input",{className:"!rounded ".concat(b?"border-red-500":""),type:"email"===c.type?"email":"number"===c.type?"number":"password"===c.type?"password":"text",id:r,name:r,required:p,value:n[r],onChange:function(e){var n=e.target,a=n.name,i=n.value;if(t((function(e){return(0,d.Z)((0,u.Z)({},e),(0,x.Z)({},a,i))})),N){var r=S(i);w(r),y((function(e){return(0,d.Z)((0,u.Z)({},e),(0,x.Z)({},a,r))}))}else w(""),y((function(e){return(0,d.Z)((0,u.Z)({},e),(0,x.Z)({},a,""))}))},onBlur:function(e){Z(!0);var n=e.target.value,t=S(n);w(t),y((function(e){return(0,d.Z)((0,u.Z)({},e),(0,x.Z)({},r,t))}))}}),b&&(0,a.jsx)("span",{className:"text-red-500",children:b})," "]})},y=function(e){var n=e.formData,t=e.setFormData,i=function(e){var n=e.target,a=n.name,i=n.value;t((function(e){return(0,d.Z)((0,u.Z)({},e),(0,x.Z)({},a,i))}))};return(0,a.jsxs)("fieldset",{className:"flex flex-col gap-3",children:[(0,a.jsx)("label",{className:"text-sm font-normal",htmlFor:"which_email",children:"Which type of email are you sharing with us?"}),(0,a.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-normal",children:[(0,a.jsx)("input",{type:"radio",id:"personal",name:"which_email",value:"personal",required:!0,onChange:i,checked:"personal"===n.which_email}),(0,a.jsx)("label",{className:"font-normal",htmlFor:"personal",children:"Personal"})]}),(0,a.jsxs)("div",{className:"flex items-center gap-2 text-sm font-normal",children:[(0,a.jsx)("input",{type:"radio",id:"work",name:"which_email",value:"work",required:!0,onChange:i,checked:"work"===n.which_email}),(0,a.jsx)("label",{className:"font-normal",htmlFor:"work",children:"Work"})]})]})]})},_=function(e){return/^[a-zA-Z0-9 ]*$/.test(e)?"":"This field cannot contain special characters."},b=function(e){var n=e.formData,t=e.setFormData,i=(0,h.useState)({}),r=i[0],l=i[1],s=[{fieldLabel:"First name",fieldName:"first_name",isRequired:!0,validationRules:{type:"text",minLength:3,maxLength:50},customValidation:_},{fieldLabel:"Last name",fieldName:"last_name",isRequired:!0,validationRules:{type:"text",minLength:3,maxLength:50},customValidation:_},{fieldLabel:"Email",fieldName:"email",isRequired:!0,validationRules:{type:"email"}},{fieldLabel:"Password",fieldName:"password",isRequired:!0,validationRules:{type:"password",minLength:6}}
1,{fieldLabel:"Confirm password",fieldName:"c_password",isRequired:!0,validationRules:{type:"password",minLength:6}}],o=Object.keys(r).some((function(e){return r[e]}));return(0,a.jsxs)("div",{className:"flex flex-col gap-6 w-full justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[s.map((function(e,i){return(0,a.jsx)(g,{fieldLabel:e.fieldLabel,fieldName:e.fieldName,isRequired:e.isRequired,validationRules:e.validationRules,formData:n,setFormData:t,setInputErrors:l,customValidation:e.customValidation},i)})),(0,a.jsx)(y,{formData:n,setFormData:t})]}),(0,a.jsx)("button",{type:"submit",name:"next",disabled:o,style:{backgroundColor:"#DC588B"},className:"h-10 px-[30px] rounded text-white text-bold",children:"Next Step"})]})},w=t(99534),j=t(29815),N=t(89610),Z=t(33277),S=t(51073),C=t(63044),k=function(e){var n,t,i=e.formData,r=e.setFormData,l=e.price,s=e.showCardNumber,o=e.handleStepDown,c=e.handlePriceChange,m=e.loading,p=(0,h.useState)({}),f=p[0],v=p[1],y=(0,h.useState)("Other"===i.preferred_chapter_name),_=y[0],b=y[1],k="recruiter"===String(null!==(n=null===i||void 0===i?void 0:i.role_id)&&void 0!==n?n:"").toLowerCase()||"recruiter"===String(null!==(t=new URLSearchParams(window.location.search).get("license"))&&void 0!==t?t:"").toLowerCase(),L=236===Number(i.country_id),P=["country_id"].concat((0,j.Z)(L?["state_id"]:[]),["preferred_chapter_name","city","title","functional_area","years_of_experience","seniority_level_id"]),D=k?(0,j.Z)(P).concat(["company_id"]):P,E=function(e,n){v((function(t){return(0,d.Z)((0,u.Z)({},t),(0,x.Z)({},e,n))}))};(0,h.useEffect)((function(){L||!i.state_id&&!i.state_name||(r((function(e){return(0,d.Z)((0,u.Z)({},e),{state_id:"",state_name:""})})),v((function(e){e.state_id;return(0,w.Z)(e,["state_id"])})))}),[L,r,i.state_id,i.state_name]),(0,h.useEffect)((function(){L&&(i.state_id?E("state_id",""):E("state_id","State is required."))}),[L,i.state_id]);var F=Object.keys(f).some((function(e){return f[e]})),R=D.every((function(e){var n=i[e];return null!==n&&void 0!==n&&""!==String(n).trim()})),A=k&&30820===Number(i.company_id),I=R&&(!A||!!i.company_input);return(0,a.jsxs)("div",{className:"flex flex-col gap-6 w-full justify-between",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,a.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,a.jsxs)("label",{children:["Country of residence",(0,a.jsx)("span",{className:"text-litPink text-xl",children:"*"})]}),(0,a.jsx)(Z.Z,{endpoint:"api/countries/list",filters:"order=asc",name:"country_id",OptionOther:!1,inputValue:function(e,n,t,a){var l;a&&(r((0,d.Z)((0,u.Z)({},i),(l={},(0,x.Z)(l,e,n),(0,x.Z)(l,"country_name",a),l))),E(e,""))},initialValue:{id:i.country_id,name:i.country_name}})]}),L&&(0,a.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,a.jsxs)("label",{children:["State ",(0,a.jsx)("span",{className:"text-litPink",children:"*"})]}),(0,a.jsx)(Z.Z,{endpoint:"api/states/list",filters:"order=asc",inputValue:function(e,n,t,a){var l;a&&(r((0,d.Z)((0,u.Z)({},i),(l={},(0,x.Z)(l,e,n),(0,x.Z)(l,"state_name",a),l))),E(e,""))},name:"state_id",OptionOther:!1,initialValue:{id:i.state_id,name:i.state_name}}),f.state_id?(0,a.jsx)("p",{className:"text-sm text-red-600 mt-1",children:f.state_id}):null]}),(0,a.jsx)(g,{fieldLabel:"City of residence",fieldName:"city",isRequired:!0,formData:i,setFormData:r,validationRules:{type:"text",minLength:3,maxLength:50},setInputErrors:v}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,a.jsxs)("label",{className:"flex items-center",children:["Preferred Chapter",(0,a.jsx)(C.u,{content:"Choose the chapter closest to your geographical location to help us provide relevant programs and resources for your area.",trigger:"hover",children:(0,a.jsx)("span",{className:"text-litPink text-xl",children:"*"})})]}),(0,a.jsx)(Z.Z,{fieldLabel:"Preferred Chapter",endpoint:"api/chapters/list",filters:"order=asc",name:"preferred_chapter",OptionOther:!0,inputValue:function(e,n,t,a){var l,s=(0,d.Z)((0,u.Z)({},i),(l={},(0,x.Z)(l,e,n),(0,x.Z)(l,"preferred_chapter_name",a||"Other"),l));r(s),E(e,""),b(null===n&&void 0===a)},initialValue:{id:i.preferred_chapter,name:i.preferred_chapter_name}})]}),_&&(0,a.jsx)("div",{className:"flex flex-col gap-2 w-full",children:(0,a.jsx)(g,{fieldLabel:"Nominated Chapter",fieldName:"nominated_chapter",isRequired:!0,formData:i,setFormData:r,validationRules:{type:"text",minLength:3,maxLength:50},setInputErrors:v})}),(0,a.jsx)(g,{fieldLabel:"Title",fieldName:"title",isRequired:!0,formData:i,setFormData:r,validationRules:{type:"text",minLength:2,maxLength:100},setInputErrors:v}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,a.jsxs)("label",{children:["Functional Area ",(0,a.jsx)("span",{className:"text-litPink text-xl",children:"*"})]}),(0,a.jsx)(Z.Z,{endpoint:"api/areas/list",filters:"order_by_name=asc&type[]=general",name:"functional_area",OptionOther:!1,inputValue:function(e,n,t,a){var l;a&&(r((0,d.Z)((0,u.Z)({},i),(l={},(0,x.Z)(l,e,n),(0,x.Z)(l,"functional_area_name",a),l))),E(e,""))},initialValue:{id:i.functional_area,name:i.functional_area_name}})]}),(0,a.jsx)(g,{fieldLabel:"Years of experience",fieldName:"years_of_experience",isRequired:!0,formData:i,setFormData:r,validationRules:{type:"number",min:0,max:50},setInputErrors:v}),(0,a.jsxs)("div",{className:"flex flex-col gap-2 w-full",children:[(0,a.jsxs)("label",{children:["Seniority Level ",(0,a.jsx)("span",{className:"text-litPink text-xl",children:"*"})]}),(0,a.jsx)(Z.Z,{endpoint:"api/seniority_levels/list",filters:"order_by_experience
1=asc&paginate=0",name:"seniority_level_id",OptionOther:!1,inputValue:function(e,n,t,a){var l;a&&(r((0,d.Z)((0,u.Z)({},i),(l={},(0,x.Z)(l,e,n),(0,x.Z)(l,"seniority_level_name",a),l))),E(e,""))},initialValue:{id:i.seniority_level_id,name:i.seniority_level_name}})]}),k&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{id:"company_id",className:"flex flex-col gap-2 w-full",children:[(0,a.jsx)("label",{className:"w-full py-1 mb-0",children:(0,a.jsxs)("h5",{children:["Company ",(0,a.jsx)("span",{className:"text-litPink",children:"*"})]})}),(0,a.jsx)(S.Z,{endpoint:"api/companies/list",filters:"order_by_name=asc&active=1",name:"company_id",OptionOther:!1,otherAllowedId:30820,inputValue:function(e,n,t){var a;t&&r((0,d.Z)((0,u.Z)({},i),(a={company_name:t},(0,x.Z)(a,e,n),(0,x.Z)(a,"company_input",""),a)))},initialValue:{id:i.company_id,name:i.company_name}})]}),30820===Number(i.company_id)&&(0,a.jsxs)("div",{id:"company_name",children:[(0,a.jsx)("label",{className:"w-full py-1 mb-0",children:(0,a.jsxs)("h5",{children:["Company Name ",(0,a.jsx)("span",{className:"text-litPink",children:"*"})]})}),(0,a.jsx)(g,{fieldLabel:"Company name",fieldName:"company_input",isRequired:!0,formData:i,setFormData:r,validationRules:{type:"text",minLength:3,maxLength:50},setInputErrors:v})]})]}),k&&(0,a.jsxs)("div",{className:"text-sm font-normal",children:[(0,a.jsx)("label",{children:"Do you identify as latinx?"}),(0,a.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"radio",name:"identify_latinx",value:"1",checked:1===i.identify_latinx,onChange:function(){return r((0,d.Z)((0,u.Z)({},i),{identify_latinx:1}))}}),"Yes"]}),(0,a.jsxs)("label",{children:[(0,a.jsx)("input",{type:"radio",name:"identify_latinx",value:"0",checked:0===i.identify_latinx,onChange:function(){return r((0,d.Z)((0,u.Z)({},i),{identify_latinx:0}))}}),"No"]})]})]}),s&&(0,a.jsx)(N.Z,{formData:i,setFormData:r,price:l,handlePriceChange:c})]}),(0,a.jsxs)("div",{className:"flex gap-3 w-full",children:[(0,a.jsx)("button",{onClick:o,className:"h-10 border-[3px] w-full border-litPinkDark lg:px-[30px] rounded text-litPinkDark px-[10px] md:whitespace-nowrap",children:"Go back"}),(0,a.jsx)("button",{type:"submit",name:"finish",disabled:m||F||!I,style:{backgroundColor:"#DC588B"},className:"h-10 px-[30px] w-full rounded text-white text-bold",children:m?"Submitting...":"Finish registration"})]})]})},L=function(e){var n=e.stepKey,t=e.label,i=e.step,r=e.currentStep,l=e.id,s=e.children;return(0,a.jsxs)("div",{className:"flex flex-col bg-white rounded-[24px] p-6 gap-5 max-w-screen-sm w-full",children:[(0,a.jsx)("div",{className:"flex flex-col gap-2",id:l,children:(0,a.jsxs)("span",{className:"flex justify-start items-center gap-3",children:[(0,a.jsx)("span",{className:"h-[27px] w-[27px] bg-[#555555] rounded-[50%] flex justify-center text-white",children:n}),(0,a.jsx)("span",{className:"max-w-lg flex justify-center text-center",children:(0,a.jsx)("h3",{children:t})})]})}),i===r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("span",{className:"font-normal",children:[(0,a.jsx)("span",{className:"text-litPink text-xl",children:"*"}),"All fields required unless noted."]}),s]})]})},P=function(e){var n=e.step,t=e.registrationSteps,i=e.formData,r=e.setFormData,l=e.loading,s=e.price,o=e.showCardNumber,c=e.handleStepDown,u=e.handlePriceChange,d=["1","2"].filter((function(e){return null===t||void 0===t?void 0:t[e]}));return(0,a.jsx)(a.Fragment,{children:d.map((function(e){return(0,a.jsxs)(L,{stepKey:t[e].key,label:t[e].label,id:t[e].id,step:n,currentStep:parseInt(e,10),children:[1===n&&(0,a.jsx)(b,{formData:i,setFormData:r}),2===n&&(0,a.jsx)(k,{formData:i,setFormData:r,price:s,showCardNumber:o,handleStepDown:c,handlePriceChange:u,loading:l})]},e)}))})},D=t(45284),E=t(367),F=t(45197),R=t(19042),A=t(15850),I=t(25461),O=t(9669),q=t.n(O),T={1:{key:1,label:"Basic Info",id:"step-1"},2:{key:2,label:"Details",id:"step-2"}},V=function(){var e,n,t,i=(0,r.useRouter)(),l=E.h.dispatch,s=(0,o.v9)((function(e){return e.packagesReducer})).rolePackagesAllList,x=void 0===s?[]:s,g=i.query,y=(0,h.useMemo)((function(){return"undefined"!==typeof navigator&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}),[]),_=(0,h.useMemo)((function(){return"latina"===g.membership&&"13"===g.plan?17:"latina"===g.membership&&"14"===g.plan?18:parseInt(String(g.plan))}),[g.membership,g.plan]),b=(0,h.useMemo)((function(){return"latina"===g.membership&&"13"===g.plan?100:"latina"===g.membership&&"14"===g.plan?300:0}),[g.membership,g.plan]);(0,h.useEffect)((function(){var e=function(e,n){return"function"===typeof window.gtag&&window.gtag("event","conversion",{send_to:e,value:1,currency:"USD",transaction_id:"",event_callback:function(){"undefined"!==typeof n&&(window.location.href=n)}}),!1};"Premium"===g.license&&"annual"===g.periodicity&&"latina"===g.membership&&"13"===g.plan&&e("AW-11411463997/mVSHCI2PoYoaEL2-tMEq"),"Jefa"===g.license&&"annual"===g.periodicity&&"latina"===g.membership&&"14"===g.plan&&e("AW-11411463997/vHc-CJLAq4oaEL2-tMEq")}),[g]);var w={first_name:"",last_name:"",email:"",which_email:"",password:"",c_password:"",city:"",country_id:"",country_name:"",state_id:"",state_name:"",functional_area:"",functional_area_name:"",years_of_experience:"",seniority_level_id:"",seniority_level_name:"",currently_working:1,company_id:0,company_name:"",company_input:"",title:"",stripeToken:"",plan_id:null!==(e=g.plan)&&void 0!==e?e:"",plan_type:null!==(n=g.periodicity)&&void 0!==n?n:"",role_id:null!==(t=g.membership)&&void 0!==t?t:"",accept_terms:!1,preferred_chapter:"",preferred_chapter_name:"",coupon_code:"",identify_latinx:null},j=(0,h.useState)(null),N=j[0],Z=j[1],S=(0,h.useState)(!1),k=S[0],L=S[1],O=(0,h.useState)(1),V=O[0],M=O[1],B=(0,h.useState)(!1),Y=B[0],z=B[1],U=(0,h.useState)(w),H=U[0],W=U[1];(0,h.useEffect)((function(){W((function(e){return(0,d.Z)((0,u.Z)({},e),{plan_id:_.toString()})}))}),[_]);var $=(0,f.useStripe)(),G=(0,f.useElements)(),J=(0,h.useMemo)((function(){var e,n;if("latina"===g.membership){if("13"===g.plan)return 100;if("14"===g.plan)return 300}var t,a,i,r=null!==(n=null===x||void 0===x?void 0:x.find((function(e){return e.name.toLowerCase()===String(g.membership)})))&&void 0!==n?n:{},l=null!==(t=null===r||void 0===r||null===(e=r.role_packages)||void 0===e?void 0:e.find((function(e){return e.plan_id===parseInt(String(g.plan))})))&&void 0!==t?t:{};return"annual"===g.periodicity?null!==(a=null===l||void 0===l?void 0:l.price_annual_total)&&void 0!==a?a:0:null!==(i=null===l||void 0===l?void 0:l.price)&&void 0!==i?i:0}),[g.membership,g.plan,g.periodicity,x]),K=(0,h.useState)(0),X=K[0],Q=K[1];(0,h.useEffect)((function(){return Q(J)}),[J]),(0,h.useEffect)((function(){b>0&&Q(b)}),[b]);var ee=(0,h.useMemo)((function(){return"free"===String(g.license||"").toLowerCase()}),[g.license]);(0,h.useEffect)((function(){var e=document.getElementById("step-".concat(V));if(e){var n=e.getBoundingClientRect().top+window.scrollY-120;window.scrollTo({top:n,behavior:y?"auto":"smooth"})}}),[V,y]);var ne=(0,h.useState)(!1),te=ne[0],ae=ne[1];(0,h.useEffect)((function(){if(2===V){var e=0,n=setInterval((function(){e+=1,(null===G||void 0===G?void 0:G.getElement(f.CardElement))&&(ae(!0),clearInterval(n)),e>40&&clearInterval(n)}),150);return function(){return clearInterval(n)}}ae(!1)}),[V,G]);var ie=function(){var e=(0,c.Z)((function(e,n){var t,a,i,r,l,s,o,c,u,d,m,f,h=arguments;return(0,p.__generator)(this,(function(p){switch(p.label){case 0:return t=!(h.length>2&&void 0!==h[2])||h[2],[4,q().post("/api/login",{email:e,password:n},{withCredentials:!0,headers:{"Content-Type":"application/json"}})];case 1:if(a=p.sent(),i=null===a||void 0===a?void 0:a.data,l=null!==(r=null===i||void 0===i?void 0:i.data)&&void 0!==r?r:i,!1===(null===i||void 0===i?void 0:i.success))throw s=(null===l||void 0===l?void 0:l.error_description)||(null===i||void 0===i?void 0:i.message)||"Login failed. Please try again.",new Error(s);if(c=(o=l||{}).access_token,u=o.user,d=o.expires_in,m=o.provider,f=o.has_refresh,!c||!u)throw new Error("Login response incomplete. Please try again.");return t&&(localStorage.setItem("token",c),localStorage.setItem("user",JSON.stringify(u)),E.h.dispatch((0,I.he)({accessToken:c,user:u,isLoggedIn:!0,expires_in:null!==d&&void 0!==d?d:null,provider:null!==m&&void 0!==m?m:"password",has_refresh:null!==f&&void 0!==f&&f}))),[2]}}))}));return function(n,t){return e.apply(this,arguments)}}
1(),re=function(){var e=(0,c.Z)((function(e){var n,t,a,r,s,o,c,h,v,x,y,_,b,w,j,N,S,C,k,P,R,A,I,O,q,T,B,Y,U,W;return(0,p.__generator)(this,(function(p){switch(p.label){case 0:return e.preventDefault(),z(!0),L(!1),Z(null),1===V?(V<2&&M(V+1),z(!1),[2]):(t=H.stripeToken,2===V&&!ee&&X>0?$&&G?(s=G.getElement(f.CardElement))&&te?(null===(a=document.activeElement)||void 0===a||null===(r=a.blur)||void 0===r||r.call(a),[4,$.createPaymentMethod({type:"card",card:s})]):(Z("Card field is still loading. Please wait a moment and try again."),L(!0),z(!1),[2]):(Z("Payment processor not ready. Please try again."),L(!0),z(!1),[2]):[3,2]);case 1:if(o=p.sent(),c=o.error,h=o.paymentMethod,c)return Z(c.message||"Your card could not be validated."),L(!0),z(!1),[2];t=h.id,p.label=2;case 2:v=(0,d.Z)((0,u.Z)({},H),{country_name:void 0,functional_area_name:void 0,seniority_level_name:void 0,accept_terms:void 0,state_name:void 0,preferred_chapter_name:"",stripeToken:t}),"other"===(null===(n=v.company_name)||void 0===n?void 0:n.toLowerCase())&&(v.company_name=H.company_input,delete v.company_input),ee&&(delete v.stripeToken,delete v.plan_id,delete v.plan_type),!ee&&X<=0&&delete v.stripeToken,x=(0,D.Z)(v).reduce((function(e,n){var t=(0,m.Z)(n,2),a=t[0],i=t[1];return e[a]=i,e}),{}),y={values:x},_=null,b="NewRegisterLatina",p.label=3;case 3:return p.trys.push([3,19,,20]),"latina"!==g.membership?[3,5]:[4,l((0,F.Ci)({data:y}))];case 4:return _=p.sent(),[3,9];case 5:return"recruiter"!==g.membership?[3,7]:[4,l((0,F.C6)({data:y}))];case 6:return _=p.sent(),b="NewRegisterRecruiter",[3,9];case 7:return"ally"!==g.membership?[3,9]:[4,l((0,F.AW)({data:y}))];case 8:_=p.sent(),b="NewRegisterAlly",p.label=9;case 9:if(!(!0===(null===_||void 0===_||null===(w=_.payload)||void 0===w||null===(j=w[b])||void 0===j?void 0:j.success)))return C=null===_||void 0===_||null===(N=_.payload)||void 0===N||null===(S=N[b])||void 0===S?void 0:S.data,k="","string"===typeof C?k=C:C&&"object"===typeof C&&Object.entries(C).forEach((function(e){var n=(0,m.Z)(e,2),t=n[0],a=n[1];"email"===t&&M(1);var i=Array.isArray(a)?a.join(" "):String(null!==a&&void 0!==a?a:"");i&&(k+="".concat(i," "))})),Z((k||"Something went wrong.").trim()),L(!0),z(!1),[2];p.label=10;case 10:return p.trys.push([10,12,,13]),[4,ie(H.email,H.password,!0)];case 11:return p.sent(),[3,13];case 12:return P=p.sent(),Z((null===P||void 0===P?void 0:P.message)||"Login failed. Please try again."),L(!0),z(!1),[2];case 13:return z(!1),[4,new Promise((function(e){return setTimeout(e,60)}))];case 14:p.sent();try{window.lintrk&&(R="free"===String(i.query.license||"").toLowerCase(),A=String(i.query.plan||""),I=String(i.query.membership||"").toLowerCase(),O=Number("latina"===I&&"13"===A?17:"latina"===I&&"14"===A?18:isNaN(Number(A))?-1:Number(A)),q=null,R?q=21909484:"latina"===I&&(17===O&&(q=21909476),18===O&&(q=21909492)),q&&(U=(null===(T=E.h.getState())||void 0===T||null===(B=T.authReducer)||void 0===B||null===(Y=B.user)||void 0===Y?void 0:Y.email)||H.email||"anon",W="li_membership_".concat(q,"_").concat(U),sessionStorage.getItem(W)||(window.lintrk("track",{conversion_id:q}),sessionStorage.setItem(W,"1"))))}catch(J){}p.label=15;case 15:return p.trys.push([15,17,,18]),[4,i.replace({pathname:"/profile",query:{edit:"true"}})];case 16:return p.sent(),[3,18];case 17:return p.sent(),window.location.href="/profile?edit=true",[3,18];case 18:return[3,20];case 19:return p.sent(),Z("Unexpected error. Please try again."),L(!0),z(!1),[3,20];case 20:return[2]}}
1))}));return function(n){return e.apply(this,arguments)}}();return(0,h.useEffect)((function(){x.length||l((0,A.eq)(null))}),[l,x.length]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("form",{onSubmit:re,className:"flex justify-center flex-col mt-14 gap-4 p-3 md:p-0 max-w-screen-sm w-full",children:[(0,a.jsx)("div",{className:"flex justify-center items-center flex-col gap-4",children:(0,a.jsx)("h1",{children:"Join Us"})}),(0,a.jsx)(v,{formStep:V,registrationSteps:T}),(0,a.jsx)(P,{step:V,registrationSteps:T,formData:H,setFormData:W,loading:Y,price:J,showCardNumber:!ee&&2===V,handleStepDown:function(){V>1&&M(V-1)},handlePriceChange:Q})]}),k&&!!N&&(0,a.jsx)("div",{className:"fixed left-0 flex items-center justify-center w-full mx-auto bottom-4",children:(0,a.jsx)(C.bZ,{color:"failure",onDismiss:function(){return L(!1)},icon:R.HiInformationCircle,children:(0,a.jsx)("div",{className:"px-20",children:(0,a.jsx)("div",{className:"font-medium",children:N})})})})]})},M=(0,t(54465).J)("pk_live_zTrpKHfgz9tqiwdmVhav9Yk100SidndvPi",{locale:"en"}),B=function(e){var n=e.seo,t=(0,o.v9)((function(e){return e.authReducer})).user,s=(0,r.useRouter)();return t?(s.push("/"),(0,a.jsx)(l.Z,{})):(0,a.jsxs)("section",{className:"w-full bg-litCream flex justify-center pb-16",children:[(0,a.jsx)(i.PB,{title:"".concat(n&&n.title?n.title:"Entrepreneurship"," | Latinas in Tech\xae"),description:""}),(0,a.jsx)(f.Elements,{stripe:M,children:(0,a.jsx)(V,{})})]})};B.layout=s.F.PUBLIC;var Y=!0,z=B},40481:function(e,n,t){"use strict";var a;t.d(n,{F:function(){return a}}),function(e){e.ADMIN="admin",e.PUBLIC="public",e.DASHBOARD="dashboard"}(a||(a={}))},45284:function(e,n){"use strict";n.Z=function(e){return Object.entries(e).filter((function(e){if(!(Array.isArray(e[1])&&e[1].length<1))return e[1]&&e}))}},20943:function(e,n,t){"use strict";function a(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,a=new Array(n);t<n;t++)a[t]=e[t];return a}t.d(n,{Z:function(){return a}})},13375:function(e,n,t){"use strict";function a(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}t.d(n,{Z:function(){return a}})},828:function(e,n,t){"use strict";t.d(n,{Z:function(){return r}});var a=t(13375);var i=t(91566);function r(e,n){return function(e){if(Array.isArray(e))return e}(e)||(0,a.Z)(e,n)||(0,i.Z)(e,n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},29815:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var a=t(20943);var i=t(13375);var r=t(91566);function l(e){return function(e){if(Array.isArray(e))return(0,a.Z)(e)}(e)||(0,i.Z)(e)||(0,r.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},91566:function(e,n,t){"use strict";t.d(n,{Z:function(){return i}});var a=t(20943);function i(e,n){if(e){if("string"===typeof e)return(0,a.Z)(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(t):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?(0,a.Z)(e,n):void 0}}}},function(e){e.O(0,[9101,9774,2888,179],(function(){return n=95370,e(e.s=n);var n}));var n=e.O();_N_E=n}]);
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.