1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1410],{31410:function(e,t,a){"use strict";a.d(t,{Z:function(){return x}});var n=a(85893),o=a(82175),l=a(67294),r=a(45354),i=a.n(r),m=a(86202),s=a(7258),u=a(50286),d=function(e){var t=e.phone_regx,a=e.zip_regx;e.convertedDobFormat;return s.Ry().shape({showZip:s.O7(),hidePhone:s.O7(),DOBValidation:s.O7(),OptionalDOB:s.O7(),optinMandatory:s.O7(),ShowCityDropdown:s.O7(),firstName:s.Z_().trim().required("First Name is required"),lastName:s.Z_().trim().required("Last Name is required"),phone:s.Z_().when("hidePhone",{is:!1,then:s.Z_().matches(t,"Phone number is not valid").required("Phone number is required")}),email:s.Z_().email("Email is invalid").required("Email is required"),zip:s.Z_().when("showZip",{is:!0,then:s.Z_().matches(a,"Zip code is not valid").required("Zip is required")}),optin:s.Z_().when("optinMandatory",{is:!0,then:s.Z_().oneOf(["true"]).required()}),cityDropdown:s.Z_().when("ShowCityDropdown",{is:!0,then:s.Z_().ensure().required("select one option")}),comments:s.Z_().when("hideComment",{is:void 0,then:s.Z_().trim().required("Comment is required")}),age:s.Z_().when(["DOBValidation","OptionalDOB"],{is:function(e,t){return e&&!t},then:s.Z_().test((function(e){if(e)if(e.length>=8){var t=e.split("/"),a=4==t[2].length?t[2]:t[0];if(3==t.length&&(4==t[2].length||4==t[0].length&&2==t[2].length)&&!isNaN(Number(t[0]))&&!isNaN(Number(t[1]))&&!isNaN(Number(t[2]))&&(0,u.cH)(new Date(a))>0)return!!new Date(t[0]+"-"+t[1]+"-"+t[2])}else if(e.length>=6&&e.length<8){var n=e.split("/");4==n[1].length?n[1]:n[0];if(2==n.length&&(4==n[1].length||4==n[0].length&&2==n[1].length&&!isNaN(Number(n[0]))&&!isNaN(Number(n[1]))&&(0,u.cH)(new Date(e))>=0))return!!(n[0]+"-"+n[1])}}))})})},p=a(93652),c=a(79730),_=a(6316),h=a(69495),v=a(21269),f=a(76097),g=a(62335);function b(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function N(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{},n=Object.keys(a);"function"===typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(a).filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable})))),n.forEach((function(t){b(e,t,a[t])}))}return e}function y(e,t){if(null==e)return{};var a,n,o=function(e,t){if(null==e)return{};var a,n,o={},l=Object.keys(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)>=0||(o[a]=e[a]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)a=l[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(o[a]=e[a])}return o}var A=(0,m.ss)(i());function x(e){var t=e.formState,a=void 0===t?{}:t,r=e.setFormState,i=e.inputChangeHandler,m=e.submitHandler,s=e.labelFirstName,b=e.labelLastName,x=e.labelAge,w=e.labelEmail,R=e.labelPhone,D=e.labelZip,C=e.submitBtnLabel,Z=e.termsAndConditions,j=e.optinStatus,M=e.zipUtility,O=e.phoneUtility,P=e.dobUtility,q=e.inputFieldEvents,S=e.showZipCodeField,T=e.showDOB,I=e.OptionalDOB,E=e.showUserType,z=e.hideComment,L=e.hidePhoneField,Y=e.optionalComment,B=e.dynamicLabel,U=e.labelFirstNameParentSelection,X=e.labelLastNameParentSelection,G=e.labeldobParentSelection,W=e.labelzipParentSelection,H=e.additional_language,V=e.isOptinMandatory,J=e.countryCode,Q=e.sendURLparamsToSFDC,K=e.LeadSource,$=e.ShowCityDropdown,ee=e.CityDropdownList,te=e.showPhoneNoWithPrefix,ae=e.phonenoPrefixes,ne=e.ageValidationMessage,oe=e.optinMandatoryMessage,le=void 0===oe?"Please accept so we can reach out to you.":oe,re=P.dobPlaceholder?P.dobPlaceholder:"MM/DD/YYYY",ie="MM-DD-YYYY";if(re.length>=8){var me=re.split("/");3==me.length&&(4==me[2].length||4==me[0].length&&2==me[2].length)&&(ie=me[0]+"-"+me[1]+"-"+me[2])}var se=ne||"You must be 13 or more to continue",ue=(0,l.useContext)(f.Z).pageProps,de=ue.localeId,pe=(0,l.useState)("An adult"),ce=pe[0],_e=pe[1],he=(0,l.useState)(!0),ve=he[0],fe=he[1],ge=(0,l.useState)(!1),be=ge[0],Ne=ge[1],ye="";if(de){var Ae=de.split("-");Ae[0]&&(ye=Ae[0])}if(B){var xe="A parent (looking for my child)"==ce;s=xe&&U||s,b=xe&&X||b,x=xe&&G||x,D=xe&&W||D}var Fe,ke,we,Re,De,Ce,Ze,je,Me,Oe,Pe,qe,Se,Te,Ie,Ee,ze,Le,Ye,Be,Ue,Xe,Ge=(0,l.useMemo)((function(){return{firstName:a.firstName?a.firstName:"",lastName:a.lastName?a.lastName:"",phone:a.phone?a.phone:"",email:a.email?a.email:"",zip:a.zip?a.zip:"",comments:a.comments?a.comments:"",optin:!1!==j,age:a.age?a.age:"",ageGroup:a.ageGroup?a.ageGroup:"An adult",showZip:S,hideComment:z||Y,hidePhone:L||!1,DOBValidation:T,OptionalDOB:I,optinMandatory:V,cityDropdown:null!==$&&void 0!==$?$:"",ShowCityDropdown:$}}),[I,$,a.age,a.ageGroup,a.comments,a.email,a.firstName,a.lastName,a.phone,a.zip,z,L,V,j,Y,T,S]),We=(0,l.useMemo)((function(){return[{id:"r1",value:"An adult",label:null!==(Fe=H.label_adult)&&void 0!==Fe?Fe:"An adult",eventname:"ra_adult_select"},{id:"r2",value:"A parent (looking for my child)",label:null!==(ke=H.label_parent)&&void 0!==ke?ke:"A parent",eventname:"ra_parent_select"},{id:"r3",value:"A teen",label:null!==(we=H.label_teen)&&void 0!==we?we:"A teen",eventname:"ra_teen_select"}]}),[H.label_adult,H.label_parent,H.label_teen]),He=(0,l.useMemo)((function(){return[{name:"firstName",eventName:null!==(Re=q.fnevent)&&void 0!==Re?Re:"fnEvent",floatLabel:null!==s&&void 0!==s?s:"Your first name"},{name:"lastName",eventName:null!==(De=q.lnevent)&&void 0!==De?De:"lnEvent",floatLabel:null!==b&&void 0!==b?b:"Your last name"},{condition:T,id:"dob",type:"tel",name:"age",eventName:null!==(Ce=q.ageEvent)&&void 0!==Ce?Ce:"ageEvent",floatLabel:null!==x&&void 0!==x?x:"Age","form-placeholder":null!==(Ze=P.dobPlaceholder)&&void 0!==Ze?Ze:"MM/DD/YYYY",pattern:null!==(je=P.dobPattern)&&void 0!==je?je:"(1[0-2]|0[1-9])/(1[0-9]|0[1-9]|2[0-9]|3[0-1])/dddd","data-valid-example":null!==(Me=P.dobDataValidExample)&&void 0!==Me?Me:"11/11/2018",className:"masked",children:[(0,n.jsx)("span",{id:"dobMask",className:A("labelMask"),"aria-hidden":"true"},"dobMask")]},{condition:!L,type:"email",name:"email",eventName:null!==(Oe=q.emailVal)&&void 0!==Oe?Oe:"emailVal",floatLabel:null!==w&&void 0!==w?w:"Your email"},{condition:!L,id:"phone",type:"tel",name:"phone",eventName:null!==(Pe=q.phNumEvent)&&void 0!==Pe?Pe:"phNumEvent",floatLabel:null!==R&&void 0!==R?R:"Your phone","form-placeholder":null!==(qe=O.formPlaceholder)&&void 0!==qe?qe:"XXX-XXX-XXXX",pattern:null!==(Se=O.phonePattern)&&void 0!==Se?Se:"/d{3}-d{3}-d{4}",className:"masked",chilrdenBefore:[te?(0,n.jsx)(o.gN,{className:A("phone-prefix"),name:"phone_prefix",placeholder:ae,disabled:!0},"phone_prefix"):null],children:[(0,n.jsx)("span",{id:"phoneMask",className:A("labelMask"),"aria-hidden":"true"},"phoneMask")]},{condition:!!S,id:"zip",type:null!==(Te=M.inputType)&&void 0!==Te?Te:"tel",name:"zip",eventName:null!==(Ie=q.zipEvent)&&void 0!==Ie?Ie:"zipEvent",floatLabel:null!==D&&void 0!==D?D:"Your ZIP","form-placeholder":null!==(Ee=M.zipPlaceholder)&&void 0!==Ee?Ee:"XXXXX",pattern:null!==(ze=M.zipRegx)&&void 0!==ze?ze:"/d{5}","data-charset":null!==(Le=M.dataCharset)&&void 0!==Le?Le:"",className:"masked",children:[(0,n.jsx)("span",{id:"zipMask",className:A("labelMask"),"aria-hidden":"true"},"zipMask")]},{condition:!!$,component:"select",name:"cityDropdown",placeholder:"Your primary city of residence/work*",inputChildren:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("option",{value:"",hidden:!0,children:"Your primary city of residence/work*"}),ee&&ee.map((function(e,t){return(0,n.jsx)("option",{value:e.value,children:e.fieldName},t)}))]})},{condition:!z,fullWidthInput:!0,component:"textarea",rows:"4",cols:"20",id:"comments",name:"comments",floatLabel:null!==(Ye=H.comment_label)&&void 0!==Ye?Ye:"Comment:","form-placeholder":null!==(Be=H.comment_placeholder)&&void 0!==Be?Be:"Please indicate the best dates and times to contact you. *",variant:"outlined",label:"PROJECT SHORT_DESCRIPTION"}]}),[ee,$,H.comment_label,H.comment_placeholder,P.dobDataValidExample,P.dobPattern,P.dobPlaceholder,z,L,q.ageEvent,q.emailVal,q.fnevent,q.lnevent,q.phNumEvent,q.zipEvent,x,w,s,b,R,D,O.formPlaceholder,O.phonePattern,ae,T,te,S,M.dataCharset,M.inputType,M.zipPlaceholder,M.zipRegx]),Ve=(0,l.useCallback)((function(e){var t,a=null===(t=e.target.attributes)||void 0===t?void 0:t.getNamedItem("eventname").value;p.Z.gtmTrackNA(a),_e(e.target.value)}),[]);return(0,l.useEffect)((function(){var e;h.Z.init(null!==(e=P.dobMaskedNumber)&&void 0!==e?e:"XdDmMyY9"),void 0!=j&&fe(j)}),[P.dobMaskedNumber,j]),(0,n.jsx)(o.J9,{initialValues:Ge,validationSchema:d({zip_regx:new RegExp(null!==(Ue=M.zipRegx)&&void 0!==Ue?Ue:""),phone_regx:new RegExp(null!==(Xe=O.phoneRegx)&&void 0!==Xe?Xe:""),convertedDobFormat:ie}),onSubmit:function(e){(e=N({},e,g.Z.heeetData())).age;var t,n=e.optin?"opt-in":"opt-out";if("AU"!==e.country_code&&"NZ"!==e.country_code||(e.phone=e.phone.replace(/^[0]+/g,"")),te&&ae&&(e.phone=ae+e.phone),e.ageGroup=void 0==E||0==E?"":(null===a||void 0===a?void 0:a.ageGroup)?a.ageGroup:ce,o=(0,u.md)("".concat(e.age),re),(Date.now()-new Date(o).getTime())/315576e5<13&&"A teen"===(e.ageGroup=(null===a||void 0===a?void 0:a.ageGroup)?a.ageGroup:ce))Ne(!0);else{var o;void 0!=window.dataLayer&&(p.Z.gtmTrackNA("ra_submit_click"),!0===e.optin?p.Z.gtmTrackNA("inv_request_an_appt_opt_in_submit"):p.Z.gtmTrackNA("inv_request_an_appt_opt_out_submit")),"An adult"==e.ageGroup&&(p.Z.gtmTrackNA("inv_request_an_appt_adult_request_my_appt_button_click",void 0,{ga_label:"adult request appt ".concat(e.optin?"opt-in":"opt-out")}),1==e.optin&&p.Z.gtmTrackNA("inv_request_an_appt_adult_opt_in_request_my_appt_button_click")),"A teen"==e.ageGroup&&(p.Z.gtmTrackNA("inv_request_an_appt_a_teenager_request_my_appt_button_click",void 0,{ga_label:"teen request appt ".concat(e.optin?"opt-in":"opt-out")}),1==e.optin&&p.Z.gtmTrackNA("inv_request_an_appt_a_teenager_opt_in_request_my_appt_button_click")),"A parent (looking for my child)"==e.ageGroup&&(p.Z.gtmTrackNA("inv_request_an_appt_a_parent_request_my_appt_button_click",void 0,{ga_label:"parent request appt ".concat(e.optin?"opt-in":"opt-out")}),1==e.optin&&p.Z.gtmTrackNA("inv_request_an_appt_a_parent_opt_in_request_my_appt_button_click")),e.age=T?(0,u.md)(e.age||"",re):null,I&&"MM-DD-YYYY"===e.age&&(e.age=null),e.country_code=J||"US",e.LeadSource=K||"Request appointment",e.language=ye;
1var l=null,i=null,s=null,d=null,_=null;if(Q){var h=g.Z.fetchUtmDataFromPageProps(ue)||c.Z.getUTMCookie();l=h&&h.utm_campaign?h.utm_campaign:null,i=h&&h.utm_medium?h.utm_medium:null,s=h&&h.utm_source?h.utm_source:null,d=h&&h.utm_term?h.utm_term:null,_=h&&h.utm_content?h.utm_content:null}e=N({},e,{leadUrlCampaign:l,leadUrlMedium:i,leadUrlSource:s,leadUtmTerm:d,leadUtmContent:_}),null===r||void 0===r||r({firstName:e.firstName,lastName:e.lastName,age:e.age,email:e.email,phone:e.phone,comments:e.comments,ageGroup:e.ageGroup,zip:"",optin:!1,optinMandatory:!1,showZip:!1,OptionalDOB:!1,cityDropdown:"",ShowCityDropdown:""}),m(e,ae),null===(t=window.dataLayer)||void 0===t||t.push({event:"request_appointment_completed",user_category:e.ageGroup,contact_consent:n})}},children:function(e){var t,l,r=e.errors,m=e.handleChange,s=e.touched,u=e.handleSubmit,d=e.handleReset,c=e.setFieldTouched;return(0,n.jsxs)("form",{"data-id":g.Z.createIdFromLocaleAndSlug(ue),className:A("form"),onSubmit:u,onReset:d,children:[E&&(0,n.jsxs)("div",{className:A("UserTypeField"),children:[(0,n.jsx)("label",{className:A("radio-label"),children:null!==(t=H.i_am)&&void 0!==t?t:"I am: "}),(0,n.jsx)("div",{className:A("form-group","UserTypeFieldInputsWrapper"),children:We.map((function(e,t){return(0,n.jsx)(_.Z,N({type:"radio",name:"iam",checked:(null!==(l=a.ageGroup)&&void 0!==l?l:ce)==e.value,onChange:Ve,className:A("custom-control custom-radio")},e),t)}))})]}),(0,n.jsx)("div",{className:A("InputFieldsContainer"),children:He.filter((function(e){var t=e.condition;return![null,!1].includes(t)})).map((function(e,t){var a=e.eventName,o=e.className,l=e.children,u=(e.condition,y(e,["eventName","className","children","condition"]));return(0,n.jsx)(F,N({placeholder:" ",onClick:function(){return a&&p.Z.gtmTrackNA(a)},onChange:function(e){m(e),null===i||void 0===i||i(e)},className:A(o,k(u.name,r,s))},u,{children:l}),t)}))}),(0,n.jsxs)("div",{className:A("custom-checkbox"),children:[(0,n.jsx)(o.gN,{id:"optin",name:"optin",type:"checkbox",checked:ve,onClick:function(){c("optin"),fe((function(e){return!e}))},className:A("custom-control-input",k("optin",r,s))}),(0,n.jsx)(o.Bc,{name:"optin",children:function(e){return(0,n.jsxs)("div",{className:A("tool-tip-error"),children:[(0,n.jsx)("div",{className:A("tool-tip-arrow")}),le]})}}),!!Z&&(0,n.jsx)("label",{className:A("custom-control-label"),htmlFor:"optin",dangerouslySetInnerHTML:{__html:Z}})]}),(0,n.jsx)("div",{className:A("get-start"),children:(0,n.jsx)("button",{type:"submit",className:A("submitButton"),children:null!==C&&void 0!==C?C:"submit"})}),(0,n.jsxs)("div",{className:A("ra-form-discalimer"),children:[H.reqApptDisclaimer1&&(0,n.jsx)("label",{className:A("ra-form-discalimer1"),htmlFor:"QuickTipDiscalimer",dangerouslySetInnerHTML:{__html:H.reqApptDisclaimer1}}),H.reqApptDisclaimer2&&(0,n.jsx)("label",{className:A("ra-form-discalimer2"),htmlFor:"QuickTipDiscalimer",dangerouslySetInnerHTML:{__html:H.reqApptDisclaimer2}}),be&&(0,n.jsxs)(v.default,{show:be,onHide:function(){return Ne(!1)},dialogClassName:A("age-validation-modal"),backdropClassName:A("custom-backdrop"),centered:!0,children:[(0,n.jsx)(v.default.Header,{closeButton:!0}),(0,n.jsx)(v.default.Body,{children:(0,n.jsx)("div",{className:A("age-error-message"),children:se})})]})]})]})}})}function F(e){var t=e.floatLabel,a=e.name,l=e.chilrdenBefore,r=e.children,i=e.inputChildren,m=e.fullWidthInput,s=y(e,["floatLabel","name","chilrdenBefore","children","inputChildren","fullWidthInput"]);return(0,n.jsxs)("div",{className:A("form-group",m?"fullWidthInput":"halfWidthInput"),children:[l,(0,n.jsxs)("div",{className:A("MainInput",{"has-float-label":!["select"].includes(null===s||void 0===s?void 0:s.component)&&t}),children:[(0,n.jsx)(o.gN,N({name:a},s,{children:i})),t&&(0,n.jsx)("label",{htmlFor:a,className:A("labelName"),children:t}),r]})]})}var k=function(e,t,a){return m.ZP.composeClasses(!0,{"form-control":!0,"is-invalid":!(!t[e]||!a[e]),success:!t[e]&&!!a[e]})}},45354:function(e){e.exports={root:"RAForm_root__ddAiS","form-container":"RAForm_form-container__KBX1C","form-wrapper":"RAForm_form-wrapper__ZAoLu","homepage-form-wrapper":"RAForm_homepage-form-wrapper__M3oEx","tile-heading":"RAForm_tile-heading__1Rio6","adult-form-section":"RAForm_adult-form-section__PT_yy","home-checkbox":"RAForm_home-checkbox__Iis_h","homepage-form-container":"RAForm_homepage-form-container__hgzNG","form-group":"RAForm_form-group__e48zl",success:"RAForm_success__kHeTA","form-control":"RAForm_form-control__xbt3Z","is-invalid":"RAForm_is-invalid__h3Be1","has-float-label":"RAForm_has-float-label__MK07p",labelName:"RAForm_labelName__xuUCl",labelMask:"RAForm_labelMask__fF_Cx","custom-checkbox":"RAForm_custom-checkbox__RCJcm","custom-control-label":"RAForm_custom-control-label__xsfMh","custom-control-input":"RAForm_custom-control-input__CEpXR","tool-tip-error":"RAForm_tool-tip-error__nQRQm","tool-tip-arrow":"RAForm_tool-tip-arrow__b0gwB","get-start":"RAForm_get-start__pMzgy","homepage-form-button":"RAForm_homepage-form-button__YNKnw","parent-form-css":"RAForm_parent-form-css__Q_MOp","ra-page-heading":"RAForm_ra-page-heading__jF2Xg",form:"RAForm_form__4iGvX",InputFieldsContainer:"RAForm_InputFieldsContainer__OjJJA","radio-label":"RAForm_radio-label__RvCBF","phone-prefix":"RAForm_phone-prefix__vHIR_",fullWidthInput:"RAForm_fullWidthInput__UWbD7",halfWidthInput:"RAForm_halfWidthInput__0IuLD",MainInput:"RAForm_MainInput__622H8",submitButton:"RAForm_submitButton__HWsoo",UserTypeFieldInputsWrapper:"RAForm_UserTypeFieldInputsWrapper___1z7m","custom-radio":"RAForm_custom-radio__EepRo","age-validation-modal":"RAForm_age-validation-modal__dj1T2","custom-backdrop":"RAForm_custom-backdrop__AS5Fe"}}}]);
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.