(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5034],{60911:function(e,t,r){"use strict";r.d(t,{Z:function(){return x}});var n,o,a=r(92777),i=r(82262),c=r(10748),u=r(45959),l=r(63553),d=r(37247),f=r(59499),m=r(67294),p=r(47166),h=r.n(p),b=r(22676),g=r.n(b);function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(e[s]=r[s])}return e},_.apply(this,arguments)}var v=function(e){return m.createElement("svg",_({xmlns:"http://www.w3.org/2000/svg",width:192,height:192,viewBox:"0 0 256 256",role:"img"},e),n||(n=m.createElement("path",{d:"M48 128V40a8 8 0 0 1 8-8h96l56 56v40",fill:"none",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:16})),o||(o=m.createElement("path",{fill:"none",stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:16,d:"M152 32v56h56M48 200h16a16 16 0 0 0 0-32H48v48M216 168h-28v48M212 196h-24M128 216a24 24 0 0 0 0-48h-14v48Z"})))},y=r(85893);function j(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,s=(0,d.Z)(e);if(t){var n=(0,d.Z)(this).constructor;r=Reflect.construct(s,arguments,n)}else r=s.apply(this,arguments);return(0,l.Z)(this,r)}}var w=h().bind(g()),O=function(e){(0,u.Z)(r,e);var t=j(r);function r(){var e;(0,a.Z)(this,r);for(var s=arguments.length,n=new Array(s),o=0;o<s;o++)n[o]=arguments[o];return e=t.call.apply(t,[this].concat(n)),(0,f.Z)((0,c.Z)(e),"state",{success:!1}),(0,f.Z)((0,c.Z)(e),"handleSuccess",(function(){var t=e.props.onSuccess;e.setState({loading:!1,success:!0}),t&&t()})),e}return(0,i.Z)(r,[{key:"componentDidMount",value:function(){var e=this,t=this.props,r=t.formId,n=t.sfdcCampaignId,o=document.createElement("script");o.src="https://js.hsforms.net/forms/v2.js",document.body.appendChild(o),o.addEventListener("load",(function(){window.hbspt&&window.hbspt.forms.create({portalId:"20523749",formId:r,sfdcCampaignId:n,target:"#hubspotForm",onFormSubmit:function(t){setTimeout((function(){e.handleSuccess()}),1200)}})})),window.jQuery=window.jQuery||function(e){return"string"==typeof e?document.querySelector(s):e}}},{key:"render",value:function(){var e=this.state.success,t=this.props,r=t.title,s=t.successMessage,n=t.downloadAsset,o=void 0===n?null:n;return(0,y.jsxs)("div",{className:w("root"),children:[(0,y.jsxs)("div",{className:w("form-wrapper",{hidden:e}),children:[r&&(0,y.jsx)("h3",{children:r}),(0,y.jsx)("div",{id:"hubspotForm"})]}),e&&(0,y.jsxs)("div",{className:w("success-message",{has_download:o}),children:[s||"Thank you.",o&&(0,y.jsxs)("a",{className:w("download-button"),href:o.fields.file.url,target:"_blank",download:!0,children:[(0,y.jsx)(v,{height:24,width:24}),o.fields.title]})]})]})}}]),r}(m.PureComponent),x=O},55294:function(e,t,r){"use strict";var s=r(92777),n=r(82262),o=r(10748),a=r(45959),i=r(63553),c=r(37247),u=r(59499),l=r(67294),d=r(47166),f=r.n(d),m=r(80569),p=r.n(m),h=r(9980),b=r.n(h),g=r(67315),_=r.n(g),v=r(85893);function y(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function j(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?y(Object(r),!0).forEach((function(t){(0,u.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):y(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function w(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,s=(0,c.Z)(e);if(t){var n=(0,c.Z)(this).constructor;r=Reflect.construct(s,arguments,n)}else r=s.apply(this,arguments);return(0,i.Z)(this,r)}}var O=f().bind(_()),x=function(e){(0,a.Z)(r,e);var t=w(r);function r(){var e;(0,s.Z)(this,r);for(var n=arguments.length,a=new Array(n),i=0;i<n;i++)a[i]=arguments[i];return e=t.call.apply(t,[this].concat(a)),(0,u.Z)((0,o.Z)(e),"state",{formData:{},loading:!1,success:!1,error:null}),(0,u.Z)((0,o.Z)(e),"handleChange",(function(t){var r=e.state.formData,s=j({},r);if(["email","EMAIL","MMERGE0"].includes(t.target.name))s=j(j({},r),{},{email:t.target.value});else{var n=r.mergeFields||{};s=j(j({},r),{},{mergeFields:j(j({},n),{},(0,u.Z)({},t.target.name,t.target.value))})}e.setState({formData:s,error:null})})),(0,u.Z)((0,o.Z)(e),"handleSuccess",(function(){var t=e.props.onSuccess;e.setState({loading:!1,success:!0}),t&&t()})),(0,u.Z)((0,o.Z)(e),"submit",(function(t){var r=e.state,s=r.formData,n=r.loading,o=r.success;t&&t.preventDefault(),n||o||(e.setState({error:null,loading:!0,success:null}),p().post("/api/subscribe").query(s).end((function(t,r){if(t)e.setState({loading:!1,error:"An error occurred"});else{var s=r.body.error;if(s){var n;switch(s.title){case"Member Exists":return void e.handleSuccess();case"Invalid Resource":n="Please enter a valid address";break;default:n="An error occurred"}return e.setState({loading:!1,error:n}),void setTimeout((function(){e.setState({loading:!1,error:null,formData:{}})}),2500)}e.handleSuccess()}})))})),e}return(0,n.Z)(r,[{key:"componentDidMount",value:function(){var e=this.props,t=e.listId,r=e.tags,s=this.state.formData;t&&this.setState({formData:j(j({},s),{},{listId:t,tags:r})})}},{key:"render",value:function(){var e=this,t=this.state,r=t.success,s=t.error,n=this.props,o=n.title,a=n.fields,i=n.submitText,c=n.disclaimer,u=n.successMessage;return(0,v.jsxs)("div",{className:O("root"),children:[(0,v.jsxs)("div",{className:O("form-wrapper",{hidden:r}),children:[(0,v.jsx)("h3",{children:o}),(0,v.jsxs)("form",{className:O("form"),onSubmit:this.submit,children:[a.map((function(t){var r=t.fields,s=r.name,n=r.placeholder,o=r.type,a=r.label,i=r.required;return"textarea"===o?(0,v.jsx)("textarea",{name:s,placeholder:n,"aria-label":a,required:i||!1,onChange:e.handleChange},t.sys.id):(0,v.jsx)("input",{name:s,placeholder:n,type:o||"text","aria-label":a,required:i||!1,onChange:e.handleChange},t.sys.id)})),(0,v.jsx)("button",{type:"submit",disabled:r,children:i||"Submit"})]}),(0,v.jsx)("div",{className:O("messages"),children:(0,v.jsx)("div",{className:O("message",{active:!!s}),children:s})}),c&&(0,v.jsx)("div",{dangerouslySetInnerHTML:{__html:b()({html:!0,breaks:!0}).render(c)}})]}),r&&(0,v.jsx)("div",{className:O("success-message"),children:u||"Thank you."})]})}}]),r}(l.PureComponent);x.defaultProps={listId:null,fields:[],successMessage:null,onSuccess:function(){}},t.Z=x},85034:function(e,t,r){"use strict";var s=r(59499),n=(r(67294),r(47166)),o=r.n(n),a=r(9980),i=r.n(a),c=r(55294),u=r(60911),l=r(30712),d=r.n(l),f=r(85893);function m(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,s)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?m(Object(r),!0).forEach((function(t){(0,s.Z)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):m(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var h=o().bind(d()),b=function(e){var t=e.header,r=e.subheader,s=e.body,n=e.subsections,o=e.pageName,a=void 0===o?"":o;return(0,f.jsx)("div",{className:h("root"),children:(0,f.jsxs)("div",{className:h("inner"),children:[(0,f.jsxs)("div",{className:h("main"),children:[(0,f.jsx)("h4",{className:h("eyebrow"),children:t}),(0,f.jsx)("h1",{className:h("title"),children:r}),s&&(0,f.jsx)("div",{className:h("body"),dangerouslySetInnerHTML:{__html:i()({html:!0,breaks:!0}).render(s)}})]}),(0,f.jsxs)("div",{className:h("form-wrapper"),children:[n.length>0&&!n[0].fields.formId&&(0,f.jsx)(c.Z,p({},n[0].fields)),n.length>0&&n[0].fields.formId&&(0,f.jsx)(u.Z,p(p({},n[0].fields),{},{pageName:a}))]})]})})};b.defaultProps={subsections:[]},t.Z=b},22676:function(e){e.exports={root:"HubspotFormEmbed_root__rb_HI","form-wrapper":"HubspotFormEmbed_form-wrapper__GszB9",hidden:"HubspotFormEmbed_hidden__zTRtM","success-message":"HubspotFormEmbed_success-message__g_8SL",fadeIn:"HubspotFormEmbed_fadeIn__Z_otd",messages:"HubspotFormEmbed_messages__d567I",message:"HubspotFormEmbed_message__90T6s",active:"HubspotFormEmbed_active__dsV4D","download-button":"HubspotFormEmbed_download-button__lRof8"}},67315:function(e){e.exports={root:"RegisterForm_root__JXPJh","form-wrapper":"RegisterForm_form-wrapper__D_7OH",hidden:"RegisterForm_hidden__0PuJB","success-message":"RegisterForm_success-message__S8PjX",fadeIn:"RegisterForm_fadeIn__atwc_",messages:"RegisterForm_messages__QENJ1",message:"RegisterForm_message__WOa7E",active:"RegisterForm_active__AVJXZ"}},30712:function(e){e.exports={root:"RegisterSection_root__pZZR5",inner:"RegisterSection_inner__3p_A6",main:"RegisterSection_main___CnlG",eyebrow:"RegisterSection_eyebrow__PedbZ",title:"RegisterSection_title__1tObU",body:"RegisterSection_body__AlqYn","form-wrapper":"RegisterSection_form-wrapper__uYiKy"}}}]);