import{Y as i,hm as r,ag as s}from"./app-k0jcl5PQ.js";const f="/book-a-demo/",g="/contact-us/trial-upgrade/",c=/\$+[\w\s]?/,m={[s.AU]:"02 9509 2600",[s.UK]:"+44 (0)333 207 6595",[s.NZ]:"09 916 1156",[s.US]:null},n={getSalesforceId(a){if(!a||!a.length)return;const e=a.find(t=>t.type===r.SalesforceId);if(e)return e.externalId},buildQueryData(a,e){const t={id:a,fname:e==null?void 0:e.givenName,sname:e==null?void 0:e.familyName,email:e==null?void 0:e.email};return Object.entries(t).filter(([,o])=>!!o).reduce((o,[l,d])=>({...o,[l]:d}),{})},getBookDemoUrl(a,e,t){const o=n.getSalesforceId(t),l=i.safeUrlConcat(a,f);return i.urlBuilder(l,n.buildQueryData(o,e))},getUpgradePageUrl(a,e,t){const o=n.getSalesforceId(t),l=i.safeUrlConcat(a,g);return i.urlBuilder(l,n.buildQueryData(o,e))},getContactNumber(a){return m[a]},validateJobTitle(a){return c.test(a)?{isValid:!1,errorMessage:"Please enter a valid job title."}:a.length>255?{isValid:!1,errorMessage:"Job title cannot exceed max length of 255 characters."}:{isValid:!0}}};export{n as U};
//# sourceMappingURL=JAk_2FpV.chunk.js.map
