@clickview/lite 0.37.1 → 0.37.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/bundles.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "appBundle": "bundle-9887e5935d.min.js",
2
+ "appBundle": "bundle-2a51458b64.min.js",
3
3
  "cssBundle": "lite-app-b3d2f810cc.css",
4
4
  "polyfillBundle": "polyfills-02090a38a6.min.js"
5
5
  }
@@ -1,2 +1,2 @@
1
- /*! For license information please see 3331-b7b67447a7-lite.chunk.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3331],{84789:(t,e,r)=>{var n;r.d(e,{X:()=>n}),function(t){t.Lite="lite",t.Auth="auth"}(n||(n={}))},76153:(t,e,r)=>{r.d(e,{F:()=>v});var n=r(63093),o=r(33003),i=r.n(o),a=r(84789),c=r(86664);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function f(){f=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var m="suspendedStart",p="suspendedYield",v="executing",y="completed",g={};function b(){}function w(){}function E(){}var x={};s(x,a,(function(){return this}));var L=Object.getPrototypeOf,O=L&&L(L(I([])));O&&O!==r&&n.call(O,a)&&(x=O);var S=E.prototype=b.prototype=Object.create(x);function N(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function r(o,i,a,c){var l=d(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=m;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=j(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(e,r,n);if("normal"===l.type){if(o=n.done?y:p,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=d(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(u(e)+" is not iterable")}return w.prototype=E,o(S,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:w,configurable:!0}),w.displayName=s(E,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,s(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},N(C.prototype),s(C.prototype,c,(function(){return this})),e.AsyncIterator=C,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new C(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},N(S),s(S,l,"Generator"),s(S,a,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(t,e,r){var n;return n=function(t,e){if("object"!=u(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(e),(e="symbol"==u(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var d={k12:"Primary & Secondary"},m={england:"ENG",scotland:"SCT",wales:"WLS","northern ireland":"NIR"},p=h(h({},a.X.Auth,"auth.web"),a.X.Lite,"lite.web"),v={getClient:function(t){var e,r,o,i,a,u;return o=this,i=void 0,a=void 0,u=f().mark((function o(){var i,a,u,l,s,h;return f().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return i=t.brazeConfig,a=t.geoLocation,u=t.version,l=i[c.I.getInstanceRegion(null==a?void 0:a.countryCode)],s=p[t.productName],h=(0,n.getInstance)({baseUrl:l.url,apiKey:l.apiKey,productVersion:u,productName:s,enableLogging:!1,automaticallyShowInAppMessages:!1}),(null===(e=t.geoLocation)||void 0===e?void 0:e.countryCode)&&h.setUserCountry(null===(r=t.geoLocation)||void 0===r?void 0:r.countryCode),o.abrupt("return",h);case 6:case"end":return o.stop()}}),o)})),new(a||(a=Promise))((function(t,e){function r(t){try{c(u.next(t))}catch(t){e(t)}}function n(t){try{c(u.throw(t))}catch(t){e(t)}}function c(e){var o;e.done?t(e.value):(o=e.value,o instanceof a?o:new a((function(t){t(o)}))).then(r,n)}c((u=u.apply(o,i||[])).next())}))},hashedEmail:function(t){var e=t.trim().toLowerCase();return i().hash(e)},removeEmptyKeys:function(t){if(Array.isArray(t))return t;var e=Object.assign({},t);return Object.entries(e).filter((function(t){var e=l(t,2)[1];return null!=e&&!("string"==typeof e&&!e.length)})).reduce((function(t,e){var r=l(e,2),n=r[0],o=r[1];return Object.assign(Object.assign({},t),h({},n,o===Object(o)?v.removeEmptyKeys(o):o))}),{})},getEventTopic:function(){return"Free Trial Request"},getCustomEventType:function(){return n.ProductFormEvent.ProductTrailRequested},getProductFormEventType:function(){return"product_form_submission"},getSchoolType:function(t){if(t){var e=t.toLowerCase();if(!["unknown","other"].includes(e))return d[e]||t}},parseProvince:function(t){return t.length?m[t.toLowerCase()]||t:""}}},74887:(t,e,r)=>{r.d(e,{f:()=>a});var n=r(32735),o=r(11607);const i={icon:"ohit6",description:"DmrW6",option:"KOzYf"};function a(t){return n.createElement("ul",{className:"list-unstyled mb-3"},t.options.map((function(e){return n.createElement("li",{key:e.id,className:"".concat(i.option," mb-2 border border-2 rounded-3 ").concat(t.selection===e.id?"border-dark bg-light-blue":"border-transparent")},n.createElement(o.L,{onClick:function(){return t.setSelection(e.id)},className:"d-flex align-items-center p-2"},n.createElement("div",{className:"rounded border border-dark ".concat(e.colourClass," ").concat(i.icon)},n.createElement("img",{src:e.imageUrl,className:"img-fluid"})),n.createElement("div",null,n.createElement("h2",{className:"mb-1 h6"},e.title),n.createElement("p",{className:"mb-0 ".concat(i.description)},e.description))))})))}},12058:(t,e,r)=>{r.d(e,{X:()=>o});var n=r(32735);function o(t){return n.createElement("p",{className:t.className},t.children)}},11572:(t,e,r)=>{r.r(e),r.d(e,{OnboardingContactSalesView:()=>B});var n=r(32735),o=r(63093),i=r(23481),a=r(20354),c=r(65858),u=r(84789),l=r(76153),s=r(83345),f=r(39151),h=r(1666),d=r(31949),m=r(99742),p=r(99940),v={checkEmail:function(t){return{url:"/api/braze/check-email",key:"braze:check:email:".concat(t),type:p.k.POST,data:{email:t}}}},y=r(75359),g=r(74887),b=r(12058),w=r(40695),E=r(73190),x=r(90815),L=r(36669),O=r(17762);const S={imageContainer:"QqX1V",topImage:"mjPRy",bottomImage:"uHwHs",info:"dNDnN"};function N(t){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(t)}function C(){C=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",d="suspendedYield",m="executing",p="completed",v={};function y(){}function g(){}function b(){}var w={};l(w,a,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(I([])));x&&x!==r&&n.call(x,a)&&(w=x);var L=b.prototype=y.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==N(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=j(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?p:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=p,n.method="throw",n.arg=l.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(N(e)+" is not iterable")}return g.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},O(S.prototype),l(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(L),l(L,u,"Generator"),l(L,a,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function k(t,e,r){var n;return n=function(t,e){if("object"!=N(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(e),(e="symbol"==N(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function j(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return _(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var P,A=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function c(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}u((n=n.apply(t,e||[])).next())}))},I="onboarding.contactSales",F=i.T.encloseNamespace(I),U="product_onboarding_submission";!function(t){t.BookADemo="Book a demo",t.RequestPricing="Request pricing",t.ContactUs="Onboarding contact us"}(P||(P={}));var T=[{id:P.BookADemo,imageUrl:m.W.OnboardingV2.ContactSales.BOOK_DEMO_ICON,colourClass:"bg-yellow",title:F("bookDemo"),description:F("bookDemoInfo")},{id:P.RequestPricing,imageUrl:m.W.OnboardingV2.ContactSales.REQUEST_PRICING_ICON,colourClass:"bg-teal",title:F("requestPricing"),description:F("requestPricingInfo")},{id:P.ContactUs,imageUrl:m.W.OnboardingV2.ContactSales.OTHER_ICON,colourClass:"bg-dark-blue",title:F("other"),description:F("otherInfo")}];function B(){var t,e=(0,E.Q)(),r=e.onClickBack,i=e.exitOnboarding,p=e.completeStepAsync,N=e.onSaveError,_=(0,x.H)().logEvent,B=a.a.useBasicFetch(d.N.currentUser()),G=a.a.useBasicFetch(B.data&&d.N.user(B.data.id)),D=a.a.useBasicFetch(f.L.version()),R=a.a.useBasicFetch(f.L.config()),V=a.a.useBasicFetch(B.data&&h.h.customer(B.data.customerId)),q=a.a.useBasicFetch(L.t.currentProspect()),K=a.a.useBasicFetch(B.data&&v.checkEmail(B.data.email)),z=(0,O.M)(),W=j(n.useState(),2),X=W[0],M=W[1],H=j(n.useState(""),2),Y=H[0],Q=H[1],$=j(n.useState(""),2),J=$[0],Z=$[1],tt={optionId:X,optionName:null===(t=T.find((function(t){return t.id===X})))||void 0===t?void 0:t.title,phoneNumber:Y,otherInformation:J};function et(){switch(X){case P.BookADemo:return"book_a_demo";case P.RequestPricing:return"request_pricing";case P.ContactUs:return"other"}}return n.createElement(w.z,{namespace:I},n.createElement(w.z.Left,{className:"bg-blue d-flex align-items-center"},n.createElement("div",{className:"px-5"},n.createElement("img",{className:"img-fluid",src:m.W.OnboardingV2.ContactSales.BACKGROUND}))),n.createElement(w.z.Right,{hasCustomButtons:!1,onClickNext:function(){var t,e,r,n,i,a,s,f,h,d,m,v,y,g,b,w,E,x,L,O;return A(this,void 0,void 0,C().mark((function S(){var j,P,I,F,T=this;return C().wrap((function(S){for(;;)switch(S.prev=S.next){case 0:return S.prev=0,S.next=3,l.F.getClient({brazeConfig:R.data.braze,geoLocation:z.isFallback?{countryCode:null!==(e=null===(t=B.data)||void 0===t?void 0:t.countryCode)&&void 0!==e?e:z.countryCode}:z,productName:u.X.Lite,version:D.data});case 3:(j=S.sent).setUser(l.F.hashedEmail(null===(r=G.data)||void 0===r?void 0:r.email)),j.openSession(),j.setUserFirstName(null===(n=G.data)||void 0===n?void 0:n.name),j.setUserLastName(null===(i=G.data)||void 0===i?void 0:i.surname),j.setUserPhone(Y),j.setUserEmail(null===(a=G.data)||void 0===a?void 0:a.email),P=l.F.removeEmptyKeys(k(k(k(k({},o.DefaultUserAttributes.Email,null===(s=G.data)||void 0===s?void 0:s.email),o.DefaultUserAttributes.FirstName,null===(f=G.data)||void 0===f?void 0:f.name),o.DefaultUserAttributes.LastName,null===(h=G.data)||void 0===h?void 0:h.surname),o.DefaultUserAttributes.Phone,Y)),I=l.F.removeEmptyKeys(k(k(k(k(k(k(k({},o.CustomUserAttributes.JobTitle,null===(v=null===(m=null===(d=G.data)||void 0===d?void 0:d.userProfile)||void 0===m?void 0:m.metadata)||void 0===v?void 0:v.jobTitle),o.CustomUserAttributes.AccountName,null===(y=B.data)||void 0===y?void 0:y.customerName),o.CustomUserAttributes.CrmId,null===(g=V.data)||void 0===g?void 0:g.crmId),o.CustomUserAttributes.OrgSubType,l.F.getSchoolType("")),"account_address",{country_code:null===(b=B.data)||void 0===b?void 0:b.countryCode,province:l.F.parseProvince((null===(w=q.data)||void 0===w?void 0:w.province)||"")}),"topic",X),o.CustomUserAttributes.SyncToCrm,!(null===(x=null===(E=K.data)||void 0===E?void 0:E.users)||void 0===x?void 0:x.length))),F=l.F.removeEmptyKeys(k(k(k(k({},o.EventUserAttributes.AccountCity,null===(L=q.data)||void 0===L?void 0:L.city),o.EventUserAttributes.AccountState,null===(O=q.data)||void 0===O?void 0:O.province),o.EventUserAttributes.ContactUsComment,J),"form_type",et())),j.bulkSetCustomUserAttributes(I),j.logEvent({type:U,data:Object.assign(Object.assign(Object.assign({},P),I),F)}),_(c.Vw.Click,c.Ix.Next,tt),j.sendData((function(t){return A(T,void 0,void 0,C().mark((function e(){return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return N(),e.abrupt("return",Promise.reject());case 3:return e.prev=3,e.next=6,p();case 6:e.next=12;break;case 8:return e.prev=8,e.t0=e.catch(3),N(),e.abrupt("return",Promise.reject());case 12:case"end":return e.stop()}}),e,null,[[3,8]])})))})),S.next=23;break;case 19:return S.prev=19,S.t0=S.catch(0),N(),S.abrupt("return",Promise.reject());case 23:case"end":return S.stop()}}),S,null,[[0,19]])})))},onClickBack:r,onClickComeBackLater:i,disableNext:!X||!Y||!G.data||X===P.ContactUs&&!J,nextText:F("contactSales")},n.createElement(y.W,{className:"mb-0"},n.createElement(s.x,{phrase:"heading"})),n.createElement(b.X,{className:"".concat(S.info," mb-0 mt-1")},n.createElement(s.x,{phrase:"info"})),n.createElement(b.X,{className:"fw-semibold mt-3 mb-1"},n.createElement(s.x,{phrase:"howCanWeHelp"})),n.createElement(g.f,{options:T,selection:X,setSelection:function(t){var e;_(c.Vw.Select,c.Ix.SelectOption,Object.assign(Object.assign({},tt),{optionId:t,optionName:null===(e=T.find((function(e){return e.id===t})))||void 0===e?void 0:e.title})),M(t)}}),n.createElement("label",{htmlFor:"phone-number"},F("phoneNumber"),n.createElement("span",{className:"text-danger"},"*")),n.createElement("input",{id:"phone-number",name:"phone-number",className:"form-control form-control-lg mb-3",type:"tel",value:Y,onChange:function(t){return Q(t.target.value)},placeholder:F("phoneNumberPlaceholder"),onFocus:function(){_(c.Vw.Focus,c.Ix.PhoneNumber,tt)},onBlur:function(){_(c.Vw.Blur,c.Ix.PhoneNumber,tt)}}),n.createElement("label",{htmlFor:"other-information"},F("otherLabel"),X===P.ContactUs&&n.createElement("span",{className:"text-danger"},"*")),n.createElement("input",{id:"other-information",name:"other-information",className:"form-control form-control-lg",value:J,onChange:function(t){return Z(t.target.value)},placeholder:F("otherPlaceholder"),onFocus:function(){_(c.Vw.Focus,c.Ix.OtherInformation,tt)},onBlur:function(){_(c.Vw.Blur,c.Ix.OtherInformation,tt)}})))}},17762:(t,e,r)=>{r.d(e,{M:()=>a});var n=r(20354),o=r(39151),i={countryCode:"us",isFallback:!0};function a(){var t=n.a.useBasicFetch(o.L.geoLocation());return t.hasCompleted&&!t.data?i:t.data}}}]);
1
+ /*! For license information please see 3331-47c346fbb4-lite.chunk.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_clickview_lite=self.webpackChunk_clickview_lite||[]).push([[3331],{84789:(t,e,r)=>{var n;r.d(e,{X:()=>n}),function(t){t.Lite="lite",t.Auth="auth"}(n||(n={}))},76153:(t,e,r)=>{r.d(e,{F:()=>v});var n=r(63093),o=r(33003),i=r.n(o),a=r(84789),c=r(86664);function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function l(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return s(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function f(){f=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function d(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var m="suspendedStart",p="suspendedYield",v="executing",y="completed",g={};function b(){}function w(){}function E(){}var x={};s(x,a,(function(){return this}));var L=Object.getPrototypeOf,O=L&&L(L(I([])));O&&O!==r&&n.call(O,a)&&(x=O);var S=E.prototype=b.prototype=Object.create(x);function N(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function r(o,i,a,c){var l=d(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==u(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,c)}))}c(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=m;return function(i,a){if(o===v)throw new Error("Generator is already running");if(o===y){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=j(c,n);if(u){if(u===g)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=v;var l=d(e,r,n);if("normal"===l.type){if(o=n.done?y:p,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=d(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(u(e)+" is not iterable")}return w.prototype=E,o(S,"constructor",{value:E,configurable:!0}),o(E,"constructor",{value:w,configurable:!0}),w.displayName=s(E,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,E):(t.__proto__=E,s(t,l,"GeneratorFunction")),t.prototype=Object.create(S),t},e.awrap=function(t){return{__await:t}},N(C.prototype),s(C.prototype,c,(function(){return this})),e.AsyncIterator=C,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new C(h(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},N(S),s(S,l,"Generator"),s(S,a,(function(){return this})),s(S,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,g):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),g}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),g}},e}function h(t,e,r){var n;return n=function(t,e){if("object"!=u(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=u(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(e),(e="symbol"==u(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var d={k12:"Primary & Secondary"},m={england:"ENG",scotland:"SCT",wales:"WLS","northern ireland":"NIR"},p=h(h({},a.X.Auth,"auth.web"),a.X.Lite,"lite.web"),v={getClient:function(t){var e,r,o,i,a,u;return o=this,i=void 0,a=void 0,u=f().mark((function o(){var i,a,u,l,s,h;return f().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return i=t.brazeConfig,a=t.geoLocation,u=t.version,l=i[c.I.getInstanceRegion(null==a?void 0:a.countryCode)],s=p[t.productName],h=(0,n.getInstance)({baseUrl:l.url,apiKey:l.apiKey,productVersion:u,productName:s,enableLogging:!1,automaticallyShowInAppMessages:!1}),(null===(e=t.geoLocation)||void 0===e?void 0:e.countryCode)&&h.setUserCountry(null===(r=t.geoLocation)||void 0===r?void 0:r.countryCode),o.abrupt("return",h);case 6:case"end":return o.stop()}}),o)})),new(a||(a=Promise))((function(t,e){function r(t){try{c(u.next(t))}catch(t){e(t)}}function n(t){try{c(u.throw(t))}catch(t){e(t)}}function c(e){var o;e.done?t(e.value):(o=e.value,o instanceof a?o:new a((function(t){t(o)}))).then(r,n)}c((u=u.apply(o,i||[])).next())}))},hashedEmail:function(t){var e=t.trim().toLowerCase();return i().hash(e)},removeEmptyKeys:function(t){if(Array.isArray(t))return t;var e=Object.assign({},t);return Object.entries(e).filter((function(t){var e=l(t,2)[1];return null!=e&&!("string"==typeof e&&!e.length)})).reduce((function(t,e){var r=l(e,2),n=r[0],o=r[1];return Object.assign(Object.assign({},t),h({},n,o===Object(o)?v.removeEmptyKeys(o):o))}),{})},getEventTopic:function(){return"Free Trial Request"},getCustomEventType:function(){return n.ProductFormEvent.ProductTrailRequested},getProductFormEventType:function(){return"product_form_submission"},getSchoolType:function(t){if(t){var e=t.toLowerCase();if(!["unknown","other"].includes(e))return d[e]||t}},parseProvince:function(t){return t.length?m[t.toLowerCase()]||t:""}}},74887:(t,e,r)=>{r.d(e,{f:()=>a});var n=r(32735),o=r(11607);const i={icon:"ohit6",description:"DmrW6",option:"KOzYf"};function a(t){return n.createElement("ul",{className:"list-unstyled mb-3"},t.options.map((function(e){return n.createElement("li",{key:e.id,className:"".concat(i.option," mb-2 border border-2 rounded-3 ").concat(t.selection===e.id?"border-dark bg-light-blue":"border-transparent")},n.createElement(o.L,{onClick:function(){return t.setSelection(e.id)},className:"d-flex align-items-center p-2"},n.createElement("div",{className:"rounded border border-dark ".concat(e.colourClass," ").concat(i.icon)},n.createElement("img",{src:e.imageUrl,className:"img-fluid"})),n.createElement("div",null,n.createElement("h2",{className:"mb-1 h6"},e.title),n.createElement("p",{className:"mb-0 ".concat(i.description)},e.description))))})))}},12058:(t,e,r)=>{r.d(e,{X:()=>o});var n=r(32735);function o(t){return n.createElement("p",{className:t.className},t.children)}},11572:(t,e,r)=>{r.r(e),r.d(e,{OnboardingContactSalesView:()=>B});var n=r(32735),o=r(63093),i=r(23481),a=r(20354),c=r(65858),u=r(84789),l=r(76153),s=r(83345),f=r(39151),h=r(1666),d=r(31949),m=r(99742),p=r(99940),v={checkEmail:function(t){return{url:"/api/braze/check-email",key:"braze:check:email:".concat(t),type:p.k.POST,data:{email:t}}}},y=r(75359),g=r(74887),b=r(12058),w=r(40695),E=r(73190),x=r(90815),L=r(36669),O=r(17762);const S={imageContainer:"QqX1V",topImage:"mjPRy",bottomImage:"uHwHs",info:"dNDnN"};function N(t){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(t)}function C(){C=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",u=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof y?e:y,a=Object.create(i.prototype),c=new A(n||[]);return o(a,"_invoke",{value:k(t,r,c)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var h="suspendedStart",d="suspendedYield",m="executing",p="completed",v={};function y(){}function g(){}function b(){}var w={};l(w,a,(function(){return this}));var E=Object.getPrototypeOf,x=E&&E(E(I([])));x&&x!==r&&n.call(x,a)&&(w=x);var L=b.prototype=y.prototype=Object.create(w);function O(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function S(t,e){function r(o,i,a,c){var u=f(t[o],t,i);if("throw"!==u.type){var l=u.arg,s=l.value;return s&&"object"==N(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,c)}),(function(t){r("throw",t,a,c)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,c)}))}c(u.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=h;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===p){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var c=n.delegate;if(c){var u=j(c,n);if(u){if(u===v)continue;return u}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?p:d,l.arg===v)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=p,n.method="throw",n.arg=l.arg)}}}function j(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,j(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),v;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,v;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function _(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function P(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function A(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(_,this),this.reset(!0)}function I(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(N(e)+" is not iterable")}return g.prototype=b,o(L,"constructor",{value:b,configurable:!0}),o(b,"constructor",{value:g,configurable:!0}),g.displayName=l(b,u,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===g||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,l(t,u,"GeneratorFunction")),t.prototype=Object.create(L),t},e.awrap=function(t){return{__await:t}},O(S.prototype),l(S.prototype,c,(function(){return this})),e.AsyncIterator=S,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new S(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},O(L),l(L,u,"Generator"),l(L,a,(function(){return this})),l(L,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=I,A.prototype={constructor:A,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(P),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return c.type="throw",c.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],c=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var u=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(u&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,v):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),P(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;P(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:I(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),v}},e}function k(t,e,r){var n;return n=function(t,e){if("object"!=N(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=N(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(e),(e="symbol"==N(n)?n:String(n))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function j(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,c=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=i.call(r)).done)&&(c.push(n.value),c.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(l)throw o}}return c}}(t,e)||function(t,e){if(t){if("string"==typeof t)return _(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var P,A=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{u(n.next(t))}catch(t){i(t)}}function c(t){try{u(n.throw(t))}catch(t){i(t)}}function u(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,c)}u((n=n.apply(t,e||[])).next())}))},I="onboarding.contactSales",F=i.T.encloseNamespace(I),U="product_onboarding_submission";!function(t){t.BookADemo="Onboarding book demo",t.RequestPricing="Onboarding request pricing",t.ContactUs="Onboarding other"}(P||(P={}));var T=[{id:P.BookADemo,imageUrl:m.W.OnboardingV2.ContactSales.BOOK_DEMO_ICON,colourClass:"bg-yellow",title:F("bookDemo"),description:F("bookDemoInfo")},{id:P.RequestPricing,imageUrl:m.W.OnboardingV2.ContactSales.REQUEST_PRICING_ICON,colourClass:"bg-teal",title:F("requestPricing"),description:F("requestPricingInfo")},{id:P.ContactUs,imageUrl:m.W.OnboardingV2.ContactSales.OTHER_ICON,colourClass:"bg-dark-blue",title:F("other"),description:F("otherInfo")}];function B(){var t,e=(0,E.Q)(),r=e.onClickBack,i=e.exitOnboarding,p=e.completeStepAsync,N=e.onSaveError,_=(0,x.H)().logEvent,B=a.a.useBasicFetch(d.N.currentUser()),G=a.a.useBasicFetch(B.data&&d.N.user(B.data.id)),D=a.a.useBasicFetch(f.L.version()),R=a.a.useBasicFetch(f.L.config()),V=a.a.useBasicFetch(B.data&&h.h.customer(B.data.customerId)),q=a.a.useBasicFetch(L.t.currentProspect()),K=a.a.useBasicFetch(B.data&&v.checkEmail(B.data.email)),z=(0,O.M)(),W=j(n.useState(),2),X=W[0],M=W[1],H=j(n.useState(""),2),Y=H[0],Q=H[1],$=j(n.useState(""),2),J=$[0],Z=$[1],tt={optionId:X,optionName:null===(t=T.find((function(t){return t.id===X})))||void 0===t?void 0:t.title,phoneNumber:Y,otherInformation:J};function et(){switch(X){case P.BookADemo:return"book_a_demo";case P.RequestPricing:return"request_pricing";case P.ContactUs:return"other"}}return n.createElement(w.z,{namespace:I},n.createElement(w.z.Left,{className:"bg-blue d-flex align-items-center"},n.createElement("div",{className:"px-5"},n.createElement("img",{className:"img-fluid",src:m.W.OnboardingV2.ContactSales.BACKGROUND}))),n.createElement(w.z.Right,{hasCustomButtons:!1,onClickNext:function(){var t,e,r,n,i,a,s,f,h,d,m,v,y,g,b,w,E,x,L,O;return A(this,void 0,void 0,C().mark((function S(){var j,P,I,F,T=this;return C().wrap((function(S){for(;;)switch(S.prev=S.next){case 0:return S.prev=0,S.next=3,l.F.getClient({brazeConfig:R.data.braze,geoLocation:z.isFallback?{countryCode:null!==(e=null===(t=B.data)||void 0===t?void 0:t.countryCode)&&void 0!==e?e:z.countryCode}:z,productName:u.X.Lite,version:D.data});case 3:(j=S.sent).setUser(l.F.hashedEmail(null===(r=G.data)||void 0===r?void 0:r.email)),j.openSession(),j.setUserFirstName(null===(n=G.data)||void 0===n?void 0:n.name),j.setUserLastName(null===(i=G.data)||void 0===i?void 0:i.surname),j.setUserPhone(Y),j.setUserEmail(null===(a=G.data)||void 0===a?void 0:a.email),P=l.F.removeEmptyKeys(k(k(k(k({},o.DefaultUserAttributes.Email,null===(s=G.data)||void 0===s?void 0:s.email),o.DefaultUserAttributes.FirstName,null===(f=G.data)||void 0===f?void 0:f.name),o.DefaultUserAttributes.LastName,null===(h=G.data)||void 0===h?void 0:h.surname),o.DefaultUserAttributes.Phone,Y)),I=l.F.removeEmptyKeys(k(k(k(k(k(k(k({},o.CustomUserAttributes.JobTitle,null===(v=null===(m=null===(d=G.data)||void 0===d?void 0:d.userProfile)||void 0===m?void 0:m.metadata)||void 0===v?void 0:v.jobTitle),o.CustomUserAttributes.AccountName,null===(y=B.data)||void 0===y?void 0:y.customerName),o.CustomUserAttributes.CrmId,null===(g=V.data)||void 0===g?void 0:g.crmId),o.CustomUserAttributes.OrgSubType,l.F.getSchoolType("")),"account_address",{country_code:null===(b=B.data)||void 0===b?void 0:b.countryCode,province:l.F.parseProvince((null===(w=q.data)||void 0===w?void 0:w.province)||"")}),"topic",X),o.CustomUserAttributes.SyncToCrm,!(null===(x=null===(E=K.data)||void 0===E?void 0:E.users)||void 0===x?void 0:x.length))),F=l.F.removeEmptyKeys(k(k(k(k({},o.EventUserAttributes.AccountCity,null===(L=q.data)||void 0===L?void 0:L.city),o.EventUserAttributes.AccountState,null===(O=q.data)||void 0===O?void 0:O.province),o.EventUserAttributes.ContactUsComment,J),"form_type",et())),j.bulkSetCustomUserAttributes(I),j.logEvent({type:U,data:Object.assign(Object.assign(Object.assign({},P),I),F)}),_(c.Vw.Click,c.Ix.Next,tt),j.sendData((function(t){return A(T,void 0,void 0,C().mark((function e(){return C().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return N(),e.abrupt("return",Promise.reject());case 3:return e.prev=3,e.next=6,p();case 6:e.next=12;break;case 8:return e.prev=8,e.t0=e.catch(3),N(),e.abrupt("return",Promise.reject());case 12:case"end":return e.stop()}}),e,null,[[3,8]])})))})),S.next=23;break;case 19:return S.prev=19,S.t0=S.catch(0),N(),S.abrupt("return",Promise.reject());case 23:case"end":return S.stop()}}),S,null,[[0,19]])})))},onClickBack:r,onClickComeBackLater:i,disableNext:!X||!Y||!G.data||X===P.ContactUs&&!J,nextText:F("contactSales")},n.createElement(y.W,{className:"mb-0"},n.createElement(s.x,{phrase:"heading"})),n.createElement(b.X,{className:"".concat(S.info," mb-0 mt-1")},n.createElement(s.x,{phrase:"info"})),n.createElement(b.X,{className:"fw-semibold mt-3 mb-1"},n.createElement(s.x,{phrase:"howCanWeHelp"})),n.createElement(g.f,{options:T,selection:X,setSelection:function(t){var e;_(c.Vw.Select,c.Ix.SelectOption,Object.assign(Object.assign({},tt),{optionId:t,optionName:null===(e=T.find((function(e){return e.id===t})))||void 0===e?void 0:e.title})),M(t)}}),n.createElement("label",{htmlFor:"phone-number"},F("phoneNumber"),n.createElement("span",{className:"text-danger"},"*")),n.createElement("input",{id:"phone-number",name:"phone-number",className:"form-control form-control-lg mb-3",type:"tel",value:Y,onChange:function(t){return Q(t.target.value)},placeholder:F("phoneNumberPlaceholder"),onFocus:function(){_(c.Vw.Focus,c.Ix.PhoneNumber,tt)},onBlur:function(){_(c.Vw.Blur,c.Ix.PhoneNumber,tt)}}),n.createElement("label",{htmlFor:"other-information"},F("otherLabel"),X===P.ContactUs&&n.createElement("span",{className:"text-danger"},"*")),n.createElement("input",{id:"other-information",name:"other-information",className:"form-control form-control-lg",value:J,onChange:function(t){return Z(t.target.value)},placeholder:F("otherPlaceholder"),onFocus:function(){_(c.Vw.Focus,c.Ix.OtherInformation,tt)},onBlur:function(){_(c.Vw.Blur,c.Ix.OtherInformation,tt)}})))}},17762:(t,e,r)=>{r.d(e,{M:()=>a});var n=r(20354),o=r(39151),i={countryCode:"us",isFallback:!0};function a(){var t=n.a.useBasicFetch(o.L.geoLocation());return t.hasCompleted&&!t.data?i:t.data}}}]);