"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1642],{39412:function(e,n,t){t.r(n),t.d(n,{default:function(){return M}});var i=t(59499),r=t(50029),a=t(64687),o=t.n(a),s=t(67294),l=t(87066),c=t(87103),u=t(12093),d=t(53964),m=t(53418),p=t(67686),h=t(87379),g=(0,h.iv)(["&:after{content:'*';vertical-align:middle;margin-left:0.3rem;color:",";}"],function(e){return e.theme.colors.blue}),f=(0,h.ZP)(c.l0).withConfig({displayName:"FormLayout",componentId:"sc-kzoyx-0"})(["display:grid;grid-gap:2rem 2rem;text-align:left;grid-template-columns:1fr;width:100%;margin:2rem auto;@media only screen and (max-width:","){padding:0 2rem;}@media only screen and (max-width:","){padding:0 0;}"],function(e){return e.theme.breakpoints.desktop960},function(e){return e.theme.breakpoints.smtablet}),x=h.ZP.div.withConfig({displayName:"NotificationBox",componentId:"sc-kzoyx-1"})(["margin-top:3rem;text-align:left;"]),y=h.ZP.div.withConfig({displayName:"InputContainer",componentId:"sc-kzoyx-2"})(["label{text-align:left;font-size:",";",";}input,select{width:100%;padding-bottom:1rem;&:focus{border:1px solid #0f62fa;}}input[type='checkbox'],input[type='radio']{margin-right:1.5rem;width:auto;}"],function(e){return e.theme.fonts.textSmall},function(e){return e.required&&g}),j=h.ZP.label.withConfig({displayName:"OptInContainer",componentId:"sc-kzoyx-3"})(["display:flex;align-items:center;font-size:",";input[type='checkbox']{margin-right:1rem;min-width:3rem;}"],function(e){return e.theme.fonts.textSmall}),b=h.ZP.div.withConfig({displayName:"EmployeeCountContainer",componentId:"sc-kzoyx-4"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;gap:1rem;",";"],function(e){return e.required&&"\n p {\n ".concat(g,";\n } \n ")}),v=h.ZP.div.withConfig({displayName:"EmployeeCountOptions",componentId:"sc-kzoyx-5"})(["display:grid;grid-template-columns:repeat(2,1fr);gap:1.5rem 2rem;margin:0 auto;@media only screen and (max-width:","){max-width:100%;}@media only screen and (max-width:","){width:100%;grid-template-columns:1fr;gap:1rem;}"],function(e){return e.theme.breakpoints.desktop960},function(e){return e.theme.breakpoints.smphone}),C=h.ZP.div.withConfig({displayName:"EmployeeCountOption",componentId:"sc-kzoyx-6"})(["display:flex;align-items:center;min-width:10rem;input[type='radio']{margin-right:1rem;}label{white-space:nowrap;}"]),Z=h.ZP.div.withConfig({displayName:"SubmitContainer",componentId:"sc-kzoyx-7"})(["display:flex;flex-direction:column;justify-content:center;align-items:center;margin:0 auto 0 auto;max-width:36rem;p{font-size:",";text-align:center;margin:0 auto 2rem auto;}"],function(e){return e.theme.fonts.textSmall}),w=h.ZP.span.withConfig({displayName:"ErrorMessage",componentId:"sc-kzoyx-8"})(["display:inline-block;color:",";font-size:",";padding-top:1rem;"],function(e){return e.theme.colors.red},function(e){return e.theme.fonts.textSmall}),k=h.ZP.div.withConfig({displayName:"PhoneExtensionContainer",componentId:"sc-kzoyx-9"})(["display:flex;.mod-phone{flex:6.3;}.mod-extension{padding-left:1.2rem;flex:4;}"]),q=t(66981),N=t(21977),O=t(93706),P=t(7348),_=t(96018),S=t(7013),B=t(63570),I=t(67619),z=t(41011),R=t(83029),E=t(85893);function T(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),t.push.apply(t,i)}return t}function L(e){for(var n=1;n;:[\]]{1,50}$/.test(e)}).required("Please enter your first name."),lastName:u.Z_().test("is-special-character","Please enter a valid name",function(e){return/^[\w'\-,.][^0-9_!¡?÷?¿/\\+=@#$%ˆ&*(){}|~<>;:[\]]{1,50}$/.test(e)}).required("Please enter your last name."),title:u.Z_().required("Please select a title."),email:u.Z_().email("Please enter a valid email address.").required("Please enter your email address."),phone:u.Z_().test("is-number-phone","The phone number is not valid. +1 (123)456-7890",function(e){return/^[-+() 0-9]+$/.test(e)}).required("Please enter your phone number."),company:u.Z_().required("Please enter your company name."),country:u.Z_().required("Please select your country."),quantity:u.Z_().required("Please select an option.")}),M=function(e){var n,t=e.formTitle,a=e.pageLocation,u=e.formName,h=e.submitButtonLarge,g=e.dataAt,T=(0,s.useState)("inital"),M=T[0],V=T[1],$=(0,s.useRef)(null),H=(0,s.useRef)(null),J=(0,s.useRef)(null),U=(0,s.useRef)(null),W=(0,s.useRef)(null),G=(0,s.useRef)(null),K=(0,s.useRef)(null),Q=(0,s.useRef)(null),X=(0,s.useState)(),Y=X[0],ee=X[1];return"complete"===M?null:"pending"===M?(0,E.jsx)(x,{children:(0,E.jsx)(q.Z,{})}):"success"===M?(0,E.jsx)(x,{children:(0,E.jsxs)(N.Z.Success,{visible:!0,onClose:function(){return V("inital")},children:[(0,E.jsxs)(N.Z.Body,{children:[(0,E.jsx)("p",{children:(0,E.jsx)("strong",{children:"Thank you for contacting us."})}),(0,E.jsx)("p",{children:"A member of our team will get back to you as soon as possible."})]}),(0,E.jsx)(N.Z.CloseButton,{onClick:function(){return V("complete")}})]})}):"error"===M?(0,E.jsx)(x,{children:(0,E.jsxs)(N.Z.Error,{visible:!0,onClose:function(){return V("inital")},children:[(0,E.jsx)(N.Z.Body,{children:(0,E.jsxs)("p",{children:[(0,E.jsx)("strong",{children:"There was an error submitting the form"}),", please refresh the page to try again."]})}),(0,E.jsx)(N.Z.CloseButton,{onClick:function(){return V("initial")}})]})}):(0,E.jsx)(c.J9,{initialValues:{firstName:"",lastName:"",email:"",title:"",company:"",country:"United States",phone:"",quantity:"",department:"sales",gatrackid:"",gaclientid:"",gacampaign:"",gamedium:"",gasource:"",gauserid:"",optin:!1,formName:"",ext:""},validationSchema:F,onSubmit:(n=(0,r.Z)(o().mark(function e(n){var s,c,d,m,h,g,f,x,y,j,b,v,C,Z,w,k,q,N;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(s=n.company,c=n.email,d=n.firstName,m=n.lastName,h=n.phone,g=n.country,f=n.quantity,x=n.title,y=n.department,j=n.gatrackid,b=n.gaclientid,v=n.gacampaign,C=n.gamedium,Z=n.gasource,w=n.gauserid,k=n.optin,q=n.ext,V("pending"),!(Y||(null==q?void 0:q.length)>20)){e.next=4;break}return e.abrupt("return",V("success"));case 4:return e.next=6,(0,R.W)();case 6:N=e.sent,(0,l.Z)({method:"POST",url:"".concat(p.yh,"/contact_us"),headers:{"Content-Type":"applicationhttps://www.cbtnuggets.com/json"},data:L({title:x,company:"".concat(s.trim()),country:"".concat(g.trim()),email:"".concat(c.trim()),phone:"".concat(h.trim()),quantity:f,first_name:"".concat(d.trim()),last_name:"".concat(m.trim()),form_name:u,location:a,department:y,gatrackid:j,gaclientid:b,gacampaign:v,gamedium:C,gasource:Z,gauserid:w,optin:"".concat(k),subject:"".concat(t),ext:"".concat(q),referrer:document.referrer,formName:"Contact Sales",campaignIds:v,page_url:window.location.href},N)}).then(function(){return V("success")}).then((0,r.Z)(o().mark(function e(){var n,r,u,y,j,b;return o().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(window.dataLayer.push({event:"formSubmission",enhanced_conversion_data:{email:"".concat(c.trim())}}),r="contact_sales_form","enterprise-lander"===a&&(r="enterprise_contact_form"),"government-lander"===a&&(r="government_contact_form"),n={},(0,i.Z)(n,r,{}),(0,i.Z)(n,"membership",{}),u=n,("enterprise-lander"===a||"government-lander"===a)&&(u[r].call_to_action=t),"contact_sales_form"!==r){e.next=22;break}return y=(0,z.i)(),e.next=10,l.Z.post("/api/request-ip");case 10:return j=e.sent.data,e.next=14,(0,I.U)({email:c});case 14:b=e.sent.hashedEmail,u.membership=L(L({},y),{},{email:b,ipaddress:j}),u[r].phone=h,u[r].email=b,u[r].first_name=d,u[r].last_name=m,u[r].country=g;case 22:if(u[r].job_title=x,u[r].company=s,u[r].number_of_employees=f,(0,S.w)(r,u),!k){e.next=29;break}return e.next=29,l.Z.post("".concat(p.yh,"/create-klaviyo-profile"),{email:c,firstName:d,lastName:m});case 29:case"end":return e.stop()}},e)}))).catch(function(){return V("error")});case 8:case"end":return e.stop()}},e)})),function(e){return n.apply(this,arguments)}),children:function(e){var n=e.errors,t=e.touched,i=e.handleBlur,r=e.values,a=e.handleChange,o=e.setFieldValue,s=e.isSubmitting,l=function(){if(null!==J.current&&null!==U.current&&null!==W.current&&null!==G.current&&null!==Q.current&&null!==K.current){var e="undefined"!==J.current.value?J.current.value:null,n="undefined"!==U.current.value?U.current.value:null,t="undefined"!==W.current.value?W.current.value:null,i="undefined"!==G.current.value?G.current.value:null,r="undefined"!==Q.current.value?Q.current.value:null,a="undefined"!==K.current.value?K.current.value:null;o("gaclientid",e),o("gacampaign",n),o("gamedium",t),o("gasource",i),o("gauserid",r),o("gatrackid",a)}},c=function(e,n){o(e,n.target.checked),l()};return(0,E.jsxs)(f,{children:[(0,E.jsx)("input",{type:"hidden",name:"gaCid",id:"gaCid",ref:$}),(0,E.jsx)("input",{type:"hidden",name:"gaHid",id:"gaHid",ref:H}),(0,E.jsx)("input",{type:"hidden",name:"gaclientid",id:"gaclientid",ref:J}),(0,E.jsx)("input",{type:"hidden",name:"gacampaign",id:"gacampaign",ref:U}),(0,E.jsx)("input",{type:"hidden",name:"gamedium",id:"gamedium",ref:W}),(0,E.jsx)("input",{type:"hidden",name:"gasource",id:"gasource",ref:G}),(0,E.jsx)("input",{type:"hidden",name:"gatrackid",id:"gatrackid",ref:K}),(0,E.jsx)("input",{type:"hidden",name:"gauserid",id:"gauserid",ref:Q}),(0,E.jsxs)(y,{required:!0,children:[(0,E.jsx)(O.Z.Input,{label:"First name",id:"firstName",name:"firstName",type:"text",maxLength:50,onBlur:i,value:r.firstName,onChange:a,crossOrigin:""}),t.firstName&&n.firstName&&(0,E.jsxs)(w,{children:[" ",n.firstName," "]})]}),(0,E.jsxs)(y,{required:!0,children:[(0,E.jsx)(O.Z.Input,{label:"Last name",id:"lastName",name:"lastName",type:"text",maxLength:50,onBlur:i,value:r.lastName,onChange:a,crossOrigin:""}),t.lastName&&n.lastName&&(0,E.jsxs)(w,{children:[" ",n.lastName," "]})]}),(0,E.jsxs)(y,{required:!0,children:[(0,E.jsxs)(O.Z.Select.Basic,{"aria-label":"Select Title",id:"title",name:"title",label:"Title",defaultValue:r.title,onChange:a,onBlur:i,children:[(0,E.jsx)("option",{value:"",children:"Choose..."}),(0,E.jsx)("option",{value:"administrator",children:"Administrator"}),(0,E.jsx)("option",{value:"analyst",children:"Analyst"}),(0,E.jsx)("option",{value:"architect",children:"Architect"}),(0,E.jsx)("option",{value:"assistantDirector",children:"Assistant Director"}),(0,E.jsx)("option",{value:"assistantManager",children:"Assistant Manager"}),(0,E.jsx)("option",{value:"assistantVP",children:"Assistant VP"}),(0,E.jsx)("option",{value:"cio",children:"CIO (or other C-level)"}),(0,E.jsx)("option",{value:"coordinator",children:"Coordinator"}),(0,E.jsx)("option",{value:"director",children:"Director"}),(0,E.jsx)("option",{value:"engineer",children:"Engineer"}),(0,E.jsx)("option",{value:"manager",children:"Manager"}),(0,E.jsx)("option",{value:"projectManager",children:"Project Manager"}),(0,E.jsx)("option",{value:"specialist",children:"Specialist"}),(0,E.jsx)("option",{value:"technician",children:"Tech/Technician"}),(0,E.jsx)("option",{value:"vp",children:"VP"})]}),t.title&&n.title&&(0,E.jsxs)(w,{children:[" ",n.title," "]})]}),(0,E.jsxs)(y,{required:!0,children:[(0,E.jsx)(O.Z.Input,{label:"Work Email",name:"email",type:"email",maxLength:50,onChange:a,onBlur:i,value:r.email,crossOrigin:""}),t.email&&n.email&&(0,E.jsxs)(w,{children:[" ",n.email," "]})]}),(0,E.jsxs)(y,{required:!0,children:[(0,E.jsx)(O.Z.Input,{label:"Company",name:"company",type:"text",maxLength:50,onChange:a,onBlur:i,value:r.company,crossOrigin:""}),t.company&&n.company&&(0,E.jsxs)(w,{children:[" ",n.company," "]})]}),(0,E.jsxs)(k,{children:[(0,E.jsxs)(y,{required:!0,className:"mod-phone",children:[(0,E.jsx)(O.Z.Input,{label:"Phone",name:"phone",type:"phone",maxLength:70,onChange:a,onBlur:i,value:r.phone,crossOrigin:""}),t.phone&&n.phone&&(0,E.jsxs)(w,{children:[" ",n.phone," "]})]}),(0,E.jsx)(y,{className:"mod-extension",children:(0,E.jsx)(O.Z.Input,{label:"Ext. (opt)",name:"ext",type:"text",maxLength:30,onChange:a,onBlur:i,value:r.ext,crossOrigin:""})})]}),(0,E.jsxs)(y,{required:!0,children:[(0,E.jsx)(O.Z.Select.Basic,{label:"Country",name:"country",onChange:a,onBlur:i,value:r.country,children:d.J.map(function(e){return(0,E.jsx)("option",{value:e,children:e},e)})}),t.country&&n.country&&(0,E.jsxs)(w,{children:[" ",n.country," "]})]}),(0,E.jsxs)(j,{children:[(0,E.jsx)(O.Z.Checkbox,{name:"optIn",id:"optIn",onChange:function(e){return c("optin",e)},"aria-label":"Opt into CBT Nuggets news and resources emailer.",crossOrigin:""}),"Send me CBT Nuggets IT training news and resources. (optional)"]}),(0,E.jsxs)(b,{required:!0,children:[(0,E.jsx)("p",{className:"employee-count",children:"How many employees would you like to train?"}),(0,E.jsxs)(v,{children:[(0,E.jsxs)(C,{children:[(0,E.jsx)(O.Z.Radio,{"aria-label":"Company size is between 2-4",name:"quantity",id:"quantity",value:"2-4",checked:"2-4"===r.quantity,onChange:a,onBlur:i,crossOrigin:""}),(0,E.jsx)(P.Z.Right,{htmlFor:"quantity",changeCursorOnDisabled:!0,children:"2-4"})]}),(0,E.jsxs)(C,{children:[(0,E.jsx)(O.Z.Radio,{"aria-label":"Company size is between 5-20",name:"quantity",id:"quantity",value:D,checked:D===r.quantity,onChange:a,onBlur:i,crossOrigin:""}),(0,E.jsx)(P.Z.Right,{htmlFor:"quantity",changeCursorOnDisabled:!0,children:D})]}),(0,E.jsxs)(C,{children:[(0,E.jsx)(O.Z.Radio,{"aria-label":"Company size is 20+",name:"quantity",id:"quantity",value:"20+",checked:"20+"===r.quantity,onChange:a,onBlur:i,crossOrigin:""}),(0,E.jsx)(P.Z.Right,{htmlFor:"quantity",changeCursorOnDisabled:!0,children:"20+"})]}),(0,E.jsxs)(C,{children:[(0,E.jsx)(O.Z.Radio,{"aria-label":"Company size is 100+",name:"quantity",id:"quantity",value:A,checked:A===r.quantity,onChange:a,onBlur:i,crossOrigin:""}),(0,E.jsx)(P.Z.Right,{htmlFor:"quantity",changeCursorOnDisabled:!0,children:A})]})]}),t.quantity&&n.quantity&&(0,E.jsxs)(w,{children:[" ",n.quantity," "]})]}),(0,E.jsx)(B.R5,{tabIndex:-1,onChange:function(e){return ee(e.target.value)}}),(0,E.jsxs)(Z,{children:[(0,E.jsxs)("p",{children:["By submitting this form you agree that you have read, understood, and are able to consent to our"," ",(0,E.jsx)(m.l7,{href:"/privacy",children:"privacy policy"}),"."]}),h?(0,E.jsx)(_.Z.PrimaryLarge,{"aria-label":"Submit form",type:"submit","data-at":null!=g?g:"signup-form-submit",disabled:s,children:"Submit"}):(0,E.jsx)(_.Z.Primary,{"aria-label":"Submit form",type:"submit","data-at":null!=g?g:"signup-form-submit",disabled:s,children:"Submit"})]})]})}})}},28811:function(e,n,t){t.d(n,{Z:function(){return i}});function i(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}},83618:function(e,n,t){t.d(n,{Z:function(){return s}});var i=t(14666),r=t(28811),a=t(2937),o=t(14882);function s(e){return(0,i.Z)(e)||(0,r.Z)(e)||(0,a.Z)(e)||(0,o.Z)()}}}]);