PageSourceSearch

https://www.matcotools.com/_next/static/chunks/pages/account/finan…/apply-credit-901d04707ec9bd47.js

js matcotools.com collected 2026-10-04 00:30:52 UTC 100,742 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5863],{61026:function(e,t,r){"use strict";var n,o=r(67294),s=["title","titleId"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(null,arguments)}t.Z=function(e){var t=e.title,r=e.titleId,a=function(e,t){if(null==e)return{};var r,n,o=function(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],-1===t.indexOf(r)&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}(e,s);return o.createElement("svg",i({width:251,height:289,fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-labelledby":r},a),t?o.createElement("title",{id:r},t):null,n||(n=o.createElement("g",{opacity:.15},o.createElement("path",{d:"M270.615 119.217s-3.182-10.838-4.596-14.391C244.632 49.037 182.061 20.61 126.56 42.108c-56.208 21.676-84.489 84.038-62.748 140.893 9.722 25.407 25.453 38.732 25.453 38.732s46.486-17.945 46.133-17.767c12.549-4.797 17.145.178 17.145.178l-16.262-42.464s-3.004-7.817-11.489-7.639c0 0-22.978 1.243-24.745 1.243-1.768 0-5.303.711-7.07 5.508l-1.768 4.975-14.494-50.281s-3.358-11.548 7.247-15.635l29.872-11.549 7.07-14.39s46.133-17.946 50.728-19.545c5.303-1.954 14.141-3.553 22.625 3.199l76.358 61.651Z",fill:"#0067B1"}
1),o.createElement("path",{d:"M273.44 139.83c1.591 16.523-6.54 81.373-69.111 105.536-59.213 22.92-103.401-13.503-103.401-13.503 1.591-.71 48.961-19.01 54.794-21.142 3.888-1.599 10.428-3.376 17.322 1.599l-27.574-71.602s-1.591-6.396-9.898-6.396c0 0-4.419.178-21.034 1.066-4.596.178-10.075.178-12.019 5.863l-1.238 3.554-7.954-25.407s-1.767-5.686 4.42-7.995l29.694-12.26 5.656-14.035s38.179-14.747 41.361-15.99c6.893-2.666 12.903 1.598 16.438 4.263l82.544 66.449Z",fill:"#EE3524"}),o.createElement("path",{d:"M25.806 143.558 95.447 21.854H234.73l69.641 121.704-69.641 121.704H95.447l-69.64-121.704ZM82.544 0 0 144.624l82.544 144.624h164.912L330 144.624 247.456 0H82.544Z",fill:"#000"}))))}},45338:function(e,t,r){"use strict";r.r(t),r.d(t,{__N_SSP:function(){return Nn},default:function(){return On}});var n=r(59499),o=r(36864),s=r(9008),i=r.n(s),a=r(80168),l=r(16523),c=r(4730),u=r(39233),d=r(22834),m=r(45704),p=r(13037),f=r(11163),x=r(15397),h=r(90116),b=r(45784),v=r(67294),y=r(4898),g=r(85893),j=function(e){var t=e.label,r=e.description,n=e.onCTAButtonClick,o=e.ctaButtonLabel;return(0,g.jsx)("div",{className:"px-12 py-12",children:(0,g.jsxs)("div",{className:"inline-flex w-full flex-col items-center justify-start gap-8 rounded-lg border-1 border-grey-500 px-12 py-12",children:[(0,g.jsx)("div",{className:"text-grey-800 text-center font-['Roboto'] text-3xl font-bold capitalize leading-10",children:t}),(0,g.jsx)("div",{className:"inline-flex items-center justify-center gap-2.5 bg-[#FFF3D6] px-12 py-4",children:(0,g.jsx)("div",{className:"text-center",children:r})}),(0,g.jsx)(y.z,{kind:"primary",uppercase:!0,size:"h48",className:"flex w-full items-center gap-1.5 !font-medium md:w-6/12 md:max-w-[360px]",onClick:n,children:o})]})})},N=function(){var e=(0,f.useRouter)();return(0,g.jsx)(j,{label:"Existing Application on File",description:(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("span",{className:"text-neutral-900 font-['Roboto'] text-base font-normal",children:"We are sorry, You can not apply or submit another application, For more information, please contact your Matco School Representative."})}),ctaButtonLabel:"GO BACK TO HOMEPAGE",onCTAButtonClick:function(){return e.push("/")}})},O=r(64252),w=function(){return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"relative inline-flex w-full items-start justify-start gap-2.5  rounded bg-[#FFF3D6] p-6",children:[(0,g.jsx)("div",{className:" text-center",children:(0,g.jsx)("span",{className:"text-neutral-900 font-['Roboto'] text-base font-normal",children:"We are sorry, a Matco Distributor is required to complete your application. For more information, please contact your Matco Representative."})}),(0,g.jsx)(O.Z,{className:"absolute top-0 right-0"})]})})},P=function(){var e=(0,f.useRouter)();return(0,g.jsx)(j,{label:"We could not find your distributor",description:(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("span",{className:"text-neutral-900 font-['Roboto'] text-base font-normal",children:"We are sorry, a Matco Distributor is required to complete your application. For more information, please contact your Matco Representative"})}),ctaButtonLabel:"GO BACK TO HOMEPAGE",onCTAButtonClick:function(){return e.push("/")}})},S=function(){var e,t,r=(0,x.ny)().stepsData;return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"relative inline-flex w-full items-start justify-start gap-2.5 rounded bg-[#E3F2FA] px-6 py-4",children:[(0,g.jsxs)("div",{className:"flex items-start justify-start gap-1",children:[(0,g.jsx)("div",{className:"text-neutral-900 font-['Roboto'] text-base font-normal",children:"Your authorized Matco Tools Distributor is"}),(0,g.jsx)("div",{className:"flex items-center justify-start gap-3",children:(0,g.jsx)("div",{className:"text-neutral-900 font-['Roboto'] text-lg font-bold",children:"".concat(null===r||void 0===r||null===(e=r.distributorData)||void 0===e?void 0:e.dbrFirstName," ").concat(null===r||void 0===r||null===(t=r.distributorData)||void 0===t?void 0:t.dbrLastName)})}),(0,g.jsx)("div",{className:"text-neutral-900 font-['Roboto'] text-base font-normal",children:"For more information please call (469)-353-4256"})]}),(0,g.jsx)(O.Z,{className:"absolute top-0 right-0  h-12"})]})})},D=r(50029),C=r(87794),E=r.n(C),q=r(95496),A=r(87536),k=["handleSubmit"];function F(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function R(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?F(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):F(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var L=(0,v.createContext)({isLoading:!1,handleOnSubmit:function(){},onCancel:function(){}});function I(e){var t=e.isLoading,r=void 0!==t&&t,n=e.showLoader,o=void 0!==n&&n,s=e.children,i=e.onSubmit,a=e.onCancel,l=void 0===a?function(){}:a,u=e.schema,d=e.formOptions,m=void 0===d?{}:d,p=(0,A.cI)(R({resolver:u&&(0,q.X)(u),mode:"onBlur"},m)),f=p.handleSubmit,x=(0,c.Z)(p,k);return(0,g.jsx)(L.Provider,{value:R(R({},x),{},{isLoading:r,handleOnSubmit:f((function(e){i(e)})),onCancel:l}),children:(0,g.jsxs)("div",{className:"relative",children:[s,r&&o&&(0,g.jsx)("div",{className:"absolute inset-0 z-50 flex flex-col items-center justify-center bg-black bg-opacity-50",role:"alert","aria-live":"polite",children:(0,g.jsx)("div",{className:"border-4 h-16 w-16 animate-spin rounded-full border-blue-500 border-t-transparent",style:{borderWidth:"6px",borderStyle:"solid"}})})]})})}function Z(){return(0,v.useContext)(L)}var M=r(55168),T=r(74157),H=r(7258),B=r(36223),z={firstName:30,lastName:30,middleName:30,phone:14,ssn:11,licenseNumber:20},V={required:"First Name is required",maxLength:"First Name must not exceed 30 characters"},Y={required:"Last Name is required",maxLength:"Last Name must not exceed 30 characters"},U={maxLength:"Middle Name must not exceed 30 characters"},_={required:"Email Address is required",format:"Email Address is not valid"},W={required:"Phone Number is required",requiredLength:"Phone Number must be 10 digits number"},G={required:"Date of Birth is required",atLeast18YearOld:"Should be greater than 18"},K={required:"License Number is required",requiredLength:"License Number must not exceed 20 characters"},$={required:"License State / Province is required"},J={required:"SSN/SIN is required",requiredLength:"SSN/SIN must be 9 digits number"},Q={required:"Country is required"},X={postalCode:{us:5,ca:7}},ee={reside:{years:99,months:12}},te={required:"ZIP Code is required",requiredLength:{us:"ZIP Code must be 5 digit",ca:"Postal Code must be 7 characters"}},re={required:"Street Address is required"},ne={required:"City is required"},oe={required:"Country is required"},se={ca:{required:"Province is required"},us:{required:"State is required"}},ie={required:"Address is required"},ae={required:"Please select one of the options"},le={years:{required:"Years is required",typeError:"Years must be a number",max:"Years must not exceed 99 characters"},months:{required:"Months is required",typeError:"Months must be a number",max:"Months must not exceed 12 characters"}},ce={phone:14},ue={currentEmployer:{required:"Current Employer Name is required"}},de={required:"Phone Number is required",requiredLength:"Phone Number must be 10 digits number"},me={required:"Supervisor Name is required"},pe={required:"Hire Date is required"},fe={required:"Weekly Net Income is required"},xe={required:"Job Title / Position is required"},he={required:"Employment Status is required"},be={phone:14},ve={firstName:{required:"First Name is required"},lastName:{required:"Last Name is required"},phone:{required:"Phone Number is required",requiredLength:"Phone Number must be 10 digits number"}},ye={firstName:{required:"First Name is required"},lastName:{required:"Last Name is required"},phone:{required:"Phone Number is required",requiredLength:"Phone Number must be 10 digits number"}},ge={required:"Accept Terms and conditions"},je={required:"Signature is required"},Ne={graduationMonth:1},Oe={graduationMonth:12},we={required:"Instructor Name is required"},Pe={required:"School State is required"},Se={required:"School Name is required"},De={required:"School City is required"},Ce={required:"Month is required",min:"Graduation month min 01 ",max:"Graduation month max 12 "},Ee={required:"Year is required"},qe="Only numbers are allowed",Ae="Invalid Date";function ke(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Fe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?ke(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ke(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function Re(e,t){return(0,M.J)(t)?t:(0,T.Qc)(t,"yyyy-MM-dd",new Date)}var Le=function(){return new Date(1800,1,1)},Ie=function(){return new Date},Ze=H.object().shape({firstName:H.string().max(z.firstName,V.maxLength).required(V.required),lastName:H.string().max(z.lastName,Y.maxLength).required(Y.required),middleName:H.string().max(z.middleName,U.maxLength),email:H.string().email(_.format).required(_.required),phone:H.string().required(W.required).max(z.phone,W.requiredLength).length(z.phone,W.requiredLength),ssn:H.string().required(J.required).max(z.ssn,J.requiredLength).length(z.ssn,J.requiredLength),dob:H.date().typeError(Ae).transform(Re).test("dob",G.atLeast18YearOld,(function(e,t){if(!e)return t.createError();var r=new Date(e),n=new Date,o=n.getFullYear()-r.getFullYear(),s=n.getMonth()-r.getMonth();
1return(s<0||0===s&&n.getDate()<r.getDate())&&(o-=1),!!(o>=18)||t.createError()})).min(Le(),"Date must be later than ".concat(Le().toLocaleDateString())).max(Ie(),"Date must be earlier than ".concat(Ie().toLocaleDateString())).required(G.required),licenseNumber:H.string().required(K.required).max(z.licenseNumber,K.requiredLength),province:H.string().required($.required),country:H.string().required(Q.required)}),Me={postalCode:H.string().when(["country"],(function(e){return"US"===e?H.string().matches(/^\d{5}$/,te.requiredLength.us).required(te.required).test("len",te.requiredLength.us,(function(e){var t;return(null===e||void 0===e||null===(t=e.toString())||void 0===t?void 0:t.length)===X.postalCode.us})):H.string().transform((function(e){return e?(0,B.A2)(e):""})).matches(/^[A-Za-z]\d[A-Za-z][ ]?\d[A-Za-z]\d$/,te.requiredLength.ca).required(te.required).length(X.postalCode.ca,te.requiredLength.ca)})),streetAddress:H.string().required(re.required),additionalAddressInfo:H.string(),city:H.string().required(ne.required),state:H.string().when(["country"],(function(e){return"US"===e?H.string().required(se.us.required):H.string().required(se.ca.required)})),country:H.string().required(oe.required)},Te={fullAddress:H.string().when(["isManualAddressLookup"],(function(e){return e?H.string():H.string().required(ie.required)})),addressSelected:H.boolean().when(["isManualAddressLookup"],(function(e){return e?H.boolean():H.boolean().required(ie.required)}))},He={livingArrangements:H.string().required(ae.required)},Be={reside:H.object().shape({years:H.number().typeError(le.years.typeError).max(ee.reside.years,le.years.max).required(le.years.required),months:H.number().typeError(le.months.typeError).max(ee.reside.months,le.months.max).required(le.months.required)})},ze=H.object().shape({currentAddress:H.object().shape(Fe(Fe(Fe(Fe({},Me),Te),He),Be))}),Ve={employerName:H.string().required(ue.currentEmployer.required),phone:H.string().required(de.required).max(ce.phone,de.requiredLength).length(ce.phone,de.requiredLength)},Ye={supervisorName:H.string().required(me.required),hireDate:H.date().typeError(Ae).transform(Re).max(Ie(),"Date must be earlier than ".concat(Ie().toLocaleDateString())).required(pe.required),netIncome:H.string().required(fe.required),position:H.string().required(xe.required),employmentStatus:H.string().required(he.required)},Ue=H.object().shape({currentEmployment:H.object().shape(Fe(Fe(Fe(Fe({},Ve),Ye),Me),Te))}),_e=H.object().shape({reference1:H.object().shape({firstName:H.string().required(ve.firstName.required),lastName:H.string().required(ve.lastName.required),phone:H.string().required(ve.phone.required).max(be.phone,ve.phone.requiredLength).length(be.phone,ve.phone.requiredLength)}),reference2:H.object().shape({firstName:H.string().required(ye.firstName.required),lastName:H.string().required(ye.lastName.required),phone:H.string().required(ye.phone.required).max(be.phone,ye.phone.requiredLength).length(be.phone,ye.phone.requiredLength)})}),We=H.object().shape({terms:H.boolean().required(ge.required),signature:H.string().required(je.required),date:H.string().required()}),Ge=H.object().shape({terms:H.boolean().required(ge.required)}),Ke=(H.object().shape({instructorName:H.string().required(we.required),schoolState:H.string().when(["schoolNotListed"],{is:!1,then:H.string().required(Pe.required)}),schoolNotListed:H.boolean(),schoolName:H.string().when(["schoolNotListed"],{is:!0,then:H.string().required(Se.required)}),schoolCity:H.string().when(["schoolNotListed"],{is:!0,then:H.string().required(De.required)}),graduationMonth:H.number().typeError(qe).min(Ne.graduationMonth,Ce.min).max(Oe.graduationMonth,Ce.max).required(Ce.required),graduationYear:H.number().typeError(qe).required(Ee.required)}),r(54194)),$e=["submitOnBehalfOfStudent"];function Je(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qe(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?Je(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Je(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Xe=function(e){var t=e.children,r=(0,x.ny)(),n=r.stepsData,o=r.setStepsData,s=r.userData,i=(null===s||void 0===s?void 0:s.isPSAUser)||!1,a=(0,l.useRendererContext)().gqlClient,u=(0,v.useState)(void 0),d=u[0],m=u[1],f=(0,v.useState)(null),h=f[0],b=f[1],y=(0,p.useGetCustomerDetailsQuery)(a,d?{email:d}:void 0,{enabled:!1}).refetch,j={mode:"onSubmit",defaultValues:Qe(Qe({},n.personalInformation),{},{submitOnBehalfOfStudent:n.studentForm?"student":"regular"})},N=(0,v.useCallback)(function(){var e=(0,D.Z)(E().mark((function e(t){var r,s,a,l,u,d,p,f,x,h,v,g,j,N;return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(b(null),s=i?"student"===t.submitOnBehalfOfStudent:n.studentForm,a=t.submitOnBehalfOfStudent,l=(0,c.Z)(t,$e),u=!!i&&"student"===a,d={isPersonalInformationCompleted:!0,personalInformation:Qe(Qe({},l),{},{dob:(0,Ke.Ih)(l.dob)}),studentForm:s,psaAdminApplyingForStudent:u,currentSection:n.isAllFormFilled?"summary":"address",showUpdateMessage:n.isAllFormFilled?"personal information":void 0},null===(r=l.email)||void 0===r||!r.trim()||!u){e.next=33;break}return e.prev=6,m(l.email.trim().toLowerCase()),e.next=10,y();case 10:if(j=e.sent,N=null===j||void 0===j||null===(p=j.data)||void 0===p||null===(f=p.getCustomerDetails)||void 0===f?void 0:f.user){e.next=17;break}return"No student found with this email address.",b("No student found with this email address."),m(void 0),e.abrupt("return");case 17:d.schoolDetails={instructorName:N.instructorName||"",schoolState:(null===(x=N.school)||void 0===x?void 0:x.state)||N.schoolStateAbbr||"",schoolNotListed:N.isSchoolNotListed,schoolName:(null===(h=N.school)||void 0===h?void 0:h.name)||N.schoolName||"",schoolCity:(null===(v=N.school)||void 0===v?void 0:v.city)||N.schoolCity||"",graduationMonth:N.graduationMonth||"",graduationYear:N.graduationYear||"",schoolId:(null===(g=N.school)||void 0===g?void 0:g.schoolId)||""},o((function(e){return Qe(Qe({},e),d)})),e.next=28;break;case 21:return e.prev=21,e.t0=e.catch(6),console.error("Error in student lookup:",e.t0),"Unable to fetch student details. Please try again.",b("Unable to fetch student details. Please try again."),m(void 0),e.abrupt("return");case 28:return e.prev=28,m(void 0),e.finish(28);case 31:e.next=34;break;case 33:o((function(e){return Qe(Qe({},e),d)}));case 34:case"end":return e.stop()}}),e,null,[[6,21,28,31]])})));return function(t){return e.apply(this,arguments)}}(),[i,n,o,y]);return(0,g.jsx)(I,{schema:Ze,onSubmit:N,formOptions:j,children:(0,g.jsxs)(g.Fragment,{children:[h&&(0,g.jsx)("p",{className:"mb-4 text-sm text-red-600",children:h}),t]})})},et=r(86010),tt=r(17674),rt=r(87248),nt=r(98888),ot=r(81392),st=r(19759),it=["name","label","placeholder","type"];function at(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function lt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?at(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):at(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var ct=function(){var e=new Date,t=e.getMonth()+1,r=e.getDate(),n=e.getFullYear();return"".concat(n,"-").concat(t<10?"0".concat(t.toString()):t,"-").concat(r<10?"0".concat(r.toString()):r)},ut=function(e,t){var r=e.control,n=e.setValue,o=e.getValues,s=e.resetField,i=e.trigger,l=e.formState,u=e.watch;return function(e){var d,m,p,f,x,h,b,v,y,j=e.name,N=e.label,O=e.placeholder,w=e.type,P=void 0===w?"text":w,S=(0,c.Z)(e,it),D=t?"".concat(t,".").concat(j):j,C=j.split("."),E=(0,tt.Z)(C,2),q=E[0],A=E[1],k=A?t?null===(d=l.errors[t])||void 0===d||null===(m=d[q])||void 0===m||null===(p=m[A])||void 0===p?void 0:p.message:null===(f=l.errors)||void 0===f||null===(x=f[q])||void 0===x||null===(h=x[A])||void 0===h?void 0:h.message:null,F=t?null===(b=l.errors[t])||void 0===b||null===(v=b[j])||void 0===v?void 0:v.message:null===(y=l.errors[j])||void 0===y?void 0:y.message,R={};"date"===P&&"disableFutureDates"in S&&S.disableFutureDates&&(R={max:ct()});var L,I=lt(lt({name:D,label:N,placeholder:O,control:r,inputClassName:"!bg-grey-300 text-black","data-testid":j,error:k||F||"",requiredSymbol:!1},S),R),Z=((null===o||void 0===o?void 0:o())||{}).isManualAddressLookup;switch(P){case"select":L=(0,g.jsx)(rt.p,lt(lt({labelKey:"label",data:S.data},I),{},{rounded:!0,inputClassName:(0,et.Z)("focus:text-lg","focus:border-[rgb(21,21,21)] focus:bg-white focus:shadow-[0_0_4px_rgba(209,209,209,1)]",I.inputClassName),handleDisabled:function(e){return e===Ke.DQ[0]}}));break;case"checkbox":L=(0,g.jsx)(nt.w,lt(lt({},I),{},{labelClassName:(0,et.Z)("min-h-[20px] flex items-center")}));break;case"address_lookup":var M=I.error||u(D)&&!u(t?"".concat(t,".addressSelected"):"addressSelected")&&ie.required;L=(0,g.jsx)(a.m,lt(lt({allowedCountry:["us","ca"]},I),{},{error:M,onChangeCallback:(0,Ke.Xt)({setValue:n,keys:["".concat(t?"".concat(t,"."):"","streetAddress")],sectionName:t}),placeSelectionCallback:(0,Ke.t3)({sectionName:t,setValue:n,trigger:i,isManualAddressLookup:Z}),handleInputIconClick:(0,Ke.Qg)({resetField:s})}));break;case"radio":L=(0,g.jsx)(ot.Y,lt(lt({labelKey:"label",valueKey:"value",data:S.data},I),{},{onChange:function(e){n(t?"".concat(t,".").concat(j):j,e)},value:u(t?"".concat(t,".").concat(j):j)}));break;default:L=(0,g.jsx)(st.M,lt(lt({type:P},I),{},{inputClassName:(0,et.Z)("focus:text-lg",I.inputClassName)}))}return L}},dt=[{content:[{name:"firstName",label:"First Name",placeholder:"Enter First Name",formatHandler:Ke.k0},{name:"middleName",label:"Middle Name",placeholder:"Enter Middle Name",formatHandler:Ke.k0},{name:"lastName",label:"Last Name",placeholder:"Enter Last Name",formatHandler:Ke.k0},{name:"suffix",label:"Suffix ( Optional )",placeholder:"Select your Suffix",type:"select",data:Ke.Qm},{name:"email",type:"email",label:"Email Address",placeholder:"Enter Email Address"},{name:"phone",label:"Phone Number",placeholder:"Enter Phone Number",formatHandler:Ke.wW},{name:"ssn",label:"SSN/SIN",placeholder:"666-66-6666",formatHandler:Ke.tz},{name:"dob",label:"Date of Birth",placeholder:"MM/DD/YYYY",type:"date",disableFutureDates:!0},{name:"country",label:"Country",placeholder:"Select your Country",type:"select",data:Ke.qO,defaultValue:"US"},{name:"province",label:"License State / Province",placeholder:"Select an option",type:"select",data:Ke.Ow},{name:"licenseNumber",label:"License Number",placeholder:"L-999-999-999-999",formatHandler:Ke.EW}]}],mt={header:"Application Type",content:[{name:"submitOnBehalfOfStudent",label:"Are you submitting this application on behalf of a student?",placeholder:"",type:"radio",data:[{label:"Yes, submit on behalf of student",value:"student"},{label:"No, submit for regular/distributor user",value:"regular"}]}]};function pt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ft(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?pt(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xt=function(e){var t=e.validationProps,r=t.watch,n=t.setValue,o=(0,x.ny)().userData,s=(null===o||void 0===o?void 0:o.isPSAUser)||!1,i=r("country"),a=r("province"),l=(0,v.useRef)(!1),c=(0,v.useMemo)((function(){return"CA"===i?Ke.rp:Ke.Ow}),[i]);return(0,v.useEffect)((function(){l.current?i&&a&&n("province",""):l.current=!0}),[i]),(0,g.jsxs)(g.Fragment,{children:[dt.map((function(e){var r=e.header,n=e.content;return(0,g.jsx)(v.Fragment,{children:(0,g.jsxs)("div",{children:[(0,g.jsx)("h3",{className:"mb-4 text-xl",children:r}),(0,g.jsx)("div",{className:"flex flex-col gap-4 sm:grid sm:grid-cols-2",children:n.map((function(e){return(0,g.jsx)("div",{children:ut(t)(ft(ft({},e),"province"===e.name?{data:c}:{}))},e.name)}))})]})},r)})),s&&(0,g.jsxs)("div",{children:[(0,g.jsx)("h3",{className:"mb-4 text-xl",children:mt.header}),(0,g.jsx)("div",{className:"flex flex-col gap-4",children:mt.content.map((function(e){return(0,g.jsx)("div",{children:ut(t)(e)},e.name)}))})]})]})},ht=function(){var e=Z(),t=e.handleOnSubmit;return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("form",{className:(0,et.Z)("flex flex-col gap-6"),onSubmit:t,noValidate:!0,children:[(0,g.jsx)(xt,{validationProps:e}),(0,g.jsx)("div",{className:"mt-5 flex w-full flex-col gap-3 md:flex-row md:items-center md:justify-center",children:(0,g.jsx)(y.z,{kind:"primary",buttonType:"submit",uppercase:!0,size:"h48",className:"flex w-full items-center gap-1.5 !font-medium md:w-6/12 md:max-w-[360px]",children:"PROCEED"})})]})})},bt=function(){return(0,g.jsx)("div",{})},vt=r(33616),yt=r(66858),gt=r(22298),jt=r(44352),Nt=function(e){var t=e.header,r=e.summaryItems,n=e.className;return(0,g.jsxs)("div",{className:(0,et.Z)("flex flex-col gap-2",n),children:[(0,g.jsx)("h3",{className:"text-xl font-bold text-black",children:t}),(0,g.jsx)("div",{className:"flex flex-col gap-2",children:r.map((function(e){var t=e.text,r=e.icon;return(0,g.jsxs)("div",{className:"flex items-center gap-2 text-tiny text-grey-900",children:[(0,g.jsx)("div",{children:r}),(0,g.jsx)("p",{className:"whitespace-pre-line break-all",children:t})]},t)}))})]})},Ot=function(){var e=(0,x.ny)().stepsData.personalInformation,t=e.firstName,r=e.lastName,n=e.email,o=e.phone,s=e.ssn,i=e.licenseNumber,a=e.province,l=e.dob,c=(0,v.useMemo)((function(){return(0,Ke.F8)(l)}),[l]),u=[(0,vt.SV)({email:n}),(0,vt.Dw)({phone:o}),{text:s,icon:(0,g.jsx)(yt.Z,{})},{text:c,icon:(0,g.jsx)(gt.Z,{})},{text:"License - ".concat(i,", ").concat(a),icon:(0,g.jsx)(jt.Z,{})}];return(0,g.jsx)(Nt,{className:"gap-2",header:"".concat(t," ").concat(r),summaryItems:u})};function wt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Pt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?wt(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):wt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var St=function(e){var t=e.prevStep,r=e.children,n=(0,x.ny)(),o=n.stepsData,s=n.setStepsData,i=(o.address||{}).currentAddress,a={mode:"onSubmit",defaultValues:{currentAddress:Pt(Pt({},i),{},{fullAddress:(0,B.Lr)({streetName:i.streetName||i.streetAddress||"",city:i.city,country:i.country}),streetAddress:i.streetName||i.streetAddress})}};return(0,g.jsx)(I,{schema:ze,onSubmit:function(e){s((function(t){return Pt(Pt({},t),{},{isAddressCompleted:!0,address:{currentAddress:e.currentAddress},currentSection:t.isAllFormFilled?"summary":o.studentForm?"schoolDetails":"employmentHistory",showUpdateMessage:t.isAllFormFilled?"address":void 0})}))},onCancel:function(){s((function(e){return Pt(Pt({},e),{},{currentSection:"personalInformation"})})),t()},formOptions:a,children:r})},Dt=r(81064),Ct=r(79526),Et={header:"Current Location",automatic:[{name:"fullAddress",InputIcon:(0,g.jsx)(Ct.Z,{className:"absolute right-3.5 top-[50%] translate-y-[-50%]",stroke:"#737373"}),relative:!0,label:"Address",placeholder:"Start typing the first line of your address",type:"address_lookup"}],content:[{name:"streetAddress",relative:!0,label:"Address Line 1",placeholder:"Enter your Street Address",formatHandler:Ke.Ox},{name:"additionalAddressInfo",relative:!0,label:"Address Line 2",placeholder:"Enter Apartment, Suite, Unit Number or Other",formatHandler:Ke.EW},{name:"country",label:"Country",placeholder:"Select your Country",type:"select",data:Ke.qO},{name:"state",label:"State",placeholder:"Select your State",type:"select",data:Ke.Ow},{name:"city",label:"City",placeholder:"Enter your City",formatHandler:Ke.Ox},{name:"postalCode",label:"ZIP Code",inputMode:"decimal",placeholder:"Enter ZIP Code"}]},qt={content:[{name:"livingArrangements",relative:!0,label:"Living Arrangements",data:Ke.j_,type:"radio"}]},At={header:"How long have you lived at your current residence?",content:[{name:"reside.years",relative:!0,label:"Years",placeholder:"Enter Years",type:"number",formatHandler:Ke.U1},{name:"reside.months",relative:!0,label:"Months",placeholder:"Enter Months",type:"number",formatHandler:Ke.U1}]},kt=[Et,qt,At];function Ft(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Rt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?Ft(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ft(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Lt=function(e){var t=e.setValue,r=e.isManualAddressLookup,n=e.resetField,o=e.sectionName;return(0,g.jsx)("div",{className:"w-full border-y-1 border-y-grey-500 py-4 text-black underline",children:(0,g.jsxs)("button",{type:"button",className:"flex items-center gap-2",onClick:function(){r&&(null===n||void 0===n||n("fullAddress")),null===t||void 0===t||t("".concat(o,".isManualAddressLookup"),!r)},children:[(0,g.jsx)(Dt.Z,{}),(0,g.jsx)("span",{className:"text-sm uppercase",children:r?"Enter Address Automatically":"Enter Address Manually"})]})})},It=function(e){var t=e.isManualAddressLookup,r=void 0!==t&&t,n=e.validationProps,o=e.sectionName,s=e.addressFields,i=e.hideAddressLookup,a=void 0!==i&&i,l=n.watch,c=n.setValue,u=n.resetField,d=(0,v.useRef)(!1),m=l("".concat(o,".country")),p=l("".concat(o,".state")),f=(0,v.useMemo)((function(){return"CA"===m?Ke.rp:Ke.Ow}),[m]);return(0,v.useEffect)((function(){d.current?r&&m&&p&&(c("".concat(o,".state"),""),c("".concat(o,".city"),""),c("".concat(o,".postalCode"),"")):d.current=!0}),[m]),(0,g.jsx)(g.Fragment,{children:s.map((function(e){var t=e.header,s=e.content,i=e.automatic,l=!r&&i||s;return(0,g.jsxs)(v.Fragment,{children:[(0,g.jsxs)("div",{children:[(0,g.jsx)("h3",{className:"mb-4 text-xl",children:t}),(0,g.jsx)("div",{className:"flex flex-col gap-4 sm:grid sm:grid-cols-2",children:l.map((function(e){return(0,g.jsx)("div",{children:ut(n,o)(Rt(Rt(
1Rt({},e),"state"===e.name?Rt(Rt({},"CA"===m?{label:"Province",placeholder:"Select your Province"}:{}),{},{data:f}):{}),"postalCode"===e.name&&"CA"===m?{label:"Postal code",placeholder:"Enter Postal Code",formatHandler:B.A2}:{}))},e.name)}))})]}),i&&!a&&(0,g.jsx)(Lt,{resetField:u,setValue:c,isManualAddressLookup:r,sectionName:o})]},t)}))})},Zt=function(e){var t=e.sectionName,r=e.addressFields,n=e.isManualAddress,o=void 0!==n&&n,s=Z(),i=s.watch,a=o||i("".concat(t,".isManualAddressLookup"));return(0,g.jsx)(g.Fragment,{children:(0,g.jsx)(It,{validationProps:s,isManualAddressLookup:a,sectionName:t,addressFields:r,hideAddressLookup:o})})},Mt=function(){var e=Z().handleOnSubmit;return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("form",{className:(0,et.Z)("flex flex-col gap-6"),onSubmit:e,noValidate:!0,children:[(0,g.jsx)(Zt,{sectionName:"currentAddress",addressFields:kt}),(0,g.jsx)("div",{className:"mt-5 flex w-full flex-col gap-3 md:flex-row md:items-center md:justify-center",children:(0,g.jsx)(y.z,{kind:"primary",buttonType:"submit",uppercase:!0,size:"h48",className:"flex w-full items-center gap-1.5 !font-medium md:w-6/12 md:max-w-[360px]",children:"PROCEED"})})]})})},Tt=r(21914),Ht=r(44978),Bt=function(){var e=(0,x.ny)().stepsData.address.currentAddress,t=e.streetAddress,r=e.city,n=e.state,o=e.postalCode,s=e.livingArrangements,i=e.reside,a=e.additionalAddressInfo,l=[(0,vt.Hm)({streetName:"".concat(t).concat(a?", ".concat(a):""),city:r,state:n,postalCode:o}),{text:s,icon:(0,g.jsx)(Tt.Z,{})},{text:"".concat(null===i||void 0===i?void 0:i.years," Years, ").concat(null===i||void 0===i?void 0:i.months," Months"),icon:(0,g.jsx)(Ht.Z,{})}];return(0,g.jsx)("div",{className:"flex flex-col gap-4",children:(0,g.jsx)(Nt,{className:"gap-2",header:"Current Location",summaryItems:l})})},zt=function(e){return e.children},Vt=r(39496),Yt=r(41590),Ut=r(25933);Ke.i3,Ke.k0,Ke.k0,Ke.U1,Ke.U1;function _t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Wt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_t(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Gt=function(){var e=(0,x.ny)(),t=e.stepsData.schoolDetails,r=t.schoolName,n=t.schoolState,o=t.instructorName,s=t.graduationMonth,i=t.graduationYear,a=e.setStepsData;return(0,g.jsxs)("div",{className:(0,et.Z)("flex flex-col gap-6"),children:[(0,g.jsxs)("div",{className:"flex  flex-col items-start justify-start gap-6",children:[(0,g.jsxs)("div",{className:"flex  flex-col items-start justify-start gap-6",children:[(0,g.jsxs)("div",{className:"flex  flex-col items-start justify-start gap-2",children:[(0,g.jsx)("div",{className:"text-grey-800 font-['Roboto'] text-lg font-bold",children:"Instructor Name"}),(0,g.jsxs)("div",{className:"flex items-start justify-start gap-2",children:[(0,g.jsx)(Vt.Z,{}),(0,g.jsx)("div",{className:"shrink grow basis-0 font-['Roboto'] text-sm font-normal text-grey-700",children:o})]})]}),(0,g.jsxs)("div",{className:"flex  flex-col items-start justify-start gap-2",children:[(0,g.jsx)("div",{className:"text-grey-800 font-['Roboto'] text-lg font-bold",children:"School Information"}),(0,g.jsxs)("div",{className:"flex items-start justify-start gap-2",children:[(0,g.jsx)(Yt.Z,{}),(0,g.jsxs)("div",{className:"shrink grow basis-0 font-['Roboto'] text-sm font-normal text-grey-700",children:["School State - ",n]})]}),(0,g.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[(0,g.jsx)(Ut.Z,{}),(0,g.jsxs)("div",{className:"font-['Roboto'] text-sm font-normal text-grey-700",children:["School Name - ",r]})]})]})]}),(0,g.jsxs)("div",{className:"flexflex-col items-start justify-start gap-2",children:[(0,g.jsx)("div",{className:"text-grey-800 font-['Roboto'] text-lg font-bold",children:"Graduation Date"}),(0,g.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[(0,g.jsx)(gt.Z,{}),(0,g.jsx)("div",{className:"font-['Roboto'] text-sm font-normal text-grey-700",children:"".concat((0,Ke.nF)(+s,2),".").concat(i)})]})]})]}),(0,g.jsx)("div",{className:"mt-5 flex w-full flex-col gap-3 md:flex-row md:items-center md:justify-center",children:(0,g.jsx)(y.z,{kind:"primary",buttonType:"submit",uppercase:!0,size:"h48",className:"flex w-full items-center gap-1.5 !font-medium md:w-6/12 md:max-w-[360px]",onClick:function(){a((function(e){return Wt(Wt({},e),{},{isSchoolDetailsCompleted:!0,currentSection:e.isAllFormFilled?"summary":"employmentHistory"})}))},children:"PROCEED"})})]})},Kt=function(){var e=(0,x.ny)().stepsData.schoolDetails,t=e.schoolName,r=e.schoolState,n=e.instructorName,o=e.graduationMonth,s=e.graduationYear,i=[{text:"School State - ".concat(r),icon:(0,g.jsx)(Yt.Z,{})},{text:"School Name - ".concat(t),icon:(0,g.jsx)(Yt.Z,{})},{text:"Instructor Name - ".concat(n),icon:(0,g.jsx)(Vt.Z,{})},{text:"Graduation Date - ".concat((0,Ke.nF)(+o,2),".").concat(s),icon:(0,g.jsx)(gt.Z,{})}];return(0,g.jsx)(Nt,{className:"gap-2",summaryItems:i})};function $t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Jt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?$t(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$t(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Qt=function(e){var t=e.prevStep,r=e.children,n=(0,x.ny)(),o=n.stepsData,s=o.employmentHistory.currentEmployment,i=o.studentForm,a=n.setStepsData,c=(0,l.useRendererContext)().gqlClient,u=(0,p.useFindDistributorMutation)(c,{onSuccess:function(e){var t=e.getDistributor.findDistributor;a((function(e){return t.distributor?Jt(Jt({},e),{},{distributorData:t,distributorDataNotFound:!1,isEmploymentHistoryCompleted:!0,currentSection:e.isAllFormFilled?"summary":"personalReferences",showUpdateMessage:e.isAllFormFilled?"employment history":void 0}):Jt(Jt({},e),{},{distributorData:void 0,distributorDataNotFound:!0,isEmploymentHistoryCompleted:!0,applicationError:e.isAllFormFilled||e.isEmploymentHistoryCompleted?void 0:"distributorDataNotFound"})}))},onError:function(){a((function(e){return Jt(Jt({},e),{},{distributorData:void 0,distributorDataNotFound:!0,isEmploymentHistoryCompleted:!0},e.isAllFormFilled?{}:{applicationError:"distributorDataNotFound"})}))}}),d=u.mutateAsync,m=u.isLoading,f={mode:"onSubmit",defaultValues:{currentEmployment:Jt(Jt({},s),{},{fullAddress:(0,B.Lr)({streetName:s.streetName||s.streetAddress||"",city:s.city,country:s.country}),streetAddress:s.streetName||s.streetAddress})}};return(0,g.jsx)(I,{schema:Ue,onSubmit:function(e){var t;i?a((function(t){return Jt(Jt({},t),{},{employmentHistory:{currentEmployment:Jt(Jt({},e.currentEmployment),{},{hireDate:(0,Ke.Ih)(e.currentEmployment.hireDate)})},currentSection:t.isAllFormFilled?"summary":"personalReferences",showUpdateMessage:t.isAllFormFilled?"employment history":void 0,isEmploymentHistoryCompleted:!0})})):(d({city:e.currentEmployment.city,techShop:!0,state:(null===(t=Ke.i3.find((function(t){return t.label===e.currentEmployment.state})))||void 0===t?void 0:t.value)||"",address1:e.currentEmployment.streetName||e.currentEmployment.streetAddress,zip:e.currentEmployment.postalCode,company:e.currentEmployment.employerName}),a((function(t){return Jt(Jt({},t),{},{employmentHistory:{currentEmployment:Jt(Jt({},e.currentEmployment),{},{hireDate:(0,Ke.Ih)(e.currentEmployment.hireDate)})}})})))},onCancel:function(){a((function(e){return Jt(Jt({},e),{},{currentSection:"address"})})),t()},formOptions:f,isLoading:m,showLoader:!0,children:r})};function Xt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function er(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Xt(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Xt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var tr=function(e){var t=e.validationProps,r=e.sectionName,n=e.employmentFields;return(0,g.jsx)(g.Fragment,{children:n.map((function(e){var n=e.header,o=e.content;return(0,g.jsx)(v.Fragment,{children:(0,g.jsxs)("div",{children:[(0,g.jsx)("h3",{className:"mb-4 text-xl",children:n}),(0,g.jsx)("div",{className:"flex flex-col gap-4 sm:grid sm:grid-cols-2",children:o.map((function(e){return(0,g.jsx)("div",{children:ut(t,r)(er({},e))},e.name)}))})]})},n)}))})},rr=r(51897),nr=function(e){var t=e.value,r=e.onChange,n=e.onSearch,o=e.options,s=e.placeholder,i=e.loading,a=(0,v.useState)(!1),l=a[0],c=a[1],u=(0,v.useState)(""),d=u[0],m=u[1],p="listbox-".concat(Math.random().toString(36).substr(2,9));(0,v.useEffect)((function(){var e=o.find((function(e){return e.value===t}));t?e&&e.label!==d?m(e.label):e||d||!t||m(t):m("")}),[t,o]);var f="relative mt-1  border-1 border-grey-500 !bg-grey-300 ".concat(l?"rounded-t rounded-b-none":"rounded"," focus-within:border-[rgb(21,21,21)] focus-within:shadow-[0_0_4px_rgba(209,209,209,1)]");return(0,g.jsxs)("div",{className:"relative",children:[(0,g.jsxs)("div",{className:f,children:[(0,g.jsx)("input",{type:"text",placeholder:s,value:d,onChange:function(e){var t=e.target.value;m(t),n(t),c(!0),t||r(null)},className:"h-[40px] w-full  !bg-grey-300 py-3 px-5 pr-16 text-left text-tiny text-black outline-none ".concat(l?"rounded-":"rounded-lg")}),t&&(0,g.jsx)("button",{type:"button","aria-label":"Clear selection",onClick:function(){r(null),m("")},className:"absolute right-9 top-1/2 -translate-y-1/2 px-2 text-base text-grey-900 hover:text-red-500",children:"\u2715"}),(0,g.jsx)("button",{type:"button","aria-label":"Toggle options",onClick:function(){return c((function(e){return!e}))},className:"absolute right-2 top-1/2 -translate-y-1/2 px-2 text-base text-grey-900",children:(0,g.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"transition-transform duration-200 ".concat(l?"rotate-180":""),children:(0,g.jsx)("path",{d:"M7.72 9.8l4.11 4.11a1 1 0 001.41 0l4-4",stroke:"#151515",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"bevel"})})})]}),l&&(0,g.jsx)("ul",{id:p,className:"absolute z-10 max-h-64 w-full overflow-y-auto border-x-1 border-b-1 border-grey-500 bg-white focus:outline-none",role:"listbox",children:i?(0,g.jsx)("li",{className:"w-full py-3 px-5 text-tiny text-grey-700",children:"Loading..."}):0===o.length?(0,g.jsx)("li",{className:"w-full py-3 px-5 text-tiny text-grey-700",children:"No options"}):o.map((function(e,n){return(0,g.jsx)("li",{tabIndex:0,role:"option","aria-selected":t===e.value,onClick:function(){r(e.value),m(e.label),c(!1)},onKeyDown:function(t){"Enter"!==t.key&&" "!==t.key||(t.preventDefault(),r(e.value),m(e.value),c(!1))},className:"w-full cursor-pointer select-none py-3 px-5 text-left text-tiny text-grey-900 focus:outline-none ".concat(0!==n?"border-t-1 border-grey-500":""),children:e.label},e.value)}))})]})},or=function(e){var t=e.children;return(0,g.jsx)("label",{children:(0,g.jsx)("div",{className:"relative flex items-center text-tiny text-black",children:t})})},sr=function(e){var t=e.label,r=e.onSearch,n=e.options,o=e.placeholder,s=e.loading,i=e.control,a=e.name;return(0,g.jsxs)("div",{children:[(0,g.jsx)(or,{children:t}),(0,g.jsx)(A.Qr,{control:i,name:a,render:function(e){var t=e.field;return(0,g.jsx)(nr,{value:t.value,onChange:t.onChange,onSearch:r,options:n,loading:s,placeholder:o})}})]})};function ir(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ar(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?ir(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ir(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var lr={header:"Employer Contact Information",content:[{name:"employerName",label:"Current Employer Name",placeholder:"Enter Current Employer Name",formatHandler:Ke.Ox},{name:"phone",label:"Phone Number",placeholder:"Enter Phone Number",formatHandler:Ke.wW}]},cr={header:"Employer Information",content:[{name:"supervisorName",label:"Supervisor Name",placeholder:"Enter Supervisor Name",formatHandler:Ke.k0},{name:"hireDate",label:"Hire Date",placeholder:"MM/DD/YYYY",type:"date",disableFutureDates:!0},{name:"netIncome",label:"Weekly Net Income",placeholder:"999",type:"number",formatHandler:function(e){return e?e.replace(/[^\d]/g,"").slice(0,5):e}},{name:"position",label:"Job Title / Position",placeholder:"Enter Job Title or Position"},{name:"employmentStatus",label:"Employment Status",placeholder:"Select an option",type:"select",data:Ke.tJ}]};ar(ar({},Et),{},{header:void 0});function ur(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function dr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ur(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ur(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var mr=function(){var e,t=(0,l.useRendererContext)().gqlClient,r=Z(),o=r.handleOnSubmit,s=r.watch,i=r.control,a=r.getValues,c=r.reset,u=r.setValue,d=(0,x.ny)().stepsData,m=d.isEmploymentHistoryCompleted,h=d.distributorDataNotFound,b=(0,f.useRouter)(),j=(0,p.useFindDistributorByNameMutation)(t),N=j.isLoading,O=j.mutateAsync,w=j.data,P="currentEmployment",S=(0,v.useMemo)((function(){return lr.content.find((function(e){return"phone"===e.name}))}),[]),C=(0,v.useMemo)((function(){return lr.content.find((function(e){return"employerName"===e.name}))}),[]),q=(0,v.useMemo)((function(){return{name:"dbrNumber",label:"DBR Number",placeholder:"Enter DBR Number"}}),[]),A=(0,v.useState)(null),k=A[0],F=A[1],R=(0,v.useState)(!1),L=R[0],I=R[1],M=(0,v.useState)(!1),T=M[0],H=M[1],B=(0,v.useState)(!1),z=B[0],V=B[1],Y=(0,v.useRef)("");
1(0,v.useEffect)((function(){void 0===a(q.name)&&u(q.name,"")}),[a,u,q.name]);var U=s(q.name)||"",_=s("".concat(P,".employerName"))||"";(0,v.useEffect)((function(){k&&Y.current!==U&&H(!0),Y.current=U}),[U,k]),(0,v.useEffect)((function(){k&&""!==U.trim()&&T&&(F(null),I(!1),H(!1))}),[U,k,T]);var W=(0,v.useState)([]),G=W[0],K=W[1],$=(0,v.useRef)(""),J=(0,v.useRef)("");(0,v.useEffect)((function(){var e;U.trim()||(F(null),I(!1)),null!==w&&void 0!==w&&null!==(e=w.getDistributorByName)&&void 0!==e&&e.distributors?(K(w.getDistributorByName.distributors.map((function(e){return{label:e.company,value:e.company}}))),w.getDistributorByName.distributors.length>0&&L?F(null):L&&0===w.getDistributorByName.distributors.length&&F("We couldn't find entered DBR! Please enter valid DBR number")):(K([]),L&&F("We couldn't find entered DBR! Please enter valid DBR number"))}),[w,L,U]);var Q=(0,v.useMemo)((function(){return U.trim()&&_.trim()?G.filter((function(e){return e.label.toLowerCase().includes(_.toLowerCase())})):G}),[G,U,_]),X=function(){var e=(0,D.Z)(E().mark((function e(){var t,r,o,s,i;return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=U.trim()){e.next=5;break}return F(null),I(!1),e.abrupt("return");case 5:return I(!0),H(!1),V(!0),o=a(),c(dr(dr({},o),{},(t={},(0,n.Z)(t,q.name,r),(0,n.Z)(t,P,dr(dr({},o[P]),{},{employerName:"",streetAddress:"",city:"",country:"",state:"",postalCode:"",addressSelected:!1,fullAddress:""})),t)),{keepDirtyValues:!0,keepTouched:!0}),J.current=r,$.current="",F(null),e.prev=13,e.next=16,O({company:r});case 16:null!==(i=e.sent)&&void 0!==i&&null!==(s=i.getDistributorByName)&&void 0!==s&&s.distributors&&0!==i.getDistributorByName.distributors.length?F(null):F("We couldn't find entered DBR! Please enter valid DBR number"),e.next=23;break;case 20:e.prev=20,e.t0=e.catch(13),F("An error occurred while searching. Please try again.");case 23:return e.prev=23,V(!1),e.finish(23);case 26:case"end":return e.stop()}}),e,null,[[13,20,23,26]])})));return function(){return e.apply(this,arguments)}}(),ee=function(){var e=(0,D.Z)(E().mark((function e(t){var r,n,o,s;return E().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u("".concat(P,".").concat(C.name),t,{shouldValidate:!0,shouldDirty:!0}),r=t.trim(),!(n=U.trim())){e.next=18;break}if(J.current===n||0!==G.length&&$.current===n){e.next=17;break}return J.current=n,$.current=n,e.prev=7,e.next=10,O({company:n});case 10:null!==(s=e.sent)&&void 0!==s&&null!==(o=s.getDistributorByName)&&void 0!==o&&o.distributors&&0!==s.getDistributorByName.distributors.length?F(null):F("We couldn't find entered DBR! Please enter valid DBR number"),e.next=17;break;case 14:e.prev=14,e.t0=e.catch(7),F("An error occurred while searching. Please try again.");case 17:return e.abrupt("return");case 18:if(F(null),J.current="",$.current="",$.current===r){e.next=31;break}return $.current=r,e.prev=23,e.next=26,O({company:r});case 26:e.next=31;break;case 28:e.prev=28,e.t1=e.catch(23),F("An error occurred while searching. Please try again.");case 31:case"end":return e.stop()}}),e,null,[[7,14],[23,28]])})));return function(t){return e.apply(this,arguments)}}(),te=(0,v.useMemo)((function(){var e,t;return null===w||void 0===w||null===(e=w.getDistributorByName)||void 0===e||null===(t=e.distributors)||void 0===t?void 0:t.find((function(e){return e.company===_}))}),[null===w||void 0===w||null===(e=w.getDistributorByName)||void 0===e?void 0:e.distributors,_]);return(0,v.useEffect)((function(){var e,t,r,o,s,i,l,d;if(te){var m=null!==(e=te.zip)&&void 0!==e?e:"",p=m.length>5?(0,Ke.Sb)(m):m,f=m.length>5?"CA":"US",x="US"===f?rr.Xb:rr.J6,h=null!==(t=te.state)&&void 0!==t?t:"",b=null!==(r=null===(o=Object.entries(x).find((function(e){return(0,tt.Z)(e,2)[1]===h})))||void 0===o?void 0:o[0])&&void 0!==r?r:"",v={streetAddress:null!==(s=te.address)&&void 0!==s?s:"",city:(null!==(i=te.city)&&void 0!==i?i:"").toString(),country:f,state:b,postalCode:p,addressSelected:!0,fullAddress:"".concat(null!==(l=te.address)&&void 0!==l?l:"",", ").concat(null!==(d=te.city)&&void 0!==d?d:"",", ").concat(b," ").concat(m)};queueMicrotask((function(){var e,t=a();c(dr(dr({},t),{},(0,n.Z)({},P,dr(dr({},null!==(e=null===t||void 0===t?void 0:t[P])&&void 0!==e?e:{}),v))),{keepDirtyValues:!0,keepTouched:!0}),u("".concat(P,".employerName"),_,{shouldDirty:!1,shouldTouch:!1})}))}}
1),[te,w,a,c,P,_,u]),(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("form",{className:(0,et.Z)("flex flex-col gap-6"),onSubmit:o,noValidate:!0,children:[(0,g.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,g.jsx)("h3",{className:"mb-4 text-xl",children:lr.header}),(0,g.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,g.jsxs)("div",{className:"flex flex-col gap-4 sm:grid sm:grid-cols-2",children:[(0,g.jsx)("div",{children:ut(r,"")(dr(dr({},q),{},{id:"dbrNumber",className:"w-full",type:"number"}))}),(0,g.jsx)("div",{className:"p-4",children:(0,g.jsx)(y.z,{kind:"primary",size:"h48",onClick:X,disabled:!U.trim()||N,type:"rounded",className:"w-full sm:w-auto",children:"Search"})})]}),L&&!z&&k&&(0,g.jsx)("p",{id:"dbr-error",className:"mt-1 text-sm text-red-600",role:"alert","aria-live":"assertive",children:k})]}),S&&C&&(0,g.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,g.jsxs)("div",{className:"flex flex-col gap-4 sm:grid sm:grid-cols-2",children:[(0,g.jsx)(sr,{control:i,name:"".concat(P,".").concat(C.name),label:C.label,placeholder:C.placeholder||"",loading:N,options:Q,onSearch:ee}),(0,g.jsx)("div",{children:ut(r,P)(dr({},S))},S.name)]}),(0,g.jsxs)("div",{className:(0,et.Z)({hidden:!te,"flex flex-col gap-6":!0}),children:[(0,g.jsx)(Zt,{sectionName:P,addressFields:[dr(dr({},Et),{},{header:void 0})],isManualAddress:!0}),(0,g.jsx)(tr,{validationProps:r,sectionName:P,employmentFields:[cr]})]})]})]}),(0,g.jsxs)("div",{className:"mt-5 flex w-full flex-col gap-3 md:flex-row md:items-center md:justify-center",children:[(0,g.jsx)(y.z,{kind:"primary",buttonType:"submit",uppercase:!0,size:"h48",className:"flex w-full items-center gap-1.5 !font-medium md:w-6/12 md:max-w-[360px]",children:"PROCEED"}),m&&h&&(0,g.jsx)(y.z,{kind:"primary",uppercase:!0,size:"h48",className:"flex w-full items-center gap-1.5 !font-medium md:w-6/12 md:max-w-[360px]",onClick:function(){return b.push("/")},children:"GO BACK TO HOMEPAGE"})]})]})})};function pr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function fr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?pr(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var xr=function(){var e=Z(),t=e.handleOnSubmit,r=(0,x.ny)().stepsData,n=r.isEmploymentHistoryCompleted,o=r.distributorDataNotFound,s=r.isPSAUser,i=(0,f.useRouter)(),a="currentEmployment";return s?(0,g.jsx)(mr,{}):(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("form",{className:(0,et.Z)("flex flex-col gap-6"),onSubmit:t,noValidate:!0,children:[(0,g.jsx)(tr,{validationProps:e,sectionName:a,employmentFields:[lr]}),(0,g.jsx)(Zt,{sectionName:a,addressFields:[fr(fr({},Et),{},{header:void 0})]}),(0,g.jsx)(tr,{validationProps:e,sectionName:a,employmentFields:[cr]}),(0,g.jsxs)("div",{className:"mt-5 flex w-full flex-col gap-3 md:flex-row md:items-center md:justify-center",children:[(0,g.jsx)(y.z,{kind:"primary",buttonType:"submit",uppercase:!0,size:"h48",className:"flex w-full items-center gap-1.5 !font-medium md:w-6/12 md:max-w-[360px]",children:"PROCEED"}),n&&o&&(0,g.jsx)(y.z,{kind:"primary",uppercase:!0,size:"h48",className:"flex w-full items-center gap-1.5 !font-medium md:w-6/12 md:max-w-[360px]",onClick:function(){return i.push("/")},children:"GO BACK TO HOMEPAGE"})]})]})})},hr=r(73526),br=r(28632),vr=function(){var e=(0,x.ny)().stepsData.employmentHistory.currentEmployment,t=e.employerName,r=e.phone,n=e.streetAddress,o=e.city,s=e.state,i=e.postalCode,a=e.supervisorName,l=e.hireDate,c=e.netIncome,u=e.employmentStatus,d=e.position,m=e.additionalAddressInfo,p=(0,v.useMemo)((function(){return(0,Ke.F8)(l)}),[l]),f=[{text:t,icon:(0,g.jsx)(Vt.Z,{})},(0,vt.Dw)({phone:r}),(0,vt.Hm)({streetName:"".concat(n).concat(m?", ".concat(m):""),city:o,state:s,postalCode:i}),{text:"Supervisor - ".concat(a),icon:(0,g.jsx)(Ut.Z,{})},{text:"Hire Date - ".concat(p),icon:(0,g.jsx)(gt.Z,{})},{text:"Weekly Net Income - $".concat(c),icon:(0,g.jsx)(hr.Z,{})},{text:"".concat(d,", ").concat(u),icon:(0,g.jsx)(br.Z,{})}];return(0,g.jsx)("div",{className:"flex flex-col gap-4",children:(0,g.jsx)(Nt,{className:"gap-2",header:"Current Employer",summaryItems:f})})};function yr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function gr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?yr(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var jr=function(e){var t=e.children,r=e.prevStep,n=(0,x.ny)(),o=n.stepsData,s=n.setStepsData,i={mode:"onSubmit",defaultValues:o.personalReferences};return(0,g.jsx)(I,{schema:_e,onCancel:function(){s((function(e){return gr(gr({},e),{},{currentSection:"employmentHistory"})})),r()},onSubmit:function(e){s((function(t){return gr(gr({},t),{},{isPersonalReferencesCompleted:!0,personalReferences:e,currentSection:"summary",isAllFormFilled:!0,showUpdateMessage:t.isAllFormFilled?"personal references":void 0})}))},formOptions:i,children:t})},Nr=[{header:"Reference 1",content:[{name:"reference1.firstName",label:"First Name",placeholder:"Enter First Name",formatHandler:Ke.k0},{name:"reference1.lastName",label:"Last Name",placeholder:"Enter Last Name",formatHandler:Ke.k0},{name:"reference1.phone",label:"Phone Number",placeholder:"Enter Phone Number",formatHandler:Ke.wW}]},{header:"Reference 2",content:[{name:"reference2.firstName",label:"First Name",placeholder:"Enter First Name",formatHandler:Ke.k0},{name:"reference2.lastName",label:"Last Name",placeholder:"Enter Last Name",formatHandler:Ke.k0},{name:"reference2.phone",label:"Phone Number",placeholder:"Enter Phone Number",formatHandler:Ke.wW}]}],Or=function(e){var t=e.validationProps;return(0,g.jsx)(g.Fragment,{children:Nr.map((function(e){var r=e.header,n=e.content;return(0,g.jsx)(v.Fragment,{children:(0,g.jsxs)("div",{children:[(0,g.jsx)("h3",{className:"mb-4 text-xl",children:r}),(0,g.jsx)("div",{className:"flex flex-col gap-4 sm:grid sm:grid-cols-2",children:n.map((function(e){return(0,g.jsx)("div",{children:ut(t)(e)},e.name)}))})]})},r)}))})},wr=function(){var e=Z(),t=e.handleOnSubmit;return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("form",{className:(0,et.Z)("flex flex-col gap-6"),onSubmit:t,noValidate:!0,children:[(0,g.jsx)(Or,{validationProps:e}),(0,g.jsx)("div",{className:"mt-5 flex w-full flex-col gap-3 md:flex-row md:items-center md:justify-center",children:(0,g.jsx)(y.z,{kind:"primary",buttonType:"submit",uppercase:!0,size:"h48",className:"flex w-full items-center gap-1.5 !font-medium md:w-6/12 md:max-w-[360px]",children:"PROCEED"})})]})})},Pr=function(){var e=(0,x.ny)().stepsData.personalReferences,t=e.reference1,r=e.reference2,n=[{header:"Reference 1",summaryItems:[{text:"".concat(t.firstName," ").concat(t.lastName),icon:(0,g.jsx)(Vt.Z,{})},(0,vt.Dw)({phone:t.phone})]},{header:"Reference 2",summaryItems:[{text:"".concat(r.firstName," ").concat(r.lastName),icon:(0,g.jsx)(Vt.Z,{})},(0,vt.Dw)({phone:r.phone})]}];return(0,g.jsx)("div",{className:"flex flex-col gap-4",children:null===n||void 0===n?void 0:n.map((function(e,t){return(0,g.jsx)(Nt,{header:e.header,summaryItems:e.summaryItems},t)}))})},Sr=function(){var e=(0,x.ny)().stepsData.showUpdateMessage;return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"relative inline-flex w-full items-start justify-start gap-2.5 rounded bg-[#E3F2FA] px-6 py-4",children:[(0,g.jsx)("div",{className:"flex items-start justify-start gap-1",children:(0,g.jsxs)("div",{className:"text-neutral-900 font-['Roboto'] text-xl font-bold",children:["Your ",e," was successfully updated."]})}),(0,g.jsx)(O.Z,{className:"absolute top-0 right-0  h-12"})]})})};function Dr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Cr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Dr(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Dr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Er=function(){var e=(0,x.ny)(),t=e.stepsData,r=t.studentForm,
1n=t.showUpdateMessage,o=e.setStepsData,s=[{header:"Personal Information",Content:Ot,section:"personalInformation"},{header:"Address",Content:Bt,section:"address"}].concat((0,h.Z)(r?[{header:"School Details",Content:Kt,section:"schoolDetails"}]:[]),[{header:"Employment History",Content:vr,section:"employmentHistory"},{header:"Personal References",Content:Pr,section:"personalReferences"}]);return(0,g.jsxs)("div",{className:"flex w-full flex-col gap-4",children:[n&&(0,g.jsx)(Sr,{}),null===s||void 0===s?void 0:s.map((function(e){var t=e.header,r=e.Content,n=e.section;return(0,g.jsxs)("div",{className:"flex flex-col items-start justify-start",style:{border:"1px solid #D1D5DB",borderRadius:"8px"},children:[(0,g.jsxs)("div",{className:"bg-gray flex w-full items-center justify-between gap-6 py-4 px-6",style:{background:"rgb(243 244 246)",borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},children:[(0,g.jsx)("div",{className:"text-gray-800 text-2xl font-bold",children:t}),(0,g.jsx)("button",{type:"button",className:"text-gray-800 text-xl font-medium",onClick:function(){return e=n,void o((function(t){return Cr(Cr({},t),{},{currentSection:e})}));var e},children:"Edit"})]}),(0,g.jsx)("div",{className:" flex flex-col items-start justify-start gap-2.5 py-4  px-6",children:(0,g.jsx)(r,{})})]},n)})),(0,g.jsx)("div",{className:"flex w-full items-center justify-center",children:(0,g.jsx)(y.z,{kind:"primary",buttonType:"submit",uppercase:!0,size:"h48",className:"flex w-full items-center gap-1.5 !font-medium md:w-6/12 md:max-w-[360px]",onClick:function(){o((function(e){return Cr(Cr({},e),{},{currentSection:"agreement"})}))},children:"Submit"})})]})},qr=r(16121);function Ar(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function kr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Ar(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ar(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Fr=function(){var e={name:"personalInformation",index:0,status:"active",headerIcon:(0,g.jsx)("div",{}),headerLabel:(0,g.jsx)("span",{className:"text-3.5xl font-medium text-black",children:"Personal Information"}),Provider:Xe,Content:ht,Summary:bt},t={name:"address",index:1,status:"collapsed",headerIcon:(0,g.jsx)("div",{}),headerLabel:(0,g.jsx)("span",{className:"text-3.5xl font-medium text-black",children:"Address"}),Provider:St,Content:Mt,Summary:bt},r=(0,x.ny)().stepsData,o=(0,v.useRef)({}),s=(0,v.useMemo)((function(){var s;return s={},(0,n.Z)(s,e.name,kr(kr({},e),{},{status:"personalInformation"===r.currentSection?"active":"collapsed",eventsRef:o})),(0,n.Z)(s,t.name,kr(kr({},t),{},{status:"address"===r.currentSection?"active":"collapsed",eventsRef:o})),s}),[r.currentSection]);return(0,g.jsx)(qr.v,{eventsRef:o,initialSteps:s,handleSubmit:function(){},updateSteps:!0})};function Rr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Lr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Rr(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Rr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ir=function(){var e={name:"employmentHistory",index:0,status:"active",headerIcon:(0,g.jsx)("div",{}),headerLabel:(0,g.jsx)("span",{className:"text-3.5xl font-medium text-black",children:"Employment History"}),Provider:Qt,Content:xr,Summary:bt},t={name:"personalReferences",index:1,status:"collapsed",headerIcon:(0,g.jsx)("div",{}),headerLabel:(0,g.jsx)("span",{className:"text-3.5xl font-medium text-black",children:"Personal References"}),Provider:jr,Content:wr,Summary:bt},r=(0,x.ny)().stepsData,o=(0,v.useRef)({}),s=(0,v.useMemo)((function(){var s;return s={},(0,n.Z)(s,e.name,Lr(Lr({},e),{},{status:"employmentHistory"===r.currentSection?"active":"collapsed",eventsRef:o}
1)),(0,n.Z)(s,t.name,Lr(Lr({},t),{},{status:"personalReferences"===r.currentSection?"active":"collapsed",eventsRef:o})),s}),[r.currentSection]);return(0,g.jsx)(qr.v,{eventsRef:o,initialSteps:s,handleSubmit:function(){},updateSteps:!0})},Zr=function(){return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"relative inline-flex w-full items-start justify-start gap-2.5 rounded bg-[#E3F2FA] px-6 py-4",children:[(0,g.jsx)("div",{className:"flex items-start justify-start gap-1",children:(0,g.jsxs)("div",{className:"text-neutral-900 font-['Roboto'] text-base font-normal",children:[(0,g.jsx)("span",{children:"If the following information is incorrect, please update it by "}),(0,g.jsx)("span",{children:(0,g.jsx)("a",{href:"/customercare",className:"font-semibold text-blue-500 underline hover:text-blue-600",target:"_blank",rel:"noreferrer",children:"contacting customer service."})})]})}),(0,g.jsx)(O.Z,{className:"absolute top-0 right-0  h-12"})]})})};function Mr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Tr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Mr(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Hr=function(){var e={name:"schoolDetails",index:0,status:"active",headerIcon:(0,g.jsx)("div",{}),headerLabel:(0,g.jsx)("span",{className:"text-3.5xl font-medium text-black",children:"Verify Your School Details"}),Provider:zt,Content:Gt,Summary:bt},t=(0,x.ny)().stepsData,r=(0,v.useRef)({}),o=(0,v.useMemo)((function(){return(0,n.Z)({},e.name,Tr(Tr({},e),{},{status:"schoolDetails"===t.currentSection?"active":"collapsed",eventsRef:r}))}),[t.currentSection]);return(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(Zr,{}),(0,g.jsx)(qr.v,{eventsRef:r,initialSteps:o,handleSubmit:function(){},updateSteps:!0})]})},Br=r(95832),zr=r(30700);function Vr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Yr(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?Vr(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Vr(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Ur=(0,v.createContext)({submitted:!1,loading:!1}),_r="We're currently experiencing some technical difficulties. Please try again later. We appreciate your patience!",Wr=function(e){var t,r,n=e.children,o=(0,l.useRendererContext)().gqlClient,s=(0,x.ny)(),i=s.stepsData,a=s.setStepsData,c=s.userData,u=(0,v.useState)(!1),d=u[0],m=u[1],f=(0,v.useState)(),h=f[0],b=f[1],y=(0,v.useState)(),j=y[0],N=y[1],O=(0,p.useCreateCreditApplicationMutation)(o),w=O.mutateAsync,P=O.isLoading,S=(0,zr.p)().addToast,D=(0,p.useGetCreditApplicationStatusMutation)(o),C=D.mutateAsync,E=D.isLoading,q={mode:"onSubmit",defaultValues:Ke.RA};return(0,g.jsx)(Ur.Provider,{value:{submitted:d,loading:P||E,creditLimit:h,applicationNumber:j,distributorName:"".concat(null===i||void 0===i||null===(t=i.distributorData)||void 0===t?void 0:t.dbrFirstName," ").concat(null===i||void 0===i||null===(r=i.distributorData)||void 0===r?void 0:r.dbrLastName)},children:(0,g.jsx)(I,{schema:i.isPSAUser?Ge:We,onSubmit:function(e){var t=(0,Ke.g8)(Yr(Yr({},i),{},{agreement:e}),c);w(t,{onSuccess:function(e){var t,r,n,o;N(null===(t=e.createCreditApplication.ofsResponse)||void 0===t||null===(r=t.creditApplicationResponse.result)||void 0===r?void 0:r.applicationDetails.applicationNumber),C({applicationNumber:null===(n=e.createCreditApplication.ofsResponse)||void 0===n||null===(o=n.creditApplicationResponse.result)||void 0===o?void 0:o.applicationDetail
1s.applicationNumber},{onSuccess:function(e){var t;m(!0),b(null===(t=e.getCreditApplicationStatus.ofsStatusResponse)||void 0===t?void 0:t.creditLimitMaxAmt)}})},onError:function(e){var t,r,n,o;if(null!==e&&void 0!==e&&null!==(t=e.response)&&void 0!==t&&null!==(r=t.errors)&&void 0!==r&&null!==(n=r[0])&&void 0!==n&&null!==(o=n.extensions)&&void 0!==o&&o.error){var s;try{var i=e.response.errors[0].extensions.error;if(i&&null!==i&&void 0!==i&&i.Message){var a,l,c,u,d,m=null===(a=JSON.parse(null===i||void 0===i?void 0:i.Message).ApplicationResponse)||void 0===a||null===(l=a.Result)||void 0===l||null===(c=l.BusinessValidations)||void 0===c||null===(u=c.Details)||void 0===u||null===(d=u[0])||void 0===d?void 0:d.Comment;s=m&&""!==m.trim()?m:_r}else s=i}catch(p){s=_r}S(s,"error")}else S(_r,"error")}})},onCancel:function(){a((function(e){return Yr(Yr({},e),{},{currentSection:"personalInformation"})}))},formOptions:q,children:n})})};function Gr(){return(0,v.useContext)(Ur)}var Kr=r(91799),$r=r(11355),Jr=r(82299),Qr=function(e){var t=e.show,r=(0,v.useRef)(null);return(0,g.jsx)(Kr.h,{children:(0,g.jsx)($r.u,{appear:!0,show:t,as:v.Fragment,children:(0,g.jsxs)(Jr.V,{as:"div",onFocus:function(e){var t,n,o;(null===(t=e.target)||void 0===t||t.blur(),null!==(n=r.current)&&void 0!==n&&n.scrollIntoView)&&(null===(o=r.current)||void 0===o||o.scrollIntoView())},className:"relative z-[52]",onClose:function(){},children:[(0,g.jsx)($r.u.Child,{as:v.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,g.jsx)("div",{className:"fixed inset-0 bg-[#00000033]"})}),(0,g.jsx)("div",{className:"fixed inset-0 overflow-y-auto",children:(0,g.jsx)("div",{className:"flex h-full items-center justify-center lg:h-auto lg:py-16",children:(0,g.jsx)($r.u.Child,{as:v.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,g.jsx)(Jr.V.Panel,{className:(0,et.Z)("relative flex h-full w-full max-w-4xl transform flex-col items-center justify-between  overflow-hidden bg-white pt-8 text-left align-middle shadow-[0_4px_10px_rgba(0,0,0,0.1)] transition-all lg:h-auto lg:justify-start lg:rounded-lg lg:pt-14"),children:(0,g.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,g.jsxs)("div",{className:"flex flex-col items-center justify-start gap-6",children:[(0,g.jsx)("div",{className:"font-['Roboto'] text-4xl font-bold",children:"We are processing your response."}),(0,g.jsx)("div",{className:" font-['Roboto'] text-lg font-normal",children:"Please do not hit your browser back button or reload the page"})]}),(0,g.jsx)(u.$,{})]})})})})})]})})})},Xr=r(90598),en=function(e){return e?e.replace(/[^a-zA-Z\s]/g,"").slice(0,24):e},tn=function(e){var t,r=e.show,n=e.onClose,o=e.onSubmit,s=(0,A.cI)({defaultValues:{signature:""}}),i=s.control,a=s.watch,l=s.setValue,c=null===(t=a("signature"))||void 0===t?void 0:t.trim(),u=function(){var e=document.getElementById("myCanvas"),t=null===e||void 0===e?void 0:e.getContext("2d");t&&(t.clearRect(0,0,null===e||void 0===e?void 0:e.width,null===e||void 0===e?void 0:e.height),l("signature",""))};return(0,v.useEffect)((function(){if(c){var e=document.getElementById("myCanvas"),t=null===e||void 0===e?void 0:e.getContext("2d");t&&(t.font="italic 20pt Pacifico",t.clearRect(0,0,null===e||void 0===e?void 0:e.width,null===e||void 0===e?void 0:e.height),t.fillText(c,6,80))}else u()}),[a("signature")]),(0,g.jsx)(Kr.h,{children:(0,g.jsx)($r.u,{appear:!0,show:r,as:v.Fragment,children:(0,g.jsxs)(Jr.V,{as:"div",className:"relative z-[52]",onClose:n,children:[(0,g.jsx)($r.u.Child,{as:v.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,g.jsx)("div",{className:"fixed inset-0 bg-[#00000033]"})}),(0,g.jsx)("div",{className:"fixed inset-0 overflow-y-auto",children:(0,g.jsx)("div",{className:"flex h-full items-center justify-center lg:h-auto lg:py-16",children:(0,g.jsx)($r.u.Child,{as:v.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:(0,g.jsxs)(Jr.V.Panel,{className:(0,et.Z)("relative flex h-full w-full max-w-2xl transform flex-col items-center justify-between  overflow-hidden bg-white pt-8 text-left align-middle shadow-[0_4px_10px_rgba(0,0,0,0.1)] transition-all lg:h-auto lg:justify-start lg:rou
1nded-lg lg:pt-14"),children:[(0,g.jsx)(Xr.Z,{title:"Close",onClick:n,className:"absolute right-5 top-5 h-3.5 w-3.5 cursor-pointer"}),(0,g.jsxs)("div",{className:"flex  w-full flex-col gap-y-2 border-b-1 border-grey-500 px-3 pb-4 lg:px-12",children:[(0,g.jsx)(Jr.V.Title,{as:"h2",className:"flex w-full items-center gap-x-1 text-2xl font-bold capitalize text-black lg:gap-x-2 lg:text-4xl lg:font-medium",children:"Signature"}),(0,g.jsx)(st.M,{name:"signature",placeholder:"Type your full name",control:i,inputClassName:"!border-0 !h-6 !border-transparent !py-1 !px-0 !focus:border-transparent !focus:shadow-none !focus:box-shadow-none",formatHandler:en})]}),(0,g.jsxs)("div",{className:"m-2 rounded bg-[#F8F8F8]  p-3 lg:m-6 lg:p-4",children:[(0,g.jsx)(y.z,{onClick:u,className:"bg-[#F8F8F8] font-['Roboto'] text-lg font-normal text-grey-500 ",kind:"simple",size:"s",children:"Clear"}),(0,g.jsx)("canvas",{id:"myCanvas",className:"h-[200px]  w-[530px]"}),(0,g.jsx)("div",{className:" mb-3  border-b-1 border-grey-500 "})]}),(0,g.jsxs)("div",{className:"flex w-full flex-col-reverse justify-center gap-4 py-6 px-3 pb-4  lg:flex-row",children:[(0,g.jsx)(y.z,{onClick:n,className:"flex w-full items-center justify-center outline-0 lg:w-60",kind:"bright",children:"Cancel"}),(0,g.jsx)(y.z,{onClick:function(){var e=document.getElementById("myCanvas"),t=null===e||void 0===e?void 0:e.toDataURL();o(t)},disabled:!(null!==c&&void 0!==c&&c.length),className:"flex w-full items-center justify-center lg:w-60",children:"Submit"})]})]})})})})]})})})},rn=function(e){var t,r,n=e.agreementContractTemplate,o=e.termsAndCondition,s=Z(),i=Gr(),a=i.loading,l=i.submitted,c=i.creditLimit,u=i.applicationNumber,d=i.distributorName,m=s.handleOnSubmit,p=s.control,f=s.formState,x=s.setValue,h=s.watch,b=(0,v.useState)(!1),j=b[0],N=b[1],O=(0,v.useRef)(null);(0,v.useEffect)((function(){var e;null===O||void 0===O||null===(e=O.current)||void 0===e||e.scrollIntoView()}),[]);var w=function(){N(!1)},P=h("signature"),S=h("date");return l?(0,g.jsx)(Br.$,{credit:c,applicationNumber:u,distributorName:d}):(0,g.jsxs)("form",{className:"flex flex-col items-start justify-start gap-8  md:px-10 lg:p-12",onSubmit:m,noValidate:!0,children:[(0,g.jsx)("div",{className:"flex items-start justify-start",ref:O,children:(0,g.jsxs)("div",{className:"flex flex-col items-start justify-start gap-4",children:[(0,g.jsx)("div",{className:"text-grey-800 font-['Roboto'] text-4xl font-bold",children:"APPLICATION AGREEMENT"}),(0,g.jsx)("div",{className:"font-['Roboto'] text-lg font-normal text-grey-700",children:"Please carefully read over and agree to the following terms and conditions"})]})}),(0,g.jsxs)("div",{className:"flex flex-col items-start justify-start gap-12",children:[(0,g.jsxs)("div",{className:"flex flex-col items-start justify-start gap-8",children:[(0,g.jsx)("div",{className:"ml-6 flex flex-col items-start justify-start gap-6 font-['Roboto'] text-lg font-normal text-grey-700",children:(0,g.jsx)("div",{dangerouslySetInnerHTML:{__html:n}})}),(0,g.jsx)("div",{className:"flex items-start justify-start gap-4",children:(0,g.jsx)(nt.w,{name:"terms",control:p,onChange:function(e){x("terms",e)},value:h("terms"),labelClassName:"font-['Roboto'] text-lg font-normal text-grey-700",label:o,error:null===f||void 0===f||null===(t=f.errors)||void 0===t||null===(r=t.term)||void 0===r?void 0:r.message})}),(0,g.jsxs)("div",{className:"flex flex-col items-start justify-start gap-4",children:[(0,g.jsxs)("div",{className:"flex flex-col items-start justify-start gap-4",children:[(0,g.jsx)("div",{className:"flex items-center justify-start gap-4",children:(0,g.jsx)("div",{className:"flex items-center justify-start gap-6",children:(0,g.jsx)("ul",{className:"ml-6 list-disc",children:(0,g.jsx)("li",{className:"font-['Roboto'] text-lg font-normal text-grey-700",children:"Signature:"})})})}),j&&(0,g.jsx)(tn,{show:j,onClose:w,onSubmit:function(e){x("signature",e);var t=(new Date).toLocaleDateString().split("/"),r=(0,tt.Z)(t,3),n=r[0],o=r[1],s=r[2];x("date","".concat((0,Ke.nF)(+n,2),".").concat((0,Ke.nF)(+o,2),".").concat(s)),w()}}),(0,g.jsx)("div",{className:"h-32 w-64 border-2 border-grey-300 px-2 py-1",children:P&&(0,g.jsx)("img",{src:P,alt:"signature",style:{height:"120px",width:"240px",objectFit:"contain"},className:"h-30 w-62 "})})]}),S&&(0,g.jsxs)("div",{className:"inline-flex h-4 w-52 items-center justify-start gap-2",children:[(0,g.jsx)("div",{className:"flex h-4 w-4 items-center justify-center",children:(0,g.jsx)(gt.Z,{})}),(0,g.jsx)("div",{className:"text-gray-700 font-['Roboto'] text-sm font-normal",children:"Date of signature - ".concat(S)})]}),(0,g.jsx)(y.z,{onClick:function(){return N(!0)},className:"flex w-full items-center justify-center outline-0 lg:w-60",kind:"bright",children:P?"change signature":"Set up signature"})]})]}),(0,g.jsx)("div",{className:"flex w-full items-center justify-center",children:(0,g.jsx)(y.z,{kind:"primary",uppercase:!0,size:"h48",className:"!font-medium disabled:bg-red-600 disabled:text-white disabled:opacity-50 md:w-6/12 md:max-w-[360px]",buttonType:"submit",disabled:!P||!h("terms"),children:"SUBMIT APPLICATION"})})]}),a&&(0,g.jsx)(Qr,{show:a})]})},nn=function(e){var t,r,n=e.psaUserAgreementContractTemplate,o=e.termsAndCondition,s=Z(),i=Gr(),a=i.loading,l=i.submitted,c=i.creditLimit,u=i.applicationNumber,d=i.distributorName,m=s.handleOnSubmit,p=s.control,f=s.formState,x=s.setValue,h=s.watch,b=(0,v.useRef)(null);return(0,v.useEffect)((function(){var e;null===b||void 0===b||null===(e=b.current)||void 0===e||e.scrollIntoView()}),[]),l?(0,g.jsx)(Br.$,{credit:c,applicationNumber:u,distributorName:d}):(0,g.jsxs)("form",{className:"flex flex-col items-start justify-start gap-8  md:px-10 lg:p-12",onSubmit:m,noValidate:!0,children:[(0,g.jsx)("div",{className:"flex items-start justify-start",ref:b,children:(0,g.jsxs)("div",{className:"flex flex-col items-start justify-start gap-4",children:[(0,g.jsx)("div",{className:"text-grey-800 font-['Roboto'] text-4xl font-bold",children:"APPLICATION AGREEMENT"}),(0,g.jsx)("div",{className:"font-['Roboto'] text-lg font-normal text-grey-700",children:"Please carefully read over and agree to the following terms and conditions"})]})}),(0,g.jsxs)("div",{className:"flex w-full flex-col items-start justify-start gap-12",children:[(0,g.jsxs)("div",{className:"flex flex-col items-start justify-start gap-8",children:[(0,g.jsx)("div",{className:"ml-6 flex flex-col items-start justify-start gap-6 font-['Roboto'] text-lg font-normal text-grey-900",children:(0,g.jsx)("div",{dangerouslySetInnerHTML:{__html:n}})}),(0,g.jsx)("div",{className:"flex items-start justify-start gap-4",children:(0,g.jsx)(nt.w,{name:"terms",control:p,onChange:function(e){x("terms",e)},value:h("terms"),labelClassName:"font-['Roboto'] text-lg font-normal text-grey-700",label:o,error:null===f||void 0===f||null===(t=f.errors)||void 0===t||null===(r=t.term)||void 0===r?void 0:r.message})})]}),(0,g.jsx)("div",{className:"flex w-full items-center justify-center",children:(0,g.jsx)(y.z,{kind:"primary",uppercase:!0,size:"h48",className:"flex w-full items-center gap-1.5 !font-medium disabled:bg-red-600 disabled:text-white disabled:opacity-50 md:w-6/12 md:max-w-[360px]",buttonType:"submit",disabled:!h("terms"),children:"SUBMIT APPLICATION"})})]}),a&&(0,g.jsx)(Qr,{show:a})]})};function on(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function sn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};
1t%2?on(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):on(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var an=function(e){var t=(0,x.ny)().stepsData.isPSAUser?nn:rn;return(0,g.jsx)(Wr,{children:(0,g.jsx)(t,sn({},e))})};function ln(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function cn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ln(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ln(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var un=function(){var e=(0,x.ny)(),t=e.stepsData.studentForm,r=e.setStepsData,n={header:"Personal Information",details:[{icon:(0,g.jsx)(Vt.Z,{}),text:"Name, DOB, Contact Information"},{icon:(0,g.jsx)(yt.Z,{}),text:"SSN/ SIN"},{icon:(0,g.jsx)(jt.Z,{}),text:"Driver\u2019s License Information"}]},o={header:"Address",details:[{icon:(0,g.jsx)(Yt.Z,{}),text:"Current Home Address and Mailing Address"}]},s={header:"School Details",details:[{icon:(0,g.jsx)(Vt.Z,{}),text:"Instructor Name"},{icon:(0,g.jsx)(Vt.Z,{}),text:"School Name and Location"},{icon:(0,g.jsx)(gt.Z,{}),text:"Graduation Date"}]},i={header:"Employment History",details:[{icon:(0,g.jsx)(Vt.Z,{}),text:"Current Employer Name, Address, and Phone Number"},{icon:(0,g.jsx)(Vt.Z,{}),text:"Current and Previous Supervisor Name and Phone Number"}]},a={header:"Two References",details:[{icon:(0,g.jsx)(Vt.Z,{}),text:"Name and Phone Number"}]},l=[n,o].concat((0,h.Z)(t?[s]:[]),[i,a]);return(0,g.jsx)("div",{className:"w-full md:px-8 lg:px-8",children:(0,g.jsxs)("div",{className:"flex w-full flex-col items-center justify-start gap-6 rounded-lg border-1 border-grey-500 px-6 py-8 lg:gap-12",children:[(0,g.jsx)("div",{className:"flex flex-col items-center justify-start gap-12",children:(0,g.jsxs)("div",{className:"flex flex-col items-center justify-start gap-4 lg:gap-10",children:[(0,g.jsx)("div",{className:"font-['Roboto'] text-2xl font-bold text-grey-900",children:"Here\u2019s what you will need to apply for credit"}),(0,g.jsx)("div",{className:"flex flex-wrap items-center justify-center gap-4 lg:gap-12",children:l.map((function(e,t){var r=e.header,n=e.details;return(0,g.jsxs)("div",{className:"flex w-2/5 flex-col items-start justify-start gap-2 rounded-lg border-1 border-grey-500 bg-white p-4 shadow lg:h-[210px] lg:w-80 lg:items-center lg:gap-8  lg:p-6",children:[(0,g.jsx)("div",{className:"font-['Roboto'] text-xl font-bold text-grey-900",children:r}),(0,g.jsx)("div",{className:"flex w-full flex-col items-start justify-start gap-2 md:gap-4",children:n.map((function(e,t){var r=e.icon,n=e.text;return(0,g.jsxs)("div",{className:"flex items-center justify-start gap-2",children:[(0,g.jsx)("div",{className:"flex items-center justify-center",children:r}),(0,g.jsx)("div",{className:"font-['Roboto'] text-lg font-normal text-grey-700",children:n})]},t)}))})]},t)}))})]})}),(0,g.jsx)(y.z,{kind:"primary",uppercase:!0,size:"h48",className:"flex w-full items-center gap-1.5 !font-medium md:w-6/12 md:max-w-[360px]",onClick:function(){r((function(e){return cn(cn({},e),{},{currentSection:"personalInformation"})}))},children:"GET STARTED"})]})})},dn=["pageTitle"];function mn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function pn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?mn(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var fn=function(e){var t=e.pageTitle,r=(0,c.Z)(e,dn),n=(0,x.ny)(),o=n.stepsData,s=n.setStepsData,i=(0,v.useRef)({}),a=[x.x7.personalInformation,x.x7.address],l=[x.x7.employmentHistory,x.x7.personalReferences],u=[{header:"Personal Information",active:a.includes(o.currentSection),completed:o.isAddressCompleted&&o.isPersonalInformationCompleted}
1].concat((0,h.Z)(o.studentForm?[{header:"Verify school",active:"schoolDetails"===o.currentSection,completed:o.isSchoolDetailsCompleted}]:[]),[{header:"Proof of EMPLOYMENT",active:l.includes(o.currentSection),completed:o.isEmploymentHistoryCompleted&&o.isPersonalReferencesCompleted},{header:"Confirmation & Summary",active:"summary"===o.currentSection,completed:o.isAllFormFilled}]);(0,v.useEffect)((function(){var e,t;null===i||void 0===i||null===(e=i.current)||void 0===e||null===(t=e[o.currentSection])||void 0===t||t.scrollIntoView()}),[o.currentSection]);return"gettingStarted"===o.currentSection?(0,g.jsx)("div",{ref:function(e){i.current.gettingStarted=e},children:(0,g.jsx)(un,{})}):"agreement"===o.currentSection?(0,g.jsx)("div",{ref:function(e){i.current.agreement=e},children:(0,g.jsx)(an,pn({},r))}):"existingApplication"===o.applicationError?(0,g.jsx)(N,{}):"distributorDataNotFound"===o.applicationError?(0,g.jsx)(P,{}):(0,g.jsxs)("div",{className:"w-full lg:ml-8 lg:grow",children:[(0,g.jsx)("h1",{className:"text-2xl font-bold text-black lg:text-3.5xl lg:font-medium",children:t}),(0,g.jsxs)("div",{className:"flex w-full flex-col gap-4 pt-4",children:[(0,g.jsx)(g.Fragment,{children:(0,g.jsx)("div",{className:"flex justify-between",children:null===u||void 0===u?void 0:u.map((function(e,t){return(0,g.jsxs)("div",{className:"step-item ".concat(e.active&&"active"," ").concat(e.completed&&"complete"," "),children:[(0,g.jsx)("div",{className:"step"}),(0,g.jsx)("p",{className:"text-neutral-500 text-xs font-bold",children:e.header})]},t)}))})}),(0,g.jsx)("div",{className:"inline-flex h-6 w-40 items-center justify-start gap-2",children:(0,g.jsxs)("button",{type:"button",className:"text-neutral-900 flex text-sm font-normal",onClick:function(){switch(o.currentSection){case"personalInformation":s((function(e){return pn(pn({},e),{},{currentSection:"gettingStarted"})}));break;case"address":s((function(e){return pn(pn({},e),{},{currentSection:"personalInformation"})}));break;case"schoolDetails":s((function(e){return pn(pn({},e),{},{currentSection:"address"})}));break;case"employmentHistory":s((function(e){return pn(pn({},e),{},{currentSection:null!==e&&void 0!==e&&e.studentForm?"schoolDetails":"address"})}));break;case"personalReferences":s((function(e){return pn(pn({},e),{},{currentSection:"employmentHistory"})}));break;case"summary":s((function(e){return pn(pn({},e),{},{currentSection:"personalReferences"})}))}},children:[(0,g.jsx)(b.Z,{})," Back to Previous Step"]})}),(0,g.jsxs)("div",{className:"flex w-full flex-col gap-4",children:[a.includes(o.currentSection)&&(0,g.jsx)("div",{ref:function(e){i.current.personalInformation=e,i.current.address=e}
1,children:(0,g.jsx)(Fr,{})}),"schoolDetails"===o.currentSection&&(0,g.jsx)("div",{ref:function(e){i.current.schoolDetails=e},children:(0,g.jsx)(Hr,{})}),l.includes(o.currentSection)&&(0,g.jsxs)("div",{ref:function(e){i.current.personalReferences=e,i.current.employmentHistory=e},children:[(null===o||void 0===o?void 0:o.distributorData)&&(0,g.jsx)(S,{}),o.distributorDataNotFound&&(0,g.jsx)(w,{}),(0,g.jsx)(Ir,{})]}),"summary"===o.currentSection&&(0,g.jsx)("div",{ref:function(e){i.current.summary=e},children:(0,g.jsx)(Er,{})})]})]})]})},xn=["accountMenu"];function hn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function bn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?hn(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var vn=function(e){var t,r,n,o,s,i,a,h,b,v,y,O,w,P,S,D,C,E,q,A,k,F,R,L,I,Z,M,T,H,B,z,V,Y=e.accountMenu,U=(0,c.Z)(e,xn),_=(0,l.useRendererContext)().gqlClient,W=(0,f.useRouter)(),G=(0,p.useMyCustomerQuery)(_),K=G.data,$=G.isLoading,J=function(e){if(!e)return!1;var t=new Date(e);return!isNaN(t.getTime())&&((new Date).getTime()-t.getTime())/864e5<=90}(null===K||void 0===K||null===(t=K.getCustomerInformation)||void 0===t||null===(r=t.customer)||void 0===r||null===(n=r.creditApplication)||void 0===n?void 0:n.submittedDate);return(0,g.jsx)("div",{className:"w-full pb-8 lg:pb-14",children:$?(0,g.jsx)("div",{className:"flex h-full w-full items-center justify-center",children:(0,g.jsx)(u.$,{})}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(d.z,{lastCrumbTitle:"Financial Services"}),(0,g.jsxs)("div",{className:"flex w-full",children:[(0,g.jsx)(m.B,{menuItems:Y,type:"account"}),null!==K&&void 0!==K&&null!==(o=K.getCustomerInformation.customer)&&void 0!==o&&o.isInstructor?(0,g.jsx)(j,{label:"Technician Can Not Apply",description:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)("span",{className:"text-neutral-900 font-['Roboto'] text-base font-normal",children:["We are sorry, You can not apply or submit an application, For more information please call"," "]}),(0,g.jsx)("span",{className:"text-neutral-900 font-['Roboto'] text-lg font-bold",children:"(469)-353-4256"})]}),ctaButtonLabel:"GO BACK TO HOMEPAGE",onCTAButtonClick:function(){return W.push("/")}}):null===K||void 0===K||null===(s=K.getCustomerInformation)||void 0===s||null===(i=s.customer)||void 0===i||null===(a=i.creditApplication)||void 0===a||!a.applicationNumber||null!==K&&void 0!==K&&null!==(h=K.getCustomerInformation)&&void 0!==h&&null!==(b=h.customer)&&void 0!==b&&b.isPSAUser||!J?(0,g.jsx)(x.Z$,{isStudent:Boolean(null===K||void 0===K||null===(v=K.getCustomerInformation)||void 0===v||null===(y=v.customer)||void 0===y?void 0:y.student),studentData:{instructorName:(null===K||void 0===K||null===(O=K.getCustomerInformation)||void 0===O||null===(w=O.customer)||void 0===w?void 0:w.instructorName)||"",schoolState:(null===K||void 0===K||null===(P=K.getCustomerInformation)||void 0===P||null===(S=P.customer)||void 0===S||null===(D=S.school)||void 0===D?void 0:D.state)||"",schoolNotListed:!1,schoolName:(null===K||void 0===K||null===(C=K.getCustomerInformation)||void 0===C||null===(E=C.customer)||void 0===E||null===(q=E.school)||void 0===q?void 0:q.name)||"",schoolCity:(null===K||void 0===K||null===(A=K.getCustomerInformation)||void 0===A||null===(k=A.customer)||void 0===k||null===(F=k.school)||void 0===F?void 0:F.city)||"",graduationMonth:(null===K||void 0===K||null===(R=K.getCustomerInformation)||void 0===R||null===(L=R.customer)||void 0===L?void 0:L.graduationMonth)||"",graduationYear:(null===K||void 0===K||null===(I=K.getCustomerInformation)||void 0===I||null===(Z=I.customer)||void 0===Z?void 0:Z.graduationYear)||"",schoolId:(null===K||void 0===K||null===(M=K.getCustomerInformation)||void 0===M||null===(T=M.customer)||void 0===T||null===(H=T.school)||void 0===H?void 0:H.schoolId)||""}
1,isPSAUser:Boolean(null===K||void 0===K||null===(B=K.getCustomerInformation)||void 0===B||null===(z=B.customer)||void 0===z?void 0:z.isPSAUser),userData:null===K||void 0===K||null===(V=K.getCustomerInformation)||void 0===V?void 0:V.customer,children:(0,g.jsx)(fn,bn({pageTitle:"Credit Application"},U))}):(0,g.jsx)(N,{})]})]})})},yn=r(68038);function gn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function jn(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?gn(Object(r),!0).forEach((function(t){(0,n.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):gn(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var Nn=!0,On=function(e){var t,r,n,s,c,u,d,m,p,f=e.myAccountMenu,x=(0,o.Z)({},e.cmsPageData);return(0,g.jsxs)("div",{className:"flex min-h-screen flex-col justify-between",children:[(0,g.jsxs)(i(),{children:[(0,g.jsx)("title",{children:null===x||void 0===x||null===(t=x.meta)||void 0===t||null===(r=t.seo)||void 0===r?void 0:r.metaTitle}),(0,g.jsx)("meta",{property:"og:title",content:null===x||void 0===x||null===(n=x.meta)||void 0===n||null===(s=n.seo)||void 0===s?void 0:s.opengraphTitle}),(0,g.jsx)("meta",{name:"description",content:null===x||void 0===x||null===(c=x.meta)||void 0===c||null===(u=c.seo)||void 0===u?void 0:u.metaDescription},"titleDescription"),(0,g.jsx)("meta",{name:"keywords",content:null===x||void 0===x||null===(d=x.meta)||void 0===d||null===(m=d.seo)||void 0===m?void 0:m.metaKeywords},"titleKeywords")]}),(0,g.jsx)(a.g,{siteConfig:null===x||void 0===x||null===(p=x.context)||void 0===p?void 0:p.config}),x&&(0,g.jsx)(l.Renderer,jn(jn({},x),{},{children:(0,g.jsx)(yn.T,{children:(0,g.jsx)(vn,{accountMenu:f,agreementContractTemplate:x.agreementContractTemplate,termsAndCondition:x.termsAndCondition,psaUserAgreementContractTemplate:x.psaUserAgreementContractTemplate})})}))]})}},95832:function(e,t,r){"use strict";r.d(t,{$:function(){return d}});
1var n=r(4898),o=r(11163),s=r(61026),i=r(85893),a=function(e){var t=e.applicationNumber,r=e.distributorName,a=e.credit,l=(0,o.useRouter)();return(0,i.jsx)("div",{className:"flex w-full px-12 py-12",children:(0,i.jsxs)("div",{className:"relative rounded border-1 border-grey-500 ",children:[(0,i.jsxs)("div",{className:"flex flex-col items-center justify-start gap-8",children:[(0,i.jsx)("div",{className:"bg-sky-700 inline-flex items-start justify-start gap-2.5 rounded-3xl p-4",children:(0,i.jsxs)("svg",{width:"82",height:"82",viewBox:"0 0 82 82",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,i.jsx)("rect",{width:"82",height:"82",rx:"41",fill:"#0067B1"}),(0,i.jsx)("path",{d:"M32.666 42.043L38.916 48.293L49.3327 35.793",stroke:"white",strokeWidth:"5",strokeLinecap:"round",strokeLinejoin:"round"}),(0,i.jsx)("path",{d:"M40.9994 61.8346C52.5053 61.8346 61.8327 52.5072 61.8327 41.0013C61.8327 29.4954 52.5053 20.168 40.9994 20.168C29.4934 20.168 20.166 29.4954 20.166 41.0013C20.166 52.5072 29.4934 61.8346 40.9994 61.8346Z",stroke:"white",strokeWidth:"5"})]})}),(0,i.jsxs)("div",{className:"flex flex-col items-center justify-start gap-8",children:[(0,i.jsx)("div",{className:"inline-flex items-start justify-center gap-2.5 bg-[#E3F2FA] px-20 py-6",children:(0,i.jsx)("div",{className:" text-center font-['Roboto'] text-lg font-normal ",children:"Congratulations! You have been approved for Matco financing. See your Distributor for financing details.Approval subject to verifications of full-time employment as a professional technician in the automotive trade a confirmation of information listed on the credit card application. Approval is contingent on having a distributor servicing your shop. You can contact your distributor about how to use your credit."})}),(0,i.jsxs)("div",{className:"flex flex-col items-center justify-start gap-4 px-12",children:[(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)("span",{className:"font-['Roboto'] text-4xl font-normal ",children:"Credit Limit: "}),(0,i.jsxs)("span",{className:"font-['Roboto'] text-4xl font-bold text-[#0067B1]",children:["$",a]})]}),(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)("span",{className:"font-['Roboto'] text-lg font-normal ",children:"Your Application Number: "}),(0,i.jsx)("span",{className:"font-['Roboto'] text-xl font-bold ",children:t})]}),r&&(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)("span",{className:"font-['Roboto'] text-lg font-normal ",children:"Distributor Name: "}),(0,i.jsx)("span",{className:"font-['Roboto'] text-xl font-bold ",children:r})]})]}),(0,i.jsx)(n.z,{kind:"primary",uppercase:!0,size:"h48",className:"mb-12 flex w-full items-center gap-1.5 !font-medium md:w-6/12 md:max-w-[360px]",onClick:function(){return l.push("/")},children:"GO BACK TO HOMEPAGE"})]})]}),(0,i.jsx)(s.Z,{className:"absolute top-0 right-0  h-72 w-64  opacity-90"})]})})},l=r(67294),c=function(e){var t=e.applicationNumber,r=(0,o.useRouter)(),a=(0,l.useRef)(null);return(0,l.useEffect)((function(){var e;null===a||void 0===a||null===(e=a.current)||void 0===e||e.scrollIntoView()}),[]),(0,i.jsxs)("div",{className:"flex w-full px-12 py-12",ref:a,children:[(0,i.jsxs)("div",{className:"flex w-full flex-col items-center justify-start gap-8 rounded-lg border-1 border-grey-500 px-12 py-12",children:[(0,i.jsx)("div",{className:"text-grey-800 text-center font-['Roboto'] text-4xl font-bold capitalize leading-10",children:"Application Submitted"}),(0,i.jsxs)("div",{className:"flex flex-col  items-center justify-center gap-2.5 px-12 py-4",children:[(0,i.jsx)("div",{className:"text-center",children:(0,i.jsx)("div",{className:"text-grey-800 text-center font-['Roboto'] text-lg font-normal",children:"Thank you for your application! We\u2019ll review your application and get back to you on a decision shortly via email."})}),(0,i.jsx)("div",{className:"text-center",children:(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)("span",{className:"text-grey-800 font-['Roboto'] text-lg font-normal",children:"Your Application Number: "}),(0,i.jsx)("span",{className:"text-grey-800 font-['Roboto'] text-xl font-bold",children:t})]})})]}),(0,i.jsx)(n.z,{kind:"primary",uppercase:!0,size:"h48",className:"flex w-full items-center gap-1.5 !font-medium md:w-6/12 md:max-w-[360px]",onClick:function(){return r.push("/")},children:"GO BACK TO HOMEPAGE"})]}),(0,i.jsx)("div",{className:"relative opacity-90",children:(0,i.jsx)(s.Z,{className:"absolute top-0 right-0  h-72 w-64"})})]})},u=function(e){var t=e.applicationNumber,r=(0,o.useRouter)(),a=(0,l.useRef)(null);return(0,l.useEffect)((function(){var e;null===a||void 0===a||null===(e=a.current)||void 0===e||e.scrollIntoView()}),[]),(0,i.jsxs)("div",{className:"flex w-full px-12 py-12",ref:a,children:[(0,i.jsxs)("div",{className:"flex w-full flex-col items-center justify-start gap-8 rounded-lg border-1 border-grey-500 px-12 py-12",children:[(0,i.jsx)("div",{className:"text-grey-800 text-center font-['Roboto'] text-4xl font-bold capitalize leading-10",children:"Application Submitted"}),(0,i.jsxs)("div",{className:"flex flex-col  items-center justify-center gap-2.5 px-12 py-4",children:[(0,i.jsx)("div",{className:"text-center",children:(0,i.jsx)("div",{className:"text-grey-800 text-center font-['Roboto'] text-lg font-normal",children:"Thank y
1ou for applying. We\u2019re unable to proceed with your application."})}),(0,i.jsx)("div",{className:"text-center",children:(0,i.jsxs)("div",{className:"text-center",children:[(0,i.jsx)("span",{className:"text-grey-800 font-['Roboto'] text-lg font-normal",children:"Your Application Number: "}),(0,i.jsx)("span",{className:"text-grey-800 font-['Roboto'] text-xl font-bold",children:t})]})})]}),(0,i.jsx)(n.z,{kind:"primary",uppercase:!0,size:"h48",className:"flex w-full items-center gap-1.5 !font-medium md:w-6/12 md:max-w-[360px]",onClick:function(){return r.push("/")},children:"GO BACK TO HOMEPAGE"})]}),(0,i.jsx)("div",{className:"relative opacity-90",children:(0,i.jsx)(s.Z,{className:"absolute top-0 right-0  h-72 w-64"})})]})},d=function(e){var t=e.credit,r=e.distributorName,n=e.applicationNumber;return"REJECTED"===e.status?(0,i.jsx)(u,{applicationNumber:n}):t?(0,i.jsx)(a,{applicationNumber:n,distributorName:r,credit:t}):(0,i.jsx)(c,{applicationNumber:n})}},68038:function(e,t,r){"use strict";r.d(t,{T:function(){return i}});var n=r(16523),o=r(11163),s=r(67294),i=function(e){var t=e.children,r=(0,n.useRendererContext)().gqlClient,i=(0,o.useRouter)(),a=i.push,l=(0,n.useUserPersonalDetailsInformation)(r),c=l.customer,u=l.isLoading,d=l.isStudent,m=l.isInstructor,p=l.verificationPending,f=!(null===c||void 0===c||!c.id);return(0,s.useEffect)((function(){u||f||a("/account/signin?redirectURL=".concat(i.asPath))}),[u,c,a,f]),(0,s.cloneElement)(t,{user:c,isStudent:d,isInstructor:m,isLoading:u,verificationPending:p})}},6485:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/account/financial-services/apply-credit",function(){return r(45338)}])}},function(e){e.O(0,[3842,4148,2107,5374,2172,1557,9178,6121,5998,4199,4194,9922,5397,9774,2888,179],(function(){return t=6485,e(e.s=t);var t}));var t=e.O();_N_E=t}]);

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.