1"use strict";(self.webpackChunkweb_statics_common=self.webpackChunkweb_statics_common||[]).push([[778],{6256:function(e,t,s){s.r(t),s.d(t,{default:function(){return v}});var o=s(6540),a=(s(9947),s(5179)),n=s(1716);function r(e){const t=new Date(e);if(!Number.isNaN(t.valueOf()))return t;const s=String(e).match(/\d+/g);if(null==s||s.length<=2)return t;{const[e,t,...o]=s.map((e=>parseInt(e))),a=[e,t-1,...o];return new Date(Date.UTC(...a))}}function i(e,t,s){return e+" "+(1!==e?t+"s":t)+" "+s}function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var s=arguments[t];for(var o in s)Object.prototype.hasOwnProperty.call(s,o)&&(e[o]=s[o])}return e},l.apply(this,arguments)}const p=3600,c=86400,h=7*c,u=30*c,m=365*c,d=()=>Date.now();function f({date:e,formatter:t=i,component:s="time",live:a=!0,minPeriod:n=0,maxPeriod:f=h,title:g,now:b=d,...x}){const[y,v]=(0,o.useState)(b());(0,o.useEffect)((()=>{if(!a)return;const t=(()=>{const t=r(e).valueOf();if(!t)return console.warn("[react-timeago] Invalid Date provided"),0;const s=Math.round(Math.abs(y-t)/1e3),o=s<60?1e3:s<p?6e4:s<c?36e5:6048e5,a=Math.min(Math.max(o,1e3*n),1e3*f);return a?setTimeout((()=>{v(b())}),a):0})();return()=>{t&&clearTimeout(t)}}),[e,a,f,n,b,y]);const j=s,w=r(e).valueOf();if(!w)return null;const N=Math.round(Math.abs(y-w)/1e3),I=w<y?"ago":"from now",[C,A]=N<60?[Math.round(N),"second"]:N<p?[Math.round(N/60),"minute"]:N<c?[Math.round(N/p),"hour"]:N<h?[Math.round(N/c),"day"]:N<u?[Math.round(N/h),"week"]:N<m?[Math.round(N/u),"month"]:[Math.round(N/m),"year"],T=void 0===g?"string"==typeof e?e:r(e).toISOString().substr(0,16).replace("T"," "):g,F="time"===j?{...x,dateTime:r(e).toISOString()}:x,M=i.bind(null,C,A,I);return o.createElement(j,l({},F,{title:T}),t(C,A,I,w,M,b))}var g=s(778),b=s(4433),x=s(4848);class y extends o.Component{constructor(e){super(e),g.A.suffixAgo="",this.state={firstName:"",lastName:"",email:"",company:"",country:"",jobTitle:"",phone:"",primaryProduct:"",memberFrom:!1,timeAgoFormatter:(0,b.A)(g.A)}}getProfile=()=>{this.props.stillLogged()&&this.props.createRequest("getProfile",{username:this.props.sso.username,userId:this.props.sso.userId,sessionId:this.props.sso.sessionId})};initProfileData=()=>{this.setState({firstName:this.props.profile["first-name"]||"",lastName:this.props.profile["last-name"]||"",email:this.props.profile.email||"",company:this.props.profile.company||"",country:this.props.profile.country||"",jobTitle:this.props.profile.position||"",phone:this.props.profile.phone||"",primaryProduct:this.props.profile["primary-product"]||[],memberFrom:this.props.profile["created-date"]||""})};componentDidUpdate(e){e.profile!==this.props.profile&&!1!==this.props.profile&&this.initProfileData()}onChange=e=>{let t=e.target.type&&"checkbox"==e.target.type?e.target.checked:e.target.value;this.setState({[e.target.name]:t}),this.props.cleanInlineMsg()};allFields=e=>""==this.state.firstName||""==this.state.lastName||""==this.state.email||""==this.state.company||""==this.state.country||""==this.state.jobTitle||""==this.state.phone||""==this.state.primaryProduct;onSubmit=e=>{if(e.preventDefault(),!this.props.stillLogged())return;const t=this.props.getVisitorId(),{firstName:s,lastName:o,email:a,company:n,country:r,jobTitle:i,phone:l,primaryProduct:p}=this.state;let c={firstName:s,lastName:o,email:a,company:n,country:r,jobTitle:i,phone:l,primaryProduct:p,visitor_id:t},h=this.props.getSsoParams();this.props.createRequest("saveProfile",{...c,...h})};getFocus=()=>{this.props.isShowing&&"profile"!=!this.props.modalComponent&&document.getElementById("profilefirstName")&&document.getElementById("profilefirstName").focus()};componentDidMount=()=>{this.getFocus(),this.props.cleanInlineMsg(),this.getProfile()};render(){return(0,x.jsxs)("fieldset",{className:"global-form-fieldset",children:[(0,x.jsx)("legend",{className:"global-form-title",children:"Your profile"}),(0,x.jsxs)("form",{action:"",method:"post",onSubmit:this.onSubmit,className:"global-form header-profileform "+(this.props.isLoading||!1===this.props.profile?"global-form-loading":""),children:[(0,x.jsx)(a.A,{context:"profile",label:"First name *",name:"firstName",onChange:this.onChange,value:this.state.firstName}),(0,x.jsx)(a.A,{context:"profile",label:"Last name *",name:"lastName",onChange:this.onChange,value:this.state.lastName}),(0,x.jsx)(a.A,{context:"profile",label:"Email * (Read only)",name:"email",onChange:this.onChange,value:this.state.email,disabled:!0}),(0,x.jsxs)("div",{className:"global-form-row global-form-row-space-top global-form-row-space-bottom",children:[(0,x.jsx)("div",{className:"global-half",children:(0,x.jsx)(a.A,{context:"profile",label:"Company *",name:"company",onChange:this.onChange,value:this.state.company})}),(0,x.jsx)("div",{className:"global-half",children:(0,x.jsx)(a.A,{context:"profile",label:"Job title *",name:"jobTitle",onCh
1ange:this.onChange,value:this.state.jobTitle})}),(0,x.jsx)("div",{className:"global-half",children:(0,x.jsx)(n.A,{context:"profile",label:"Country *",name:"country",onChange:this.onChange,options:this.props.countries,value:this.state.country})}),(0,x.jsx)("div",{className:"global-half",children:(0,x.jsx)(a.A,{context:"profile",label:"Phone number *",name:"phone",onChange:this.onChange,value:this.state.phone})}),(0,x.jsx)("div",{className:"global-half",children:(0,x.jsx)(n.A,{context:"profile",label:"Primary product interest *",name:"primaryProduct",onChange:this.onChange,options:this.props.products,value:this.state.primaryProduct})})]}),this.state.memberFrom&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("p",{className:"global-profile-member",children:["Member for"," ",(0,x.jsx)(f,{date:this.state.memberFrom,formatter:this.state.timeAgoFormatter}),"."]}),(0,x.jsx)("br",{})]}),this.props.inlineMsg?(0,x.jsxs)("div",{className:"global-form-error",children:[(0,x.jsx)("svg",{className:"cdn-icon-error",children:(0,x.jsx)("use",{xlinkHref:"#cdn-icon-error"})}),(0,x.jsx)("p",{children:this.props.inlineMsg})]}):null,(0,x.jsx)("div",{className:"global-form-right global-form-buttons",children:(0,x.jsx)("button",{type:"submit",className:"global-button",disabled:this.props.isLoading||this.allFields(),children:"Save"})})]})]})}}var v=y},9947:function(e,t,s){var o=s(4848);t.A=e=>(0,o.jsxs)("div",{className:"global-input-container",children:[(0,o.jsx)("input",{type:e.inputType||"checkbox",name:e.name,value:e.value,id:`${e.context}${e.name}${e.value}`,className:"global-checkbox",onChange:e.onChange,tabIndex:e.tabIndex,checked:e.checked}),(0,o.jsx)("label",{htmlFor:`${e.context}${e.name}${e.value}`,className:"global-checkbox-label",children:e.children||e.label})]})},5179:function(e,t,s){s.d(t,{A:function(){return i}});var o=s(6540),a=s(4848);var n=e=>{if("password"!==e.validationElement||!e.validationInfo)return(0,a.jsx)(a.Fragment,{});const t=e.validationInfo;return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)("div",{className:"global-form-row global-modal-title-error",children:["The password must have at least:",(0,a.jsxs)("ul",{children:[!t.hasMinLength&&(0,a.jsx)("li",{children:"At least 8 characters"}),!t.hasUppercase&&(0,a.jsx)("li",{children:"At least one uppercase letter"}),!t.hasLowercase&&(0,a.jsx)("li",{children:"At least one lowercase letter"}),!t.hasDigit&&(0,a.jsx)("li",{children:"At least one digit"}),!t.hasSpecialChar&&(0,a.jsx)("li",{children:"At least one special character"})]})]})})};class r extends o.Component{constructor(e){super(e),this.state={passInputType:"password",passTypeIcon:"cdn-icon-hide-password"}}togglePassType=e=>{this.setState((e=>({passInputType:"password"===e.passInputType?"text":"password",passTypeIcon:"password"===e.passInputType?"cdn-icon-show-password":"cdn-icon-hide-password"})))};render(){return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("label",{htmlFor:`${this.props.context}${this.props.name}`,className:"global-label",children:[this.props.label,this.props.optional?" (optional)":""]}),(0,a.jsxs)("div",{className:"global-input-container",children:["password"===this.props.inputType&&(0,a.jsx)("label",{htmlFor:`${this.props.context}${this.props.name}`,className:"global-pass-toggler",onClick:this.togglePassType,children:(0,a.jsx)("svg",{className:this.state.passTypeIcon,children:(0,a.jsx)("use",{xlinkHref:`#${this.state.passTypeIcon}`})})}),(0,a.jsx)("input",{type:"password"===this.props.inputType?this.state.passInputType:this.props.inputType||"text",name:this.props.name,value:this.props.value||"",id:`${this.props.context}${this.props.name}`,onChange:this.props.onChange,tabIndex:this.props.tabIndex,disabled:this.props.disabled,placeholder:this.props.placeholder}),null!=this.props.validationInfo&&!this.props.validationInfo.isValid&&(0,a.jsx)(n,{validationElement:this.props.inputType,validationInfo:this.props.validationInfo})]})]})}}var i=r},1716:function(e,t,s){s(6540);var o=s(4848);t.A=e=>{const t=(e,t)=>{const s="object"==typeof e&&void 0!==e.value?e.value:e,a="object"==typeof e&&void 0!==e.text?e.text:e;return(0,o.jsx)("option",{value:s,children:a},`${s}-${t}`)},s=e.options||[];return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)("label",{htmlFor:`${e.context}${e.name}`,className:"global-label",children:[e.label,e.optional?" (optional)":""]}),(0,o.jsx)("div",{className:"global-input-container",children:(0,o.jsxs)("select",{name:e.name,id:`${e.context}${e.name}`,onChange:e.onChange,tabIndex:e.tabIndex,disabled:e.disabled,value:e.value,children:[t(e.firstOption||"",-1),s.map(t)]})})]})}},4433:function(e,t,s){function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}function a(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,s=new WeakMap;return(a=function(e){return e?s:t})(e)}t.A=function(e){return function(t,s,o,a,n,i){var l=i(),p=t,c=s;"week"!==c||e.week||e.weeks||(p=Math.round(Math.abs(a-l)/864e5),c="day");var h=r(p,l-a,null!=e.numbers?e.numbers:void 0),u=[];
1if("ago"===o&&e.prefixAgo&&u.push(h(e.prefixAgo)),"from now"===o&&e.prefixFromNow&&u.push(h(e.prefixFromNow)),p>1){var m=e[c+"s"]||e[c]||"%d "+c;u.push(h(m))}else{var d=e[c]||e[c+"s"]||"%d "+c;u.push(h(d))}"ago"===o&&e.suffixAgo&&u.push(h(e.suffixAgo)),"from now"===o&&e.suffixFromNow&&u.push(h(e.suffixFromNow));var f="string"==typeof e.wordSeparator?e.wordSeparator:" ";return u.join(f)}},function(e,t){if(e&&e.__esModule)return e;if(null===e||"object"!==o(e)&&"function"!=typeof e)return{default:e};var s=a(t);if(s&&s.has(e))return s.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(n,i,l):n[i]=e[i]}n.default=e,s&&s.set(e,n)}(s(6540));var n=function(e,t){return e&&10===e.length?String(t).split("").map((function(t){return t.match(/^[0-9]$/)?e[parseInt(t)]:t})).join(""):String(t)},r=function(e,t,s){return function(o){return"function"==typeof o?o(e,t).replace(/%d/g,n(s,e)):o.replace(/%d/g,n(s,e))}}},778:function(e,t){t.A=void 0;t.A={prefixAgo:null,prefixFromNow:null,suffixAgo:"ago",suffixFromNow:"from now",seconds:"less than a minute",minute:"about a minute",minutes:"%d minutes",hour:"about an hour",hours:"about %d hours",day:"a day",days:"%d days",month:"about a month",months:"%d months",year:"about a year",years:"%d years",wordSeparator:" "}}}]);
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.